X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fscripts%2Fpublic_html%2Fshowquery.php;h=dfa0b473068144d1e12e90c6718e45822b7a3d60;hb=6be5f8cd650becb93f8d8d06eb6b72ef3e9d27c1;hp=886cb3390cb1f5b5c2411be5802c810e6c4994c2;hpb=4ee27d158de49af15c1f21ad50474744720a537a;p=helm.git diff --git a/matita/scripts/public_html/showquery.php b/matita/scripts/public_html/showquery.php index 886cb3390..dfa0b4730 100644 --- a/matita/scripts/public_html/showquery.php +++ b/matita/scripts/public_html/showquery.php @@ -7,46 +7,13 @@ $qs = array(); foreach($nqs as $v){ $x = explode("@@@",$v); - $qs[$x[0]] = $x[1]; + if ($x[1] == NULL) { + $qs["Unnamed"] = $x[0]; + } else { + $qs[$x[0]] = $x[1]; + } } -function prettify($s,$name) { - 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 if ($name == "sum_time" || $name == "sum_timeuser"){ - $min = floor($s / 6000); - $sec = floor(($s - $min * 6000) / 100); - $cents = $s % 100; - return $min . "m" . $sec . "." . $cents . "s"; - } else - return $s; -} - -function printer($q){ - static $i = 0; - echo ""; - if ( $i == 0) { - foreach( $q as $name => $txt) { - echo "$name"; - } - } - echo "\n"; - if ( $i%2 == 0) - echo ""; - else - echo ""; - foreach( $q as $name => $txt) { - echo "" . prettify($txt,$name) . ""; - } - echo "\n"; - $i++; -} - ?> @@ -54,10 +21,10 @@ function printer($q){

QUERY results

- $q) { ?> + $q) { $i=0;?>

- +