1 <?php require("common.php");
3 $query = stripslashes($_GET['query']);
5 $nqs = explode('###',$query);
9 $x = explode("@@@",$v);
13 function prettify($s,$name) {
14 if (preg_match("/^[0-9]{12}$/",$s)) {
15 $year = substr($s,0,4);
16 $month = substr($s,4,2);
17 $day = substr($s,6,2);
18 $hour = substr($s,8,2);
19 $minute = substr($s,10,2);
20 return $day . "/" . $month . "/" . $year . " " . $hour . ":" . $minute;
21 } else if ($name == "sum_time" || $name == "sum_timeuser"){
22 $min = floor($s / 6000);
23 $sec = floor(($s - $min * 6000) / 100);
25 return $min . "m" . $sec . "." . $cents . "s";
34 foreach( $q as $name => $txt) {
35 echo "<th>$name</th>";
40 echo "<tr class=\"even\">";
42 echo "<tr class=\"odd\">";
43 foreach( $q as $name => $txt) {
44 echo "<td>" . prettify($txt,$name) . "</td>";
54 <link type="text/css" rel="stylesheet" href="style.css"/>
57 <h1>QUERY results</h1>
58 <? foreach( $qs as $name => $q) { ?>
59 <h2><? echo $name; ?></h2>
61 <tt><? print $q; ?></tt>
64 <? query($q,"printer"); ?>
67 <p><a href="bench.php">BACK to the query page</a></p>