X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2Fscripts%2Fpublic_html%2Fshowquery.php;h=e7db764d80e78d5f529490668a674b23386a5a83;hb=3aeca350068456256c8eadb7b1784909e238b79f;hp=bd54d6a63e47dc3ad7aca5fe373d90f77f37d3d0;hpb=663f8e1c82196b9e3f817bf059edcfcfe22993c3;p=helm.git diff --git a/helm/matita/scripts/public_html/showquery.php b/helm/matita/scripts/public_html/showquery.php index bd54d6a63..e7db764d8 100644 --- a/helm/matita/scripts/public_html/showquery.php +++ b/helm/matita/scripts/public_html/showquery.php @@ -10,6 +10,18 @@ $qs[$x[0]] = $x[1]; } +function prettify($s) { + if (preg_match("/^[0-9]{12}$/",$s)) { + $year = substr($s,0,4); + $month = substr($s,4,2); + $day = substr($s,6,2); + $hour = substr($s,8,2); + $minute = substr($s,10,2); + return $day . "/" . $month . "/" . $year . " " . $hour . ":" . $minute; + } else + return $s; +} + ?> @@ -30,10 +42,15 @@ echo "$name"; } echo "\n"; + $i=0; foreach ($q as $k => $v) { - echo ""; + $i = $i + 1; + if ( $i%2 == 0) + echo ""; + else + echo ""; foreach( $v as $name => $txt) { - echo "$txt"; + echo "" . prettify($txt) . ""; } echo "\n"; }