@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit'])) |
|
| 10 | +if (!isset($_GET['limit'])) |
|
| 11 | 11 | { |
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 28; |
| 14 | 14 | $absolute_difference = 28; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | print '<div class="column">'; |
| 40 | 40 | print '<p>'._("The view below shows all aircrafts that have been selected to have some sort of special characteristic about them, such as unique liveries, destinations etc.").'</p>'; |
| 41 | 41 | |
| 42 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 42 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 43 | 43 | if (isset($_GET['sort'])) { |
| 44 | 44 | $spotter_array = $Spotter->getSpotterDataByHighlight($limit_start.",".$absolute_difference, $sort); |
| 45 | 45 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | if (!empty($spotter_array)) |
| 49 | 49 | { |
| 50 | 50 | print '<div class="dispay-view">'; |
| 51 | - foreach($spotter_array as $spotter_item) |
|
| 51 | + foreach ($spotter_array as $spotter_item) |
|
| 52 | 52 | { |
| 53 | 53 | if (isset($spotter_item['image']) && $spotter_item['image'] != "") |
| 54 | 54 | { |
@@ -5,14 +5,14 @@ discard block |
||
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if (isset($_GET['start_date'])) { |
| 7 | 7 | //for the date manipulation into the query |
| 8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 8 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
| 9 | 9 | $start_date = $_GET['start_date'].":00"; |
| 10 | 10 | $end_date = $_GET['end_date'].":00"; |
| 11 | 11 | $sql_date = $start_date.",".$end_date; |
| 12 | - } else if($_GET['start_date'] != ""){ |
|
| 12 | + } else if ($_GET['start_date'] != "") { |
|
| 13 | 13 | $start_date = $_GET['start_date'].":00"; |
| 14 | 14 | $sql_date = $start_date; |
| 15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 15 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
| 16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
| 17 | 17 | $sql_date = $end_date; |
| 18 | 18 | } else $sql_date = ''; |
@@ -20,21 +20,21 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | if (isset($_GET['highest_altitude'])) { |
| 22 | 22 | //for altitude manipulation |
| 23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 23 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
| 24 | 24 | $end_altitude = $_GET['highest_altitude']; |
| 25 | 25 | $start_altitude = $_GET['lowest_altitude']; |
| 26 | 26 | $sql_altitude = $start_altitude.",".$end_altitude; |
| 27 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 27 | + } else if ($_GET['highest_altitude'] != "") { |
|
| 28 | 28 | $end_altitude = $_GET['highest_altitude']; |
| 29 | 29 | $sql_altitude = $end_altitude; |
| 30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 30 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
| 31 | 31 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
| 32 | 32 | $sql_altitude = $start_altitude; |
| 33 | 33 | } else $sql_altitude = ''; |
| 34 | 34 | } else $sql_altitude = ''; |
| 35 | 35 | |
| 36 | 36 | //calculuation for the pagination |
| 37 | -if(!isset($_GET['limit'])) |
|
| 37 | +if (!isset($_GET['limit'])) |
|
| 38 | 38 | { |
| 39 | 39 | if (!isset($_GET['number_results'])) |
| 40 | 40 | { |
@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | $limit_end = 25; |
| 43 | 43 | $absolute_difference = 25; |
| 44 | 44 | } else { |
| 45 | - if ($_GET['number_results'] > 1000){ |
|
| 45 | + if ($_GET['number_results'] > 1000) { |
|
| 46 | 46 | $_GET['number_results'] = 1000; |
| 47 | 47 | } |
| 48 | 48 | $limit_start = 0; |
| 49 | 49 | $limit_end = $_GET['number_results']; |
| 50 | 50 | $absolute_difference = $_GET['number_results']; |
| 51 | 51 | } |
| 52 | -} else { |
|
| 52 | +} else { |
|
| 53 | 53 | $limit_explode = explode(",", $_GET['limit']); |
| 54 | 54 | $limit_start = $limit_explode[0]; |
| 55 | 55 | $limit_end = $limit_explode[1]; |
@@ -69,23 +69,23 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | if (isset($_GET['sort'])) $sort = $_GET['sort']; |
| 71 | 71 | else $sort = ''; |
| 72 | -$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
|
| 73 | -$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
|
| 74 | -$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
|
| 75 | -$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING); |
|
| 76 | -$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING); |
|
| 77 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 78 | -$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING); |
|
| 79 | -$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING); |
|
| 80 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 81 | -$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING); |
|
| 82 | -$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING); |
|
| 83 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 84 | -$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING); |
|
| 85 | -$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING); |
|
| 86 | -$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING); |
|
| 87 | -$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
| 88 | -$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,''); |
|
| 72 | +$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
| 73 | +$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING); |
|
| 74 | +$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
| 75 | +$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
| 76 | +$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
| 77 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 78 | +$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
| 79 | +$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 80 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 81 | +$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
| 82 | +$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
| 83 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 84 | +$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
| 85 | +$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
| 86 | +$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
| 87 | +$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
| 88 | +$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, ''); |
|
| 89 | 89 | |
| 90 | 90 | |
| 91 | 91 | $output = '<?xml version="1.0" encoding="UTF-8"?>'; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | if (!empty($spotter_array)) |
| 117 | 117 | { |
| 118 | - foreach($spotter_array as $spotter_item) |
|
| 118 | + foreach ($spotter_array as $spotter_item) |
|
| 119 | 119 | { |
| 120 | 120 | |
| 121 | 121 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | foreach ($waypoint_pieces as $waypoint_coordinate) |
| 134 | 134 | { |
| 135 | - $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 135 | + $output .= $waypoint_coordinate[1].','.$waypoint_coordinate[0].','.$altitude.' '; |
|
| 136 | 136 | |
| 137 | 137 | } |
| 138 | 138 | $output .= '</coordinates>'; |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | $output .= ' ]]></description>'; |
| 179 | 179 | $output .= '<styleUrl>#departureAirport</styleUrl>'; |
| 180 | 180 | $output .= '<Point>'; |
| 181 | - $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
|
| 181 | + $output .= '<coordinates>'.$spotter_item['departure_airport_longitude'].', '.$spotter_item['departure_airport_latitude'].', '.$spotter_item['departure_airport_altitude'].'</coordinates>'; |
|
| 182 | 182 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
| 183 | 183 | $output .= '</Point>'; |
| 184 | 184 | $output .= '</Placemark>'; |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | $output .= ' ]]></description>'; |
| 221 | 221 | $output .= '<styleUrl>#arrivalAirport</styleUrl>'; |
| 222 | 222 | $output .= '<Point>'; |
| 223 | - $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
|
| 223 | + $output .= '<coordinates>'.$spotter_item['arrival_airport_longitude'].', '.$spotter_item['arrival_airport_latitude'].', '.$spotter_item['arrival_airport_altitude'].'</coordinates>'; |
|
| 224 | 224 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
| 225 | 225 | $output .= '</Point>'; |
| 226 | 226 | $output .= '</Placemark>'; |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | $output .= ' ]]></description>'; |
| 268 | 268 | $output .= '<styleUrl>#aircraft_'.$spotter_item['spotter_id'].'</styleUrl>'; |
| 269 | 269 | $output .= '<Point>'; |
| 270 | - $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
|
| 270 | + $output .= '<coordinates>'.$spotter_item['longitude'].', '.$spotter_item['latitude'].', '.$altitude.'</coordinates>'; |
|
| 271 | 271 | $output .= '<altitudeMode>absolute</altitudeMode>'; |
| 272 | 272 | $output .= '</Point>'; |
| 273 | 273 | $output .= '</Placemark>'; |
@@ -7,12 +7,12 @@ |
||
| 7 | 7 | require_once('header.php'); |
| 8 | 8 | |
| 9 | 9 | //calculuation for the pagination |
| 10 | -if(!isset($_GET['limit'])) |
|
| 10 | +if (!isset($_GET['limit'])) |
|
| 11 | 11 | { |
| 12 | 12 | $limit_start = 0; |
| 13 | 13 | $limit_end = 25; |
| 14 | 14 | $absolute_difference = 25; |
| 15 | -} else { |
|
| 15 | +} else { |
|
| 16 | 16 | $limit_explode = explode(",", $_GET['limit']); |
| 17 | 17 | $limit_start = $limit_explode[0]; |
| 18 | 18 | $limit_end = $limit_explode[1]; |
@@ -6,22 +6,22 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/airline'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 9 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | if (!empty($spotter_array)) |
| 14 | 14 | { |
| 15 | - $title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']); |
|
| 15 | + $title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']); |
|
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | print '<div class="select-item">'; |
| 18 | 18 | print '<form action="'.$globalURL.'/airline" method="post">'; |
| 19 | 19 | print '<select name="airline" class="selectpicker" data-live-search="true">'; |
| 20 | 20 | print '<option></option>'; |
| 21 | 21 | $airline_names = $Spotter->getAllAirlineNames(); |
| 22 | - foreach($airline_names as $airline_name) |
|
| 22 | + foreach ($airline_names as $airline_name) |
|
| 23 | 23 | { |
| 24 | - if($airline == $airline_name['airline_icao']) |
|
| 24 | + if ($airline == $airline_name['airline_icao']) |
|
| 25 | 25 | { |
| 26 | 26 | print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>'; |
| 27 | 27 | } else { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | include('airline-sub-menu.php'); |
| 60 | 60 | print '<div class="column">'; |
| 61 | 61 | print '<h2>'._("Most Common Departure Airports by Country").'</h2>'; |
| 62 | - print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>'; |
|
| 62 | + print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>'; |
|
| 63 | 63 | $airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirline($airline); |
| 64 | 64 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
| 65 | 65 | print '<div id="chartCountry" class="chart" width="100%"></div> |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | var data = google.visualization.arrayToDataTable([ |
| 71 | 71 | ["'._("Country").'", "'._("# of times").'"], '; |
| 72 | 72 | $country_data = ''; |
| 73 | - foreach($airport_country_array as $airport_item) |
|
| 73 | + foreach ($airport_country_array as $airport_item) |
|
| 74 | 74 | { |
| 75 | 75 | $country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],'; |
| 76 | 76 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | print '</thead>'; |
| 104 | 104 | print '<tbody>'; |
| 105 | 105 | $i = 1; |
| 106 | - foreach($airport_country_array as $airport_item) |
|
| 106 | + foreach ($airport_country_array as $airport_item) |
|
| 107 | 107 | { |
| 108 | 108 | print '<tr>'; |
| 109 | 109 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -7,24 +7,24 @@ discard block |
||
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 10 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 11 | 11 | |
| 12 | 12 | $Spotter = new Spotter(); |
| 13 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 13 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 14 | 14 | |
| 15 | 15 | |
| 16 | 16 | if (!empty($spotter_array)) |
| 17 | 17 | { |
| 18 | - $title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 18 | + $title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | print '<div class="select-item">'; |
| 21 | 21 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
| 22 | 22 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 25 | - foreach($aircraft_types as $aircraft_type) |
|
| 25 | + foreach ($aircraft_types as $aircraft_type) |
|
| 26 | 26 | { |
| 27 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 27 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 28 | 28 | { |
| 29 | 29 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 30 | 30 | } else { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | include('aircraft-sub-menu.php'); |
| 51 | 51 | print '<div class="column">'; |
| 52 | 52 | print '<h2>'._("Most Common Time of Day").'</h2>'; |
| 53 | - print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 53 | + print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 54 | 54 | |
| 55 | 55 | $hour_array = $Spotter->countAllHoursByAircraft($aircraft_type); |
| 56 | 56 | print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>'; |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | var data = google.visualization.arrayToDataTable([ |
| 63 | 63 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 64 | 64 | $hour_data = ''; |
| 65 | - foreach($hour_array as $hour_item) |
|
| 65 | + foreach ($hour_array as $hour_item) |
|
| 66 | 66 | { |
| 67 | 67 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 68 | 68 | } |
@@ -6,23 +6,23 @@ discard block |
||
| 6 | 6 | header('Location: '.$globalURL.'/aircraft'); |
| 7 | 7 | die(); |
| 8 | 8 | } |
| 9 | -$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
|
| 9 | +$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING); |
|
| 10 | 10 | $Spotter = new Spotter(); |
| 11 | -$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1",""); |
|
| 11 | +$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", ""); |
|
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | if (!empty($spotter_array)) |
| 15 | 15 | { |
| 16 | - $title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']); |
|
| 16 | + $title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']); |
|
| 17 | 17 | require_once('header.php'); |
| 18 | 18 | print '<div class="select-item">'; |
| 19 | 19 | print '<form action="'.$globalURL.'/aircraft" method="post">'; |
| 20 | 20 | print '<select name="aircraft_type" class="selectpicker" data-live-search="true">'; |
| 21 | 21 | print '<option></option>'; |
| 22 | 22 | $aircraft_types = $Spotter->getAllAircraftTypes(); |
| 23 | - foreach($aircraft_types as $aircraft_type) |
|
| 23 | + foreach ($aircraft_types as $aircraft_type) |
|
| 24 | 24 | { |
| 25 | - if($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 25 | + if ($aircraft_type == $aircrafttype['aircraft_icao']) |
|
| 26 | 26 | { |
| 27 | 27 | print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>'; |
| 28 | 28 | } else { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | include('aircraft-sub-menu.php'); |
| 49 | 49 | print '<div class="column">'; |
| 50 | 50 | print '<h2>'._("Most Common Routes").'</h2>'; |
| 51 | - print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>'; |
|
| 51 | + print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>'; |
|
| 52 | 52 | |
| 53 | 53 | $route_array = $Spotter->countAllRoutesByAircraft($aircraft_type); |
| 54 | 54 | if (!empty($route_array)) |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | print '</thead>'; |
| 66 | 66 | print '<tbody>'; |
| 67 | 67 | $i = 1; |
| 68 | - foreach($route_array as $route_item) |
|
| 68 | + foreach ($route_array as $route_item) |
|
| 69 | 69 | { |
| 70 | 70 | print '<tr>'; |
| 71 | 71 | print '<td><strong>'.$i.'</strong></td>'; |
@@ -3,9 +3,9 @@ discard block |
||
| 3 | 3 | </span> |
| 4 | 4 | <div class="sub-menu sub-menu-container"> |
| 5 | 5 | <ul class="nav nav-pills"> |
| 6 | - <li><a href="<?php print $globalURL; ?>/airline/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 6 | + <li><a href="<?php print $globalURL; ?>/airline/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li> |
|
| 7 | 7 | <li class="dropdown"> |
| 8 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "airline-statistics-aircraft" || strtolower($current_page) == "airline-statistics-registration" || strtolower($current_page) == "airline-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 8 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "airline-statistics-aircraft" || strtolower($current_page) == "airline-statistics-registration" || strtolower($current_page) == "airline-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 9 | 9 | <?php echo _("Aircraft"); ?> <span class="caret"></span> |
| 10 | 10 | </a> |
| 11 | 11 | <ul class="dropdown-menu" role="menu"> |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | </ul> |
| 16 | 16 | </li> |
| 17 | 17 | <li class="dropdown"> |
| 18 | - <a class="dropdown-toggle <?php if(strtolower($current_page) == "airline-statistics-departure-airport" || strtolower($current_page) == "airline-statistics-departure-airport-country" || strtolower($current_page) == "airline-statistics-arrival-airport" || strtolower($current_page) == "airline-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 18 | + <a class="dropdown-toggle <?php if (strtolower($current_page) == "airline-statistics-departure-airport" || strtolower($current_page) == "airline-statistics-departure-airport-country" || strtolower($current_page) == "airline-statistics-arrival-airport" || strtolower($current_page) == "airline-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#"> |
|
| 19 | 19 | <?php echo _("Airport"); ?> <span class="caret"></span> |
| 20 | 20 | </a> |
| 21 | 21 | <ul class="dropdown-menu" role="menu"> |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | <li><a href="<?php print $globalURL; ?>/airline/statistics/arrival-airport-country/<?php print $_GET['airline']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li> |
| 26 | 26 | </ul> |
| 27 | 27 | </li> |
| 28 | - <li><a href="<?php print $globalURL; ?>/airline/statistics/route/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 29 | - <li><a href="<?php print $globalURL; ?>/airline/statistics/time/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 28 | + <li><a href="<?php print $globalURL; ?>/airline/statistics/route/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li> |
|
| 29 | + <li><a href="<?php print $globalURL; ?>/airline/statistics/time/<?php print $_GET['airline']; ?>" <?php if (strtolower($current_page) == "airline-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li> |
|
| 30 | 30 | </ul> |
| 31 | 31 | </div> |
| 32 | 32 | \ No newline at end of file |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | if (!isset($globalDemo)) { |
| 13 | 13 | if (isset($_GET['coord'])) |
| 14 | 14 | { |
| 15 | - $coords = explode(',',$_GET['coord']); |
|
| 15 | + $coords = explode(',', $_GET['coord']); |
|
| 16 | 16 | // $spotter_array = Source::getAllLocationInfobyCoord($coords); |
| 17 | 17 | $spotter_array = $Source->getAllLocationInfo(); |
| 18 | 18 | } else { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $output = '{"type": "FeatureCollection","features": ['; |
| 24 | 24 | if (!empty($spotter_array)) |
| 25 | 25 | { |
| 26 | - foreach($spotter_array as $spotter_item) |
|
| 26 | + foreach ($spotter_array as $spotter_item) |
|
| 27 | 27 | { |
| 28 | 28 | date_default_timezone_set('UTC'); |
| 29 | 29 | //waypoint plotting |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | $output .= '}'; |
| 47 | 47 | $output .= '},'; |
| 48 | 48 | } |
| 49 | - $output = substr($output, 0, -1); |
|
| 49 | + $output = substr($output, 0, -1); |
|
| 50 | 50 | } |
| 51 | 51 | $output .= ']}'; |
| 52 | 52 | |
@@ -5,14 +5,14 @@ discard block |
||
| 5 | 5 | $Spotter = new Spotter(); |
| 6 | 6 | if (isset($_GET['start_date'])) { |
| 7 | 7 | //for the date manipulation into the query |
| 8 | - if($_GET['start_date'] != "" && $_GET['end_date'] != ""){ |
|
| 8 | + if ($_GET['start_date'] != "" && $_GET['end_date'] != "") { |
|
| 9 | 9 | $start_date = $_GET['start_date'].":00"; |
| 10 | 10 | $end_date = $_GET['end_date'].":00"; |
| 11 | 11 | $sql_date = $start_date.",".$end_date; |
| 12 | - } else if($_GET['start_date'] != ""){ |
|
| 12 | + } else if ($_GET['start_date'] != "") { |
|
| 13 | 13 | $start_date = $_GET['start_date'].":00"; |
| 14 | 14 | $sql_date = $start_date; |
| 15 | - } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){ |
|
| 15 | + } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") { |
|
| 16 | 16 | $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00"; |
| 17 | 17 | $sql_date = $end_date; |
| 18 | 18 | } else $sql_date = ''; |
@@ -20,21 +20,21 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | if (isset($_GET['highest_altitude'])) { |
| 22 | 22 | //for altitude manipulation |
| 23 | - if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){ |
|
| 23 | + if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") { |
|
| 24 | 24 | $end_altitude = $_GET['highest_altitude']; |
| 25 | 25 | $start_altitude = $_GET['lowest_altitude']; |
| 26 | 26 | $sql_altitude = $start_altitude.",".$end_altitude; |
| 27 | - } else if($_GET['highest_altitude'] != ""){ |
|
| 27 | + } else if ($_GET['highest_altitude'] != "") { |
|
| 28 | 28 | $end_altitude = $_GET['highest_altitude']; |
| 29 | 29 | $sql_altitude = $end_altitude; |
| 30 | - } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){ |
|
| 30 | + } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") { |
|
| 31 | 31 | $start_altitude = $_GET['lowest_altitude'].",60000"; |
| 32 | 32 | $sql_altitude = $start_altitude; |
| 33 | 33 | } else $sql_altitude = ''; |
| 34 | 34 | } else $sql_altitude = ''; |
| 35 | 35 | |
| 36 | 36 | //calculuation for the pagination |
| 37 | -if(!isset($_GET['limit'])) |
|
| 37 | +if (!isset($_GET['limit'])) |
|
| 38 | 38 | { |
| 39 | 39 | if (!isset($_GET['number_results'])) |
| 40 | 40 | { |
@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | $limit_end = 25; |
| 43 | 43 | $absolute_difference = 25; |
| 44 | 44 | } else { |
| 45 | - if ($_GET['number_results'] > 1000){ |
|
| 45 | + if ($_GET['number_results'] > 1000) { |
|
| 46 | 46 | $_GET['number_results'] = 1000; |
| 47 | 47 | } |
| 48 | 48 | $limit_start = 0; |
| 49 | 49 | $limit_end = $_GET['number_results']; |
| 50 | 50 | $absolute_difference = $_GET['number_results']; |
| 51 | 51 | } |
| 52 | -} else { |
|
| 52 | +} else { |
|
| 53 | 53 | $limit_explode = explode(",", $_GET['limit']); |
| 54 | 54 | $limit_start = $limit_explode[0]; |
| 55 | 55 | $limit_end = $limit_explode[1]; |
@@ -72,23 +72,23 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | if (isset($_GET['sort'])) $sort = $_GET['sort']; |
| 74 | 74 | else $sort = ''; |
| 75 | -$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING); |
|
| 76 | -$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING); |
|
| 77 | -$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING); |
|
| 78 | -$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING); |
|
| 79 | -$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING); |
|
| 80 | -$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
| 81 | -$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING); |
|
| 82 | -$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING); |
|
| 83 | -$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING); |
|
| 84 | -$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING); |
|
| 85 | -$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING); |
|
| 86 | -$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
| 87 | -$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING); |
|
| 88 | -$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING); |
|
| 89 | -$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING); |
|
| 90 | -$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING); |
|
| 91 | -$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,''); |
|
| 75 | +$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING); |
|
| 76 | +$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING); |
|
| 77 | +$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING); |
|
| 78 | +$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING); |
|
| 79 | +$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING); |
|
| 80 | +$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
| 81 | +$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING); |
|
| 82 | +$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING); |
|
| 83 | +$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING); |
|
| 84 | +$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING); |
|
| 85 | +$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING); |
|
| 86 | +$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
| 87 | +$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING); |
|
| 88 | +$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING); |
|
| 89 | +$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING); |
|
| 90 | +$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING); |
|
| 91 | +$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, ''); |
|
| 92 | 92 | |
| 93 | 93 | print '<?xml version="1.0" encoding="UTF-8" ?>'; |
| 94 | 94 | print '<rss xmlns:flightairmap="http://'.$_SERVER['HTTP_HOST'].''.htmlentities($_SERVER['REQUEST_URI']).'" version="2.0">'; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | if (!empty($spotter_array)) |
| 104 | 104 | { |
| 105 | - foreach($spotter_array as $spotter_item) |
|
| 105 | + foreach ($spotter_array as $spotter_item) |
|
| 106 | 106 | { |
| 107 | 107 | |
| 108 | 108 | |