@@ -7,14 +7,14 @@ 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); |
|
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 | 12 | |
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Routes from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Routes from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | print '<option></option>'; |
24 | 24 | $all_manufacturers = $Spotter->getAllManufacturers(); |
25 | - foreach($all_manufacturers as $all_manufacturer) |
|
25 | + foreach ($all_manufacturers as $all_manufacturer) |
|
26 | 26 | { |
27 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
27 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
30 | 30 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | include('manufacturer-sub-menu.php'); |
44 | 44 | print '<div class="column">'; |
45 | 45 | print '<h2>'._("Most Common Routes").'</h2>'; |
46 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
46 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
47 | 47 | |
48 | 48 | $route_array = $Spotter->countAllRoutesByManufacturer($manufacturer); |
49 | 49 | if (!empty($route_array)) |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | print '</thead>'; |
61 | 61 | print '<tbody>'; |
62 | 62 | $i = 1; |
63 | - foreach($route_array as $route_item) |
|
63 | + foreach ($route_array as $route_item) |
|
64 | 64 | { |
65 | 65 | print '<tr>'; |
66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
8 | 8 | |
9 | 9 | if (!empty($spotter_array)) |
10 | 10 | { |
11 | - $title = sprintf(_("Most Common Arrival Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
11 | + $title = sprintf(_("Most Common Arrival Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | 12 | |
13 | 13 | require_once('header.php'); |
14 | 14 | print '<div class="select-item">'; |
@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | print '</div>'; |
21 | 21 | |
22 | 22 | print '<div class="info column">'; |
23 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
23 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
24 | 24 | print '</div>'; |
25 | 25 | |
26 | 26 | include('date-sub-menu.php'); |
27 | 27 | print '<div class="column">'; |
28 | 28 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
29 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
29 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
30 | 30 | $airport_airport_array = $Spotter->countAllArrivalAirportsByDate($_GET['date']); |
31 | 31 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
32 | 32 | <script> |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ["'._("Airport").'", "'._("# of times").'"],'; |
42 | 42 | |
43 | 43 | $airport_data = ''; |
44 | - foreach($airport_airport_array as $airport_item) |
|
44 | + foreach ($airport_airport_array as $airport_item) |
|
45 | 45 | { |
46 | 46 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
47 | 47 | $name = str_replace("'", "", $name); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '</thead>'; |
81 | 81 | print '<tbody>'; |
82 | 82 | $i = 1; |
83 | - foreach($airport_airport_array as $airport_item) |
|
83 | + foreach ($airport_airport_array as $airport_item) |
|
84 | 84 | { |
85 | 85 | print '<tr>'; |
86 | 86 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $title = _("Unknown Date"); |
106 | 106 | require_once('header.php'); |
107 | 107 | print '<h1>'._("Error").'</h1>'; |
108 | - print '<p>'._("Sorry, this date does not exist in this database. :(");'</p>'; |
|
108 | + print '<p>'._("Sorry, this date does not exist in this database. :("); '</p>'; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | require_once('footer.php'); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airline'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
12 | 12 | |
13 | 13 | if (!empty($spotter_array)) |
14 | 14 | { |
15 | - $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
15 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
16 | 16 | require_once('header.php'); |
17 | 17 | print '<div class="select-item">'; |
18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
20 | 20 | print '<option></option>'; |
21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
22 | - foreach($airline_names as $airline_name) |
|
22 | + foreach ($airline_names as $airline_name) |
|
23 | 23 | { |
24 | - if($airline == $airline_name['airline_icao']) |
|
24 | + if ($airline == $airline_name['airline_icao']) |
|
25 | 25 | { |
26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | include('airline-sub-menu.php'); |
60 | 60 | print '<div class="column">'; |
61 | 61 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
62 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
62 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
63 | 63 | |
64 | 64 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirline($airline); |
65 | 65 | if (!empty($manufacturers_array)) |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | print '</thead>'; |
75 | 75 | print '<tbody>'; |
76 | 76 | $i = 1; |
77 | - foreach($manufacturers_array as $manufacturer_item) |
|
77 | + foreach ($manufacturers_array as $manufacturer_item) |
|
78 | 78 | { |
79 | 79 | print '<tr>'; |
80 | 80 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airline'])) { |
6 | - header('Location: '.$globalURL.'/airline'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airline'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -40,8 +40,7 @@ |
||
40 | 40 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
41 | 41 | { |
42 | 42 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
43 | - } |
|
44 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
43 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
45 | 44 | { |
46 | 45 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
47 | 46 | } |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airport'])) { |
6 | - header('Location: '.$globalURL.'/airport'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airport'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | function drawChart() { |
67 | 67 | var data = google.visualization.arrayToDataTable([ |
68 | 68 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
69 | - $hour_data = ''; |
|
69 | + $hour_data = ''; |
|
70 | 70 | foreach($hour_array as $hour_item) |
71 | 71 | { |
72 | 72 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $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 | 17 | |
18 | 18 | require_once('header.php'); |
19 | 19 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $airport_names = $Spotter->getAllAirportNames(); |
24 | 24 | ksort($airport_names); |
25 | - foreach($airport_names as $airport_name) |
|
25 | + foreach ($airport_names as $airport_name) |
|
26 | 26 | { |
27 | - if($airport == $airport_name['airport_icao']) |
|
27 | + if ($airport == $airport_name['airport_icao']) |
|
28 | 28 | { |
29 | 29 | 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>'; |
30 | 30 | } else { |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | |
55 | 55 | include('airport-sub-menu.php'); |
56 | 56 | print '<div class="column">'; |
57 | - print '<h2>'._("Most Common Time of Day");'</h2>'; |
|
58 | - 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>'; |
|
57 | + print '<h2>'._("Most Common Time of Day"); '</h2>'; |
|
58 | + 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>'; |
|
59 | 59 | |
60 | 60 | $hour_array = $Spotter->countAllHoursByAirport($airport); |
61 | 61 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | var data = google.visualization.arrayToDataTable([ |
68 | 68 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
69 | 69 | $hour_data = ''; |
70 | - foreach($hour_array as $hour_item) |
|
70 | + foreach ($hour_array as $hour_item) |
|
71 | 71 | { |
72 | 72 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
73 | 73 | } |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $airport_names = $Spotter->getAllAirportNames(); |
23 | 23 | ksort($airport_names); |
24 | - foreach($airport_names as $airport_name) |
|
24 | + foreach ($airport_names as $airport_name) |
|
25 | 25 | { |
26 | - if($airport == $airport_name['airport_icao']) |
|
26 | + if ($airport == $airport_name['airport_icao']) |
|
27 | 27 | { |
28 | 28 | 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>'; |
29 | 29 | } else { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | include('airport-sub-menu.php'); |
54 | 54 | print '<div class="column">'; |
55 | 55 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
56 | - 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>'; |
|
56 | + 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>'; |
|
57 | 57 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirport($airport); |
58 | 58 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
59 | 59 | <script> |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | var data = google.visualization.arrayToDataTable([ |
68 | 68 | ["'._("Airport").'", "'._("# of times").'"],'; |
69 | 69 | $airport_data = ''; |
70 | - foreach($airport_airport_array as $airport_item) |
|
70 | + foreach ($airport_airport_array as $airport_item) |
|
71 | 71 | { |
72 | 72 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
73 | 73 | $name = str_replace("'", "", $name); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | print '</thead>'; |
107 | 107 | print '<tbody>'; |
108 | 108 | $i = 1; |
109 | - foreach($airport_airport_array as $airport_item) |
|
109 | + foreach ($airport_airport_array as $airport_item) |
|
110 | 110 | { |
111 | 111 | print '<tr>'; |
112 | 112 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airport'])) { |
6 | - header('Location: '.$globalURL.'/airport'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airport'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['aircraft_type'])) { |
6 | - header('Location: '.$globalURL.'/aircraft'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/aircraft'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | $aircraft_type = filter_input(FILTER_INPUT,'aircraft_type',FILTER_SANITIZE_STRING); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | function drawChart() { |
61 | 61 | var data = google.visualization.arrayToDataTable([ |
62 | 62 | ["'._("Country").'", "'._("# of times").'"], '; |
63 | - $country_data = ''; |
|
63 | + $country_data = ''; |
|
64 | 64 | foreach($airport_country_array as $airport_item) |
65 | 65 | { |
66 | 66 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
@@ -7,23 +7,23 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | |
10 | -$aircraft_type = filter_input(FILTER_INPUT,'aircraft_type',FILTER_SANITIZE_STRING); |
|
10 | +$aircraft_type = filter_input(FILTER_INPUT, '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 Arrival Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports by Country for %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 $aircraft_type) |
|
24 | + foreach ($aircraft_types as $aircraft_type) |
|
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 { |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | include('aircraft-sub-menu.php'); |
51 | 51 | print '<div class="column">'; |
52 | 52 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
53 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
53 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
54 | 54 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAircraft($aircraft_type); |
55 | 55 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
56 | 56 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | var data = google.visualization.arrayToDataTable([ |
62 | 62 | ["'._("Country").'", "'._("# of times").'"], '; |
63 | 63 | $country_data = ''; |
64 | - foreach($airport_country_array as $airport_item) |
|
64 | + foreach ($airport_country_array as $airport_item) |
|
65 | 65 | { |
66 | 66 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
67 | 67 | } |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | print '</thead>'; |
95 | 95 | print '<tbody>'; |
96 | 96 | $i = 1; |
97 | - foreach($airport_country_array as $airport_item) |
|
97 | + foreach ($airport_country_array as $airport_item) |
|
98 | 98 | { |
99 | 99 | print '<tr>'; |
100 | 100 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | header('Location: '.$globalURL.'/airport'); |
7 | 7 | die(); |
8 | 8 | } |
9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
10 | 10 | $Spotter = new Spotter(); |
11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
13 | 13 | |
14 | 14 | if (!empty($airport_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Airlines by Country to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
16 | + $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 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -21,9 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $airport_names = $Spotter->getAllAirportNames(); |
23 | 23 | ksort($airport_names); |
24 | - foreach($airport_names as $airport_name) |
|
24 | + foreach ($airport_names as $airport_name) |
|
25 | 25 | { |
26 | - if($airport == $airport_name['airport_icao']) |
|
26 | + if ($airport == $airport_name['airport_icao']) |
|
27 | 27 | { |
28 | 28 | 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>'; |
29 | 29 | } else { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | include('airport-sub-menu.php'); |
55 | 55 | print '<div class="column">'; |
56 | 56 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
57 | - 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>'; |
|
57 | + 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>'; |
|
58 | 58 | |
59 | 59 | $airline_array = $Spotter->countAllAirlineCountriesByAirport($airport); |
60 | 60 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | var data = google.visualization.arrayToDataTable([ |
67 | 67 | ["'._("Country").'", "'._("# of times").'"], '; |
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'].'",'.$airline_item['airline_country_count'].'],'; |
72 | 72 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | print '</thead>'; |
101 | 101 | print '<tbody>'; |
102 | 102 | $i = 1; |
103 | - foreach($airline_array as $airline_item) |
|
103 | + foreach ($airline_array as $airline_item) |
|
104 | 104 | { |
105 | 105 | print '<tr>'; |
106 | 106 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['airport'])) { |
6 | - header('Location: '.$globalURL.'/airport'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/airport'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
10 | 10 | $Spotter = new Spotter(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | function drawChart() { |
66 | 66 | var data = google.visualization.arrayToDataTable([ |
67 | 67 | ["'._("Country").'", "'._("# of times").'"], '; |
68 | - $country_data = ''; |
|
68 | + $country_data = ''; |
|
69 | 69 | foreach($airport_country_array as $airport_item) |
70 | 70 | { |
71 | 71 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else $spotter_array = array(); |
|
12 | 12 | |
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"),$registration); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"), $registration); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$_GET['registration'].' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | include('registration-sub-menu.php'); |
26 | 26 | print '<div class="column">'; |
27 | 27 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
28 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
28 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
29 | 29 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByRegistration($registration); |
30 | 30 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
31 | 31 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | var data = google.visualization.arrayToDataTable([ |
37 | 37 | ["'._("Country").'", "'._("# of times").'"], '; |
38 | 38 | $country_data = ''; |
39 | - foreach($airport_country_array as $airport_item) |
|
39 | + foreach ($airport_country_array as $airport_item) |
|
40 | 40 | { |
41 | 41 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
42 | 42 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | print '</thead>'; |
71 | 71 | print '<tbody>'; |
72 | 72 | $i = 1; |
73 | - foreach($airport_country_array as $airport_item) |
|
73 | + foreach ($airport_country_array as $airport_item) |
|
74 | 74 | { |
75 | 75 | print '<tr>'; |
76 | 76 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,7 +8,9 @@ |
||
8 | 8 | if ($registration != '') { |
9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
11 | -} else $spotter_array=array(); |
|
11 | +} else { |
|
12 | + $spotter_array=array(); |
|
13 | +} |
|
12 | 14 | |
13 | 15 | if (!empty($spotter_array)) |
14 | 16 | { |
@@ -3,12 +3,12 @@ discard block |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | $Spotter = new Spotter(); |
6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
7 | -$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort); |
|
8 | 8 | |
9 | 9 | if (!empty($spotter_array)) |
10 | 10 | { |
11 | - $title = sprintf(_("Most Common Time of Day on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
11 | + $title = sprintf(_("Most Common Time of Day on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
12 | 12 | require_once('header.php'); |
13 | 13 | print '<div class="select-item">'; |
14 | 14 | print '<form action="'.$globalURL.'/date" method="post">'; |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | print '</form>'; |
19 | 19 | print '</div>'; |
20 | 20 | print '<div class="info column">'; |
21 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
21 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
22 | 22 | print '</div>'; |
23 | 23 | |
24 | 24 | include('date-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 on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
28 | 28 | |
29 | 29 | $hour_array = $Spotter->countAllHoursByDate($_GET['date']); |
30 | 30 | print ' <script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
38 | 38 | |
39 | 39 | $hour_data = ''; |
40 | - foreach($hour_array as $hour_item) |
|
40 | + foreach ($hour_array as $hour_item) |
|
41 | 41 | { |
42 | 42 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
43 | 43 | } |