@@ -3,15 +3,15 @@ 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 | |
| 12 | 12 | if (!empty($spotter_array)) |
| 13 | 13 | { |
| 14 | - $title = sprintf(_("Most Common Routes from aircraft with registration %s"),$registration); |
|
| 14 | + $title = sprintf(_("Most Common Routes from aircraft with registration %s"), $registration); |
|
| 15 | 15 | |
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="info column">'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('registration-sub-menu.php'); |
| 25 | 25 | print '<div class="column">'; |
| 26 | 26 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows the most common routes of aircraft with registration <strong>%s</strong>."),$registration).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows the most common routes of aircraft with registration <strong>%s</strong>."), $registration).'</p>'; |
|
| 28 | 28 | |
| 29 | 29 | $route_array = $Spotter->countAllRoutesByRegistration($registration); |
| 30 | 30 | if (!empty($route_array)) |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | print '</thead>'; |
| 41 | 41 | print '<tbody>'; |
| 42 | 42 | $i = 1; |
| 43 | - foreach($route_array as $route_item) |
|
| 43 | + foreach ($route_array as $route_item) |
|
| 44 | 44 | { |
| 45 | 45 | print '<tr>'; |
| 46 | 46 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | } |
| 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 Arrival Airports by Country from %s"),$manufacturer); |
|
| 17 | + $title = sprintf(_("Most Common Arrival Airports by Country from %s"), $manufacturer); |
|
| 18 | 18 | |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $all_manufacturers = $Spotter->getAllManufacturers(); |
| 25 | - foreach($all_manufacturers as $all_manufacturer) |
|
| 25 | + foreach ($all_manufacturers as $all_manufacturer) |
|
| 26 | 26 | { |
| 27 | - if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 27 | + if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer']))) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>'; |
| 30 | 30 | } else { |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | include('manufacturer-sub-menu.php'); |
| 44 | 44 | print '<div class="column">'; |
| 45 | 45 | print '<h2>'._("Most Common Arrival Airports by Country").'</h2>'; |
| 46 | - print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 46 | + print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 47 | 47 | $airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($manufacturer); |
| 48 | 48 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 49 | 49 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | ["'._("Country").'", "'._("# of times").'"], '; |
| 56 | 56 | |
| 57 | 57 | $country_data = ''; |
| 58 | - foreach($airport_country_array as $airport_item) |
|
| 58 | + foreach ($airport_country_array as $airport_item) |
|
| 59 | 59 | { |
| 60 | 60 | $country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],'; |
| 61 | 61 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | print '</thead>'; |
| 90 | 90 | print '<tbody>'; |
| 91 | 91 | $i = 1; |
| 92 | - foreach($airport_country_array as $airport_item) |
|
| 92 | + foreach ($airport_country_array as $airport_item) |
|
| 93 | 93 | { |
| 94 | 94 | print '<tr>'; |
| 95 | 95 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['aircraft_manufacturer'])) { |
| 6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |
@@ -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 | ["'._("Country").'", "'._("# of times").'"], '; |
| 68 | - $country_data = ''; |
|
| 68 | + $country_data = ''; |
|
| 69 | 69 | foreach($airport_country_array as $airport_item) |
| 70 | 70 | { |
| 71 | 71 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_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 Departure Airports by Country to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 16 | + $title = sprintf(_("Most Common Departure Airports by Country to %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($_GET['airport'] == $airport_name['airport_icao']) |
|
| 26 | + if ($_GET['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 Departure Airports by Country").'</h2>'; |
| 57 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <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 all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>'; |
|
| 58 | 58 | |
| 59 | 59 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirport($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 | ["'._("Country").'", "'._("# of times").'"], '; |
| 68 | 68 | $country_data = ''; |
| 69 | - foreach($airport_country_array as $airport_item) |
|
| 69 | + foreach ($airport_country_array as $airport_item) |
|
| 70 | 70 | { |
| 71 | 71 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 72 | 72 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | print '</thead>'; |
| 101 | 101 | print '<tbody>'; |
| 102 | 102 | $i = 1; |
| 103 | - foreach($airport_country_array as $airport_item) |
|
| 103 | + foreach ($airport_country_array as $airport_item) |
|
| 104 | 104 | { |
| 105 | 105 | print '<tr>'; |
| 106 | 106 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | date_default_timezone_set('UTC'); |
| 27 | 27 | //waypoint plotting |
| 28 | 28 | $output .= '{"type": "Feature",'; |
| 29 | - $output .= '"properties": {'; |
|
| 29 | + $output .= '"properties": {'; |
|
| 30 | 30 | $output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",'; |
| 31 | 31 | $output .= '"city": "'.$spotter_item['city'].'",'; |
| 32 | 32 | $output .= '"country": "'.$spotter_item['country'].'",'; |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | $output .= '"homepage": "'.$spotter_item['home_link'].'",'; |
| 50 | 50 | $output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"'; |
| 51 | 51 | // $output .= '"photo": "'.$spotter_item['image_thumbnail'].'",'; |
| 52 | - $output .= '},'; |
|
| 53 | - $output .= '"geometry": {'; |
|
| 52 | + $output .= '},'; |
|
| 53 | + $output .= '"geometry": {'; |
|
| 54 | 54 | $output .= '"type": "Point",'; |
| 55 | 55 | $output .= '"coordinates": ['; |
| 56 | - $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
| 56 | + $output .= $spotter_item['longitude'].', '.$spotter_item['latitude']; |
|
| 57 | 57 | $output .= ']'; |
| 58 | - $output .= '}'; |
|
| 58 | + $output .= '}'; |
|
| 59 | 59 | $output .= '},'; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | |
| 12 | 12 | if (isset($_GET['coord'])) |
| 13 | 13 | { |
| 14 | - $coords = explode(',',$_GET['coord']); |
|
| 14 | + $coords = explode(',', $_GET['coord']); |
|
| 15 | 15 | $spotter_array = $Spotter->getAllAirportInfobyCoord($coords); |
| 16 | 16 | } else { |
| 17 | 17 | $spotter_array = $Spotter->getAllAirportInfo(); |
@@ -22,17 +22,17 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | if (!empty($spotter_array)) |
| 24 | 24 | { |
| 25 | - foreach($spotter_array as $spotter_item) |
|
| 25 | + foreach ($spotter_array as $spotter_item) |
|
| 26 | 26 | { |
| 27 | 27 | date_default_timezone_set('UTC'); |
| 28 | 28 | //waypoint plotting |
| 29 | 29 | $output .= '{"type": "Feature",'; |
| 30 | 30 | $output .= '"properties": {'; |
| 31 | - $output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",'; |
|
| 32 | - $output .= '"city": "'.str_replace('"',"'",$spotter_item['city']).'",'; |
|
| 31 | + $output .= '"name": "'.str_replace('"', "'", $spotter_item['name']).'",'; |
|
| 32 | + $output .= '"city": "'.str_replace('"', "'", $spotter_item['city']).'",'; |
|
| 33 | 33 | $output .= '"country": "'.$spotter_item['country'].'",'; |
| 34 | 34 | $output .= '"altitude": "'.$spotter_item['altitude'].'",'; |
| 35 | - $output .= '"popupContent": "'.str_replace('"',"'",$spotter_item['name']).' : '.str_replace('"',"'",$spotter_item['city']).', '.$spotter_item['country'].'",'; |
|
| 35 | + $output .= '"popupContent": "'.str_replace('"', "'", $spotter_item['name']).' : '.str_replace('"', "'", $spotter_item['city']).', '.$spotter_item['country'].'",'; |
|
| 36 | 36 | if ($spotter_item['type'] == 'large_airport') { |
| 37 | 37 | $output .= '"icon": "'.$globalURL.'/images/airport.png",'; |
| 38 | 38 | } elseif ($spotter_item['type'] == 'heliport') { |
@@ -3,17 +3,17 @@ discard block |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | |
| 6 | -if (!isset($_GET['airline'])){ |
|
| 6 | +if (!isset($_GET['airline'])) { |
|
| 7 | 7 | header('Location: '.$globalURL.'/airline'); |
| 8 | -} else{ |
|
| 8 | +} else { |
|
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | //calculuation for the pagination |
| 11 | - if(!isset($_GET['limit']) || $_GET['limit'] == "") |
|
| 11 | + if (!isset($_GET['limit']) || $_GET['limit'] == "") |
|
| 12 | 12 | { |
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | - } else { |
|
| 16 | + } else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -27,16 +27,16 @@ discard block |
||
| 27 | 27 | $limit_previous_1 = $limit_start - $absolute_difference; |
| 28 | 28 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 29 | 29 | |
| 30 | - $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 30 | + $airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 31 | 31 | $page_url = $globalURL.'/airline/'.$airline; |
| 32 | 32 | |
| 33 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 34 | - $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'],$limit_start.",".$absolute_difference, $sort); |
|
| 33 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 34 | + $spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'], $limit_start.",".$absolute_difference, $sort); |
|
| 35 | 35 | |
| 36 | 36 | if (!empty($spotter_array)) |
| 37 | 37 | { |
| 38 | 38 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
| 39 | - $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 39 | + $title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 40 | 40 | } else $title = ''; |
| 41 | 41 | require_once('header.php'); |
| 42 | 42 | |
@@ -45,9 +45,9 @@ discard block |
||
| 45 | 45 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
| 46 | 46 | print '<option></option>'; |
| 47 | 47 | $airline_names = $Spotter->getAllAirlineNames(); |
| 48 | - foreach($airline_names as $airline_name) |
|
| 48 | + foreach ($airline_names as $airline_name) |
|
| 49 | 49 | { |
| 50 | - if($_GET['airline'] == $airline_name['airline_icao']) |
|
| 50 | + if ($_GET['airline'] == $airline_name['airline_icao']) |
|
| 51 | 51 | { |
| 52 | 52 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 53 | 53 | } else { |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | include('airline-sub-menu.php'); |
| 85 | 85 | print '<div class="table column">'; |
| 86 | 86 | if (isset($spotter_array[0]['airline_name'])) { |
| 87 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 87 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | include('table-output.php'); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | $limit_start = 0; |
| 14 | 14 | $limit_end = 25; |
| 15 | 15 | $absolute_difference = 25; |
| 16 | - } else { |
|
| 16 | + } else { |
|
| 17 | 17 | $limit_explode = explode(",", $_GET['limit']); |
| 18 | 18 | $limit_start = $limit_explode[0]; |
| 19 | 19 | $limit_end = $limit_explode[1]; |
@@ -37,7 +37,9 @@ discard block |
||
| 37 | 37 | { |
| 38 | 38 | if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) { |
| 39 | 39 | $title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
| 40 | - } else $title = ''; |
|
| 40 | + } else { |
|
| 41 | + $title = ''; |
|
| 42 | + } |
|
| 41 | 43 | require_once('header.php'); |
| 42 | 44 | |
| 43 | 45 | print '<div class="select-item">'; |
@@ -73,8 +75,12 @@ discard block |
||
| 73 | 75 | print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['airline_name'].'</div>'; |
| 74 | 76 | print '<div><span class="label">'._("Country").'</span>'.$spotter_array[0]['airline_country'].'</div>'; |
| 75 | 77 | print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['airline_icao'].'</div>'; |
| 76 | - if (isset($spotter_array[0]['airline_iata'])) print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>'; |
|
| 77 | - if (isset($spotter_array[0]['airline_callsign'])) print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>'; |
|
| 78 | + if (isset($spotter_array[0]['airline_iata'])) { |
|
| 79 | + print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>'; |
|
| 80 | + } |
|
| 81 | + if (isset($spotter_array[0]['airline_callsign'])) { |
|
| 82 | + print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>'; |
|
| 83 | + } |
|
| 78 | 84 | print '<div><span class="label">'._("Type").'</span>'.ucwords($spotter_array[0]['airline_type']).'</div>'; |
| 79 | 85 | print '</div>'; |
| 80 | 86 | } else { |
@@ -54,7 +54,9 @@ |
||
| 54 | 54 | $radius = $spotter_item['radius']*1852; |
| 55 | 55 | $output .= '"radiusm": "'.$radius.'",'; |
| 56 | 56 | $output .= '"radiusnm": "'.$spotter_item['radius'].'",'; |
| 57 | - if ($radius > 25000) $radius = 25000; |
|
| 57 | + if ($radius > 25000) { |
|
| 58 | + $radius = 25000; |
|
| 59 | + } |
|
| 58 | 60 | $output .= '"radius": "'.$radius.'"'; |
| 59 | 61 | $output .= '},'; |
| 60 | 62 | $output .= '"geometry": {'; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | date_default_timezone_set('UTC'); |
| 43 | 43 | //waypoint plotting |
| 44 | 44 | $output .= '{"type": "Feature",'; |
| 45 | - $output .= '"properties": {'; |
|
| 45 | + $output .= '"properties": {'; |
|
| 46 | 46 | $output .= '"ref": "'.$spotter_item['ref'].'",'; |
| 47 | 47 | $output .= '"title": "'.$spotter_item['title'].'",'; |
| 48 | 48 | $output .= '"fir": "'.$spotter_item['fir'].'",'; |
@@ -61,28 +61,28 @@ discard block |
||
| 61 | 61 | // $output .= '"photo": "'.$spotter_item['image_thumbnail'].'",'; |
| 62 | 62 | // if ($spotter_item['radius'] > 30) $spotter_item['radius'] = 30; |
| 63 | 63 | if ($spotter_item['scope'] == 'Airport warning') { |
| 64 | - $output .= '"color": "#EACC04",'; |
|
| 64 | + $output .= '"color": "#EACC04",'; |
|
| 65 | 65 | } elseif ($spotter_item['scope'] == 'Airport/Enroute warning') { |
| 66 | - $output .= '"color": "#EA7D00",'; |
|
| 66 | + $output .= '"color": "#EA7D00",'; |
|
| 67 | 67 | } elseif ($spotter_item['scope'] == 'Airport/Navigation warning') { |
| 68 | - $output .= '"color": "#DBEA00",'; |
|
| 68 | + $output .= '"color": "#DBEA00",'; |
|
| 69 | 69 | } elseif ($spotter_item['scope'] == 'Navigation warning') { |
| 70 | - $output .= '"color": "#BBEA00",'; |
|
| 70 | + $output .= '"color": "#BBEA00",'; |
|
| 71 | 71 | } else { |
| 72 | - $output .= '"color": "#FF0000",'; |
|
| 72 | + $output .= '"color": "#FF0000",'; |
|
| 73 | 73 | } |
| 74 | 74 | $radius = $spotter_item['radius']*1852; |
| 75 | 75 | $output .= '"radiusm": "'.$radius.'",'; |
| 76 | 76 | $output .= '"radiusnm": "'.$spotter_item['radius'].'",'; |
| 77 | 77 | if ($radius > 25000) $radius = 25000; |
| 78 | 78 | $output .= '"radius": '.$radius.''; |
| 79 | - $output .= '},'; |
|
| 80 | - $output .= '"geometry": {'; |
|
| 79 | + $output .= '},'; |
|
| 80 | + $output .= '"geometry": {'; |
|
| 81 | 81 | $output .= '"type": "Point",'; |
| 82 | 82 | $output .= '"coordinates": ['; |
| 83 | - $output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude']; |
|
| 83 | + $output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude']; |
|
| 84 | 84 | $output .= ']'; |
| 85 | - $output .= '}'; |
|
| 85 | + $output .= '}'; |
|
| 86 | 86 | $output .= '},'; |
| 87 | 87 | } |
| 88 | 88 | $output = substr($output, 0, -1); |
@@ -10,24 +10,24 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | if (isset($_GET['coord'])) |
| 12 | 12 | { |
| 13 | - $coords = explode(',',$_GET['coord']); |
|
| 13 | + $coords = explode(',', $_GET['coord']); |
|
| 14 | 14 | if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] != '' && $_COOKIE['notamscope'] != 'All') { |
| 15 | - $scope = filter_var($_COOOKIE['notamscope'],FILTER_SANITIZE_STRING); |
|
| 16 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
| 15 | + $scope = filter_var($_COOOKIE['notamscope'], FILTER_SANITIZE_STRING); |
|
| 16 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
| 17 | 17 | } elseif (isset($_GET['scope']) && $_GET['scope'] != '' && $_GET['scope'] != 'All') { |
| 18 | - $scope = filter_input(INPUT_GET,'scope',FILTER_SANITIZE_STRING); |
|
| 19 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
| 18 | + $scope = filter_input(INPUT_GET, 'scope', FILTER_SANITIZE_STRING); |
|
| 19 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
| 20 | 20 | } else { |
| 21 | 21 | $spotter_array = $NOTAM->getAllNOTAMbyCoord($coords); |
| 22 | 22 | } |
| 23 | 23 | // $spotter_array = $NOTAM->getAllNOTAM(); |
| 24 | 24 | } else { |
| 25 | 25 | if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] != '' && $_COOKIE['notamscope'] != 'All') { |
| 26 | - $scope = filter_var($_COOKIE['notamscope'],FILTER_SANITIZE_STRING); |
|
| 26 | + $scope = filter_var($_COOKIE['notamscope'], FILTER_SANITIZE_STRING); |
|
| 27 | 27 | $spotter_array = $NOTAM->getAllNOTAMbyScope($scope); |
| 28 | 28 | } elseif (isset($_GET['scope']) && $_GET['scope'] != '' && $_GET['scope'] != 'All') { |
| 29 | - $scope = filter_input(INPUT_GET,'scope',FILTER_SANITIZE_STRING); |
|
| 30 | - $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords,$scope); |
|
| 29 | + $scope = filter_input(INPUT_GET, 'scope', FILTER_SANITIZE_STRING); |
|
| 30 | + $spotter_array = $NOTAM->getAllNOTAMbyCoordScope($coords, $scope); |
|
| 31 | 31 | } else { |
| 32 | 32 | $spotter_array = $NOTAM->getAllNOTAM(); |
| 33 | 33 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | if (!empty($spotter_array)) |
| 39 | 39 | { |
| 40 | - foreach($spotter_array as $spotter_item) |
|
| 40 | + foreach ($spotter_array as $spotter_item) |
|
| 41 | 41 | { |
| 42 | 42 | date_default_timezone_set('UTC'); |
| 43 | 43 | //waypoint plotting |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $output .= '"ref": "'.$spotter_item['ref'].'",'; |
| 47 | 47 | $output .= '"title": "'.$spotter_item['title'].'",'; |
| 48 | 48 | $output .= '"fir": "'.$spotter_item['fir'].'",'; |
| 49 | - $output .= '"text": "'.str_replace(array("\r\n", "\r", "\n"),'<br />',str_replace(array('"',"\t"), '',$spotter_item['notam_text'])).'",'; |
|
| 49 | + $output .= '"text": "'.str_replace(array("\r\n", "\r", "\n"), '<br />', str_replace(array('"', "\t"), '', $spotter_item['notam_text'])).'",'; |
|
| 50 | 50 | $output .= '"latitude": '.$spotter_item['center_latitude'].','; |
| 51 | 51 | $output .= '"longitude": '.$spotter_item['center_longitude'].','; |
| 52 | 52 | $output .= '"lower_limit": '.$spotter_item['lower_limit'].','; |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $output .= '}'; |
| 86 | 86 | $output .= '},'; |
| 87 | 87 | } |
| 88 | - $output = substr($output, 0, -1); |
|
| 88 | + $output = substr($output, 0, -1); |
|
| 89 | 89 | } |
| 90 | 90 | $output .= ']}'; |
| 91 | 91 | |
@@ -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 Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']); |
|
| 16 | + $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 | 17 | |
| 18 | 18 | require_once('header.php'); |
| 19 | 19 | print '<div class="select-item">'; |
@@ -22,9 +22,9 @@ discard block |
||
| 22 | 22 | print '<option></option>'; |
| 23 | 23 | $airport_names = $Spotter->getAllAirportNames(); |
| 24 | 24 | ksort($airport_names); |
| 25 | - foreach($airport_names as $airport_name) |
|
| 25 | + foreach ($airport_names as $airport_name) |
|
| 26 | 26 | { |
| 27 | - if($_GET['airport'] == $airport_name['airport_icao']) |
|
| 27 | + if ($_GET['airport'] == $airport_name['airport_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | 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>'; |
| 30 | 30 | } else { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | include('airport-sub-menu.php'); |
| 56 | 56 | print '<div class="column">'; |
| 57 | 57 | print '<h2>'._("Most Common Aircraft by Registration").'</h2>'; |
| 58 | - 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>'; |
|
| 58 | + 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>'; |
|
| 59 | 59 | |
| 60 | 60 | $aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport); |
| 61 | 61 | if (!empty($aircraft_array)) |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | print '</thead>'; |
| 73 | 73 | print '<tbody>'; |
| 74 | 74 | $i = 1; |
| 75 | - foreach($aircraft_array as $aircraft_item) |
|
| 75 | + foreach ($aircraft_array as $aircraft_item) |
|
| 76 | 76 | { |
| 77 | 77 | print '<tr>'; |
| 78 | 78 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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['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(); |
@@ -3,16 +3,16 @@ 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); |
|
| 6 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 7 | 7 | if (isset($_GET['registration'])) { |
| 8 | - $registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING); |
|
| 8 | + $registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING); |
|
| 9 | 9 | $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort); |
| 10 | 10 | $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration); |
| 11 | 11 | } else $spotter_array = array(); |
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"),$registration); |
|
| 15 | + $title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"), $registration); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="info column">'; |
| 18 | 18 | print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | include('registration-sub-menu.php'); |
| 25 | 25 | print '<div class="column">'; |
| 26 | 26 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 27 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>'; |
|
| 27 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>'; |
|
| 28 | 28 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByRegistration($registration); |
| 29 | 29 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 30 | 30 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | var data = google.visualization.arrayToDataTable([ |
| 36 | 36 | ["'._("Country").'", "'._("# of times").'"], '; |
| 37 | 37 | $country_data = ''; |
| 38 | - foreach($airport_country_array as $airport_item) |
|
| 38 | + foreach ($airport_country_array as $airport_item) |
|
| 39 | 39 | { |
| 40 | 40 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 41 | 41 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | print '</thead>'; |
| 70 | 70 | print '<tbody>'; |
| 71 | 71 | $i = 1; |
| 72 | - foreach($airport_country_array as $airport_item) |
|
| 72 | + foreach ($airport_country_array as $airport_item) |
|
| 73 | 73 | { |
| 74 | 74 | print '<tr>'; |
| 75 | 75 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -12,7 +12,9 @@ |
||
| 12 | 12 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
| 13 | 13 | if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) { |
| 14 | 14 | $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort); |
| 15 | -} else $spotter_array = array(); |
|
| 15 | +} else { |
|
| 16 | + $spotter_array = array(); |
|
| 17 | +} |
|
| 16 | 18 | |
| 17 | 19 | if (!empty($spotter_array)) |
| 18 | 20 | { |
@@ -6,16 +6,16 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/manufacturer'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING); |
|
| 10 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 9 | +$aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING); |
|
| 10 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $manufacturer = ucwords(str_replace("-", " ", $aircraft_manufacturer)); |
| 13 | 13 | |
| 14 | -$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort); |
|
| 14 | +$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort); |
|
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - $title = sprintf(_("Most Common Airlines from %s"),$manufacturer); |
|
| 18 | + $title = sprintf(_("Most Common Airlines from %s"), $manufacturer); |
|
| 19 | 19 | |
| 20 | 20 | require_once('header.php'); |
| 21 | 21 | print '<div class="select-item">'; |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">'; |
| 24 | 24 | print '<option></option>'; |
| 25 | 25 | $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 Airlines").'</h2>'; |
| 47 | - print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."),$manufacturer).'</p>'; |
|
| 47 | + print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."), $manufacturer).'</p>'; |
|
| 48 | 48 | $airline_array = $Spotter->countAllAirlinesByManufacturer($manufacturer); |
| 49 | 49 | if (!empty($airline_array)) |
| 50 | 50 | { |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | print '</thead>'; |
| 61 | 61 | print '<tbody>'; |
| 62 | 62 | $i = 1; |
| 63 | - foreach($airline_array as $airline_item) |
|
| 63 | + foreach ($airline_array as $airline_item) |
|
| 64 | 64 | { |
| 65 | 65 | print '<tr>'; |
| 66 | 66 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -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['aircraft_manufacturer'])) { |
| 6 | - header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/manufacturer'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))); |