Mercurial > hg > batmud > maputils
diff www/loc.php @ 2055:062725ea7be7
Cleanups and minor improvements to location list page.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 10 May 2019 01:50:43 +0300 |
parents | 77c8892c78ca |
children | 94d3c4ae7121 |
line wrap: on
line diff
--- a/www/loc.php Fri May 10 01:50:15 2019 +0300 +++ b/www/loc.php Fri May 10 01:50:43 2019 +0300 @@ -17,6 +17,8 @@ function printTitleLink($afilter, $filter, $coders, $desc, $qname, $qclass) { + global $setName; + $s = ""; if ($afilter) $s = "f=".$filter; @@ -33,6 +35,9 @@ $s .= "n=".$qname; } + if ($setName == $qname || ($setName == "" && $qname == "all")) + $qclass .= " active"; + echo " <a class=\"control continent ".$qclass. "\" href=\"?".$s."\">".$desc."</a>\n"; @@ -59,7 +64,7 @@ // Initialization // // Special backwards compatibility case for pcities -if (isset($_GET["c"])) +if (isset($_REQUEST["c"])) { $filterID = "C"; $applyFilter = TRUE; @@ -85,9 +90,9 @@ } -$showCoders = !isset($_GET["s"]); +$showCoders = !isset($_REQUEST["s"]); -if (($tmpName = mpGetRequestItem("a", FALSE, TRUE)) !== false) +if (($tmpName = mpGetRequestItem("a", FALSE, TRUE)) !== FALSE) { if (preg_match("#^([a-z]{1,15})#i", $tmpName, $matches)) { @@ -108,10 +113,10 @@ } } -if (isset($_GET["n"])) +if (($tmpName = mpGetRequestItem("n", FALSE, TRUE)) !== FALSE) { $locTable = []; - $setName = strtolower(trim(basename($_GET["n"]))); + $setName = strtolower(trim(basename($tmpName))); if (file_exists($setName.".loc")) { $locTable = apcu_fetch("loc_".$setName);