X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fhorloge_fonctions.php;fp=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fhorloge_fonctions.php;h=b518d73b781049965692f8880dc48f33cf22c48d;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hp=0000000000000000000000000000000000000000;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c;p=velocampus%2Fweb%2Fwww.git diff --git a/www/plugins/auto/couteau_suisse/couteau_suisse/outils/horloge_fonctions.php b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/horloge_fonctions.php new file mode 100644 index 0000000..b518d73 --- /dev/null +++ b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/horloge_fonctions.php @@ -0,0 +1,37 @@ +', + '', date("U"), '', date("Z"), ''; + 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)?join(".'||'.", $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) = explode('=', $a, 2); + if($b=="''" || $b=='""') $b = ''; + if(strlen($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="'.join('||',$t)."\">$def "; +} +?> \ No newline at end of file