@@ -3,13 +3,13 @@ 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 | -$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 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 9 | 9 | |
| 10 | 10 | if (!empty($spotter_array)) |
| 11 | 11 | { |
| 12 | - $title = sprintf(_("Most Common Aircraft Manufacturer on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Aircraft Manufacturer on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | |
| 14 | 14 | require_once('header.php'); |
| 15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 28 | 28 | print '<br />'; |
| 29 | 29 | print '<div class="info column">'; |
| 30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 31 | 31 | print '</div>'; |
| 32 | 32 | |
| 33 | 33 | include('date-sub-menu.php'); |
| 34 | 34 | print '<div class="column">'; |
| 35 | 35 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 36 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 37 | 37 | |
| 38 | 38 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByDate($date); |
| 39 | 39 | if (!empty($manufacturers_array)) |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | print '</thead>'; |
| 49 | 49 | print '<tbody>'; |
| 50 | 50 | $i = 1; |
| 51 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 51 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 52 | 52 | { |
| 53 | 53 | print '<tr>'; |
| 54 | 54 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ 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 | -$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 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 9 | 9 | |
| 10 | 10 | if (!empty($spotter_array)) |
| 11 | 11 | { |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 28 | 28 | print '<br />'; |
| 29 | 29 | print '<div class="info column">'; |
| 30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 31 | 31 | print '</div>'; |
| 32 | 32 | |
| 33 | 33 | include('date-sub-menu.php'); |
| 34 | 34 | print '<div class="column">'; |
| 35 | 35 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 36 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 37 | 37 | |
| 38 | 38 | $aircraft_array = $Spotter->countAllAircraftRegistrationByDate($date); |
| 39 | 39 | if (!empty($aircraft_array)) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | print '</thead>'; |
| 51 | 51 | print '<tbody>'; |
| 52 | 52 | $i = 1; |
| 53 | - foreach($aircraft_array as $aircraft_item) |
|
| 53 | + foreach ($aircraft_array as $aircraft_item) |
|
| 54 | 54 | { |
| 55 | 55 | print '<tr>'; |
| 56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | if (isset($aircraft_item['aircraft_type'])) { |
| 61 | 61 | print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_type'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:").' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
| 62 | 62 | } else { |
| 63 | - print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:");' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
|
| 63 | + print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:"); ' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>'; |
|
| 64 | 64 | } |
| 65 | 65 | print '</td>'; |
| 66 | 66 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airline'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 16 | + $title = sprintf(_("Most Common Aircraft Manufacturer from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
| 25 | - foreach($airline_names as $airline_name) |
|
| 25 | + foreach ($airline_names as $airline_name) |
|
| 26 | 26 | { |
| 27 | - if($airline == $airline_name['airline_icao']) |
|
| 27 | + if ($airline == $airline_name['airline_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | include('airline-sub-menu.php'); |
| 63 | 63 | print '<div class="column">'; |
| 64 | 64 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 65 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 65 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 66 | 66 | |
| 67 | 67 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirline($airline); |
| 68 | 68 | if (!empty($manufacturers_array)) |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | print '</thead>'; |
| 78 | 78 | print '<tbody>'; |
| 79 | 79 | $i = 1; |
| 80 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 80 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 81 | 81 | { |
| 82 | 82 | print '<tr>'; |
| 83 | 83 | 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("-", " ", 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("-", " ", 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,12 +7,12 @@ discard block |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
| 10 | +if (!isset($_GET['limit']) || $_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]; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | print '<div class="table column">'; |
| 40 | 40 | print '<p>'._("The table below shows the detailed information of all custom selected flights who have special aspects to it, such as unique liveries, destinations etc.").'</p>'; |
| 41 | 41 | |
| 42 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 42 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 43 | 43 | if ($sort != '') { |
| 44 | 44 | $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort); |
| 45 | 45 | } else { |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airline'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Arrival Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 16 | + $title = sprintf(_("Most Common Arrival Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | 24 | if (empty($ariline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
| 25 | - foreach($airline_names as $airline_name) |
|
| 25 | + foreach ($airline_names as $airline_name) |
|
| 26 | 26 | { |
| 27 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
| 27 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | include('airline-sub-menu.php'); |
| 63 | 63 | print '<div class="column">'; |
| 64 | 64 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
| 65 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 65 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 66 | 66 | $airport_airport_array = $Spotter->countAllArrivalAirportsByAirline($airline); |
| 67 | 67 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
| 68 | 68 | <script> |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | var data = google.visualization.arrayToDataTable([ |
| 77 | 77 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 78 | 78 | $airport_data = ''; |
| 79 | - foreach($airport_airport_array as $airport_item) |
|
| 79 | + foreach ($airport_airport_array as $airport_item) |
|
| 80 | 80 | { |
| 81 | 81 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
| 82 | 82 | $name = str_replace("'", "", $name); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | print '</thead>'; |
| 116 | 116 | print '<tbody>'; |
| 117 | 117 | $i = 1; |
| 118 | - foreach($airport_airport_array as $airport_item) |
|
| 118 | + foreach ($airport_airport_array as $airport_item) |
|
| 119 | 119 | { |
| 120 | 120 | print '<tr>'; |
| 121 | 121 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
| 13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 14 | 14 | |
| 15 | 15 | if (!empty($airport_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Aircraft Manufacturer to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
| 30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $manufacturers_array = $Spotter->countAllAircraftManufacturerByAirport($_GET['airport']); |
| 64 | 64 | if (!empty($manufacturers_array)) |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | print '</thead>'; |
| 74 | 74 | print '<tbody>'; |
| 75 | 75 | $i = 1; |
| 76 | - foreach($manufacturers_array as $manufacturer_item) |
|
| 76 | + foreach ($manufacturers_array as $manufacturer_item) |
|
| 77 | 77 | { |
| 78 | 78 | print '<tr>'; |
| 79 | 79 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,13 +3,13 @@ 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 | -$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 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 9 | 9 | |
| 10 | 10 | if (!empty($spotter_array)) |
| 11 | 11 | { |
| 12 | - $title = sprintf(_("Most Common Routes on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Routes on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | |
| 14 | 14 | require_once('header.php'); |
| 15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 28 | 28 | print '<br />'; |
| 29 | 29 | print '<div class="info column">'; |
| 30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 31 | 31 | print '</div>'; |
| 32 | 32 | |
| 33 | 33 | include('date-sub-menu.php'); |
| 34 | 34 | print '<div class="column">'; |
| 35 | 35 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 36 | - print '<p>'.sprintf(_("The statistic below shows the most common routes on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | + print '<p>'.sprintf(_("The statistic below shows the most common routes on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 37 | 37 | |
| 38 | 38 | $route_array = $Spotter->countAllRoutesByDate($date); |
| 39 | 39 | if (!empty($route_array)) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | print '</thead>'; |
| 51 | 51 | print '<tbody>'; |
| 52 | 52 | $i = 1; |
| 53 | - foreach($route_array as $route_item) |
|
| 53 | + foreach ($route_array as $route_item) |
|
| 54 | 54 | { |
| 55 | 55 | print '<tr>'; |
| 56 | 56 | 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 | |
| 6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 7 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 7 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 8 | 8 | |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 10 | +if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 11 | 11 | else $spotter_array = array(); |
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 15 | + $title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -29,13 +29,13 @@ discard block |
||
| 29 | 29 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 30 | 30 | print '<br />'; |
| 31 | 31 | print '<div class="info column">'; |
| 32 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 32 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 33 | 33 | print '</div>'; |
| 34 | 34 | |
| 35 | 35 | include('date-sub-menu.php'); |
| 36 | 36 | print '<div class="column">'; |
| 37 | 37 | print '<h2>'._("Most Common Airlines by Country").'</h2>'; |
| 38 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 38 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 39 | 39 | |
| 40 | 40 | $airline_array = $Spotter->countAllAirlineCountriesByDate($date); |
| 41 | 41 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | var data = google.visualization.arrayToDataTable([ |
| 48 | 48 | ["'._("Country").'", "'._("# of times").'"], '; |
| 49 | 49 | $country_data = ''; |
| 50 | - foreach($airline_array as $airline_item) |
|
| 50 | + foreach ($airline_array as $airline_item) |
|
| 51 | 51 | { |
| 52 | 52 | $country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],'; |
| 53 | 53 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | print '</thead>'; |
| 82 | 82 | print '<tbody>'; |
| 83 | 83 | $i = 1; |
| 84 | - foreach($airline_array as $airline_item) |
|
| 84 | + foreach ($airline_array as $airline_item) |
|
| 85 | 85 | { |
| 86 | 86 | print '<tr>'; |
| 87 | 87 | print '<td><strong>'.$i.'</strong></td>'; |