-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
37 lines (37 loc) · 846 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php include "library.php" ?>
<!-- $Id$ -->
<html>
<head>
<?php // include "popup.php" ?>
<title>TrafficMap</title>
</head>
<body bgcolor="#ffffff">
<p>
<?php
if (is_dir("maps")) {
print "<h2>List of all known maps</h2>\n<ul>\n";
$fpdir = opendir("maps");
$i = 0;
while ($file = readdir($fpdir)) {
if (! preg_match("/\.tki$/", $file))
continue;
$files[$i] = "$file";
$i++;
}
closedir($fpdir);
sort($files);
for ($i = 0; $i < count($files); $i++) {
$file = $files[$i];
if (strpos($file, ".") > 0)
$name = substr($file, 0, strpos($file, "."));
else
$name = $file;
print "<li><a href=trafficmap.php?type=map&map=$name>$name</a>";
print " <font size=-2><a href=trafficmap.php?type=png&map=$name>(img)</a>";
print " <a href=maps/$file>(source)</a></font>\n";
}
print "</ul>\n<p>\n";
}
?>
</body>
</html>