]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/scripts/public_html/showquery.php
the web interface for the benchmarking system
[helm.git] / helm / matita / scripts / public_html / showquery.php
diff --git a/helm/matita/scripts/public_html/showquery.php b/helm/matita/scripts/public_html/showquery.php
new file mode 100644 (file)
index 0000000..bd54d6a
--- /dev/null
@@ -0,0 +1,45 @@
+<?php require("common.php"); 
+
+  $query = stripslashes($_GET['query']);
+
+  $nqs = explode('###',$query);
+
+  $qs = array();
+  foreach($nqs as $v){
+    $x = explode("@@@",$v);
+    $qs[$x[0]] = $x[1];
+  }
+
+?>
+<html>
+  <head>
+  <link type="text/css" rel="stylesheet" href="style.css"/>
+  </head>
+  <body>
+    <h1>QUERY results</h1>
+<? foreach( $qs as $name => $q) { ?>
+    <h2><? echo $name; ?></h2>
+    <p>
+    <tt><? print $q; ?></tt>
+    </p>
+    <table border=1>
+    <? 
+      $q = query($q);
+      echo "<tr>";
+      foreach( $q[0] as $name => $txt) {
+          echo "<th>$name</th>";
+        }
+      echo "</tr>\n";
+      foreach ($q as $k => $v) {
+        echo "<tr>";      
+        foreach( $v as $name => $txt) {
+          echo "<td>$txt</td>";
+        }
+        echo "</tr>\n";      
+      }
+    ?>
+    </table>
+<? } ?>
+    <p><a href="bench.php">BACK to the query page</a></p>
+  </body>
+</html>