changeset 149:762e30af53f6 misc

New features, cleanups, stylesheets.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 21 Dec 2010 17:03:38 +0000
parents 6480620d2e4a
children 35c93e4727ea
files materials/alloy.php materials/index.php materials/submit.php
diffstat 3 files changed, 23 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/materials/alloy.php	Tue Dec 21 02:47:17 2010 +0000
+++ b/materials/alloy.php	Tue Dec 21 17:03:38 2010 +0000
@@ -35,6 +35,7 @@
   <th width="25%">Show type</th>
   <td rowspan="3" class="infobox">
    [<a href="<? echo $pageIndex; ?>">Reset/Clear</a>] [<a href="index.php">Material browser</a>]
+   <br />
    <ul>
     <li><b>Also available in <a href="alloys.txt">ASCII plaintext format</a>.</b></li>
     <li>Only 2-material alloys are supported by this browser.</li>
@@ -78,7 +79,6 @@
  </tr>
  <tr>
   <td class="icenter"><input type="submit" value=" Filter " class="isubmit" /></td>
-  <td></td>
  </tr>
 </table>
 </form>
@@ -196,7 +196,7 @@
       $currTable[$name] = $data;
   }
 
-  echo "<table class=\"matTable\">".
+  echo "<table class=\"alloyTable\">".
   " <tr>\n".
   "  <th>-</th>\n";
   
--- a/materials/index.php	Tue Dec 21 02:47:17 2010 +0000
+++ b/materials/index.php	Tue Dec 21 17:03:38 2010 +0000
@@ -77,8 +77,13 @@
   <th>Show only type</th>
   <td rowspan="3" class="infobox">
    [<a href="<? echo $pageIndex; ?>">Reset/Clear</a>] [<a href="alloy.php">Alloy browser</a>]
+   - <b>CHANGE COLOURS/STYLE: <?
+   for ($i = 1; $i <= 3; $i++)
+     echo "<a href=\"?css=$i\">($i)</a> "
+   ?></b>
    <br />
    <ul>
+    <li>Material data updated as of December 2010.</li>
     <li>This informations free to use in any way you wish. It would be nice to be credited, however.</li>
     <li>There may be bugs. If you notice any inaccuracies, contact <b>Ggr</b> @ Bat.</li>
     <li><b>Raw material data is also available in <a href="materials.csv">CSV format</a>, <a href="materials_short.txt">short tabular format</a> and <a href="materials_long.txt">long format</a></b>.</li>
@@ -124,11 +129,19 @@
  </tr>
  <tr>
   <td colspan="2" class="icenter"><input type="submit" value=" Filter " class="isubmit" /></td>
-  <td></td>
  </tr>
 </table>
 </form>
-
+<?
+if (count($colFilters) > 0) {
+  $str = "";
+  foreach ($colFilters as $fkey => $fval) {
+    if ($str != "") $str .= ", ";
+    $str .= "<b>".strtolower($transNameTable[$fkey + 1])."</b>=".strtolower($transTable[$fkey][$fval]);
+  }
+  echo "<p>Filtering: ".$str."</p>\n";
+}
+?>
 <table class="matTable">
  <tr>
 <?
@@ -189,7 +202,11 @@
         } else {
           // A simple entry, just print it out
           $tmpFilters = $colFilters;
-          $tmpFilters[$kkey] = $kvalue;
+          if (isset($tmpFilters[$kkey]))
+            unset($tmpFilters[$kkey]);
+          else
+            $tmpFilters[$kkey] = $kvalue;
+
           echo "<a href=\"?s=".$sortColumn."&amp;d=".
             $sortDirs[$sortDirection].
             getFilterStr($tmpFilters).
--- a/materials/submit.php	Tue Dec 21 02:47:17 2010 +0000
+++ b/materials/submit.php	Tue Dec 21 17:03:38 2010 +0000
@@ -1,5 +1,5 @@
 <?
-$pageTitle = "Alloy combo submitter";
+$pageTitle = "Alloy combination submitter";
 $pageIndex = "submit.php";
 
 require "mcommon.inc.php";