From ceed8548b55bbd8fe55f1d4f3424d756defd6d48 Mon Sep 17 00:00:00 2001
From: Enrico Tassi
Marks:
- array_to_combo("mark",
- query("select distinct mark from bench order by mark desc;")); ?>
+
Compilations:
- array_to_combo("compilation",
- query("select distinct compilation from bench;")); ?>
+
Options:
-
+
Tests:
- array_to_combo("test",query("select distinct test from bench;")); ?>
+
Test results:
- array_to_combo("result",query("select distinct result from bench;")); ?>
+
Group By:
- array_to_combo("groupby",array(array("mark","options"))); ?>
+
Limit:
- array_to_combo("limit",array($limits)); ?>
+
diff --git a/matita/scripts/public_html/common.php b/matita/scripts/public_html/common.php
index 5b9f51e5d..ca853603d 100644
--- a/matita/scripts/public_html/common.php
+++ b/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/matita/scripts/public_html/showquery.php b/matita/scripts/public_html/showquery.php
index 1e385d46e..007f37217 100644
--- a/matita/scripts/public_html/showquery.php
+++ b/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 " \n";
+ if ( $i%2 == 0)
+ echo "" . prettify($txt) . " ";
- }
- echo "";
+ else
+ echo " ";
+ foreach( $q as $name => $txt) {
+ echo " \n";
}
$i++;
}
@@ -60,7 +61,7 @@ function printer($q){
print $q; ?>
" . prettify($txt,$name) . " ";
}
+ echo "