Mercurial > hg > batmud > maputils
diff www/info.php @ 337:ca191c3a0ce1
Updates and lots of new ugly glue.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 11 Jul 2007 16:05:32 +0000 |
parents | |
children | bb5d434f1d5b |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/info.php Wed Jul 11 16:05:32 2007 +0000 @@ -0,0 +1,133 @@ +<? +require "config.inc.php"; +require "common.inc.php"; + +/* Page start + */ +printPageHeader($pageTitle." - Wizards of the Realm"); +//echo "<div><b>DEVELOPMENT VERSION</b></div>"; +?> +<h1>Wizards of the Realm</h1> + +<div class="wizinfo"> +<table><tr><td> +<b>Notice #1</b>: The area counts are not really accurate, as the database only +lists areas accessible from outworld. Thus the areas only accessible via some +other fashion are not listed.<br /> +<b>Notice #2</b>: Not everyone who has once been immortal is listed. +Some purged and/or remorted wizards without known contributions are unlisted. +<br /> +<b>Notice #3</b>: It is certainly possible, that some of this information is +incorrect. Sorry for that. Please report to <? burl("Ggr") ?>, if you have Knowledge(tm). + +</td><td> + +<script type="text/javascript"><!-- +google_ad_client = "pub-0261199601131882"; +google_ad_width = 180; +google_ad_height = 60; +google_ad_format = "180x60_as_rimg"; +google_cpa_choice = "CAAQ24Oy0QEaCH9Si1cjMAnSKMu293MwAA"; +google_ad_channel = "4482432148"; +//--> +</script> +<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> +</script> + +</td></tr></table> +</div> +<p>[<a href="index.php">Back to the main page</a>]</p> + +<? + +$locTable = array(); +$wizTable = array(); + +readWizInfo("wizards.txt", $wizTable); + +if (isset($_GET["a"])) { + $coderName = basename($_GET["a"]); + $coderName = strtoupper(substr($coderName, 0, 1)).strtolower(substr($coderName, 1)); +} + +reset($continentList); +while (list($iKey, $iValue) = each($continentList)) { + readLocations($iKey, $locTable, FALSE); +} + +/* Print table of wizards + */ +while (list($key, $value) = each($locTable)) { + while (list($ik, $iv) = each($value["coders"])) { + if (!isset($wizTable[$iv])) + $wizTable[$iv] = array("name" => $iv); + + if (!isset($wizTable[$iv]["areas"])) + $wizTable[$iv]["areas"] = 1; + else + $wizTable[$iv]["areas"]++; + } +} + +reset($wizTable); +if (count($wizTable) > 0) { + /* Make alphabetical table + */ + while (list($key, $value) = each($wizTable)) { + $alphaTable[$key[0]][] = $value; + } + + ksort($alphaTable, SORT_STRING); + + + /* Print wizards per first character + */ + $totalWiz = 0; + $maxRow = 6; + while (list($key, $value) = each($alphaTable)) { + if (count($value) > 0) { + asort($value); + echo "<h3><a name=\"".strtolower($key)."\"></a>".$key."</h3>\n"; + echo "<table class=\"loc\" width=\"95%\">\n"; + $n = 0; + while (list($ik, $iv) = each($value)) { + if ($n == 0) { + echo " <tr>\n"; + } + + $totalWiz++; + + printf(" <td width=\"%d%%\" style=\"background: %s;\"><a href=\"loc.php?a=%s\">%s</a> <span style=\"color: #f80;\">", + (100 / $maxRow), (count($iv) > 2 || isset($iv["desc"])) ? "#474" : "#744", $iv["name"], $iv["name"]); + + if (isset($iv["areas"])) + echo " (".$iv["areas"].")"; + + echo "</span></td>\n"; + + $n++; + if ($n >= $maxRow) { + echo " </tr>\n"; + $n = 0; + } + } + if ($n > 0) { + while ($n++ < $maxRow) + echo " <td></td>\n"; + + echo " </tr>\n"; + } + echo "</table>\n"; + } + } + + echo "<p><b>".$totalWiz."</b> wizards.</p>\n"; +} else { + echo "<p><b>No wizards known!</b></p>\n"; +} + +// Google Analytics +require "../urchin.inc.php"; +?> +</body> +</html>