@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Airlines by Country to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Airlines by Country to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | |
62 | 62 | $airline_array = $Spotter->countAllAirlineCountriesByAirport($airport); |
63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
67 | 67 | print 'var series = ['; |
68 | 68 | $country_data = ''; |
69 | - foreach($airline_array as $airline_item) |
|
69 | + foreach ($airline_array as $airline_item) |
|
70 | 70 | { |
71 | 71 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
72 | 72 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | print '</thead>'; |
115 | 115 | print '<tbody>'; |
116 | 116 | $i = 1; |
117 | - foreach($airline_array as $airline_item) |
|
117 | + foreach ($airline_array as $airline_item) |
|
118 | 118 | { |
119 | 119 | print '<tr>'; |
120 | 120 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
29 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | |
62 | 62 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirport($airport); |
63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
67 | 67 | print 'var series = ['; |
68 | 68 | $country_data = ''; |
69 | - foreach($airport_country_array as $airport_item) |
|
69 | + foreach ($airport_country_array as $airport_item) |
|
70 | 70 | { |
71 | 71 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
72 | 72 | } |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | print '</thead>'; |
115 | 115 | print '<tbody>'; |
116 | 116 | $i = 1; |
117 | - foreach($airport_country_array as $airport_item) |
|
117 | + foreach ($airport_country_array as $airport_item) |
|
118 | 118 | { |
119 | 119 | print '<tr>'; |
120 | 120 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | print '</thead>'; |
76 | 76 | print '<tbody>'; |
77 | 77 | $i = 1; |
78 | - foreach($aircraft_array as $aircraft_item) |
|
78 | + foreach ($aircraft_array as $aircraft_item) |
|
79 | 79 | { |
80 | 80 | print '<tr>'; |
81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirport($airport); |
64 | 64 | if (!empty($manufacturers_array)) |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | print '</thead>'; |
74 | 74 | print '<tbody>'; |
75 | 75 | $i = 1; |
76 | - foreach($manufacturers_array as $manufacturer_item) |
|
76 | + foreach ($manufacturers_array as $manufacturer_item) |
|
77 | 77 | { |
78 | 78 | print '<tr>'; |
79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,17 +5,17 @@ discard block |
||
5 | 5 | require_once('require/class.Stats.php'); |
6 | 6 | require_once('require/class.METAR.php'); |
7 | 7 | |
8 | -if (!isset($_GET['airport'])){ |
|
8 | +if (!isset($_GET['airport'])) { |
|
9 | 9 | header('Location: '.$globalURL.'/airport'); |
10 | 10 | } else { |
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //calculation for the pagination |
13 | - if(!isset($_GET['limit'])) |
|
13 | + if (!isset($_GET['limit'])) |
|
14 | 14 | { |
15 | 15 | $limit_start = 0; |
16 | 16 | $limit_end = 25; |
17 | 17 | $absolute_difference = 25; |
18 | - } else { |
|
18 | + } else { |
|
19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
20 | 20 | $limit_start = $limit_explode[0]; |
21 | 21 | $limit_end = $limit_explode[1]; |
@@ -28,19 +28,19 @@ discard block |
||
28 | 28 | $limit_next = $limit_end + $absolute_difference; |
29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
31 | - $airport_icao = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
31 | + $airport_icao = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
32 | 32 | $airport = $airport_icao; |
33 | 33 | $page_url = $globalURL.'/airport/'.$airport_icao; |
34 | 34 | |
35 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
35 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport_icao); |
37 | 37 | |
38 | 38 | if (!empty($airport_array)) |
39 | 39 | { |
40 | 40 | if ($sort != '') { |
41 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, $sort); |
|
41 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, $sort); |
|
42 | 42 | } else { |
43 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, ''); |
|
43 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, ''); |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if (isset($globalMETAR) && $globalMETAR) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | //print_r($metar_parse); |
52 | 52 | } |
53 | 53 | |
54 | - $title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
54 | + $title = sprintf(_("Detailed View for %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
55 | 55 | |
56 | 56 | require_once('header.php'); |
57 | 57 | |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | $airport_names = $Stats->getAllAirportNames(); |
64 | 64 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
65 | 65 | ksort($airport_names); |
66 | - foreach($airport_names as $airport_name) |
|
66 | + foreach ($airport_names as $airport_name) |
|
67 | 67 | { |
68 | - if($airport_icao == $airport_name['airport_icao']) |
|
68 | + if ($airport_icao == $airport_name['airport_icao']) |
|
69 | 69 | { |
70 | 70 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
71 | 71 | } else { |
@@ -112,15 +112,15 @@ discard block |
||
112 | 112 | $date_data = ''; |
113 | 113 | $departure_data = ''; |
114 | 114 | $arrival_data = ''; |
115 | - foreach($all_data as $data) |
|
115 | + foreach ($all_data as $data) |
|
116 | 116 | { |
117 | 117 | $date_data .= '"'.$data['date'].'",'; |
118 | 118 | $departure_data .= $data['departure'].','; |
119 | 119 | $arrival_data .= $data['arrival'].','; |
120 | 120 | } |
121 | - $date_data = "['x',".substr($date_data,0,-1)."]"; |
|
122 | - $departure_data = "['departure',".substr($departure_data,0,-1)."]"; |
|
123 | - $arrival_data = "['arrival',".substr($arrival_data,0,-1)."]"; |
|
121 | + $date_data = "['x',".substr($date_data, 0, -1)."]"; |
|
122 | + $departure_data = "['departure',".substr($departure_data, 0, -1)."]"; |
|
123 | + $arrival_data = "['arrival',".substr($arrival_data, 0, -1)."]"; |
|
124 | 124 | print 'c3.generate({ |
125 | 125 | bindto: "#chart", |
126 | 126 | data: { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | print _("Dew point:").' '.$metar_parse['dew'].' °C'." - "; |
178 | 178 | } |
179 | 179 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
180 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
180 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
181 | 181 | print _("Humidity:").' '.$humidity.'%'." - "; |
182 | 182 | } |
183 | 183 | if (isset($metar_parse['QNH'])) { |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | print '<div class="table column">'; |
194 | 194 | if ($airport_array[0]['iata'] != "NA") |
195 | 195 | { |
196 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
196 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
197 | 197 | } |
198 | 198 | include('table-output.php'); |
199 | 199 | print '<div class="pagination">'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -57,14 +57,14 @@ discard block |
||
57 | 57 | include('airport-sub-menu.php'); |
58 | 58 | print '<div class="column">'; |
59 | 59 | print '<h2>'._("Most Common Airlines").'</h2>'; |
60 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
60 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
61 | 61 | |
62 | 62 | $airline_array = $Spotter->countAllAirlinesByAirport($airport); |
63 | 63 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
64 | 64 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3pie.min.js"></script>'; |
65 | 65 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
66 | 66 | $airline_data = ''; |
67 | - foreach($airline_array as $airline_item) |
|
67 | + foreach ($airline_array as $airline_item) |
|
68 | 68 | { |
69 | 69 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
70 | 70 | } |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | print '</thead>'; |
92 | 92 | print '<tbody>'; |
93 | 93 | $i = 1; |
94 | - foreach($airline_array as $airline_item) |
|
94 | + foreach ($airline_array as $airline_item) |
|
95 | 95 | { |
96 | 96 | print '<tr>'; |
97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,16 +7,16 @@ discard block |
||
7 | 7 | |
8 | 8 | if (isset($_POST['airport'])) |
9 | 9 | { |
10 | - header('Location: '.$globalURL.'/airport/'.filter_input(INPUT_POST,'airport',FILTER_SANITIZE_STRING)); |
|
11 | -} else if (isset($_GET['airport'])){ |
|
10 | + header('Location: '.$globalURL.'/airport/'.filter_input(INPUT_POST, 'airport', FILTER_SANITIZE_STRING)); |
|
11 | +} else if (isset($_GET['airport'])) { |
|
12 | 12 | $Spotter = new Spotter(); |
13 | 13 | //calculuation for the pagination |
14 | - if($_GET['limit'] == "") |
|
14 | + if ($_GET['limit'] == "") |
|
15 | 15 | { |
16 | 16 | $limit_start = 0; |
17 | 17 | $limit_end = 25; |
18 | 18 | $absolute_difference = 25; |
19 | - } else { |
|
19 | + } else { |
|
20 | 20 | $limit_explode = explode(",", $_GET['limit']); |
21 | 21 | $limit_start = $limit_explode[0]; |
22 | 22 | $limit_end = $limit_explode[1]; |
@@ -30,14 +30,14 @@ discard block |
||
30 | 30 | $limit_previous_1 = $limit_start - $absolute_difference; |
31 | 31 | $limit_previous_2 = $limit_end - $absolute_difference; |
32 | 32 | |
33 | - $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
34 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
33 | + $airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
34 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
35 | 35 | $page_url = $globalURL.'/airport/'.$airport; |
36 | 36 | $airport_array = $Spotter->getAllAirportInfo($airport); |
37 | 37 | |
38 | 38 | if (!empty($airport_array)) |
39 | 39 | { |
40 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort); |
|
40 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort); |
|
41 | 41 | $title = $airport_array[0]['city'].', '.$airport_array[0]['name'].' ('.$airport_array[0]['icao'].')'; |
42 | 42 | |
43 | 43 | require_once('header.php'); |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | $airport_names = $Spotter->getAllAirportNames(); |
53 | 53 | } |
54 | 54 | ksort($airport_names); |
55 | - foreach($airport_names as $airport_name) |
|
55 | + foreach ($airport_names as $airport_name) |
|
56 | 56 | { |
57 | - if($airport == $airport_name['airport_icao']) |
|
57 | + if ($airport == $airport_name['airport_icao']) |
|
58 | 58 | { |
59 | 59 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
60 | 60 | } else { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | print '<div class="table column">'; |
88 | 88 | if ($airport_array[0]['iata'] != "NA") |
89 | 89 | { |
90 | - print '<p>'.sprintf(_("The table below shows the route(s) aircraft have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>'; |
|
90 | + print '<p>'.sprintf(_("The table below shows the route(s) aircraft have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>'; |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | include('table-output.php'); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; |
110 | 110 | } |
111 | 111 | } else { |
112 | - $Spotter= new Spotter(); |
|
112 | + $Spotter = new Spotter(); |
|
113 | 113 | $Stats = new Stats(); |
114 | 114 | $Common = new Common(); |
115 | 115 | $title = _("Airports"); |
@@ -123,11 +123,11 @@ discard block |
||
123 | 123 | ksort($airport_names); |
124 | 124 | $previous = null; |
125 | 125 | print '<div class="alphabet-legend">'; |
126 | - foreach($airport_names as $value) { |
|
126 | + foreach ($airport_names as $value) { |
|
127 | 127 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airport_city'], 0, 1)); |
128 | - if($previous !== $firstLetter) |
|
128 | + if ($previous !== $firstLetter) |
|
129 | 129 | { |
130 | - if ($previous !== null){ |
|
130 | + if ($previous !== null) { |
|
131 | 131 | print ' | '; |
132 | 132 | } |
133 | 133 | print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>'; |
@@ -136,13 +136,13 @@ discard block |
||
136 | 136 | } |
137 | 137 | print '</div>'; |
138 | 138 | $previous = null; |
139 | - foreach($airport_names as $value) { |
|
139 | + foreach ($airport_names as $value) { |
|
140 | 140 | $firstLetter = strtoupper($Common->replace_mb_substr($value['airport_city'], 0, 1)); |
141 | 141 | if ($firstLetter != "") |
142 | 142 | { |
143 | - if($previous !== $firstLetter) |
|
143 | + if ($previous !== $firstLetter) |
|
144 | 144 | { |
145 | - if ($previous !== null){ |
|
145 | + if ($previous !== null) { |
|
146 | 146 | print '</div>'; |
147 | 147 | } |
148 | 148 | print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
14 | 14 | |
15 | 15 | if (!empty($airport_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
27 | 27 | ksort($airport_names); |
28 | - foreach($airport_names as $airport_name) |
|
28 | + foreach ($airport_names as $airport_name) |
|
29 | 29 | { |
30 | - if($airport == $airport_name['airport_icao']) |
|
30 | + if ($airport == $airport_name['airport_icao']) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | include('airport-sub-menu.php'); |
59 | 59 | print '<div class="column">'; |
60 | 60 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
61 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
62 | 62 | |
63 | 63 | $hour_array = $Spotter->countAllHoursByAirport($airport); |
64 | 64 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | $hour_data = ''; |
69 | 69 | $hour_cnt = ''; |
70 | 70 | $last = 0; |
71 | - foreach($hour_array as $hour_item) |
|
71 | + foreach ($hour_array as $hour_item) |
|
72 | 72 | { |
73 | - while($last != $hour_item['hour_name']) { |
|
73 | + while ($last != $hour_item['hour_name']) { |
|
74 | 74 | $hour_data .= '"'.$last.':00",'; |
75 | 75 | $hour_cnt .= '0,'; |
76 | 76 | $last++; |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $hour_cnt .= $hour_item['hour_count'].','; |
81 | 81 | } |
82 | 82 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
83 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
83 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
84 | 84 | print 'c3.generate({ |
85 | 85 | bindto: "#chartHour", |
86 | 86 | data: { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | print '</thead>'; |
104 | 104 | print '<tbody>'; |
105 | 105 | $i = 1; |
106 | - foreach($hour_array as $hour_item) |
|
106 | + foreach ($hour_array as $hour_item) |
|
107 | 107 | { |
108 | 108 | print '<tr>'; |
109 | 109 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airport'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | 16 | //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
17 | - $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
17 | + $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
20 | 20 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $airport_names = $Stats->getAllAirportNames(); |
25 | 25 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
26 | 26 | ksort($airport_names); |
27 | - foreach($airport_names as $airport_name) |
|
27 | + foreach ($airport_names as $airport_name) |
|
28 | 28 | { |
29 | - if($airport == $airport_name['airport_icao']) |
|
29 | + if ($airport == $airport_name['airport_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
32 | 32 | } else { |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | include('airport-sub-menu.php'); |
57 | 57 | print '<div class="column">'; |
58 | 58 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
59 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
59 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
60 | 60 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirport($airport); |
61 | 61 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
62 | 62 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | print '<script>'; |
66 | 66 | print 'var series = ['; |
67 | 67 | $airport_data = ''; |
68 | - foreach($airport_airport_array as $airport_item) |
|
68 | + foreach ($airport_airport_array as $airport_item) |
|
69 | 69 | { |
70 | 70 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
71 | 71 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | print '</thead>'; |
121 | 121 | print '<tbody>'; |
122 | 122 | $i = 1; |
123 | - foreach($airport_airport_array as $airport_item) |
|
123 | + foreach ($airport_airport_array as $airport_item) |
|
124 | 124 | { |
125 | 125 | print '<tr>'; |
126 | 126 | print '<td><strong>'.$i.'</strong></td>'; |