1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,97 @@ |
1 |
+<!DOCTYPE html> |
|
2 |
+<html lang="en"> |
|
3 |
+<head> |
|
4 |
+ <meta charset="UTF-8"> |
|
5 |
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
6 |
+ <title>Welcome to the WVMN Tile Server</title> |
|
7 |
+ <style> |
|
8 |
+ body { |
|
9 |
+ padding-left: 60px; |
|
10 |
+ padding-right: 60px; |
|
11 |
+ } |
|
12 |
+ table { |
|
13 |
+ font-family: Arial, sans-serif; |
|
14 |
+ border-collapse: collapse; |
|
15 |
+ width: 100%; |
|
16 |
+ } |
|
17 |
+ th, td { |
|
18 |
+ border: 1px solid #dddddd; |
|
19 |
+ text-align: left; |
|
20 |
+ padding: 8px; |
|
21 |
+ } |
|
22 |
+ th { |
|
23 |
+ background-color: #009879; |
|
24 |
+ color: #ffffff; |
|
25 |
+ } |
|
26 |
+ tr:nth-child(even) { |
|
27 |
+ background-color: #f2f2f2; |
|
28 |
+ } |
|
29 |
+ </style> |
|
30 |
+</head> |
|
31 |
+<body> |
|
32 |
+ |
|
33 |
+<h1>Welcome to the WVMN Tile Server</h1> |
|
34 |
+<h2>This tile server has the following tile sets:</h2> |
|
35 |
+ |
|
36 |
+<table> |
|
37 |
+ <tr> |
|
38 |
+ <th>Map System</th> |
|
39 |
+ <th>URL</th> |
|
40 |
+ </tr> |
|
41 |
+ <tr> |
|
42 |
+ <td>OpenStreetMap (OSM)</td> |
|
43 |
+ <td><b>//10.131.18.18/osm/tiles/{z}/{x}/{y}</b></td> |
|
44 |
+ </tr> |
|
45 |
+ <tr> |
|
46 |
+ <td>Satellite</td> |
|
47 |
+ <td><b>//10.131.18.18/satellite/tiles/{z}/{x}/{y}</b></td> |
|
48 |
+ </tr> |
|
49 |
+ <tr> |
|
50 |
+ <td>Weather Radar (Nexrad) (WMS Layer Format)</td> |
|
51 |
+ <td><b>//10.131.18.18/nexrad/</b></td> |
|
52 |
+ </tr> |
|
53 |
+</table> |
|
54 |
+ |
|
55 |
+<br /> |
|
56 |
+ |
|
57 |
+<h2>Cache Status:</h2> |
|
58 |
+ |
|
59 |
+<table> |
|
60 |
+ <tr> |
|
61 |
+ <th>Map System</th> |
|
62 |
+ <th>Objects</th> |
|
63 |
+ <th>Cache Size</th> |
|
64 |
+ </tr> |
|
65 |
+ |
|
66 |
+<?php |
|
67 |
+function countFiles($dir) { |
|
68 |
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)); |
|
69 |
+ $count = 0; |
|
70 |
+ foreach ($iterator as $file) { |
|
71 |
+ if ($file->isFile()) { |
|
72 |
+ $count++; |
|
73 |
+ } |
|
74 |
+ } |
|
75 |
+ return $count; |
|
76 |
+} |
|
77 |
+ |
|
78 |
+$cache = explode("\n", shell_exec("du -hs /tmp/maps*")); |
|
79 |
+array_pop($cache); |
|
80 |
+ |
|
81 |
+foreach ($cache as &$value) { |
|
82 |
+ $data = explode(" ", $value); |
|
83 |
+ echo "<tr><td>".str_replace("/tmp/maps-", "", $data[1])."</td><td>".countFiles($data[1])."</td><td>".$data[0]."</td></tr>"; |
|
84 |
+} |
|
85 |
+?> |
|
86 |
+</table> |
|
87 |
+ |
|
88 |
+<br /><br /> |
|
89 |
+ |
|
90 |
+<h2>For questions about this system contact:</h2> |
|
91 |
+<b>N:</b> Richard Cornwell<br /> |
|
92 |
+<b>C:</b> K9RCP <br /> |
|
93 |
+<b>E:</b> k9rcp@techtoknow.net<br /> |
|
94 |
+<b>P:</b> 4048551727<br /> |
|
95 |
+ |
|
96 |
+</body> |
|
97 |
+</html> |