@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Departure Airports of %s"),$spotter_array[0]['ident']); |
|
| 16 | + $title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['ident']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="info column">'; |
| 19 | 19 | print '<h1>'.$spotter_array[0]['ident'].'</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('ident-sub-menu.php'); |
| 25 | 25 | print '<div class="column">'; |
| 26 | 26 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
| 28 | 28 | $airport_airport_array = $Spotter->countAllDepartureAirportsByIdent($ident); |
| 29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | print '<script>'; |
| 34 | 34 | print 'var series = ['; |
| 35 | 35 | $airport_data = ''; |
| 36 | - foreach($airport_airport_array as $airport_item) |
|
| 36 | + foreach ($airport_airport_array as $airport_item) |
|
| 37 | 37 | { |
| 38 | 38 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_name'].' ('.$airport_item['airport_departure_icao'].')",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 39 | 39 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | print '</thead>'; |
| 89 | 89 | print '<tbody>'; |
| 90 | 90 | $i = 1; |
| 91 | - foreach($airport_airport_array as $airport_item) |
|
| 91 | + foreach ($airport_airport_array as $airport_item) |
|
| 92 | 92 | { |
| 93 | 93 | print '<tr>'; |
| 94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,14 +3,14 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 7 | -$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 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
| 9 | 9 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
| 10 | 10 | |
| 11 | 11 | if (!empty($spotter_array)) |
| 12 | 12 | { |
| 13 | - $title = sprintf(_("Most Common Time of Day of aircraft with registration %s"),$registration); |
|
| 13 | + $title = sprintf(_("Most Common Time of Day of aircraft with registration %s"), $registration); |
|
| 14 | 14 | require_once('header.php'); |
| 15 | 15 | |
| 16 | 16 | print '<div class="info column">'; |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | include('registration-sub-menu.php'); |
| 24 | 24 | print '<div class="column">'; |
| 25 | 25 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 26 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."),$registration).'</p>'; |
|
| 26 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."), $registration).'</p>'; |
|
| 27 | 27 | |
| 28 | 28 | $hour_array = $Spotter->countAllHoursByRegistration($registration); |
| 29 | 29 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | $hour_data = ''; |
| 34 | 34 | $hour_cnt = ''; |
| 35 | 35 | $last = 0; |
| 36 | - foreach($hour_array as $hour_item) |
|
| 36 | + foreach ($hour_array as $hour_item) |
|
| 37 | 37 | { |
| 38 | - while($last != $hour_item['hour_name']) { |
|
| 38 | + while ($last != $hour_item['hour_name']) { |
|
| 39 | 39 | $hour_data .= '"'.$last.':00",'; |
| 40 | 40 | $hour_cnt .= '0,'; |
| 41 | 41 | $last++; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $hour_cnt .= $hour_item['hour_count'].','; |
| 46 | 46 | } |
| 47 | 47 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 48 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 48 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 49 | 49 | print 'c3.generate({ |
| 50 | 50 | bindto: "#chartHour", |
| 51 | 51 | data: { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | print '</thead>'; |
| 69 | 69 | print '<tbody>'; |
| 70 | 70 | $i = 1; |
| 71 | - foreach($hour_array as $hour_item) |
|
| 71 | + foreach ($hour_array as $hour_item) |
|
| 72 | 72 | { |
| 73 | 73 | print '<tr>'; |
| 74 | 74 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -4,13 +4,13 @@ discard block |
||
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | 6 | $Spotter = new Spotter(); |
| 7 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 8 | -$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 9 | -$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort); |
|
| 7 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 8 | +$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 9 | +$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort); |
|
| 10 | 10 | |
| 11 | 11 | if (!empty($spotter_array)) |
| 12 | 12 | { |
| 13 | - $title = sprintf(_("Most Common Departure Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | + $title = sprintf(_("Most Common Departure Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 14 | 14 | |
| 15 | 15 | require_once('header.php'); |
| 16 | 16 | print '<div class="select-item">'; |
@@ -28,13 +28,13 @@ discard block |
||
| 28 | 28 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 29 | 29 | print '<br />'; |
| 30 | 30 | print '<div class="info column">'; |
| 31 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 31 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 32 | 32 | print '</div>'; |
| 33 | 33 | |
| 34 | 34 | include('date-sub-menu.php'); |
| 35 | 35 | print '<div class="column">'; |
| 36 | 36 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 37 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 37 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 38 | 38 | $airport_airport_array = $Spotter->countAllDepartureAirportsByDate($date); |
| 39 | 39 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 40 | 40 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | print '<script>'; |
| 44 | 44 | print 'var series = ['; |
| 45 | 45 | $airport_data = ''; |
| 46 | - foreach($airport_airport_array as $airport_item) |
|
| 46 | + foreach ($airport_airport_array as $airport_item) |
|
| 47 | 47 | { |
| 48 | 48 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 49 | 49 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | print '</thead>'; |
| 99 | 99 | print '<tbody>'; |
| 100 | 100 | $i = 1; |
| 101 | - foreach($airport_airport_array as $airport_item) |
|
| 101 | + foreach ($airport_airport_array as $airport_item) |
|
| 102 | 102 | { |
| 103 | 103 | print '<tr>'; |
| 104 | 104 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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); |
|
| 12 | -$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING); |
|
| 13 | -$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING); |
|
| 11 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 12 | +$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING); |
|
| 13 | +$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING); |
|
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - $title = sprintf(_("Most Common Airlines by Country 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 by Country 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 by Country").'</h2>'; |
| 29 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin 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 by Country of origin 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 | |
| 31 | 31 | $airline_array = $Spotter->countAllAirlineCountriesByRoute($departure_airport, $arrival_airport); |
| 32 | 32 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 36 | 36 | print 'var series = ['; |
| 37 | 37 | $country_data = ''; |
| 38 | - foreach($airline_array as $airline_item) |
|
| 38 | + foreach ($airline_array as $airline_item) |
|
| 39 | 39 | { |
| 40 | 40 | $country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],'; |
| 41 | 41 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | print '</thead>'; |
| 83 | 83 | print '<tbody>'; |
| 84 | 84 | $i = 1; |
| 85 | - foreach($airline_array as $airline_item) |
|
| 85 | + foreach ($airline_array as $airline_item) |
|
| 86 | 86 | { |
| 87 | 87 | print '<tr>'; |
| 88 | 88 | 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 Arrival Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Arrival Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | require_once('header.php'); |
| 14 | 14 | print '<div class="select-item">'; |
| 15 | 15 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -26,13 +26,13 @@ discard block |
||
| 26 | 26 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 27 | 27 | print '<br />'; |
| 28 | 28 | print '<div class="info column">'; |
| 29 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 29 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | 30 | print '</div>'; |
| 31 | 31 | |
| 32 | 32 | include('date-sub-menu.php'); |
| 33 | 33 | print '<div class="column">'; |
| 34 | 34 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 35 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 35 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | 36 | |
| 37 | 37 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByDate($date); |
| 38 | 38 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 42 | 42 | print 'var series = ['; |
| 43 | 43 | $country_data = ''; |
| 44 | - foreach($airport_country_array as $airport_item) |
|
| 44 | + foreach ($airport_country_array as $airport_item) |
|
| 45 | 45 | { |
| 46 | 46 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 47 | 47 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | print '</thead>'; |
| 90 | 90 | print '<tbody>'; |
| 91 | 91 | $i = 1; |
| 92 | - foreach($airport_country_array as $airport_item) |
|
| 92 | + foreach ($airport_country_array as $airport_item) |
|
| 93 | 93 | { |
| 94 | 94 | print '<tr>'; |
| 95 | 95 | 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 Time of Day on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Time of Day on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | require_once('header.php'); |
| 14 | 14 | print '<div class="select-item">'; |
| 15 | 15 | print '<form action="'.$globalURL.'/date" method="post" class="form-inline">'; |
@@ -26,13 +26,13 @@ discard block |
||
| 26 | 26 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 27 | 27 | print '<br />'; |
| 28 | 28 | print '<div class="info column">'; |
| 29 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 29 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | 30 | print '</div>'; |
| 31 | 31 | |
| 32 | 32 | include('date-sub-menu.php'); |
| 33 | 33 | print '<div class="column">'; |
| 34 | 34 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 35 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 35 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | 36 | |
| 37 | 37 | $hour_array = $Spotter->countAllHoursByDate($date); |
| 38 | 38 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
@@ -42,9 +42,9 @@ discard block |
||
| 42 | 42 | $hour_data = ''; |
| 43 | 43 | $hour_cnt = ''; |
| 44 | 44 | $last = 0; |
| 45 | - foreach($hour_array as $hour_item) |
|
| 45 | + foreach ($hour_array as $hour_item) |
|
| 46 | 46 | { |
| 47 | - while($last != $hour_item['hour_name']) { |
|
| 47 | + while ($last != $hour_item['hour_name']) { |
|
| 48 | 48 | $hour_data .= '"'.$last.':00",'; |
| 49 | 49 | $hour_cnt .= '0,'; |
| 50 | 50 | $last++; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $hour_cnt .= $hour_item['hour_count'].','; |
| 55 | 55 | } |
| 56 | 56 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
| 57 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 57 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 58 | 58 | print 'c3.generate({ |
| 59 | 59 | bindto: "#chartHour", |
| 60 | 60 | data: { |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | print '</thead>'; |
| 80 | 80 | print '<tbody>'; |
| 81 | 81 | $i = 1; |
| 82 | - foreach($hour_array as $hour_item) |
|
| 82 | + foreach ($hour_array as $hour_item) |
|
| 83 | 83 | { |
| 84 | 84 | print '<tr>'; |
| 85 | 85 | print '<td>'.$hour_item['hour_name'].':00</td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Departure Airports of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['pilot_name']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | include('pilot-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | - $airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($pilot,$filter); |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | + $airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($pilot, $filter); |
|
| 34 | 34 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 35 | 35 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
| 36 | 36 | print '<script type="text/javascript" src="'.$globalURL.'/js/datamaps.world.min.js"></script>'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | print '<script>'; |
| 39 | 39 | print 'var series = ['; |
| 40 | 40 | $airport_data = ''; |
| 41 | - foreach($airport_airport_array as $airport_item) |
|
| 41 | + foreach ($airport_airport_array as $airport_item) |
|
| 42 | 42 | { |
| 43 | 43 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 44 | 44 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '</thead>'; |
| 94 | 94 | print '<tbody>'; |
| 95 | 95 | $i = 1; |
| 96 | - foreach($airport_airport_array as $airport_item) |
|
| 96 | + foreach ($airport_airport_array as $airport_item) |
|
| 97 | 97 | { |
| 98 | 98 | print '<tr>'; |
| 99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
| 12 | -$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['ident']); |
|
| 16 | + $title = sprintf(_("Most Common Arrival 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 Arrival Airports").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>'; |
|
| 28 | 28 | $airport_airport_array = $Spotter->countAllArrivalAirportsByIdent($ident); |
| 29 | 29 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 30 | 30 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | print '<script>'; |
| 34 | 34 | print 'var series = ['; |
| 35 | 35 | $airport_data = ''; |
| 36 | - foreach($airport_airport_array as $airport_item) |
|
| 36 | + foreach ($airport_airport_array as $airport_item) |
|
| 37 | 37 | { |
| 38 | 38 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
| 39 | 39 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | print '</thead>'; |
| 89 | 89 | print '<tbody>'; |
| 90 | 90 | $i = 1; |
| 91 | - foreach($airport_airport_array as $airport_item) |
|
| 91 | + foreach ($airport_airport_array as $airport_item) |
|
| 92 | 92 | { |
| 93 | 93 | print '<tr>'; |
| 94 | 94 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,18 +7,18 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 11 | -$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
| 12 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | +$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
| 12 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | 14 | $filter = array(); |
| 15 | -if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
| 16 | -if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
| 17 | -$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter); |
|
| 15 | +if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
| 16 | +if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
| 17 | +$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['pilot_name']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>'; |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | include('pilot-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | - $airport_airport_array = $Spotter->countAllArrivalAirportsByPilot($pilot,$filter); |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | + $airport_airport_array = $Spotter->countAllArrivalAirportsByPilot($pilot, $filter); |
|
| 34 | 34 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 35 | 35 | print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>'; |
| 36 | 36 | print '<script type="text/javascript" src="'.$globalURL.'/js/datamaps.world.min.js"></script>'; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | print '<script>'; |
| 39 | 39 | print 'var series = ['; |
| 40 | 40 | $airport_data = ''; |
| 41 | - foreach($airport_airport_array as $airport_item) |
|
| 41 | + foreach ($airport_airport_array as $airport_item) |
|
| 42 | 42 | { |
| 43 | 43 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
| 44 | 44 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | print '</thead>'; |
| 94 | 94 | print '<tbody>'; |
| 95 | 95 | $i = 1; |
| 96 | - foreach($airport_airport_array as $airport_item) |
|
| 96 | + foreach ($airport_airport_array as $airport_item) |
|
| 97 | 97 | { |
| 98 | 98 | print '<tr>'; |
| 99 | 99 | print '<td><strong>'.$i.'</strong></td>'; |