Mercurial > hg > batmud > maputils
annotate www/loc.php @ 1272:ab28c4ddf8b0
Sync.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 16 Oct 2011 01:46:08 +0300 |
parents | 796cb8e6f537 |
children | bc4b7535a576 |
rev | line source |
---|---|
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 <? |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 require "config.inc.php"; |
1272 | 3 require "world.inc.php"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
4 require "common.inc.php"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 |
1112 | 6 // Wizard info box special formatting tags |
7 $specTags = array( | |
8 "b" => "<b>", | |
9 "\/b" => "</b>", | |
10 "i" => "<i>", | |
11 "\/i" => "</i>", | |
12 "p" => "<br /><br />", | |
13 "br" => "<br />", | |
14 ); | |
15 | |
16 | |
976 | 17 function printTitleLink($afilter, $filter, $coders, $desc, $qname, $qclass) |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 $s = ""; |
622 | 20 if ($afilter) $s = "f=".$filter; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 if (!$coders) { |
801 | 23 if ($s !== "") $s .= "&"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 $s .= "s"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 |
801 | 27 if ($qname !== "") { |
28 if ($s !== "") $s .= "&"; | |
29 $s .= "n=".$qname; | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
31 |
623 | 32 echo " <td><a "; |
801 | 33 if ($qclass !== "") |
34 echo "class=\"".$qclass."\" "; | |
35 echo "href=\"".$_SERVER["PHP_SELF"]; | |
321 | 36 if (strlen($s) > 0) echo "?".$s; |
37 echo "\">".$desc."</a></td>\n"; | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
40 |
441 | 41 /* Initialization |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
42 */ |
678 | 43 if (isset($_GET["c"])) { |
621 | 44 $filter = "C"; |
45 $applyFilter = TRUE; | |
46 } else { | |
622 | 47 if (isset($_GET["f"]) && $_GET["f"] != "") { |
621 | 48 $filter = $_GET["f"]; |
870
51054f3f5d2e
Allow inversion of regexp group operator via "^" in the location type filter parameter.
Matti Hamalainen <ccr@tnsp.org>
parents:
822
diff
changeset
|
49 if (!preg_match("/^[\^A-Za-z]+\$/", $filter)) { |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
50 $errorStr = "Invalid filter rule '".chentities($filter)."'"; |
813 | 51 $filter = "C"; |
52 $applyFilter = FALSE; | |
53 } else { | |
54 $applyFilter = TRUE; | |
55 } | |
621 | 56 } else { |
801 | 57 $filter = "CF"; |
621 | 58 $applyFilter = FALSE; |
59 } | |
60 } | |
61 | |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
62 $showCoders = !isset($_GET["s"]); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
63 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
64 if (isset($_GET["a"])) { |
1084 | 65 if (preg_match("#^([a-z]{1,15})#i", $_GET["a"], $m)) { |
66 $coderName = $m[1]; | |
67 $coderName = strtoupper(substr($coderName, 0, 1)).strtolower(substr($coderName, 1)); | |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
68 |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
69 $wizTable = apc_fetch("wizTable"); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
70 if (empty($wizTable)) { |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
71 $wizTable = readWizInfoFiles(); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
72 apc_store("wizTable", $wizTable, 3600); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
73 } |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
74 } else { |
1084 | 75 $coderName = "???"; |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
76 $errorStr = "Invalid wizard name."; |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
77 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
78 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
79 |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
80 if (isset($_GET["n"])) { |
609 | 81 $locTable = array(); |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
82 $setName = strtolower(basename($_GET["n"])); |
509 | 83 if (file_exists($setName.".loc")) { |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
84 $locTable = apc_fetch("loc_".$setName); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
85 if (empty($locTable)) { |
1233
796cb8e6f537
Initialize locTable as empty array(), apparently PHP does not create empty array by default ..
Matti Hamalainen <ccr@tnsp.org>
parents:
1153
diff
changeset
|
86 $locTable = array(); |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
87 parseLocFile($setName, $locTable, $applyFilter, $filter); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
88 apc_store("loc_".$setName, $locTable, 3600); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
89 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
90 } else { |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
91 $errorStr = "No such continent ID!"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
92 unset($setName); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
93 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
94 } else { |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
95 $locTable = apc_fetch("loc_locTable"); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
96 if (empty($locTable)) { |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
97 $locTable = readLocationFiles($applyFilter, $filter); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
98 apc_store("loc_locTable", $locTable, 3600); |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
99 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
100 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
101 |
441 | 102 /* Start of the page |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
103 */ |
1153
b245f3162a27
Make page caching toggleable via a variable setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
1151
diff
changeset
|
104 if (empty($errorStr)) |
b245f3162a27
Make page caching toggleable via a variable setting.
Matti Hamalainen <ccr@tnsp.org>
parents:
1151
diff
changeset
|
105 fetchPageFromCache(); |
1151
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
106 |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
107 printPageHeader($pageTitle." - Locations", |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
108 "<script type=\"text/javascript\" src=\"tooltip.js\"></script>\n". |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
109 "<meta name=\"robots\" content=\"nofollow\" />\n"); |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
110 |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
111 require "menu.inc.php"; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
112 |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
113 echo |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
114 "<div id=\"contents\">\n". |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
115 "<h1>"; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
116 |
621 | 117 if ($applyFilter) { |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
118 if (array_key_exists($filter, $locationTypes)) |
621 | 119 echo $locationTypes[$filter][2]; |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
120 else |
870
51054f3f5d2e
Allow inversion of regexp group operator via "^" in the location type filter parameter.
Matti Hamalainen <ccr@tnsp.org>
parents:
822
diff
changeset
|
121 echo "Filter '$filter'"; |
621 | 122 } else |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
123 echo "Locations"; |
621 | 124 |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
125 echo " of "; |
621 | 126 |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
127 if (isset($continentList[$setName])) { |
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
128 echo $continentList[$setName][0]. |
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
129 ($continentList[$setName][3] ? " in " : " continent in "); |
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
130 } |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
131 echo "BatMUD"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
132 if (isset($coderName)) |
1084 | 133 echo " by ".chentities($coderName); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
134 echo "</h1>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
135 |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
136 if (isset($errorStr)) |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
137 echo "<p style=\"color: red;\"><b>Error: ".$errorStr."</b>.</p>\n"; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
138 |
622 | 139 ?> |
140 <div class="selbar"> | |
801 | 141 <form action="<? echo $_SERVER["PHP_SELF"]; ?>" method="get"> |
622 | 142 <? |
143 if (isset($setName)) | |
926 | 144 echo "<input type=\"hidden\" name=\"n\" value=\"".chentities($setName)."\" />\n"; |
622 | 145 ?> |
146 <table> | |
147 <tr> | |
148 <td> | |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
149 <select class="dropdown" name="f"> |
622 | 150 <? |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
151 foreach ($locationTypes as $id => $type) { |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
152 echo " <option value=\"".$id."\""; |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
153 if ($applyFilter && $filter == $id) |
622 | 154 echo " selected=\"selected\""; |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
155 echo ">".$type[3]."</option>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
156 } |
622 | 157 ?> |
158 </select> | |
159 </td> | |
160 <td> | |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
161 <input type="submit" value=" Update " class="submit" /> |
622 | 162 </td> |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
163 <td></td> |
622 | 164 <? |
1115 | 165 printTitleLink($applyFilter, $filter, $showCoders, "All continents", "", ""); |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
166 foreach ($continentList as $continent => $data) { |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
167 if ($data[4]) |
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
168 printTitleLink($applyFilter, $filter, $showCoders, $data[0], $continent, $continent); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
169 } |
1115 | 170 printTitleLink($applyFilter, $filter, $showCoders, "Special", "special", "special"); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
171 ?> |
321 | 172 </tr> |
173 </table> | |
622 | 174 </form> |
321 | 175 </div> |
176 | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
177 <? |
1112 | 178 /* Wizard/coder/creator information box |
441 | 179 */ |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
180 if (isset($coderName)) { |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
181 if (isset($wizTable[$coderName]) && count($wizTable[$coderName]) > 1) { |
1112 | 182 |
183 // Profile picture | |
501 | 184 $s = $wizTable[$coderName]["imageURL"]; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
185 if (isset($s)) { |
321 | 186 if (substr($s, 0, 6) == "bat://") |
976 | 187 $s = "img/unknown.png"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
188 } else |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
189 $s = "img/unknown.png"; |
1112 | 190 |
976 | 191 echo "<div class=\"wizinfo\">\n <table>\n <tr>\n". |
192 " <td class=\"img\"><img src=\"".$s."\" alt=\"".$coderName."\" /></td>\n". | |
193 " <td class=\"info\">\n". | |
908 | 194 " <h2>".$coderName."</h2>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
195 |
1112 | 196 // Description block |
321 | 197 $s = $wizTable[$coderName]["desc"]; |
908 | 198 if (isset($s)) { |
1112 | 199 $s = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"".$_SERVER["PHP_SELF"]."?a=\${1}\">\${1}</a>", $s); |
200 | |
201 foreach ($specTags as $tag => $rep) | |
202 $s = preg_replace("/\[".$tag."\]/i", $rep, $s); | |
203 | |
321 | 204 echo " <p>".$s."</p>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
205 } |
321 | 206 |
1112 | 207 // Links, etc. |
501 | 208 echo " [<a href=\"".fingerURL($coderName)."\">Finger</a>]\n"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
209 |
321 | 210 $s = $wizTable[$coderName]["homeURL"]; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
211 if (isset($s)) { |
321 | 212 if ($s == "bat") |
213 $s = "http://wiz.bat.org/~".strtolower($coderName)."/"; | |
214 | |
215 echo " [<a href=\"".$s."\">Homepage</a>]<br />\n"; | |
216 } | |
217 | |
218 echo " </td>\n </tr>\n </table>\n</div>\n"; | |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
219 } else |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
220 $errorStr = "No such wizard."; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
221 } |
488 | 222 |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
223 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
224 /* Print list of locations |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
225 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
226 if (count($locTable) > 0) { |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
227 /* Make alphabetically sorted table of locations |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
228 */ |
813 | 229 $alphaTable = array(); |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
230 foreach ($locTable as $id => $data) |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
231 if (isset($data["name"])) { |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
232 $idx = $data["name"][0]; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
233 if (isset($_GET["nocoders"])) { |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
234 if (count($data["coders"]) == 0 && !preg_match("/[SPG]/", $data["flags"])) |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
235 $alphaTable[$idx][] = $data; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
236 } else { |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
237 if (isset($coderName)) { |
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:
926
diff
changeset
|
238 foreach ($data["coders"] as $coder) { |
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:
926
diff
changeset
|
239 if ($coderName == $coder["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:
926
diff
changeset
|
240 $alphaTable[$idx][] = $data; |
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:
926
diff
changeset
|
241 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
242 } else |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
243 $alphaTable[$idx][] = $data; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
244 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
245 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
246 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
247 ksort($alphaTable, SORT_STRING); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
248 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
249 /* Print locations per first character |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
250 */ |
519 | 251 $locationTips = array(); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
252 $totalLoc = 0; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
253 $maxRow = 6; |
908 | 254 foreach ($alphaTable as $alpha => $alphaLocs) { |
255 if (count($alphaLocs) <= 0) continue; | |
1148
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
256 $letter = strtoupper($alpha); |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
257 |
908 | 258 asort($alphaLocs); |
1148
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
259 |
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
260 echo "<h3><a name=\"".$letter."\"></a>".$letter."</h3>\n". |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
261 "<table class=\"loc\" width=\"95%\">\n"; |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
262 |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
263 $n = 0; |
908 | 264 foreach ($alphaLocs as $ik => $iv) { |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
265 if ($n == 0) |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
266 echo " <tr>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
267 |
908 | 268 $totalLoc++; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
269 |
908 | 270 // Print location entry |
271 printf(" <td width=\"%d%%\" class=\"%s\">", | |
272 (100 / $maxRow), $iv["continent"]); | |
311 | 273 |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
274 if (!$continentList[$iv["continent"]][4]) { |
926 | 275 echo "<b>".chentities($iv["name"])."</b>"; |
908 | 276 } else { |
277 printURL($iv["continent"].".html#loc".$iv["x"]."_".$iv["y"]); | |
926 | 278 echo chentities($iv["name"])."</a>"; |
908 | 279 } |
280 | |
281 // If either freeform desc or URL field are set, we add those | |
282 if (isset($iv["url"]) || isset($iv["freeform"])) { | |
283 // Free form description | |
926 | 284 $desc = isset($iv["freeform"]) ? chentities($iv["freeform"]) : ""; |
908 | 285 |
286 // Add URL information, chopped, if any | |
287 if (isset($iv["url"])) { | |
288 $urlEnt = $iv["url"]; | |
926 | 289 $urlBegin = "<a href=\"".chentities($urlEnt)."\" target=\"_blank\">"; |
908 | 290 $urlEnd = "</a>"; |
291 if (strlen($iv["url"]) > 40) | |
292 $urlEnt = substr($urlEnt, 0, 40)."..."; | |
926 | 293 $desc .= "<br /><br /><b>".chentities($urlEnt)."</b>"; |
509 | 294 } else { |
908 | 295 $urlBegin = $urlEnd = ""; |
509 | 296 } |
602
e46ee0632810
Add link via URL field too.
Matti Hamalainen <ccr@tnsp.org>
parents:
601
diff
changeset
|
297 |
908 | 298 echo " ".$urlBegin."<img class=\"noborder\" src=\"question.png\" onmouseover=\"stt(".$totalLoc. |
299 ");\" onmouseout=\"htt();\" alt=\"(?)\" />".$urlEnd."\n"; | |
519 | 300 |
908 | 301 $locationTips[$totalLoc] = array( |
302 "title" => $iv["name"], | |
303 "desc" => $desc | |
304 ); | |
305 } | |
519 | 306 |
908 | 307 // Alternative names |
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:
926
diff
changeset
|
308 $nnames = count($iv["names"]); |
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:
926
diff
changeset
|
309 if ($nnames > 1) { |
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:
926
diff
changeset
|
310 echo "<br />"; |
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:
926
diff
changeset
|
311 for ($nname = 1; $nname < $nnames; $nname++) { |
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:
926
diff
changeset
|
312 if ($iv["names"][$nname]["flags"] & NAME_ORIG) |
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:
926
diff
changeset
|
313 echo "<b>"; |
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:
926
diff
changeset
|
314 echo chentities($iv["names"][$nname]["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:
926
diff
changeset
|
315 if ($iv["names"][$nname]["flags"] & NAME_ORIG) |
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:
926
diff
changeset
|
316 echo "</b>"; |
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:
926
diff
changeset
|
317 if ($nname < $nnames - 1) echo " | "; |
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:
926
diff
changeset
|
318 } |
908 | 319 } |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
320 |
908 | 321 // Coder / society names |
322 if (count($iv["coders"]) > 0 && $showCoders) { | |
323 $isSG = preg_match("/[SG]/", $iv["flags"]); | |
324 if ((!isset($coderName) && !$isSG) || isset($coderName)) { | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
325 $fs = ""; |
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:
926
diff
changeset
|
326 foreach ($iv["coders"] as $name) { |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
327 if ($fs != "") $fs .= ", "; |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
328 // Tags/flags of this coder in relation to the area |
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:
926
diff
changeset
|
329 switch ($name["flags"]) { |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
330 case NAME_ORIG: $qs = "title=\"Original creator\" class=\"wizorig\""; break; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
331 case NAME_RECODER: $qs = "title=\"Converter, recoder\" class=\"wizrecoder\""; break; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
332 case NAME_MAINTAINER: $qs = "title=\"Maintainer\" class=\"wizmaintainer\""; break; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
333 case NAME_EXPANDER: $qs = "title=\"Implemented new content, expansion(s)\" class=\"wizexpander\""; break; |
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:
926
diff
changeset
|
334 default: $qs = ""; |
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:
926
diff
changeset
|
335 } |
679 | 336 if ($filter != "C" || !$applyFilter) |
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:
926
diff
changeset
|
337 $fs .= "<a ".$qs." href=\"".$_SERVER["PHP_SELF"]."?a=".$name["name"]."\">".$name["name"]."</a>"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
338 else |
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:
926
diff
changeset
|
339 $fs .= $name["name"]; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
340 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
341 echo "<br />[".$fs."]"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
342 } |
908 | 343 } |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
344 |
908 | 345 echo "</td>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
346 |
908 | 347 if (++$n >= $maxRow) { |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
348 echo " </tr>\n"; |
908 | 349 $n = 0; |
350 } | |
351 } | |
352 | |
353 if ($n > 0) { | |
354 while ($n++ < $maxRow) | |
355 echo " <td></td>\n"; | |
356 echo " </tr>\n"; | |
357 } | |
358 echo "</table>\n"; | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
359 } |
519 | 360 |
361 echo "<p><b>".$totalLoc."</b> locations.</p>\n"; | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
362 |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
363 echo "</div>\n"; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
364 |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
365 /* Print out location tooltip HTML code |
519 | 366 */ |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
367 foreach ($locationTips as $tipID => $tip) { |
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
368 echo "<div class=\"tooltip\" id=\"tt".$tipID. |
926 | 369 "\"><div class=\"holder\"><b>".chentities($tip["title"]). |
816
6341de08bd52
Handle alternative location names better;Add unique location ID generation to handle locations with exactly same primary name.
Matti Hamalainen <ccr@tnsp.org>
parents:
813
diff
changeset
|
370 "</b><br />".$tip["desc"]."</div></div>\n"; |
519 | 371 } |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
372 |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
373 /* Print out the alpha link index |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
374 */ |
1148
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
375 printExtraBoxAlphaList($alphaTable); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
376 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
377 echo "<p><b>No locations known!</b></p>\n"; |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
378 echo "</div>\n"; |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
379 $errorStr = "No locations known!"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
380 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
381 ?> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
382 </body> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
383 </html> |
1151
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
384 <? |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
385 if (empty($errorStr)) |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
386 storePageToCache(); |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
387 ?> |