@@ -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 Time of Day of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Time of Day 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,9 +29,9 @@ discard block |
||
| 29 | 29 | include('owner-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | 33 | |
| 34 | - $hour_array = $Spotter->countAllHoursByPilot($pilot,$filter); |
|
| 34 | + $hour_array = $Spotter->countAllHoursByPilot($pilot, $filter); |
|
| 35 | 35 | print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
| 36 | 36 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
| 37 | 37 | print '<script type="text/javascript" src="'.$globalURL.'/js/c3.min.js"></script>'; |
@@ -39,9 +39,9 @@ discard block |
||
| 39 | 39 | $hour_data = ''; |
| 40 | 40 | $hour_cnt = ''; |
| 41 | 41 | $last = 0; |
| 42 | - foreach($hour_array as $hour_item) |
|
| 42 | + foreach ($hour_array as $hour_item) |
|
| 43 | 43 | { |
| 44 | - while($last != $hour_item['hour_name']) { |
|
| 44 | + while ($last != $hour_item['hour_name']) { |
|
| 45 | 45 | $hour_data .= '"'.$last.':00",'; |
| 46 | 46 | $hour_cnt .= '0,'; |
| 47 | 47 | $last++; |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $hour_cnt .= $hour_item['hour_count'].','; |
| 52 | 52 | } |
| 53 | 53 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
| 54 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 54 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 55 | 55 | print 'c3.generate({ |
| 56 | 56 | bindto: "#chartHour", |
| 57 | 57 | data: { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | print '</thead>'; |
| 77 | 77 | print '<tbody>'; |
| 78 | 78 | $i = 1; |
| 79 | - foreach($hour_array as $hour_item) |
|
| 79 | + foreach ($hour_array as $hour_item) |
|
| 80 | 80 | { |
| 81 | 81 | print '<tr>'; |
| 82 | 82 | print '<td>'.$hour_item['hour_name'].':00</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 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 '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">'; |
| 57 | 57 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | $hour_data = ''; |
| 61 | 61 | $hour_cnt = ''; |
| 62 | 62 | $last = 0; |
| 63 | - foreach($hour_array as $hour_item) |
|
| 63 | + foreach ($hour_array as $hour_item) |
|
| 64 | 64 | { |
| 65 | - while($last != $hour_item['hour_name']) { |
|
| 65 | + while ($last != $hour_item['hour_name']) { |
|
| 66 | 66 | $hour_data .= '"'.$last.':00",'; |
| 67 | 67 | $hour_cnt .= '0,'; |
| 68 | 68 | $last++; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $hour_cnt .= $hour_item['hour_count'].','; |
| 73 | 73 | } |
| 74 | 74 | $hour_data = "['x',".substr($hour_data, 0, -1)."]"; |
| 75 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 75 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 76 | 76 | print 'c3.generate({ |
| 77 | 77 | bindto: "#chartHour", |
| 78 | 78 | data: { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | print '</thead>'; |
| 98 | 98 | print '<tbody>'; |
| 99 | 99 | $i = 1; |
| 100 | - foreach($hour_array as $hour_item) |
|
| 100 | + foreach ($hour_array as $hour_item) |
|
| 101 | 101 | { |
| 102 | 102 | print '<tr>'; |
| 103 | 103 | print '<td>'.$hour_item['hour_name'].':00</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>'; |
@@ -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 | -$owner = filter_input(INPUT_GET,'owner',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 | +$owner = filter_input(INPUT_GET, 'owner', 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->getSpotterDataByOwner($owner,"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->getSpotterDataByOwner($owner, "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]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | include('owner-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 owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | - $airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner,$filter); |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 33 | + $airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner, $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>'; |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | if (!isset($filter_name)) $filter_name = ''; |
| 20 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 20 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 21 | 21 | if ($airline_icao == '' && isset($globalFilter)) { |
| 22 | 22 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 23 | 23 | } |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | </div> |
| 34 | 34 | <p>'._("Below is a list of the most common <strong>time of day</strong>.").'</p>'; |
| 35 | 35 | |
| 36 | -if ($type == 'aircraft') $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 37 | -elseif ($type == 'marine') $hour_array = $Marine->countAllHours('hour',true); |
|
| 38 | -elseif ($type == 'tracker') $hour_array = $Tracker->countAllHours('hour',true); |
|
| 36 | +if ($type == 'aircraft') $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 37 | +elseif ($type == 'marine') $hour_array = $Marine->countAllHours('hour', true); |
|
| 38 | +elseif ($type == 'tracker') $hour_array = $Tracker->countAllHours('hour', true); |
|
| 39 | 39 | print '<div id="chartHour" class="chart" width="100%"></div><script>'; |
| 40 | 40 | $hour_data = ''; |
| 41 | 41 | $hour_cnt = ''; |
| 42 | 42 | $last = 0; |
| 43 | -foreach($hour_array as $hour_item) |
|
| 43 | +foreach ($hour_array as $hour_item) |
|
| 44 | 44 | { |
| 45 | - while($last != $hour_item['hour_name']) { |
|
| 45 | + while ($last != $hour_item['hour_name']) { |
|
| 46 | 46 | $hour_data .= '"'.$last.':00",'; |
| 47 | 47 | $hour_cnt .= '0,'; |
| 48 | 48 | $last++; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $hour_cnt .= $hour_item['hour_count'].','; |
| 53 | 53 | } |
| 54 | 54 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 55 | -$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 55 | +$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 56 | 56 | print 'c3.generate({ |
| 57 | 57 | bindto: "#chartHour", |
| 58 | 58 | data: { |
@@ -60,9 +60,9 @@ discard block |
||
| 60 | 60 | axis: { x: { type: "category", categories: '.$hour_data.'},y: { label: "# of Flights"}},legend: { show: false }});'; |
| 61 | 61 | print '</script>'; |
| 62 | 62 | |
| 63 | -if ($type == 'aircraft') $hour_array = $Stats->countAllHours('count',true,$airline_icao,$filter_name); |
|
| 64 | -elseif ($type == 'marine') $hour_array = $Marine->countAllHours('count',true); |
|
| 65 | -elseif ($type == 'tracker') $hour_array = $Tracker->countAllHours('count',true); |
|
| 63 | +if ($type == 'aircraft') $hour_array = $Stats->countAllHours('count', true, $airline_icao, $filter_name); |
|
| 64 | +elseif ($type == 'marine') $hour_array = $Marine->countAllHours('count', true); |
|
| 65 | +elseif ($type == 'tracker') $hour_array = $Tracker->countAllHours('count', true); |
|
| 66 | 66 | if (!empty($hour_array)) |
| 67 | 67 | { |
| 68 | 68 | print '<div class="table-responsive">'; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | print '</thead>'; |
| 75 | 75 | print '<tbody>'; |
| 76 | 76 | $i = 1; |
| 77 | - foreach($hour_array as $hour_item) |
|
| 77 | + foreach ($hour_array as $hour_item) |
|
| 78 | 78 | { |
| 79 | 79 | print '<tr>'; |
| 80 | 80 | 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 | -$owner = filter_input(INPUT_GET,'owner',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 | +$owner = filter_input(INPUT_GET, 'owner', 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->getSpotterDataByOwner($owner,"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->getSpotterDataByOwner($owner, "0,1", $sort, $filter); |
|
| 18 | 18 | |
| 19 | 19 | if (!empty($spotter_array)) |
| 20 | 20 | { |
| 21 | - $title = sprintf(_("Most Common Departure Airports by Owner of %s"),$spotter_array[0]['aircraft_owner']); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports by Owner of %s"), $spotter_array[0]['aircraft_owner']); |
|
| 22 | 22 | require_once('header.php'); |
| 23 | 23 | print '<div class="info column">'; |
| 24 | 24 | print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>'; |
@@ -28,16 +28,16 @@ discard block |
||
| 28 | 28 | include('owner-sub-menu.php'); |
| 29 | 29 | print '<div class="column">'; |
| 30 | 30 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 31 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 31 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
| 32 | 32 | |
| 33 | - $airport_country_array = $Spotter->countAllDepartureAirportCountriesByOwner($owner,$filter); |
|
| 33 | + $airport_country_array = $Spotter->countAllDepartureAirportCountriesByOwner($owner, $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>'; |
| 37 | 37 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 38 | 38 | print 'var series = ['; |
| 39 | 39 | $country_data = ''; |
| 40 | - foreach($airport_country_array as $airport_item) |
|
| 40 | + foreach ($airport_country_array as $airport_item) |
|
| 41 | 41 | { |
| 42 | 42 | $country_data .= '[ "'.$airport_item['airport_departure_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 43 | 43 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | print '</thead>'; |
| 85 | 85 | print '<tbody>'; |
| 86 | 86 | $i = 1; |
| 87 | - foreach($airport_country_array as $airport_item) |
|
| 87 | + foreach ($airport_country_array as $airport_item) |
|
| 88 | 88 | { |
| 89 | 89 | print '<tr>'; |
| 90 | 90 | 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 Departure Airports by Owner of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Departure Airports by Owner 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>'; |
@@ -28,16 +28,16 @@ discard block |
||
| 28 | 28 | include('owner-sub-menu.php'); |
| 29 | 29 | print '<div class="column">'; |
| 30 | 30 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 31 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 31 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 32 | 32 | |
| 33 | - $airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($pilot,$filter); |
|
| 33 | + $airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($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>'; |
| 37 | 37 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 38 | 38 | print 'var series = ['; |
| 39 | 39 | $country_data = ''; |
| 40 | - foreach($airport_country_array as $airport_item) |
|
| 40 | + foreach ($airport_country_array as $airport_item) |
|
| 41 | 41 | { |
| 42 | 42 | $country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 43 | 43 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | print '</thead>'; |
| 85 | 85 | print '<tbody>'; |
| 86 | 86 | $i = 1; |
| 87 | - foreach($airport_country_array as $airport_item) |
|
| 87 | + foreach ($airport_country_array as $airport_item) |
|
| 88 | 88 | { |
| 89 | 89 | print '<tr>'; |
| 90 | 90 | 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 by Country of %s"),$spotter_array[0]['pilot_name']); |
|
| 21 | + $title = sprintf(_("Most Common Arrival Airports by Country 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,15 +29,15 @@ discard block |
||
| 29 | 29 | include('pilot-sub-menu.php'); |
| 30 | 30 | print '<div class="column">'; |
| 31 | 31 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 32 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | - $airport_country_array = $Spotter->countAllArrivalAirportCountriesByPilot($pilot,$filter); |
|
| 32 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
| 33 | + $airport_country_array = $Spotter->countAllArrivalAirportCountriesByPilot($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>'; |
| 37 | 37 | print '<div id="chartCountry" class="chart" width="100%"></div><script>'; |
| 38 | 38 | print 'var series = ['; |
| 39 | 39 | $country_data = ''; |
| 40 | - foreach($airport_country_array as $airport_item) |
|
| 40 | + foreach ($airport_country_array as $airport_item) |
|
| 41 | 41 | { |
| 42 | 42 | $country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 43 | 43 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | print '</thead>'; |
| 85 | 85 | print '<tbody>'; |
| 86 | 86 | $i = 1; |
| 87 | - foreach($airport_country_array as $airport_item) |
|
| 87 | + foreach ($airport_country_array as $airport_item) |
|
| 88 | 88 | { |
| 89 | 89 | print '<tr>'; |
| 90 | 90 | print '<td><strong>'.$i.'</strong></td>'; |