Mercurial > hg > batmud > maputils
annotate www/loc.php @ 300:edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 19 Jun 2007 14:49:15 +0000 |
parents | |
children | 134dded5369b |
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"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
3 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
4 function readLocations($filename, &$locTable, $showPCities = FALSE) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 $inFile = @fopen($filename.".loc", "r"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 if (!$inFile) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 return FALSE; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 while (!feof($inFile)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 $inLine = rtrim(fgets($inFile)); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
14 if (strlen($inLine) == 0 || $inLine[0] == "#") { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
15 } else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
16 if (preg_match("/^([0-9]+)[ \t]*;[ \t]*([0-9]+)[ \t]*;[ \t]*([0-9][CcMGSP%\?\-]*)[ \t]*;[ \t]*([^;]+)(;(.+))?$/", $inLine, $m)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
17 $addInfo = preg_split("/[ \t]*;[ \t]*/", $m[6]); |
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 if (strlen($addInfo[0]) > 0) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 $coders = preg_split("/[ \t]*,[ \t]*/", $addInfo[0]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 $coders = array(); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
23 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 if (!strstr($m[3], "-")) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
26 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
27 if (strstr($m[3], "C")) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
28 $isPCity = TRUE; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 $isPCity = FALSE; |
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 if (($showPCities && $isPCity) || (!$showPCities && !$isPCity)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 $s = ""; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 if (strstr($m[3], "S")) $s = "SHRINE "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 else if (strstr($m[3], "G")) $s = "GUILD "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 else if (strstr($m[3], "P")) $s = "SS "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 else if (strstr($m[3], "M")) $s = "MONSTER "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 else if (strstr($m[3], "c")) $s = "CITY "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 $s .= $m[4]; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 $locTable[$s] = array( |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 "name" => $s, |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
44 "continent" => $filename, |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
45 "x" => $m[1], |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
46 "y" => $m[2], |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
47 "flags" => $m[3], |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
48 "coders" => $coders, |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
49 "url" => $addInfo[1], |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
50 "freeform" => $addInfo[2] |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
51 ); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
52 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
53 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
54 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
55 echo "Error: <b>$inLine</b><br>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
56 //return FALSE; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
57 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
58 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
59 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
60 fclose($inFile); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
61 return TRUE; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
62 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
63 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
64 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
65 echo "<?xml version=\"1.0\" encoding=\"".$pageCharset."\"?>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
66 ?> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
67 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
68 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
69 <head> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
70 <meta http-equiv="Content-Type" content="text/html; charset=<? echo $pageCharset ?>" /> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
71 <meta name="Author" content="Matti Hämäläinen aka Ggr Pupunen" /> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
72 <title><? echo $pageTitle ?></title> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
73 <link href="<? echo $pageCSS ?>" rel="stylesheet" type="text/css" /> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
74 </head> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 <body> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
77 <? |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
78 $locTable = array(); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
79 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
80 $onlyPCities = isset($_GET["c"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
81 $showCoders = !isset($_GET["s"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 if (isset($_GET["a"])) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
84 $coderName = basename($_GET["a"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
86 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
87 if (isset($_GET["n"])) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 $setName = basename($_GET["n"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
89 if (isset($continentList[$setName]) && file_exists($setName.".loc")) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
90 readLocations($setName, $locTable, $onlyPCities); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
91 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
92 echo "<h1>No such continent ID!</h1>"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
93 unset($setName); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 reset($continentList); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
97 while (list($iKey, $iValue) = each($continentList)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
98 readLocations($iKey, $locTable, $onlyPCities); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
99 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
101 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
103 function makeURL($pcities, $coders, $name, $desc, $class) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
104 { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
105 $s = ""; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
106 if ($pcities) $s = "c"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
107 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
108 if (!$coders) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
109 if ($s != "") $s .= "&"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
110 $s .= "s"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
111 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
112 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
113 if (isset($name)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
114 if ($s != "") $s .= "&"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
115 $s .= "n=".$name; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
116 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
117 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
118 if (isset($class)) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
119 echo " <td class=\"".$class."\">"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
120 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
121 echo " <td>"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
122 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
123 echo "<a href=\"loc.php?".$s."\">".$desc."</a></td>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
124 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
125 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
126 /* Header |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
127 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
128 echo "<h1>"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
129 if ($onlyPCities) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
130 echo "Player cities"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
131 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
132 echo "Locations"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
133 echo " of "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
134 if (isset($continentList[$setName])) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
135 echo $continentList[$setName]." continent in "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
136 echo "BatMUD"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
137 if (isset($coderName)) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
138 echo " by ".$coderName; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
139 echo "</h1>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
140 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
141 echo "<table>\n <tr>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
142 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
143 echo " <td><a href=\"loc.php\">EVERYTHING</a></td>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
144 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
145 if (!$onlyPCities) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
146 makeURL(TRUE, $showCoders, $setName, "PCities"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
147 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
148 if (!$showCoders) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
149 makeURL($onlyPCities, TRUE, $setName, "Show Coders"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
150 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
151 makeURL($onlyPCities, FALSE, $setName, "Hide Coders"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
152 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
153 makeURL(FALSE, $showCoders, $setName, "Locations"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
154 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
155 if (!$showCoders) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
156 makeURL($onlyPCities, TRUE, $setName, "Show SS"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
157 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
158 makeURL($onlyPCities, FALSE, $setName, "Hide SS"); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
159 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
160 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
161 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
162 echo " <td></td>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
163 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
164 reset($continentList); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
165 while (list($iKey, $iValue) = each($continentList)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
166 makeURL($onlyPCities, $showCoders, $iKey, $iValue, $iKey); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
167 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
168 ?> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
169 </tr> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
170 </table> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
171 <p> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
172 [<a href="index.php">Back to main map page</a>] |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
173 </p> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
174 <? |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
175 /* |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
176 if (isset($coderName)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
177 echo "<a href=\"http://www.bat.org/help/finger.php?str=".$coderName."\"> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
178 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
179 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
180 if (isset($coderName)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
181 $coderList = array( |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
182 "Kyo" => "http://www.bat.org/albums/album47/aav.jpg", |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
183 "" => ""," |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
184 ); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
185 if (isset($coderList[$coderName])) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
186 echo "<img src=\"".$coderList[$coderName]."\" /><br />\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
187 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
188 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
189 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
190 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
191 /* 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
|
192 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
193 if (count($locTable) > 0) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
194 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
195 /* Make alphabetical table of locations |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
196 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
197 while (list($key, $value) = each($locTable)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
198 if (isset($coderName)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
199 if (array_search($coderName, $value["coders"]) !== FALSE) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
200 $alphaTable[$key[0]][] = $value; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
201 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
202 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
203 $alphaTable[$key[0]][] = $value; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
204 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
205 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
206 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
207 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
|
208 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
209 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
210 /* 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
|
211 */ |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
212 $totalLoc = 0; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
213 $maxRow = 6; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
214 while (list($key, $value) = each($alphaTable)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
215 if (count($value) > 0) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
216 asort($value); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
217 echo "<a name=\"".strtolower($key)."\"></a><h3>".$key."</h3>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
218 echo "<table width=\"95%\">\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
219 $n = 0; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
220 while (list($ik, $iv) = each($value)) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
221 if ($n == 0) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
222 echo " <tr>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
223 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
224 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
225 $totalLoc++; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
226 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
227 printf(" <td width=\"%d%%\" class=\"%s\">", |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
228 (100 / $maxRow), $iv["continent"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
229 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
230 printURL($iv["continent"].".html#loc".$iv["x"]."_".$iv["y"]); |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
231 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
232 echo $iv["name"]."</a>"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
233 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
234 if (count($iv["coders"]) > 0 && $showCoders) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
235 $fs = ""; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
236 while (list($fKey, $fVal) = each($iv["coders"])) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
237 if ($fs != "") $fs .= ", "; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
238 if (!$onlyPCities) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
239 $fs .= "<a href=\"loc.php?a=".$fVal."\">".$fVal."</a>"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
240 else |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
241 $fs .= $fVal; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
242 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
243 echo "<br />[".$fs."]"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
244 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
245 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
246 echo "</td>\n"; |
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 $n++; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
249 if ($n >= $maxRow) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
250 echo " </tr>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
251 $n = 0; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
252 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
253 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
254 if ($n > 0) { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
255 while ($n++ < $maxRow) |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
256 echo " <td></td>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
257 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
258 echo " </tr>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
259 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
260 echo "</table>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
261 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
262 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
263 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
264 echo "<p><b>".$totalLoc."</b> locations.</p>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
265 } else { |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
266 echo "<p><b>No locations known!</b></p>\n"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
267 } |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
268 |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
269 // Google Analytics |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
270 require "../urchin.inc.php"; |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
271 ?> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
272 </body> |
edac314ac9bb
Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
273 </html> |