@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
11 | 11 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -7,16 +7,16 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/manufacturer'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
10 | +$aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
12 | 12 | $Spotter = new Spotter(); |
13 | 13 | $manufacturer = ucwords(str_replace("-", " ", $aircraft_manufacturer)); |
14 | 14 | |
15 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
15 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
16 | 16 | |
17 | 17 | if (!empty($spotter_array)) |
18 | 18 | { |
19 | - $title = sprintf(_("Most Common Airlines from %s"),$manufacturer); |
|
19 | + $title = sprintf(_("Most Common Airlines from %s"), $manufacturer); |
|
20 | 20 | |
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | $Stats = new Stats(); |
26 | 26 | $all_manufacturers = $Stats->getAllManufacturers(); |
27 | 27 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
28 | - foreach($all_manufacturers as $all_manufacturer) |
|
28 | + foreach ($all_manufacturers as $all_manufacturer) |
|
29 | 29 | { |
30 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
30 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
31 | 31 | { |
32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
33 | 33 | } else { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | include('manufacturer-sub-menu.php'); |
47 | 47 | print '<div class="column">'; |
48 | 48 | print '<h2>'._("Most Common Airlines").'</h2>'; |
49 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
49 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
50 | 50 | $airline_array = $Spotter->countAllAirlinesByManufacturer($manufacturer); |
51 | 51 | if (!empty($airline_array)) |
52 | 52 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | print '</thead>'; |
63 | 63 | print '<tbody>'; |
64 | 64 | $i = 1; |
65 | - foreach($airline_array as $airline_item) |
|
65 | + foreach ($airline_array as $airline_item) |
|
66 | 66 | { |
67 | 67 | print '<tr>'; |
68 | 68 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -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['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | $airport_airport_array = $Spotter->countAllArrivalAirportsByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | print '<script>'; |
34 | 34 | print 'var series = ['; |
35 | 35 | $airport_data = ''; |
36 | - foreach($airport_airport_array as $airport_item) |
|
36 | + foreach ($airport_airport_array as $airport_item) |
|
37 | 37 | { |
38 | 38 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
39 | 39 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | print '</thead>'; |
89 | 89 | print '<tbody>'; |
90 | 90 | $i = 1; |
91 | - foreach($airport_airport_array as $airport_item) |
|
91 | + foreach ($airport_airport_array as $airport_item) |
|
92 | 92 | { |
93 | 93 | print '<tr>'; |
94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | |
19 | 19 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
25 | 25 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
26 | - foreach($airline_names as $airline_name) |
|
26 | + foreach ($airline_names as $airline_name) |
|
27 | 27 | { |
28 | - if($airline == $airline_name['airline_icao']) |
|
28 | + if ($airline == $airline_name['airline_icao']) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
31 | 31 | } else { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | include('airline-sub-menu.php'); |
64 | 64 | print '<div class="column">'; |
65 | 65 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
66 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
66 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
67 | 67 | |
68 | 68 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirline($airline); |
69 | 69 | if (!empty($aircraft_array)) |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '</thead>'; |
81 | 81 | print '<tbody>'; |
82 | 82 | $i = 1; |
83 | - foreach($aircraft_array as $aircraft_item) |
|
83 | + foreach ($aircraft_array as $aircraft_item) |
|
84 | 84 | { |
85 | 85 | print '<tr>'; |
86 | 86 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
24 | + if (empty($airline_names)) { |
|
25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
26 | + } |
|
25 | 27 | foreach($airline_names as $airline_name) |
26 | 28 | { |
27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
44 | 46 | { |
45 | 47 | 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" />'; |
46 | - } |
|
47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | 49 | { |
49 | 50 | 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" />'; |
50 | 51 | } |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['airline'])) { |
7 | - header('Location: '.$globalURL.'/airline'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/airline'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
11 | 11 | $Spotter = new Spotter(); |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | die(); |
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); |
|
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 | 13 | |
14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Routes from %s"),$manufacturer); |
|
18 | + $title = sprintf(_("Most Common Routes from %s"), $manufacturer); |
|
19 | 19 | |
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="select-item">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $Stats = new Stats(); |
25 | 25 | $all_manufacturers = $Stats->getAllManufacturers(); |
26 | 26 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
27 | - foreach($all_manufacturers as $all_manufacturer) |
|
27 | + foreach ($all_manufacturers as $all_manufacturer) |
|
28 | 28 | { |
29 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
32 | 32 | } else { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | include('manufacturer-sub-menu.php'); |
46 | 46 | print '<div class="column">'; |
47 | 47 | print '<h2>'._("Most Common Routes").'</h2>'; |
48 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
48 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
49 | 49 | |
50 | 50 | $route_array = $Spotter->countAllRoutesByManufacturer($manufacturer); |
51 | 51 | if (!empty($route_array)) |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | print '</thead>'; |
63 | 63 | print '<tbody>'; |
64 | 64 | $i = 1; |
65 | - foreach($route_array as $route_item) |
|
65 | + foreach ($route_array as $route_item) |
|
66 | 66 | { |
67 | 67 | print '<tr>'; |
68 | 68 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -21,7 +21,9 @@ discard block |
||
21 | 21 | print '<option></option>'; |
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
24 | + if (empty($airline_names)) { |
|
25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
26 | + } |
|
25 | 27 | foreach($airline_names as $airline_name) |
26 | 28 | { |
27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
44 | 46 | { |
45 | 47 | 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" />'; |
46 | - } |
|
47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
48 | 49 | { |
49 | 50 | 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" />'; |
50 | 51 | } |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['airline'])) { |
7 | - header('Location: '.$globalURL.'/airline'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/airline'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
11 | 11 | $Spotter = new Spotter(); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | header('Location: '.$globalURL.'/airline'); |
8 | 8 | die(); |
9 | 9 | } |
10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
11 | 11 | $Spotter = new Spotter(); |
12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Departure Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
16 | + $title = sprintf(_("Most Common Departure Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="select-item">'; |
19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | $Stats = new Stats(); |
23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
25 | - foreach($airline_names as $airline_name) |
|
25 | + foreach ($airline_names as $airline_name) |
|
26 | 26 | { |
27 | - if($airline == $airline_name['airline_icao']) |
|
27 | + if ($airline == $airline_name['airline_icao']) |
|
28 | 28 | { |
29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | include('airline-sub-menu.php'); |
63 | 63 | print '<div class="column">'; |
64 | 64 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
65 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
65 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
66 | 66 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAirline($airline); |
67 | 67 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
68 | 68 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | print '<script>'; |
72 | 72 | print 'var series = ['; |
73 | 73 | $airport_data = ''; |
74 | - foreach($airport_airport_array as $airport_item) |
|
74 | + foreach ($airport_airport_array as $airport_item) |
|
75 | 75 | { |
76 | 76 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_name'].' ('.$airport_item['airport_departure_icao'].')",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
77 | 77 | } |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | print '</thead>'; |
127 | 127 | print '<tbody>'; |
128 | 128 | $i = 1; |
129 | - foreach($airport_airport_array as $airport_item) |
|
129 | + foreach ($airport_airport_array as $airport_item) |
|
130 | 130 | { |
131 | 131 | print '<tr>'; |
132 | 132 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['airport'])) { |
7 | - header('Location: '.$globalURL.'/airport'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/airport'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | 11 | |
12 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
13 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
12 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
13 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
14 | 14 | $airport_array = $Spotter->getAllAirportInfo($airport); |
15 | 15 | |
16 | 16 | if (!empty($airport_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
18 | + $title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
21 | 21 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -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 Aircraft").'</h2>'; |
61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts 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 aircrafts 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->countAllAircraftTypesByAirport($airport); |
64 | 64 | if (!empty($aircraft_array)) |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | print '</thead>'; |
74 | 74 | print '<tbody>'; |
75 | 75 | $i = 1; |
76 | - foreach($aircraft_array as $aircraft_item) |
|
76 | + foreach ($aircraft_array as $aircraft_item) |
|
77 | 77 | { |
78 | 78 | print '<tr>'; |
79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -23,7 +23,9 @@ |
||
23 | 23 | print '<option></option>'; |
24 | 24 | $Stats = new Stats(); |
25 | 25 | $airport_names = $Stats->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 | { |
@@ -4,8 +4,8 @@ |
||
4 | 4 | require_once('require/class.Stats.php'); |
5 | 5 | require_once('require/class.Language.php'); |
6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
8 | - die(); |
|
7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
8 | + die(); |
|
9 | 9 | } |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
@@ -22,7 +22,9 @@ |
||
22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
25 | + if (empty($all_manufacturers)) { |
|
26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
27 | + } |
|
26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
27 | 29 | { |
28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | } |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
13 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
12 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
13 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
15 | 15 | |
16 | 16 | if (!empty($spotter_array)) |
17 | 17 | { |
18 | - $title = sprintf(_("Most Common Arrival Airports from %s"),$manufacturer); |
|
18 | + $title = sprintf(_("Most Common Arrival Airports from %s"), $manufacturer); |
|
19 | 19 | |
20 | 20 | require_once('header.php'); |
21 | 21 | print '<div class="select-item">'; |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | $Stats = new Stats(); |
25 | 25 | $all_manufacturers = $Stats->getAllManufacturers(); |
26 | 26 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
27 | - foreach($all_manufacturers as $all_manufacturer) |
|
27 | + foreach ($all_manufacturers as $all_manufacturer) |
|
28 | 28 | { |
29 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
30 | 30 | { |
31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
32 | 32 | } else { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | include('manufacturer-sub-menu.php'); |
46 | 46 | print '<div class="column">'; |
47 | 47 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
48 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
48 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
49 | 49 | $airport_airport_array = $Spotter->countAllArrivalAirportsByManufacturer($manufacturer); |
50 | 50 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
51 | 51 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | print '<script>'; |
55 | 55 | print 'var series = ['; |
56 | 56 | $airport_data = ''; |
57 | - foreach($airport_airport_array as $airport_item) |
|
57 | + foreach ($airport_airport_array as $airport_item) |
|
58 | 58 | { |
59 | 59 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
60 | 60 | } |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | print '</thead>'; |
110 | 110 | print '<tbody>'; |
111 | 111 | $i = 1; |
112 | - foreach($airport_airport_array as $airport_item) |
|
112 | + foreach ($airport_airport_array as $airport_item) |
|
113 | 113 | { |
114 | 114 | print '<tr>'; |
115 | 115 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,14 +3,14 @@ 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 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
8 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
8 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
9 | 9 | else $spotter_array = array(); |
10 | 10 | |
11 | 11 | if (!empty($spotter_array)) |
12 | 12 | { |
13 | - $title = sprintf(_("Most Common Aircraft on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
13 | + $title = sprintf(_("Most Common Aircraft on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
14 | 14 | require_once('header.php'); |
15 | 15 | print '<div class="select-item">'; |
16 | 16 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | print '<br />'; |
29 | 29 | |
30 | 30 | print '<div class="info column">'; |
31 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
31 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
32 | 32 | print '</div>'; |
33 | 33 | |
34 | 34 | include('date-sub-menu.php'); |
35 | 35 | print '<div class="column">'; |
36 | 36 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
37 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
37 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
38 | 38 | |
39 | 39 | $aircraft_array = $Spotter->countAllAircraftTypesByDate($date); |
40 | 40 | if (!empty($aircraft_array)) |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | print '</thead>'; |
50 | 50 | print '<tbody>'; |
51 | 51 | $i = 1; |
52 | - foreach($aircraft_array as $aircraft_item) |
|
52 | + foreach ($aircraft_array as $aircraft_item) |
|
53 | 53 | { |
54 | 54 | print '<tr>'; |
55 | 55 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -5,8 +5,11 @@ |
||
5 | 5 | $Spotter = new Spotter(); |
6 | 6 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
7 | 7 | $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
8 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
9 | -else $spotter_array = array(); |
|
8 | +if (isset($_GET['date'])) { |
|
9 | + $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
10 | +} else { |
|
11 | + $spotter_array = array(); |
|
12 | +} |
|
10 | 13 | |
11 | 14 | if (!empty($spotter_array)) |
12 | 15 | { |
@@ -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['ident'])) { |
6 | - header('Location: '.$globalURL.'/ident'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/ident'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | die(); |
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
13 | 13 | |
14 | 14 | if (!empty($spotter_array)) |
15 | 15 | { |
16 | - $title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['ident']); |
|
17 | 17 | require_once('header.php'); |
18 | 18 | print '<div class="info column">'; |
19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | include('ident-sub-menu.php'); |
25 | 25 | print '<div class="column">'; |
26 | 26 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByIdent($ident); |
29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
33 | 33 | print 'var series = ['; |
34 | 34 | $country_data = ''; |
35 | - foreach($airport_country_array as $airport_item) |
|
35 | + foreach ($airport_country_array as $airport_item) |
|
36 | 36 | { |
37 | 37 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
38 | 38 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '</thead>'; |
81 | 81 | print '<tbody>'; |
82 | 82 | $i = 1; |
83 | - foreach($airport_country_array as $airport_item) |
|
83 | + foreach ($airport_country_array as $airport_item) |
|
84 | 84 | { |
85 | 85 | print '<tr>'; |
86 | 86 | print '<td><strong>'.$i.'</strong></td>'; |