@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $hour_array = $Spotter->countAllHoursByIdent($ident); |
30 | 30 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | var data = google.visualization.arrayToDataTable([ |
37 | 37 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
38 | 38 | $hour_data = ''; |
39 | - foreach($hour_array as $hour_item) |
|
39 | + foreach ($hour_array as $hour_item) |
|
40 | 40 | { |
41 | 41 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
42 | 42 | } |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | if (isset($_GET['start_date'])) { |
18 | 18 | //for the date manipulation into the query |
19 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
19 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
20 | 20 | $start_date = $_GET['start_date']." 00:00:00"; |
21 | 21 | $end_date = $_GET['end_date']." 00:00:00"; |
22 | 22 | $sql_date = $start_date.",".$end_date; |
23 | - } else if($_GET['start_date'] != ""){ |
|
23 | + } else if ($_GET['start_date'] != "") { |
|
24 | 24 | $start_date = $_GET['start_date']." 00:00:00"; |
25 | 25 | $sql_date = $start_date; |
26 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
26 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
27 | 27 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00"; |
28 | 28 | $sql_date = $end_date; |
29 | 29 | } else $sql_date = ''; |
@@ -31,21 +31,21 @@ discard block |
||
31 | 31 | |
32 | 32 | if (isset($_GET['highest_altitude'])) { |
33 | 33 | //for altitude manipulation |
34 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
34 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
35 | 35 | $end_altitude = $_GET['highest_altitude']; |
36 | 36 | $start_altitude = $_GET['lowest_altitude']; |
37 | 37 | $sql_altitude = $start_altitude.",".$end_altitude; |
38 | - } else if($_GET['highest_altitude'] != ""){ |
|
38 | + } else if ($_GET['highest_altitude'] != "") { |
|
39 | 39 | $end_altitude = $_GET['highest_altitude']; |
40 | 40 | $sql_altitude = $end_altitude; |
41 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
41 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
42 | 42 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
43 | 43 | $sql_altitude = $start_altitude; |
44 | 44 | } else $sql_altitude = ''; |
45 | 45 | } else $sql_altitude = ''; |
46 | 46 | |
47 | 47 | //calculuation for the pagination |
48 | -if(!isset($_GET['limit'])) |
|
48 | +if (!isset($_GET['limit'])) |
|
49 | 49 | { |
50 | 50 | if (!isset($_GET['number_results'])) |
51 | 51 | { |
@@ -53,14 +53,14 @@ discard block |
||
53 | 53 | $limit_end = 25; |
54 | 54 | $absolute_difference = 25; |
55 | 55 | } else { |
56 | - if ($_GET['number_results'] > 1000){ |
|
56 | + if ($_GET['number_results'] > 1000) { |
|
57 | 57 | $_GET['number_results'] = 1000; |
58 | 58 | } |
59 | 59 | $limit_start = 0; |
60 | 60 | $limit_end = $_GET['number_results']; |
61 | 61 | $absolute_difference = $_GET['number_results']; |
62 | 62 | } |
63 | -} else { |
|
63 | +} else { |
|
64 | 64 | $limit_explode = explode(",", $_GET['limit']); |
65 | 65 | $limit_start = $limit_explode[0]; |
66 | 66 | $limit_end = $limit_explode[1]; |
@@ -70,28 +70,28 @@ discard block |
||
70 | 70 | $limit_previous_1 = $limit_start - $absolute_difference; |
71 | 71 | $limit_previous_2 = $limit_end - $absolute_difference; |
72 | 72 | |
73 | -if (!empty($_GET)){ |
|
74 | - $q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING); |
|
75 | - $registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING); |
|
76 | - $aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING); |
|
77 | - $manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING); |
|
78 | - $highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING); |
|
79 | - $airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING); |
|
80 | - $airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING); |
|
81 | - $airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING); |
|
82 | - $airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING); |
|
83 | - $airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING); |
|
84 | - $callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING); |
|
85 | - $owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING); |
|
86 | - $pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING); |
|
87 | - $pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING); |
|
88 | - $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING); |
|
89 | - $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
90 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
91 | - $archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT); |
|
92 | - $origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_STRING); |
|
93 | - $origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING); |
|
94 | - $dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT); |
|
73 | +if (!empty($_GET)) { |
|
74 | + $q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
75 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
76 | + $aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
77 | + $manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
78 | + $highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
79 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
80 | + $airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
81 | + $airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
82 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
83 | + $airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
84 | + $callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
85 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
86 | + $pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
87 | + $pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
88 | + $departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
89 | + $arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
90 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
91 | + $archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT); |
|
92 | + $origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_STRING); |
|
93 | + $origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_STRING); |
|
94 | + $dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT); |
|
95 | 95 | if ($dist != '') { |
96 | 96 | if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934; |
97 | 97 | elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852; |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | if (!isset($sql_date)) $sql_date = ''; |
100 | 100 | if ($archive == 1) { |
101 | 101 | $SpotterArchive = new SpotterArchive(); |
102 | - $spotter_array = $SpotterArchive->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,'',$origlat,$origlon,$dist); |
|
102 | + $spotter_array = $SpotterArchive->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, '', $origlat, $origlon, $dist); |
|
103 | 103 | } else { |
104 | - $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,'',$origlat,$origlon,$dist); |
|
104 | + $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, '', $origlat, $origlon, $dist); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | print '<span class="sub-menu-statistic column mobile">'; |
@@ -134,12 +134,12 @@ discard block |
||
134 | 134 | //remove 3D=true parameter |
135 | 135 | $no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']); |
136 | 136 | $kmlURL = str_replace("http://", "kml://", $globalURL); |
137 | - if (!isset($_GET['3D'])){ |
|
137 | + if (!isset($_GET['3D'])) { |
|
138 | 138 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>'; |
139 | 139 | } else { |
140 | 140 | print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>'; |
141 | 141 | } |
142 | - if (isset($_GET['3D'])){ |
|
142 | + if (isset($_GET['3D'])) { |
|
143 | 143 | print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>'; |
144 | 144 | } else { |
145 | 145 | print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>'; |
@@ -160,30 +160,30 @@ discard block |
||
160 | 160 | print '<div class="column">'; |
161 | 161 | print '<div class="info">'; |
162 | 162 | print '<h1>'._("Search Results for").' '; |
163 | - if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$_GET['q'].'</span> '; } |
|
164 | - if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; } |
|
165 | - if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; } |
|
166 | - if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$_GET['registration'].'</span> '; } |
|
167 | - if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; } |
|
168 | - if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; } |
|
169 | - if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; } |
|
170 | - if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; } |
|
171 | - if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$_GET['airport'].'</span> '; } |
|
172 | - if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; } |
|
173 | - if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; } |
|
174 | - if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$_GET['owner'].'</span> '; } |
|
175 | - if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; } |
|
176 | - if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; } |
|
177 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; } |
|
178 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
179 | - if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
180 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; } |
|
181 | - if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; } |
|
182 | - if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; } |
|
183 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; } |
|
184 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
185 | - if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
186 | - if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; } |
|
163 | + if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$_GET['q'].'</span> '; } |
|
164 | + if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; } |
|
165 | + if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; } |
|
166 | + if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$_GET['registration'].'</span> '; } |
|
167 | + if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; } |
|
168 | + if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$_GET['airline'].'</span> '; } |
|
169 | + if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; } |
|
170 | + if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; } |
|
171 | + if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$_GET['airport'].'</span> '; } |
|
172 | + if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; } |
|
173 | + if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; } |
|
174 | + if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$_GET['owner'].'</span> '; } |
|
175 | + if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; } |
|
176 | + if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; } |
|
177 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; } |
|
178 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
179 | + if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; } |
|
180 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; } |
|
181 | + if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; } |
|
182 | + if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; } |
|
183 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; } |
|
184 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
185 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; } |
|
186 | + if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; } |
|
187 | 187 | print '</h1>'; |
188 | 188 | print '</div>'; |
189 | 189 | |
@@ -286,14 +286,14 @@ discard block |
||
286 | 286 | <option></option> |
287 | 287 | </select> |
288 | 288 | </div> |
289 | - <script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script> |
|
289 | + <script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script> |
|
290 | 290 | <div class="form-group"> |
291 | 291 | <label><?php echo _("Type"); ?></label> |
292 | 292 | <select name="aircraft" id="aircrafttypes" class="selectpicker" data-live-search="true"> |
293 | 293 | <option></option> |
294 | 294 | </select> |
295 | 295 | </div> |
296 | - <script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script> |
|
296 | + <script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script> |
|
297 | 297 | <div class="form-group"> |
298 | 298 | <label><?php echo _("Registration"); ?></label> |
299 | 299 | <input type="text" name="registration" value="<?php if (isset($_GET['registration'])) print $_GET['registration']; ?>" size="8" /> |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | <input type="text" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $_GET['pilot_name']; ?>" size="15" /> |
311 | 311 | </div> |
312 | 312 | <?php |
313 | -}else { |
|
313 | +} else { |
|
314 | 314 | ?> |
315 | 315 | <div class="form-group"> |
316 | 316 | <label><?php echo _("Owner name"); ?></label> |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | } |
321 | 321 | ?> |
322 | 322 | <div class="form-group checkbox"> |
323 | - <div><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div> |
|
323 | + <div><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div> |
|
324 | 324 | </div> |
325 | 325 | </fieldset> |
326 | 326 | <fieldset> |
@@ -331,23 +331,23 @@ discard block |
||
331 | 331 | <option></option> |
332 | 332 | </select> |
333 | 333 | </div> |
334 | - <script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script> |
|
334 | + <script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $_GET['airline']; ?>');</script> |
|
335 | 335 | <div class="form-group"> |
336 | 336 | <label><?php echo _("Country"); ?></label> |
337 | 337 | <select name="airline_country" id="airlinecountries" class="selectpicker" data-live-search="true"> |
338 | 338 | <option></option> |
339 | 339 | </select> |
340 | 340 | </div> |
341 | - <script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script> |
|
341 | + <script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script> |
|
342 | 342 | <div class="form-group"> |
343 | 343 | <label><?php echo _("Callsign"); ?></label> |
344 | 344 | <input type="text" name="callsign" value="<?php if (isset($_GET['callsign'])) print $_GET['callsign']; ?>" size="8" /> |
345 | 345 | </div> |
346 | 346 | <div class="form-group radio"> |
347 | - <div><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <label for="airline_type_all"><?php echo _("All airlines types"); ?></label></div> |
|
348 | - <div><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div> |
|
349 | - <div><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div> |
|
350 | - <div><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div> |
|
347 | + <div><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all") { print 'checked="checked"'; } ?>> <label for="airline_type_all"><?php echo _("All airlines types"); ?></label></div> |
|
348 | + <div><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger") { print 'checked="checked"'; } ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div> |
|
349 | + <div><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "cargo") { print 'checked="checked"'; } ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div> |
|
350 | + <div><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "military") { print 'checked="checked"'; } ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div> |
|
351 | 351 | </div> |
352 | 352 | </fieldset> |
353 | 353 | <fieldset> |
@@ -358,14 +358,14 @@ discard block |
||
358 | 358 | <option></option> |
359 | 359 | </select> |
360 | 360 | </div> |
361 | - <script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script> |
|
361 | + <script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script> |
|
362 | 362 | <div class="form-group"> |
363 | 363 | <label><?php echo _("Country"); ?></label> |
364 | 364 | <select name="airport_country" id="airportcountries" class="selectpicker" data-live-search="true"> |
365 | 365 | <option></option> |
366 | 366 | </select> |
367 | 367 | </div> |
368 | - <script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script> |
|
368 | + <script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script> |
|
369 | 369 | </fieldset> |
370 | 370 | <fieldset> |
371 | 371 | <legend><?php echo _("Route"); ?></legend> |
@@ -375,14 +375,14 @@ discard block |
||
375 | 375 | <option></option> |
376 | 376 | </select> |
377 | 377 | </div> |
378 | - <script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script> |
|
378 | + <script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script> |
|
379 | 379 | <div class="form-group"> |
380 | 380 | <label><?php echo _("Arrival Airport"); ?></label> |
381 | 381 | <select name="arrival_airport_route" id="arrivalairportnames" class="selectpicker" data-live-search="true"> |
382 | 382 | <option></option> |
383 | 383 | </select> |
384 | 384 | </div> |
385 | - <script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script> |
|
385 | + <script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script> |
|
386 | 386 | </fieldset> |
387 | 387 | <fieldset> |
388 | 388 | <legend><?php echo _("Date"); ?></legend> |
@@ -432,9 +432,9 @@ discard block |
||
432 | 432 | <option></option> |
433 | 433 | <?php |
434 | 434 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
435 | -foreach($altitude_array as $altitude) |
|
435 | +foreach ($altitude_array as $altitude) |
|
436 | 436 | { |
437 | - if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
437 | + if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude) |
|
438 | 438 | { |
439 | 439 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
440 | 440 | } else { |
@@ -450,9 +450,9 @@ discard block |
||
450 | 450 | <option></option> |
451 | 451 | <?php |
452 | 452 | $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000); |
453 | -foreach($altitude_array as $altitude) |
|
453 | +foreach ($altitude_array as $altitude) |
|
454 | 454 | { |
455 | - if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
455 | + if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude) |
|
456 | 456 | { |
457 | 457 | print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>'; |
458 | 458 | } else { |
@@ -484,10 +484,10 @@ discard block |
||
484 | 484 | <label><?php echo _("Number of Results"); ?></label> |
485 | 485 | <select name="number_results"> |
486 | 486 | <?php |
487 | -$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
488 | -foreach($number_results_array as $number) |
|
487 | +$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000); |
|
488 | +foreach ($number_results_array as $number) |
|
489 | 489 | { |
490 | - if(isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
490 | + if (isset($_GET['number_results']) && $_GET['number_results'] == $number) |
|
491 | 491 | { |
492 | 492 | print '<option value="'.$number.'" selected="selected">'.$number.'</option>'; |
493 | 493 | } else { |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | ?> |
504 | 504 | <fieldset> |
505 | 505 | <div class="form-group"> |
506 | - <label><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label> |
|
506 | + <label><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label> |
|
507 | 507 | <input type="checkbox" name="archive" value="1" /> |
508 | 508 | </div> |
509 | 509 | </fieldset> |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Airlines by Country of %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Airlines by Country of %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | 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>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByCountry($country); |
56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
57 | 57 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | var data = google.visualization.arrayToDataTable([ |
63 | 63 | ["'._("Country").'", "'._("# of times").'"], '; |
64 | 64 | $country_data = ''; |
65 | - foreach($airline_array as $airline_item) |
|
65 | + foreach ($airline_array as $airline_item) |
|
66 | 66 | { |
67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
68 | 68 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | print '</thead>'; |
97 | 97 | print '<tbody>'; |
98 | 98 | $i = 1; |
99 | - foreach($airline_array as $airline_item) |
|
99 | + foreach ($airline_array as $airline_item) |
|
100 | 100 | { |
101 | 101 | print '<tr>'; |
102 | 102 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | header('Content-disposition: attachment; filename="atc.geojson"'); |
8 | 8 | } |
9 | 9 | header('Content-Type: text/javascript'); |
10 | -$ATC=new ATC(); |
|
10 | +$ATC = new ATC(); |
|
11 | 11 | if (isset($_GET['coord'])) |
12 | 12 | { |
13 | 13 | //$coords = explode(',',$_GET['coord']); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | if (!empty($spotter_array)) |
22 | 22 | { |
23 | - foreach($spotter_array as $spotter_item) |
|
23 | + foreach ($spotter_array as $spotter_item) |
|
24 | 24 | { |
25 | 25 | date_default_timezone_set('UTC'); |
26 | 26 | //waypoint plotting |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $output .= '}'; |
44 | 44 | $output .= '},'; |
45 | 45 | } |
46 | - $output = substr($output, 0, -1); |
|
46 | + $output = substr($output, 0, -1); |
|
47 | 47 | } |
48 | 48 | $output .= ']}'; |
49 | 49 |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | require_once('require/class.Connection.php'); |
3 | -require_once('require/class.Spotter.php');; |
|
3 | +require_once('require/class.Spotter.php'); ; |
|
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | require_once('require/class.SpotterLive.php'); |
6 | 6 | |
7 | 7 | $title = "Current Activity"; |
8 | 8 | require_once('header.php'); |
9 | -$SpotterLive=new SpotterLive(); |
|
9 | +$SpotterLive = new SpotterLive(); |
|
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]; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | print '<div class="table column">'; |
37 | 37 | print '<p>'._("The table below shows the detailed information of all current flights.").'</p>'; |
38 | 38 | |
39 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
39 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
40 | 40 | if (isset($_GET['sort'])) { |
41 | 41 | $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort); |
42 | 42 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | |
29 | 29 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByIdent($ident); |
30 | 30 | if (!empty($manufacturers_array)) |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | print '</thead>'; |
40 | 40 | print '<tbody>'; |
41 | 41 | $i = 1; |
42 | - foreach($manufacturers_array as $manufacturer_item) |
|
42 | + foreach ($manufacturers_array as $manufacturer_item) |
|
43 | 43 | { |
44 | 44 | print '<tr>'; |
45 | 45 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,15 +3,15 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | 7 | |
8 | 8 | $Spotter = new Spotter(); |
9 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
9 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
10 | 10 | else $spotter_array = array(); |
11 | 11 | |
12 | 12 | if (!empty($spotter_array)) |
13 | 13 | { |
14 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
14 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
15 | 15 | require_once('header.php'); |
16 | 16 | print '<div class="select-item">'; |
17 | 17 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | print '</div>'; |
23 | 23 | |
24 | 24 | print '<div class="info column">'; |
25 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
25 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
26 | 26 | print '</div>'; |
27 | 27 | |
28 | 28 | include('date-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
31 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
31 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
32 | 32 | |
33 | 33 | $airline_array = $Spotter->countAllAirlineCountriesByDate($_GET['date']); |
34 | 34 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | var data = google.visualization.arrayToDataTable([ |
41 | 41 | ["'._("Country").'", "'._("# of times").'"], '; |
42 | 42 | $country_data = ''; |
43 | - foreach($airline_array as $airline_item) |
|
43 | + foreach ($airline_array as $airline_item) |
|
44 | 44 | { |
45 | 45 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
46 | 46 | } |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | print '</thead>'; |
75 | 75 | print '<tbody>'; |
76 | 76 | $i = 1; |
77 | - foreach($airline_array as $airline_item) |
|
77 | + foreach ($airline_array as $airline_item) |
|
78 | 78 | { |
79 | 79 | print '<tr>'; |
80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,8 +7,8 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING))); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | |
13 | 13 | if (isset($_GET['sort'])) { |
14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | |
19 | 19 | if (!empty($spotter_array)) |
20 | 20 | { |
21 | - $title = sprintf(_("Most Common Arrival Airports by Country from %s"),$country); |
|
21 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $country); |
|
22 | 22 | require_once('header.php'); |
23 | 23 | print '<div class="select-item">'; |
24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
26 | 26 | print '<option></option>'; |
27 | 27 | $all_countries = $Spotter->getAllCountries(); |
28 | - foreach($all_countries as $all_country) |
|
28 | + foreach ($all_countries as $all_country) |
|
29 | 29 | { |
30 | - if($country == $all_country['country']) |
|
30 | + if ($country == $all_country['country']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | if ($_GET['country'] != "NA") |
43 | 43 | { |
44 | 44 | print '<div class="info column">'; |
45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
46 | 46 | print '</div>'; |
47 | 47 | } else { |
48 | 48 | 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>'; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | include('country-sub-menu.php'); |
52 | 52 | print '<div class="column">'; |
53 | 53 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
54 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
54 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
55 | 55 | |
56 | 56 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByCountry($country); |
57 | 57 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | var data = google.visualization.arrayToDataTable([ |
64 | 64 | ["'._("Country").'", "'._("# of times").'"], '; |
65 | 65 | $country_data = ''; |
66 | - foreach($airport_country_array as $airport_item) |
|
66 | + foreach ($airport_country_array as $airport_item) |
|
67 | 67 | { |
68 | 68 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
69 | 69 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | print '</thead>'; |
98 | 98 | print '<tbody>'; |
99 | 99 | $i = 1; |
100 | - foreach($airport_country_array as $airport_item) |
|
100 | + foreach ($airport_country_array as $airport_item) |
|
101 | 101 | { |
102 | 102 | print '<tr>'; |
103 | 103 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | <?php |
5 | 5 | if (isset($sql_time)) { |
6 | 6 | ?> |
7 | - <i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i> |
|
7 | + <i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i> |
|
8 | 8 | <br /> |
9 | 9 | <?php |
10 | 10 | } |