1 <?php require("common.php");
3 $query = stripslashes($_GET['query']);
5 $nqs = explode('###',$query);
9 $x = explode("@@@",$v);
13 function prettify($s) {
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;
29 foreach( $q as $name => $txt) {
30 echo "<th>$name</th>";
35 foreach ($q as $k => $v) {
38 echo "<tr class=\"even\">";
40 echo "<tr class=\"odd\">";
41 foreach( $v as $name => $txt) {
42 echo "<td>" . prettify($txt) . "</td>";
53 <link type="text/css" rel="stylesheet" href="style.css"/>
56 <h1>QUERY results</h1>
57 <? foreach( $qs as $name => $q) { ?>
58 <h2><? echo $name; ?></h2>
60 <tt><? print $q; ?></tt>
63 <? query($q,&$printer); ?>
66 <p><a href="bench.php">BACK to the query page</a></p>