2 // action speciale, si cs_dateserveur=oui
3 if(!isset($GLOBALS['cs_fonctions']) && isset($_GET['cs_dateserveur'])) {
4 header('Content-Type: text/xml');
5 echo '<?xml version="1.0" encoding="UTF-8"?>',
6 '<curTime><U>', date("U"), '</U><Z>', date("Z"), '</Z></curTime>';
11 function balise_HORLOGE_dist($p) {
12 $i = 1; $args = array();
13 while(($a = interprete_argument_balise($i++
,$p)) != NULL) $args[] = $a;
14 $args = count($args)?
join(".'||'.", $args):"''";
15 $p->code
= "horloge_params($args)";
16 $p->interdire_scripts
= false;
20 function horloge_params($args) {
22 $bal = 'span'; $def='99:99';
23 $args = explode('||', $args);
24 foreach($args as $a) {
25 list($a, $b) = explode('=', $a, 2);
26 if($b=="''" ||
$b=='""') $b = '';
28 if($a=='id') $id = 'jclock'.$b;
29 elseif($a=='defaut') $def = $b;
30 elseif($a=='balise') $bal = $b;
31 else $t[$a] = "$a=$b";
34 return "<$bal class=\"jclock" . (isset($id)?
" $id\" id=\"$id":'')
35 .'" title="'.join('||',$t)."\">$def</$bal> ";