@@ -7,12 +7,12 @@ discard block |
||
7 | 7 | require_once('header.php'); |
8 | 8 | |
9 | 9 | //calculuation for the pagination |
10 | -if(!isset($_GET['limit'])) |
|
10 | +if (!isset($_GET['limit'])) |
|
11 | 11 | { |
12 | 12 | $limit_start = 0; |
13 | 13 | $limit_end = 25; |
14 | 14 | $absolute_difference = 25; |
15 | -} else { |
|
15 | +} else { |
|
16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
17 | 17 | $limit_start = $limit_explode[0]; |
18 | 18 | $limit_end = $limit_explode[1]; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | print '<div class="table column">'; |
36 | 36 | print '<p>'._("This page shows all upcoming flights within the next 3 hours calculated using historical data, based on the number of same flights on the current day of the week & current time. This does not take into account real-time delays and other factors.").'</p>'; |
37 | 37 | |
38 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
38 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
39 | 39 | if ($sort != '') { |
40 | 40 | $spotter_array = $Spotter->getUpcomingFlights($limit_start.",".$absolute_difference, $sort); |
41 | 41 | } else { |
@@ -5,16 +5,16 @@ discard block |
||
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | $Spotter = new Spotter(); |
7 | 7 | |
8 | -if (!isset($_GET['aircraft_type'])){ |
|
8 | +if (!isset($_GET['aircraft_type'])) { |
|
9 | 9 | header('Location: '.$globalURL.'/aircraft'); |
10 | 10 | } else { |
11 | 11 | //calculuation for the pagination |
12 | - if(!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2) |
|
12 | + if (!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2) |
|
13 | 13 | { |
14 | 14 | $limit_start = 0; |
15 | 15 | $limit_end = 25; |
16 | 16 | $absolute_difference = 25; |
17 | - } else { |
|
17 | + } else { |
|
18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
19 | 19 | $limit_start = $limit_explode[0]; |
20 | 20 | $limit_end = $limit_explode[1]; |
@@ -28,15 +28,15 @@ discard block |
||
28 | 28 | $limit_previous_1 = $limit_start - $absolute_difference; |
29 | 29 | $limit_previous_2 = $limit_end - $absolute_difference; |
30 | 30 | |
31 | - $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
31 | + $aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
32 | 32 | $page_url = $globalURL.'/aircraft/'.$aircraft_type; |
33 | 33 | |
34 | - $sort = htmlspecialchars(filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING)); |
|
35 | - $spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,$limit_start.",".$absolute_difference, $sort); |
|
34 | + $sort = htmlspecialchars(filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING)); |
|
35 | + $spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, $limit_start.",".$absolute_difference, $sort); |
|
36 | 36 | |
37 | 37 | if (!empty($spotter_array)) |
38 | 38 | { |
39 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
39 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
40 | 40 | require_once('header.php'); |
41 | 41 | |
42 | 42 | print '<div class="select-item">'; |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | $Stats = new Stats(); |
47 | 47 | $aircraft_types = $Stats->getAllAircraftTypes(); |
48 | 48 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
49 | - foreach($aircraft_types as $aircrafttype) |
|
49 | + foreach ($aircraft_types as $aircrafttype) |
|
50 | 50 | { |
51 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
51 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
52 | 52 | { |
53 | 53 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
54 | 54 | } else { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | include('aircraft-sub-menu.php'); |
76 | 76 | |
77 | 77 | print '<div class="table column">'; |
78 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
78 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
79 | 79 | |
80 | 80 | include('table-output.php'); |
81 | 81 |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -if (!isset($_GET['country'])){ |
|
6 | +if (!isset($_GET['country'])) { |
|
7 | 7 | header('Location: '.$globalURL.''); |
8 | 8 | } else { |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | //calculuation for the pagination |
11 | - if(!isset($_GET['limit'])) |
|
11 | + if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
15 | 15 | $absolute_difference = 25; |
16 | - } else { |
|
16 | + } else { |
|
17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
18 | 18 | $limit_start = $limit_explode[0]; |
19 | 19 | $limit_end = $limit_explode[1]; |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $country = ucwords(str_replace("-", " ", $_GET['country'])); |
31 | 31 | |
32 | 32 | $page_url = $globalURL.'/country/'.$_GET['country']; |
33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
34 | 34 | if ($sort != '') { |
35 | 35 | $spotter_array = $Spotter->getSpotterDataByCountry($country, $limit_start.",".$absolute_difference, $sort); |
36 | 36 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | |
40 | 40 | if (!empty($spotter_array)) |
41 | 41 | { |
42 | - $title = sprintf(_("Detailed View for Airports & Airlines from %s"),$country); |
|
42 | + $title = sprintf(_("Detailed View for Airports & Airlines from %s"), $country); |
|
43 | 43 | |
44 | 44 | require_once('header.php'); |
45 | 45 | print '<div class="select-item">'; |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
48 | 48 | print '<option></option>'; |
49 | 49 | $all_countries = $Spotter->getAllCountries(); |
50 | - foreach($all_countries as $all_country) |
|
50 | + foreach ($all_countries as $all_country) |
|
51 | 51 | { |
52 | - if($country == $all_country['country']) |
|
52 | + if ($country == $all_country['country']) |
|
53 | 53 | { |
54 | 54 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
55 | 55 | } else { |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if ($_GET['country'] != "NA") |
65 | 65 | { |
66 | 66 | print '<div class="info column">'; |
67 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
67 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
68 | 68 | print '</div>'; |
69 | 69 | } else { |
70 | 70 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | include('country-sub-menu.php'); |
74 | 74 | print '<div class="table column">'; |
75 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure & arrival) OR airlines from <strong>%s</strong>."),$country).'</p>'; |
|
75 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure & arrival) OR airlines from <strong>%s</strong>."), $country).'</p>'; |
|
76 | 76 | |
77 | 77 | include('table-output.php'); |
78 | 78 | print '<div class="pagination">'; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | $page_url = $globalURL.'/accident-latest'; |
10 | 10 | |
11 | -if(!isset($_GET['limit'])) |
|
11 | +if (!isset($_GET['limit'])) |
|
12 | 12 | { |
13 | 13 | $limit_start = 0; |
14 | 14 | $limit_end = 25; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | print '<div class="table column">'; |
36 | 36 | print '<p>'._("The table below shows the latest Incidents.").'</p>'; |
37 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident'); |
|
37 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident'); |
|
38 | 38 | //print_r($spotter_array); |
39 | 39 | if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) { |
40 | 40 | include('table-output.php'); |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | { |
11 | 11 | $date = date('Y-m-d'); |
12 | 12 | } else { |
13 | - $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
13 | + $date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
14 | 14 | } |
15 | 15 | |
16 | -if(!isset($_GET['limit'])) |
|
16 | +if (!isset($_GET['limit'])) |
|
17 | 17 | { |
18 | 18 | $limit_start = 0; |
19 | 19 | $limit_end = 25; |
@@ -48,12 +48,12 @@ discard block |
||
48 | 48 | print '<br />'; |
49 | 49 | |
50 | 50 | print '<div class="info column">'; |
51 | -print '<h1>'.sprintf(_("Incidents from %s"),date("l F j, Y",strtotime($date))).'</h1>'; |
|
51 | +print '<h1>'.sprintf(_("Incidents from %s"), date("l F j, Y", strtotime($date))).'</h1>'; |
|
52 | 52 | print '</div>'; |
53 | 53 | |
54 | 54 | print '<div class="table column">'; |
55 | -print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>'; |
|
56 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident',$date); |
|
55 | +print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>'; |
|
56 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident', $date); |
|
57 | 57 | //print_r($spotter_array); |
58 | 58 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
59 | 59 | include('table-output.php'); |
@@ -5,11 +5,11 @@ |
||
5 | 5 | |
6 | 6 | if ($_POST['aircraft_manufacturer'] != "") |
7 | 7 | { |
8 | - $aircraft_manufacturer = filter_input(INPUT_POST,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
8 | + $aircraft_manufacturer = filter_input(INPUT_POST, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
9 | 9 | header('Location: '.$globalURL.'/manufacturer/'.$aircraft_manufacturer); |
10 | 10 | } elseif ($_GET['aircraft_manufacturer'] != "") |
11 | 11 | { |
12 | - $aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
12 | + $aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
13 | 13 | header('Location: '.$globalURL.'/manufacturer/'.$aircraft_manufacturer); |
14 | 14 | } else { |
15 | 15 | header('Location: '.$globalURL); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | |
6 | 6 | if ($_POST['registration'] != "") |
7 | 7 | { |
8 | - $registration = filter_input(INPUT_POST,'registration',FILTER_SANITIZE_STRING); |
|
8 | + $registration = filter_input(INPUT_POST, 'registration', FILTER_SANITIZE_STRING); |
|
9 | 9 | header('Location: '.$globalURL.'/registration/'.$registration); |
10 | 10 | } else { |
11 | 11 | header('Location: '.$globalURL); |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | require_once('../require/settings.php'); |
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | -setcookie("MapFormat",'2d'); |
|
5 | +setcookie("MapFormat", '2d'); |
|
6 | 6 | |
7 | 7 | // Compressed GeoJson is used if true |
8 | 8 | if (!isset($globalJsonCompress)) $compress = true; |
@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | $lastupd = $_GET['archivespeed']*$archiveupdatetime; |
19 | 19 | if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate']; |
20 | 20 | else $enddate = time(); |
21 | - setcookie("archive_begin",$begindate); |
|
22 | - setcookie("archive_end",$enddate); |
|
23 | - setcookie("archive_update",$lastupd); |
|
24 | - setcookie("archive_speed",$archivespeed); |
|
21 | + setcookie("archive_begin", $begindate); |
|
22 | + setcookie("archive_end", $enddate); |
|
23 | + setcookie("archive_update", $lastupd); |
|
24 | + setcookie("archive_speed", $archivespeed); |
|
25 | 25 | ?> |
26 | 26 | document.cookie = 'archive_begin=<?php print $begindate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'; |
27 | 27 | document.cookie = 'archive_end=<?php print $enddate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'; |
@@ -92,16 +92,16 @@ discard block |
||
92 | 92 | <?php |
93 | 93 | } |
94 | 94 | if (isset($_GET['ident'])) { |
95 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
95 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
96 | 96 | } |
97 | 97 | if (isset($_GET['flightaware_id'])) { |
98 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
98 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
99 | 99 | } |
100 | 100 | if (isset($_GET['latitude'])) { |
101 | - $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING); |
|
101 | + $latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING); |
|
102 | 102 | } |
103 | 103 | if (isset($_GET['longitude'])) { |
104 | - $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING); |
|
104 | + $longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING); |
|
105 | 105 | } |
106 | 106 | ?> |
107 | 107 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | || navigator.userAgent.match(/BlackBerry/i) |
137 | 137 | || navigator.userAgent.match(/Windows Phone/i)) |
138 | 138 | { |
139 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
139 | + var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom - 1; else print '8'; ?>; |
|
140 | 140 | } else { |
141 | 141 | var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
142 | 142 | } |
@@ -230,19 +230,19 @@ discard block |
||
230 | 230 | map.addLayer(yandexLayer); |
231 | 231 | <?php |
232 | 232 | } elseif ($MapType == 'Bing-Aerial') { |
233 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
233 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
234 | 234 | ?> |
235 | 235 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
236 | 236 | map.addLayer(bingLayer); |
237 | 237 | <?php |
238 | 238 | } elseif ($MapType == 'Bing-Hybrid') { |
239 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
239 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
240 | 240 | ?> |
241 | 241 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
242 | 242 | map.addLayer(bingLayer); |
243 | 243 | <?php |
244 | 244 | } elseif ($MapType == 'Bing-Road') { |
245 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
245 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
246 | 246 | ?> |
247 | 247 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
248 | 248 | map.addLayer(bingLayer); |
@@ -534,10 +534,10 @@ discard block |
||
534 | 534 | }; |
535 | 535 | archive.update = function (props) { |
536 | 536 | if (typeof props != 'undefined') { |
537 | - //this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
538 | - this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>'; |
|
537 | + //this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i> <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a> <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>'; |
|
538 | + this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>'; |
|
539 | 539 | } else { |
540 | - this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
540 | + this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'; |
|
541 | 541 | } |
542 | 542 | |
543 | 543 | }; |
@@ -737,7 +737,7 @@ discard block |
||
737 | 737 | <?php |
738 | 738 | } else { |
739 | 739 | ?> |
740 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
740 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
741 | 741 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
742 | 742 | <?php |
743 | 743 | } |
@@ -753,7 +753,7 @@ discard block |
||
753 | 753 | /* |
754 | 754 | shadowUrl: iconURLShadowpath, |
755 | 755 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
756 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
756 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
757 | 757 | */ |
758 | 758 | }) |
759 | 759 | }) |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | <?php |
787 | 787 | } else { |
788 | 788 | ?> |
789 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
789 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
790 | 790 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
791 | 791 | <?php |
792 | 792 | } |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | <?php |
835 | 835 | } else { |
836 | 836 | ?> |
837 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
837 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
838 | 838 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
839 | 839 | <?php |
840 | 840 | } |
@@ -1460,23 +1460,23 @@ discard block |
||
1460 | 1460 | airs.push(air.value); |
1461 | 1461 | } |
1462 | 1462 | } |
1463 | - document.cookie = 'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
1463 | + document.cookie = 'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
1464 | 1464 | } |
1465 | 1465 | function airlinestype(selectObj) { |
1466 | 1466 | var idx = selectObj.selectedIndex; |
1467 | 1467 | var airtype = selectObj.options[idx].value; |
1468 | - document.cookie = 'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
1468 | + document.cookie = 'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
1469 | 1469 | } |
1470 | 1470 | function alliance(selectObj) { |
1471 | 1471 | var idx = selectObj.selectedIndex; |
1472 | 1472 | var alliance = selectObj.options[idx].value; |
1473 | - document.cookie = 'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
1473 | + document.cookie = 'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
1474 | 1474 | } |
1475 | 1475 | |
1476 | 1476 | function identfilter() { |
1477 | 1477 | var ident = $('#identfilter').val(); |
1478 | 1478 | console.log('Filter with '+ident); |
1479 | - document.cookie = 'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1479 | + document.cookie = 'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1480 | 1480 | } |
1481 | 1481 | function removefilters() { |
1482 | 1482 | // Get an array of all cookie names (the regex matches what we don't want) |
@@ -1498,7 +1498,7 @@ discard block |
||
1498 | 1498 | } |
1499 | 1499 | } |
1500 | 1500 | //document.cookie = 'Sources='+sources.join()+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1501 | - document.cookie = 'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+1, date("Y"))); ?>; path=/' |
|
1501 | + document.cookie = 'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/' |
|
1502 | 1502 | } |
1503 | 1503 | |
1504 | 1504 | function show3D() { |
@@ -1521,23 +1521,23 @@ discard block |
||
1521 | 1521 | |
1522 | 1522 | function clickVATSIM(cb) { |
1523 | 1523 | //document.cookie = 'ShowVATSIM='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1524 | - document.cookie = 'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1524 | + document.cookie = 'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1525 | 1525 | } |
1526 | 1526 | function clickIVAO(cb) { |
1527 | 1527 | //document.cookie = 'ShowIVAO='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1528 | - document.cookie = 'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1528 | + document.cookie = 'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1529 | 1529 | } |
1530 | 1530 | function clickphpVMS(cb) { |
1531 | 1531 | //document.cookie = 'ShowVMS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1532 | - document.cookie = 'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1532 | + document.cookie = 'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1533 | 1533 | } |
1534 | 1534 | function clickSBS1(cb) { |
1535 | 1535 | //document.cookie = 'ShowSBS1='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1536 | - document.cookie = 'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1536 | + document.cookie = 'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1537 | 1537 | } |
1538 | 1538 | function clickAPRS(cb) { |
1539 | 1539 | //document.cookie = 'ShowAPRS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1540 | - document.cookie = 'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1540 | + document.cookie = 'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1541 | 1541 | } |
1542 | 1542 | function clickFlightPopup(cb) { |
1543 | 1543 | document.cookie = 'flightpopup='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
@@ -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 | } else { |
20 | 20 | unset($_COOKIE['MapTrack']); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | <div class="form-group"> |
168 | 168 | <label>From (UTC):</label> |
169 | 169 | <div class='input-group date' id='datetimepicker1'> |
170 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
170 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a", $_COOKIE['archive_begin']); ?>" required /> |
|
171 | 171 | <span class="input-group-addon"> |
172 | 172 | <span class="glyphicon glyphicon-calendar"></span> |
173 | 173 | </span> |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | <div class="form-group"> |
177 | 177 | <label>To (UTC):</label> |
178 | 178 | <div class='input-group date' id='datetimepicker2'> |
179 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
179 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a", $_COOKIE['archive_end']); ?>" /> |
|
180 | 180 | <span class="input-group-addon"> |
181 | 181 | <span class="glyphicon glyphicon-calendar"></span> |
182 | 182 | </span> |
@@ -301,8 +301,8 @@ discard block |
||
301 | 301 | <li><?php echo _("Type of Terrain:"); ?> |
302 | 302 | <select class="selectpicker" onchange="terrainType(this);"> |
303 | 303 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
304 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
305 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
306 | 306 | </select> |
307 | 307 | </li> |
308 | 308 | <?php |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | <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> |
327 | 327 | <?php |
328 | 328 | } |
329 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
329 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
330 | 330 | ?> |
331 | 331 | <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> |
332 | 332 | <?php |
@@ -439,10 +439,10 @@ discard block |
||
439 | 439 | $Spotter = new Spotter(); |
440 | 440 | $allairlinenames = $Spotter->getAllAirlineNames(); |
441 | 441 | } |
442 | - foreach($allairlinenames as $airline) { |
|
442 | + foreach ($allairlinenames as $airline) { |
|
443 | 443 | $airline_name = $airline['airline_name']; |
444 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
445 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
444 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
445 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
446 | 446 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
447 | 447 | } else { |
448 | 448 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
462 | 462 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
463 | 463 | <?php |
464 | - foreach($allalliancenames as $alliance) { |
|
464 | + foreach ($allalliancenames as $alliance) { |
|
465 | 465 | $alliance_name = $alliance['alliance']; |
466 | 466 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
467 | 467 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -482,8 +482,8 @@ discard block |
||
482 | 482 | <select class="selectpicker" multiple onchange="sources(this);"> |
483 | 483 | <?php |
484 | 484 | $Spotter = new Spotter(); |
485 | - foreach($Spotter->getAllSourceName('aprs') as $source) { |
|
486 | - if (isset($_COOKIE['filter_Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
485 | + foreach ($Spotter->getAllSourceName('aprs') as $source) { |
|
486 | + if (isset($_COOKIE['filter_Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
487 | 487 | echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>'; |
488 | 488 | } else { |
489 | 489 | echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>'; |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
556 | 556 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
557 | 557 | |
558 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
558 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
559 | 559 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
560 | 560 | } else { |
561 | 561 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |