@@ -4,10 +4,15 @@ discard block |
||
4 | 4 | |
5 | 5 | setcookie("MapFormat",'2d'); |
6 | 6 | |
7 | -if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = ''; |
|
7 | +if (!isset($globalOpenWeatherMapKey)) { |
|
8 | + $globalOpenWeatherMapKey = ''; |
|
9 | +} |
|
8 | 10 | // Compressed GeoJson is used if true |
9 | -if (!isset($globalJsonCompress)) $compress = true; |
|
10 | -else $compress = $globalJsonCompress; |
|
11 | +if (!isset($globalJsonCompress)) { |
|
12 | + $compress = true; |
|
13 | +} else { |
|
14 | + $compress = $globalJsonCompress; |
|
15 | +} |
|
11 | 16 | if (isset($_GET['archive'])) { |
12 | 17 | $archive = true; |
13 | 18 | //$archiveupdatetime = 50; |
@@ -18,8 +23,11 @@ discard block |
||
18 | 23 | //$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10)); |
19 | 24 | //$lastupd = 20; |
20 | 25 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
21 | - if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
|
22 | - else $enddate = time(); |
|
26 | + if (isset($_GET['enddate']) && $_GET['enddate'] != '') { |
|
27 | + $enddate = $_GET['enddate']; |
|
28 | + } else { |
|
29 | + $enddate = time(); |
|
30 | + } |
|
23 | 31 | setcookie("archive_begin",$begindate); |
24 | 32 | setcookie("archive_end",$enddate); |
25 | 33 | setcookie("archive_update",$lastupd); |
@@ -109,7 +117,17 @@ discard block |
||
109 | 117 | } |
110 | 118 | |
111 | 119 | //create the map |
112 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
120 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
121 | + print $latitude; |
|
122 | +} else { |
|
123 | + print $globalCenterLatitude; |
|
124 | +} |
|
125 | +?>,<?php if (isset($longitude)) { |
|
126 | + print $longitude; |
|
127 | +} else { |
|
128 | + print $globalCenterLongitude; |
|
129 | +} |
|
130 | +?>], zoom); |
|
113 | 131 | <?php |
114 | 132 | } else { |
115 | 133 | if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) { |
@@ -135,9 +153,21 @@ discard block |
||
135 | 153 | || navigator.userAgent.match(/BlackBerry/i) |
136 | 154 | || navigator.userAgent.match(/Windows Phone/i)) |
137 | 155 | { |
138 | - var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
156 | + var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) { |
|
157 | + print $viewzoom-1; |
|
158 | +} elseif (isset($viewzoom)) { |
|
159 | + print $viewzoom; |
|
160 | +} else { |
|
161 | + print '8'; |
|
162 | +} |
|
163 | +?>; |
|
139 | 164 | } else { |
140 | - var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>; |
|
165 | + var zoom = <?php if (isset($viewzoom)) { |
|
166 | + print $viewzoom; |
|
167 | +} else { |
|
168 | + print '9'; |
|
169 | +} |
|
170 | +?>; |
|
141 | 171 | } |
142 | 172 | |
143 | 173 | //create the map |
@@ -163,16 +193,27 @@ discard block |
||
163 | 193 | bounds = L.latLngBounds(southWest,northEast); |
164 | 194 | //a few title layers |
165 | 195 | <?php |
166 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
167 | - else $MapType = $globalMapProvider; |
|
196 | + if (isset($_COOKIE['MapType'])) { |
|
197 | + $MapType = $_COOKIE['MapType']; |
|
198 | + } else { |
|
199 | + $MapType = $globalMapProvider; |
|
200 | + } |
|
168 | 201 | |
169 | 202 | if ($MapType == 'Mapbox') { |
170 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
171 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
172 | -?> |
|
203 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
204 | + $MapBoxId = $globalMapboxId; |
|
205 | + } else { |
|
206 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
207 | + } |
|
208 | + ?> |
|
173 | 209 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
174 | 210 | maxZoom: 18, |
175 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
211 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
212 | + print 'false'; |
|
213 | +} else { |
|
214 | + print 'true'; |
|
215 | +} |
|
216 | +?>, |
|
176 | 217 | attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>', |
177 | 218 | id: '<?php print $MapBoxId; ?>', |
178 | 219 | token: '<?php print $globalMapboxToken; ?>' |
@@ -191,7 +232,12 @@ discard block |
||
191 | 232 | ?> |
192 | 233 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
193 | 234 | maxZoom: 18, |
194 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
235 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
236 | + print 'false'; |
|
237 | +} else { |
|
238 | + print 'true'; |
|
239 | +} |
|
240 | +?>, |
|
195 | 241 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
196 | 242 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
197 | 243 | }).addTo(map); |
@@ -200,7 +246,12 @@ discard block |
||
200 | 246 | ?> |
201 | 247 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { |
202 | 248 | maxZoom: 18, |
203 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
249 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
250 | + print 'false'; |
|
251 | +} else { |
|
252 | + print 'true'; |
|
253 | +} |
|
254 | +?>, |
|
204 | 255 | attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' |
205 | 256 | }).addTo(map); |
206 | 257 | <?php |
@@ -208,7 +259,12 @@ discard block |
||
208 | 259 | ?> |
209 | 260 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', { |
210 | 261 | maxZoom: 18, |
211 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
262 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
263 | + print 'false'; |
|
264 | +} else { |
|
265 | + print 'true'; |
|
266 | +} |
|
267 | +?>, |
|
212 | 268 | attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' |
213 | 269 | }).addTo(map); |
214 | 270 | <?php |
@@ -216,7 +272,12 @@ discard block |
||
216 | 272 | ?> |
217 | 273 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', { |
218 | 274 | maxZoom: 18, |
219 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
275 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
276 | + print 'false'; |
|
277 | +} else { |
|
278 | + print 'true'; |
|
279 | +} |
|
280 | +?>, |
|
220 | 281 | attribution: 'Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC' |
221 | 282 | }).addTo(map); |
222 | 283 | <?php |
@@ -261,20 +322,26 @@ discard block |
||
261 | 322 | map.addLayer(yandexLayer); |
262 | 323 | <?php |
263 | 324 | } elseif ($MapType == 'Bing-Aerial') { |
264 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
265 | -?> |
|
325 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
326 | + setcookie('MapType','OpenStreetMap'); |
|
327 | + } |
|
328 | + ?> |
|
266 | 329 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
267 | 330 | map.addLayer(bingLayer); |
268 | 331 | <?php |
269 | 332 | } elseif ($MapType == 'Bing-Hybrid') { |
270 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
271 | -?> |
|
333 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
334 | + setcookie('MapType','OpenStreetMap'); |
|
335 | + } |
|
336 | + ?> |
|
272 | 337 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
273 | 338 | map.addLayer(bingLayer); |
274 | 339 | <?php |
275 | 340 | } elseif ($MapType == 'Bing-Road') { |
276 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
277 | -?> |
|
341 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
342 | + setcookie('MapType','OpenStreetMap'); |
|
343 | + } |
|
344 | + ?> |
|
278 | 345 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
279 | 346 | map.addLayer(bingLayer); |
280 | 347 | <?php |
@@ -303,7 +370,12 @@ discard block |
||
303 | 370 | maxZoom: 5, |
304 | 371 | tms : true, |
305 | 372 | zindex : 3, |
306 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
373 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
374 | + print 'false'; |
|
375 | +} else { |
|
376 | + print 'true'; |
|
377 | +} |
|
378 | +?>, |
|
307 | 379 | attribution: 'Natural Earth' |
308 | 380 | }).addTo(map); |
309 | 381 | <?php |
@@ -311,9 +383,24 @@ discard block |
||
311 | 383 | $customid = $MapType; |
312 | 384 | ?> |
313 | 385 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
314 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
315 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
316 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
386 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
387 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
388 | +} else { |
|
389 | + print '18'; |
|
390 | +} |
|
391 | +?>, |
|
392 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
393 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
394 | +} else { |
|
395 | + print '0'; |
|
396 | +} |
|
397 | +?>, |
|
398 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
399 | + print 'false'; |
|
400 | +} else { |
|
401 | + print 'true'; |
|
402 | +} |
|
403 | +?>, |
|
317 | 404 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
318 | 405 | }).addTo(map); |
319 | 406 | |
@@ -353,7 +440,12 @@ discard block |
||
353 | 440 | } |
354 | 441 | } elseif ($globalBounding == 'circle') { |
355 | 442 | ?> |
356 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
443 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
444 | + print $globalBoundingCircleSize; |
|
445 | +} else { |
|
446 | + print '70000'; |
|
447 | +} |
|
448 | +?>,{ |
|
357 | 449 | color: '#92C7D1', |
358 | 450 | fillColor: '#92C7D1', |
359 | 451 | fillOpacity: 0.3, |
@@ -445,7 +537,12 @@ discard block |
||
445 | 537 | if (!isset($archive) || $archive === false) { |
446 | 538 | ?> |
447 | 539 | update_locationsLayer(); |
448 | -setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
540 | +setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) { |
|
541 | + print $globalMapRefresh*1000*2; |
|
542 | +} else { |
|
543 | + print '60000'; |
|
544 | +} |
|
545 | +?>); |
|
449 | 546 | <?php |
450 | 547 | } |
451 | 548 | ?> |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | require_once('require/class.Satellite.php'); |
6 | 6 | |
7 | -$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING); |
|
7 | +$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($trackident != '') { |
9 | 9 | require_once('require/class.SpotterLive.php'); |
10 | 10 | $SpotterLive = new SpotterLive(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident); |
15 | 15 | header('Location: '.$globalURL.'/flightid/'.$spotterid); |
16 | 16 | } else { |
17 | - setcookie('MapTrack',$resulttrackident[0]['flightaware_id']); |
|
17 | + setcookie('MapTrack', $resulttrackident[0]['flightaware_id']); |
|
18 | 18 | } |
19 | 19 | /* |
20 | 20 | } else { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | <div class="form-group"> |
198 | 198 | <label><?php echo _("From:"); ?></label> |
199 | 199 | <div class='input-group date' id='datetimepicker1'> |
200 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
200 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i", $_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
201 | 201 | <span class="input-group-addon"> |
202 | 202 | <span class="glyphicon glyphicon-calendar"></span> |
203 | 203 | </span> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | <div class="form-group"> |
207 | 207 | <label><?php echo _("To:"); ?></label> |
208 | 208 | <div class='input-group date' id='datetimepicker2'> |
209 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
209 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i", $_COOKIE['archive_end']).' UTC'; ?>" /> |
|
210 | 210 | <span class="input-group-addon"> |
211 | 211 | <span class="glyphicon glyphicon-calendar"></span> |
212 | 212 | </span> |
@@ -354,9 +354,9 @@ discard block |
||
354 | 354 | <li><?php echo _("Type of Terrain:"); ?> |
355 | 355 | <select class="selectpicker" onchange="terrainType(this);"> |
356 | 356 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
357 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
358 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
359 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected'; ?>>ArticDEM</option> |
|
360 | 360 | </select> |
361 | 361 | </li> |
362 | 362 | <?php |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
412 | 412 | <?php |
413 | 413 | } |
414 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
414 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
415 | 415 | ?> |
416 | 416 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
417 | 417 | <?php |
@@ -586,10 +586,10 @@ discard block |
||
586 | 586 | $Spotter = new Spotter(); |
587 | 587 | $allairlinenames = $Spotter->getAllAirlineNames(); |
588 | 588 | } |
589 | - foreach($allairlinenames as $airline) { |
|
589 | + foreach ($allairlinenames as $airline) { |
|
590 | 590 | $airline_name = $airline['airline_name']; |
591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
592 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
591 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
592 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
593 | 593 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
594 | 594 | } else { |
595 | 595 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
609 | 609 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
610 | 610 | <?php |
611 | - foreach($allalliancenames as $alliance) { |
|
611 | + foreach ($allalliancenames as $alliance) { |
|
612 | 612 | $alliance_name = $alliance['alliance']; |
613 | 613 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
614 | 614 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -644,8 +644,8 @@ discard block |
||
644 | 644 | */ |
645 | 645 | $Source = new Source(); |
646 | 646 | $datasource = $Source->getLocationInfoByType('gs'); |
647 | - foreach($datasource as $src) { |
|
648 | - if (isset($_COOKIE['filter_Sources']) && in_array($src['name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
647 | + foreach ($datasource as $src) { |
|
648 | + if (isset($_COOKIE['filter_Sources']) && in_array($src['name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
649 | 649 | echo '<option value="'.$src['name'].'" selected>'.$src['name'].'</option>'; |
650 | 650 | } else { |
651 | 651 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
734 | 734 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
735 | 735 | |
736 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
736 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
737 | 737 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
738 | 738 | } else { |
739 | 739 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
@@ -51,7 +51,10 @@ discard block |
||
51 | 51 | <?php |
52 | 52 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
53 | 53 | ?> |
54 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
54 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
55 | + print '?tsk='.$tsk; |
|
56 | +} |
|
57 | +?>"></script> |
|
55 | 58 | <?php |
56 | 59 | if (!isset($globalAircraft) || $globalAircraft) { |
57 | 60 | ?> |
@@ -141,8 +144,14 @@ discard block |
||
141 | 144 | ?> |
142 | 145 | <form> |
143 | 146 | <ul> |
144 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
145 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
147 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
148 | + print 'checked'; |
|
149 | +} |
|
150 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
151 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
152 | + print 'checked'; |
|
153 | +} |
|
154 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
146 | 155 | </ul> |
147 | 156 | </form> |
148 | 157 | <?php |
@@ -150,8 +159,14 @@ discard block |
||
150 | 159 | ?> |
151 | 160 | <form> |
152 | 161 | <ul> |
153 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
154 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
162 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
163 | + print 'checked'; |
|
164 | +} |
|
165 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
166 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
167 | + print 'checked'; |
|
168 | +} |
|
169 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
155 | 170 | </ul> |
156 | 171 | <p>This layers are in Beta, this can and will crash.</p> |
157 | 172 | </form> |
@@ -162,14 +177,32 @@ discard block |
||
162 | 177 | <h1>NOTAM</h1> |
163 | 178 | <form> |
164 | 179 | <ul> |
165 | - <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
180 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
181 | + print 'checked'; |
|
182 | +} |
|
183 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
166 | 184 | <li><?php echo _("NOTAM scope:"); ?> |
167 | 185 | <select class="selectpicker" onchange="notamscope(this);"> |
168 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
169 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
170 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
171 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
172 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
186 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
187 | + print ' selected'; |
|
188 | +} |
|
189 | +?>>All</option> |
|
190 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
191 | + print ' selected'; |
|
192 | +} |
|
193 | +?>>Airport/Enroute warning</option> |
|
194 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
195 | + print ' selected'; |
|
196 | +} |
|
197 | +?>>Airport warning</option> |
|
198 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
199 | + print ' selected'; |
|
200 | +} |
|
201 | +?>>Navigation warning</option> |
|
202 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
203 | + print ' selected'; |
|
204 | +} |
|
205 | +?>>Enroute warning</option> |
|
173 | 206 | </select |
174 | 207 | </li> |
175 | 208 | </ul> |
@@ -197,7 +230,10 @@ discard block |
||
197 | 230 | <div class="form-group"> |
198 | 231 | <label><?php echo _("From:"); ?></label> |
199 | 232 | <div class='input-group date' id='datetimepicker1'> |
200 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
233 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
234 | + print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; |
|
235 | +} |
|
236 | +?>" required /> |
|
201 | 237 | <span class="input-group-addon"> |
202 | 238 | <span class="glyphicon glyphicon-calendar"></span> |
203 | 239 | </span> |
@@ -206,7 +242,10 @@ discard block |
||
206 | 242 | <div class="form-group"> |
207 | 243 | <label><?php echo _("To:"); ?></label> |
208 | 244 | <div class='input-group date' id='datetimepicker2'> |
209 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
245 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') { |
|
246 | + print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; |
|
247 | +} |
|
248 | +?>" /> |
|
210 | 249 | <span class="input-group-addon"> |
211 | 250 | <span class="glyphicon glyphicon-calendar"></span> |
212 | 251 | </span> |
@@ -238,8 +277,20 @@ discard block |
||
238 | 277 | </script> |
239 | 278 | <li><?php echo _("Playback speed:"); ?> |
240 | 279 | <div class="range"> |
241 | - <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
242 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
280 | + <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
281 | + print $_POST['archivespeed']; |
|
282 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
283 | + print $_COOKIE['archive_speed']; |
|
284 | +} else { |
|
285 | + print '1'; |
|
286 | +} |
|
287 | +?>"> |
|
288 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
289 | + print $_COOKIE['archive_speed']; |
|
290 | +} else { |
|
291 | + print '1'; |
|
292 | +} |
|
293 | +?></output> |
|
243 | 294 | </div> |
244 | 295 | </li> |
245 | 296 | <li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li> |
@@ -258,29 +309,53 @@ discard block |
||
258 | 309 | <li><?php echo _("Type of Map:"); ?> |
259 | 310 | <select class="selectpicker" onchange="mapType(this);"> |
260 | 311 | <?php |
261 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
262 | - else $MapType = $_COOKIE['MapType']; |
|
312 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
313 | + $MapType = $globalMapProvider; |
|
314 | + } else { |
|
315 | + $MapType = $_COOKIE['MapType']; |
|
316 | + } |
|
263 | 317 | ?> |
264 | 318 | <?php |
265 | 319 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
266 | 320 | ?> |
267 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
321 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Natural Earth (local)</option> |
|
268 | 325 | <?php |
269 | 326 | } else { |
270 | 327 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
271 | 328 | ?> |
272 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
329 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
330 | + print ' selected'; |
|
331 | +} |
|
332 | +?>>Natural Earth (local)</option> |
|
273 | 333 | <?php |
274 | 334 | } |
275 | 335 | ?> |
276 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
277 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
336 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
337 | + print ' selected'; |
|
338 | +} |
|
339 | +?>>ArcGIS Streetmap</option> |
|
340 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
341 | + print ' selected'; |
|
342 | +} |
|
343 | +?>>ArcGIS Satellite</option> |
|
278 | 344 | <?php |
279 | 345 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
280 | 346 | ?> |
281 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
282 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
283 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
347 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
348 | + print ' selected'; |
|
349 | +} |
|
350 | +?>>Bing-Aerial</option> |
|
351 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
352 | + print ' selected'; |
|
353 | +} |
|
354 | +?>>Bing-Hybrid</option> |
|
355 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
356 | + print ' selected'; |
|
357 | +} |
|
358 | +?>>Bing-Road</option> |
|
284 | 359 | <?php |
285 | 360 | } |
286 | 361 | ?> |
@@ -290,59 +365,143 @@ discard block |
||
290 | 365 | <?php |
291 | 366 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
292 | 367 | ?> |
293 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
294 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
295 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
368 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
369 | + print ' selected'; |
|
370 | +} |
|
371 | +?>>Here-Aerial</option> |
|
372 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
373 | + print ' selected'; |
|
374 | +} |
|
375 | +?>>Here-Hybrid</option> |
|
376 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
377 | + print ' selected'; |
|
378 | +} |
|
379 | +?>>Here-Road</option> |
|
296 | 380 | <?php |
297 | 381 | } |
298 | 382 | ?> |
299 | 383 | <?php |
300 | 384 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
301 | 385 | ?> |
302 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
303 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
304 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
305 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
386 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
387 | + print ' selected'; |
|
388 | +} |
|
389 | +?>>Google Roadmap</option> |
|
390 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
391 | + print ' selected'; |
|
392 | +} |
|
393 | +?>>Google Satellite</option> |
|
394 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
395 | + print ' selected'; |
|
396 | +} |
|
397 | +?>>Google Hybrid</option> |
|
398 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
399 | + print ' selected'; |
|
400 | +} |
|
401 | +?>>Google Terrain</option> |
|
306 | 402 | <?php |
307 | 403 | } |
308 | 404 | ?> |
309 | 405 | <?php |
310 | 406 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
311 | 407 | ?> |
312 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
313 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
314 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
408 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
409 | + print ' selected'; |
|
410 | +} |
|
411 | +?>>MapQuest-OSM</option> |
|
412 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
413 | + print ' selected'; |
|
414 | +} |
|
415 | +?>>MapQuest-Aerial</option> |
|
416 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>MapQuest-Hybrid</option> |
|
315 | 420 | <?php |
316 | 421 | } |
317 | 422 | ?> |
318 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
319 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
423 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
424 | + print ' selected'; |
|
425 | +} |
|
426 | +?>>Yandex</option> |
|
427 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>Natural Earth</option> |
|
320 | 431 | <?php |
321 | 432 | } |
322 | 433 | ?> |
323 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
434 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
435 | + print ' selected'; |
|
436 | +} |
|
437 | +?>>National Geographic Street</option> |
|
324 | 438 | <?php |
325 | 439 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
326 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
327 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
440 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
441 | + $MapBoxId = 'default'; |
|
442 | + } else { |
|
443 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
444 | + } |
|
328 | 445 | ?> |
329 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
330 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
331 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
332 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
333 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
334 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
335 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
336 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
337 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
338 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
339 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
340 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
341 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
446 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
447 | + print ' selected'; |
|
448 | +} |
|
449 | +?>>Mapbox GL</option> |
|
450 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
451 | + print ' selected'; |
|
452 | +} |
|
453 | +?>>Mapbox default</option> |
|
454 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
455 | + print ' selected'; |
|
456 | +} |
|
457 | +?>>Mapbox streets</option> |
|
458 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
459 | + print ' selected'; |
|
460 | +} |
|
461 | +?>>Mapbox light</option> |
|
462 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
463 | + print ' selected'; |
|
464 | +} |
|
465 | +?>>Mapbox dark</option> |
|
466 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
467 | + print ' selected'; |
|
468 | +} |
|
469 | +?>>Mapbox satellite</option> |
|
470 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
471 | + print ' selected'; |
|
472 | +} |
|
473 | +?>>Mapbox streets-satellite</option> |
|
474 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
475 | + print ' selected'; |
|
476 | +} |
|
477 | +?>>Mapbox streets-basic</option> |
|
478 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
479 | + print ' selected'; |
|
480 | +} |
|
481 | +?>>Mapbox comic</option> |
|
482 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
483 | + print ' selected'; |
|
484 | +} |
|
485 | +?>>Mapbox outdoors</option> |
|
486 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
487 | + print ' selected'; |
|
488 | +} |
|
489 | +?>>Mapbox pencil</option> |
|
490 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
491 | + print ' selected'; |
|
492 | +} |
|
493 | +?>>Mapbox pirates</option> |
|
494 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
495 | + print ' selected'; |
|
496 | +} |
|
497 | +?>>Mapbox emerald</option> |
|
342 | 498 | <?php |
343 | 499 | } |
344 | 500 | ?> |
345 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
501 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
502 | + print ' selected'; |
|
503 | +} |
|
504 | +?>>OpenStreetMap</option> |
|
346 | 505 | <?php |
347 | 506 | } |
348 | 507 | ?> |
@@ -353,10 +512,22 @@ discard block |
||
353 | 512 | ?> |
354 | 513 | <li><?php echo _("Type of Terrain:"); ?> |
355 | 514 | <select class="selectpicker" onchange="terrainType(this);"> |
356 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
515 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
516 | + print ' selected'; |
|
517 | +} |
|
518 | +?>>stk terrain</option> |
|
519 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
520 | + print ' selected'; |
|
521 | +} |
|
522 | +?>>ellipsoid</option> |
|
523 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
524 | + print ' selected'; |
|
525 | +} |
|
526 | +?>>vr terrain</option> |
|
527 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
528 | + print ' selected'; |
|
529 | +} |
|
530 | +?>>ArticDEM</option> |
|
360 | 531 | </select> |
361 | 532 | </li> |
362 | 533 | <?php |
@@ -365,50 +536,98 @@ discard block |
||
365 | 536 | <?php |
366 | 537 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
367 | 538 | ?> |
368 | - <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
539 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
540 | + print 'checked'; |
|
541 | +} |
|
542 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
369 | 543 | |
370 | 544 | <?php |
371 | 545 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
372 | 546 | ?> |
373 | - <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
374 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
375 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
376 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
377 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
547 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
548 | + print 'checked'; |
|
549 | +} |
|
550 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
551 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
552 | + print 'checked'; |
|
553 | +} |
|
554 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
555 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) { |
|
556 | + print 'checked'; |
|
557 | +} |
|
558 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
559 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
560 | + print 'checked'; |
|
561 | +} |
|
562 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
563 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
564 | + print 'checked'; |
|
565 | +} |
|
566 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
378 | 567 | <?php |
379 | 568 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
380 | 569 | ?> |
381 | - <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
570 | + <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) { |
|
571 | + print 'checked'; |
|
572 | +} |
|
573 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
382 | 574 | <?php |
383 | 575 | } |
384 | 576 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
385 | 577 | ?> |
386 | - <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
578 | + <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
579 | + print 'checked'; |
|
580 | +} |
|
581 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
387 | 582 | <?php |
388 | 583 | } |
389 | 584 | } |
390 | 585 | ?> |
391 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
392 | - <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
393 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
394 | - <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
586 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) { |
|
587 | + print 'checked'; |
|
588 | +} |
|
589 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
590 | + <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) { |
|
591 | + print 'checked'; |
|
592 | +} |
|
593 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
594 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
595 | + print 'checked'; |
|
596 | +} |
|
597 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
598 | + <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
599 | + print 'checked'; |
|
600 | +} |
|
601 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
395 | 602 | <?php |
396 | 603 | if (isset($globalFires)) { |
397 | 604 | ?> |
398 | - <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
605 | + <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) { |
|
606 | + print 'checked'; |
|
607 | +} |
|
608 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
399 | 609 | <?php |
400 | 610 | } |
401 | 611 | if (isset($globalMap3D) && $globalMap3D) { |
402 | 612 | ?> |
403 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
613 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') { |
|
614 | + print 'checked'; |
|
615 | +} |
|
616 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
404 | 617 | <?php |
405 | 618 | } |
406 | 619 | ?> |
407 | 620 | <?php |
408 | 621 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
409 | 622 | ?> |
410 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
411 | - <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
623 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
624 | + print 'checked'; |
|
625 | +} |
|
626 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
627 | + <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) { |
|
628 | + print 'checked'; |
|
629 | +} |
|
630 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
412 | 631 | <?php |
413 | 632 | } |
414 | 633 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -421,17 +640,25 @@ discard block |
||
421 | 640 | if (function_exists('array_column')) { |
422 | 641 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
423 | 642 | ?> |
424 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
643 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
644 | + print 'checked'; |
|
645 | +} |
|
646 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
425 | 647 | <?php |
426 | 648 | } |
427 | 649 | } elseif (isset($globalSources)) { |
428 | 650 | $dispolar = false; |
429 | 651 | foreach ($globalSources as $testsource) { |
430 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
652 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
653 | + $dispolar = true; |
|
654 | + } |
|
431 | 655 | } |
432 | 656 | if ($dispolar) { |
433 | 657 | ?> |
434 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
658 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
659 | + print 'checked'; |
|
660 | +} |
|
661 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
435 | 662 | <?php |
436 | 663 | } |
437 | 664 | } |
@@ -444,11 +671,21 @@ discard block |
||
444 | 671 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
445 | 672 | if (extension_loaded('gd') && function_exists('gd_info')) { |
446 | 673 | ?> |
447 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
674 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
675 | + print 'checked'; |
|
676 | +} |
|
677 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
448 | 678 | <?php |
449 | 679 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
450 | 680 | ?> |
451 | - <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li> |
|
681 | + <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
682 | + print $_COOKIE['IconColor']; |
|
683 | +} elseif (isset($globalAircraftIconColor)) { |
|
684 | + print $globalAircraftIconColor; |
|
685 | +} else { |
|
686 | + print '1a3151'; |
|
687 | +} |
|
688 | +?>"></li> |
|
452 | 689 | <?php |
453 | 690 | } |
454 | 691 | } |
@@ -459,7 +696,14 @@ discard block |
||
459 | 696 | if (extension_loaded('gd') && function_exists('gd_info')) { |
460 | 697 | ?> |
461 | 698 | <li><?php echo _("Marine icon color:"); ?> |
462 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
|
699 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
700 | + print $_COOKIE['MarineIconColor']; |
|
701 | +} elseif (isset($globalMarineIconColor)) { |
|
702 | + print $globalMarineIconColor; |
|
703 | +} else { |
|
704 | + print '1a3151'; |
|
705 | +} |
|
706 | +?>"> |
|
463 | 707 | </li> |
464 | 708 | <?php |
465 | 709 | } |
@@ -470,7 +714,14 @@ discard block |
||
470 | 714 | if (extension_loaded('gd') && function_exists('gd_info')) { |
471 | 715 | ?> |
472 | 716 | <li><?php echo _("Tracker icon color:"); ?> |
473 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
|
717 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
718 | + print $_COOKIE['TrackerIconColor']; |
|
719 | +} elseif (isset($globalTrackerIconColor)) { |
|
720 | + print $globalTrackerIconColor; |
|
721 | +} else { |
|
722 | + print '1a3151'; |
|
723 | +} |
|
724 | +?>"> |
|
474 | 725 | </li> |
475 | 726 | <?php |
476 | 727 | } |
@@ -481,8 +732,22 @@ discard block |
||
481 | 732 | ?> |
482 | 733 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
483 | 734 | <div class="range"> |
484 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
485 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
735 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
736 | + print $_COOKIE['AirportZoom']; |
|
737 | +} elseif (isset($globalAirportZoom)) { |
|
738 | + print $globalAirportZoom; |
|
739 | +} else { |
|
740 | + print '7'; |
|
741 | +} |
|
742 | +?>"> |
|
743 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
744 | + print $_COOKIE['AirportZoom']; |
|
745 | +} elseif (isset($globalAirportZoom)) { |
|
746 | + print $globalAirportZoom; |
|
747 | +} else { |
|
748 | + print '7'; |
|
749 | +} |
|
750 | +?></output> |
|
486 | 751 | </div> |
487 | 752 | </li> |
488 | 753 | <?php |
@@ -494,10 +759,23 @@ discard block |
||
494 | 759 | <?php |
495 | 760 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
496 | 761 | ?> |
497 | - <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> ><?php echo _("Use airlines liveries"); ?></li> |
|
498 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?> |
|
762 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
763 | + print 'checked'; |
|
764 | +} |
|
765 | +?> ><?php echo _("Use airlines liveries"); ?></li> |
|
766 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
767 | + print 'checked'; |
|
768 | +} |
|
769 | +?> ><?php echo _("Force Aircraft color"); ?> |
|
499 | 770 | <!--<li><?php echo _("Aircraft icon color:"); ?>--> |
500 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print 'ff0000'; ?>"> |
|
771 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
772 | + print $_COOKIE['IconColor']; |
|
773 | +} elseif (isset($globalAircraftIconColor)) { |
|
774 | + print $globalAircraftIconColor; |
|
775 | +} else { |
|
776 | + print 'ff0000'; |
|
777 | +} |
|
778 | +?>"> |
|
501 | 779 | </li> |
502 | 780 | <?php |
503 | 781 | } |
@@ -505,9 +783,19 @@ discard block |
||
505 | 783 | <?php |
506 | 784 | if (isset($globalMarine) && $globalMarine === TRUE) { |
507 | 785 | ?> |
508 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?> |
|
786 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
787 | + print 'checked'; |
|
788 | +} |
|
789 | +?> ><?php echo _("Force Marine color"); ?> |
|
509 | 790 | <!--<li><?php echo _("Marine icon color:"); ?>--> |
510 | - <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>"> |
|
791 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
792 | + print $_COOKIE['MarineIconColor']; |
|
793 | +} elseif (isset($globalMarineIconColor)) { |
|
794 | + print $globalMarineIconColor; |
|
795 | +} else { |
|
796 | + print 'ff0000'; |
|
797 | +} |
|
798 | +?>"> |
|
511 | 799 | </li> |
512 | 800 | <?php |
513 | 801 | } |
@@ -515,9 +803,19 @@ discard block |
||
515 | 803 | <?php |
516 | 804 | if (isset($globalTracker) && $globalTracker === TRUE) { |
517 | 805 | ?> |
518 | - <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?> |
|
806 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
807 | + print 'checked'; |
|
808 | +} |
|
809 | +?> ><?php echo _("Force Tracker color"); ?> |
|
519 | 810 | <!--<li><?php echo _("Tracker icon color:"); ?>--> |
520 | - <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>"> |
|
811 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
812 | + print $_COOKIE['TrackerIconColor']; |
|
813 | +} elseif (isset($globalTrackerIconColor)) { |
|
814 | + print $globalTrackerIconColor; |
|
815 | +} else { |
|
816 | + print 'ff0000'; |
|
817 | +} |
|
818 | +?>"> |
|
521 | 819 | </li> |
522 | 820 | <?php |
523 | 821 | } |
@@ -525,22 +823,46 @@ discard block |
||
525 | 823 | ?> |
526 | 824 | <li><?php echo _("Distance unit:"); ?> |
527 | 825 | <select class="selectpicker" onchange="unitdistance(this);"> |
528 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
529 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
530 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
826 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
827 | + echo ' selected'; |
|
828 | +} |
|
829 | +?>>km</option> |
|
830 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
831 | + echo ' selected'; |
|
832 | +} |
|
833 | +?>>nm</option> |
|
834 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
835 | + echo ' selected'; |
|
836 | +} |
|
837 | +?>>mi</option> |
|
531 | 838 | </select> |
532 | 839 | </li> |
533 | 840 | <li><?php echo _("Altitude unit:"); ?> |
534 | 841 | <select class="selectpicker" onchange="unitaltitude(this);"> |
535 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
536 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
842 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
843 | + echo ' selected'; |
|
844 | +} |
|
845 | +?>>m</option> |
|
846 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
847 | + echo ' selected'; |
|
848 | +} |
|
849 | +?>>feet</option> |
|
537 | 850 | </select> |
538 | 851 | </li> |
539 | 852 | <li><?php echo _("Speed unit:"); ?> |
540 | 853 | <select class="selectpicker" onchange="unitspeed(this);"> |
541 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
542 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
543 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
854 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
855 | + echo ' selected'; |
|
856 | +} |
|
857 | +?>>km/h</option> |
|
858 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
859 | + echo ' selected'; |
|
860 | +} |
|
861 | +?>>mph</option> |
|
862 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
863 | + echo ' selected'; |
|
864 | +} |
|
865 | +?>>knots</option> |
|
544 | 866 | </select> |
545 | 867 | </li> |
546 | 868 | |
@@ -558,9 +880,18 @@ discard block |
||
558 | 880 | <?php |
559 | 881 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
560 | 882 | ?> |
561 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
562 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
563 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
883 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
884 | + print 'checked'; |
|
885 | +} |
|
886 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
887 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
888 | + print 'checked'; |
|
889 | +} |
|
890 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
891 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
892 | + print 'checked'; |
|
893 | +} |
|
894 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
564 | 895 | <?php |
565 | 896 | } |
566 | 897 | ?> |
@@ -568,10 +899,16 @@ discard block |
||
568 | 899 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
569 | 900 | ?> |
570 | 901 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
571 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
902 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
903 | + print 'checked'; |
|
904 | +} |
|
905 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
572 | 906 | <?php } ?> |
573 | 907 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
574 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
908 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
909 | + print 'checked'; |
|
910 | +} |
|
911 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
575 | 912 | <?php } ?> |
576 | 913 | <?php |
577 | 914 | } |
@@ -588,7 +925,9 @@ discard block |
||
588 | 925 | } |
589 | 926 | foreach($allairlinenames as $airline) { |
590 | 927 | $airline_name = $airline['airline_name']; |
591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
928 | + if (strlen($airline_name) > 30) { |
|
929 | + $airline_name = substr($airline_name,0,30).'...'; |
|
930 | + } |
|
592 | 931 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
593 | 932 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
594 | 933 | } else { |
@@ -606,7 +945,10 @@ discard block |
||
606 | 945 | <li><?php echo _("Display alliance:"); ?> |
607 | 946 | <br/> |
608 | 947 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
609 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
948 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
949 | + echo ' selected'; |
|
950 | +} |
|
951 | +?>><?php echo _("All"); ?></option> |
|
610 | 952 | <?php |
611 | 953 | foreach($allalliancenames as $alliance) { |
612 | 954 | $alliance_name = $alliance['alliance']; |
@@ -665,10 +1007,22 @@ discard block |
||
665 | 1007 | ?> |
666 | 1008 | <li><?php echo _("Display airlines of type:"); ?><br/> |
667 | 1009 | <select class="selectpicker" onchange="airlinestype(this);"> |
668 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
669 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
670 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
671 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
1010 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
1011 | + echo ' selected'; |
|
1012 | +} |
|
1013 | +?>><?php echo _("All"); ?></option> |
|
1014 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
1015 | + echo ' selected'; |
|
1016 | +} |
|
1017 | +?>><?php echo _("Passenger"); ?></option> |
|
1018 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
1019 | + echo ' selected'; |
|
1020 | +} |
|
1021 | +?>><?php echo _("Cargo"); ?></option> |
|
1022 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
1023 | + echo ' selected'; |
|
1024 | +} |
|
1025 | +?>><?php echo _("Military"); ?></option> |
|
672 | 1026 | </select> |
673 | 1027 | </li> |
674 | 1028 | <?php |
@@ -682,14 +1036,20 @@ discard block |
||
682 | 1036 | ?> |
683 | 1037 | <li> |
684 | 1038 | <?php echo _("Display vessels with MMSI:"); ?> |
685 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
1039 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
1040 | + print $_COOKIE['filter_mmsi']; |
|
1041 | +} |
|
1042 | +?>" /> |
|
686 | 1043 | </li> |
687 | 1044 | <?php |
688 | 1045 | } |
689 | 1046 | ?> |
690 | 1047 | <li> |
691 | 1048 | <?php echo _("Display with ident:"); ?> |
692 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
1049 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
1050 | + print $_COOKIE['filter_ident']; |
|
1051 | +} |
|
1052 | +?>" /> |
|
693 | 1053 | </li> |
694 | 1054 | </ul> |
695 | 1055 | </form> |
@@ -705,7 +1065,10 @@ discard block |
||
705 | 1065 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
706 | 1066 | <form> |
707 | 1067 | <ul> |
708 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
1068 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) { |
|
1069 | + print 'checked'; |
|
1070 | +} |
|
1071 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
709 | 1072 | <li><?php echo _("Type:"); ?> |
710 | 1073 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
711 | 1074 | <?php |
@@ -713,25 +1076,45 @@ discard block |
||
713 | 1076 | $types = $Satellite->get_tle_types(); |
714 | 1077 | foreach ($types as $type) { |
715 | 1078 | $type_name = $type['tle_type']; |
716 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
717 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
718 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
719 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
720 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
721 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
722 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
723 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
724 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
725 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
726 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
727 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
728 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
729 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
730 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
731 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
732 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
733 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
734 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
1079 | + if ($type_name == 'musson') { |
|
1080 | + $type_name = 'Russian LEO Navigation'; |
|
1081 | + } else if ($type_name == 'nnss') { |
|
1082 | + $type_name = 'Navi Navigation Satellite System'; |
|
1083 | + } else if ($type_name == 'sbas') { |
|
1084 | + $type_name = 'Satellite-Based Augmentation System'; |
|
1085 | + } else if ($type_name == 'glo-ops') { |
|
1086 | + $type_name = 'Glonass Operational'; |
|
1087 | + } else if ($type_name == 'gps-ops') { |
|
1088 | + $type_name = 'GPS Operational'; |
|
1089 | + } else if ($type_name == 'argos') { |
|
1090 | + $type_name = 'ARGOS Data Collection System'; |
|
1091 | + } else if ($type_name == 'tdrss') { |
|
1092 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
1093 | + } else if ($type_name == 'sarsat') { |
|
1094 | + $type_name = 'Search & Rescue'; |
|
1095 | + } else if ($type_name == 'dmc') { |
|
1096 | + $type_name = 'Disaster Monitoring'; |
|
1097 | + } else if ($type_name == 'resource') { |
|
1098 | + $type_name = 'Earth Resources'; |
|
1099 | + } else if ($type_name == 'stations') { |
|
1100 | + $type_name = 'Space Stations'; |
|
1101 | + } else if ($type_name == 'geo') { |
|
1102 | + $type_name = 'Geostationary'; |
|
1103 | + } else if ($type_name == 'amateur') { |
|
1104 | + $type_name = 'Amateur Radio'; |
|
1105 | + } else if ($type_name == 'x-comm') { |
|
1106 | + $type_name = 'Experimental'; |
|
1107 | + } else if ($type_name == 'other-comm') { |
|
1108 | + $type_name = 'Other Comm'; |
|
1109 | + } else if ($type_name == 'science') { |
|
1110 | + $type_name = 'Space & Earth Science'; |
|
1111 | + } else if ($type_name == 'military') { |
|
1112 | + $type_name = 'Miscellaneous Military'; |
|
1113 | + } else if ($type_name == 'radar') { |
|
1114 | + $type_name = 'Radar Calibration'; |
|
1115 | + } else if ($type_name == 'tle-new') { |
|
1116 | + $type_name = 'Last 30 days launches'; |
|
1117 | + } |
|
735 | 1118 | |
736 | 1119 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
737 | 1120 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $s3 = sin($bank/2); |
60 | 60 | $c1c2 = $c1*$c2; |
61 | 61 | $s1s2 = $s1*$s2; |
62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
62 | + $w = $c1c2*$c3 - $s1s2*$s3; |
|
63 | + $x = $c1c2*$s3 + $s1s2*$c3; |
|
64 | + $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | + $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | + return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
68 | 68 | |
69 | 69 | } |
@@ -84,17 +84,17 @@ discard block |
||
84 | 84 | $min = false; |
85 | 85 | $allhistory = false; |
86 | 86 | $filter['source'] = array(); |
87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
87 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
88 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
89 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
90 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
91 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
92 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
93 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
94 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
95 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
96 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
97 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
98 | 98 | /* |
99 | 99 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
100 | 100 | $min = true; |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | $from_archive = true; |
142 | 142 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
143 | 143 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
144 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
145 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
146 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
147 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
148 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
149 | - $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
144 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
145 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
146 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
147 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
148 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
149 | + $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
150 | 150 | } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
151 | 151 | $from_archive = true; |
152 | 152 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
@@ -162,55 +162,55 @@ discard block |
||
162 | 162 | } |
163 | 163 | $enddate = $_COOKIE['archive_end']; |
164 | 164 | $enddateinitial = $_COOKIE['archive_end']; |
165 | - $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
166 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
167 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
165 | + $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
166 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
167 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
168 | 168 | //echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
169 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
169 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
170 | 170 | } elseif ($tracker) { |
171 | 171 | $coord = array(); |
172 | 172 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
173 | - $coord = explode(',',$_GET['coord']); |
|
174 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
173 | + $coord = explode(',', $_GET['coord']); |
|
174 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
175 | 175 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
176 | 176 | $coord = array(); |
177 | 177 | } |
178 | 178 | } |
179 | - $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
179 | + $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
180 | 180 | } elseif ($marine) { |
181 | 181 | $coord = array(); |
182 | 182 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
183 | - $coord = explode(',',$_GET['coord']); |
|
184 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
183 | + $coord = explode(',', $_GET['coord']); |
|
184 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
185 | 185 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
186 | 186 | $coord = array(); |
187 | 187 | } |
188 | 188 | } |
189 | - $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
189 | + $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
190 | 190 | } else { |
191 | 191 | $coord = array(); |
192 | 192 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
193 | - $coord = explode(',',$_GET['coord']); |
|
194 | - if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
|
193 | + $coord = explode(',', $_GET['coord']); |
|
194 | + if (!(filter_var($coord[0], FILTER_VALIDATE_FLOAT) && filter_var($coord[1], FILTER_VALIDATE_FLOAT) && filter_var($coord[2], FILTER_VALIDATE_FLOAT) && filter_var($coord[3], FILTER_VALIDATE_FLOAT) |
|
195 | 195 | && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
196 | 196 | $coord = array(); |
197 | 197 | } |
198 | 198 | } |
199 | 199 | $previous_filter = $filter; |
200 | 200 | if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) { |
201 | - $filter = array_merge($filter,array('id' => $_COOKIE['MapTrack'])); |
|
202 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
201 | + $filter = array_merge($filter, array('id' => $_COOKIE['MapTrack'])); |
|
202 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
203 | 203 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
204 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true,$_COOKIE['MapTrack']); |
|
204 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true, $_COOKIE['MapTrack']); |
|
205 | 205 | } else { |
206 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
206 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
207 | 207 | } |
208 | 208 | $filter = $previous_filter; |
209 | 209 | } |
210 | 210 | //print_r($spotter_array); |
211 | 211 | if (!empty($spotter_array) && isset($coord)) { |
212 | 212 | if (isset($_GET['archive'])) { |
213 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
213 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
214 | 214 | } elseif ($tracker) { |
215 | 215 | $flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
216 | 216 | } elseif ($marine) { |
@@ -221,17 +221,17 @@ discard block |
||
221 | 221 | if ($flightcnt == '') $flightcnt = 0; |
222 | 222 | } else $flightcnt = 0; |
223 | 223 | |
224 | -$sqltime = round(microtime(true)-$begintime,2); |
|
224 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
225 | 225 | $minitime = time(); |
226 | 226 | $minitracktime_begin = time(); |
227 | 227 | $minitracktime = $minitracktime_begin; |
228 | 228 | $maxitime = 0; |
229 | -$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
229 | +$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
230 | 230 | $modelsdb = array(); |
231 | 231 | if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
232 | - if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
233 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
234 | - if (isset($row[1]) ){ |
|
232 | + if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
233 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
234 | + if (isset($row[1])) { |
|
235 | 235 | $model = $row[0]; |
236 | 236 | $modelsdb[$model] = $row[1]; |
237 | 237 | } |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | } |
242 | 242 | $modelsdb2 = array(); |
243 | 243 | if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
244 | - if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
245 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
246 | - if (isset($row[1]) ){ |
|
244 | + if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
245 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
246 | + if (isset($row[1])) { |
|
247 | 247 | $model = $row[0]; |
248 | 248 | $glb = $row[1]; |
249 | 249 | if (isset($row[2])) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | if (!empty($spotter_array) && is_array($spotter_array)) |
288 | 288 | { |
289 | 289 | $nblatlong = 0; |
290 | - foreach($spotter_array as $spotter_item) |
|
290 | + foreach ($spotter_array as $spotter_item) |
|
291 | 291 | { |
292 | 292 | $j++; |
293 | 293 | //if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
@@ -329,9 +329,9 @@ discard block |
||
329 | 329 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
330 | 330 | if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
331 | 331 | if ($tracker) { |
332 | - $output.= '"type": "tracker"'; |
|
332 | + $output .= '"type": "tracker"'; |
|
333 | 333 | } elseif ($marine) { |
334 | - $output.= '"type": "marine"'; |
|
334 | + $output .= '"type": "marine"'; |
|
335 | 335 | } else { |
336 | 336 | if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
337 | 337 | $aircraft_icao = $spotter_item['aircraft_icao']; |
@@ -345,14 +345,14 @@ discard block |
||
345 | 345 | if (isset($airline_icao)) { |
346 | 346 | $imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
347 | 347 | if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
348 | - $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
348 | + $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | } |
352 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
352 | + if ($ident != '') $output .= '"ident": "'.$ident.'",'; |
|
353 | 353 | } |
354 | - $output.= '"gltf2": %gltf2%,'; |
|
355 | - $output.= '"type": "flight"'; |
|
354 | + $output .= '"gltf2": %gltf2%,'; |
|
355 | + $output .= '"type": "flight"'; |
|
356 | 356 | } |
357 | 357 | $output .= '},'; |
358 | 358 | |
@@ -723,8 +723,8 @@ discard block |
||
723 | 723 | $output .= '},'; |
724 | 724 | } |
725 | 725 | } |
726 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
727 | - else $output = str_replace('%onground%','false',$output); |
|
726 | + if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
727 | + else $output = str_replace('%onground%', 'false', $output); |
|
728 | 728 | |
729 | 729 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
730 | 730 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
741 | 741 | if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
742 | 742 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
743 | - $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
743 | + $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
744 | 744 | $output .= $spotter_item['longitude'].', '; |
745 | 745 | $output .= $spotter_item['latitude']; |
746 | 746 | $prevlong = $spotter_item['longitude']; |
@@ -768,8 +768,8 @@ discard block |
||
768 | 768 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
769 | 769 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
770 | 770 | } else { |
771 | - $nblatlong = $nblatlong+1; |
|
772 | - $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
771 | + $nblatlong = $nblatlong + 1; |
|
772 | + $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
773 | 773 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
774 | 774 | if ($spotter_item['ground_speed'] == 0) { |
775 | 775 | $output .= $prevlong.', '; |
@@ -810,26 +810,26 @@ discard block |
||
810 | 810 | $output .= ']'; |
811 | 811 | if (isset($globalArchive) && $globalArchive === TRUE) { |
812 | 812 | if (isset($begindateinitial)) { |
813 | - $output = str_replace('%minitime%',date("c",$begindateinitial),$output); |
|
814 | - } elseif ((time()-$globalLiveInterval) > $minitime) { |
|
815 | - if (time()-$globalLiveInterval > $maxitime) { |
|
816 | - $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
813 | + $output = str_replace('%minitime%', date("c", $begindateinitial), $output); |
|
814 | + } elseif ((time() - $globalLiveInterval) > $minitime) { |
|
815 | + if (time() - $globalLiveInterval > $maxitime) { |
|
816 | + $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
817 | 817 | } else { |
818 | - $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
818 | + $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
819 | 819 | } |
820 | 820 | } |
821 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
821 | + else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
822 | 822 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
823 | - $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
|
823 | + $output = str_replace('%minitime%', date("c", $minitracktime), $output); |
|
824 | 824 | } else { |
825 | - $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
825 | + $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
826 | 826 | } |
827 | 827 | if (isset($enddateinitial)) { |
828 | - $output = str_replace('%maxitime%',date("c",$enddateinitial),$output); |
|
828 | + $output = str_replace('%maxitime%', date("c", $enddateinitial), $output); |
|
829 | 829 | } else { |
830 | - $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
830 | + $output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
831 | 831 | } |
832 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
833 | -else $output = str_replace('%gltf2%','false',$output); |
|
832 | +if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
833 | +else $output = str_replace('%gltf2%', 'false', $output); |
|
834 | 834 | print $output; |
835 | 835 | ?> |
@@ -19,8 +19,12 @@ discard block |
||
19 | 19 | } |
20 | 20 | $tracker = false; |
21 | 21 | $marine = false; |
22 | -if (isset($_GET['tracker'])) $tracker = true; |
|
23 | -if (isset($_GET['marine'])) $marine = true; |
|
22 | +if (isset($_GET['tracker'])) { |
|
23 | + $tracker = true; |
|
24 | +} |
|
25 | +if (isset($_GET['marine'])) { |
|
26 | + $marine = true; |
|
27 | +} |
|
24 | 28 | if ($tracker) { |
25 | 29 | require_once('require/class.Tracker.php'); |
26 | 30 | require_once('require/class.TrackerLive.php'); |
@@ -77,24 +81,49 @@ discard block |
||
77 | 81 | } |
78 | 82 | header('Content-Type: text/javascript'); |
79 | 83 | |
80 | -if (!isset($globalJsonCompress)) $compress = true; |
|
81 | -else $compress = $globalJsonCompress; |
|
84 | +if (!isset($globalJsonCompress)) { |
|
85 | + $compress = true; |
|
86 | +} else { |
|
87 | + $compress = $globalJsonCompress; |
|
88 | +} |
|
82 | 89 | |
83 | 90 | $from_archive = false; |
84 | 91 | $min = false; |
85 | 92 | $allhistory = false; |
86 | 93 | $filter['source'] = array(); |
87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
94 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
95 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
96 | +} |
|
97 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
98 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
99 | +} |
|
100 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
101 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
102 | +} |
|
103 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
104 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
105 | +} |
|
106 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
107 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
108 | +} |
|
109 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
110 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
111 | +} |
|
112 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
113 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
114 | +} |
|
115 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
116 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
117 | +} |
|
118 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
119 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
120 | +} |
|
121 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
122 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
123 | +} |
|
124 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
125 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
126 | +} |
|
98 | 127 | /* |
99 | 128 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
100 | 129 | $min = true; |
@@ -218,8 +247,12 @@ discard block |
||
218 | 247 | } else { |
219 | 248 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
220 | 249 | } |
221 | - if ($flightcnt == '') $flightcnt = 0; |
|
222 | -} else $flightcnt = 0; |
|
250 | + if ($flightcnt == '') { |
|
251 | + $flightcnt = 0; |
|
252 | + } |
|
253 | + } else { |
|
254 | + $flightcnt = 0; |
|
255 | +} |
|
223 | 256 | |
224 | 257 | $sqltime = round(microtime(true)-$begintime,2); |
225 | 258 | $minitime = time(); |
@@ -263,7 +296,9 @@ discard block |
||
263 | 296 | $prev_flightaware_id = ''; |
264 | 297 | $speed = 1; |
265 | 298 | $gltf2 = false; |
266 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
299 | +if (isset($archivespeed)) { |
|
300 | + $speed = $archivespeed; |
|
301 | +} |
|
267 | 302 | $output = '['; |
268 | 303 | if ($tracker) { |
269 | 304 | $output .= '{"id" : "document", "name" : "tracker","version" : "1.0"'; |
@@ -299,9 +334,13 @@ discard block |
||
299 | 334 | $image = "images/placeholder_thumb.png"; |
300 | 335 | } |
301 | 336 | |
302 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
303 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
304 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
337 | + if (isset($spotter_item['flightaware_id'])) { |
|
338 | + $id = $spotter_item['flightaware_id']; |
|
339 | + } elseif (isset($spotter_item['famtrackid'])) { |
|
340 | + $id = $spotter_item['famtrackid']; |
|
341 | + } elseif (isset($spotter_item['fammarine_id'])) { |
|
342 | + $id = $spotter_item['fammarine_id']; |
|
343 | + } |
|
305 | 344 | if ($prev_flightaware_id != $id) { |
306 | 345 | if ($prev_flightaware_id != '') { |
307 | 346 | /* |
@@ -327,7 +366,9 @@ discard block |
||
327 | 366 | $output .= '"flightcnt": "'.$flightcnt.'",'; |
328 | 367 | $output .= '"onground": %onground%,'; |
329 | 368 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
330 | - if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
369 | + if (isset($spotter_item['format_source'])) { |
|
370 | + $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
371 | + } |
|
331 | 372 | if ($tracker) { |
332 | 373 | $output.= '"type": "tracker"'; |
333 | 374 | } elseif ($marine) { |
@@ -349,7 +390,9 @@ discard block |
||
349 | 390 | } |
350 | 391 | } |
351 | 392 | } |
352 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
393 | + if ($ident != '') { |
|
394 | + $output.= '"ident": "'.$ident.'",'; |
|
395 | + } |
|
353 | 396 | } |
354 | 397 | $output.= '"gltf2": %gltf2%,'; |
355 | 398 | $output.= '"type": "flight"'; |
@@ -381,7 +424,9 @@ discard block |
||
381 | 424 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
382 | 425 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
383 | 426 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
384 | - } else $aircraft_shadow = ''; |
|
427 | + } else { |
|
428 | + $aircraft_shadow = ''; |
|
429 | + } |
|
385 | 430 | $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
386 | 431 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
387 | 432 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
@@ -389,7 +434,9 @@ discard block |
||
389 | 434 | } |
390 | 435 | $output .= '},'; |
391 | 436 | } |
392 | - } else $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWS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wzkgPrfOCj5G33+h54E/g0PAr5thq4ApgyEgNrc27aWwVaPTA1QJ4BjgTGFvhteV40EgPrgvTP7qlmZqFnl9WD+b2posN83E/NrEkOjlI/U1fkfUYa/pe5IE3qZPW8jFOqiyN7p3pAPX04c7AxYSoDDcAjKT2LgLXA6IR2M3Bviv59wDTgQGTPH84Qd8+HXfHcoUws2zM0HMjuUPep+xP2PWpnwtw0GJsldbBpewQwE/gbeDyt7H1gcW53O7AC+A3Yn6+/W+Ld9SnWA15DAVhc8xK2TuA9YHrCuhV4EngFuBx4YagG6qv8cF+T52kB2Zy+e1I8taUacNV+uBdXO7ABmJwJpwx8XQvF9TUCWM64tiQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
437 | + } else { |
|
438 | + $output .= ' "billboard" : {"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAfCAYAAACVgY94AAAACXBIWXMAAC4jAAAuIwF4pT92AAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJi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iQhbq/oMv+7BwFWpQzNT8vbVQul/wwAGzzdmXU1xuUAAAAASUVORK5CYII=","scale" : 0.5},'; |
|
439 | + } |
|
393 | 440 | } elseif ($one3dmodel) { |
394 | 441 | if (isset($globalMap3DForceModel) && $globalMap3DForceModel != '') { |
395 | 442 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$globalMap3DForceModel.'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -429,7 +476,9 @@ discard block |
||
429 | 476 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
430 | 477 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
431 | 478 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
432 | - } else $aircraft_shadow = ''; |
|
479 | + } else { |
|
480 | + $aircraft_shadow = ''; |
|
481 | + } |
|
433 | 482 | if ($aircraft_shadow != '') { |
434 | 483 | if (isset($modelsdb2[$aircraft_shadow])) { |
435 | 484 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/gltf2/'.$modelsdb2[$aircraft_shadow]['glb'].'","scale" : 1.0,"minimumPixelSize": '.$modelsdb2[$aircraft_shadow]['size']; |
@@ -584,7 +633,9 @@ discard block |
||
584 | 633 | } |
585 | 634 | $output .= '},'; |
586 | 635 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
587 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
636 | + if ($spotter_item['aircraft_icao'] != '') { |
|
637 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
638 | + } |
|
588 | 639 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
589 | 640 | } |
590 | 641 | } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
@@ -606,7 +657,9 @@ discard block |
||
606 | 657 | } |
607 | 658 | $output .= '},'; |
608 | 659 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
609 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
660 | + if ($spotter_item['aircraft_icao'] != '') { |
|
661 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
662 | + } |
|
610 | 663 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
611 | 664 | } |
612 | 665 | } else { |
@@ -619,7 +672,9 @@ discard block |
||
619 | 672 | } |
620 | 673 | $output .= '},'; |
621 | 674 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
622 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
675 | + if ($spotter_item['aircraft_icao'] != '') { |
|
676 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
677 | + } |
|
623 | 678 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
624 | 679 | } |
625 | 680 | } elseif ($tracker && isset($spotter_item['type'])) { |
@@ -723,8 +778,11 @@ discard block |
||
723 | 778 | $output .= '},'; |
724 | 779 | } |
725 | 780 | } |
726 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
727 | - else $output = str_replace('%onground%','false',$output); |
|
781 | + if (isset($onground) && $onground) { |
|
782 | + $output = str_replace('%onground%','true',$output); |
|
783 | + } else { |
|
784 | + $output = str_replace('%onground%','false',$output); |
|
785 | + } |
|
728 | 786 | |
729 | 787 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
730 | 788 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -737,9 +795,15 @@ discard block |
||
737 | 795 | // $output .= '"interpolationDegree" : 5,'; |
738 | 796 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
739 | 797 | $output .= '"cartographicDegrees": ['; |
740 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
741 | - if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
|
742 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
798 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
799 | + $minitime = strtotime($spotter_item['date']); |
|
800 | + } |
|
801 | + if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) { |
|
802 | + $minitracktime = strtotime($spotter_item['date']); |
|
803 | + } |
|
804 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
805 | + $maxitime = strtotime($spotter_item['date']); |
|
806 | + } |
|
743 | 807 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
744 | 808 | $output .= $spotter_item['longitude'].', '; |
745 | 809 | $output .= $spotter_item['latitude']; |
@@ -762,7 +826,9 @@ discard block |
||
762 | 826 | $output .= ', '.round($spotter_item['altitude']*30.48); |
763 | 827 | $prevalt = round($spotter_item['altitude']*30.48); |
764 | 828 | } |
765 | - } else $output .= ', 0'; |
|
829 | + } else { |
|
830 | + $output .= ', 0'; |
|
831 | + } |
|
766 | 832 | //$orientation = '"orientation" : { '; |
767 | 833 | //$orientation .= '"unitQuaternion": ['; |
768 | 834 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
@@ -770,13 +836,18 @@ discard block |
||
770 | 836 | } else { |
771 | 837 | $nblatlong = $nblatlong+1; |
772 | 838 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
773 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
839 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
840 | + $maxitime = strtotime($spotter_item['date']); |
|
841 | + } |
|
774 | 842 | if ($spotter_item['ground_speed'] == 0) { |
775 | 843 | $output .= $prevlong.', '; |
776 | 844 | $output .= $prevlat; |
777 | 845 | //if (!$marine && (!isset($onground) || !$onground)) $output .= ', '.$prevalt; |
778 | - if (!$marine) $output .= ', '.$prevalt; |
|
779 | - else $output .= ', 0'; |
|
846 | + if (!$marine) { |
|
847 | + $output .= ', '.$prevalt; |
|
848 | + } else { |
|
849 | + $output .= ', 0'; |
|
850 | + } |
|
780 | 851 | } else { |
781 | 852 | $output .= $spotter_item['longitude'].', '; |
782 | 853 | $output .= $spotter_item['latitude']; |
@@ -789,14 +860,17 @@ discard block |
||
789 | 860 | $output .= ', 0'; |
790 | 861 | } |
791 | 862 | } else { |
792 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
793 | - elseif ($tracker) { |
|
863 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
864 | + $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
865 | + } elseif ($tracker) { |
|
794 | 866 | $output .= ', '.round($spotter_item['altitude']*0.3048); |
795 | 867 | } else { |
796 | 868 | $output .= ', '.round($spotter_item['altitude']*30.48); |
797 | 869 | } |
798 | 870 | } |
799 | - } else $output .= ', 0'; |
|
871 | + } else { |
|
872 | + $output .= ', 0'; |
|
873 | + } |
|
800 | 874 | } |
801 | 875 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
802 | 876 | //$orientation .= ',"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
@@ -817,9 +891,10 @@ discard block |
||
817 | 891 | } else { |
818 | 892 | $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
819 | 893 | } |
894 | + } else { |
|
895 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
820 | 896 | } |
821 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
822 | -} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
897 | + } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
823 | 898 | $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
824 | 899 | } else { |
825 | 900 | $output = str_replace('%minitime%',date("c",$minitime),$output); |
@@ -829,7 +904,10 @@ discard block |
||
829 | 904 | } else { |
830 | 905 | $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
831 | 906 | } |
832 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
833 | -else $output = str_replace('%gltf2%','false',$output); |
|
907 | +if ($gltf2) { |
|
908 | + $output = str_replace('%gltf2%','true',$output); |
|
909 | +} else { |
|
910 | + $output = str_replace('%gltf2%','false',$output); |
|
911 | +} |
|
834 | 912 | print $output; |
835 | 913 | ?> |