These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | if (isset($globalProtect) && $globalProtect) { |
||
3 | @session_start(); |
||
0 ignored issues
–
show
|
|||
4 | $_SESSION['protect'] = 'protect'; |
||
5 | } |
||
6 | //gets the page file and stores it in a variable |
||
7 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
||
8 | $current_page = $file_path['filename']; |
||
9 | if ($globalTimezone == '') $globalTimezone = 'UTC'; |
||
10 | date_default_timezone_set($globalTimezone); |
||
11 | if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
||
12 | else $MapType = $globalMapProvider; |
||
13 | |||
14 | |||
15 | if (isset($_GET['3d'])) { |
||
16 | setcookie('MapFormat','3d'); |
||
17 | } else if (isset($_GET['2d'])) { |
||
18 | setcookie('MapFormat','2d'); |
||
19 | } |
||
20 | |||
21 | if (isset($_POST['archive'])) { |
||
22 | setcookie('archive','true'); |
||
23 | setcookie('archive_begin',strtotime($_POST['start_date'])); |
||
24 | setcookie('archive_end',strtotime($_POST['end_date'])); |
||
25 | setcookie('archive_speed',$_POST['archivespeed']); |
||
26 | } |
||
27 | if (isset($_POST['noarchive'])) { |
||
28 | setcookie('archive','false',-1); |
||
29 | setcookie('archive_begin','',-1); |
||
30 | setcookie('archive_end','',-1); |
||
31 | setcookie('archive_speed','',-1); |
||
32 | } |
||
33 | // When button "Remove all filters" is clicked |
||
34 | if (isset($_POST['removefilters'])) { |
||
35 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
||
36 | return strpos($key,'filter_') === 0; |
||
37 | }); |
||
38 | foreach ($allfilters as $filt) { |
||
39 | unset($_COOKIE[$filt]); |
||
40 | setcookie($filt,null,-1); |
||
41 | } |
||
42 | } |
||
43 | ?> |
||
44 | <!DOCTYPE html> |
||
45 | <html> |
||
46 | <head> |
||
47 | <meta charset="UTF-8"> |
||
48 | <meta http-equiv="X-UA-Compatible" content="IE=10" /> |
||
49 | <title><?php print $title; ?> | <?php print $globalName; ?></title> |
||
50 | <meta name="keywords" content="<?php print $title; ?> spotter live flight tracking tracker map aircraft airline airport history database ads-b acars" /> |
||
51 | <meta name="description" content="<?php print $title; ?> | <?php print $globalName; ?> use FlightAirMap to track flight" /> |
||
52 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
||
53 | <link rel="shortcut icon" type="image/x-icon" href="<?php print $globalURL; ?>/favicon.ico"> |
||
54 | <link rel="apple-touch-icon" href="<?php print $globalURL; ?>/images/touch-icon.png"> |
||
55 | <!--[if lt IE 9]> |
||
56 | <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> |
||
57 | <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> |
||
58 | <![endif]--> |
||
59 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/js/bootstrap-3.3.7-dist/css/bootstrap.min.css" /> |
||
60 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/jquery-ui.min.css" /> |
||
61 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/bootstrap-datetimepicker.min.css" /> |
||
62 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/font-awesome-4.7.0/css/font-awesome.min.css" /> |
||
63 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/bootstrap-select.min.css" /> |
||
64 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style.css" /> |
||
65 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/print.css" /> |
||
66 | |||
67 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery-3.2.1.min.js"></script> |
||
68 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/jquery-ui.min.js"></script> |
||
69 | |||
70 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/moment.min.js"></script> |
||
71 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script> |
||
72 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-datetimepicker.min.js"></script> |
||
73 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/bootstrap-select.min.js"></script> |
||
74 | <script type="text/javascript" src="<?php print $globalURL; ?>/js/script.js"></script> |
||
75 | |||
76 | <?php |
||
77 | if (strtolower($current_page) == "about") |
||
78 | { |
||
79 | ?> |
||
80 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
||
81 | <script src="<?php print $globalURL; ?>/js/leaflet.js"></script> |
||
82 | <?php |
||
83 | } |
||
84 | ?> |
||
85 | <?php |
||
86 | if (strtolower($current_page) == "search") |
||
87 | { |
||
88 | ?> |
||
89 | <script src="<?php print $globalURL; ?>/js/search.js"></script> |
||
90 | <?php |
||
91 | } |
||
92 | ?> |
||
93 | <?php |
||
94 | if (strtolower($current_page) == "index") |
||
95 | { |
||
96 | ?> |
||
97 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" /> |
||
98 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
||
99 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" /> |
||
100 | <script src="<?php print $globalURL; ?>/js/leaflet.js"></script> |
||
101 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
||
102 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
||
103 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
||
104 | <script src="<?php print $globalURL; ?>/js/jquery-sidebar.js"></script> |
||
105 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
||
106 | <?php |
||
107 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
||
108 | ?> |
||
109 | <?php |
||
110 | if (isset($globalOffline) && $globalOffline) { |
||
111 | ?> |
||
112 | <link rel="stylesheet" href="<?php print $globalURL; ?>/js/Cesium/Widgets/widgets.css" /> |
||
113 | <script src="<?php print $globalURL; ?>/js/Cesium/Cesium.js"></script> |
||
114 | <?php |
||
115 | } else { |
||
116 | ?> |
||
117 | <link rel="stylesheet" href="https://cesiumjs.org/releases/1.36/Build/Cesium/Widgets/widgets.css" /> |
||
118 | <script src="https://cesiumjs.org/releases/1.36/Build/Cesium/Cesium.js"></script> |
||
119 | <?php |
||
120 | } |
||
121 | ?> |
||
122 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/cesium-minimap.css" /> |
||
123 | <script src="<?php print $globalURL; ?>/js/cesium-minimap.js"></script> |
||
124 | <?php |
||
125 | } else { |
||
126 | ?> |
||
127 | <?php |
||
128 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
||
129 | ?> |
||
130 | <script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script> |
||
131 | <script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script> |
||
132 | <?php |
||
133 | } |
||
134 | ?> |
||
135 | <?php |
||
136 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
||
137 | ?> |
||
138 | <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>--> |
||
139 | <script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script> |
||
140 | <?php |
||
141 | } |
||
142 | ?> |
||
143 | <?php |
||
144 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) { |
||
145 | ?> |
||
146 | <!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>--> |
||
147 | <script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script> |
||
148 | <?php |
||
149 | } |
||
150 | ?> |
||
151 | <?php |
||
152 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
||
153 | ?> |
||
154 | <script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script> |
||
155 | <?php |
||
156 | } |
||
157 | ?> |
||
158 | <?php |
||
159 | if ($MapType == 'Yandex') { |
||
160 | ?> |
||
161 | <script src="https://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script> |
||
162 | <script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script> |
||
163 | <?php |
||
164 | } |
||
165 | } |
||
166 | ?> |
||
167 | <?php |
||
168 | if (isset($_POST['archive'])) { |
||
169 | ?> |
||
170 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
||
171 | <?php |
||
172 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
||
173 | ?> |
||
174 | |||
175 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script> |
||
176 | <?php |
||
177 | } |
||
178 | } else { |
||
179 | ?> |
||
180 | <?php |
||
181 | /* if (isset($globalBeta) && $globalBeta) { |
||
182 | ?> |
||
183 | <script src="<?php print $globalURL; ?>/js/leaflet-realtime.js"></script> |
||
184 | <script src="<?php print $globalURL; ?>/js/map.new.js.php?<?php print time(); ?>"></script> |
||
185 | <?php |
||
186 | } else { |
||
187 | */ |
||
188 | ?> |
||
189 | <?php |
||
190 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
||
191 | ?> |
||
192 | <?php |
||
193 | // if (isset($globalBeta) && $globalBeta) { |
||
194 | ?> |
||
195 | <script src="<?php print $globalURL; ?>/js/leaflet-playback.js"></script> |
||
196 | <?php |
||
197 | // } |
||
198 | ?> |
||
199 | <script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?>"></script> |
||
200 | <?php |
||
201 | if (!isset($globalAircraft) || $globalAircraft) { |
||
202 | ?> |
||
203 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?<?php print time(); ?>"></script> |
||
204 | <?php |
||
205 | } |
||
206 | if (isset($globalTracker) && $globalTracker) { |
||
207 | ?> |
||
208 | <script src="<?php print $globalURL; ?>/js/map-tracker.2d.js.php?<?php print time(); ?>"></script> |
||
209 | <?php |
||
210 | } |
||
211 | if (isset($globalMarine) && $globalMarine) { |
||
212 | ?> |
||
213 | <script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>"></script> |
||
214 | <?php |
||
215 | } |
||
216 | if (isset($globalSatellite) && $globalSatellite) { |
||
217 | ?> |
||
218 | <script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>"></script> |
||
219 | <?php |
||
220 | } |
||
221 | } |
||
222 | ?> |
||
223 | <?php |
||
224 | // } |
||
225 | ?> |
||
226 | <?php |
||
227 | } |
||
228 | } |
||
229 | ?> |
||
230 | <?php |
||
231 | //if ((strtolower($current_page) == "ident-detailed" && isset($ident)) || strtolower($current_page) == "flightid-overview") |
||
232 | //if ((strtolower($current_page) == "ident-detailed" && isset($ident) && isset($globalArchive) && $globalArchive)) |
||
233 | if ((strtolower($current_page) == "ident-detailed" && isset($ident) && isset($globalArchive) && $globalArchive)) |
||
234 | { |
||
235 | ?> |
||
236 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" /> |
||
237 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
||
238 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" /> |
||
239 | <script src="<?php print $globalURL; ?>/js/leaflet.js"></script> |
||
240 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
||
241 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
||
242 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
||
243 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
||
244 | <script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
||
245 | <?php |
||
246 | if (!isset($type) || $type == 'aircraft') { |
||
247 | ?> |
||
248 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script> |
||
249 | <?php |
||
250 | } elseif (isset($type) && $type == 'marine') { |
||
251 | ?> |
||
252 | <script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script> |
||
253 | <?php |
||
254 | } elseif (isset($type) && $type == 'tracker') { |
||
255 | ?> |
||
256 | <script src="<?php print $globalURL; ?>/js/map-tracker.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script> |
||
257 | <?php |
||
258 | } elseif (isset($type) && $type == 'satellite') { |
||
259 | ?> |
||
260 | <script src="<?php print $globalURL; ?>/js/map-satellite.2d.js.php?<?php print time(); ?>&ident=<?php print $ident; ?>"></script> |
||
261 | <?php |
||
262 | } |
||
263 | ?> |
||
264 | <?php |
||
265 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
||
266 | ?> |
||
267 | <script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script> |
||
268 | <script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script> |
||
269 | <?php |
||
270 | } |
||
271 | ?> |
||
272 | <?php |
||
273 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
||
274 | ?> |
||
275 | <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>--> |
||
276 | <script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script> |
||
277 | <?php |
||
278 | } |
||
279 | ?> |
||
280 | <?php |
||
281 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) { |
||
282 | ?> |
||
283 | <!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>--> |
||
284 | <script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script> |
||
285 | <?php |
||
286 | } |
||
287 | ?> |
||
288 | <?php |
||
289 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
||
290 | ?> |
||
291 | <script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script> |
||
292 | <?php |
||
293 | } |
||
294 | ?> |
||
295 | <?php |
||
296 | if ($MapType == 'Yandex') { |
||
297 | ?> |
||
298 | <script src="http://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script> |
||
299 | <script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script> |
||
300 | <?php |
||
301 | } |
||
302 | ?> |
||
303 | <?php |
||
304 | } |
||
305 | |||
306 | if (strtolower($current_page) == "flightid-overview" && isset($globalArchive) && $globalArchive && isset($flightaware_id)) |
||
307 | { |
||
308 | ?> |
||
309 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/style-map.css?<?php print date("H"); ?>" /> |
||
310 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
||
311 | <link type="text/css" rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet-sidebar.css" /> |
||
312 | <script src="<?php print $globalURL; ?>/js/leaflet.js"></script> |
||
313 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
||
314 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
||
315 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
||
316 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
||
317 | <script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
||
318 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
||
319 | <?php |
||
320 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
||
321 | ?> |
||
322 | <script src="https://maps.google.com/maps/api/js?v=3&key=<?php print $globalGoogleAPIKey; ?>"></script> |
||
323 | <script src="<?php print $globalURL; ?>/js/leaflet-Google.js"></script> |
||
324 | <?php |
||
325 | } |
||
326 | ?> |
||
327 | <?php |
||
328 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
||
329 | ?> |
||
330 | <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise"></script>--> |
||
331 | <script src="<?php print $globalURL; ?>/js/leaflet-Bing.js"></script> |
||
332 | <?php |
||
333 | } |
||
334 | ?> |
||
335 | <?php |
||
336 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '' && ($MapType == 'MapQuest-OSM' || $MapType == 'MapQuest-Hybrid' || $MapType == 'MapQuest-Aerial')) { |
||
337 | ?> |
||
338 | <!--<script src="https://www.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script>--> |
||
339 | <script src="https://open.mapquestapi.com/sdk/leaflet/v2.2/mq-map.js?key=<?php print $globalMapQuestKey; ?>"></script> |
||
340 | <?php |
||
341 | } |
||
342 | ?> |
||
343 | <?php |
||
344 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
||
345 | ?> |
||
346 | <script src="<?php print $globalURL; ?>/js/leaflet-Here.js"></script> |
||
347 | <?php |
||
348 | } |
||
349 | ?> |
||
350 | <?php |
||
351 | if ($MapType == 'Yandex') { |
||
352 | ?> |
||
353 | <script src="http://api-maps.yandex.ru/2.0/?load=package.map&lang=en_US" type="text/javascript"></script> |
||
354 | <script src="<?php print $globalURL; ?>/js/leaflet-Yandex.js"></script> |
||
355 | <?php |
||
356 | } |
||
357 | ?> |
||
358 | <?php |
||
359 | } |
||
360 | ?> |
||
361 | <?php |
||
362 | /* |
||
363 | if ($facebook_meta_image != "") |
||
364 | { |
||
365 | ?> |
||
366 | <meta property="og:image" content="<?php print $facebook_meta_image; ?>"/> |
||
367 | <?php |
||
368 | } else { |
||
369 | ?> |
||
370 | <meta property="og:image" content="<?php print $globalURL; ?>/images/touch-icon.png"/> |
||
371 | <?php |
||
372 | } |
||
373 | */ |
||
374 | ?> |
||
375 | <?php |
||
376 | if (isset($globalCustomCSS) && $globalCustomCSS != '') { |
||
377 | ?> |
||
378 | <link type="text/css" rel="stylesheet" href="<?php print $globalCustomCSS; ?>" /> |
||
379 | <?php |
||
380 | } |
||
381 | ?> |
||
382 | |||
383 | <meta property="og:title" content="<?php print $title; ?> | <?php print $globalName; ?>"/> |
||
384 | <meta property="og:url" content="<?php print $globalURL.$_SERVER['REQUEST_URI']; ?>"/> |
||
385 | <meta property="og:site_name" content="<?php print $globalName; ?>"/> |
||
386 | </head> |
||
387 | <body class="page-<?php print strtolower($current_page); ?>"> |
||
388 | <div class="navbar navbar-fixed-top" role="navigation"> |
||
389 | <div class="container"> |
||
390 | <div class="navbar-header"> |
||
391 | <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> |
||
392 | <span class="sr-only">Toggle navigation</span> |
||
393 | <span class="icon-bar"></span> |
||
394 | <span class="icon-bar"></span> |
||
395 | <span class="icon-bar"></span> |
||
396 | </button> |
||
397 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
||
398 | <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
||
399 | </div> |
||
400 | <div class="collapse navbar-collapse"> |
||
401 | |||
402 | <ul class="nav navbar-nav"> |
||
403 | |||
404 | <?php |
||
405 | $sub = false; |
||
406 | if ( |
||
407 | ( |
||
408 | (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
||
409 | ) || |
||
410 | ( |
||
411 | isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
||
412 | ) || |
||
413 | ( |
||
414 | isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
||
415 | ) || |
||
416 | ( |
||
417 | isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
||
418 | ) |
||
419 | ) { |
||
420 | $sub = true; |
||
421 | } |
||
422 | ?> |
||
423 | <?php |
||
424 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
||
425 | ?> |
||
426 | <li class="dropdown"> |
||
427 | <?php |
||
428 | if ($sub) { |
||
429 | ?> |
||
430 | <li class="dropdown"> |
||
431 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircrafts"); ?> <b class="caret"></b></a> |
||
432 | <ul class="dropdown-menu multi-level"> |
||
433 | <li class="dropdown-submenu"> |
||
434 | <?php |
||
435 | } |
||
436 | ?> |
||
437 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
||
438 | <ul class="dropdown-menu"> |
||
439 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
||
440 | <?php |
||
441 | if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
||
442 | ?> |
||
443 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
||
444 | <?php |
||
445 | } |
||
446 | ?> |
||
447 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
||
448 | <?php |
||
449 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
||
450 | ?> |
||
451 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
||
452 | <?php |
||
453 | } |
||
454 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
||
455 | |||
456 | ?> |
||
457 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
||
458 | <?php |
||
459 | } |
||
460 | ?> |
||
461 | <li><hr /></li> |
||
462 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
||
463 | <li><a href="<?php print $globalURL; ?>/latest"><?php echo _("Latest Activity"); ?></a></li> |
||
464 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
||
465 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
||
466 | <?php |
||
467 | if ($globalACARS) { |
||
468 | if (isset($globalDemo) && $globalDemo) { |
||
469 | ?> |
||
470 | <li><hr /></li> |
||
471 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
||
472 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
||
473 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
||
474 | <?php |
||
475 | } else { |
||
476 | ?> |
||
477 | <li><hr /></li> |
||
478 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
||
479 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
||
480 | <?php |
||
481 | } |
||
482 | } |
||
483 | ?> |
||
484 | <?php |
||
485 | if (isset($globalAccidents) && $globalAccidents) { |
||
486 | ?> |
||
487 | <li><hr /></li> |
||
488 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
||
489 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
||
490 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
||
491 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
||
492 | <?php |
||
493 | } |
||
494 | ?> |
||
495 | <li><hr /></li> |
||
496 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
||
497 | <?php |
||
498 | if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) { |
||
499 | ?> |
||
500 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
||
501 | <?php |
||
502 | } |
||
503 | ?> |
||
504 | </ul> |
||
505 | </li> |
||
506 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
||
507 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
||
508 | <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
||
509 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
||
510 | <ul class="dropdown-menu"> |
||
511 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
||
512 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
||
513 | <li><a href="<?php print $globalURL; ?>/tools/notam"><?php echo _("NOTAM translator"); ?></a></li> |
||
514 | <?php |
||
515 | if (isset($globalGeoid) && $globalGeoid) { |
||
516 | ?> |
||
517 | <li><a href="<?php print $globalURL; ?>/tools/geoid"><?php echo _("Geoid Height Calculator"); ?></a></li> |
||
518 | <?php |
||
519 | } |
||
520 | ?> |
||
521 | </ul> |
||
522 | </li> |
||
523 | <?php |
||
524 | if ($sub) { |
||
525 | ?> |
||
526 | </li> |
||
527 | </ul> |
||
528 | <?php |
||
529 | } |
||
530 | } |
||
531 | ?> |
||
532 | <?php |
||
533 | if (isset($globalMarine) && $globalMarine) { |
||
534 | ?> |
||
535 | <li class="dropdown"> |
||
536 | <?php |
||
537 | if ($sub) { |
||
538 | ?> |
||
539 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Vessels"); ?> <b class="caret"></b></a> |
||
540 | <ul class="dropdown-menu multi-level"> |
||
541 | <li class="dropdown-submenu"> |
||
542 | <?php |
||
543 | } |
||
544 | ?> |
||
545 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
||
546 | <ul class="dropdown-menu"> |
||
547 | <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li> |
||
548 | <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li> |
||
549 | <li><a href="<?php print $globalURL; ?>/marine/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
||
550 | </ul> |
||
551 | <li><a href="<?php print $globalURL; ?>/marine/search"><?php echo _("Search"); ?></a></li> |
||
552 | <li><a href="<?php print $globalURL; ?>/marine/statistics"><?php echo _("Statistics"); ?></a></li> |
||
553 | </li> |
||
554 | <?php |
||
555 | if ($sub) { |
||
556 | ?> |
||
557 | </ul> |
||
558 | </li> |
||
559 | <?php |
||
560 | } |
||
561 | ?> |
||
562 | <?php |
||
563 | } |
||
564 | ?> |
||
565 | <?php |
||
566 | if (isset($globalTracker) && $globalTracker) { |
||
567 | ?> |
||
568 | <li class="dropdown"> |
||
569 | <?php |
||
570 | if ($sub) { |
||
571 | ?> |
||
572 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
||
573 | <ul class="dropdown-menu multi-level"> |
||
574 | <li class="dropdown-submenu"> |
||
575 | <?php |
||
576 | } |
||
577 | ?> |
||
578 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
||
579 | <ul class="dropdown-menu"> |
||
580 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
||
581 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
||
582 | <li><a href="<?php print $globalURL; ?>/tracker/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
||
583 | </ul> |
||
584 | </li> |
||
585 | <li><a href="<?php print $globalURL; ?>/tracker/search"><?php echo _("Search"); ?></a></li> |
||
586 | <li><a href="<?php print $globalURL; ?>/tracker/statistics"><?php echo _("Statistics"); ?></a></li> |
||
587 | <?php |
||
588 | if ($sub) { |
||
589 | ?> |
||
590 | </ul> |
||
591 | </li> |
||
592 | <?php |
||
593 | } |
||
594 | ?> |
||
595 | <?php |
||
596 | } |
||
597 | ?> |
||
598 | <?php |
||
599 | if (isset($globalSatellite) && $globalSatellite) { |
||
600 | ?> |
||
601 | <li class="dropdown"> |
||
602 | <?php |
||
603 | if ($sub) { |
||
604 | ?> |
||
605 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellite"); ?> <b class="caret"></b></a> |
||
606 | <ul class="dropdown-menu multi-level"> |
||
607 | <li class="dropdown-submenu"> |
||
608 | <?php |
||
609 | } |
||
610 | ?> |
||
611 | <!-- |
||
612 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
||
613 | <ul class="dropdown-menu"> |
||
614 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
||
615 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
||
616 | <li><a href="<?php print $globalURL; ?>/satellite/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
||
617 | </ul> |
||
618 | </li> |
||
619 | --> |
||
620 | <li><a href="<?php print $globalURL; ?>/satellite/statistics"><?php echo _("Statistics"); ?></a></li> |
||
621 | <?php |
||
622 | if ($sub) { |
||
623 | ?> |
||
624 | </ul> |
||
625 | </li> |
||
626 | <?php |
||
627 | } |
||
628 | ?> |
||
629 | <?php |
||
630 | } |
||
631 | ?> |
||
632 | |||
633 | <li class="dropdown"> |
||
634 | <a href="<?php print $globalURL; ?>/about" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("About"); ?> <b class="caret"></b></a> |
||
635 | <ul class="dropdown-menu"> |
||
636 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
||
637 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
||
638 | <?php |
||
639 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
||
640 | ?> |
||
641 | <li><hr /></li> |
||
642 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
||
643 | <?php |
||
644 | } |
||
645 | ?> |
||
646 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
||
647 | <li><hr /></li> |
||
648 | <li><a href="<?php print $globalURL; ?>/contribute"><?php echo _("Contribute"); ?></a></li> |
||
649 | <li><hr /></li> |
||
650 | <?php } ?> |
||
651 | <?php if ($globalName == 'FlightAirMap') { ?> |
||
652 | <li><hr /></li> |
||
653 | <li><a href="https://github.com/Ysurac/FlightAirMap/issues" target="_blank"><?php echo _("Report any Issues"); ?></a></li> |
||
654 | <?php } ?> |
||
655 | </ul> |
||
656 | </li> |
||
657 | </ul> |
||
658 | <?php |
||
659 | if (isset($globalTranslate) && $globalTranslate) { |
||
660 | ?> |
||
661 | <div class="language"> |
||
662 | <form> |
||
663 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
||
664 | <?php |
||
665 | $Language = new Language(); |
||
666 | $alllang = $Language->getLanguages(); |
||
667 | foreach ($alllang as $key => $lang) { |
||
668 | print '<option value="'.$key.'"'; |
||
669 | if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
||
670 | print '>'.$lang[0].'</option>'; |
||
671 | } |
||
672 | ?> |
||
673 | </select> |
||
674 | </form> |
||
675 | </div> |
||
676 | <?php |
||
677 | } |
||
678 | ?> |
||
679 | <div class="search"> |
||
680 | <form action="<?php print $globalURL; ?>/search" method="get"> |
||
681 | <!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>--> |
||
682 | <input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
||
683 | </form> |
||
684 | </div> |
||
685 | <div class="social"> |
||
686 | <!-- I'm not sociable --> |
||
687 | </div> |
||
688 | </div><!--/.nav-collapse --> |
||
689 | </div> |
||
690 | </div> |
||
691 | |||
692 | <?php |
||
693 | if (isset($top_header) && $top_header != "") |
||
694 | { |
||
695 | print '<div class="top-header container clear" role="main">'; |
||
696 | print '<img src="'.$globalURL.'/images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />'; |
||
697 | print '</div>'; |
||
698 | } |
||
699 | |||
700 | if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
||
701 | ?> |
||
702 | <div class="top-header clear" role="main"> |
||
703 | <?php |
||
704 | if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
||
705 | ?> |
||
706 | <div id="archive-map"></div> |
||
707 | <?php |
||
708 | } |
||
709 | ?> |
||
710 | </div> |
||
711 | <?php |
||
712 | } |
||
713 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
||
714 | { |
||
715 | ?> |
||
716 | <div class="top-header clear" role="main"> |
||
717 | <div id="map"></div> |
||
718 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
||
719 | <script src="<?php print $globalURL; ?>/js/leaflet.js"></script> |
||
720 | |||
721 | <script> |
||
722 | var map; |
||
723 | var zoom = 13; |
||
724 | //create the map |
||
725 | <?php |
||
726 | if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
||
727 | ?> |
||
728 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
||
729 | <?php |
||
730 | } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
||
731 | ?> |
||
732 | map = L.map('map', { zoomControl:true }); |
||
733 | <?php |
||
734 | } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
||
735 | ?> |
||
736 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
||
737 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
||
738 | map.fitBounds([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]); |
||
739 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
||
740 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
||
741 | <?php |
||
742 | } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
||
743 | ?> |
||
744 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
||
745 | <?php |
||
746 | } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
||
747 | ?> |
||
748 | map = L.map('map', { zoomControl:true }); |
||
749 | <?php |
||
750 | } |
||
751 | ?> |
||
752 | //initialize the layer group for the aircrft markers |
||
753 | var layer_data = L.layerGroup(); |
||
754 | |||
755 | //a few title layers |
||
756 | <?php |
||
757 | if ($globalMapProvider == 'Mapbox') { |
||
758 | ?> |
||
759 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
||
760 | maxZoom: 18, |
||
761 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
||
762 | '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' + |
||
763 | 'Imagery © <a href="http://mapbox.com">Mapbox</a>', |
||
764 | id: '<?php print $globalMapboxId; ?>', |
||
765 | token : '<?php print $globalMapboxToken; ?>' |
||
766 | }).addTo(map); |
||
767 | <?php |
||
768 | } elseif ($globalMapProvider == 'MapQuest-OSM') { |
||
769 | ?> |
||
770 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
||
771 | maxZoom: 18, |
||
772 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
||
773 | '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>, ' + |
||
774 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
||
775 | }).addTo(map); |
||
776 | <?php |
||
777 | } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
||
778 | ?> |
||
779 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
||
780 | maxZoom: 18, |
||
781 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
||
782 | '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>, ' + |
||
783 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
||
784 | }).addTo(map); |
||
785 | <?php |
||
786 | } elseif ($globalMapProvider == 'Google-Roadmap') { |
||
787 | ?> |
||
788 | var googleLayer = new L.Google('ROADMAP'); |
||
789 | map.addLayer(googleLayer); |
||
790 | <?php |
||
791 | } elseif ($globalMapProvider == 'Google-Satellite') { |
||
792 | ?> |
||
793 | var googleLayer = new L.Google('SATELLITE'); |
||
794 | map.addLayer(googleLayer); |
||
795 | <?php |
||
796 | } elseif ($globalMapProvider == 'Google-Hybrid') { |
||
797 | ?> |
||
798 | var googleLayer = new L.Google('HYBRID'); |
||
799 | map.addLayer(googleLayer); |
||
800 | <?php |
||
801 | } elseif ($globalMapProvider == 'Google-Terrain') { |
||
802 | ?> |
||
803 | var googleLayer = new L.Google('Terrain'); |
||
804 | map.addLayer(googleLayer); |
||
805 | <?php |
||
806 | } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
||
807 | $customid = $globalMapProvider; |
||
808 | ?> |
||
809 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
||
810 | maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
||
811 | minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
||
812 | noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
||
813 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
||
814 | }).addTo(map); |
||
815 | <?php |
||
816 | //} elseif ($globalMapProvider == 'OpenStreetMap') { |
||
817 | } else { |
||
818 | ?> |
||
819 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
||
820 | maxZoom: 18, |
||
821 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
||
822 | '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>' |
||
823 | }).addTo(map); |
||
824 | |||
825 | <?php |
||
826 | } |
||
827 | ?> |
||
828 | </script> |
||
829 | </div> |
||
830 | <?php |
||
831 | } |
||
832 | |||
833 | ?> |
||
834 | |||
835 | <section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
||
836 |
If you suppress an error, we recommend checking for the error condition explicitly: