@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airline'])) { |
| 7 | - header('Location: '.$globalURL.'/airline'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airline'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | function drawChart() { |
| 74 | 74 | var data = google.visualization.arrayToDataTable([ |
| 75 | 75 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 76 | - $hour_data = ''; |
|
| 76 | + $hour_data = ''; |
|
| 77 | 77 | foreach($hour_array as $hour_item) |
| 78 | 78 | { |
| 79 | 79 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airline'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 17 | + $title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
| 20 | 20 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $airline_names = $Stats->getAllAirlineNames(); |
| 25 | 25 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
| 26 | - foreach($airline_names as $airline_name) |
|
| 26 | + foreach ($airline_names as $airline_name) |
|
| 27 | 27 | { |
| 28 | - if($airline == $airline_name['airline_icao']) |
|
| 28 | + if ($airline == $airline_name['airline_icao']) |
|
| 29 | 29 | { |
| 30 | 30 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 31 | 31 | } else { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | include('airline-sub-menu.php'); |
| 64 | 64 | print '<div class="column">'; |
| 65 | 65 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 66 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 66 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 67 | 67 | $hour_array = $Spotter->countAllHoursByAirline($airline); |
| 68 | 68 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 69 | 69 | print '<div id="chartHour" class="chart" width="100%"></div> |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | var data = google.visualization.arrayToDataTable([ |
| 75 | 75 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 76 | 76 | $hour_data = ''; |
| 77 | - foreach($hour_array as $hour_item) |
|
| 77 | + foreach ($hour_array as $hour_item) |
|
| 78 | 78 | { |
| 79 | 79 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 80 | 80 | } |
@@ -21,7 +21,9 @@ discard block |
||
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 24 | + if (empty($airline_names)) { |
|
| 25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
| 26 | + } |
|
| 25 | 27 | foreach($airline_names as $airline_name) |
| 26 | 28 | { |
| 27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
| 43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 44 | 46 | { |
| 45 | 47 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 46 | - } |
|
| 47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | 49 | { |
| 49 | 50 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 50 | 51 | } |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
| 12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
| 11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
| 12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("'Most Common Departure Airports by Country from %s"),$manufacturer); |
|
| 17 | + $title = sprintf(_("'Most Common Departure Airports by Country from %s"), $manufacturer); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
| 26 | - foreach($all_manufacturers as $all_manufacturer) |
|
| 26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
| 27 | 27 | { |
| 28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 29 | 29 | { |
| 30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
| 31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | include('manufacturer-sub-menu.php'); |
| 45 | 45 | print '<div class="column">'; |
| 46 | 46 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | |
| 49 | 49 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByManufacturer($manufacturer); |
| 50 | 50 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | ["'._("Country").'", "'._("# of times").'"], '; |
| 58 | 58 | |
| 59 | 59 | $country_data = ''; |
| 60 | - foreach($airport_country_array as $airport_item) |
|
| 60 | + foreach ($airport_country_array as $airport_item) |
|
| 61 | 61 | { |
| 62 | 62 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 63 | 63 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | print '</thead>'; |
| 92 | 92 | print '<tbody>'; |
| 93 | 93 | $i = 1; |
| 94 | - foreach($airport_country_array as $airport_item) |
|
| 94 | + foreach ($airport_country_array as $airport_item) |
|
| 95 | 95 | { |
| 96 | 96 | print '<tr>'; |
| 97 | 97 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | function drawChart() { |
| 56 | 56 | var data = google.visualization.arrayToDataTable([ |
| 57 | 57 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 58 | - $hour_data = ''; |
|
| 58 | + $hour_data = ''; |
|
| 59 | 59 | foreach($hour_array as $hour_item) |
| 60 | 60 | { |
| 61 | 61 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
@@ -8,14 +8,14 @@ discard block |
||
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
| 11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
| 12 | 12 | |
| 13 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
| 13 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - $title = sprintf(_("Most Common Time of Day from %s"),$manufacturer); |
|
| 18 | + $title = sprintf(_("Most Common Time of Day from %s"), $manufacturer); |
|
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
| 21 | 21 | print '<form action="'.$globalURL.'/manufacturer" method="post">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
| 26 | - foreach($all_manufacturers as $all_manufacturer) |
|
| 26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
| 27 | 27 | { |
| 28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 29 | 29 | { |
| 30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
| 31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | include('manufacturer-sub-menu.php'); |
| 45 | 45 | print '<div class="column">'; |
| 46 | 46 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | |
| 49 | 49 | $hour_array = $Spotter->countAllHoursByManufacturer($manufacturer); |
| 50 | 50 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | var data = google.visualization.arrayToDataTable([ |
| 57 | 57 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 58 | 58 | $hour_data = ''; |
| 59 | - foreach($hour_array as $hour_item) |
|
| 59 | + foreach ($hour_array as $hour_item) |
|
| 60 | 60 | { |
| 61 | 61 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 62 | 62 | } |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -8,31 +8,31 @@ discard block |
||
| 8 | 8 | if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
| 9 | 9 | else $MapType = $globalMapProvider; |
| 10 | 10 | if (isset($_GET['3d'])) { |
| 11 | - setcookie('MapFormat','3d'); |
|
| 11 | + setcookie('MapFormat', '3d'); |
|
| 12 | 12 | } else if (isset($_GET['2d'])) { |
| 13 | - setcookie('MapFormat','2d'); |
|
| 13 | + setcookie('MapFormat', '2d'); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | if (isset($_POST['archive'])) { |
| 17 | - setcookie('archive','true'); |
|
| 18 | - setcookie('archive_begin',strtotime($_POST['start_date'])); |
|
| 19 | - setcookie('archive_end',strtotime($_POST['end_date'])); |
|
| 20 | - setcookie('archive_speed',$_POST['archivespeed']); |
|
| 17 | + setcookie('archive', 'true'); |
|
| 18 | + setcookie('archive_begin', strtotime($_POST['start_date'])); |
|
| 19 | + setcookie('archive_end', strtotime($_POST['end_date'])); |
|
| 20 | + setcookie('archive_speed', $_POST['archivespeed']); |
|
| 21 | 21 | } |
| 22 | 22 | if (isset($_POST['noarchive'])) { |
| 23 | - setcookie('archive','false',-1); |
|
| 24 | - setcookie('archive_begin','',-1); |
|
| 25 | - setcookie('archive_end','',-1); |
|
| 26 | - setcookie('archive_speed','',-1); |
|
| 23 | + setcookie('archive', 'false', -1); |
|
| 24 | + setcookie('archive_begin', '', -1); |
|
| 25 | + setcookie('archive_end', '', -1); |
|
| 26 | + setcookie('archive_speed', '', -1); |
|
| 27 | 27 | } |
| 28 | 28 | // When button "Remove all filters" is clicked |
| 29 | 29 | if (isset($_POST['removefilters'])) { |
| 30 | - $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
|
| 31 | - return strpos($key,'filter_') === 0; |
|
| 30 | + $allfilters = array_filter(array_keys($_COOKIE), function($key) { |
|
| 31 | + return strpos($key, 'filter_') === 0; |
|
| 32 | 32 | }); |
| 33 | 33 | foreach ($allfilters as $filt) { |
| 34 | 34 | unset($_COOKIE[$filt]); |
| 35 | - setcookie($filt,null,-1); |
|
| 35 | + setcookie($filt, null, -1); |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 223 | 223 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 224 | 224 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 225 | -<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 225 | +<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 226 | 226 | <?php |
| 227 | 227 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 228 | 228 | ?> |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 277 | 277 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 278 | 278 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 279 | -<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 279 | +<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 280 | 280 | <?php |
| 281 | 281 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 282 | 282 | ?> |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | ?> |
| 451 | 451 | <div class="search"> |
| 452 | 452 | <form action="<?php print $globalURL; ?>/search" method="get"> |
| 453 | - <input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
| 453 | + <input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != "") { print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button> |
|
| 454 | 454 | </form> |
| 455 | 455 | </div> |
| 456 | 456 | <div class="social"> |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | print '</div>'; |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | -if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
| 471 | +if (strtolower($current_page) == 'ident-detailed' || strtolower($current_page) == 'flightid-overview') { |
|
| 472 | 472 | ?> |
| 473 | 473 | <div class="top-header clear" role="main"> |
| 474 | 474 | <?php |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | </div> |
| 482 | 482 | <?php |
| 483 | 483 | } |
| 484 | -if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
|
| 484 | +if ((strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) || (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false)) |
|
| 485 | 485 | { |
| 486 | 486 | ?> |
| 487 | 487 | <div class="top-header clear" role="main"> |
@@ -494,15 +494,15 @@ discard block |
||
| 494 | 494 | var zoom = 13; |
| 495 | 495 | //create the map |
| 496 | 496 | <?php |
| 497 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 497 | + if (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 498 | 498 | ?> |
| 499 | 499 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 500 | 500 | <?php |
| 501 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 501 | + } elseif (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) { |
|
| 502 | 502 | ?> |
| 503 | 503 | map = L.map('map', { zoomControl:true }); |
| 504 | 504 | <?php |
| 505 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 505 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 506 | 506 | ?> |
| 507 | 507 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 508 | 508 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 511 | 511 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 512 | 512 | <?php |
| 513 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 513 | + } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 514 | 514 | ?> |
| 515 | 515 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 516 | 516 | <?php |
@@ -5,8 +5,11 @@ discard block |
||
| 5 | 5 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
| 6 | 6 | $current_page = $file_path['filename']; |
| 7 | 7 | date_default_timezone_set($globalTimezone); |
| 8 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
| 9 | -else $MapType = $globalMapProvider; |
|
| 8 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
| 9 | + $MapType = $_COOKIE['MapType']; |
|
| 10 | +} else { |
|
| 11 | + $MapType = $globalMapProvider; |
|
| 12 | +} |
|
| 10 | 13 | if (isset($_GET['3d'])) { |
| 11 | 14 | setcookie('MapFormat','3d'); |
| 12 | 15 | } else if (isset($_GET['2d'])) { |
@@ -222,7 +225,13 @@ discard block |
||
| 222 | 225 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 223 | 226 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 224 | 227 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 225 | -<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 228 | +<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
| 229 | + print '&latitude='.$latitude; |
|
| 230 | +} |
|
| 231 | +?><?php if(isset($longitude)) { |
|
| 232 | + print '&longitude='.$longitude; |
|
| 233 | +} |
|
| 234 | +?>&<?php print time(); ?>"></script> |
|
| 226 | 235 | <?php |
| 227 | 236 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 228 | 237 | ?> |
@@ -276,7 +285,13 @@ discard block |
||
| 276 | 285 | <script src="<?php print $globalURL; ?>/js/Marker.Rotate.js"></script> |
| 277 | 286 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 278 | 287 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 279 | -<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
| 288 | +<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
| 289 | + print '&latitude='.$latitude; |
|
| 290 | +} |
|
| 291 | +?><?php if(isset($longitude)) { |
|
| 292 | + print '&longitude='.$longitude; |
|
| 293 | +} |
|
| 294 | +?>&<?php print time(); ?>"></script> |
|
| 280 | 295 | <?php |
| 281 | 296 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
| 282 | 297 | ?> |
@@ -349,7 +364,12 @@ discard block |
||
| 349 | 364 | <span class="icon-bar"></span> |
| 350 | 365 | </button> |
| 351 | 366 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
| 352 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 367 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
| 368 | + print '/'; |
|
| 369 | +} else { |
|
| 370 | + print $globalURL; |
|
| 371 | +} |
|
| 372 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 353 | 373 | </div> |
| 354 | 374 | <div class="collapse navbar-collapse"> |
| 355 | 375 | <ul class="nav navbar-nav"> |
@@ -438,7 +458,9 @@ discard block |
||
| 438 | 458 | $alllang = $Language->getLanguages(); |
| 439 | 459 | foreach ($alllang as $key => $lang) { |
| 440 | 460 | print '<option value="'.$key.'"'; |
| 441 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 461 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
| 462 | + print ' selected '; |
|
| 463 | + } |
|
| 442 | 464 | print '>'.$lang[0].'</option>'; |
| 443 | 465 | } |
| 444 | 466 | ?> |
@@ -591,4 +613,7 @@ discard block |
||
| 591 | 613 | |
| 592 | 614 | ?> |
| 593 | 615 | |
| 594 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
| 616 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
| 617 | + print 'index '; |
|
| 618 | +} |
|
| 619 | +?>clear"> |
|
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // When button "Remove all filters" is clicked |
| 29 | 29 | if (isset($_POST['removefilters'])) { |
| 30 | 30 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
| 31 | - return strpos($key,'filter_') === 0; |
|
| 31 | + return strpos($key,'filter_') === 0; |
|
| 32 | 32 | }); |
| 33 | 33 | foreach ($allfilters as $filt) { |
| 34 | 34 | unset($_COOKIE[$filt]); |
@@ -167,16 +167,16 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | ?> |
| 169 | 169 | <?php |
| 170 | - if (isset($_POST['archive'])) { |
|
| 170 | + if (isset($_POST['archive'])) { |
|
| 171 | 171 | ?> |
| 172 | 172 | <?php |
| 173 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 173 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 174 | 174 | ?> |
| 175 | 175 | |
| 176 | 176 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script> |
| 177 | 177 | <?php |
| 178 | - } |
|
| 179 | - } else { |
|
| 178 | + } |
|
| 179 | + } else { |
|
| 180 | 180 | ?> |
| 181 | 181 | <?php |
| 182 | 182 | /* if (isset($globalBeta) && $globalBeta) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | ?> |
| 190 | 190 | <?php |
| 191 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 191 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 192 | 192 | ?> |
| 193 | 193 | <?php |
| 194 | 194 | // if (isset($globalBeta) && $globalBeta) { |
@@ -199,13 +199,13 @@ discard block |
||
| 199 | 199 | ?> |
| 200 | 200 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>"></script> |
| 201 | 201 | <?php |
| 202 | - } |
|
| 202 | + } |
|
| 203 | 203 | ?> |
| 204 | 204 | <?php |
| 205 | 205 | // } |
| 206 | 206 | ?> |
| 207 | 207 | <?php |
| 208 | - } |
|
| 208 | + } |
|
| 209 | 209 | } |
| 210 | 210 | ?> |
| 211 | 211 | <?php |
@@ -360,15 +360,15 @@ discard block |
||
| 360 | 360 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
| 361 | 361 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
| 362 | 362 | <?php |
| 363 | - if ((!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM)) { |
|
| 363 | + if ((!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM)) { |
|
| 364 | 364 | ?> |
| 365 | 365 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
| 366 | 366 | <?php |
| 367 | - } else { |
|
| 367 | + } else { |
|
| 368 | 368 | ?> |
| 369 | 369 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
| 370 | 370 | <?php |
| 371 | - } |
|
| 371 | + } |
|
| 372 | 372 | ?> |
| 373 | 373 | <li><hr /></li> |
| 374 | 374 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -376,34 +376,34 @@ discard block |
||
| 376 | 376 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 377 | 377 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 378 | 378 | <?php |
| 379 | - if ($globalACARS) { |
|
| 380 | - if (isset($globalDemo) && $globalDemo) { |
|
| 381 | - ?> |
|
| 379 | + if ($globalACARS) { |
|
| 380 | + if (isset($globalDemo) && $globalDemo) { |
|
| 381 | + ?> |
|
| 382 | 382 | <li><hr /></li> |
| 383 | 383 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
| 384 | 384 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
| 385 | 385 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
| 386 | 386 | <?php |
| 387 | - } else { |
|
| 388 | - ?> |
|
| 387 | + } else { |
|
| 388 | + ?> |
|
| 389 | 389 | <li><hr /></li> |
| 390 | 390 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 391 | 391 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 392 | 392 | <?php |
| 393 | - } |
|
| 394 | - } |
|
| 395 | - ?> |
|
| 393 | + } |
|
| 394 | + } |
|
| 395 | + ?> |
|
| 396 | 396 | <?php |
| 397 | - if (isset($globalAccidents) && $globalAccidents) { |
|
| 398 | - ?> |
|
| 397 | + if (isset($globalAccidents) && $globalAccidents) { |
|
| 398 | + ?> |
|
| 399 | 399 | <li><hr /></li> |
| 400 | 400 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
| 401 | 401 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
| 402 | 402 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
| 403 | 403 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
| 404 | 404 | <?php |
| 405 | - } |
|
| 406 | - ?> |
|
| 405 | + } |
|
| 406 | + ?> |
|
| 407 | 407 | <li><hr /></li> |
| 408 | 408 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 409 | 409 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
@@ -445,14 +445,14 @@ discard block |
||
| 445 | 445 | <form> |
| 446 | 446 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 447 | 447 | <?php |
| 448 | - $Language = new Language(); |
|
| 449 | - $alllang = $Language->getLanguages(); |
|
| 450 | - foreach ($alllang as $key => $lang) { |
|
| 451 | - print '<option value="'.$key.'"'; |
|
| 452 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 453 | - print '>'.$lang[0].'</option>'; |
|
| 454 | - } |
|
| 455 | - ?> |
|
| 448 | + $Language = new Language(); |
|
| 449 | + $alllang = $Language->getLanguages(); |
|
| 450 | + foreach ($alllang as $key => $lang) { |
|
| 451 | + print '<option value="'.$key.'"'; |
|
| 452 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 453 | + print '>'.$lang[0].'</option>'; |
|
| 454 | + } |
|
| 455 | + ?> |
|
| 456 | 456 | </select> |
| 457 | 457 | </form> |
| 458 | 458 | </div> |
@@ -483,18 +483,18 @@ discard block |
||
| 483 | 483 | ?> |
| 484 | 484 | <div class="top-header clear" role="main"> |
| 485 | 485 | <?php |
| 486 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 486 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 487 | 487 | ?> |
| 488 | 488 | <div id="archive-map"></div> |
| 489 | 489 | <?php |
| 490 | - } |
|
| 490 | + } |
|
| 491 | 491 | ?> |
| 492 | 492 | </div> |
| 493 | 493 | <?php |
| 494 | 494 | } |
| 495 | 495 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 496 | 496 | { |
| 497 | - ?> |
|
| 497 | + ?> |
|
| 498 | 498 | <div class="top-header clear" role="main"> |
| 499 | 499 | <div id="map"></div> |
| 500 | 500 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -505,15 +505,15 @@ discard block |
||
| 505 | 505 | var zoom = 13; |
| 506 | 506 | //create the map |
| 507 | 507 | <?php |
| 508 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 508 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 509 | 509 | ?> |
| 510 | 510 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 511 | 511 | <?php |
| 512 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 512 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 513 | 513 | ?> |
| 514 | 514 | map = L.map('map', { zoomControl:true }); |
| 515 | 515 | <?php |
| 516 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 516 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 517 | 517 | ?> |
| 518 | 518 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 519 | 519 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -521,22 +521,22 @@ discard block |
||
| 521 | 521 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 522 | 522 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 523 | 523 | <?php |
| 524 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 524 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 525 | 525 | ?> |
| 526 | 526 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 527 | 527 | <?php |
| 528 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 528 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 529 | 529 | ?> |
| 530 | 530 | map = L.map('map', { zoomControl:true }); |
| 531 | 531 | <?php |
| 532 | - } |
|
| 532 | + } |
|
| 533 | 533 | ?> |
| 534 | 534 | //initialize the layer group for the aircrft markers |
| 535 | 535 | var layer_data = L.layerGroup(); |
| 536 | 536 | |
| 537 | 537 | //a few title layers |
| 538 | 538 | <?php |
| 539 | - if ($globalMapProvider == 'Mapbox') { |
|
| 539 | + if ($globalMapProvider == 'Mapbox') { |
|
| 540 | 540 | ?> |
| 541 | 541 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 542 | 542 | maxZoom: 18, |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | token : '<?php print $globalMapboxToken; ?>' |
| 548 | 548 | }).addTo(map); |
| 549 | 549 | <?php |
| 550 | - } elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 550 | + } elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 551 | 551 | ?> |
| 552 | 552 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 553 | 553 | maxZoom: 18, |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>' |
| 556 | 556 | }).addTo(map); |
| 557 | 557 | <?php |
| 558 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 558 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 559 | 559 | ?> |
| 560 | 560 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 561 | 561 | maxZoom: 18, |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 565 | 565 | }).addTo(map); |
| 566 | 566 | <?php |
| 567 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 567 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 568 | 568 | ?> |
| 569 | 569 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 570 | 570 | maxZoom: 18, |
@@ -573,27 +573,27 @@ discard block |
||
| 573 | 573 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 574 | 574 | }).addTo(map); |
| 575 | 575 | <?php |
| 576 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 576 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 577 | 577 | ?> |
| 578 | 578 | var googleLayer = new L.Google('ROADMAP'); |
| 579 | 579 | map.addLayer(googleLayer); |
| 580 | 580 | <?php |
| 581 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 581 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 582 | 582 | ?> |
| 583 | 583 | var googleLayer = new L.Google('SATELLITE'); |
| 584 | 584 | map.addLayer(googleLayer); |
| 585 | 585 | <?php |
| 586 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 586 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 587 | 587 | ?> |
| 588 | 588 | var googleLayer = new L.Google('HYBRID'); |
| 589 | 589 | map.addLayer(googleLayer); |
| 590 | 590 | <?php |
| 591 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 591 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 592 | 592 | ?> |
| 593 | 593 | var googleLayer = new L.Google('Terrain'); |
| 594 | 594 | map.addLayer(googleLayer); |
| 595 | 595 | <?php |
| 596 | - } |
|
| 596 | + } |
|
| 597 | 597 | ?> |
| 598 | 598 | </script> |
| 599 | 599 | </div> |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | <meta property="og:site_name" content="<?php print $globalName; ?>"/> |
| 41 | 41 | |
| 42 | 42 | <?php |
| 43 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
| 43 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
| 44 | 44 | ?> |
| 45 | 45 | <script language="JavaScript" type="text/javascript"> |
| 46 | 46 | function datasource_js() { |
@@ -121,22 +121,22 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | </script> |
| 123 | 123 | <?php |
| 124 | - } |
|
| 124 | + } |
|
| 125 | 125 | ?> |
| 126 | 126 | |
| 127 | 127 | </head> |
| 128 | 128 | |
| 129 | 129 | <?php |
| 130 | - if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
| 130 | + if (!isset($_SESSION['install']) && !$globalInstalled) { |
|
| 131 | 131 | ?> |
| 132 | 132 | |
| 133 | 133 | <body class="page-<?php print strtolower($current_page); ?>" onload="datasource_js(); metarcycle_js(); create_database_js(); daemon_js(); schedule_js()"> |
| 134 | 134 | <?php |
| 135 | - } else { |
|
| 135 | + } else { |
|
| 136 | 136 | ?> |
| 137 | 137 | <body class="page-<?php print strtolower($current_page); ?>"> |
| 138 | 138 | <?php |
| 139 | - } |
|
| 139 | + } |
|
| 140 | 140 | ?> |
| 141 | 141 | <div class="navbar navbar-fixed-top" role="navigation"> |
| 142 | 142 | <div class="container"> |
@@ -187,12 +187,12 @@ discard block |
||
| 187 | 187 | |
| 188 | 188 | <?php |
| 189 | 189 | if (isset($top_header)) { |
| 190 | - if ($top_header != "") |
|
| 191 | - { |
|
| 190 | + if ($top_header != "") |
|
| 191 | + { |
|
| 192 | 192 | print '<div class="top-header container clear" role="main">'; |
| 193 | 193 | print '<img src="../images/'.$top_header.'" alt="'.$title.'" title="'.$title.'" />'; |
| 194 | 194 | print '</div>'; |
| 195 | - } |
|
| 195 | + } |
|
| 196 | 196 | } |
| 197 | 197 | ?> |
| 198 | 198 | |
@@ -7,14 +7,14 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airport'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 10 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", ""); |
|
| 13 | 13 | $airport_array = $Spotter->getAllAirportInfo($airport); |
| 14 | 14 | |
| 15 | 15 | if (!empty($airport_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 17 | + $title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -25,9 +25,9 @@ discard block |
||
| 25 | 25 | $airport_names = $Stats->getAllAirportNames(); |
| 26 | 26 | if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames(); |
| 27 | 27 | ksort($airport_names); |
| 28 | - foreach($airport_names as $airport_name) |
|
| 28 | + foreach ($airport_names as $airport_name) |
|
| 29 | 29 | { |
| 30 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
| 30 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
| 31 | 31 | { |
| 32 | 32 | print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>'; |
| 33 | 33 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | include('airport-sub-menu.php'); |
| 59 | 59 | print '<div class="column">'; |
| 60 | 60 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 61 | - print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>'; |
|
| 61 | + print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 62 | 62 | |
| 63 | 63 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
| 64 | 64 | if (!empty($aircraft_array)) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | print '</thead>'; |
| 76 | 76 | print '<tbody>'; |
| 77 | 77 | $i = 1; |
| 78 | - foreach($aircraft_array as $aircraft_item) |
|
| 78 | + foreach ($aircraft_array as $aircraft_item) |
|
| 79 | 79 | { |
| 80 | 80 | print '<tr>'; |
| 81 | 81 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airport'])) { |
| 7 | - header('Location: '.$globalURL.'/airport'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airport'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $airport_names = $Stats->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 | { |
@@ -7,13 +7,13 @@ discard block |
||
| 7 | 7 | header('Location: '.$globalURL.'/airline'); |
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 10 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 12 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 16 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/airline" method="post">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | 24 | if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
| 25 | - foreach($airline_names as $airline_name) |
|
| 25 | + foreach ($airline_names as $airline_name) |
|
| 26 | 26 | { |
| 27 | - if($airline == $airline_name['airline_icao']) |
|
| 27 | + if ($airline == $airline_name['airline_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 30 | 30 | } else { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | include('airline-sub-menu.php'); |
| 63 | 63 | print '<div class="column">'; |
| 64 | 64 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 65 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 65 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 66 | 66 | $route_array = $Spotter->countAllRoutesByAirline($airline); |
| 67 | 67 | if (!empty($route_array)) |
| 68 | 68 | { |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | print '</thead>'; |
| 79 | 79 | print '<tbody>'; |
| 80 | 80 | $i = 1; |
| 81 | - foreach($route_array as $route_item) |
|
| 81 | + foreach ($route_array as $route_item) |
|
| 82 | 82 | { |
| 83 | 83 | print '<tr>'; |
| 84 | 84 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -21,7 +21,9 @@ discard block |
||
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $Stats = new Stats(); |
| 23 | 23 | $airline_names = $Stats->getAllAirlineNames(); |
| 24 | - if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames(); |
|
| 24 | + if (empty($airline_names)) { |
|
| 25 | + $airline_names = $Spotter->getAllAirlineNames(); |
|
| 26 | + } |
|
| 25 | 27 | foreach($airline_names as $airline_name) |
| 26 | 28 | { |
| 27 | 29 | if($airline == $airline_name['airline_icao']) |
@@ -43,8 +45,7 @@ discard block |
||
| 43 | 45 | if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif')) |
| 44 | 46 | { |
| 45 | 47 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 46 | - } |
|
| 47 | - elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | + } elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png')) |
|
| 48 | 49 | { |
| 49 | 50 | print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />'; |
| 50 | 51 | } |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['airline'])) { |
| 7 | - header('Location: '.$globalURL.'/airline'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/airline'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 11 | 11 | $Spotter = new Spotter(); |
@@ -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 on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 12 | + $title = sprintf(_("Most Common Arrival Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 13 | 13 | |
| 14 | 14 | require_once('header.php'); |
| 15 | 15 | print '<div class="select-item">'; |
@@ -27,13 +27,13 @@ discard block |
||
| 27 | 27 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 28 | 28 | print '<br />'; |
| 29 | 29 | print '<div class="info column">'; |
| 30 | - print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 30 | + print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 31 | 31 | print '</div>'; |
| 32 | 32 | |
| 33 | 33 | include('date-sub-menu.php'); |
| 34 | 34 | print '<div class="column">'; |
| 35 | 35 | print '<h2>'._("Most Common Arrival Airports").'</h2>'; |
| 36 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 36 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 37 | 37 | $airport_airport_array = $Spotter->countAllArrivalAirportsByDate($date); |
| 38 | 38 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
| 39 | 39 | <script> |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 49 | 49 | |
| 50 | 50 | $airport_data = ''; |
| 51 | - foreach($airport_airport_array as $airport_item) |
|
| 51 | + foreach ($airport_airport_array as $airport_item) |
|
| 52 | 52 | { |
| 53 | 53 | $name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')'; |
| 54 | 54 | $name = str_replace("'", "", $name); |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | print '</thead>'; |
| 88 | 88 | print '<tbody>'; |
| 89 | 89 | $i = 1; |
| 90 | - foreach($airport_airport_array as $airport_item) |
|
| 90 | + foreach ($airport_airport_array as $airport_item) |
|
| 91 | 91 | { |
| 92 | 92 | print '<tr>'; |
| 93 | 93 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | $title = _("Unknown Date"); |
| 113 | 113 | require_once('header.php'); |
| 114 | 114 | print '<h1>'._("Error").'</h1>'; |
| 115 | - print '<p>'._("Sorry, this date does not exist in this database. :(");'</p>'; |
|
| 115 | + print '<p>'._("Sorry, this date does not exist in this database. :("); '</p>'; |
|
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | require_once('footer.php'); |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | die(); |
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
|
| 12 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 13 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
| 11 | +$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))); |
|
| 12 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 13 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
| 14 | 14 | |
| 15 | 15 | if (!empty($spotter_array)) |
| 16 | 16 | { |
| 17 | - $title = sprintf(_("Most Common Departure Airports from %s"),$manufacturer); |
|
| 17 | + $title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | 25 | if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
| 26 | - foreach($all_manufacturers as $all_manufacturer) |
|
| 26 | + foreach ($all_manufacturers as $all_manufacturer) |
|
| 27 | 27 | { |
| 28 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 28 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 29 | 29 | { |
| 30 | 30 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
| 31 | 31 | } else { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | include('manufacturer-sub-menu.php'); |
| 45 | 45 | print '<div class="column">'; |
| 46 | 46 | print '<h2>'._("Most Common Departure Airports").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | $airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer); |
| 49 | 49 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
| 50 | 50 | <script> |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ["'._("Airport").'", "'._("# of times").'"],'; |
| 60 | 60 | |
| 61 | 61 | $airport_data = ''; |
| 62 | - foreach($airport_airport_array as $airport_item) |
|
| 62 | + foreach ($airport_airport_array as $airport_item) |
|
| 63 | 63 | { |
| 64 | 64 | $name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')'; |
| 65 | 65 | $name = str_replace("'", "", $name); |
@@ -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>'; |
@@ -22,7 +22,9 @@ |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | $Stats = new Stats(); |
| 24 | 24 | $all_manufacturers = $Stats->getAllManufacturers(); |
| 25 | - if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 25 | + if (empty($all_manufacturers)) { |
|
| 26 | + $all_manufacturers = $Spotter->getAllManufacturers(); |
|
| 27 | + } |
|
| 26 | 28 | foreach($all_manufacturers as $all_manufacturer) |
| 27 | 29 | { |
| 28 | 30 | if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | require_once('require/class.Stats.php'); |
| 5 | 5 | require_once('require/class.Language.php'); |
| 6 | 6 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 7 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | 11 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |