annotate www/index.php @ 2835:9405a18756c8 default tip

Add entry for Caz.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 18 Jun 2024 11:21:06 +0300
parents 995471355353
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1646
2cbce82aa3c3 Use full <?php ?> tag, misc cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1641
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
Matti Hamalainen <ccr@tnsp.org>
parents: 1255
diff changeset
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
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
6
1620
6d620441af7f Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1618
diff changeset
7 function mpPrintFileTD($filename, $mapName, $useTD = TRUE, $filename2 = FALSE)
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 {
361
97b7a95edfc9 Added old batmap.
Matti Hamalainen <ccr@tnsp.org>
parents: 342
diff changeset
9 if ($useTD) echo " <td>";
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
10 if (file_exists($filename))
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
11 {
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
12 $fileStat = stat($filename);
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 $q = $fileStat[7];
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
14
1620
6d620441af7f Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1618
diff changeset
15 echo mpGetURLLink($filename, $mapName).", <b>";
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 if ($q < 1024)
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 printf("%d</b> bytes", $q);
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
19 else
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
20 if ($q < (1024*1024))
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
21 printf("%d</b>kB", $q / 1024);
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
22 else
1463
Matti Hamalainen <ccr@tnsp.org>
parents: 1414
diff changeset
23 printf("%1.2f</b>MB", $q / (1024.0*1024.0));
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
24
1702
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
25 $mtime = filemtime($filename);
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 }
1702
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
27 else
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
28 $mtime = -1;
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
29
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
30 if ($useTD) echo "</td>\n";
1702
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
31
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
32 return $mtime;
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 }
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
35
1620
6d620441af7f Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1618
diff changeset
36 function mpPrintTR($n)
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 {
813
Matti Hamalainen <ccr@tnsp.org>
parents: 757
diff changeset
38 echo " <tr class=\"line".(($n & 1) + 1)."\">\n";
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
39 }
311
134dded5369b Changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 300
diff changeset
40
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
42 function mpCheckMTime($filename)
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
43 {
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
44 global $lastMTime;
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
45
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
46 $mtime = -1;
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
47 if (file_exists($filename) && ($mtime = filemtime($filename)) > $lastMTime)
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
48 $lastMTime = $mtime;
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
49
1702
dd123d0a75d9 Sync cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1699
diff changeset
50 return $mtime;
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
51 }
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
52
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
53
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
54 function mpGetURLLink($url, $name, $extra = FALSE)
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
55 {
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
56 return
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
57 "<a ".($extra !== FALSE ? $extra." " : "").
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
58 "href=\"".$url."\">".chentities($name)."</a>";
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
59 }
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
60
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
61
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
62 function mpPrintLineBase($n, $filename, $mapName, $urlExtra)
361
97b7a95edfc9 Added old batmap.
Matti Hamalainen <ccr@tnsp.org>
parents: 342
diff changeset
63 {
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
64 global $lastMTime;
1620
6d620441af7f Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1618
diff changeset
65 mpPrintTR($n);
1592
Matti Hamalainen <ccr@tnsp.org>
parents: 1582
diff changeset
66
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
67 mpCheckMTime($filename.".loc");
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
68
1592
Matti Hamalainen <ccr@tnsp.org>
parents: 1582
diff changeset
69 echo " <td>";
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
70 $fname = $filename.".html";
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
71 if (file_exists($fname))
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
72 {
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
73 mpCheckMTime($fname);
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
74 echo mpGetURLLink($fname.$urlExtra, $mapName);
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
75 }
1592
Matti Hamalainen <ccr@tnsp.org>
parents: 1582
diff changeset
76 else
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
77 echo $mapName;
1592
Matti Hamalainen <ccr@tnsp.org>
parents: 1582
diff changeset
78
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
79 if (file_exists($filename.".htm"))
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
80 echo " ".mpGetURLLink($filename.".htm".$urlExtra, "(*)");
1653
59094d808524 Show "last modified" time stamps for each individual non-continent map.
Matti Hamalainen <ccr@tnsp.org>
parents: 1646
diff changeset
81
1592
Matti Hamalainen <ccr@tnsp.org>
parents: 1582
diff changeset
82 echo "</td>\n";
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
83 }
1537
7afb381751ec Also the same for the web-page, as in previous commit.
Matti Hamalainen <ccr@tnsp.org>
parents: 1491
diff changeset
84
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
85
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
86 function mpPrintLine($n, $filename, $mapName)
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
87 {
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
88 mpPrintLineBase($n, $filename, $mapName, "");
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
89
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
90 $mtime1 = mpPrintFileTD($filename.".map", "ASCII");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
91 $mtime2 = mpCheckMTime($filename.".loc");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
92 if ($mtime1 > 0 || $mtime2 > 0)
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
93 echo " <td>".mpGetMTimeStr($mtime1 > $mtime2 ? $mtime1 : $mtime2)."</td>\n";
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
94
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 echo " </tr>\n";
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 }
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
98
1911
1e65d3dd91c8 Get rid of the OpenSearch stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 1895
diff changeset
99 mpPrintPageHeader($pageTitle);
735
b066148013cd Added OpenSearch support, etc.
Matti Hamalainen <ccr@tnsp.org>
parents: 700
diff changeset
100
2098
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
101 if (1)
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
102 {
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
103 echo
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
104 "<h1>".$pageTitle."</h1>\n".
1895
f15d00bb9bd2 Change element class name.
Matti Hamalainen <ccr@tnsp.org>
parents: 1891
diff changeset
105 "<div class=\"skrolli\">".
2364
50c6a753142d Use https URIs.
Matti Hamalainen <ccr@tnsp.org>
parents: 2361
diff changeset
106 "<a href=\"https://tnsp.org/u/IqM\"><img src=\"img/skrolli.png\" alt=\"Skrolli magazine\" /></a>".
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
107 "</div>\n".
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
108 mpSpecialDate("index", 1);
2098
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
109 }
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
110 else
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
111 {
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
112 $zuri = "https://juliareda.eu/2019/02/eu-copyright-final-text/";
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
113 echo
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
114 "<div class=\"filters\">".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
115 "<h1>Internet Wars</h1>".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
116 "<div style=\"margin: 2em; font-size: 1.5em;\">".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
117 "Episode V: Article 13 Strikes Back".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
118 "</div>".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
119 "<p><a href=\"".$zuri."\">Click here to read more</a></p>".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
120 "<a href=\"".$zuri."\"><img src=\"img/keyhole.jpg\" /></a>".
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
121 "</div>\n";
Matti Hamalainen <ccr@tnsp.org>
parents: 2041
diff changeset
122 }
2015
135b2b595e2c Trailing whitespace cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 1911
diff changeset
123
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
124 echo
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
125 "<div id=\"intro\">\n".
2364
50c6a753142d Use https URIs.
Matti Hamalainen <ccr@tnsp.org>
parents: 2361
diff changeset
126 "Maps and information about <a href=\"https://www.bat.org/\">BatMUD realm</a>,\n".
2326
53bea3800a93 Sync some web changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 2321
diff changeset
127 "including maps of the continents, some areas and cities. ".
53bea3800a93 Sync some web changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 2321
diff changeset
128 (isset($pageGMapURL) ?
53bea3800a93 Sync some web changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 2321
diff changeset
129 "As an alternative for the continent maps, ".burl("Jeskko")." has an interesting\n".
53bea3800a93 Sync some web changes.
Matti Hamalainen <ccr@tnsp.org>
parents: 2321
diff changeset
130 "<a href=\"".$pageGMapURL."\">Google Maps-style world map</a>.\n" : "").
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
131 "<p>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
132 "The ANSI files are maps rendered as ASCII text with ANSI colour codes, UNIX users\n".
2468
2670709c4c7d Sync www stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2416
diff changeset
133 "can apply the less(1) utility to view them, assuming their less supports\n".
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
134 "raw output - GNU less works: <b>less -S -R laenor.ansi</b>.\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
135 "</p>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
136 "</div>\n";
532
Matti Hamalainen <ccr@tnsp.org>
parents: 509
diff changeset
137
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
138 echo
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
139 "\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
140 "<h2>Continents of BatMUD: Age of Exiles</h2>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
141 "<table class=\"area\">\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
142 " <tr>\n".
1641
Matti Hamalainen <ccr@tnsp.org>
parents: 1630
diff changeset
143 " <th>Continent (HTML)</th>\n".
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
144 " <th>Image files</th>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
145 " <th>Raw ANSI</th>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
146 " <th>Information</th>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
147 " </tr>\n";
337
ca191c3a0ce1 Updates and lots of new ugly glue.
Matti Hamalainen <ccr@tnsp.org>
parents: 321
diff changeset
148
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 $n = 0;
1604
Matti Hamalainen <ccr@tnsp.org>
parents: 1592
diff changeset
150 $lastMTime = 0;
908
Matti Hamalainen <ccr@tnsp.org>
parents: 893
diff changeset
151 foreach ($continentList as $continent => $data)
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
152 {
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
153 if (!$data[CTI_SPECIAL])
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
154 {
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
155 mpPrintLineBase($n++, $continent, $data[CTI_NAME],
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
156 is_array($data[CTI_INIT_LOC]) ? "#loc".$data[CTI_INIT_LOC][0]."_".$data[CTI_INIT_LOC][1] : "");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
157
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
158 mpPrintFileTD($continent.".png", "PNG");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
159 mpPrintFileTD($continent.".ansi", "ANSI");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
160
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
161 echo " <td>";
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
162 if (file_exists($continent.".loc"))
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
163 {
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
164 echo
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
165 "[<a href=\"loc.php?n=".$continent."\">Locations</a>] ".
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
166 "[<a href=\"loc.php?c&amp;n=".$continent."\">PCities</a>]";
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
167 }
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
168 else
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
169 {
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
170 echo "-";
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
171 }
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
172
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
173 echo
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
174 "</td>\n".
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
175 " </tr>\n";
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
176 }
1387
2b6b38e94bb2 Various minor code cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1334
diff changeset
177 }
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
179 echo
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
180 "</table>\n".
2342
904911545217 Menu layout and the corresponding CSS adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 2326
diff changeset
181 "<p>(*) = Maps without JavaScript and with 'embedded' labels. Continent data last updated: <b>".
904911545217 Menu layout and the corresponding CSS adjustments.
Matti Hamalainen <ccr@tnsp.org>
parents: 2326
diff changeset
182 mpGetMTimeStr($lastMTime)."</b>. [<a href=\"changelog.txt\">View PupuMaps project changelog</a>]</p>\n".
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
183 "\n".
1699
Matti Hamalainen <ccr@tnsp.org>
parents: 1687
diff changeset
184 mpSpecialDate("index", 2).
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
185 "<h2>Miscellaneous maps</h2>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
186 "<table class=\"area\">\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
187 " <tr>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
188 " <th>Area (HTML)</th>\n".
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
189 " <th>Other</th>\n".
1653
59094d808524 Show "last modified" time stamps for each individual non-continent map.
Matti Hamalainen <ccr@tnsp.org>
parents: 1646
diff changeset
190 " <th>Updated</th>\n".
1616
e53813e164a1 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1604
diff changeset
191 " </tr>\n";
300
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 $n = 0;
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
194 mpPrintLine($n++, "dortlewall", "Village of Dortlewall");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
195 mpPrintLine($n++, "arelium", "City of Arelium");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
196 mpPrintLine($n++, "calythien", "City of Calythien");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
197 mpPrintLine($n++, "lorenchia", "City of Lorenchia");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
198 mpPrintLine($n++, "rilynttar", "City of Rilynt'tar");
2698
995471355353 Add Shadowkeep map to main page.
Matti Hamalainen <ccr@tnsp.org>
parents: 2532
diff changeset
199 mpPrintLine($n++, "shadowkeep", "City of Shadowkeep");
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
200 mpPrintLine($n++, "esiris", "E'siris, the Ethereal City (upper level)");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
201 mpPrintLine($n++, "esiris2", "E'siris, the Ethereal City (lower level)");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
202 mpPrintLine($n++, "votk", "Valley of the Kings");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
203 mpPrintLine($n++, "lanzia", "The Isle of Lanzia");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
204 mpPrintLine($n++, "faerieforest", "Faerie Forest");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
205 mpPrintLine($n++, "renardy", "Renardy");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
206 mpPrintLine($n++, "tyr_farwyn", "Tyr Farwyn");
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
207 mpPrintLine($n++, "vendace_shore", "Vendace Shore");
2532
adcb64392b92 Lost Vale map added to main page.
Matti Hamalainen <ccr@tnsp.org>
parents: 2468
diff changeset
208 mpPrintLine($n++, "lost_vale", "Lost Vale");
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
209 //mpPrintLine($n++, "tormentas", "Islas de Tormentas");
361
97b7a95edfc9 Added old batmap.
Matti Hamalainen <ccr@tnsp.org>
parents: 342
diff changeset
210
2416
e2fe94bbca17 Make HTML+JS maps go to continent's main city as default.
Matti Hamalainen <ccr@tnsp.org>
parents: 2364
diff changeset
211 mpPrintLine($n++, "batcity", "Old BatCity map");
1620
6d620441af7f Rename various functions, and other cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1618
diff changeset
212 mpPrintTR($n++);
1537
7afb381751ec Also the same for the web-page, as in previous commit.
Matti Hamalainen <ccr@tnsp.org>
parents: 1491
diff changeset
213
1710
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
214 $filename = "hcbat";
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
215 echo
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
216 " <td>".
1710
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
217 mpGetURLLink($filename.".html", "HCBat map").
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
218 " ".
1710
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
219 mpGetURLLink($filename.".htm", "(*)").
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
220 " [".mpGetURLLink($filename.".ansi", "ANSI")."]".
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
221 "</td>\n".
1710
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
222 " <td>[<a href=\"loc.php?n=".$filename."\">Locations</a>] ".
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
223 "[<a href=\"loc.php?n=".$filename."&amp;c\">PCities</a>] ".
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
224 "[<a href=\"quests.php?".$filename."\">Quests</a>] ".
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
225 "</td>\n";
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
226
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
227 if (($mtime = mpCheckMTime($filename.".loc")) > 0)
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
228 echo " <td>".mpGetMTimeStr($mtime)."</td>\n";
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
229
88c371ceebe1 Show last changed timestamp for HCBat map/locations.
Matti Hamalainen <ccr@tnsp.org>
parents: 1702
diff changeset
230 echo
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
231 " </tr>\n".
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
232 "</table>\n".
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
233 "</div>\n"; // end of <div id="contents">
300
edac314ac9bb Added in the ugly PHP-glue used in http://tnsp.org/maps/
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
235 echo
1678
a4dc64446036 Fix index page extraBox.
Matti Hamalainen <ccr@tnsp.org>
parents: 1671
diff changeset
236 "<div id=\"extraBox\">\n".
2361
69889fdea9d8 Update links section.
Matti Hamalainen <ccr@tnsp.org>
parents: 2342
diff changeset
237 // " <h1>Ggr's links</h1>\n".
2468
2670709c4c7d Sync www stuff.
Matti Hamalainen <ccr@tnsp.org>
parents: 2416
diff changeset
238 // " <a href=\"/kuvia/events/batmud/\">BatMUD con pictures</a>\n".
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
239 " <a href=\"/~ccr/ggrtf/\">GgrTF</a>\n".
2361
69889fdea9d8 Update links section.
Matti Hamalainen <ccr@tnsp.org>
parents: 2342
diff changeset
240 " <a href=\"/mat/\">Material info</a>\n".
1618
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
241 " <a href=\"/~ccr/bat/\">Ggr's Bat page</a>\n".
990874dc4283 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 1616
diff changeset
242 "</div>\n";
1140
3bb8253db932 New website layout and some minor improvements.
Matti Hamalainen <ccr@tnsp.org>
parents: 1112
diff changeset
243
1891
68b784c7eae2 Get rid of mgeneric.inc.php here.
Matti Hamalainen <ccr@tnsp.org>
parents: 1710
diff changeset
244 mpPrintPageFooter(FALSE);
1151
e0794ddb605e Add output caching to main page and location page.
Matti Hamalainen <ccr@tnsp.org>
parents: 1149
diff changeset
245 ?>