]> matita.cs.unibo.it Git - helm.git/commitdiff
beauty\!
authorEnrico Tassi <enrico.tassi@inria.fr>
Sat, 24 Dec 2005 14:40:26 +0000 (14:40 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Sat, 24 Dec 2005 14:40:26 +0000 (14:40 +0000)
helm/matita/scripts/public_html/showquery.php
helm/matita/scripts/public_html/style.css

index bd54d6a63e47dc3ad7aca5fe373d90f77f37d3d0..e7db764d80e78d5f529490668a674b23386a5a83 100644 (file)
     $qs[$x[0]] = $x[1];
   }
 
+function prettify($s) {
+  if (preg_match("/^[0-9]{12}$/",$s)) {
+    $year = substr($s,0,4);
+    $month = substr($s,4,2);
+    $day = substr($s,6,2);
+    $hour = substr($s,8,2);
+    $minute = substr($s,10,2);
+    return $day . "/" . $month . "/" . $year . " " . $hour . ":" . $minute;
+  } else
+    return $s;
+}
+  
 ?>
 <html>
   <head>
           echo "<th>$name</th>";
         }
       echo "</tr>\n";
+      $i=0;
       foreach ($q as $k => $v) {
-        echo "<tr>";      
+        $i = $i + 1;
+        if ( $i%2 == 0)
+          echo "<tr class=\"even\">";      
+        else
+          echo "<tr class=\"odd\">";
         foreach( $v as $name => $txt) {
-          echo "<td>$txt</td>";
+          echo "<td>" . prettify($txt) . "</td>";
         }
         echo "</tr>\n";      
       }
index 17c66f4285611dd6d961568a2ad222d91f4d851b..dc2df470da1dce6c29fb48d74ceb6740b3261067 100644 (file)
@@ -33,3 +33,23 @@ li {
 ul {
   list-style-type: upper-roman;
 }
+
+table, td {
+  border-style:none;
+  padding: 2px 6px 2px 6px;
+}
+
+tr.odd {
+  background-color:#EEEEEE;
+}
+tr.even {
+  background-color:#CECECE;
+}
+
+th {
+  border-style:solid;
+  border-width:0px 0px 1px 0px;
+  border-color: gray;
+}
+
+