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