@@ -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(); |
@@ -22,7 +22,9 @@ discard block |
||
22 | 22 | print '<option></option>'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
25 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
25 | + if (empty($airline_names)) { |
|
26 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
27 | + } |
|
26 | 28 | foreach($airline_names as $airline_name) |
27 | 29 | { |
28 | 30 | if($airline == $airline_name['airline_icao']) |
@@ -44,8 +46,7 @@ discard block |
||
44 | 46 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
45 | 47 | { |
46 | 48 | 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" />'; |
47 | - } |
|
48 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
49 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
49 | 50 | { |
50 | 51 | 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" />'; |
51 | 52 | } |
@@ -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'].'],'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -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 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
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 '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | var data = google.visualization.arrayToDataTable([ |
71 | 71 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
72 | 72 | $hour_data = ''; |
73 | - foreach($hour_array as $hour_item) |
|
73 | + foreach ($hour_array as $hour_item) |
|
74 | 74 | { |
75 | 75 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
76 | 76 | } |
@@ -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(); |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -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'].'],'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
26 | + if (empty($aircraft_types)) { |
|
27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
28 | + } |
|
27 | 29 | foreach($aircraft_types as $aircrafttype) |
28 | 30 | { |
29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | |
11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
12 | 12 | $Spotter = new Spotter(); |
13 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
14 | 14 | |
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
18 | + $title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
21 | 21 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $Stats = new Stats(); |
25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
26 | 26 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
27 | - foreach($aircraft_types as $aircrafttype) |
|
27 | + foreach ($aircraft_types as $aircrafttype) |
|
28 | 28 | { |
29 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
29 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
32 | 32 | } else { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | include('aircraft-sub-menu.php'); |
54 | 54 | print '<div class="column">'; |
55 | 55 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
56 | - 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>'; |
|
56 | + 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>'; |
|
57 | 57 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByAircraft($aircraft_type); |
58 | 58 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
59 | 59 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | var data = google.visualization.arrayToDataTable([ |
65 | 65 | ["'._("Country").'", "'._("# of times").'"], '; |
66 | 66 | $country_data = ''; |
67 | - foreach($airport_country_array as $airport_item) |
|
67 | + foreach ($airport_country_array as $airport_item) |
|
68 | 68 | { |
69 | 69 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
70 | 70 | } |
@@ -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>'; |
@@ -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'].'],'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $tats->getAllAirportNames(); |
26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
26 | + if (empty($airport_names)) { |
|
27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
28 | + } |
|
27 | 29 | ksort($airport_names); |
28 | 30 | foreach($airport_names as $airport_name) |
29 | 31 | { |
@@ -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 | { |
@@ -89,7 +89,7 @@ |
||
89 | 89 | function drawChart6() { |
90 | 90 | var data = google.visualization.arrayToDataTable([ |
91 | 91 | ["Hour","'._("Altitude").'","'._("Speed").'"], '; |
92 | - $altitude_data = ''; |
|
92 | + $altitude_data = ''; |
|
93 | 93 | foreach($all_data as $data) |
94 | 94 | { |
95 | 95 | $altitude_data .= '[ "'.date("G:i",strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |
@@ -6,14 +6,14 @@ discard block |
||
6 | 6 | require_once('require/class.SpotterLive.php'); |
7 | 7 | require_once('require/class.SpotterArchive.php'); |
8 | 8 | |
9 | -if (!isset($_GET['ident'])){ |
|
9 | +if (!isset($_GET['ident'])) { |
|
10 | 10 | header('Location: '.$globalURL.''); |
11 | 11 | } else { |
12 | 12 | $Spotter = new Spotter(); |
13 | 13 | $SpotterArchive = new SpotterArchive(); |
14 | 14 | $Translation = new Translation(); |
15 | 15 | //calculuation for the pagination |
16 | - if(!isset($_GET['limit'])) |
|
16 | + if (!isset($_GET['limit'])) |
|
17 | 17 | { |
18 | 18 | $limit_start = 0; |
19 | 19 | $limit_end = 25; |
@@ -34,18 +34,18 @@ discard block |
||
34 | 34 | |
35 | 35 | $page_url = $globalURL.'/ident/'.$_GET['ident']; |
36 | 36 | |
37 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
38 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
37 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
38 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
39 | 39 | if (isset($_GET['sort'])) |
40 | 40 | { |
41 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference, $sort); |
|
41 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference, $sort); |
|
42 | 42 | if (empty($spotter_array)) { |
43 | - $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference, $sort); |
|
43 | + $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference, $sort); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference); |
|
46 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference); |
|
47 | 47 | if (empty($spotter_array)) { |
48 | - $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference); |
|
48 | + $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference); |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | if (!empty($spotter_array)) { |
@@ -54,14 +54,14 @@ discard block |
||
54 | 54 | $ident = $new_ident; |
55 | 55 | if (isset($_GET['sort'])) |
56 | 56 | { |
57 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference, $sort); |
|
57 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference, $sort); |
|
58 | 58 | if (empty($spotter_array)) { |
59 | - $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference, $sort); |
|
59 | + $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference, $sort); |
|
60 | 60 | } |
61 | 61 | } else { |
62 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference); |
|
62 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference); |
|
63 | 63 | if (empty($spotter_array)) { |
64 | - $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident,$limit_start.",".$absolute_difference); |
|
64 | + $spotter_array = $SpotterArchive->getSpotterDataByIdent($ident, $limit_start.",".$absolute_difference); |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | if (!empty($spotter_array)) |
71 | 71 | { |
72 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['ident']); |
|
72 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['ident']); |
|
73 | 73 | $ident = $spotter_array[0]['ident']; |
74 | 74 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
75 | 75 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | var data = google.visualization.arrayToDataTable([ |
91 | 91 | ["Hour","'._("Altitude").'","'._("Speed").'"], '; |
92 | 92 | $altitude_data = ''; |
93 | - foreach($all_data as $data) |
|
93 | + foreach ($all_data as $data) |
|
94 | 94 | { |
95 | - $altitude_data .= '[ "'.date("G:i",strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |
|
95 | + $altitude_data .= '[ "'.date("G:i", strtotime($data['date']." UTC")).'",'.$data['altitude'].','.$data['ground_speed'].'],'; |
|
96 | 96 | } |
97 | 97 | $altitude_data = substr($altitude_data, 0, -1); |
98 | 98 | print $altitude_data.']); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | |
133 | 133 | include('ident-sub-menu.php'); |
134 | 134 | print '<div class="table column">'; |
135 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the ident/callsign of <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
135 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the ident/callsign of <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
136 | 136 | |
137 | 137 | include('table-output.php'); |
138 | 138 | print '<div class="pagination">'; |
@@ -71,8 +71,12 @@ discard block |
||
71 | 71 | { |
72 | 72 | $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['ident']); |
73 | 73 | $ident = $spotter_array[0]['ident']; |
74 | - if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
|
75 | - if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
|
74 | + if (isset($spotter_array[0]['latitude'])) { |
|
75 | + $latitude = $spotter_array[0]['latitude']; |
|
76 | + } |
|
77 | + if (isset($spotter_array[0]['longitude'])) { |
|
78 | + $longitude = $spotter_array[0]['longitude']; |
|
79 | + } |
|
76 | 80 | require_once('header.php'); |
77 | 81 | if (isset($globalArchive) && $globalArchive) { |
78 | 82 | // Requirement for altitude graph |
@@ -80,7 +84,9 @@ discard block |
||
80 | 84 | $all_data = $SpotterArchive->getAltitudeSpeedArchiveSpotterDataById($spotter_array[0]['flightaware_id']); |
81 | 85 | if (isset($globalTimezone)) { |
82 | 86 | date_default_timezone_set($globalTimezone); |
83 | - } else date_default_timezone_set('UTC'); |
|
87 | + } else { |
|
88 | + date_default_timezone_set('UTC'); |
|
89 | + } |
|
84 | 90 | if (count($all_data) > 0) { |
85 | 91 | print '<div id="chart6" class="chart" width="100%"></div> |
86 | 92 | <script> |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | } |
9 | 9 | |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
14 | 14 | |
15 | 15 | if (!empty($spotter_array)) |
16 | 16 | { |
17 | - $title = sprintf(_("Most Common Arrival Airports from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("Most Common Arrival Airports 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 Arrival Airports").'</h2>'; |
46 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
46 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
47 | 47 | $airport_airport_array = $Spotter->countAllArrivalAirportsByManufacturer($manufacturer); |
48 | 48 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
49 | 49 | <script> |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | ["'._("Airport").'", "'._("# of times").'"],'; |
59 | 59 | |
60 | 60 | $airport_data = ''; |
61 | - foreach($airport_airport_array as $airport_item) |
|
61 | + foreach ($airport_airport_array as $airport_item) |
|
62 | 62 | { |
63 | 63 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
64 | 64 | $name = str_replace("'", "", $name); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | print '</thead>'; |
98 | 98 | print '<tbody>'; |
99 | 99 | $i = 1; |
100 | - foreach($airport_airport_array as $airport_item) |
|
100 | + foreach ($airport_airport_array as $airport_item) |
|
101 | 101 | { |
102 | 102 | print '<tr>'; |
103 | 103 | 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))); |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $all_manufacturers = $Stats->getAllManufacturers(); |
26 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
26 | + if (empty($all_manufacturers)) { |
|
27 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
28 | + } |
|
27 | 29 | foreach($all_manufacturers as $all_manufacturer) |
28 | 30 | { |
29 | 31 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | <div class="info column"> |
12 | 12 | <h1>About <?php print $globalName; ?></h1> |
13 | 13 | <?php |
14 | - if ($globalName == 'FlightAirMap') { |
|
14 | + if ($globalName == 'FlightAirMap') { |
|
15 | 15 | ?> |
16 | 16 | <p>This is an open source project displaying <u>most</u> (mostly <a href="http://en.wikipedia.org/wiki/Instrument_flight_rules" target="_blank">IFR</a>) flights that have flown near this site area. |
17 | 17 | <?php if ($globalADSBHUB) { ?> Some ADS-B sources come from <a href="http://www.adsbhub.net">ADSBHUB.net</a>.<?php } ?> |
@@ -27,18 +27,18 @@ discard block |
||
27 | 27 | |
28 | 28 | <br /><br /> |
29 | 29 | <?php |
30 | - } else { |
|
30 | + } else { |
|
31 | 31 | ?> |
32 | 32 | <p>This project use <a href="http://www.flightairmap.fr/">FlightAirMap</a> (<a href="https://github.com/Ysurac/FlightAirMap/">source</a>) by Ycarus from <a href="http://www.zugaina.com/">Zugaina</a>.</p> |
33 | 33 | <?php |
34 | - } |
|
34 | + } |
|
35 | 35 | ?> |
36 | 36 | <a name="source"></a> |
37 | 37 | <h3>Source & Credits</h3> |
38 | 38 | |
39 | 39 | <?php |
40 | 40 | if ($globalFlightAware) { |
41 | - ?> |
|
41 | + ?> |
|
42 | 42 | <p>The data from FlightAware is coming from multiple sources. Not every aircraft is tracked on FlightAware, especially not older aircrafts as well as government aircrafts, however most modern airliners will work. You can learn more about how it works on <a href="http://flightaware.com/adsb/" target="_blank">FlightAware's ADS-B</a> page. Also, not every aircraft is shown to have flown exactly at that minute as seen on this site (aka real-time). There is a 5 minute delay on some of the sources.</p> |
43 | 43 | <?php } ?> |
44 | 44 | <p>None of this project would have been possible without the help and contributions of these organizations and people:</p> |