Mercurial > hg > batmud > maputils
annotate www/loc.php @ 2234:94d3c4ae7121
Activate tooltip.js functionality on load.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 17 Dec 2019 15:09:30 +0200 |
parents | 062725ea7be7 |
children | 0556b65f137b |
rev | line source |
---|---|
1646
2cbce82aa3c3
Use full <?php ?> tag, misc cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1638
diff
changeset
|
1 <?php |
300
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 |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
6 |
1112 | 7 // Wizard info box special formatting tags |
1609 | 8 $specTags = [ |
1112 | 9 "b" => "<b>", |
10 "\/b" => "</b>", | |
11 "i" => "<i>", | |
12 "\/i" => "</i>", | |
13 "p" => "<br /><br />", | |
14 "br" => "<br />", | |
1609 | 15 ]; |
1112 | 16 |
17 | |
976 | 18 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
|
19 { |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
20 global $setName; |
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
21 |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 $s = ""; |
1567 | 23 if ($afilter) |
24 $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
|
25 |
1567 | 26 if (!$coders) |
27 { | |
801 | 28 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
|
29 $s .= "s"; |
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 |
1567 | 32 if ($qname !== "") |
33 { | |
801 | 34 if ($s !== "") $s .= "&"; |
35 $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
|
36 } |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
37 |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
38 if ($setName == $qname || ($setName == "" && $qname == "all")) |
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
39 $qclass .= " active"; |
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
40 |
1567 | 41 echo |
42 " <a class=\"control continent ".$qclass. | |
1918
3075415f052e
Get rid of PHP_SELF usage.
Matti Hamalainen <ccr@tnsp.org>
parents:
1900
diff
changeset
|
43 "\" href=\"?".$s."\">".$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
|
44 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
46 |
1392 | 47 function qcheck($arr, $key, &$result) |
48 { | |
49 if (isset($key) && isset($arr[$key])) | |
50 { | |
51 $result = $arr[$key]; | |
52 return TRUE; | |
53 } | |
54 else | |
55 { | |
56 unset($result); | |
57 return FALSE; | |
58 } | |
59 } | |
60 | |
61 | |
62 | |
63 // | |
64 // Initialization | |
65 // | |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
66 // Special backwards compatibility case for pcities |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
67 if (isset($_REQUEST["c"])) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
68 { |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
69 $filterID = "C"; |
621 | 70 $applyFilter = TRUE; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
71 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
72 else |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
73 // Try to get the filter ID |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
74 if (($filterID = mpGetRequestItem("f", "", TRUE)) != "") |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
75 { |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
76 if (!array_key_exists($filterID, $locationTypes)) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
77 { |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
78 mpError("Invalid location filter rule '".chentities($filterID)."'."); |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
79 $filterID = ""; |
621 | 80 $applyFilter = FALSE; |
81 } | |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
82 else |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
83 $applyFilter = TRUE; |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
84 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
85 else |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
86 // No filter ID specified, default to showing everything |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
87 { |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
88 $filterID = ""; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
89 $applyFilter = FALSE; |
621 | 90 } |
91 | |
1638 | 92 |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
93 $showCoders = !isset($_REQUEST["s"]); |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
94 |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
95 if (($tmpName = mpGetRequestItem("a", FALSE, TRUE)) !== FALSE) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
96 { |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
97 if (preg_match("#^([a-z]{1,15})#i", $tmpName, $matches)) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
98 { |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
99 $coderName = $matches[1]; |
1084 | 100 $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
|
101 |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
102 $wizTable = apcu_fetch("wizTable"); |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
103 if (empty($wizTable)) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
104 { |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
105 $wizTable = mpReadWizInfoFiles(); |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
106 apcu_store("wizTable", $wizTable, 3600); |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
107 } |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
108 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
109 else |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
110 { |
1084 | 111 $coderName = "???"; |
1900 | 112 mpError("Invalid wizard name."); |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
113 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
114 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
115 |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
116 if (($tmpName = mpGetRequestItem("n", FALSE, TRUE)) !== FALSE) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
117 { |
1609 | 118 $locTable = []; |
2055
062725ea7be7
Cleanups and minor improvements to location list page.
Matti Hamalainen <ccr@tnsp.org>
parents:
2043
diff
changeset
|
119 $setName = strtolower(trim(basename($tmpName))); |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
120 if (file_exists($setName.".loc")) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
121 { |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
122 $locTable = apcu_fetch("loc_".$setName); |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
123 if (empty($locTable)) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
124 { |
1609 | 125 $locTable = []; |
2037
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
126 mpParseLocFile($setName, $locTable, $applyFilter, $locationTypes[$filterID][LTI_INVERT_FLAGS], $locationTypes[$filterID][LTI_FLAGS]); |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
127 apcu_store("loc_".$setName, $locTable, 3600); |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
128 } |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
129 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
130 else |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
131 { |
1900 | 132 mpError("No such continent ID!"); |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
133 unset($setName); |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
134 } |
1392 | 135 } |
136 else | |
137 { | |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
138 $locTable = apcu_fetch("loc_locTable"); |
1392 | 139 if (empty($locTable)) |
140 { | |
2037
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
141 $locTable = mpParseLocFiles($applyFilter, $locationTypes[$filterID][LTI_INVERT_FLAGS], $locationTypes[$filterID][LTI_FLAGS]); |
2033
57ecb49d7b4a
Update the apc functions to use apcu_ prefix.
Matti Hamalainen <ccr@tnsp.org>
parents:
2032
diff
changeset
|
142 apcu_store("loc_locTable", $locTable, 3600); |
1150
02fe48a608d7
Use APC for caching of location and wizard data.
Matti Hamalainen <ccr@tnsp.org>
parents:
1148
diff
changeset
|
143 } |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
144 } |
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
145 |
1392 | 146 |
1638 | 147 // Make alphabetically sorted table of locations |
148 $alphaTable = []; | |
149 foreach ($locTable as $id => $data) | |
150 if (isset($data["name"])) | |
151 { | |
152 $idx = $data["name"][0]; | |
153 if (isset($coderName)) | |
154 { | |
155 foreach ($data["coders"] as $coder) | |
156 { | |
157 if ($coderName == $coder["name"]) | |
158 $alphaTable[$idx][] = $data; | |
159 } | |
160 } | |
161 else | |
162 $alphaTable[$idx][] = $data; | |
163 } | |
164 | |
165 ksort($alphaTable, SORT_STRING); | |
166 | |
167 | |
168 // | |
169 // Start of the page | |
170 // | |
171 if ($applyFilter) | |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
172 $mtitle = $locationTypes[$filterID][LTI_PAGE_DESC]; |
1638 | 173 else |
174 $mtitle = "Locations"; | |
175 | |
176 $mtitle .= " of "; | |
177 | |
178 if (isset($setName) && isset($continentList[$setName])) | |
179 { | |
2032
d9c15f7ae4c4
Add defines for continent list array index constants and use them.
Matti Hamalainen <ccr@tnsp.org>
parents:
2015
diff
changeset
|
180 $mtitle .= $continentList[$setName][CTI_NAME]. |
d9c15f7ae4c4
Add defines for continent list array index constants and use them.
Matti Hamalainen <ccr@tnsp.org>
parents:
2015
diff
changeset
|
181 ($continentList[$setName][CTI_SPECIAL] ? " in " : " continent in "); |
1638 | 182 } |
183 | |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
184 mpPrintPageHeader($pageTitle." - Locations", |
1694 | 185 " <script type=\"text/javascript\" src=\"tooltip.js\"></script>\n". |
2234
94d3c4ae7121
Activate tooltip.js functionality on load.
Matti Hamalainen <ccr@tnsp.org>
parents:
2055
diff
changeset
|
186 " <meta name=\"robots\" content=\"nofollow\" />\n", |
94d3c4ae7121
Activate tooltip.js functionality on load.
Matti Hamalainen <ccr@tnsp.org>
parents:
2055
diff
changeset
|
187 " onload=\"mapOnLoad()\""); |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
188 |
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
189 echo |
1638 | 190 "<h1>".$mtitle."BatMUD".(isset($coderName) ? " by ".chentities($coderName) : "")."</h1>\n". |
1918
3075415f052e
Get rid of PHP_SELF usage.
Matti Hamalainen <ccr@tnsp.org>
parents:
1900
diff
changeset
|
191 "<form action=\"?\" method=\"get\">\n". |
1567 | 192 "<div class=\"controls\">\n"; |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
193 |
622 | 194 if (isset($setName)) |
1694 | 195 echo " <input type=\"hidden\" name=\"n\" value=\"".chentities($setName)."\" />\n"; |
1392 | 196 |
1694 | 197 echo " <select class=\"control dropdown\" name=\"f\" onChange=\"this.form.submit();\">\n"; |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
198 foreach ($locationTypes as $lid => $ldata) |
1392 | 199 { |
200 echo | |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
201 " <option value=\"".$lid."\"". |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
202 (($applyFilter && $filterID == $lid) ? " selected=\"selected\"" : ""). |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
203 ">".$ldata[LTI_MENU_TITLE]."</option>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
204 } |
1392 | 205 echo |
1694 | 206 " </select>\n". |
207 " <noscript><input type=\"submit\" value=\" Update \" class=\"control submit\" /></noscript>\n"; | |
1392 | 208 |
209 | |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
210 printTitleLink($applyFilter, $filterID, $showCoders, "All continents", "", "all"); |
1392 | 211 foreach ($continentList as $continent => $data) |
212 { | |
2032
d9c15f7ae4c4
Add defines for continent list array index constants and use them.
Matti Hamalainen <ccr@tnsp.org>
parents:
2015
diff
changeset
|
213 if ($data[CTI_HAS_MAP]) |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
214 printTitleLink($applyFilter, $filterID, $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
|
215 } |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
216 printTitleLink($applyFilter, $filterID, $showCoders, "Special", "special", "special"); |
1392 | 217 |
218 echo | |
1567 | 219 "</div>\n". |
220 "</form>\n"; | |
321 | 221 |
1329 | 222 |
1392 | 223 // |
224 // Wizard/coder/creator information box | |
225 // | |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
226 if (isset($coderName)) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
227 { |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
228 if (isset($wizTable[$coderName]) && count($wizTable[$coderName]) > 1) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
229 { |
1329 | 230 // Profile picture |
1494
9f9e1e1846f5
Fix obsoleted use of reference arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1428
diff
changeset
|
231 if (qcheck($wizTable[$coderName], "imageURL", $s)) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
232 { |
1329 | 233 // XXX: backwards compatibility check |
234 if (substr($s, 0, 6) == "bat://") | |
1401 | 235 $s = $wizImageURL."unknown.png"; |
236 else | |
2043
77c8892c78ca
Improvements to wizlist parsing.
Matti Hamalainen <ccr@tnsp.org>
parents:
2037
diff
changeset
|
237 if (substr($s, 0, 7) != "http://" && |
77c8892c78ca
Improvements to wizlist parsing.
Matti Hamalainen <ccr@tnsp.org>
parents:
2037
diff
changeset
|
238 substr($s, 0, 8) != "https://") |
1401 | 239 $s = $wizImageURL.$s; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
240 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
241 else |
1401 | 242 $s = $wizImageURL."unknown.png"; |
1112 | 243 |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
244 echo |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
245 "<div class=\"wizInfoBox\">\n". |
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
246 " <div class=\"wizImage\"><img src=\"".$s."\" alt=\"".$coderName."\" /></div>\n". |
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
247 " <div class=\"wizInfo\">\n". |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
248 " <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
|
249 |
1329 | 250 // Description block |
1494
9f9e1e1846f5
Fix obsoleted use of reference arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1428
diff
changeset
|
251 if (qcheck($wizTable[$coderName], "desc", $str)) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
252 { |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
253 // Handle special tags |
1918
3075415f052e
Get rid of PHP_SELF usage.
Matti Hamalainen <ccr@tnsp.org>
parents:
1900
diff
changeset
|
254 $str = preg_replace("/\~([A-Z][a-z]+)\~/i", "<a href=\"?a=\${1}\">\${1}</a>", $str); |
1112 | 255 |
1329 | 256 foreach ($specTags as $tag => $rep) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
257 $str = preg_replace("/\[".$tag."\]/i", $rep, $str); |
1112 | 258 |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
259 echo " <p>".$str."</p>\n"; |
1329 | 260 } |
321 | 261 |
1329 | 262 // Links, etc. |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
263 echo " [<a href=\"".mpFingerURL($coderName)."\">Finger</a>]\n"; |
337
ca191c3a0ce1
Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
321
diff
changeset
|
264 |
1494
9f9e1e1846f5
Fix obsoleted use of reference arguments.
Matti Hamalainen <ccr@tnsp.org>
parents:
1428
diff
changeset
|
265 if (qcheck($wizTable[$coderName], "homeURL", $s)) |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
266 { |
1329 | 267 if ($s == "bat") |
268 $s = "http://wiz.bat.org/~".strtolower($coderName)."/"; | |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
269 |
1329 | 270 echo " [<a href=\"".$s."\">Homepage</a>]<br />\n"; |
271 } | |
1638 | 272 |
273 echo | |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
274 " </div>\n". |
1638 | 275 "</div>\n"; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
276 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
277 else |
1900 | 278 mpError("No information entry for this wizard."); |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
279 } |
488 | 280 |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
281 |
1392 | 282 // |
283 // Print out errors | |
284 // | |
285 if ($errorSet) | |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
286 { |
1392 | 287 echo |
288 "<div style=\"color: red;\">\n". | |
289 " <ul>\n"; | |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
290 |
1392 | 291 foreach ($errorMsgs as $msg) |
292 echo " <li>".$msg."</li>\n"; | |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
293 |
1392 | 294 echo |
295 " </ul>\n". | |
296 "</div>\n"; | |
297 } | |
298 | |
299 | |
300 // | |
301 // Print list of locations | |
302 // | |
1638 | 303 if (count($alphaTable) > 0) |
1392 | 304 { |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
305 |
1609 | 306 $locationTips = []; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
307 $totalLoc = 0; |
1656 | 308 $maxColumns = 6; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
309 foreach ($alphaTable as $alpha => $alphaLocs) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
310 { |
908 | 311 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
|
312 $letter = strtoupper($alpha); |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
313 |
908 | 314 asort($alphaLocs); |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
315 |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
316 echo |
1630 | 317 "<h3 class=\"alpha\"><a id=\"ch".$letter."\"></a>".$letter."</h3>\n". |
318 mpSpecialDate("loc", 2). | |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
319 "<div class=\"locTable\">\n"; |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
320 |
817
eaba088b5424
Show alternative location names on location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
816
diff
changeset
|
321 $n = 0; |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
322 foreach ($alphaLocs as $ik => $iv) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
323 { |
908 | 324 $totalLoc++; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
325 |
908 | 326 // Print location entry |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
327 echo |
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
328 " <div class=\"locCell ".$iv["continent"]."\">". |
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
329 "<div class=\"locHeader\">". |
2032
d9c15f7ae4c4
Add defines for continent list array index constants and use them.
Matti Hamalainen <ccr@tnsp.org>
parents:
2015
diff
changeset
|
330 "<span class=\"locTitle\">".mpGetMapLink($iv, $continentList[$iv["continent"]][CTI_HAS_MAP])."</span>"; |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
331 |
908 | 332 // If either freeform desc or URL field are set, we add those |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
333 if (isset($iv["url"]) || isset($iv["freeform"])) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
334 { |
908 | 335 // Free form description |
926 | 336 $desc = isset($iv["freeform"]) ? chentities($iv["freeform"]) : ""; |
908 | 337 |
338 // Add URL information, chopped, if any | |
1392 | 339 if (isset($iv["url"])) |
340 { | |
908 | 341 $urlEnt = $iv["url"]; |
926 | 342 $urlBegin = "<a href=\"".chentities($urlEnt)."\" target=\"_blank\">"; |
908 | 343 $urlEnd = "</a>"; |
344 if (strlen($iv["url"]) > 40) | |
345 $urlEnt = substr($urlEnt, 0, 40)."..."; | |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
346 $desc .= "<div class=\"locURL\">".chentities($urlEnt)."</div>"; |
1392 | 347 } |
348 else | |
349 { | |
908 | 350 $urlBegin = $urlEnd = ""; |
509 | 351 } |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
352 |
1392 | 353 echo |
1702 | 354 " ".$urlBegin. |
355 "<span onmouseover=\"stt(".$totalLoc. | |
356 ");\" onmouseout=\"htt();\">🍔</span>". | |
357 $urlEnd; | |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
358 |
1609 | 359 $locationTips[$totalLoc] = [ |
908 | 360 "title" => $iv["name"], |
361 "desc" => $desc | |
1609 | 362 ]; |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
363 } |
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
364 |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
365 echo "</div>"; // locHeader |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
366 |
908 | 367 // Alternative names |
1392 | 368 if (($nnames = count($iv["names"])) > 1) |
369 { | |
1609 | 370 $fs = []; |
1392 | 371 for ($nname = 1; $nname < $nnames; $nname++) |
372 { | |
1983 | 373 $qname = $iv["names"][$nname]; |
374 $norig = $qname["flags"] & NAME_ORIG; | |
1392 | 375 $fs[] = |
376 ($norig ? "<b>" : ""). | |
1983 | 377 chentities($qname["name"]). |
1392 | 378 ($norig ? "</b>" : ""); |
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
|
379 } |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
380 echo "<div class=\"locAltNames\">".implode(" | ", $fs)."</div>"; |
908 | 381 } |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
382 |
908 | 383 // Coder / society names |
1392 | 384 if (count($iv["coders"]) > 0 && $showCoders) |
385 { | |
2037
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
386 // XXX not sure what this was about .. :D |
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
387 // $isSG = preg_match("/[SG]/", $iv["flags"]); |
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
388 // if ((!isset($coderName) && ($iv["flags"] & (LOCF_T_SHRINE | LOCF_T_GUILD)) == 0) || |
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
389 // isset($coderName)) |
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
390 // { |
1609 | 391 $fs = []; |
1392 | 392 foreach ($iv["coders"] as $name) |
393 { | |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
394 // Tags/flags of this coder in relation to the area |
1392 | 395 switch ($name["flags"]) |
396 { | |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
397 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
|
398 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
|
399 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
|
400 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
|
401 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
|
402 } |
1979
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
403 |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
404 // Pcity entries do not get "author" links as they are actually SS+ |
3c03ca974e6a
Fix issue with "area" selection in location display not actually showing all
Matti Hamalainen <ccr@tnsp.org>
parents:
1918
diff
changeset
|
405 if ($filterID != "C" || !$applyFilter) |
1918
3075415f052e
Get rid of PHP_SELF usage.
Matti Hamalainen <ccr@tnsp.org>
parents:
1900
diff
changeset
|
406 $fs[] = "<a ".$qs." href=\"?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
|
407 else |
1392 | 408 $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
|
409 } |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
410 echo "<div class=\"locCoders\">".implode(", ", $fs)."</div>"; |
2037
e82ba6f55708
Refactor how the location filtering works internally to use proper LOC flags.
Matti Hamalainen <ccr@tnsp.org>
parents:
2033
diff
changeset
|
411 // } |
908 | 412 } |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
413 |
2014
e55d83a233fe
Display "location added" information on the location listings as well, if available.
Matti Hamalainen <ccr@tnsp.org>
parents:
1983
diff
changeset
|
414 if (/* isset($coderName) && */ $iv["added"] > 0) |
e55d83a233fe
Display "location added" information on the location listings as well, if available.
Matti Hamalainen <ccr@tnsp.org>
parents:
1983
diff
changeset
|
415 { |
e55d83a233fe
Display "location added" information on the location listings as well, if available.
Matti Hamalainen <ccr@tnsp.org>
parents:
1983
diff
changeset
|
416 echo "<div class=\"locAdded\">".mpStrFTime($iv["added"])."</div>"; |
e55d83a233fe
Display "location added" information on the location listings as well, if available.
Matti Hamalainen <ccr@tnsp.org>
parents:
1983
diff
changeset
|
417 } |
e55d83a233fe
Display "location added" information on the location listings as well, if available.
Matti Hamalainen <ccr@tnsp.org>
parents:
1983
diff
changeset
|
418 |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
419 echo "</div>\n"; |
908 | 420 } |
1677
9d51b4138e7d
CSS updates and related code changes.
Matti Hamalainen <ccr@tnsp.org>
parents:
1656
diff
changeset
|
421 echo "</div>\n"; |
300
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
422 } |
2015
135b2b595e2c
Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents:
2014
diff
changeset
|
423 |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
424 echo |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
425 "<p><b>".$totalLoc."</b> locations.</p>\n". |
1391 | 426 "</div>\n"; // end of contents div |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
427 |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
428 // Print out location tooltip HTML code |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
429 foreach ($locationTips as $tipID => $tip) |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
430 { |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
431 echo |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
432 "<div class=\"tooltip\" id=\"tt".$tipID. |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
433 "\"><div class=\"holder\"><b>".chentities($tip["title"]). |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
434 "</b><br />".$tip["desc"]."</div></div>\n"; |
519 | 435 } |
1140
3bb8253db932
New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
1115
diff
changeset
|
436 |
1391 | 437 // Print out the alpha link index div |
1620
6d620441af7f
Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1609
diff
changeset
|
438 mpPrintExtraBoxAlphaList("ch", $alphaTable); |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
439 } |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
440 else |
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
441 { |
1391 | 442 echo |
443 "<p><b>No locations known!</b></p>\n". | |
444 "</div>\n"; // end of contents div | |
445 | |
1900 | 446 mpError("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
|
447 } |
1387
2b6b38e94bb2
Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
1331
diff
changeset
|
448 |
1891
68b784c7eae2
Get rid of mgeneric.inc.php here.
Matti Hamalainen <ccr@tnsp.org>
parents:
1702
diff
changeset
|
449 mpPrintPageFooter(FALSE); |
1151
e0794ddb605e
Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents:
1150
diff
changeset
|
450 ?> |