@@ -5,17 +5,17 @@ discard block |
||
| 5 | 5 | require_once('require/class.Stats.php'); |
| 6 | 6 | require_once('require/class.METAR.php'); |
| 7 | 7 | |
| 8 | -if (!isset($_GET['airport'])){ |
|
| 8 | +if (!isset($_GET['airport'])) { |
|
| 9 | 9 | header('Location: '.$globalURL.'/airport'); |
| 10 | 10 | } else { |
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | //calculuation for the pagination |
| 13 | - if(!isset($_GET['limit'])) |
|
| 13 | + if (!isset($_GET['limit'])) |
|
| 14 | 14 | { |
| 15 | 15 | $limit_start = 0; |
| 16 | 16 | $limit_end = 25; |
| 17 | 17 | $absolute_difference = 25; |
| 18 | - } else { |
|
| 18 | + } else { |
|
| 19 | 19 | $limit_explode = explode(",", $_GET['limit']); |
| 20 | 20 | $limit_start = $limit_explode[0]; |
| 21 | 21 | $limit_end = $limit_explode[1]; |
@@ -28,13 +28,13 @@ discard block |
||
| 28 | 28 | $limit_next = $limit_end + $absolute_difference; |
| 29 | 29 | $limit_previous_1 = $limit_start - $absolute_difference; |
| 30 | 30 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 31 | - $airport_icao = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 31 | + $airport_icao = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 32 | 32 | $page_url = $globalURL.'/airport/'.$airport_icao; |
| 33 | 33 | |
| 34 | 34 | if (isset($_GET['sort'])) { |
| 35 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, $_GET['sort']); |
|
| 35 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, $_GET['sort']); |
|
| 36 | 36 | } else { |
| 37 | - $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, ''); |
|
| 37 | + $spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, ''); |
|
| 38 | 38 | } |
| 39 | 39 | $airport_array = $Spotter->getAllAirportInfo($airport_icao); |
| 40 | 40 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | //print_r($metar_parse); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - $title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 52 | + $title = sprintf(_("Detailed View for %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 53 | 53 | |
| 54 | 54 | require_once('header.php'); |
| 55 | 55 | print '<div class="select-item">'; |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | print '<option></option>'; |
| 59 | 59 | $airport_names = $Spotter->getAllAirportNames(); |
| 60 | 60 | ksort($airport_names); |
| 61 | - foreach($airport_names as $airport_name) |
|
| 61 | + foreach ($airport_names as $airport_name) |
|
| 62 | 62 | { |
| 63 | - if($airport_icao == $airport_name['airport_icao']) |
|
| 63 | + if ($airport_icao == $airport_name['airport_icao']) |
|
| 64 | 64 | { |
| 65 | 65 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
| 66 | 66 | } else { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | var data = google.visualization.arrayToDataTable([ |
| 101 | 101 | ["'._("Date").'","'._("Departure").'","'._("Arrival").'"], '; |
| 102 | 102 | $airport_data = ''; |
| 103 | - foreach($all_data as $data) |
|
| 103 | + foreach ($all_data as $data) |
|
| 104 | 104 | { |
| 105 | 105 | $airport_data .= '[ "'.$data['date'].'",'.$data['departure'].','.$data['arrival'].'],'; |
| 106 | 106 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | print _("Dew point:").' '.$metar_parse['dew'].' °C'." - "; |
| 154 | 154 | } |
| 155 | 155 | if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) { |
| 156 | - $humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1); |
|
| 156 | + $humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1); |
|
| 157 | 157 | print _("Humidity:").' '.$humidity.'%'." - "; |
| 158 | 158 | } |
| 159 | 159 | if (isset($metar_parse['QNH'])) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | print '<div class="table column">'; |
| 170 | 170 | if ($airport_array[0]['iata'] != "NA") |
| 171 | 171 | { |
| 172 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 172 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 173 | 173 | } |
| 174 | 174 | include('table-output.php'); |
| 175 | 175 | print '<div class="pagination">'; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | ["'._("Month").'", "'._("# of Flights").'"], '; |
| 24 | 24 | |
| 25 | 25 | $date_data = ''; |
| 26 | -foreach($date_array as $date_item) |
|
| 26 | +foreach ($date_array as $date_item) |
|
| 27 | 27 | { |
| 28 | 28 | $date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],'; |
| 29 | 29 | } |
@@ -60,12 +60,12 @@ discard block |
||
| 60 | 60 | print '</thead>'; |
| 61 | 61 | print '<tbody>'; |
| 62 | 62 | $i = 1; |
| 63 | - foreach($date_array as $date_item) |
|
| 63 | + foreach ($date_array as $date_item) |
|
| 64 | 64 | { |
| 65 | 65 | print '<tr>'; |
| 66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
| 67 | 67 | print '<td>'; |
| 68 | - print '<a href="'.$globalURL.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
| 68 | + print '<a href="'.$globalURL.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>'; |
|
| 69 | 69 | print '</td>'; |
| 70 | 70 | print '<td>'; |
| 71 | 71 | print $date_item['date_count']; |
@@ -9,14 +9,14 @@ discard block |
||
| 9 | 9 | require_once('require/class.Language.php'); |
| 10 | 10 | |
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
| 15 | 15 | } else $spotter_array = array(); |
| 16 | 16 | |
| 17 | 17 | if (!empty($spotter_array)) |
| 18 | 18 | { |
| 19 | - $title = sprintf(_("Most Common Time of Day 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 | + $title = sprintf(_("Most Common Time of Day 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']); |
|
| 20 | 20 | require_once('header.php'); |
| 21 | 21 | print '<div class="info column">'; |
| 22 | 22 | 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>'; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | include('route-sub-menu.php'); |
| 28 | 28 | print '<div class="column">'; |
| 29 | 29 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 30 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day 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 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day 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>'; |
|
| 31 | 31 | |
| 32 | 32 | $hour_array = $Spotter->countAllHoursByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
| 33 | 33 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | var data = google.visualization.arrayToDataTable([ |
| 40 | 40 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 41 | 41 | $hour_data = ''; |
| 42 | - foreach($hour_array as $hour_item) |
|
| 42 | + foreach ($hour_array as $hour_item) |
|
| 43 | 43 | { |
| 44 | 44 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 45 | 45 | } |
@@ -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="https://www.google.com/jsapi"></script> |
| 30 | 30 | <script> |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 40 | 40 | |
| 41 | 41 | $airport_data = ''; |
| 42 | - foreach($airport_airport_array as $airport_item) |
|
| 42 | + foreach ($airport_airport_array as $airport_item) |
|
| 43 | 43 | { |
| 44 | 44 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 45 | 45 | $name = str_replace("'", "", $name); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | print '</thead>'; |
| 79 | 79 | print '<tbody>'; |
| 80 | 80 | $i = 1; |
| 81 | - foreach($airport_airport_array as $airport_item) |
|
| 81 | + foreach ($airport_airport_array as $airport_item) |
|
| 82 | 82 | { |
| 83 | 83 | print '<tr>'; |
| 84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | $page_url = $globalURL.'/tools-notam'; |
| 12 | 12 | |
| 13 | -$message = filter_input(INPUT_POST,'notam_message',FILTER_SANITIZE_STRING); |
|
| 13 | +$message = filter_input(INPUT_POST, 'notam_message', FILTER_SANITIZE_STRING); |
|
| 14 | 14 | |
| 15 | 15 | print '<div class="info column">'; |
| 16 | 16 | print '<h1>'._("Parse NOTAM messages").'</h1>'; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | if (!empty($notam_parse)) { |
| 35 | 35 | print '<p>'._("NOTAM message in human readable format:").'</p>'; |
| 36 | 36 | foreach ($notam_parse as $key => $value) { |
| 37 | - print '<b>'.strtoupper(str_replace('_',' ',$key)).'</b>: '.$value.'<br />'; |
|
| 37 | + print '<b>'.strtoupper(str_replace('_', ' ', $key)).'</b>: '.$value.'<br />'; |
|
| 38 | 38 | } |
| 39 | 39 | } else { |
| 40 | 40 | print '<p>'._("This NOTAM message can't be translated in human readable format :(").'</p>'; |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | header('Location: '.$globalURL.'/aircraft'); |
| 9 | 9 | die(); |
| 10 | 10 | } |
| 11 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 12 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 11 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Airlines by Country from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 17 | + $title = sprintf(_("Most Common Airlines by Country from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | |
| 20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 25 | - foreach($aircraft_types as $aircrafttype) |
|
| 25 | + foreach ($aircraft_types as $aircrafttype) |
|
| 26 | 26 | { |
| 27 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 27 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 30 | 30 | } else { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('aircraft-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 54 | 54 | |
| 55 | 55 | $airline_array = $Spotter->countAllAirlineCountriesByAircraft($aircraft_type); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["Country", "# of times"], '; |
| 64 | 64 | $country_data = ''; |
| 65 | - foreach($airline_array as $airline_item) |
|
| 65 | + foreach ($airline_array as $airline_item) |
|
| 66 | 66 | { |
| 67 | 67 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
| 68 | 68 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '</thead>'; |
| 94 | 94 | print '<tbody>'; |
| 95 | 95 | $i = 1; |
| 96 | - foreach($airline_array as $airline_item) |
|
| 96 | + foreach ($airline_array as $airline_item) |
|
| 97 | 97 | { |
| 98 | 98 | print '<tr>'; |
| 99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | $output = '{'; |
| 11 | 11 | $output .= '"flights": ['; |
| 12 | 12 | if (!empty($spotter_array)) { |
| 13 | - foreach($spotter_array as $spotter_item) |
|
| 13 | + foreach ($spotter_array as $spotter_item) |
|
| 14 | 14 | { |
| 15 | 15 | $output .= '{'; |
| 16 | 16 | $output .= '"flight_id": "'.$spotter_item['spotter_id'].'",'; |
@@ -3,17 +3,17 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | -if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])){ |
|
| 6 | +if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])) { |
|
| 7 | 7 | header('Location: '.$globalURL.''); |
| 8 | 8 | } else { |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | //calculuation for the pagination |
| 11 | - if(!isset($_GET['limit'])) |
|
| 11 | + if (!isset($_GET['limit'])) |
|
| 12 | 12 | { |
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | - } else { |
|
| 16 | + } else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | $limit_previous_1 = $limit_start - $absolute_difference; |
| 28 | 28 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 29 | 29 | |
| 30 | - $departure_airport = filter_input(INPUT_POST,'departure_airport',FILTER_SANITIZE_STRING); |
|
| 31 | - $arrival_airport = filter_input(INPUT_POST,'arrival_airport',FILTER_SANITIZE_STRING); |
|
| 30 | + $departure_airport = filter_input(INPUT_POST, 'departure_airport', FILTER_SANITIZE_STRING); |
|
| 31 | + $arrival_airport = filter_input(INPUT_POST, 'arrival_airport', FILTER_SANITIZE_STRING); |
|
| 32 | 32 | $page_url = $globalURL.'/route/'.$departure_airport.'/'.$arrival_airport; |
| 33 | 33 | |
| 34 | 34 | if (isset($_GET['sort'])) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if (!empty($spotter_array)) |
| 41 | 41 | { |
| 42 | - $title = sprintf(_("Detailed View for flights 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']); |
|
| 42 | + $title = sprintf(_("Detailed View for flights 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']); |
|
| 43 | 43 | require_once('header.php'); |
| 44 | 44 | print '<div class="info column">'; |
| 45 | 45 | 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>'; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | include('route-sub-menu.php'); |
| 51 | 51 | print '<div class="table column">'; |
| 52 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."),$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['arrival_airport_icao']).'</p>'; |
|
| 52 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."), $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['arrival_airport_icao']).'</p>'; |
|
| 53 | 53 | |
| 54 | 54 | include('table-output.php'); |
| 55 | 55 | print '<div class="pagination">'; |
@@ -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 Routes of %s"),$spotter_array[0]['ident']); |
|
| 16 | + $title = sprintf(_("Most Common Routes 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 Routes").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
| 28 | 28 | |
| 29 | 29 | $route_array = $Spotter->countAllRoutesByIdent($ident); |
| 30 | 30 | if (!empty($route_array)) |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | print '</thead>'; |
| 42 | 42 | print '<tbody>'; |
| 43 | 43 | $i = 1; |
| 44 | - foreach($route_array as $route_item) |
|
| 44 | + foreach ($route_array as $route_item) |
|
| 45 | 45 | { |
| 46 | 46 | print '<tr>'; |
| 47 | 47 | print '<td><strong>'.$i.'</strong></td>'; |