Mercurial > hg > batmud > maputils
annotate www/info.php @ 1100:fdf23fef400e
Sync: remove ads code.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jun 2011 18:02:34 +0300 |
parents | c4b1d3798418 |
children | 3dc58d67b7b4 |
rev | line source |
---|---|
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 <? |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 require "config.inc.php"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 require "common.inc.php"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 /* Page start |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 */ |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 printPageHeader($pageTitle." - Wizards of the Realm"); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 //echo "<div><b>DEVELOPMENT VERSION</b></div>"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 ?> |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 <h1>Wizards of the Realm</h1> |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 |
886 | 12 <div class="attnbox"> |
516 | 13 <b>Notice #1</b>: The area counts are not really accurate, as the database only |
14 lists areas accessible from outworld. Thus areas only accessible via some | |
15 other fashion are not listed. Also, maintainerships of some areas are not | |
16 clear, and may be credited to wrong wizard(s). | |
17 <br /> | |
18 | |
19 <b>Notice #2</b>: Not everyone who has once been immortal is listed. | |
20 Some purged and/or remorted wizards without known contributions are unlisted. | |
21 <br /> | |
22 | |
23 <b>Notice #3</b>: It is certainly possible, that some of this information is | |
24 incorrect. Sorry for that. Please report to <? burl("Ggr") ?>, if you have Knowledge(tm). | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 </div> |
516 | 26 <div style="text-align: center;"> |
27 <table style="background: black;"> | |
28 <tr> | |
29 <td style="background: #474">Entry has information about the wizard.</td> | |
30 <td style="background: #744">No wizard information entry.</td> | |
31 </tr> | |
32 </table> | |
33 [<a href="<? echo $pageIndex ?>">Back to main page</a>]<br /> | |
34 </div> | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 <? |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 |
609 | 37 $locTable = readLocationFiles(); |
38 $wizTable = readWizInfoFiles(); | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 if (isset($_GET["a"])) { |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 $coderName = basename($_GET["a"]); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 $coderName = strtoupper(substr($coderName, 0, 1)).strtolower(substr($coderName, 1)); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 /* Print table of wizards |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 */ |
1007 | 49 foreach ($locTable as $location) { |
50 foreach ($location["coders"] as $wiz) { | |
975
af0fc3a965dc
Fix all the web-interface PHP crap to work with the new LOC file format. Urgh. This shit could really use some refactoring cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
896
diff
changeset
|
51 $name = $wiz["name"]; |
af0fc3a965dc
Fix all the web-interface PHP crap to work with the new LOC file format. Urgh. This shit could really use some refactoring cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
896
diff
changeset
|
52 if (!isset($wizTable[$name])) |
af0fc3a965dc
Fix all the web-interface PHP crap to work with the new LOC file format. Urgh. This shit could really use some refactoring cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
896
diff
changeset
|
53 $wizTable[$name] = array("name" => $name); |
af0fc3a965dc
Fix all the web-interface PHP crap to work with the new LOC file format. Urgh. This shit could really use some refactoring cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
896
diff
changeset
|
54 $wizTable[$name]["areas"]++; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 if (count($wizTable) > 0) { |
1007 | 59 /* Make alphabetically sorted table of wizards |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 */ |
1007 | 61 foreach ($wizTable as $alpha => $data) |
62 $alphaTable[$alpha[0]][] = $data; | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 ksort($alphaTable, SORT_STRING); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
66 |
1007 | 67 /* Print wizards alphabetically per first character of name |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
68 */ |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
69 $totalWiz = 0; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
70 $maxRow = 6; |
1007 | 71 foreach ($alphaTable as $alpha => $data) { |
72 if (count($data) > 0) { | |
73 asort($data); | |
74 echo "<h3><a name=\"".strtolower($alpha)."\"></a>".$alpha."</h3>\n"; | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 echo "<table class=\"loc\" width=\"95%\">\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 $n = 0; |
1007 | 77 |
78 foreach ($data as $wizard) { | |
896 | 79 if ($n == 0) echo " <tr>\n"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
80 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
81 $totalWiz++; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 printf(" <td width=\"%d%%\" style=\"background: %s;\"><a href=\"loc.php?a=%s\">%s</a> <span style=\"color: #f80;\">", |
1007 | 84 (100 / $maxRow), (count($wizard) > 2 || isset($wizard["desc"])) ? "#474" : "#744", $wizard["name"], $wizard["name"]); |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 |
1007 | 86 if (isset($wizard["areas"])) |
87 echo " (".$wizard["areas"].")"; | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
89 echo "</span></td>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
90 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
91 $n++; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
92 if ($n >= $maxRow) { |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
93 echo " </tr>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 $n = 0; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
97 if ($n > 0) { |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
98 while ($n++ < $maxRow) |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
99 echo " <td></td>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
101 echo " </tr>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
103 echo "</table>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
104 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
105 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
106 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
107 echo "<p><b>".$totalWiz."</b> wizards.</p>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
108 } else { |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
109 echo "<p><b>No wizards known!</b></p>\n"; |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
110 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
111 ?> |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
112 </body> |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
113 </html> |