Mercurial > hg > batmud > maputils
annotate www/loc.php @ 1331:2f142b33e4ed
Make location filter selector bar freeform div instead of table.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 16 Aug 2012 14:20:22 +0300 |
parents | bc4b7535a576 |
children | 2b6b38e94bb2 |
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 |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
32 echo " <a "; |
801 | 33 if ($qclass !== "") |
34 echo "class=\"".$qclass."\" "; | |
35 echo "href=\"".$_SERVER["PHP_SELF"]; | |
321 | 36 if (strlen($s) > 0) echo "?".$s; |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
37 echo "\">".$desc."</a>\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 |
1329 | 127 if (isset($setName) && isset($continentList[$setName])) { |
1060
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 ?> |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
146 <select class="dropdown" name="f"> |
622 | 147 <? |
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
|
148 foreach ($locationTypes as $id => $type) { |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
149 echo " <option value=\"".$id."\""; |
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
|
150 if ($applyFilter && $filter == $id) |
622 | 151 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
|
152 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
|
153 } |
622 | 154 ?> |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
155 </select> |
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
156 <input type="submit" value=" Update " class="submit" /> |
622 | 157 <? |
1331
2f142b33e4ed
Make location filter selector bar freeform div instead of table.
Matti Hamalainen <ccr@tnsp.org>
parents:
1329
diff
changeset
|
158 printTitleLink($applyFilter, $filter, $showCoders, "All continents", "", "all"); |
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
|
159 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
|
160 if ($data[4]) |
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
161 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
|
162 } |
1115 | 163 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
|
164 ?> |
622 | 165 </form> |
321 | 166 </div> |
167 | |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
168 <? |
1329 | 169 function qcheck($arr, $key, &$result) |
170 { | |
171 if (isset($key) && isset($arr[$key])) | |
172 { | |
173 $result = $arr[$key]; | |
174 return TRUE; | |
175 } | |
176 else | |
177 { | |
178 unset($result); | |
179 return FALSE; | |
180 } | |
181 } | |
182 | |
1112 | 183 /* Wizard/coder/creator information box |
441 | 184 */ |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
185 if (isset($coderName)) { |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
186 if (isset($wizTable[$coderName]) && count($wizTable[$coderName]) > 1) { |
1329 | 187 // Profile picture |
188 if (qcheck($wizTable[$coderName], "imageURL", &$s)) { | |
189 // XXX: backwards compatibility check | |
190 if (substr($s, 0, 6) == "bat://") | |
191 $s = "img/unknown.png"; | |
192 } else | |
976 | 193 $s = "img/unknown.png"; |
1112 | 194 |
1329 | 195 echo "<div class=\"wizinfo\">\n <table>\n <tr>\n". |
196 " <td class=\"img\"><img src=\"".$s."\" alt=\"".$coderName."\" /></td>\n". | |
197 " <td class=\"info\">\n". | |
198 " <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
|
199 |
1329 | 200 // Description block |
201 if (qcheck($wizTable[$coderName], "desc", &$s)) { | |
202 $s = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"".$_SERVER["PHP_SELF"]."?a=\${1}\">\${1}</a>", $s); | |
1112 | 203 |
1329 | 204 foreach ($specTags as $tag => $rep) |
205 $s = preg_replace("/\[".$tag."\]/i", $rep, $s); | |
1112 | 206 |
1329 | 207 echo " <p>".$s."</p>\n"; |
208 } | |
321 | 209 |
1329 | 210 // Links, etc. |
211 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
|
212 |
1329 | 213 if (qcheck($wizTable[$coderName], "homeURL", &$s)) { |
214 if ($s == "bat") | |
215 $s = "http://wiz.bat.org/~".strtolower($coderName)."/"; | |
216 | |
217 echo " [<a href=\"".$s."\">Homepage</a>]<br />\n"; | |
218 } | |
219 | |
220 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
|
221 } else |
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
222 $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
|
223 } |
488 | 224 |
300
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 /* 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
|
227 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
228 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
|
229 /* 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
|
230 */ |
813 | 231 $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
|
232 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
|
233 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
|
234 $idx = $data["name"][0]; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
235 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
|
236 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
|
237 $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
|
238 } else { |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
239 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
|
240 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
|
241 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
|
242 $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
|
243 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
244 } 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
|
245 $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
|
246 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
247 } |
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 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
|
250 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
251 /* 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
|
252 */ |
519 | 253 $locationTips = array(); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
254 $totalLoc = 0; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
255 $maxRow = 6; |
908 | 256 foreach ($alphaTable as $alpha => $alphaLocs) { |
257 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
|
258 $letter = strtoupper($alpha); |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
259 |
908 | 260 asort($alphaLocs); |
1148
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
261 |
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
262 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
|
263 "<table class=\"loc\" width=\"95%\">\n"; |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
264 |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
265 $n = 0; |
908 | 266 foreach ($alphaLocs as $ik => $iv) { |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
267 if ($n == 0) |
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
268 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
|
269 |
908 | 270 $totalLoc++; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
271 |
908 | 272 // Print location entry |
273 printf(" <td width=\"%d%%\" class=\"%s\">", | |
274 (100 / $maxRow), $iv["continent"]); | |
311 | 275 |
1060
b78333d62d5b
Combine speciaList into continentList and clean up the code a bit.
Matti Hamalainen <ccr@tnsp.org>
parents:
1059
diff
changeset
|
276 if (!$continentList[$iv["continent"]][4]) { |
926 | 277 echo "<b>".chentities($iv["name"])."</b>"; |
908 | 278 } else { |
279 printURL($iv["continent"].".html#loc".$iv["x"]."_".$iv["y"]); | |
926 | 280 echo chentities($iv["name"])."</a>"; |
908 | 281 } |
282 | |
283 // If either freeform desc or URL field are set, we add those | |
284 if (isset($iv["url"]) || isset($iv["freeform"])) { | |
285 // Free form description | |
926 | 286 $desc = isset($iv["freeform"]) ? chentities($iv["freeform"]) : ""; |
908 | 287 |
288 // Add URL information, chopped, if any | |
289 if (isset($iv["url"])) { | |
290 $urlEnt = $iv["url"]; | |
926 | 291 $urlBegin = "<a href=\"".chentities($urlEnt)."\" target=\"_blank\">"; |
908 | 292 $urlEnd = "</a>"; |
293 if (strlen($iv["url"]) > 40) | |
294 $urlEnt = substr($urlEnt, 0, 40)."..."; | |
926 | 295 $desc .= "<br /><br /><b>".chentities($urlEnt)."</b>"; |
509 | 296 } else { |
908 | 297 $urlBegin = $urlEnd = ""; |
509 | 298 } |
602
e46ee0632810
Add link via URL field too.
Matti Hamalainen <ccr@tnsp.org>
parents:
601
diff
changeset
|
299 |
908 | 300 echo " ".$urlBegin."<img class=\"noborder\" src=\"question.png\" onmouseover=\"stt(".$totalLoc. |
301 ");\" onmouseout=\"htt();\" alt=\"(?)\" />".$urlEnd."\n"; | |
519 | 302 |
908 | 303 $locationTips[$totalLoc] = array( |
304 "title" => $iv["name"], | |
305 "desc" => $desc | |
306 ); | |
307 } | |
519 | 308 |
908 | 309 // 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
|
310 $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
|
311 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
|
312 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
|
313 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
|
314 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
|
315 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
|
316 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
|
317 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
|
318 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
|
319 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
|
320 } |
908 | 321 } |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
322 |
908 | 323 // Coder / society names |
324 if (count($iv["coders"]) > 0 && $showCoders) { | |
325 $isSG = preg_match("/[SG]/", $iv["flags"]); | |
326 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
|
327 $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
|
328 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
|
329 if ($fs != "") $fs .= ", "; |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
330 // 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
|
331 switch ($name["flags"]) { |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
332 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
|
333 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
|
334 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
|
335 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
|
336 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
|
337 } |
679 | 338 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
|
339 $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
|
340 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
|
341 $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
|
342 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
343 echo "<br />[".$fs."]"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
344 } |
908 | 345 } |
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 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
|
348 |
908 | 349 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
|
350 echo " </tr>\n"; |
908 | 351 $n = 0; |
352 } | |
353 } | |
354 | |
355 if ($n > 0) { | |
356 while ($n++ < $maxRow) | |
357 echo " <td></td>\n"; | |
358 echo " </tr>\n"; | |
359 } | |
360 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
|
361 } |
519 | 362 |
363 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
|
364 |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
365 echo "</div>\n"; |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
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 /* Print out location tooltip HTML code |
519 | 368 */ |
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
|
369 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
|
370 echo "<div class=\"tooltip\" id=\"tt".$tipID. |
926 | 371 "\"><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
|
372 "</b><br />".$tip["desc"]."</div></div>\n"; |
519 | 373 } |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
374 |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
375 /* Print out the alpha link index |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
376 */ |
1148
52550f58cee5
Move alphabetic table printing code to a function in common routines.
Matti Hamalainen <ccr@tnsp.org>
parents:
1140
diff
changeset
|
377 printExtraBoxAlphaList($alphaTable); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
378 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
379 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
|
380 echo "</div>\n"; |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
381 $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
|
382 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
383 ?> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
384 </body> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
385 </html> |
1151
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
386 <? |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
387 if (empty($errorStr)) |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
388 storePageToCache(); |
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
389 ?> |