@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | |
| 13 | 13 | if (isset($_GET['sort'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Airlines by Country of %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Airlines by Country of %s"), $country); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="select-item">'; |
| 24 | 24 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 25 | 25 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 26 | 26 | print '<option></option>'; |
| 27 | 27 | $all_countries = $Spotter->getAllCountries(); |
| 28 | - foreach($all_countries as $all_country) |
|
| 28 | + foreach ($all_countries as $all_country) |
|
| 29 | 29 | { |
| 30 | - if($country == $all_country['country']) |
|
| 30 | + if ($country == $all_country['country']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 33 | 33 | } else { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | if ($_GET['country'] != "NA") |
| 43 | 43 | { |
| 44 | 44 | print '<div class="info column">'; |
| 45 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 45 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 46 | 46 | print '</div>'; |
| 47 | 47 | } else { |
| 48 | 48 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | include('country-sub-menu.php'); |
| 52 | 52 | print '<div class="column">'; |
| 53 | 53 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 54 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."),$country).'</p>'; |
|
| 54 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports & airlines of <strong>%s</strong>."), $country).'</p>'; |
|
| 55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByCountry($country); |
| 56 | 56 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 57 | 57 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 60 | 60 | print 'var series = ['; |
| 61 | 61 | $country_data = ''; |
| 62 | - foreach($airline_array as $airline_item) |
|
| 62 | + foreach ($airline_array as $airline_item) |
|
| 63 | 63 | { |
| 64 | 64 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
| 65 | 65 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | print '</thead>'; |
| 108 | 108 | print '<tbody>'; |
| 109 | 109 | $i = 1; |
| 110 | - foreach($airline_array as $airline_item) |
|
| 110 | + foreach ($airline_array as $airline_item) |
|
| 111 | 111 | { |
| 112 | 112 | print '<tr>'; |
| 113 | 113 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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>'; |
@@ -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 Airlines by Country from %s"),$manufacturer); |
|
| 17 | + $title = sprintf(_("Most Common Airlines 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($manufacturer == ucwords($all_manufacturer['aircraft_manufacturer'])) |
|
| 28 | + if ($manufacturer == ucwords($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 Airlines by Country").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | $airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer); |
| 49 | 49 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 50 | 50 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 53 | 53 | print 'var series = ['; |
| 54 | 54 | $country_data = ''; |
| 55 | - foreach($airline_array as $airline_item) |
|
| 55 | + foreach ($airline_array as $airline_item) |
|
| 56 | 56 | { |
| 57 | 57 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
| 58 | 58 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | print '</thead>'; |
| 100 | 100 | print '<tbody>'; |
| 101 | 101 | $i = 1; |
| 102 | - foreach($airline_array as $airline_item) |
|
| 102 | + foreach ($airline_array as $airline_item) |
|
| 103 | 103 | { |
| 104 | 104 | print '<tr>'; |
| 105 | 105 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,14 +8,14 @@ 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)))); |
|
| 11 | +$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)))); |
|
| 12 | 12 | |
| 13 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
| 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 Time of Day from %s"),$manufacturer); |
|
| 18 | + $title = sprintf(_("Most Common Time of Day from %s"), $manufacturer); |
|
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
| 21 | 21 | print '<form action="'.$globalURL.'/manufacturer" method="post">'; |
@@ -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 Time of Day").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | |
| 49 | 49 | $hour_array = $Spotter->countAllHoursByManufacturer($manufacturer); |
| 50 | 50 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -54,9 +54,9 @@ discard block |
||
| 54 | 54 | $hour_data = ''; |
| 55 | 55 | $hour_cnt = ''; |
| 56 | 56 | $last = 0; |
| 57 | - foreach($hour_array as $hour_item) |
|
| 57 | + foreach ($hour_array as $hour_item) |
|
| 58 | 58 | { |
| 59 | - while($last != $hour_item['hour_name']) { |
|
| 59 | + while ($last != $hour_item['hour_name']) { |
|
| 60 | 60 | $hour_data .= '"'.$last.':00",'; |
| 61 | 61 | $hour_cnt .= '0,'; |
| 62 | 62 | $last++; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $hour_cnt .= $hour_item['hour_count'].','; |
| 67 | 67 | } |
| 68 | 68 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
| 69 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 69 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 70 | 70 | print 'c3.generate({ |
| 71 | 71 | bindto: "#chartHour", |
| 72 | 72 | data: { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | print '</thead>'; |
| 92 | 92 | print '<tbody>'; |
| 93 | 93 | $i = 1; |
| 94 | - foreach($hour_array as $hour_item) |
|
| 94 | + foreach ($hour_array as $hour_item) |
|
| 95 | 95 | { |
| 96 | 96 | print '<tr>'; |
| 97 | 97 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -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 Aircraft by Registration from %s"),$manufacturer); |
|
| 17 | + $title = sprintf(_("Most Common Aircraft by Registration from %s"), $manufacturer); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | |
| 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 Aircraft by Registration").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | |
| 49 | 49 | $aircraft_array = $Spotter->countAllAircraftRegistrationByManufacturer($manufacturer); |
| 50 | 50 | if (!empty($aircraft_array)) |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | print '</thead>'; |
| 62 | 62 | print '<tbody>'; |
| 63 | 63 | $i = 1; |
| 64 | - foreach($aircraft_array as $aircraft_item) |
|
| 64 | + foreach ($aircraft_array as $aircraft_item) |
|
| 65 | 65 | { |
| 66 | 66 | print '<tr>'; |
| 67 | 67 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | if (isset($_GET['sort'])) { |
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
| 14 | 14 | } else { |
@@ -17,16 +17,16 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | if (!empty($spotter_array)) |
| 19 | 19 | { |
| 20 | - $title = sprintf(_("Most Common Aircraft Manufacturer from %s"),$country); |
|
| 20 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %s"), $country); |
|
| 21 | 21 | require_once('header.php'); |
| 22 | 22 | print '<div class="select-item">'; |
| 23 | 23 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 24 | 24 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 25 | 25 | print '<option></option>'; |
| 26 | 26 | $all_countries = $Spotter->getAllCountries(); |
| 27 | - foreach($all_countries as $all_country) |
|
| 27 | + foreach ($all_countries as $all_country) |
|
| 28 | 28 | { |
| 29 | - if($country == $all_country['country']) |
|
| 29 | + if ($country == $all_country['country']) |
|
| 30 | 30 | { |
| 31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 32 | 32 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($_GET['country'] != "NA") |
| 42 | 42 | { |
| 43 | 43 | print '<div class="info column">'; |
| 44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 45 | 45 | print '</div>'; |
| 46 | 46 | } else { |
| 47 | 47 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('country-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>'; |
|
| 54 | 54 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByCountry($country); |
| 55 | 55 | if (!empty($manufacturers_array)) |
| 56 | 56 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | print '</thead>'; |
| 64 | 64 | print '<tbody>'; |
| 65 | 65 | $i = 1; |
| 66 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 66 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 67 | 67 | { |
| 68 | 68 | print '<tr>'; |
| 69 | 69 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)))); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Arrival Airports from %s"),$country); |
|
| 17 | + $title = sprintf(_("Most Common Arrival Airports from %s"), $country); |
|
| 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="country" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $all_countries = $Spotter->getAllCountries(); |
| 25 | - foreach($all_countries as $all_country) |
|
| 25 | + foreach ($all_countries as $all_country) |
|
| 26 | 26 | { |
| 27 | - if($country == $all_country['country']) |
|
| 27 | + if ($country == $all_country['country']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 30 | 30 | } else { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | if ($_GET['country'] != "NA") |
| 40 | 40 | { |
| 41 | 41 | print '<div class="info column">'; |
| 42 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 42 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 43 | 43 | print '</div>'; |
| 44 | 44 | } else { |
| 45 | 45 | print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>'; |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | include('country-sub-menu.php'); |
| 49 | 49 | print '<div class="column">'; |
| 50 | 50 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
| 51 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 51 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
| 52 | 52 | $airport_airport_array = $Spotter->countAllArrivalAirportsByCountry($country); |
| 53 | 53 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 54 | 54 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | print '<script>'; |
| 58 | 58 | print 'var series = ['; |
| 59 | 59 | $airport_data = ''; |
| 60 | - foreach($airport_airport_array as $airport_item) |
|
| 60 | + foreach ($airport_airport_array as $airport_item) |
|
| 61 | 61 | { |
| 62 | 62 | $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'].'],'; |
| 63 | 63 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | print '</thead>'; |
| 112 | 112 | print '<tbody>'; |
| 113 | 113 | $i = 1; |
| 114 | - foreach($airport_airport_array as $airport_item) |
|
| 114 | + foreach ($airport_airport_array as $airport_item) |
|
| 115 | 115 | { |
| 116 | 116 | print '<tr>'; |
| 117 | 117 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,16 +3,16 @@ 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 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"),$registration); |
|
| 15 | + $title = sprintf(_("Most Common Arrival Airports by Country of aircraft with registration %s"), $registration); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="info column">'; |
| 18 | 18 | print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('registration-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 aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
| 27 | + 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 | 28 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByRegistration($registration); |
| 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 | } |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | print '</thead>'; |
| 80 | 80 | print '<tbody>'; |
| 81 | 81 | $i = 1; |
| 82 | - foreach($airport_country_array as $airport_item) |
|
| 82 | + foreach ($airport_country_array as $airport_item) |
|
| 83 | 83 | { |
| 84 | 84 | print '<tr>'; |
| 85 | 85 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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>'; |