Mercurial > hg > batmud > misc
changeset 156:51354f264ebc misc
Sync.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 22 Dec 2010 12:39:53 +0000 |
parents | a7c027f7f9a4 |
children | 20246c97e773 |
files | materials/alloy.php materials/index.php |
diffstat | 2 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/materials/alloy.php Tue Dec 21 23:56:45 2010 +0000 +++ b/materials/alloy.php Wed Dec 22 12:39:53 2010 +0000 @@ -1,5 +1,5 @@ <? -$pageTitle = "Ggr's BatMUD Alloy Browser"; +$pageTitle = "Pupunen BatMUD Alloy Browser"; $pageIndex = "alloy.php"; require "mcommon.inc.php"; @@ -20,13 +20,35 @@ $swapRows = array(); +function matLink($mat, $title = "") { + $tmp = ($title != "") ? " title=\"".htmlentities($title)."\"" : ""; + return "<a href=\"?m=".urlencode($mat)."\"".$tmp.">".htmlentities($mat)."</a>"; +} + + +function addValueStyle($n) +{ + if ($n >= 20) $s = 20; + else + if ($n >= 10) $s = 10; + else + if ($n >= 5) $s = 5; + else + if ($n > 0) $s = 0; + else + return ""; + + return " class=\"hits".$s."\""; +} + + printPageHeader($pageTitle, " <style type=\"text/css\"> + td.hits20 a { color: black; } td.hits20 { background: #0c0; color: black; } - td.hits20 a { color: black; } - td.hits10 { background: #070; } + td.hits10 { background: #080; } td.hits5 { background: #750; } - td.hits0 { background: #400; } + td.hits0 { background: #420; } td.nohits { background: black; } </style> "); @@ -86,28 +108,6 @@ </table> </form> <? -function addValueStyle($n) -{ - if ($n >= 20) $s = 20; - else - if ($n >= 10) $s = 10; - else - if ($n >= 5) $s = 5; - else - if ($n > 0) $s = 0; - else - return ""; - - return " class=\"hits".$s."\""; -} - - -function matLink($mat, $title = "") { - $tmp = ($title != "") ? " title=\"".htmlentities($title)."\"" : ""; - return "<a href=\"?m=".urlencode($mat)."\"".$tmp.">".htmlentities($mat)."</a>"; -} - - if (isset($showMat)) { if (!isset($matTable[$showMat])) { echo "<h2>Error! No such material '".$showMatName."'</h2>\n".
--- a/materials/index.php Tue Dec 21 23:56:45 2010 +0000 +++ b/materials/index.php Wed Dec 22 12:39:53 2010 +0000 @@ -1,5 +1,5 @@ <? -$pageTitle = "Ggr's BatMUD Material Browser"; +$pageTitle = "Pupunen BatMUD Material Browser"; $pageIndex = "index.php"; require "mcommon.inc.php"; require "materials.inc.php";