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