@@ -3,18 +3,31 @@ discard block |
||
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | 5 | // Compressed GeoJson is used if true |
6 | -if (!isset($globalJsonCompress)) $compress = true; |
|
7 | -else $compress = $globalJsonCompress; |
|
6 | +if (!isset($globalJsonCompress)) { |
|
7 | + $compress = true; |
|
8 | +} else { |
|
9 | + $compress = $globalJsonCompress; |
|
10 | +} |
|
8 | 11 | |
9 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
12 | +if (isset($_GET['ident'])) { |
|
13 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
14 | +} |
|
15 | +if (isset($_GET['flightaware_id'])) { |
|
16 | + $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
17 | +} |
|
11 | 18 | $archive = false; |
12 | -if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true; |
|
19 | +if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
20 | + $archive = true; |
|
21 | +} |
|
13 | 22 | ?> |
14 | 23 | <?php |
15 | -if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
16 | -elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
17 | -else $IconColor = '1a3151'; |
|
24 | +if (isset($_COOKIE['IconColor'])) { |
|
25 | + $IconColor = $_COOKIE['IconColor']; |
|
26 | +} elseif (isset($globalAircraftIconColor)) { |
|
27 | + $IconColor = $globalAircraftIconColor; |
|
28 | +} else { |
|
29 | + $IconColor = '1a3151'; |
|
30 | +} |
|
18 | 31 | ?> |
19 | 32 | |
20 | 33 | |
@@ -81,9 +94,12 @@ discard block |
||
81 | 94 | |
82 | 95 | function update_airportsLayer() { |
83 | 96 | <?php |
84 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
85 | - else $getZoom = '7'; |
|
86 | -?> |
|
97 | + if (isset($_COOKIE['AirportZoom'])) { |
|
98 | + $getZoom = $_COOKIE['AirportZoom']; |
|
99 | + } else { |
|
100 | + $getZoom = '7'; |
|
101 | + } |
|
102 | + ?> |
|
87 | 103 | if (typeof airportsLayer != 'undefined') { |
88 | 104 | if (map.hasLayer(airportsLayer) == true) { |
89 | 105 | map.removeLayer(airportsLayer); |
@@ -366,7 +382,12 @@ discard block |
||
366 | 382 | <?php |
367 | 383 | } else { |
368 | 384 | ?> |
369 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
385 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
386 | + print $archiveupdatetime*1000; |
|
387 | +} else { |
|
388 | + print $globalMapRefresh*1000+20000; |
|
389 | +} |
|
390 | +?>+feature.properties.sqt*1000); |
|
370 | 391 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
371 | 392 | <?php |
372 | 393 | } |
@@ -416,7 +437,12 @@ discard block |
||
416 | 437 | <?php |
417 | 438 | } else { |
418 | 439 | ?> |
419 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
440 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
441 | + print $archiveupdatetime*1000; |
|
442 | +} else { |
|
443 | + print $globalMapRefresh*1000+20000; |
|
444 | +} |
|
445 | +?>+feature.properties.sqt*1000); |
|
420 | 446 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
421 | 447 | <?php |
422 | 448 | } |
@@ -463,7 +489,12 @@ discard block |
||
463 | 489 | <?php |
464 | 490 | } else { |
465 | 491 | ?> |
466 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
492 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
493 | + print $archiveupdatetime*1000; |
|
494 | +} else { |
|
495 | + print $globalMapRefresh*1000+20000; |
|
496 | +} |
|
497 | +?>+feature.properties.sqt*1000); |
|
467 | 498 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
468 | 499 | <?php |
469 | 500 | } |
@@ -916,7 +947,12 @@ discard block |
||
916 | 947 | } else { |
917 | 948 | ?> |
918 | 949 | //then load it again every 30 seconds |
919 | - reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
950 | + reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
951 | + print $globalMapRefresh*1000; |
|
952 | +} else { |
|
953 | + print '30000'; |
|
954 | +} |
|
955 | +?>); |
|
920 | 956 | var currentdate = new Date(); |
921 | 957 | var currentyear = new Date().getFullYear(); |
922 | 958 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -928,7 +964,12 @@ discard block |
||
928 | 964 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
929 | 965 | ?> |
930 | 966 | update_polarLayer(); |
931 | - setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
967 | + setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
968 | + print $globalMapRefresh*1000*2; |
|
969 | +} else { |
|
970 | + print '60000'; |
|
971 | +} |
|
972 | +?>); |
|
932 | 973 | <?php |
933 | 974 | } |
934 | 975 | ?> |
@@ -943,7 +984,12 @@ discard block |
||
943 | 984 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
944 | 985 | ?> |
945 | 986 | update_atcLayer(); |
946 | - setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
987 | + setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
988 | + print $globalMapRefresh*1000*2; |
|
989 | +} else { |
|
990 | + print '60000'; |
|
991 | +} |
|
992 | +?>); |
|
947 | 993 | <?php |
948 | 994 | } |
949 | 995 | ?> |