Mercurial > hg > batmud > alchtool
diff index.php @ 40:bb335b891605
Various improvements.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Mar 2011 13:58:48 +0200 |
parents | 03d7fc455629 |
children | ebd29544477c |
line wrap: on
line diff
--- a/index.php Tue Mar 22 09:45:35 2011 +0200 +++ b/index.php Tue Mar 22 13:58:48 2011 +0200 @@ -15,10 +15,10 @@ } $dbModes = array( - "min" => array("Mineral", 0), - "org" => array("Organ", 1), - "herb" => array("Herb", 2), - "list" => array("Potion list", 3), + "min" => array("Mineral", 0, "minerals"), + "org" => array("Organ", 1, "organs"), + "herb" => array("Herb", 2, "herbs"), + "list" => array("Potion list", 3, "potions"), ); $dbNames = array( @@ -175,7 +175,7 @@ $div = $max / 2; // Print selection for primary key - echo "<table border=\"1\" cellspacing=\"0\">\n"; + echo "<table class=\"seltable\" border=\"1\" cellspacing=\"0\">\n"; $n = 0; foreach ($pdata as $key => $val) { if ($n == 0) echo " <tr>\n"; @@ -268,6 +268,7 @@ <link href="alch.css" title="compact" rel="stylesheet" type="text/css"> </head> <body> +<div id="info"> <? alch_matrix_clear(); @@ -347,10 +348,11 @@ for ($z = 0; $z < $dbDims[2]; $z++) $results[$db[$x][$y][$z][0]]++; -echo $results["!"]." found potions, ". - $results["?"]." active partial matches, ". - $results["-"]." combinations eliminated, ". - $results["."]." combinations untested.<br />\n"; +echo "<b>".$results["!"]."</b> found potions, ". + "<b>".$results["?"]."</b> active partial matches, ". + "<b>".$results["-"]."</b> combinations eliminated, ". + "<b>".$results["."]."</b> combinations untested.\n". + "</div>\n"; function printItem($x, $y, $z, $s, &$index) @@ -373,11 +375,10 @@ printItem($x, $y, $z, substr($s, 1), $index); } -?> -<p> -Change index key to [<a href="?org=0">organs</a>] [<a href="?min=0">minerals</a>] [<a href="?herb=0">herbs</a>] [<a href="?list">Potion list</a>] -</p> -<? +echo "<div id=\"controls\">Change index key to "; +foreach ($dbModes as $id => $data) + echo "[<a href=\"?".$id."=0\">".$data[2]."</a>] "; +echo "</div>\n"; if ($mode == "list") { @@ -435,7 +436,7 @@ alch_matrix_print($mode, $active); ?> -<table border="1" cellspacing="1"> +<table id="legend" border="1" cellspacing="1"> <tr><th colspan="2" class="noframe">Legend</th></tr> <tr><td width="10%" class="notres"> </td><th class="noframe">Not researched yet</th></tr> <tr><td class="nomatch">-</td><th class="noframe">No match</th></tr>