@@ -13,18 +13,18 @@ discard block |
||
| 13 | 13 | require_once('header.php'); |
| 14 | 14 | |
| 15 | 15 | //calculuation for the pagination |
| 16 | -if(!isset($_GET['limit'])) |
|
| 16 | +if (!isset($_GET['limit'])) |
|
| 17 | 17 | { |
| 18 | 18 | $limit_start = 0; |
| 19 | 19 | $limit_end = 25; |
| 20 | 20 | $absolute_difference = 25; |
| 21 | -} else { |
|
| 21 | +} else { |
|
| 22 | 22 | $limit_explode = explode(",", $_GET['limit']); |
| 23 | 23 | $limit_start = $limit_explode[0]; |
| 24 | 24 | $limit_end = $limit_explode[1]; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 27 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 28 | 28 | |
| 29 | 29 | $absolute_difference = abs($limit_start - $limit_end); |
| 30 | 30 | $limit_next = $limit_end + $absolute_difference; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | { |
| 36 | 36 | $category = "aircraft"; |
| 37 | 37 | } else { |
| 38 | - $category = filter_input(INPUT_GET,'category',FILTER_SANITIZE_STRING); |
|
| 38 | + $category = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $page_url = $globalURL.'/newest/'.$category; |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $limit_start = 0; |
| 19 | 19 | $limit_end = 25; |
| 20 | 20 | $absolute_difference = 25; |
| 21 | -} else { |
|
| 21 | +} else { |
|
| 22 | 22 | $limit_explode = explode(",", $_GET['limit']); |
| 23 | 23 | $limit_start = $limit_explode[0]; |
| 24 | 24 | $limit_end = $limit_explode[1]; |
@@ -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 $_GET['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 $_GET['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 $_GET['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 $_GET['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 $_GET['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 $_GET['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 $_GET['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 |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_type'])) { |
| 6 | - header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/aircraft'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 52 | 52 | print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
| 53 | 53 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type); |
| 54 | - print ' |
|
| 54 | + print ' |
|
| 55 | 55 | <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
| 56 | 56 | <script> |
| 57 | 57 | google.load("visualization", "1", {packages:["geochart"]}); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | var data = google.visualization.arrayToDataTable([ |
| 65 | 65 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 66 | - $airport_data = ''; |
|
| 66 | + $airport_data = ''; |
|
| 67 | 67 | foreach($airport_airport_array as $airport_item) |
| 68 | 68 | { |
| 69 | 69 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/aircraft'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 10 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Departure Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 17 | + $title = sprintf(_("Most Common Departure Airports for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
| 20 | 20 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 25 | 25 | if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 26 | - foreach($aircraft_types as $aircrafttype) |
|
| 26 | + foreach ($aircraft_types as $aircrafttype) |
|
| 27 | 27 | { |
| 28 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 28 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 29 | 29 | { |
| 30 | 30 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 31 | 31 | } else { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | include('aircraft-sub-menu.php'); |
| 53 | 53 | print '<div class="column">'; |
| 54 | 54 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 55 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 55 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 56 | 56 | $airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type); |
| 57 | 57 | print ' |
| 58 | 58 | <script type="text/javascript" src="https://www.google.com/jsapi"></script> |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | var data = google.visualization.arrayToDataTable([ |
| 68 | 68 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 69 | 69 | $airport_data = ''; |
| 70 | - foreach($airport_airport_array as $airport_item) |
|
| 70 | + foreach ($airport_airport_array as $airport_item) |
|
| 71 | 71 | { |
| 72 | 72 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 73 | 73 | $name = str_replace("'", "", $name); |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | print '</thead>'; |
| 107 | 107 | print '<tbody>'; |
| 108 | 108 | $i = 1; |
| 109 | - foreach($airport_airport_array as $airport_item) |
|
| 109 | + foreach ($airport_airport_array as $airport_item) |
|
| 110 | 110 | { |
| 111 | 111 | print '<tr>'; |
| 112 | 112 | 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; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 6 | + <li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 7 | 7 | <li class="dropdown"> |
| 8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-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) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-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) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 27 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-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; ?>/country/statistics/arrival-airport-country/<?php print $country; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 35 | 35 | </ul> |
| 36 | 36 | </li> |
| 37 | - <li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 38 | - <li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 37 | + <li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 38 | + <li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 39 | 39 | </ul> |
| 40 | 40 | </div> |
| 41 | 41 | \ No newline at end of file |
@@ -3,8 +3,8 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['airport'])) { |
| 6 | - header('Location: '.$globalURL.'/airport'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/airport'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 10 | 10 | $Spotter = new Spotter(); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | function drawChart() { |
| 66 | 66 | var data = google.visualization.arrayToDataTable([ |
| 67 | 67 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
| 68 | - $airline_data = ''; |
|
| 68 | + $airline_data = ''; |
|
| 69 | 69 | foreach($airline_array as $airline_item) |
| 70 | 70 | { |
| 71 | 71 | $airline_data .= '[ "'.$airline_item['airline_name'].'",'.$airline_item['airline_count'].'],'; |
@@ -6,14 +6,14 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/airport'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 9 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
| 12 | 12 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 13 | 13 | |
| 14 | 14 | if (!empty($airport_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 16 | + $title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/airport" method="post">'; |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $airport_names = $Spotter->getAllAirportNames(); |
| 23 | 23 | ksort($airport_names); |
| 24 | - foreach($airport_names as $airport_name) |
|
| 24 | + foreach ($airport_names as $airport_name) |
|
| 25 | 25 | { |
| 26 | - if($airport == $airport_name['airport_icao']) |
|
| 26 | + if ($airport == $airport_name['airport_icao']) |
|
| 27 | 27 | { |
| 28 | 28 | 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>'; |
| 29 | 29 | } else { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | include('airport-sub-menu.php'); |
| 55 | 55 | print '<div class="column">'; |
| 56 | 56 | print '<h2>'._("Most Common Airlines").'</h2>'; |
| 57 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 57 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 58 | 58 | |
| 59 | 59 | $airline_array = $Spotter->countAllAirlinesByAirport($airport); |
| 60 | 60 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | var data = google.visualization.arrayToDataTable([ |
| 67 | 67 | ["'._("Aircraft").'", "'._("# of times").'"], '; |
| 68 | 68 | $airline_data = ''; |
| 69 | - foreach($airline_array as $airline_item) |
|
| 69 | + foreach ($airline_array as $airline_item) |
|
| 70 | 70 | { |
| 71 | 71 | $airline_data .= '[ "'.$airline_item['airline_name'].'",'.$airline_item['airline_count'].'],'; |
| 72 | 72 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | print '</thead>'; |
| 103 | 103 | print '<tbody>'; |
| 104 | 104 | $i = 1; |
| 105 | - foreach($airline_array as $airline_item) |
|
| 105 | + foreach ($airline_array as $airline_item) |
|
| 106 | 106 | { |
| 107 | 107 | print '<tr>'; |
| 108 | 108 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $airport_names = $tats->getAllAirportNames(); |
| 26 | - if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
|
| 26 | + if (empty($airport_names)) { |
|
| 27 | + $airport_names = $Spotter->getAllAirportNames(); |
|
| 28 | + } |
|
| 27 | 29 | ksort($airport_names); |
| 28 | 30 | foreach($airport_names as $airport_name) |
| 29 | 31 | { |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | function drawChart() { |
| 35 | 35 | var data = google.visualization.arrayToDataTable([ |
| 36 | 36 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 37 | - $hour_data = ''; |
|
| 37 | + $hour_data = ''; |
|
| 38 | 38 | foreach($hour_array as $hour_item) |
| 39 | 39 | { |
| 40 | 40 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -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 '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | var data = google.visualization.arrayToDataTable([ |
| 36 | 36 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 37 | 37 | $hour_data = ''; |
| 38 | - foreach($hour_array as $hour_item) |
|
| 38 | + foreach ($hour_array as $hour_item) |
|
| 39 | 39 | { |
| 40 | 40 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 41 | 41 | } |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -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 | if (isset($_GET['sort'])) { |
| 13 | 13 | $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort); |
| 14 | 14 | } else { |
@@ -17,16 +17,16 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | if (!empty($spotter_array)) |
| 19 | 19 | { |
| 20 | - $title = sprintf(_("Most Common Aircraft by registration from %s"),$country); |
|
| 20 | + $title = sprintf(_("Most Common Aircraft by registration from %s"), $country); |
|
| 21 | 21 | require_once('header.php'); |
| 22 | 22 | print '<div class="select-item">'; |
| 23 | 23 | print '<form action="'.$globalURL.'/country" method="post">'; |
| 24 | 24 | print '<select name="country" class="selectpicker" data-live-search="true">'; |
| 25 | 25 | print '<option></option>'; |
| 26 | 26 | $all_countries = $Spotter->getAllCountries(); |
| 27 | - foreach($all_countries as $all_country) |
|
| 27 | + foreach ($all_countries as $all_country) |
|
| 28 | 28 | { |
| 29 | - if($country == $all_country['country']) |
|
| 29 | + if ($country == $all_country['country']) |
|
| 30 | 30 | { |
| 31 | 31 | print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>'; |
| 32 | 32 | } else { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | if ($_GET['country'] != "NA") |
| 42 | 42 | { |
| 43 | 43 | print '<div class="info column">'; |
| 44 | - print '<h1>'.sprintf(_("Airports & Airlines from %s"),$country).'</h1>'; |
|
| 44 | + print '<h1>'.sprintf(_("Airports & Airlines from %s"), $country).'</h1>'; |
|
| 45 | 45 | print '</div>'; |
| 46 | 46 | } else { |
| 47 | 47 | 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>'; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('country-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>'; |
|
| 54 | 54 | $aircraft_array = $Spotter->countAllAircraftRegistrationByCountry($country); |
| 55 | 55 | if (!empty($aircraft_array)) |
| 56 | 56 | { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | print '</thead>'; |
| 66 | 66 | print '<tbody>'; |
| 67 | 67 | $i = 1; |
| 68 | - foreach($aircraft_array as $aircraft_item) |
|
| 68 | + foreach ($aircraft_array as $aircraft_item) |
|
| 69 | 69 | { |
| 70 | 70 | print '<tr>'; |
| 71 | 71 | 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; ?>/manufacturer/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 6 | + <li><a href="<?php print $globalURL; ?>/manufacturer/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 7 | 7 | <li class="dropdown"> |
| 8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration") { 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"> |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | </ul> |
| 15 | 15 | </li> |
| 16 | 16 | <li class="dropdown"> |
| 17 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 17 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 18 | 18 | <?php echo _("Airline"); ?> <span class="caret"></span> |
| 19 | 19 | </a> |
| 20 | 20 | <ul class="dropdown-menu" role="menu"> |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | </ul> |
| 24 | 24 | </li> |
| 25 | 25 | <li class="dropdown"> |
| 26 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 26 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 27 | 27 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 28 | 28 | </a> |
| 29 | 29 | <ul class="dropdown-menu" role="menu"> |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/arrival-airport-country/<?php print $_GET['aircraft_manufacturer']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 34 | 34 | </ul> |
| 35 | 35 | </li> |
| 36 | - <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 37 | - <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 36 | + <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 37 | + <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 38 | 38 | </ul> |
| 39 | 39 | </div> |
| 40 | 40 | \ No newline at end of file |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | require_once('require/class.Connection.php'); |
| 8 | 8 | require_once('require/class.Spotter.php'); |
| 9 | 9 | require_once('require/class.Language.php'); |
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Aircraft 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']); |
|
| 16 | + $title = sprintf(_("Most Common Aircraft 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']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="info column">'; |
| 19 | 19 | 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>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('route-sub-menu.php'); |
| 25 | 25 | print '<div class="column">'; |
| 26 | 26 | print '<h2>'._("Most Common Aircraft").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows the most common aircrafts 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>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows the most common aircrafts 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>'; |
|
| 28 | 28 | |
| 29 | 29 | $aircraft_array = $Spotter->countAllAircraftTypesByRoute($_GET['departure_airport'], $_GET['arrival_airport']); |
| 30 | 30 | if (!empty($aircraft_array)) |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | print '</thead>'; |
| 40 | 40 | print '<tbody>'; |
| 41 | 41 | $i = 1; |
| 42 | - foreach($aircraft_array as $aircraft_item) |
|
| 42 | + foreach ($aircraft_array as $aircraft_item) |
|
| 43 | 43 | { |
| 44 | 44 | print '<tr>'; |
| 45 | 45 | print '<td><strong>'.$i.'</strong></td>'; |