@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | var data = google.visualization.arrayToDataTable([ |
24 | 24 | ["'._("Country").'", "'._("# of times").'"], '; |
25 | 25 | $country_data = ''; |
26 | -foreach($airline_array as $airline_item) |
|
26 | +foreach ($airline_array as $airline_item) |
|
27 | 27 | { |
28 | 28 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
29 | 29 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | print '</thead>'; |
58 | 58 | print '<tbody>'; |
59 | 59 | $i = 1; |
60 | - foreach($airline_array as $airline_item) |
|
60 | + foreach ($airline_array as $airline_item) |
|
61 | 61 | { |
62 | 62 | print '<tr>'; |
63 | 63 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | $page_url = $globalURL.'/tools-metar'; |
12 | 12 | |
13 | -$message = filter_input(INPUT_POST,'metar_message',FILTER_SANITIZE_STRING); |
|
13 | +$message = filter_input(INPUT_POST, 'metar_message', FILTER_SANITIZE_STRING); |
|
14 | 14 | |
15 | 15 | print '<div class="info column">'; |
16 | 16 | print '<h1>'._("Parse METAR messages").'</h1>'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | print '<b>'._("Dew point:").'</b> '.$metar_parse['dew'].' °C'." "; |
72 | 72 | } |
73 | 73 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
74 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
74 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
75 | 75 | print '<b>'._("Humidity:").'</b> '.$humidity.'%'." "; |
76 | 76 | } |
77 | 77 | if (isset($metar_parse['QNH'])) { |
@@ -5,14 +5,14 @@ discard block |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | if (isset($_GET['start_date'])) { |
7 | 7 | //for the date manipulation into the query |
8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
8 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
9 | 9 | $start_date = $_GET['start_date'].":00"; |
10 | 10 | $end_date = $_GET['end_date'].":00"; |
11 | 11 | $sql_date = $start_date.",".$end_date; |
12 | - } else if($_GET['start_date'] != ""){ |
|
12 | + } else if ($_GET['start_date'] != "") { |
|
13 | 13 | $start_date = $_GET['start_date'].":00"; |
14 | 14 | $sql_date = $start_date; |
15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
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 | 18 | } else $sql_date = ''; |
@@ -20,21 +20,21 @@ discard block |
||
20 | 20 | |
21 | 21 | if (isset($_GET['highest_altitude'])) { |
22 | 22 | //for altitude manipulation |
23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
23 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
24 | 24 | $end_altitude = $_GET['highest_altitude']; |
25 | 25 | $start_altitude = $_GET['lowest_altitude']; |
26 | 26 | $sql_altitude = $start_altitude.",".$end_altitude; |
27 | - } else if($_GET['highest_altitude'] != ""){ |
|
27 | + } else if ($_GET['highest_altitude'] != "") { |
|
28 | 28 | $end_altitude = $_GET['highest_altitude']; |
29 | 29 | $sql_altitude = $end_altitude; |
30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
30 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
31 | 31 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
32 | 32 | $sql_altitude = $start_altitude; |
33 | 33 | } else $sql_altitude = ''; |
34 | 34 | } else $sql_altitude = ''; |
35 | 35 | |
36 | 36 | //calculuation for the pagination |
37 | -if(!isset($_GET['limit'])) |
|
37 | +if (!isset($_GET['limit'])) |
|
38 | 38 | { |
39 | 39 | if (!isset($_GET['number_results'])) |
40 | 40 | { |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | $limit_end = 25; |
43 | 43 | $absolute_difference = 25; |
44 | 44 | } else { |
45 | - if ($_GET['number_results'] > 1000){ |
|
45 | + if ($_GET['number_results'] > 1000) { |
|
46 | 46 | $_GET['number_results'] = 1000; |
47 | 47 | } |
48 | 48 | $limit_start = 0; |
49 | 49 | $limit_end = $_GET['number_results']; |
50 | 50 | $absolute_difference = $_GET['number_results']; |
51 | 51 | } |
52 | -} else { |
|
52 | +} else { |
|
53 | 53 | $limit_explode = explode(",", $_GET['limit']); |
54 | 54 | $limit_start = $limit_explode[0]; |
55 | 55 | $limit_end = $limit_explode[1]; |
@@ -72,23 +72,23 @@ discard block |
||
72 | 72 | |
73 | 73 | if (isset($_GET['sort'])) $sort = $_GET['sort']; |
74 | 74 | else $sort = ''; |
75 | -$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
|
76 | -$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
|
77 | -$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
|
78 | -$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING); |
|
79 | -$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING); |
|
80 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
81 | -$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING); |
|
82 | -$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING); |
|
83 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
84 | -$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING); |
|
85 | -$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING); |
|
86 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
87 | -$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING); |
|
88 | -$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING); |
|
89 | -$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING); |
|
90 | -$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
91 | -$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,''); |
|
75 | +$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
76 | +$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING); |
|
77 | +$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
78 | +$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
79 | +$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
80 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
81 | +$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
82 | +$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
83 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
84 | +$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
85 | +$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
86 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
87 | +$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
88 | +$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
89 | +$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
90 | +$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
91 | +$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, ''); |
|
92 | 92 | |
93 | 93 | print '<?xml version="1.0" encoding="UTF-8" ?>'; |
94 | 94 | print '<feed xmlns="http://www.w3.org/2005/Atom" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">'; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | |
106 | 106 | if (!empty($spotter_array)) |
107 | 107 | { |
108 | - foreach($spotter_array as $spotter_item) |
|
108 | + foreach ($spotter_array as $spotter_item) |
|
109 | 109 | { |
110 | 110 | |
111 | 111 |
@@ -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 | |
27 | 27 | document.cookie = 'archive_begin=<?php print $begindate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'; |
@@ -76,16 +76,16 @@ discard block |
||
76 | 76 | <?php |
77 | 77 | } |
78 | 78 | if (isset($_GET['ident'])) { |
79 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
79 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
80 | 80 | } |
81 | 81 | if (isset($_GET['flightaware_id'])) { |
82 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
82 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
83 | 83 | } |
84 | 84 | if (isset($_GET['latitude'])) { |
85 | - $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING); |
|
85 | + $latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING); |
|
86 | 86 | } |
87 | 87 | if (isset($_GET['longitude'])) { |
88 | - $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING); |
|
88 | + $longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING); |
|
89 | 89 | } |
90 | 90 | ?> |
91 | 91 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | || navigator.userAgent.match(/BlackBerry/i) |
121 | 121 | || navigator.userAgent.match(/Windows Phone/i)) |
122 | 122 | { |
123 | - var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>; |
|
123 | + var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom - 1; else print '8'; ?>; |
|
124 | 124 | } else { |
125 | 125 | var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>; |
126 | 126 | } |
@@ -520,10 +520,10 @@ discard block |
||
520 | 520 | }; |
521 | 521 | archive.update = function (props) { |
522 | 522 | if (typeof props != 'undefined') { |
523 | - //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>'; |
|
524 | - 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>'; |
|
523 | + //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>'; |
|
524 | + 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>'; |
|
525 | 525 | } else { |
526 | - 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>'; |
|
526 | + 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>'; |
|
527 | 527 | } |
528 | 528 | |
529 | 529 | }; |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | <?php |
725 | 725 | } else { |
726 | 726 | ?> |
727 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
727 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
728 | 728 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
729 | 729 | <?php |
730 | 730 | } |
@@ -739,7 +739,7 @@ discard block |
||
739 | 739 | iconAnchor: [<?php print $globalAircraftSize/2; ?>, <?php print $globalAircraftSize; ?>], |
740 | 740 | shadowUrl: iconURLShadowpath, |
741 | 741 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
742 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
742 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
743 | 743 | }) |
744 | 744 | }) |
745 | 745 | <?php |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | <?php |
770 | 770 | } else { |
771 | 771 | ?> |
772 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
772 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
773 | 773 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
774 | 774 | <?php |
775 | 775 | } |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | <?php |
814 | 814 | } else { |
815 | 815 | ?> |
816 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
816 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
817 | 817 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
818 | 818 | <?php |
819 | 819 | } |
@@ -1179,7 +1179,7 @@ discard block |
||
1179 | 1179 | $('.button').tooltip({ placement: 'right' }); |
1180 | 1180 | |
1181 | 1181 | <?php |
1182 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) ) { |
|
1182 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
1183 | 1183 | ?> |
1184 | 1184 | update_atcLayer(); |
1185 | 1185 | setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
@@ -1392,12 +1392,12 @@ discard block |
||
1392 | 1392 | airs.push(air.value); |
1393 | 1393 | } |
1394 | 1394 | } |
1395 | - document.cookie = 'Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1395 | + document.cookie = 'Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1396 | 1396 | } |
1397 | 1397 | function airlinestype(selectObj) { |
1398 | 1398 | var idx = selectObj.selectedIndex; |
1399 | 1399 | var airtype = selectObj.options[idx].value; |
1400 | - document.cookie = 'airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1400 | + document.cookie = 'airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1401 | 1401 | } |
1402 | 1402 | function sources(selectObj) { |
1403 | 1403 | var sources = [], source; |
@@ -1408,7 +1408,7 @@ discard block |
||
1408 | 1408 | } |
1409 | 1409 | } |
1410 | 1410 | //document.cookie = 'Sources='+sources.join()+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1411 | - document.cookie = 'Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m") , date("d")+2, date("Y"))); ?>; path=/' |
|
1411 | + document.cookie = 'Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/' |
|
1412 | 1412 | } |
1413 | 1413 | |
1414 | 1414 | function iconColor(color) { |
@@ -1427,23 +1427,23 @@ discard block |
||
1427 | 1427 | |
1428 | 1428 | function clickVATSIM(cb) { |
1429 | 1429 | //document.cookie = 'ShowVATSIM='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1430 | - document.cookie = '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=/' |
|
1430 | + document.cookie = '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=/' |
|
1431 | 1431 | } |
1432 | 1432 | function clickIVAO(cb) { |
1433 | 1433 | //document.cookie = 'ShowIVAO='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1434 | - document.cookie = '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=/' |
|
1434 | + document.cookie = '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=/' |
|
1435 | 1435 | } |
1436 | 1436 | function clickphpVMS(cb) { |
1437 | 1437 | //document.cookie = 'ShowVMS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1438 | - document.cookie = '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=/' |
|
1438 | + document.cookie = '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=/' |
|
1439 | 1439 | } |
1440 | 1440 | function clickSBS1(cb) { |
1441 | 1441 | //document.cookie = 'ShowSBS1='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1442 | - document.cookie = '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=/' |
|
1442 | + document.cookie = '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=/' |
|
1443 | 1443 | } |
1444 | 1444 | function clickAPRS(cb) { |
1445 | 1445 | //document.cookie = 'ShowAPRS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
1446 | - document.cookie = '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=/' |
|
1446 | + document.cookie = '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=/' |
|
1447 | 1447 | } |
1448 | 1448 | function clickFlightPopup(cb) { |
1449 | 1449 | document.cookie = 'flightpopup='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | 15 | } else $spotter_array = array(); |
16 | 16 | |
17 | 17 | if (!empty($spotter_array)) |
18 | 18 | { |
19 | - $title = sprintf(_("Most Common Aircraft Manufacturer between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
19 | + $title = sprintf(_("Most Common Aircraft Manufacturer between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="info column">'; |
22 | 22 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | include('route-sub-menu.php'); |
28 | 28 | print '<div class="column">'; |
29 | 29 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
30 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
30 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
31 | 31 | |
32 | 32 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
33 | 33 | if (!empty($manufacturers_array)) |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | print '</thead>'; |
43 | 43 | print '<tbody>'; |
44 | 44 | $i = 1; |
45 | - foreach($manufacturers_array as $manufacturer_item) |
|
45 | + foreach ($manufacturers_array as $manufacturer_item) |
|
46 | 46 | { |
47 | 47 | print '<tr>'; |
48 | 48 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -9,14 +9,14 @@ discard block |
||
9 | 9 | require_once('require/class.Language.php'); |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
15 | 15 | } else $spotter_array = array(); |
16 | 16 | |
17 | 17 | if (!empty($spotter_array)) |
18 | 18 | { |
19 | - $title = sprintf(_("Most Common Aircraft by Registration between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
19 | + $title = sprintf(_("Most Common Aircraft by Registration between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="info column">'; |
22 | 22 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | include('route-sub-menu.php'); |
28 | 28 | print '<div class="column">'; |
29 | 29 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
30 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
30 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
31 | 31 | |
32 | 32 | $aircraft_array = $Spotter->countAllAircraftRegistrationByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
33 | 33 | if (!empty($aircraft_array)) |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | print '</thead>'; |
45 | 45 | print '<tbody>'; |
46 | 46 | $i = 1; |
47 | - foreach($aircraft_array as $aircraft_item) |
|
47 | + foreach ($aircraft_array as $aircraft_item) |
|
48 | 48 | { |
49 | 49 | print '<tr>'; |
50 | 50 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,23 +7,23 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/aircraft'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
10 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
13 | 13 | |
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Airlines from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
17 | + $title = sprintf(_("Most Common Airlines from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
21 | 21 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
22 | 22 | print '<option></option>'; |
23 | 23 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
24 | - foreach($aircraft_types as $aircrafttype) |
|
24 | + foreach ($aircraft_types as $aircrafttype) |
|
25 | 25 | { |
26 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
26 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
27 | 27 | { |
28 | 28 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
29 | 29 | } else { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | include('aircraft-sub-menu.php'); |
50 | 50 | print '<div class="column">'; |
51 | 51 | print '<h2>'._("Most Common Airlines").'</h2>'; |
52 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
52 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
53 | 53 | |
54 | 54 | $airline_array = $Spotter->countAllAirlinesByAircraft($aircraft_type); |
55 | 55 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | print '</thead>'; |
68 | 68 | print '<tbody>'; |
69 | 69 | $i = 1; |
70 | - foreach($airline_array as $airline_item) |
|
70 | + foreach ($airline_array as $airline_item) |
|
71 | 71 | { |
72 | 72 | print '<tr>'; |
73 | 73 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
10 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines by Country from %s"),$manufacturer); |
|
16 | + $title = sprintf(_("Most Common Airlines by Country from %s"), $manufacturer); |
|
17 | 17 | |
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
22 | 22 | print '<option></option>'; |
23 | 23 | $all_manufacturers = $Spotter->getAllManufacturers(); |
24 | - foreach($all_manufacturers as $all_manufacturer) |
|
24 | + foreach ($all_manufacturers as $all_manufacturer) |
|
25 | 25 | { |
26 | - if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
26 | + if ($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
27 | 27 | { |
28 | 28 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
29 | 29 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | include('manufacturer-sub-menu.php'); |
43 | 43 | print '<div class="column">'; |
44 | 44 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
45 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
45 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
46 | 46 | $airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer); |
47 | 47 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
48 | 48 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ["'._("Country").'", "'._("# of times").'"], '; |
55 | 55 | |
56 | 56 | $country_data = ''; |
57 | - foreach($airline_array as $airline_item) |
|
57 | + foreach ($airline_array as $airline_item) |
|
58 | 58 | { |
59 | 59 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
60 | 60 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | print '</thead>'; |
89 | 89 | print '<tbody>'; |
90 | 90 | $i = 1; |
91 | - foreach($airline_array as $airline_item) |
|
91 | + foreach ($airline_array as $airline_item) |
|
92 | 92 | { |
93 | 93 | print '<tr>'; |
94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,19 +6,19 @@ discard block |
||
6 | 6 | $Spotter = new Spotter(); |
7 | 7 | $orderby = $Spotter->getOrderBy(); |
8 | 8 | |
9 | -$ask = filter_input(INPUT_GET,'ask',FILTER_SANITIZE_STRING); |
|
9 | +$ask = filter_input(INPUT_GET, 'ask', FILTER_SANITIZE_STRING); |
|
10 | 10 | if ($ask == 'manufacturer') { |
11 | 11 | $manufacturers = $Spotter->getAllManufacturers(); |
12 | 12 | $all_manufacturers = array(); |
13 | - foreach($manufacturers as $manufacturer) |
|
13 | + foreach ($manufacturers as $manufacturer) |
|
14 | 14 | { |
15 | - $all_manufacturers[] = array('value' => $manufacturer['aircraft_manufacturer'], 'id' => strtolower(str_replace(' ','-',$manufacturer['aircraft_manufacturer']))); |
|
15 | + $all_manufacturers[] = array('value' => $manufacturer['aircraft_manufacturer'], 'id' => strtolower(str_replace(' ', '-', $manufacturer['aircraft_manufacturer']))); |
|
16 | 16 | } |
17 | 17 | echo json_encode($all_manufacturers); |
18 | 18 | } elseif ($ask == 'aircrafttypes') { |
19 | 19 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
20 | 20 | $all_aircraft_types = array(); |
21 | - foreach($aircraft_types as $aircraft_type) |
|
21 | + foreach ($aircraft_types as $aircraft_type) |
|
22 | 22 | { |
23 | 23 | $all_aircraft_types[] = array('id' => $aircraft_type['aircraft_icao'], 'value' => $aircraft_type['aircraft_name'].' ('.$aircraft_type['aircraft_icao'].')'); |
24 | 24 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | } elseif ($ask == 'airlinenames') { |
27 | 27 | $airline_names = $Spotter->getAllAirlineNames(); |
28 | 28 | $all_airline_names = array(); |
29 | - foreach($airline_names as $airline_name) |
|
29 | + foreach ($airline_names as $airline_name) |
|
30 | 30 | { |
31 | 31 | $all_airline_names[] = array('id' => $airline_name['airline_icao'], 'value' => $airline_name['airline_name'].' ('.$airline_name['airline_icao'].')'); |
32 | 32 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } elseif ($ask == 'airlinecountries') { |
35 | 35 | $airline_countries = $Spotter->getAllAirlineCountries(); |
36 | 36 | $all_airline_countries = array(); |
37 | - foreach($airline_countries as $airline_country) |
|
37 | + foreach ($airline_countries as $airline_country) |
|
38 | 38 | { |
39 | 39 | $all_airline_countries[] = array('id' => $airline_country['airline_country'], 'value' => $airline_country['airline_country']); |
40 | 40 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $airport_names = $Spotter->getAllAirportNames(); |
44 | 44 | ksort($airport_names); |
45 | 45 | $all_airport_names = array(); |
46 | - foreach($airport_names as $airport_name) |
|
46 | + foreach ($airport_names as $airport_name) |
|
47 | 47 | { |
48 | 48 | $all_airport_names[] = array('id' => $airport_name['airport_icao'], 'value' => $airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')'); |
49 | 49 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | } elseif ($ask == 'airportcountries') { |
52 | 52 | $airport_countries = $Spotter->getAllAirportCountries(); |
53 | 53 | $all_airport_countries = array(); |
54 | - foreach($airport_countries as $airport_country) |
|
54 | + foreach ($airport_countries as $airport_country) |
|
55 | 55 | { |
56 | 56 | $all_airport_countries[] = array('id' => $airport_country['airport_country'], 'value' => $airport_country['airport_country']); |
57 | 57 | } |