| Current Path : /home/quelfutuu/www/plugins/auto/couteau_suisse/v1.17.0/outils/ |
| Current File : /home/quelfutuu/www/plugins/auto/couteau_suisse/v1.17.0/outils/horloge_fonctions.php |
<?php
// action speciale, si cs_dateserveur=oui
if(!isset($GLOBALS['cs_fonctions']) && isset($_GET['cs_dateserveur'])) {
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>',
'<curTime><U>', date("U"), '</U><Z>', date("Z"), '</Z></curTime>';
exit;
}
// La balise #HORLOGE
function balise_HORLOGE_dist($p) {
$i = 1; $args = array();
while(($a = interprete_argument_balise($i++,$p)) != NULL)
$args[] = $a;
$args = count($args) ? implode(".'||'.", $args) : "''";
$p->code = "horloge_params($args)";
$p->interdire_scripts = false;
return $p;
}
function horloge_params($args) {
$t = array();
$bal = 'span'; $def = '99:99';
$args = explode('||', $args);
foreach($args as $a) {
list($a, $b) = $a ? explode('=', $a, 2) : array('', '');
if($b == "''" || $b == '""') $b = '';
if($a) {
if($a == 'id') $id = 'jclock'.$b;
elseif($a == 'defaut') $def = $b;
elseif($a == 'balise') $bal = $b;
else $t[$a] = "$a=$b";
}
}
return "<$bal class=\"jclock"
. (isset($id) ? " $id\" id=\"$id" : '')
. '" title="' . implode('||', $t)
. "\">$def</$bal> ";
}
?>