@@ -3,9 +3,9 @@ discard block |
||
| 3 | 3 | </span> |
| 4 | 4 | <div class="sub-menu sub-menu-container"> |
| 5 | 5 | <ul class="nav nav-pills"> |
| 6 | - <li><a href="<?php print $globalURL; ?>/ident/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 6 | + <li><a href="<?php print $globalURL; ?>/ident/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 7 | 7 | <li class="dropdown"> |
| 8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "ident-statistics-aircraft" || strtolower($current_page) == "ident-statistics-registration" || strtolower($current_page) == "ident-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "ident-statistics-aircraft" || strtolower($current_page) == "ident-statistics-registration" || strtolower($current_page) == "ident-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 10 | 10 | </a> |
| 11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | </ul> |
| 16 | 16 | </li> |
| 17 | 17 | <li class="dropdown"> |
| 18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "ident-statistics-departure-airport" || strtolower($current_page) == "ident-statistics-departure-airport-country" || strtolower($current_page) == "ident-statistics-arrival-airport" || strtolower($current_page) == "ident-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "ident-statistics-departure-airport" || strtolower($current_page) == "ident-statistics-departure-airport-country" || strtolower($current_page) == "ident-statistics-arrival-airport" || strtolower($current_page) == "ident-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 19 | 19 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 20 | 20 | </a> |
| 21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | <li><a href="<?php print $globalURL; ?>/ident/statistics/arrival-airport-country/<?php print $ident; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 26 | 26 | </ul> |
| 27 | 27 | </li> |
| 28 | - <li><a href="<?php print $globalURL; ?>/ident/statistics/route/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 29 | - <li><a href="<?php print $globalURL; ?>/ident/statistics/time/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 28 | + <li><a href="<?php print $globalURL; ?>/ident/statistics/route/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 29 | + <li><a href="<?php print $globalURL; ?>/ident/statistics/time/<?php print $ident; ?>" <?php if (strtolower($current_page) == "ident-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 30 | 30 | </ul> |
| 31 | 31 | </div> |
| 32 | 32 | \ No newline at end of file |
@@ -8,16 +8,16 @@ 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 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
| 15 | 15 | $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort); |
| 16 | 16 | } else $spotter_array = array(); |
| 17 | 17 | |
| 18 | 18 | if (!empty($spotter_array)) |
| 19 | 19 | { |
| 20 | - $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']); |
|
| 20 | + $title = sprintf(_("Most Common Airlines between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']); |
|
| 21 | 21 | require_once('header.php'); |
| 22 | 22 | print '<div class="info column">'; |
| 23 | 23 | 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>'; |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | include('route-sub-menu.php'); |
| 29 | 29 | print '<div class="column">'; |
| 30 | 30 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 31 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>'; |
|
| 31 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>'; |
|
| 32 | 32 | $airline_array = $Spotter->countAllAirlinesByRoute($departure_airport, $arrival_airport); |
| 33 | 33 | if (!empty($airline_array)) |
| 34 | 34 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | print '</thead>'; |
| 45 | 45 | print '<tbody>'; |
| 46 | 46 | $i = 1; |
| 47 | - foreach($airline_array as $airline_item) |
|
| 47 | + foreach ($airline_array as $airline_item) |
|
| 48 | 48 | { |
| 49 | 49 | print '<tr>'; |
| 50 | 50 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ discard block |
||
| 3 | 3 | </span> |
| 4 | 4 | <div class="sub-menu sub-menu-container"> |
| 5 | 5 | <ul class="nav nav-pills"> |
| 6 | - <li><a href="<?php print $globalURL; ?>/date/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 6 | + <li><a href="<?php print $globalURL; ?>/date/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 7 | 7 | <li class="dropdown"> |
| 8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-aircraft" || strtolower($current_page) == "date-statistics-registration" || strtolower($current_page) == "date-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 10 | 10 | </a> |
| 11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | </ul> |
| 16 | 16 | </li> |
| 17 | 17 | <li class="dropdown"> |
| 18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-airline" || strtolower($current_page) == "date-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 19 | 19 | <?php echo _("Airline"); ?> <span class="caret"></span> |
| 20 | 20 | </a> |
| 21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | </ul> |
| 25 | 25 | </li> |
| 26 | 26 | <li class="dropdown"> |
| 27 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 27 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "date-statistics-departure-airport" || strtolower($current_page) == "date-statistics-departure-airport-country" || strtolower($current_page) == "date-statistics-arrival-airport" || strtolower($current_page) == "date-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 28 | 28 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 29 | 29 | </a> |
| 30 | 30 | <ul class="dropdown-menu" role="menu"> |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | <li><a href="<?php print $globalURL; ?>/date/statistics/arrival-airport-country/<?php print $date; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 35 | 35 | </ul> |
| 36 | 36 | </li> |
| 37 | - <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 38 | - <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 37 | + <li><a href="<?php print $globalURL; ?>/date/statistics/route/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 38 | + <li><a href="<?php print $globalURL; ?>/date/statistics/time/<?php print $date; ?>" <?php if (strtolower($current_page) == "date-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 39 | 39 | </ul> |
| 40 | 40 | </div> |
| 41 | 41 | \ No newline at end of file |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
| 3 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
| 3 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
| 4 | 4 | if ($date == '') $date = date('Y-m-d'); |
| 5 | 5 | header('Location: '.$globalURL.'/accident/'.$date); |
| 6 | 6 | ?> |
| 7 | 7 | \ No newline at end of file |
@@ -20,13 +20,13 @@ discard block |
||
| 20 | 20 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 21 | 21 | $year_data = ''; |
| 22 | 22 | $year_cnt = ''; |
| 23 | -foreach($date_array as $year_item) |
|
| 23 | +foreach ($date_array as $year_item) |
|
| 24 | 24 | { |
| 25 | 25 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
| 26 | 26 | $year_cnt .= $year_item['count'].','; |
| 27 | 27 | } |
| 28 | 28 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 29 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 29 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 30 | 30 | print 'c3.generate({ |
| 31 | 31 | bindto: "#chart", |
| 32 | 32 | data: { x: "x", |
@@ -36,13 +36,13 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | if (!empty($date_array)) |
| 38 | 38 | { |
| 39 | - foreach($date_array as $key => $row) { |
|
| 39 | + foreach ($date_array as $key => $row) { |
|
| 40 | 40 | $years[$key] = $row['year']; |
| 41 | 41 | $months[$key] = $row['month']; |
| 42 | 42 | $counts[$key] = $row['count']; |
| 43 | 43 | } |
| 44 | 44 | // array_multisort($years,SORT_DESC,$months,SORT_DESC,$date_array); |
| 45 | - array_multisort($counts,SORT_DESC,$date_array); |
|
| 45 | + array_multisort($counts, SORT_DESC, $date_array); |
|
| 46 | 46 | print '<div class="table-responsive">'; |
| 47 | 47 | print '<table class="common-date table-striped">'; |
| 48 | 48 | print '<thead>'; |
@@ -52,14 +52,14 @@ discard block |
||
| 52 | 52 | print '</thead>'; |
| 53 | 53 | print '<tbody>'; |
| 54 | 54 | $i = 1; |
| 55 | - foreach($date_array as $date_item) |
|
| 55 | + foreach ($date_array as $date_item) |
|
| 56 | 56 | { |
| 57 | 57 | print '<tr>'; |
| 58 | 58 | print '<td><strong>'.$i.'</strong></td>'; |
| 59 | 59 | print '<td>'; |
| 60 | 60 | if ($date_item['month'] < 10) $month = '0'.$date_item['month']; |
| 61 | 61 | else $month = $date_item['month']; |
| 62 | - print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y',strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
| 62 | + print '<a href="'.$globalURL.'/accident/'.$date_item['year'].'-'.$month.'">'.date('F, Y', strtotime($date_item['year'].'-'.$date_item['month'].'-01')).'</a>'; |
|
| 63 | 63 | print '</td>'; |
| 64 | 64 | print '<td>'; |
| 65 | 65 | print $date_item['count']; |
@@ -6,13 +6,13 @@ discard block |
||
| 6 | 6 | $title = _("Statistics").' - '._("Most common Pilots"); |
| 7 | 7 | |
| 8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
| 9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | if ($airline_icao == '' && isset($globalFilter)) { |
| 11 | 11 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 12 | 12 | } |
| 13 | -setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/'); |
|
| 14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +setcookie('stats_airline_icao', $airline_icao, time() + 60*60*24, '/'); |
|
| 14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | include('statistics-sub-menu.php'); |
| 18 | 18 | print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>'; |
@@ -22,10 +22,10 @@ discard block |
||
| 22 | 22 | </div> |
| 23 | 23 | <p>'._("Below are the <strong>Top 10</strong> most common pilot.").'</p>'; |
| 24 | 24 | |
| 25 | -$pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
| 25 | +$pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
| 26 | 26 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 27 | 27 | $pilot_data = ''; |
| 28 | -foreach($pilot_array as $pilot_item) |
|
| 28 | +foreach ($pilot_array as $pilot_item) |
|
| 29 | 29 | { |
| 30 | 30 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
| 31 | 31 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | print '</thead>'; |
| 51 | 51 | print '<tbody>'; |
| 52 | 52 | $i = 1; |
| 53 | - foreach($pilot_array as $pilot_item) |
|
| 53 | + foreach ($pilot_array as $pilot_item) |
|
| 54 | 54 | { |
| 55 | 55 | print '<tr>'; |
| 56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,12 +6,12 @@ discard block |
||
| 6 | 6 | $title = _("Statistics").' - '._("Most common Arrival Airport"); |
| 7 | 7 | |
| 8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
| 9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | if ($airline_icao == '' && isset($globalFilter)) { |
| 11 | 11 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 12 | 12 | } |
| 13 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 14 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 15 | 15 | |
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | include('statistics-sub-menu.php'); |
@@ -25,11 +25,11 @@ discard block |
||
| 25 | 25 | <p>'._("Below are the <strong>Top 10</strong> most common arrival airports.").'</p>'; |
| 26 | 26 | print '<div id="chartAirport" class="chart" width="100%"></div>'; |
| 27 | 27 | print '<script>'; |
| 28 | -$airport_airport_array = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 28 | +$airport_airport_array = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 29 | 29 | |
| 30 | 30 | print 'var series = ['; |
| 31 | 31 | $airport_data = ''; |
| 32 | -foreach($airport_airport_array as $airport_item) |
|
| 32 | +foreach ($airport_airport_array as $airport_item) |
|
| 33 | 33 | { |
| 34 | 34 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
| 35 | 35 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | print '</thead>'; |
| 84 | 84 | print '<tbody>'; |
| 85 | 85 | $i = 1; |
| 86 | -foreach($airport_airport_array as $airport_item) |
|
| 86 | +foreach ($airport_airport_array as $airport_item) |
|
| 87 | 87 | { |
| 88 | 88 | print '<tr>'; |
| 89 | 89 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 20 | 20 | $year_data = ''; |
| 21 | 21 | $year_cnt = ''; |
| 22 | -foreach($date_array as $year_item) |
|
| 22 | +foreach ($date_array as $year_item) |
|
| 23 | 23 | { |
| 24 | 24 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
| 25 | 25 | $year_cnt .= $year_item['count'].','; |
| 26 | 26 | } |
| 27 | 27 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 28 | -$year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 28 | +$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 29 | 29 | print 'c3.generate({ |
| 30 | 30 | bindto: "#chart", |
| 31 | 31 | data: { x: "x", |
@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | if (!empty($date_array)) |
| 37 | 37 | { |
| 38 | - foreach($date_array as $key => $row) { |
|
| 38 | + foreach ($date_array as $key => $row) { |
|
| 39 | 39 | $years[$key] = $row['year']; |
| 40 | 40 | $counts[$key] = $row['count']; |
| 41 | 41 | } |
| 42 | 42 | //array_multisort($years,SORT_DESC,$date_array); |
| 43 | - array_multisort($counts,SORT_DESC,$date_array); |
|
| 43 | + array_multisort($counts, SORT_DESC, $date_array); |
|
| 44 | 44 | print '<div class="table-responsive">'; |
| 45 | 45 | print '<table class="common-date table-striped">'; |
| 46 | 46 | print '<thead>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | print '</thead>'; |
| 51 | 51 | print '<tbody>'; |
| 52 | 52 | $i = 1; |
| 53 | - foreach($date_array as $date_item) |
|
| 53 | + foreach ($date_array as $date_item) |
|
| 54 | 54 | { |
| 55 | 55 | print '<tr>'; |
| 56 | 56 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -6,13 +6,13 @@ discard block |
||
| 6 | 6 | $title = _("Statistics").' - '._("Most common Aircraft Registrations"); |
| 7 | 7 | |
| 8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
| 9 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | if ($airline_icao == '' && isset($globalFilter)) { |
| 11 | 11 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
| 12 | 12 | } |
| 13 | -setcookie('stats_airline_icao',$airline_icao,time()+60*60*24,'/'); |
|
| 14 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
| 15 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
| 13 | +setcookie('stats_airline_icao', $airline_icao, time() + 60*60*24, '/'); |
|
| 14 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
| 15 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
| 16 | 16 | |
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | include('statistics-sub-menu.php'); |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | </div> |
| 25 | 25 | <p>'._("Below are the <strong>Top 10</strong> most common aircraft registrations.").'</p>'; |
| 26 | 26 | |
| 27 | -$registration_array = $Stats->countAllAircraftRegistrations(true,$airline_icao,$filter_name,$year,$month); |
|
| 27 | +$registration_array = $Stats->countAllAircraftRegistrations(true, $airline_icao, $filter_name, $year, $month); |
|
| 28 | 28 | print '<div id="chart" class="chart" width="100%"></div><script>'; |
| 29 | 29 | $registration_data = ''; |
| 30 | -foreach($registration_array as $registration_item) |
|
| 30 | +foreach ($registration_array as $registration_item) |
|
| 31 | 31 | { |
| 32 | 32 | $registration_data .= '[ "'.$registration_item['registration'].' - '.$registration_item['aircraft_name'].' ('.$registration_item['aircraft_icao'].')",'.$registration_item['aircraft_registration_count'].'],'; |
| 33 | 33 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | print '</thead>'; |
| 55 | 55 | print '<tbody>'; |
| 56 | 56 | $i = 1; |
| 57 | - foreach($registration_array as $registration_item) |
|
| 57 | + foreach ($registration_array as $registration_item) |
|
| 58 | 58 | { |
| 59 | 59 | print '<tr>'; |
| 60 | 60 | print '<td><strong>'.$i.'</strong></td>'; |