Mercurial > hg > batmud > maputils
changeset 801:723ddd5537d9
Sync.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 13 Jul 2009 02:49:27 +0000 |
parents | 8fbde52dfdfe |
children | e71ca7a6402d |
files | www/common.inc.php www/config.inc.php www/loc.php www/wizards.txt |
diffstat | 4 files changed, 28 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/www/common.inc.php Mon Jul 13 02:46:23 2009 +0000 +++ b/www/common.inc.php Mon Jul 13 02:49:27 2009 +0000 @@ -81,9 +81,11 @@ $added = -1; if (!strstr($m[3], "-")) { - $filterMatch = strpos($m[3], $filter) !== FALSE; + $filterMatch = preg_match("/[".$filter."]/", $m[3]); if (($applyFilter && $filterMatch) || (!$applyFilter && !$filterMatch)) { + $names = preg_split("/\s*\|\s*/", $m[4]); + $s = ""; $flags = $m[3]; $found = FALSE; @@ -94,15 +96,17 @@ $s = $locationTypes[$found][1]." "; } } - $s .= $m[4]; + $s .= $names[0]; if (isset($locations[$s])) { - echo "Error: Location <b>".$m[4]."</b> already defined (".$locations[$s]["continent"]." <=> ".$filename.")\n"; + echo "Error: Location <b>".$names[0]."</b> already defined (".$locations[$s]["continent"]." <=> ".$filename.")\n"; return FALSE; } + $locations[$s] = array( "name" => $s, + "names" => $names, "continent" => $filename, "x" => $m[1], "y" => $m[2], @@ -125,7 +129,7 @@ } -function readLocationFiles($applyFilter, $filter = "C") +function readLocationFiles($applyFilter = FALSE, $filter = "CF") { global $continentList, $specialList;
--- a/www/config.inc.php Mon Jul 13 02:46:23 2009 +0000 +++ b/www/config.inc.php Mon Jul 13 02:49:27 2009 +0000 @@ -3,7 +3,7 @@ $pageCharset = "iso-8859-1"; $pageTitle = "Pupunen BatMUD Maps"; $pageCSS = "http://tnsp.org/docs.css"; -#$pageMapURL = "http://www.students.oamk.fi/~mhamalai/maps/"; +#$pageMapURL = "http://pet8032.tnsp.org/maps/"; $pageMapURL = "http://tnsp.org/maps/"; $jeskkoURL = "http://jeskko.pupunen.net/map/"; $pageIndex = "index.php";
--- a/www/loc.php Mon Jul 13 02:46:23 2009 +0000 +++ b/www/loc.php Mon Jul 13 02:49:27 2009 +0000 @@ -2,25 +2,25 @@ require "config.inc.php"; require "common.inc.php"; -function makeURL($afilter, $filter, $coders, $desc, $name, $class) +function makeURL($afilter, $filter, $coders, $desc, $qname, $qclass) { $s = ""; if ($afilter) $s = "f=".$filter; if (!$coders) { - if ($s != "") $s .= "&"; + if ($s !== "") $s .= "&"; $s .= "s"; } - if (isset($name)) { - if ($s != "") $s .= "&"; - $s .= "n=".$name; + if ($qname !== "") { + if ($s !== "") $s .= "&"; + $s .= "n=".$qname; } echo " <td><a "; - if (isset($class)) - echo "class=\"".$class."\" "; - echo "href=\"".$GLOBALS["SCRIPT_NAME"]; + if ($qclass !== "") + echo "class=\"".$qclass."\" "; + echo "href=\"".$_SERVER["PHP_SELF"]; if (strlen($s) > 0) echo "?".$s; echo "\">".$desc."</a></td>\n"; } @@ -41,7 +41,7 @@ $filter = $_GET["f"]; $applyFilter = TRUE; } else { - $filter = "C"; + $filter = "CF"; $applyFilter = FALSE; } } @@ -94,7 +94,7 @@ ?> <div class="selbar"> - <form action="<? echo $GLOBALS["SCRIPT_NAME"]; ?>" method="get"> + <form action="<? echo $_SERVER["PHP_SELF"]; ?>" method="get"> <? if (isset($setName)) echo "<input type=\"hidden\" name=\"n\" value=\"".htmlentities($setName)."\" />\n"; @@ -121,7 +121,7 @@ echo " <td></td>\n"; -makeURL($applyFilter, $filter, $showCoders, "All continents"); +makeURL($applyFilter, $filter, $showCoders, "All continents", "", ""); reset($continentList); while (list($iKey, $iValue) = each($continentList)) { @@ -254,7 +254,7 @@ while (list($fKey, $fVal) = each($iv["coders"])) { if ($fs != "") $fs .= ", "; if ($filter != "C" || !$applyFilter) - $fs .= "<a href=\"".$GLOBALS["SCRIPT_NAME"]."?a=".$fVal."\">".$fVal."</a>"; + $fs .= "<a href=\"".$_SERVER["PHP_SELF"]."?a=".$fVal."\">".$fVal."</a>"; else $fs .= $fVal; }
--- a/www/wizards.txt Mon Jul 13 02:46:23 2009 +0000 +++ b/www/wizards.txt Mon Jul 13 02:49:27 2009 +0000 @@ -328,7 +328,13 @@ <b>UUHUHSSCCAARYY!!! UUHHH!! AHRRUHH!!</b> $ -Era;bat;img/era.jpg;$ +Era;bat;img/era.jpg; + Another all-around wizard, who was also well known as mortal. + Has worked on many things, including guild code maintenance + and cleanups. + He has a easy to use boon-calculator and some nice triggers + for BatClient and TF on his homepage, so check them out. + $ Lanfear;;;LQ85 Flying Citadel, alchemist guild, plants, ores.$ Merri;;;Expanded Zoso's Caverns of the Undying, adding Massive iron statue and Listar.$