@@ -1,20 +1,20 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once('require/class.Connection.php'); |
| 3 | -require_once('require/class.Spotter.php');; |
|
| 3 | +require_once('require/class.Spotter.php'); ; |
|
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | -if (!isset($_GET['date'])){ |
|
| 6 | +if (!isset($_GET['date'])) { |
|
| 7 | 7 | header('Location: '.$globalURL.''); |
| 8 | 8 | } else { |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | |
| 11 | 11 | //calculuation for the pagination |
| 12 | - if(!isset($_GET['limit'])) |
|
| 12 | + if (!isset($_GET['limit'])) |
|
| 13 | 13 | { |
| 14 | 14 | $limit_start = 0; |
| 15 | 15 | $limit_end = 25; |
| 16 | 16 | $absolute_difference = 25; |
| 17 | - } else { |
|
| 17 | + } else { |
|
| 18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
| 19 | 19 | $limit_start = $limit_explode[0]; |
| 20 | 20 | $limit_end = $limit_explode[1]; |
@@ -30,19 +30,19 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | $page_url = $globalURL.'/date/'.$_GET['date']; |
| 32 | 32 | |
| 33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 34 | 34 | if (isset($_GET['sort'])) |
| 35 | 35 | { |
| 36 | - $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],$limit_start.",".$absolute_difference, $sort); |
|
| 36 | + $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], $limit_start.",".$absolute_difference, $sort); |
|
| 37 | 37 | } else { |
| 38 | - $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],$limit_start.",".$absolute_difference); |
|
| 38 | + $spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], $limit_start.",".$absolute_difference); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | if (!empty($spotter_array)) |
| 43 | 43 | { |
| 44 | 44 | date_default_timezone_set($globalTimezone); |
| 45 | - $title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 45 | + $title = sprintf(_("Detailed View for flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 46 | 46 | |
| 47 | 47 | require_once('header.php'); |
| 48 | 48 | print '<div class="select-item">'; |
@@ -54,12 +54,12 @@ discard block |
||
| 54 | 54 | print '</div>'; |
| 55 | 55 | |
| 56 | 56 | print '<div class="info column">'; |
| 57 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 57 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 58 | 58 | print '</div>'; |
| 59 | 59 | |
| 60 | 60 | include('date-sub-menu.php'); |
| 61 | 61 | print '<div class="table column">'; |
| 62 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 62 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 63 | 63 | |
| 64 | 64 | include('table-output.php'); |
| 65 | 65 | print '<div class="pagination">'; |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", 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 Time of Day from %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Time of Day from %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 Time of Day").'</h2>'; |
| 54 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 54 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
| 55 | 55 | $hour_array = $Spotter->countAllHoursByCountry($country); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 57 | 57 | print '<div id="chartHour" class="chart" width="100%"></div> |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 64 | 64 | $hour_data = ''; |
| 65 | - foreach($hour_array as $hour_item) |
|
| 65 | + foreach ($hour_array as $hour_item) |
|
| 66 | 66 | { |
| 67 | 67 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 68 | 68 | } |
@@ -8,14 +8,14 @@ discard block |
||
| 8 | 8 | require_once('require/class.Spotter.php'); |
| 9 | 9 | require_once('require/class.Language.php'); |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | 12 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
| 14 | 14 | } else $spotter_array = array(); |
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
| 18 | + $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="info column">'; |
| 21 | 21 | print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>'; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | include('route-sub-menu.php'); |
| 27 | 27 | print '<div class="column">'; |
| 28 | 28 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 29 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
| 29 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
| 30 | 30 | $airline_array = $Spotter->countAllAirlinesByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
| 31 | 31 | if (!empty($airline_array)) |
| 32 | 32 | { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | print '</thead>'; |
| 43 | 43 | print '<tbody>'; |
| 44 | 44 | $i = 1; |
| 45 | - foreach($airline_array as $airline_item) |
|
| 45 | + foreach ($airline_array as $airline_item) |
|
| 46 | 46 | { |
| 47 | 47 | print '<tr>'; |
| 48 | 48 | 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("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", 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 Departure Airports from %s"),$country); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports from %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 { |
@@ -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 Departure Airports").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."),$country).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights of airports & airlines from <strong>%s</strong>."), $country).'</p>'; |
|
| 54 | 54 | |
| 55 | 55 | $airport_airport_array = $Spotter->countAllDepartureAirportsByCountry($country); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 67 | 67 | |
| 68 | 68 | $airport_data = ''; |
| 69 | - foreach($airport_airport_array as $airport_item) |
|
| 69 | + foreach ($airport_airport_array as $airport_item) |
|
| 70 | 70 | { |
| 71 | 71 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 72 | 72 | $name = str_replace("'", "", $name); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | print '</thead>'; |
| 105 | 105 | print '<tbody>'; |
| 106 | 106 | $i = 1; |
| 107 | - foreach($airport_airport_array as $airport_item) |
|
| 107 | + foreach ($airport_airport_array as $airport_item) |
|
| 108 | 108 | { |
| 109 | 109 | print '<tr>'; |
| 110 | 110 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,23 +6,23 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/aircraft'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 9 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 16 | + $title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
| 20 | 20 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 23 | - foreach($aircraft_types as $aircraft_type) |
|
| 23 | + foreach ($aircraft_types as $aircraft_type) |
|
| 24 | 24 | { |
| 25 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 25 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 26 | 26 | { |
| 27 | 27 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 28 | 28 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | include('aircraft-sub-menu.php'); |
| 49 | 49 | print '<div class="column">'; |
| 50 | 50 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 51 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 51 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 52 | 52 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAircraft($aircraft_type); |
| 53 | 53 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 54 | 54 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | var data = google.visualization.arrayToDataTable([ |
| 60 | 60 | ["'._("Country").'", "'._("# of times").'"], '; |
| 61 | 61 | $country_data = ''; |
| 62 | - foreach($airport_country_array as $airport_item) |
|
| 62 | + foreach ($airport_country_array as $airport_item) |
|
| 63 | 63 | { |
| 64 | 64 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 65 | 65 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '</thead>'; |
| 94 | 94 | print '<tbody>'; |
| 95 | 95 | $i = 1; |
| 96 | - foreach($airport_country_array as $airport_item) |
|
| 96 | + foreach ($airport_country_array as $airport_item) |
|
| 97 | 97 | { |
| 98 | 98 | print '<tr>'; |
| 99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,22 +6,22 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/airline'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 15 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
| 19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
| 20 | 20 | print '<option></option>'; |
| 21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
| 22 | - foreach($airline_names as $airline_name) |
|
| 22 | + foreach ($airline_names as $airline_name) |
|
| 23 | 23 | { |
| 24 | - if($airline == $airline_name['airline_icao']) |
|
| 24 | + if ($airline == $airline_name['airline_icao']) |
|
| 25 | 25 | { |
| 26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | include('airline-sub-menu.php'); |
| 60 | 60 | print '<div class="column">'; |
| 61 | 61 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 62 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 62 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | 63 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
| 64 | 64 | if (!empty($route_array)) |
| 65 | 65 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | print '</thead>'; |
| 76 | 76 | print '<tbody>'; |
| 77 | 77 | $i = 1; |
| 78 | - foreach($route_array as $route_item) |
|
| 78 | + foreach ($route_array as $route_item) |
|
| 79 | 79 | { |
| 80 | 80 | print '<tr>'; |
| 81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit'])) |
|
| 10 | +if (!isset($_GET['limit'])) |
|
| 11 | 11 | { |
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -34,10 +34,10 @@ discard block |
||
| 34 | 34 | print '<div class="table column">'; |
| 35 | 35 | print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>'; |
| 36 | 36 | |
| 37 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 37 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 38 | 38 | $sql_begin = microtime(true); |
| 39 | 39 | $spotter_array = $Spotter->getLatestSpotterData($limit_start.",".$absolute_difference, $sort); |
| 40 | -$sql_time = microtime(true)-$sql_begin; |
|
| 40 | +$sql_time = microtime(true) - $sql_begin; |
|
| 41 | 41 | |
| 42 | 42 | $page_begin = microtime(true); |
| 43 | 43 | if (!empty($spotter_array)) |
@@ -55,6 +55,6 @@ discard block |
||
| 55 | 55 | print '</div>'; |
| 56 | 56 | print '</div>'; |
| 57 | 57 | } |
| 58 | -$page_time = microtime(true)-$page_begin; |
|
| 58 | +$page_time = microtime(true) - $page_begin; |
|
| 59 | 59 | require_once('footer.php'); |
| 60 | 60 | ?> |
| 61 | 61 | \ No newline at end of file |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | <?php |
| 30 | 30 | if (isset($_GET['q'])) |
| 31 | 31 | { |
| 32 | - $spotter_array = $Spotter->searchSpotterData($_GET['q'],"","","","","","","","","","","","","","","","","","0,10","",""); |
|
| 32 | + $spotter_array = $Spotter->searchSpotterData($_GET['q'], "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "0,10", "", ""); |
|
| 33 | 33 | } else { |
| 34 | 34 | $spotter_array = $Spotter->getLatestSpotterData("0,10", ""); |
| 35 | 35 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | print '<div class="table-responsive">'; |
| 38 | 38 | print '<table id="table-tv">'; |
| 39 | 39 | print '<tbody>'; |
| 40 | -foreach($spotter_array as $spotter_item) |
|
| 40 | +foreach ($spotter_array as $spotter_item) |
|
| 41 | 41 | { |
| 42 | 42 | if (isset($globalTimezone)) { |
| 43 | 43 | date_default_timezone_set($globalTimezone); |
@@ -7,8 +7,8 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
|
| 11 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$country = ucwords(str_replace("-", " ", 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>'; |