@@ -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("-", " ", urldecode(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("-", " ", urldecode(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>'; |
@@ -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,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 aircraft 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 aircraft 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>'; |
@@ -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>'; |
@@ -58,8 +58,12 @@ |
||
58 | 58 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
59 | 59 | include('table-output.php'); |
60 | 60 | print '<div class="pagination">'; |
61 | - if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
62 | - if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
61 | + if ($limit_previous_1 >= 0) { |
|
62 | + print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">«'._("Previous Page").'</a>'; |
|
63 | + } |
|
64 | + if ($spotter_array[0]['query_number_rows'] == $absolute_difference) { |
|
65 | + print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'»</a>'; |
|
66 | + } |
|
63 | 67 | print '</div>'; |
64 | 68 | } |
65 | 69 | print '</div>'; |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | { |
11 | 11 | $date = date('Y-m-d'); |
12 | 12 | } else { |
13 | - $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
13 | + $date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
14 | 14 | } |
15 | 15 | |
16 | -if(!isset($_GET['limit'])) |
|
16 | +if (!isset($_GET['limit'])) |
|
17 | 17 | { |
18 | 18 | $limit_start = 0; |
19 | 19 | $limit_end = 25; |
@@ -48,25 +48,25 @@ discard block |
||
48 | 48 | print '<br />'; |
49 | 49 | |
50 | 50 | print '<div class="info column">'; |
51 | -if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) { |
|
52 | - print '<h1>'.sprintf(_("Accidents from %s"),date("l F j, Y",strtotime($date))).'</h1>'; |
|
53 | -} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) { |
|
54 | - print '<h1>'.sprintf(_("Accidents from %s"),date("F, Y",strtotime($date))).'</h1>'; |
|
55 | -} elseif (preg_match('/^[0-9]{4}$/',$date)) { |
|
56 | - print '<h1>'.sprintf(_("Accidents from %s"),$date).'</h1>'; |
|
51 | +if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) { |
|
52 | + print '<h1>'.sprintf(_("Accidents from %s"), date("l F j, Y", strtotime($date))).'</h1>'; |
|
53 | +} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) { |
|
54 | + print '<h1>'.sprintf(_("Accidents from %s"), date("F, Y", strtotime($date))).'</h1>'; |
|
55 | +} elseif (preg_match('/^[0-9]{4}$/', $date)) { |
|
56 | + print '<h1>'.sprintf(_("Accidents from %s"), $date).'</h1>'; |
|
57 | 57 | } |
58 | 58 | print '</div>'; |
59 | 59 | |
60 | 60 | print '<div class="table column">'; |
61 | 61 | |
62 | -if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) { |
|
63 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>'; |
|
64 | -} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) { |
|
65 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("M, Y",strtotime($date))).'</p>'; |
|
66 | -} elseif (preg_match('/^[0-9]{4}$/',$date)) { |
|
67 | - print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),$date).'</p>'; |
|
62 | +if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) { |
|
63 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>'; |
|
64 | +} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) { |
|
65 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("M, Y", strtotime($date))).'</p>'; |
|
66 | +} elseif (preg_match('/^[0-9]{4}$/', $date)) { |
|
67 | + print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), $date).'</p>'; |
|
68 | 68 | } |
69 | -$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'accident',$date); |
|
69 | +$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'accident', $date); |
|
70 | 70 | //print_r($spotter_array); |
71 | 71 | if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) { |
72 | 72 | include('table-output.php'); |
@@ -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 | |
11 | 11 | $Spotter = new Spotter(); |
@@ -9,13 +9,13 @@ discard block |
||
9 | 9 | } |
10 | 10 | |
11 | 11 | $Spotter = new Spotter(); |
12 | -$manufacturer = ucwords(str_replace("-", " ", urldecode(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("-", " ", urldecode(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 by Country from %s"),$manufacturer); |
|
18 | + $title = sprintf(_("Most Common Arrival Airports by Country 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 by Country").'</h2>'; |
48 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
48 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
49 | 49 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($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>'; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
54 | 54 | print 'var series = ['; |
55 | 55 | $country_data = ''; |
56 | - foreach($airport_country_array as $airport_item) |
|
56 | + foreach ($airport_country_array as $airport_item) |
|
57 | 57 | { |
58 | 58 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | print '</thead>'; |
102 | 102 | print '<tbody>'; |
103 | 103 | $i = 1; |
104 | - foreach($airport_country_array as $airport_item) |
|
104 | + foreach ($airport_country_array as $airport_item) |
|
105 | 105 | { |
106 | 106 | print '<tr>'; |
107 | 107 | 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['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 Departure Airports of %s"),$spotter_array[0]['ident']); |
|
16 | + $title = sprintf(_("Most Common Departure 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 Departure Airports").'</h2>'; |
27 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
27 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
28 | 28 | $airport_airport_array = $Spotter->countAllDepartureAirportsByIdent($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_departure_icao_count'].'", "'.$airport_item['airport_departure_name'].' ('.$airport_item['airport_departure_icao'].')",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_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>'; |
@@ -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,17 +7,17 @@ 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); |
|
10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
12 | 12 | if ($sort != '') { |
13 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
13 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
14 | 14 | } else { |
15 | - $spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", ''); |
|
15 | + $spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", ''); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | if (!empty($spotter_array)) |
19 | 19 | { |
20 | - $title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['ident']); |
|
20 | + $title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['ident']); |
|
21 | 21 | require_once('header.php'); |
22 | 22 | print '<div class="info column">'; |
23 | 23 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | include('ident-sub-menu.php'); |
29 | 29 | print '<div class="column">'; |
30 | 30 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
31 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
31 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
32 | 32 | |
33 | 33 | $aircraft_array = $Spotter->countAllAircraftTypesByIdent($ident); |
34 | 34 | if (!empty($aircraft_array)) |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | print '</thead>'; |
44 | 44 | print '<tbody>'; |
45 | 45 | $i = 1; |
46 | - foreach($aircraft_array as $aircraft_item) |
|
46 | + foreach ($aircraft_array as $aircraft_item) |
|
47 | 47 | { |
48 | 48 | print '<tr>'; |
49 | 49 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,10 +10,10 @@ |
||
10 | 10 | $timearray = array(); |
11 | 11 | if (isset($_GET['now'])) $begin = time(); |
12 | 12 | else $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
13 | -for ($i =0; $i <= 288; $i++) { |
|
13 | +for ($i = 0; $i <= 288; $i++) { |
|
14 | 14 | $timearray[] = ($begin + $i*300)*1000; |
15 | 15 | } |
16 | -$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',',$timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
16 | +$output = '{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"santaclaus","time": ['.implode(',', $timearray).']},"geometry":{"type":"MultiPoint","coordinates":[[-114.4,82.7,0],[-173.300003,64.379997,0],[177.479995,64.75,0],[158.65,53.016667,0],[165.545318,11.626074,0],[171.1300517813333,7.07999665990053,0],[179.380004,-16.469999,0],[178.429992,-18.129999,0],[174.759994,-36.849998,0],[176.839996,-39.639999,0],[174.779998,-41.279998,0],[172.639999,-43.529998,0],[167.838199,-46.986747,0],[168.320999,-17.740391,0],[167.149993,-15.51,0],[159.910003,-9.43,0],[156.850006,-8.1,0],[158.160003,6.92,0],[150.017702,45.873311,0],[154.796487,49.429802,0],[142.7262,46.948978,0],[150.800003,59.569999,0],[135.119995,48.419998,0],[131.899993,43.130001,0],[142.212096,27.070652,0],[141.312779,24.78389,0],[144.79373,13.444305,0],[151.783334,8.45,0],[151.749999,7.416667,0],[152.160003,-4.199999,0],[146.990005,-6.719999,0],[143.211639,-9.085352,0],[146.779998,-19.26,0],[149.179992,-21.139999,0],[153.020004,-27.459999,0],[151.210006,-33.869998,0],[147.291199,-42.85088,0],[138.600006,-34.93,0],[133.869995,-23.7,0],[130.850006,-12.43,0],[143.62,-3.56,0],[134.5552,7.3608,0],[135.169998,34.68,0],[138.690002,35.169998,0],[139.770004,35.669998,0],[140.740005,40.830001,0],[128.600006,35.869998,0],[125.925925,38.950981,0],[129.771118,62.093056,0],[104.239997,52.330001,0],[114.5056,48.060478,0],[106.580001,29.569999,0],[121.470001,31.229999,0],[113.25,23.12,0],[114.177465,22.307184,0],[121.639999,18.36,0],[122.080001,6.92,0],[114.639999,4.809999,0],[119.412399,-5.152193,0],[122.230003,-17.959999,0],[115.839996,-31.959999,0],[105.680687,-10.428593,0],[104.75,-2.99,0],[113.029998,3.17,0],[100.720001,4.86,0],[104.18,10.609999,0],[103.864403,13.36866,0],[99.330001,9.14,0],[105.073303,18.30217,0],[91.132088,29.6507,0],[116.477651,40.332809,0],[93.059997,56.02,0],[86.18,69.410003,0],[88.202881,69.315422,0],[73.400001,55,0],[76.949996,52.299999,0],[78.379997,42.490001,0],[69.779998,37.919998,0],[86.933333,27.983333,0],[84.870002,27.02,0],[88.36,22.569999,0],[90.389999,23.7,0],[97.04,20.78,0],[92.762917,11.66857,0],[50.23720550537109,-46.10261535644531,0],[72.422489,-7.336367,0],[73.510915,4.174199,0],[81.050003,6.989999,0],[72.819999,18.959999,0],[78.042222,27.174167,0],[71.449996,30.2,0],[67.109993,36.703819,0],[54.36,39.509998,0],[63.726529,40.214486,0],[58.853439,48.251126,0],[56.23246,58.00024,0],[49.659999,58.599998,0],[50.150001,53.2,0],[44.11,41.979999,0],[49.893226,40.38344,0],[44.75,40.5,0],[50.95,34.650001,0],[56.27433,27.18717,0],[54.989491,25.005817,0],[59.549999,22.569999,0],[47.58318996007591,-9.722414273737707,0],[57.471008,-20.26026,0],[37.946460723877,-46.6428451538086,0],[53,-67.5,0],[46.99004,-25.03233,0],[46.310001,-15.72,0],[44.41203117370608,-12.22338294982911,0],[39.3822,-6.097406,0],[39.659999,-4.039999,0],[40.033333,7.916667,0],[42.549999,16.899999,0],[43.970001,26.37,0],[41.12,30.455,0],[38.278671,34.547951,0],[37.619998,55.75,0],[30.453329,59.951889,0],[23.12,63.84,0],[26.709999,58.380001,0],[25.42,57.549999,0],[23.319999,55.93,0],[26.1,52.119998,0],[32.259998,48.5,0],[28.829999,47.029998,0],[25.61,45.659999,0],[27.469999,42.509998,0],[23.729999,37.979999,0],[27.149999,38.43,0],[31.132659,29.977088,0],[32.659999,13.17,0],[33.599998,1.71,0],[25.92,-2.95,0],[28.45,-14.439999,0],[30.819999,-20.059999,0],[21.639999,-21.7,0],[25.59,-33.959999,0],[18.129999,-26.579999,0],[13.767777,-10.722417,0],[10.13,-0.15,0],[20.67,5.76,0],[9.71,4.059999,0],[7.44,10.52,0],[18.69,12.189999,0],[7.98,17,0],[14.42,27.069999,0],[3.678539,32.489059,0],[-7.619999,33.599998,0],[13.611066,38.129963,0],[12.482323,41.895466,0],[17.189752,44.763891,0],[16.45,43.509998,0],[14.51,46.060001,0],[21.629999,47.54,0],[16.37,48.220001,0],[10.736111,47.554444,0],[14.43,50.080001,0],[17.129999,48.159999,0],[22.569999,51.240001,0],[13.411895,52.523781,0],[10.039999,56.470001,0],[13.02,55.61,0],[17.329999,62.400001,0],[14.229999,78.059997,0],[10.399999,63.439998,0],[2.350966,48.856558,0],[7.42,43.75,0],[1.57,42.54,0],[-0.991293,37.605651,0],[-7.429999,39.29,0],[-11.4053,16.5889,0],[-3.009999,16.78,0],[-5.36008,5.83885,0],[-12.3,11.319999,0],[-16.239999,12.829999,0],[-16.2507,28.457661,0],[-0.126197,51.500197,0],[-2.968111,56.461428,0],[-7.308429,54.998539,0],[-8.92,52.7,0],[-19.000959,63.427502,0],[-28.364049911499,38.47212219238281,0],[-23.76,15.279999,0],[-36.511219,-54.274151,0],[-58.979999,-51.830001,0],[-64.190002,-31.399999,0],[-54.18,-32.36,0],[-43.2,-22.909999,0],[-37.333333,65.666667,0],[-69.345131,77.48262,0],[-55.65049,48.929001,0],[-63.530471,44.681263,0],[-66.647818,45.957319,0],[-59.630001,13.18,0],[-61.744888,12.06526,0],[-61.171322,10.30501,0],[-67.470001,7.9,0],[-58.159999,6.789999,0],[-60.02,-3.119999,0],[-56.45,-14.409999,0],[-65.260002,-19.059999,0],[-56.636503,-24.158676,0],[-56.509998,-33.409999,0],[-68.523514,-50.021889,0],[-72.505127,-51.732529,0],[-71.639999,-33.04,0],[-72.515821,-13.162849,0],[-76.970001,-6.03,0],[-78.620002,-1.24,0],[-76.739997,8.1,0],[-79.879913,9.368985,0],[-76.949996,18,0],[-72.699996,19.11,0],[-75.220001,20.149999,0],[-73.682953,20.95027,0],[-80.605,28.405556,0],[-84.388056,33.748889,0],[-79.931111,32.776389,0],[-83.920833,35.960556,0],[-84.500278,38.049167,0],[-77.460833,38.303056,0],[-82.515556,40.758333,0],[-83.045833,42.331389,0],[-74.006389,40.714167,0],[-71.802778,42.2625,0],[-72.973056,43.610556,0],[-68.0125,46.860556,0],[-72.581779,46.357398,0],[-78.53632621543271,52.72737572958358,0],[-66.921779,52.940118,0],[-75.652573,62.201069,0],[-64.865257,67.935417,0],[-94.969443,74.716943,0],[-82.793909,76.395731,0],[-97.49276733398439,69.18675994873048,0],[-90.5537452697754,63.36753463745121,0],[-89.270113,48.412197,0],[-79.604159,43.68731,0],[-89.401111,43.073056,0],[-94.633611,42.395278,0],[-89.588889,40.693611,0],[-90.197778,38.627222,0],[-90.704167,35.842222,0],[-91.061667,33.41,0],[-92.445,31.311111,0],[-98.493333,29.423889,0],[-103.349998,20.67,0],[-86.830001,21.17,0],[-89.529998,14.979999,0],[-87.449996,13.42,0],[-83.709999,9.369999,0],[-91.5149765,-0.3781085,0],[-109.425598,-27.1546,0],[-109.9142,22.88093,0],[-110.910003,27.92,0],[-110.925833,32.221667,0],[-104.526667,33.395,0],[-113.061111,37.6775,0],[-104.820833,38.833889,0],[-108.73,42.833056,0],[-113.895,45.175833,0],[-113.993056,46.872222,0],[-114.080796,51.039877,0],[-102.3889594419702,57.15883691318781,0],[-118.0333,66.0833,0],[-140.55,64.45,0],[-122.690386,58.80667,0],[-121.92985,50.686341,0],[-122.330833,47.606389,0],[-122.274167,47.564167,0],[-122.968503,45.309901,0],[-122.874444,42.326667,0],[-122.390556,40.586667,0],[-117.068611,39.493333,0],[-122.418333,37.775,0],[-117.108333,34.207778,0],[-116.544444,33.830278,0],[-117.156389,32.715278,0],[-149.891667,61.218333,0],[-155.566389,62.948889,0],[-165.406389,64.501111,0],[-155.09,19.729722,0],[-156.337974,20.804858,0],[-157.043209,21.141189,0],[-158.009167,21.386667,0],[-159.371111,21.981111,0]]}}]}'; |
|
17 | 17 | print $output; |
18 | 18 | |
19 | 19 | ?> |
@@ -8,8 +8,11 @@ |
||
8 | 8 | } |
9 | 9 | header('Content-Type: text/javascript'); |
10 | 10 | $timearray = array(); |
11 | -if (isset($_GET['now'])) $begin = time(); |
|
12 | -else $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
|
11 | +if (isset($_GET['now'])) { |
|
12 | + $begin = time(); |
|
13 | +} else { |
|
14 | + $begin = strtotime(date("Y").'-12-24T02:00:00Z'); |
|
15 | +} |
|
13 | 16 | for ($i =0; $i <= 288; $i++) { |
14 | 17 | $timearray[] = ($begin + $i*300)*1000; |
15 | 18 | } |
@@ -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']))) |
@@ -8,13 +8,13 @@ discard block |
||
8 | 8 | die(); |
9 | 9 | } |
10 | 10 | $Spotter = new Spotter(); |
11 | -$manufacturer = ucwords(str_replace("-", " ", urldecode(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("-", " ", urldecode(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 Departure Airports by Country from %s"),$manufacturer); |
|
17 | + $title = sprintf(_("'Most Common Departure Airports by Country from %s"), $manufacturer); |
|
18 | 18 | |
19 | 19 | require_once('header.php'); |
20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
23 | 23 | $Stats = new Stats(); |
24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
26 | - foreach($all_manufacturers as $all_manufacturer) |
|
26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
27 | 27 | { |
28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
29 | 29 | { |
30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | include('manufacturer-sub-menu.php'); |
45 | 45 | print '<div class="column">'; |
46 | 46 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
47 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
47 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
48 | 48 | |
49 | 49 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByManufacturer($manufacturer); |
50 | 50 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
54 | 54 | print 'var series = ['; |
55 | 55 | $country_data = ''; |
56 | - foreach($airport_country_array as $airport_item) |
|
56 | + foreach ($airport_country_array as $airport_item) |
|
57 | 57 | { |
58 | 58 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
59 | 59 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | print '</thead>'; |
102 | 102 | print '<tbody>'; |
103 | 103 | $i = 1; |
104 | - foreach($airport_country_array as $airport_item) |
|
104 | + foreach ($airport_country_array as $airport_item) |
|
105 | 105 | { |
106 | 106 | print '<tr>'; |
107 | 107 | 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['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("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)))); |