X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fscripts%2Fpublic_html%2Fshowquery.php;h=dfa0b473068144d1e12e90c6718e45822b7a3d60;hb=190662b877ba89ccb152f0bf5c67df62be737335;hp=e7db764d80e78d5f529490668a674b23386a5a83;hpb=7f2444c2670cadafddd8785b687ef312158376b0;p=helm.git diff --git a/matita/scripts/public_html/showquery.php b/matita/scripts/public_html/showquery.php index e7db764d8..dfa0b4730 100644 --- a/matita/scripts/public_html/showquery.php +++ b/matita/scripts/public_html/showquery.php @@ -7,21 +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) { - 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; -} - ?> @@ -29,32 +21,13 @@ function prettify($s) {

QUERY results

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

- +

- "; - foreach( $q[0] as $name => $txt) { - echo ""; - } - echo "\n"; - $i=0; - foreach ($q as $k => $v) { - $i = $i + 1; - if ( $i%2 == 0) - echo ""; - else - echo ""; - foreach( $v as $name => $txt) { - echo ""; - } - echo "\n"; - } - ?> +
$name
" . prettify($txt) . "

BACK to the query page