From 7fbb1eb57d3d8fffdf5398bc3b16adea58f143ed Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 16 Mar 2006 14:00:09 +0000 Subject: [PATCH] moved to the new table --- .../matita/scripts/public_html/bench.php | 38 ++++++++++++++----- .../matita/scripts/public_html/common.php | 17 +++------ .../matita/scripts/public_html/showquery.php | 27 ++++++------- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/helm/software/matita/scripts/public_html/bench.php b/helm/software/matita/scripts/public_html/bench.php index ed5572b9f..f11994ec1 100644 --- a/helm/software/matita/scripts/public_html/bench.php +++ b/helm/software/matita/scripts/public_html/bench.php @@ -97,45 +97,65 @@ function links_of($name,$q,$limits){ Marks: - + Compilations: - + Options: - + Tests: - + Test results: - + Group By: - + Limit: - + diff --git a/helm/software/matita/scripts/public_html/common.php b/helm/software/matita/scripts/public_html/common.php index 5b9f51e5d..ca853603d 100644 --- a/helm/software/matita/scripts/public_html/common.php +++ b/helm/software/matita/scripts/public_html/common.php @@ -1,5 +1,11 @@ $v){ + echo ""; + } +} + function query($q,$f) { $db = mysql_pconnect("localhost","helm"); mysql_select_db("matita"); @@ -25,15 +31,4 @@ function time_2_cents($t) { return ((int) $t_cents) + ((int) $t_secs) * 100 + ((int)$t_minutes) * 6000 ; } -function array_to_combo($l,$a) { - echo ""; -} - ?> diff --git a/helm/software/matita/scripts/public_html/showquery.php b/helm/software/matita/scripts/public_html/showquery.php index 1e385d46e..007f37217 100644 --- a/helm/software/matita/scripts/public_html/showquery.php +++ b/helm/software/matita/scripts/public_html/showquery.php @@ -10,7 +10,7 @@ $qs[$x[0]] = $x[1]; } -function prettify($s) { +function prettify($s,$name) { if (preg_match("/^[0-9]{12}$/",$s)) { $year = substr($s,0,4); $month = substr($s,4,2); @@ -18,6 +18,11 @@ function prettify($s) { $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; } @@ -31,18 +36,14 @@ function printer($q){ } echo "\n"; } else { - $i=0; - foreach ($q as $k => $v) { - $i = $i + 1; - if ( $i%2 == 0) - echo ""; - else - echo ""; - foreach( $v as $name => $txt) { - echo "" . prettify($txt) . ""; - } - echo "\n"; + if ( $i%2 == 0) + echo ""; + else + echo ""; + foreach( $q as $name => $txt) { + echo "" . prettify($txt,$name) . ""; } + echo "\n"; } $i++; } @@ -60,7 +61,7 @@ function printer($q){

- +

BACK to the query page

-- 2.39.2