@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -49,7 +57,7 @@ discard block |
||
49 | 57 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
50 | 58 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
51 | 59 | } |
52 | -} else { |
|
60 | +} else { |
|
53 | 61 | $limit_explode = explode(",", $_GET['limit']); |
54 | 62 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
55 | 63 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -67,8 +75,11 @@ discard block |
||
67 | 75 | |
68 | 76 | header('Content-Type: application/json'); |
69 | 77 | |
70 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
71 | -else $sort = ''; |
|
78 | +if (isset($_GET['sort'])) { |
|
79 | + $sort = $_GET['sort']; |
|
80 | +} else { |
|
81 | + $sort = ''; |
|
82 | +} |
|
72 | 83 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
73 | 84 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
74 | 85 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) { |
@@ -47,7 +55,7 @@ discard block |
||
47 | 55 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
48 | 56 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | } |
50 | -} else { |
|
58 | +} else { |
|
51 | 59 | $limit_explode = explode(",", $_GET['limit']); |
52 | 60 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
53 | 61 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -65,8 +73,11 @@ discard block |
||
65 | 73 | |
66 | 74 | header("Content-type: text/csv"); |
67 | 75 | |
68 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
69 | -else $sort = ''; |
|
76 | +if (isset($_GET['sort'])) { |
|
77 | + $sort = $_GET['sort']; |
|
78 | +} else { |
|
79 | + $sort = ''; |
|
80 | +} |
|
70 | 81 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
71 | 82 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
72 | 83 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) { |
@@ -47,7 +55,7 @@ discard block |
||
47 | 55 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
48 | 56 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | } |
50 | -} else { |
|
58 | +} else { |
|
51 | 59 | $limit_explode = explode(",", $_GET['limit']); |
52 | 60 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
53 | 61 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -65,8 +73,11 @@ discard block |
||
65 | 73 | |
66 | 74 | header("Content-type: text/yaml"); |
67 | 75 | |
68 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
69 | -else $sort = ''; |
|
76 | +if (isset($_GET['sort'])) { |
|
77 | + $sort = $_GET['sort']; |
|
78 | +} else { |
|
79 | + $sort = ''; |
|
80 | +} |
|
70 | 81 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
71 | 82 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
72 | 83 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) { |
@@ -47,7 +55,7 @@ discard block |
||
47 | 55 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
48 | 56 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | } |
50 | -} else { |
|
58 | +} else { |
|
51 | 59 | $limit_explode = explode(",", $_GET['limit']); |
52 | 60 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
53 | 61 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -65,8 +73,11 @@ discard block |
||
65 | 73 | |
66 | 74 | header('Content-Type: application/xml'); |
67 | 75 | |
68 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
69 | -else $sort = ''; |
|
76 | +if (isset($_GET['sort'])) { |
|
77 | + $sort = $_GET['sort']; |
|
78 | +} else { |
|
79 | + $sort = ''; |
|
80 | +} |
|
70 | 81 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
71 | 82 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
72 | 83 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -48,7 +56,7 @@ discard block |
||
48 | 56 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
49 | 57 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
50 | 58 | } |
51 | -} else { |
|
59 | +} else { |
|
52 | 60 | $limit_explode = explode(",", $_GET['limit']); |
53 | 61 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
54 | 62 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -66,8 +74,11 @@ discard block |
||
66 | 74 | |
67 | 75 | header('Content-Type: text/xml'); |
68 | 76 | |
69 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
70 | -else $sort = ''; |
|
77 | +if (isset($_GET['sort'])) { |
|
78 | + $sort = $_GET['sort']; |
|
79 | +} else { |
|
80 | + $sort = ''; |
|
81 | +} |
|
71 | 82 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
72 | 83 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
73 | 84 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -15,8 +15,12 @@ discard block |
||
15 | 15 | } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
17 | 17 | $sql_date = $end_date; |
18 | - } else $sql_date = ''; |
|
19 | -} else $sql_date = ''; |
|
18 | + } else { |
|
19 | + $sql_date = ''; |
|
20 | + } |
|
21 | + } else { |
|
22 | + $sql_date = ''; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (isset($_GET['highest_altitude'])) { |
22 | 26 | //for altitude manipulation |
@@ -30,8 +34,12 @@ discard block |
||
30 | 34 | } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
31 | 35 | $start_altitude = filter_input(INPUT_GET,'lowest_altitude',FILTER_SANITIZE_NUMBER_INT).",60000"; |
32 | 36 | $sql_altitude = $start_altitude; |
33 | - } else $sql_altitude = ''; |
|
34 | -} else $sql_altitude = ''; |
|
37 | + } else { |
|
38 | + $sql_altitude = ''; |
|
39 | + } |
|
40 | + } else { |
|
41 | + $sql_altitude = ''; |
|
42 | +} |
|
35 | 43 | |
36 | 44 | //calculuation for the pagination |
37 | 45 | if(!isset($_GET['limit'])) |
@@ -49,7 +57,7 @@ discard block |
||
49 | 57 | $limit_end = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
50 | 58 | $absolute_difference = filter_input(INPUT_GET,'number_results',FILTER_SANITIZE_NUMBER_INT); |
51 | 59 | } |
52 | -} else { |
|
60 | +} else { |
|
53 | 61 | $limit_explode = explode(",", $_GET['limit']); |
54 | 62 | $limit_start = filter_var($limit_explode[0],FILTER_SANITIZE_NUMBER_INT); |
55 | 63 | $limit_end = filter_var($limit_explode[1],FILTER_SANITIZE_NUMBER_INT); |
@@ -67,8 +75,11 @@ discard block |
||
67 | 75 | |
68 | 76 | header('Content-Type: application/json'); |
69 | 77 | |
70 | -if (isset($_GET['sort'])) $sort = $_GET['sort']; |
|
71 | -else $sort = ''; |
|
78 | +if (isset($_GET['sort'])) { |
|
79 | + $sort = $_GET['sort']; |
|
80 | +} else { |
|
81 | + $sort = ''; |
|
82 | +} |
|
72 | 83 | $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
73 | 84 | $id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_NUMBER_INT); |
74 | 85 | $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
@@ -37,7 +37,9 @@ discard block |
||
37 | 37 | |
38 | 38 | |
39 | 39 | // let's try and connect |
40 | -if ($globalDebug) echo "Listen to acarsdec ... "; |
|
40 | +if ($globalDebug) { |
|
41 | + echo "Listen to acarsdec ... "; |
|
42 | +} |
|
41 | 43 | // create our socket and set it to non-blocking |
42 | 44 | $sock = socket_create(AF_INET, SOCK_DGRAM, 0) or die("Unable to create socket\n"); |
43 | 45 | |
@@ -50,7 +52,9 @@ discard block |
||
50 | 52 | die("Could not bind socket : [$errorcode] $errormsg \n"); |
51 | 53 | } |
52 | 54 | |
53 | -if ($globalDebug) echo "LISTEN UDP MODE \n\n"; |
|
55 | +if ($globalDebug) { |
|
56 | + echo "LISTEN UDP MODE \n\n"; |
|
57 | +} |
|
54 | 58 | while(1) { |
55 | 59 | $r = socket_recvfrom($sock, $buffer, 512, 0, $remote_ip, $remote_port); |
56 | 60 | |
@@ -58,7 +62,9 @@ discard block |
||
58 | 62 | pcntl_signal_dispatch(); |
59 | 63 | $dataFound = false; |
60 | 64 | // (null) 2 23/02/2015 14:46:06 0 -16 X .D-AIPW ! 1L 7 M82A LH077P 010952342854:VP-MIBI+W+0)-V+(),GB1 |
61 | - if ($globalDebug) echo $buffer."\n"; |
|
65 | + if ($globalDebug) { |
|
66 | + echo $buffer."\n"; |
|
67 | + } |
|
62 | 68 | $ACARS->add(trim($buffer)); |
63 | 69 | socket_sendto($sock, "OK " . $buffer , 100 , 0 , $remote_ip , $remote_port); |
64 | 70 | $ACARS->deleteLiveAcarsData(); |
@@ -13,16 +13,27 @@ discard block |
||
13 | 13 | <?php |
14 | 14 | |
15 | 15 | // Compressed GeoJson is used if true |
16 | -if (!isset($globalJsonCompress)) $compress = true; |
|
17 | -else $compress = $globalJsonCompress; |
|
16 | +if (!isset($globalJsonCompress)) { |
|
17 | + $compress = true; |
|
18 | +} else { |
|
19 | + $compress = $globalJsonCompress; |
|
20 | +} |
|
18 | 21 | |
19 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
20 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
22 | +if (isset($_GET['ident'])) { |
|
23 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
24 | +} |
|
25 | +if (isset($_GET['flightaware_id'])) { |
|
26 | + $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
27 | +} |
|
21 | 28 | ?> |
22 | 29 | <?php |
23 | -if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
24 | -elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
25 | -else $IconColor = '1a3151'; |
|
30 | +if (isset($_COOKIE['IconColor'])) { |
|
31 | + $IconColor = $_COOKIE['IconColor']; |
|
32 | +} elseif (isset($globalAircraftIconColor)) { |
|
33 | + $IconColor = $globalAircraftIconColor; |
|
34 | +} else { |
|
35 | + $IconColor = '1a3151'; |
|
36 | +} |
|
26 | 37 | ?> |
27 | 38 | <?php |
28 | 39 | if (isset($globalDebug) && $globalDebug === TRUE) { |
@@ -99,9 +110,12 @@ discard block |
||
99 | 110 | |
100 | 111 | function update_airportsLayer() { |
101 | 112 | <?php |
102 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
103 | - else $getZoom = '7'; |
|
104 | -?> |
|
113 | + if (isset($_COOKIE['AirportZoom'])) { |
|
114 | + $getZoom = $_COOKIE['AirportZoom']; |
|
115 | + } else { |
|
116 | + $getZoom = '7'; |
|
117 | + } |
|
118 | + ?> |
|
105 | 119 | if (typeof airportsLayer != 'undefined') { |
106 | 120 | if (map.hasLayer(airportsLayer) == true) { |
107 | 121 | map.removeLayer(airportsLayer); |
@@ -382,7 +396,12 @@ discard block |
||
382 | 396 | <?php |
383 | 397 | } else { |
384 | 398 | ?> |
385 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
399 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
400 | + print $archiveupdatetime*1000; |
|
401 | +} else { |
|
402 | + print $globalMapRefresh*1000+20000; |
|
403 | +} |
|
404 | +?>+feature.properties.sqt*1000); |
|
386 | 405 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
387 | 406 | <?php |
388 | 407 | } |
@@ -433,7 +452,12 @@ discard block |
||
433 | 452 | <?php |
434 | 453 | } else { |
435 | 454 | ?> |
436 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
455 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
456 | + print $archiveupdatetime*1000; |
|
457 | +} else { |
|
458 | + print $globalMapRefresh*1000+20000; |
|
459 | +} |
|
460 | +?>+feature.properties.sqt*1000); |
|
437 | 461 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
438 | 462 | <?php |
439 | 463 | } |
@@ -481,7 +505,12 @@ discard block |
||
481 | 505 | <?php |
482 | 506 | } else { |
483 | 507 | ?> |
484 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
508 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
509 | + print $archiveupdatetime*1000; |
|
510 | +} else { |
|
511 | + print $globalMapRefresh*1000+20000; |
|
512 | +} |
|
513 | +?>+feature.properties.sqt*1000); |
|
485 | 514 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
486 | 515 | <?php |
487 | 516 | } |
@@ -1000,12 +1029,22 @@ discard block |
||
1000 | 1029 | update_archiveLayer(0); |
1001 | 1030 | } else { |
1002 | 1031 | //then load it again every 30 seconds |
1003 | - var reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
1032 | + var reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
1033 | + print $globalMapRefresh*1000; |
|
1034 | +} else { |
|
1035 | + print '30000'; |
|
1036 | +} |
|
1037 | +?>); |
|
1004 | 1038 | <?php |
1005 | 1039 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
1006 | 1040 | ?> |
1007 | 1041 | update_polarLayer(); |
1008 | - setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1042 | + setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
1043 | + print $globalMapRefresh*1000*2; |
|
1044 | +} else { |
|
1045 | + print '60000'; |
|
1046 | +} |
|
1047 | +?>); |
|
1009 | 1048 | <?php |
1010 | 1049 | } |
1011 | 1050 | ?> |
@@ -1018,7 +1057,12 @@ discard block |
||
1018 | 1057 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
1019 | 1058 | ?> |
1020 | 1059 | update_atcLayer(); |
1021 | - setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
1060 | + setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
1061 | + print $globalMapRefresh*1000*2; |
|
1062 | +} else { |
|
1063 | + print '60000'; |
|
1064 | +} |
|
1065 | +?>); |
|
1022 | 1066 | <?php |
1023 | 1067 | } |
1024 | 1068 | ?> |
@@ -13,10 +13,15 @@ discard block |
||
13 | 13 | <?php |
14 | 14 | |
15 | 15 | // Compressed GeoJson is used if true |
16 | -if (!isset($globalJsonCompress)) $compress = true; |
|
17 | -else $compress = $globalJsonCompress; |
|
16 | +if (!isset($globalJsonCompress)) { |
|
17 | + $compress = true; |
|
18 | +} else { |
|
19 | + $compress = $globalJsonCompress; |
|
20 | +} |
|
18 | 21 | $archive = false; |
19 | -if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true; |
|
22 | +if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
23 | + $archive = true; |
|
24 | +} |
|
20 | 25 | ?> |
21 | 26 | |
22 | 27 | |
@@ -174,9 +179,13 @@ discard block |
||
174 | 179 | if (callsign != ""){ markerTrackerLabel += callsign; } |
175 | 180 | if (type != ""){ markerTrackerLabel += ' - '+type; } |
176 | 181 | <?php |
177 | - if (isset($_COOKIE['TrackerIconColor'])) $IconColor = $_COOKIE['TrackerIconColor']; |
|
178 | - elseif (isset($globalTrackerIconColor)) $IconColor = $globalTrackerIconColor; |
|
179 | - else $IconColor = '1a3151'; |
|
182 | + if (isset($_COOKIE['TrackerIconColor'])) { |
|
183 | + $IconColor = $_COOKIE['TrackerIconColor']; |
|
184 | + } elseif (isset($globalTrackerIconColor)) { |
|
185 | + $IconColor = $globalTrackerIconColor; |
|
186 | + } else { |
|
187 | + $IconColor = '1a3151'; |
|
188 | + } |
|
180 | 189 | if (!isset($ident) && !isset($famtrackid)) { |
181 | 190 | ?> |
182 | 191 | //info_tracker_update(feature.properties.fc); |
@@ -210,7 +219,12 @@ discard block |
||
210 | 219 | <?php |
211 | 220 | } else { |
212 | 221 | ?> |
213 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
222 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
223 | + print $archiveupdatetime*1000; |
|
224 | +} else { |
|
225 | + print $globalMapRefresh*1000+20000; |
|
226 | +} |
|
227 | +?>+feature.properties.sqt*1000); |
|
214 | 228 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
215 | 229 | <?php |
216 | 230 | } |
@@ -267,7 +281,12 @@ discard block |
||
267 | 281 | <?php |
268 | 282 | } else { |
269 | 283 | ?> |
270 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
284 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
285 | + print $archiveupdatetime*1000; |
|
286 | +} else { |
|
287 | + print $globalMapRefresh*1000+20000; |
|
288 | +} |
|
289 | +?>+feature.properties.sqt*1000); |
|
271 | 290 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
272 | 291 | <?php |
273 | 292 | } |
@@ -323,7 +342,12 @@ discard block |
||
323 | 342 | <?php |
324 | 343 | } else { |
325 | 344 | ?> |
326 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
345 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
346 | + print $archiveupdatetime*1000; |
|
347 | +} else { |
|
348 | + print $globalMapRefresh*1000+20000; |
|
349 | +} |
|
350 | +?>+feature.properties.sqt*1000); |
|
327 | 351 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
328 | 352 | <?php |
329 | 353 | } |
@@ -780,7 +804,12 @@ discard block |
||
780 | 804 | getLiveTrackerData(0); |
781 | 805 | //then load it again every 30 seconds |
782 | 806 | var reloadTrackerPage = setInterval( |
783 | - function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
807 | + function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) { |
|
808 | + print $globalMapRefresh*1000; |
|
809 | +} else { |
|
810 | + print '30000'; |
|
811 | +} |
|
812 | +?>); |
|
784 | 813 | <?php |
785 | 814 | } |
786 | 815 | ?> |