]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/public_html/showquery.php
ocaml 3.09 transition
[helm.git] / helm / matita / scripts / public_html / showquery.php
1 <?php require("common.php"); 
2
3   $query = stripslashes($_GET['query']);
4
5   $nqs = explode('###',$query);
6
7   $qs = array();
8   foreach($nqs as $v){
9     $x = explode("@@@",$v);
10     $qs[$x[0]] = $x[1];
11   }
12
13 ?>
14 <html>
15   <head>
16   <link type="text/css" rel="stylesheet" href="style.css"/>
17   </head>
18   <body>
19     <h1>QUERY results</h1>
20 <? foreach( $qs as $name => $q) { ?>
21     <h2><? echo $name; ?></h2>
22     <p>
23     <tt><? print $q; ?></tt>
24     </p>
25     <table border=1>
26     <? 
27       $q = query($q);
28       echo "<tr>";
29       foreach( $q[0] as $name => $txt) {
30           echo "<th>$name</th>";
31         }
32       echo "</tr>\n";
33       foreach ($q as $k => $v) {
34         echo "<tr>";      
35         foreach( $v as $name => $txt) {
36           echo "<td>$txt</td>";
37         }
38         echo "</tr>\n";      
39       }
40     ?>
41     </table>
42 <? } ?>
43     <p><a href="bench.php">BACK to the query page</a></p>
44   </body>
45 </html>