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;
28 <link type="text/css" rel="stylesheet" href="style.css"/>
31 <h1>QUERY results</h1>
32 <? foreach( $qs as $name => $q) { ?>
33 <h2><? echo $name; ?></h2>
35 <tt><? print $q; ?></tt>
41 foreach( $q[0] as $name => $txt) {
42 echo "<th>$name</th>";
46 foreach ($q as $k => $v) {
49 echo "<tr class=\"even\">";
51 echo "<tr class=\"odd\">";
52 foreach( $v as $name => $txt) {
53 echo "<td>" . prettify($txt) . "</td>";
60 <p><a href="bench.php">BACK to the query page</a></p>