@@ -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['ident'])) { |
| 6 | - header('Location: '.$globalURL.'/ident'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/ident'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -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['ident'])) { |
| 6 | - header('Location: '.$globalURL.'/ident'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/ident'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $sort = filter_input(INPUT_GET,'sort',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_type'])) { |
| 7 | - header('Location: '.$globalURL.'/aircraft'); |
|
| 8 | - die(); |
|
| 7 | + header('Location: '.$globalURL.'/aircraft'); |
|
| 8 | + die(); |
|
| 9 | 9 | } |
| 10 | 10 | |
| 11 | 11 | $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING); |
@@ -64,14 +64,14 @@ discard block |
||
| 64 | 64 | function drawChart() { |
| 65 | 65 | var data = google.visualization.arrayToDataTable([ |
| 66 | 66 | ["'._("Hour").'", "'._("# of Flights").'"], '; |
| 67 | - $hour_data = ''; |
|
| 67 | + $hour_data = ''; |
|
| 68 | 68 | foreach($hour_array as $hour_item) |
| 69 | 69 | { |
| 70 | 70 | $hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],'; |
| 71 | 71 | } |
| 72 | 72 | $hour_data = substr($hour_data, 0, -1); |
| 73 | 73 | print $hour_data; |
| 74 | - print ']); |
|
| 74 | + print ']); |
|
| 75 | 75 | |
| 76 | 76 | var options = { |
| 77 | 77 | legend: {position: "none"}, |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | if (!isset($filter_name)) $filter_name = ''; |
| 9 | 9 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
| 10 | 10 | if ($airline_icao == 'all') { |
| 11 | - unset($_COOKIE['stats_airline_icao']); |
|
| 12 | - setcookie('stats_airline_icao', '', time()-3600); |
|
| 13 | - $airline_icao = ''; |
|
| 11 | + unset($_COOKIE['stats_airline_icao']); |
|
| 12 | + setcookie('stats_airline_icao', '', time()-3600); |
|
| 13 | + $airline_icao = ''; |
|
| 14 | 14 | } elseif ($airline_icao == '' && isset($_COOKIE['stats_airline_icao'])) { |
| 15 | - $airline_icao = $_COOKIE['stats_airline_icao']; |
|
| 15 | + $airline_icao = $_COOKIE['stats_airline_icao']; |
|
| 16 | 16 | } elseif ($airline_icao == '' && isset($globalFilter)) { |
| 17 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
| 17 | + if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
| 18 | 18 | } |
| 19 | 19 | setcookie('stats_airline_icao',$airline_icao); |
| 20 | 20 | |
@@ -35,14 +35,14 @@ discard block |
||
| 35 | 35 | function drawChart() { |
| 36 | 36 | var data = google.visualization.arrayToDataTable([ |
| 37 | 37 | ["'._("Pilot").'", "'._("# of times").'"], '; |
| 38 | - $pilot_data = ''; |
|
| 38 | + $pilot_data = ''; |
|
| 39 | 39 | foreach($pilot_array as $pilot_item) |
| 40 | 40 | { |
| 41 | 41 | $pilot_data .= '[ "'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
| 42 | 42 | } |
| 43 | 43 | $pilot_data = substr($pilot_data, 0, -1); |
| 44 | 44 | print $pilot_data; |
| 45 | - print ']); |
|
| 45 | + print ']); |
|
| 46 | 46 | |
| 47 | 47 | var options = { |
| 48 | 48 | chartArea: {"width": "80%", "height": "60%"}, |
@@ -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['ident'])) { |
| 6 | - header('Location: '.$globalURL.'/ident'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/ident'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -11,13 +11,13 @@ discard block |
||
| 11 | 11 | $Connection = new Connection(); |
| 12 | 12 | |
| 13 | 13 | if (!$Connection->tableExists('airspace')) { |
| 14 | - die; |
|
| 14 | + die; |
|
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | if (isset($_GET['coord'])) |
| 18 | 18 | { |
| 19 | 19 | $coords = explode(',',$_GET['coord']); |
| 20 | - if ($globalDBdriver == 'mysql') { |
|
| 20 | + if ($globalDBdriver == 'mysql') { |
|
| 21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
| 22 | 22 | try { |
| 23 | 23 | $sth = $Connection->db->prepare($query); |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } else { |
| 40 | - if ($globalDBdriver == 'mysql') { |
|
| 40 | + if ($globalDBdriver == 'mysql') { |
|
| 41 | 41 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace"; |
| 42 | 42 | } else { |
| 43 | 43 | $query = "SELECT *, ST_AsBinary(wkb_geometry,'NDR') AS wkb FROM airspace"; |
@@ -51,8 +51,8 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | $geojson = array( |
| 54 | - 'type' => 'FeatureCollection', |
|
| 55 | - 'features' => array() |
|
| 54 | + 'type' => 'FeatureCollection', |
|
| 55 | + 'features' => array() |
|
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | 58 | while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
@@ -109,9 +109,9 @@ discard block |
||
| 109 | 109 | $properties['color'] = '#d9ffcb'; |
| 110 | 110 | } |
| 111 | 111 | $feature = array( |
| 112 | - 'type' => 'Feature', |
|
| 113 | - 'geometry' => json_decode($geom->out('json')), |
|
| 114 | - 'properties' => $properties |
|
| 112 | + 'type' => 'Feature', |
|
| 113 | + 'geometry' => json_decode($geom->out('json')), |
|
| 114 | + 'properties' => $properties |
|
| 115 | 115 | ); |
| 116 | 116 | array_push($geojson['features'], $feature); |
| 117 | 117 | } |
@@ -3,8 +3,8 @@ |
||
| 3 | 3 | require_once('require/class.Spotter.php'); |
| 4 | 4 | require_once('require/class.Language.php'); |
| 5 | 5 | if (!isset($_GET['country'])) { |
| 6 | - header('Location: '.$globalURL.'/country'); |
|
| 7 | - die(); |
|
| 6 | + header('Location: '.$globalURL.'/country'); |
|
| 7 | + die(); |
|
| 8 | 8 | } |
| 9 | 9 | $Spotter = new Spotter(); |
| 10 | 10 | $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING))); |
@@ -824,11 +824,11 @@ |
||
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | /** |
| 827 | - * Returns true if $string is valid UTF-8 and false otherwise. |
|
| 828 | - * |
|
| 829 | - * @param mixed $str String to be tested |
|
| 830 | - * @return boolean |
|
| 831 | - */ |
|
| 827 | + * Returns true if $string is valid UTF-8 and false otherwise. |
|
| 828 | + * |
|
| 829 | + * @param mixed $str String to be tested |
|
| 830 | + * @return boolean |
|
| 831 | + */ |
|
| 832 | 832 | static function is_utf8($str) |
| 833 | 833 | { |
| 834 | 834 | $c=0; $b=0; |
@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | } |
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | - * Get SQL query part for filter used |
|
| 17 | - * @param Array $filter the filter |
|
| 18 | - * @return Array the SQL part |
|
| 19 | - */ |
|
| 16 | + * Get SQL query part for filter used |
|
| 17 | + * @param Array $filter the filter |
|
| 18 | + * @return Array the SQL part |
|
| 19 | + */ |
|
| 20 | 20 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 21 | 21 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
| 22 | 22 | $filters = array(); |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | - * Executes the SQL statements to get the spotter information |
|
| 91 | - * |
|
| 92 | - * @param String $query the SQL query |
|
| 93 | - * @param Array $params parameter of the query |
|
| 94 | - * @param String $limitQuery the limit query |
|
| 95 | - * @return Array the spotter information |
|
| 96 | - * |
|
| 97 | - */ |
|
| 90 | + * Executes the SQL statements to get the spotter information |
|
| 91 | + * |
|
| 92 | + * @param String $query the SQL query |
|
| 93 | + * @param Array $params parameter of the query |
|
| 94 | + * @param String $limitQuery the limit query |
|
| 95 | + * @return Array the spotter information |
|
| 96 | + * |
|
| 97 | + */ |
|
| 98 | 98 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
| 99 | 99 | { |
| 100 | 100 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -258,11 +258,11 @@ discard block |
||
| 258 | 258 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
| 259 | 259 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
| 260 | 260 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
| 261 | - } else { |
|
| 262 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 261 | + } else { |
|
| 262 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 263 | 263 | $temp_array['aircraft_name'] = 'N/A'; |
| 264 | 264 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
| 265 | - } |
|
| 265 | + } |
|
| 266 | 266 | } |
| 267 | 267 | $fromsource = NULL; |
| 268 | 268 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -458,11 +458,11 @@ discard block |
||
| 458 | 458 | |
| 459 | 459 | |
| 460 | 460 | /** |
| 461 | - * Gets all the spotter information |
|
| 462 | - * |
|
| 463 | - * @return Array the spotter information |
|
| 464 | - * |
|
| 465 | - */ |
|
| 461 | + * Gets all the spotter information |
|
| 462 | + * |
|
| 463 | + * @return Array the spotter information |
|
| 464 | + * |
|
| 465 | + */ |
|
| 466 | 466 | public function searchSpotterData($q = '', $registration = '', $aircraft_icao = '', $aircraft_manufacturer = '', $highlights = '', $airline_icao = '', $airline_country = '', $airline_type = '', $airport = '', $airport_country = '', $callsign = '', $departure_airport_route = '', $arrival_airport_route = '', $owner = '',$pilot_id = '',$pilot_name = '',$altitude = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '',$filters = array()) |
| 467 | 467 | { |
| 468 | 468 | global $globalTimezone, $globalDBdriver; |
@@ -809,11 +809,11 @@ discard block |
||
| 809 | 809 | |
| 810 | 810 | |
| 811 | 811 | /** |
| 812 | - * Gets all the spotter information based on the latest data entry |
|
| 813 | - * |
|
| 814 | - * @return Array the spotter information |
|
| 815 | - * |
|
| 816 | - */ |
|
| 812 | + * Gets all the spotter information based on the latest data entry |
|
| 813 | + * |
|
| 814 | + * @return Array the spotter information |
|
| 815 | + * |
|
| 816 | + */ |
|
| 817 | 817 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
| 818 | 818 | { |
| 819 | 819 | global $global_query; |
@@ -852,12 +852,12 @@ discard block |
||
| 852 | 852 | } |
| 853 | 853 | |
| 854 | 854 | |
| 855 | - /** |
|
| 856 | - * Gets all the spotter information based on a user's latitude and longitude |
|
| 857 | - * |
|
| 858 | - * @return Array the spotter information |
|
| 859 | - * |
|
| 860 | - */ |
|
| 855 | + /** |
|
| 856 | + * Gets all the spotter information based on a user's latitude and longitude |
|
| 857 | + * |
|
| 858 | + * @return Array the spotter information |
|
| 859 | + * |
|
| 860 | + */ |
|
| 861 | 861 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
| 862 | 862 | { |
| 863 | 863 | date_default_timezone_set('UTC'); |
@@ -885,7 +885,7 @@ discard block |
||
| 885 | 885 | return false; |
| 886 | 886 | } |
| 887 | 887 | } |
| 888 | - $additional_query = ''; |
|
| 888 | + $additional_query = ''; |
|
| 889 | 889 | if ($interval != "") |
| 890 | 890 | { |
| 891 | 891 | if (!is_string($interval)) |
@@ -925,12 +925,12 @@ discard block |
||
| 925 | 925 | } |
| 926 | 926 | |
| 927 | 927 | |
| 928 | - /** |
|
| 929 | - * Gets all the spotter information sorted by the newest aircraft type |
|
| 930 | - * |
|
| 931 | - * @return Array the spotter information |
|
| 932 | - * |
|
| 933 | - */ |
|
| 928 | + /** |
|
| 929 | + * Gets all the spotter information sorted by the newest aircraft type |
|
| 930 | + * |
|
| 931 | + * @return Array the spotter information |
|
| 932 | + * |
|
| 933 | + */ |
|
| 934 | 934 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
| 935 | 935 | { |
| 936 | 936 | global $global_query; |
@@ -971,11 +971,11 @@ discard block |
||
| 971 | 971 | |
| 972 | 972 | |
| 973 | 973 | /** |
| 974 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
| 975 | - * |
|
| 976 | - * @return Array the spotter information |
|
| 977 | - * |
|
| 978 | - */ |
|
| 974 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
| 975 | + * |
|
| 976 | + * @return Array the spotter information |
|
| 977 | + * |
|
| 978 | + */ |
|
| 979 | 979 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
| 980 | 980 | { |
| 981 | 981 | global $global_query; |
@@ -1015,11 +1015,11 @@ discard block |
||
| 1015 | 1015 | |
| 1016 | 1016 | |
| 1017 | 1017 | /** |
| 1018 | - * Gets all the spotter information sorted by the newest airline |
|
| 1019 | - * |
|
| 1020 | - * @return Array the spotter information |
|
| 1021 | - * |
|
| 1022 | - */ |
|
| 1018 | + * Gets all the spotter information sorted by the newest airline |
|
| 1019 | + * |
|
| 1020 | + * @return Array the spotter information |
|
| 1021 | + * |
|
| 1022 | + */ |
|
| 1023 | 1023 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
| 1024 | 1024 | { |
| 1025 | 1025 | global $global_query; |
@@ -1058,12 +1058,12 @@ discard block |
||
| 1058 | 1058 | } |
| 1059 | 1059 | |
| 1060 | 1060 | |
| 1061 | - /** |
|
| 1062 | - * Gets all the spotter information sorted by the newest departure airport |
|
| 1063 | - * |
|
| 1064 | - * @return Array the spotter information |
|
| 1065 | - * |
|
| 1066 | - */ |
|
| 1061 | + /** |
|
| 1062 | + * Gets all the spotter information sorted by the newest departure airport |
|
| 1063 | + * |
|
| 1064 | + * @return Array the spotter information |
|
| 1065 | + * |
|
| 1066 | + */ |
|
| 1067 | 1067 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
| 1068 | 1068 | { |
| 1069 | 1069 | global $global_query; |
@@ -1105,11 +1105,11 @@ discard block |
||
| 1105 | 1105 | |
| 1106 | 1106 | |
| 1107 | 1107 | /** |
| 1108 | - * Gets all the spotter information sorted by the newest arrival airport |
|
| 1109 | - * |
|
| 1110 | - * @return Array the spotter information |
|
| 1111 | - * |
|
| 1112 | - */ |
|
| 1108 | + * Gets all the spotter information sorted by the newest arrival airport |
|
| 1109 | + * |
|
| 1110 | + * @return Array the spotter information |
|
| 1111 | + * |
|
| 1112 | + */ |
|
| 1113 | 1113 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
| 1114 | 1114 | { |
| 1115 | 1115 | global $global_query; |
@@ -1148,11 +1148,11 @@ discard block |
||
| 1148 | 1148 | |
| 1149 | 1149 | |
| 1150 | 1150 | /** |
| 1151 | - * Gets all the spotter information based on the spotter id |
|
| 1152 | - * |
|
| 1153 | - * @return Array the spotter information |
|
| 1154 | - * |
|
| 1155 | - */ |
|
| 1151 | + * Gets all the spotter information based on the spotter id |
|
| 1152 | + * |
|
| 1153 | + * @return Array the spotter information |
|
| 1154 | + * |
|
| 1155 | + */ |
|
| 1156 | 1156 | public function getSpotterDataByID($id = '') |
| 1157 | 1157 | { |
| 1158 | 1158 | global $global_query; |
@@ -1174,11 +1174,11 @@ discard block |
||
| 1174 | 1174 | |
| 1175 | 1175 | |
| 1176 | 1176 | /** |
| 1177 | - * Gets all the spotter information based on the callsign |
|
| 1178 | - * |
|
| 1179 | - * @return Array the spotter information |
|
| 1180 | - * |
|
| 1181 | - */ |
|
| 1177 | + * Gets all the spotter information based on the callsign |
|
| 1178 | + * |
|
| 1179 | + * @return Array the spotter information |
|
| 1180 | + * |
|
| 1181 | + */ |
|
| 1182 | 1182 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '') |
| 1183 | 1183 | { |
| 1184 | 1184 | global $global_query; |
@@ -1231,11 +1231,11 @@ discard block |
||
| 1231 | 1231 | |
| 1232 | 1232 | |
| 1233 | 1233 | /** |
| 1234 | - * Gets all the spotter information based on the aircraft type |
|
| 1235 | - * |
|
| 1236 | - * @return Array the spotter information |
|
| 1237 | - * |
|
| 1238 | - */ |
|
| 1234 | + * Gets all the spotter information based on the aircraft type |
|
| 1235 | + * |
|
| 1236 | + * @return Array the spotter information |
|
| 1237 | + * |
|
| 1238 | + */ |
|
| 1239 | 1239 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
| 1240 | 1240 | { |
| 1241 | 1241 | global $global_query; |
@@ -1289,11 +1289,11 @@ discard block |
||
| 1289 | 1289 | |
| 1290 | 1290 | |
| 1291 | 1291 | /** |
| 1292 | - * Gets all the spotter information based on the aircraft registration |
|
| 1293 | - * |
|
| 1294 | - * @return Array the spotter information |
|
| 1295 | - * |
|
| 1296 | - */ |
|
| 1292 | + * Gets all the spotter information based on the aircraft registration |
|
| 1293 | + * |
|
| 1294 | + * @return Array the spotter information |
|
| 1295 | + * |
|
| 1296 | + */ |
|
| 1297 | 1297 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
| 1298 | 1298 | { |
| 1299 | 1299 | global $global_query; |
@@ -1350,11 +1350,11 @@ discard block |
||
| 1350 | 1350 | |
| 1351 | 1351 | |
| 1352 | 1352 | /** |
| 1353 | - * Gets all the spotter information based on the airline |
|
| 1354 | - * |
|
| 1355 | - * @return Array the spotter information |
|
| 1356 | - * |
|
| 1357 | - */ |
|
| 1353 | + * Gets all the spotter information based on the airline |
|
| 1354 | + * |
|
| 1355 | + * @return Array the spotter information |
|
| 1356 | + * |
|
| 1357 | + */ |
|
| 1358 | 1358 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
| 1359 | 1359 | { |
| 1360 | 1360 | global $global_query; |
@@ -1407,11 +1407,11 @@ discard block |
||
| 1407 | 1407 | |
| 1408 | 1408 | |
| 1409 | 1409 | /** |
| 1410 | - * Gets all the spotter information based on the airport |
|
| 1411 | - * |
|
| 1412 | - * @return Array the spotter information |
|
| 1413 | - * |
|
| 1414 | - */ |
|
| 1410 | + * Gets all the spotter information based on the airport |
|
| 1411 | + * |
|
| 1412 | + * @return Array the spotter information |
|
| 1413 | + * |
|
| 1414 | + */ |
|
| 1415 | 1415 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
| 1416 | 1416 | { |
| 1417 | 1417 | global $global_query; |
@@ -1465,11 +1465,11 @@ discard block |
||
| 1465 | 1465 | |
| 1466 | 1466 | |
| 1467 | 1467 | /** |
| 1468 | - * Gets all the spotter information based on the date |
|
| 1469 | - * |
|
| 1470 | - * @return Array the spotter information |
|
| 1471 | - * |
|
| 1472 | - */ |
|
| 1468 | + * Gets all the spotter information based on the date |
|
| 1469 | + * |
|
| 1470 | + * @return Array the spotter information |
|
| 1471 | + * |
|
| 1472 | + */ |
|
| 1473 | 1473 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
| 1474 | 1474 | { |
| 1475 | 1475 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1533,11 +1533,11 @@ discard block |
||
| 1533 | 1533 | |
| 1534 | 1534 | |
| 1535 | 1535 | /** |
| 1536 | - * Gets all the spotter information based on the country name |
|
| 1537 | - * |
|
| 1538 | - * @return Array the spotter information |
|
| 1539 | - * |
|
| 1540 | - */ |
|
| 1536 | + * Gets all the spotter information based on the country name |
|
| 1537 | + * |
|
| 1538 | + * @return Array the spotter information |
|
| 1539 | + * |
|
| 1540 | + */ |
|
| 1541 | 1541 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
| 1542 | 1542 | { |
| 1543 | 1543 | global $global_query; |
@@ -1591,11 +1591,11 @@ discard block |
||
| 1591 | 1591 | |
| 1592 | 1592 | |
| 1593 | 1593 | /** |
| 1594 | - * Gets all the spotter information based on the manufacturer name |
|
| 1595 | - * |
|
| 1596 | - * @return Array the spotter information |
|
| 1597 | - * |
|
| 1598 | - */ |
|
| 1594 | + * Gets all the spotter information based on the manufacturer name |
|
| 1595 | + * |
|
| 1596 | + * @return Array the spotter information |
|
| 1597 | + * |
|
| 1598 | + */ |
|
| 1599 | 1599 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
| 1600 | 1600 | { |
| 1601 | 1601 | global $global_query; |
@@ -1651,13 +1651,13 @@ discard block |
||
| 1651 | 1651 | |
| 1652 | 1652 | |
| 1653 | 1653 | /** |
| 1654 | - * Gets a list of all aircraft that take a route |
|
| 1655 | - * |
|
| 1656 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1657 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1658 | - * @return Array the spotter information |
|
| 1659 | - * |
|
| 1660 | - */ |
|
| 1654 | + * Gets a list of all aircraft that take a route |
|
| 1655 | + * |
|
| 1656 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1657 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1658 | + * @return Array the spotter information |
|
| 1659 | + * |
|
| 1660 | + */ |
|
| 1661 | 1661 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
| 1662 | 1662 | { |
| 1663 | 1663 | global $global_query; |
@@ -1726,11 +1726,11 @@ discard block |
||
| 1726 | 1726 | |
| 1727 | 1727 | |
| 1728 | 1728 | /** |
| 1729 | - * Gets all the spotter information based on the special column in the table |
|
| 1730 | - * |
|
| 1731 | - * @return Array the spotter information |
|
| 1732 | - * |
|
| 1733 | - */ |
|
| 1729 | + * Gets all the spotter information based on the special column in the table |
|
| 1730 | + * |
|
| 1731 | + * @return Array the spotter information |
|
| 1732 | + * |
|
| 1733 | + */ |
|
| 1734 | 1734 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
| 1735 | 1735 | { |
| 1736 | 1736 | global $global_query; |
@@ -1769,11 +1769,11 @@ discard block |
||
| 1769 | 1769 | } |
| 1770 | 1770 | |
| 1771 | 1771 | /** |
| 1772 | - * Gets all the highlight based on a aircraft registration |
|
| 1773 | - * |
|
| 1774 | - * @return String the highlight text |
|
| 1775 | - * |
|
| 1776 | - */ |
|
| 1772 | + * Gets all the highlight based on a aircraft registration |
|
| 1773 | + * |
|
| 1774 | + * @return String the highlight text |
|
| 1775 | + * |
|
| 1776 | + */ |
|
| 1777 | 1777 | public function getHighlightByRegistration($registration,$filter = array()) |
| 1778 | 1778 | { |
| 1779 | 1779 | global $global_query; |
@@ -1795,13 +1795,13 @@ discard block |
||
| 1795 | 1795 | |
| 1796 | 1796 | |
| 1797 | 1797 | /** |
| 1798 | - * Gets the squawk usage from squawk code |
|
| 1799 | - * |
|
| 1800 | - * @param String $squawk squawk code |
|
| 1801 | - * @param String $country country |
|
| 1802 | - * @return String usage |
|
| 1803 | - * |
|
| 1804 | - */ |
|
| 1798 | + * Gets the squawk usage from squawk code |
|
| 1799 | + * |
|
| 1800 | + * @param String $squawk squawk code |
|
| 1801 | + * @param String $country country |
|
| 1802 | + * @return String usage |
|
| 1803 | + * |
|
| 1804 | + */ |
|
| 1805 | 1805 | public function getSquawkUsage($squawk = '',$country = 'FR') |
| 1806 | 1806 | { |
| 1807 | 1807 | |
@@ -1822,12 +1822,12 @@ discard block |
||
| 1822 | 1822 | } |
| 1823 | 1823 | |
| 1824 | 1824 | /** |
| 1825 | - * Gets the airport icao from the iata |
|
| 1826 | - * |
|
| 1827 | - * @param String $airport_iata the iata code of the airport |
|
| 1828 | - * @return String airport iata |
|
| 1829 | - * |
|
| 1830 | - */ |
|
| 1825 | + * Gets the airport icao from the iata |
|
| 1826 | + * |
|
| 1827 | + * @param String $airport_iata the iata code of the airport |
|
| 1828 | + * @return String airport iata |
|
| 1829 | + * |
|
| 1830 | + */ |
|
| 1831 | 1831 | public function getAirportIcao($airport_iata = '') |
| 1832 | 1832 | { |
| 1833 | 1833 | |
@@ -1847,14 +1847,14 @@ discard block |
||
| 1847 | 1847 | } |
| 1848 | 1848 | |
| 1849 | 1849 | /** |
| 1850 | - * Gets the airport distance |
|
| 1851 | - * |
|
| 1852 | - * @param String $airport_icao the icao code of the airport |
|
| 1853 | - * @param Float $latitude the latitude |
|
| 1854 | - * @param Float $longitude the longitude |
|
| 1855 | - * @return Float distance to the airport |
|
| 1856 | - * |
|
| 1857 | - */ |
|
| 1850 | + * Gets the airport distance |
|
| 1851 | + * |
|
| 1852 | + * @param String $airport_icao the icao code of the airport |
|
| 1853 | + * @param Float $latitude the latitude |
|
| 1854 | + * @param Float $longitude the longitude |
|
| 1855 | + * @return Float distance to the airport |
|
| 1856 | + * |
|
| 1857 | + */ |
|
| 1858 | 1858 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
| 1859 | 1859 | { |
| 1860 | 1860 | |
@@ -1875,12 +1875,12 @@ discard block |
||
| 1875 | 1875 | } |
| 1876 | 1876 | |
| 1877 | 1877 | /** |
| 1878 | - * Gets the airport info based on the icao |
|
| 1879 | - * |
|
| 1880 | - * @param String $airport the icao code of the airport |
|
| 1881 | - * @return Array airport information |
|
| 1882 | - * |
|
| 1883 | - */ |
|
| 1878 | + * Gets the airport info based on the icao |
|
| 1879 | + * |
|
| 1880 | + * @param String $airport the icao code of the airport |
|
| 1881 | + * @return Array airport information |
|
| 1882 | + * |
|
| 1883 | + */ |
|
| 1884 | 1884 | public function getAllAirportInfo($airport = '') |
| 1885 | 1885 | { |
| 1886 | 1886 | |
@@ -1926,12 +1926,12 @@ discard block |
||
| 1926 | 1926 | } |
| 1927 | 1927 | |
| 1928 | 1928 | /** |
| 1929 | - * Gets the airport info based on the country |
|
| 1930 | - * |
|
| 1931 | - * @param Array $countries Airports countries |
|
| 1932 | - * @return Array airport information |
|
| 1933 | - * |
|
| 1934 | - */ |
|
| 1929 | + * Gets the airport info based on the country |
|
| 1930 | + * |
|
| 1931 | + * @param Array $countries Airports countries |
|
| 1932 | + * @return Array airport information |
|
| 1933 | + * |
|
| 1934 | + */ |
|
| 1935 | 1935 | public function getAllAirportInfobyCountry($countries) |
| 1936 | 1936 | { |
| 1937 | 1937 | $lst_countries = ''; |
@@ -1969,12 +1969,12 @@ discard block |
||
| 1969 | 1969 | } |
| 1970 | 1970 | |
| 1971 | 1971 | /** |
| 1972 | - * Gets airports info based on the coord |
|
| 1973 | - * |
|
| 1974 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 1975 | - * @return Array airport information |
|
| 1976 | - * |
|
| 1977 | - */ |
|
| 1972 | + * Gets airports info based on the coord |
|
| 1973 | + * |
|
| 1974 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 1975 | + * @return Array airport information |
|
| 1976 | + * |
|
| 1977 | + */ |
|
| 1978 | 1978 | public function getAllAirportInfobyCoord($coord) |
| 1979 | 1979 | { |
| 1980 | 1980 | global $globalDBdriver; |
@@ -2005,12 +2005,12 @@ discard block |
||
| 2005 | 2005 | } |
| 2006 | 2006 | |
| 2007 | 2007 | /** |
| 2008 | - * Gets waypoints info based on the coord |
|
| 2009 | - * |
|
| 2010 | - * @param Array $coord waypoints coord |
|
| 2011 | - * @return Array airport information |
|
| 2012 | - * |
|
| 2013 | - */ |
|
| 2008 | + * Gets waypoints info based on the coord |
|
| 2009 | + * |
|
| 2010 | + * @param Array $coord waypoints coord |
|
| 2011 | + * @return Array airport information |
|
| 2012 | + * |
|
| 2013 | + */ |
|
| 2014 | 2014 | public function getAllWaypointsInfobyCoord($coord) |
| 2015 | 2015 | { |
| 2016 | 2016 | if (is_array($coord)) { |
@@ -2044,12 +2044,12 @@ discard block |
||
| 2044 | 2044 | |
| 2045 | 2045 | |
| 2046 | 2046 | /** |
| 2047 | - * Gets the airline info based on the icao code or iata code |
|
| 2048 | - * |
|
| 2049 | - * @param String $airline_icao the iata code of the airport |
|
| 2050 | - * @return Array airport information |
|
| 2051 | - * |
|
| 2052 | - */ |
|
| 2047 | + * Gets the airline info based on the icao code or iata code |
|
| 2048 | + * |
|
| 2049 | + * @param String $airline_icao the iata code of the airport |
|
| 2050 | + * @return Array airport information |
|
| 2051 | + * |
|
| 2052 | + */ |
|
| 2053 | 2053 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
| 2054 | 2054 | { |
| 2055 | 2055 | global $globalUseRealAirlines; |
@@ -2080,7 +2080,7 @@ discard block |
||
| 2080 | 2080 | } else { |
| 2081 | 2081 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
| 2082 | 2082 | } |
| 2083 | - /* |
|
| 2083 | + /* |
|
| 2084 | 2084 | $airline_array = array(); |
| 2085 | 2085 | $temp_array = array(); |
| 2086 | 2086 | |
@@ -2110,12 +2110,12 @@ discard block |
||
| 2110 | 2110 | } |
| 2111 | 2111 | |
| 2112 | 2112 | /** |
| 2113 | - * Gets the airline info based on the airline name |
|
| 2114 | - * |
|
| 2115 | - * @param String $airline_name the name of the airline |
|
| 2116 | - * @return Array airline information |
|
| 2117 | - * |
|
| 2118 | - */ |
|
| 2113 | + * Gets the airline info based on the airline name |
|
| 2114 | + * |
|
| 2115 | + * @param String $airline_name the name of the airline |
|
| 2116 | + * @return Array airline information |
|
| 2117 | + * |
|
| 2118 | + */ |
|
| 2119 | 2119 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
| 2120 | 2120 | { |
| 2121 | 2121 | global $globalUseRealAirlines; |
@@ -2143,12 +2143,12 @@ discard block |
||
| 2143 | 2143 | |
| 2144 | 2144 | |
| 2145 | 2145 | /** |
| 2146 | - * Gets the aircraft info based on the aircraft type |
|
| 2147 | - * |
|
| 2148 | - * @param String $aircraft_type the aircraft type |
|
| 2149 | - * @return Array aircraft information |
|
| 2150 | - * |
|
| 2151 | - */ |
|
| 2146 | + * Gets the aircraft info based on the aircraft type |
|
| 2147 | + * |
|
| 2148 | + * @param String $aircraft_type the aircraft type |
|
| 2149 | + * @return Array aircraft information |
|
| 2150 | + * |
|
| 2151 | + */ |
|
| 2152 | 2152 | public function getAllAircraftInfo($aircraft_type) |
| 2153 | 2153 | { |
| 2154 | 2154 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2180,12 +2180,12 @@ discard block |
||
| 2180 | 2180 | } |
| 2181 | 2181 | |
| 2182 | 2182 | /** |
| 2183 | - * Gets the aircraft icao based on the aircraft name/type |
|
| 2184 | - * |
|
| 2185 | - * @param String $aircraft_type the aircraft type |
|
| 2186 | - * @return String aircraft information |
|
| 2187 | - * |
|
| 2188 | - */ |
|
| 2183 | + * Gets the aircraft icao based on the aircraft name/type |
|
| 2184 | + * |
|
| 2185 | + * @param String $aircraft_type the aircraft type |
|
| 2186 | + * @return String aircraft information |
|
| 2187 | + * |
|
| 2188 | + */ |
|
| 2189 | 2189 | public function getAircraftIcao($aircraft_type) |
| 2190 | 2190 | { |
| 2191 | 2191 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2210,12 +2210,12 @@ discard block |
||
| 2210 | 2210 | } |
| 2211 | 2211 | |
| 2212 | 2212 | /** |
| 2213 | - * Gets the aircraft info based on the aircraft modes |
|
| 2214 | - * |
|
| 2215 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2216 | - * @return String aircraft type |
|
| 2217 | - * |
|
| 2218 | - */ |
|
| 2213 | + * Gets the aircraft info based on the aircraft modes |
|
| 2214 | + * |
|
| 2215 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2216 | + * @return String aircraft type |
|
| 2217 | + * |
|
| 2218 | + */ |
|
| 2219 | 2219 | public function getAllAircraftType($aircraft_modes) |
| 2220 | 2220 | { |
| 2221 | 2221 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2233,12 +2233,12 @@ discard block |
||
| 2233 | 2233 | } |
| 2234 | 2234 | |
| 2235 | 2235 | /** |
| 2236 | - * Gets the aircraft info based on the aircraft registration |
|
| 2237 | - * |
|
| 2238 | - * @param String $registration the aircraft registration |
|
| 2239 | - * @return String aircraft type |
|
| 2240 | - * |
|
| 2241 | - */ |
|
| 2236 | + * Gets the aircraft info based on the aircraft registration |
|
| 2237 | + * |
|
| 2238 | + * @param String $registration the aircraft registration |
|
| 2239 | + * @return String aircraft type |
|
| 2240 | + * |
|
| 2241 | + */ |
|
| 2242 | 2242 | public function getAllAircraftTypeByRegistration($registration) |
| 2243 | 2243 | { |
| 2244 | 2244 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2256,12 +2256,12 @@ discard block |
||
| 2256 | 2256 | } |
| 2257 | 2257 | |
| 2258 | 2258 | /** |
| 2259 | - * Gets correct aircraft operator corde |
|
| 2260 | - * |
|
| 2261 | - * @param String $operator the aircraft operator code (callsign) |
|
| 2262 | - * @return String aircraft operator code |
|
| 2263 | - * |
|
| 2264 | - */ |
|
| 2259 | + * Gets correct aircraft operator corde |
|
| 2260 | + * |
|
| 2261 | + * @param String $operator the aircraft operator code (callsign) |
|
| 2262 | + * @return String aircraft operator code |
|
| 2263 | + * |
|
| 2264 | + */ |
|
| 2265 | 2265 | public function getOperator($operator) |
| 2266 | 2266 | { |
| 2267 | 2267 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2278,16 +2278,16 @@ discard block |
||
| 2278 | 2278 | } |
| 2279 | 2279 | |
| 2280 | 2280 | /** |
| 2281 | - * Gets the aircraft route based on the aircraft callsign |
|
| 2282 | - * |
|
| 2283 | - * @param String $callsign the aircraft callsign |
|
| 2284 | - * @return Array aircraft type |
|
| 2285 | - * |
|
| 2286 | - */ |
|
| 2281 | + * Gets the aircraft route based on the aircraft callsign |
|
| 2282 | + * |
|
| 2283 | + * @param String $callsign the aircraft callsign |
|
| 2284 | + * @return Array aircraft type |
|
| 2285 | + * |
|
| 2286 | + */ |
|
| 2287 | 2287 | public function getRouteInfo($callsign) |
| 2288 | 2288 | { |
| 2289 | 2289 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
| 2290 | - if ($callsign == '') return array(); |
|
| 2290 | + if ($callsign == '') return array(); |
|
| 2291 | 2291 | $query = "SELECT routes.Operator_ICAO, routes.FromAirport_ICAO, routes.ToAirport_ICAO, routes.RouteStop, routes.FromAirport_Time, routes.ToAirport_Time FROM routes WHERE CallSign = :callsign LIMIT 1"; |
| 2292 | 2292 | |
| 2293 | 2293 | $sth = $this->db->prepare($query); |
@@ -2301,12 +2301,12 @@ discard block |
||
| 2301 | 2301 | } |
| 2302 | 2302 | |
| 2303 | 2303 | /** |
| 2304 | - * Gets the aircraft info based on the aircraft registration |
|
| 2305 | - * |
|
| 2306 | - * @param String $registration the aircraft registration |
|
| 2307 | - * @return Array aircraft information |
|
| 2308 | - * |
|
| 2309 | - */ |
|
| 2304 | + * Gets the aircraft info based on the aircraft registration |
|
| 2305 | + * |
|
| 2306 | + * @param String $registration the aircraft registration |
|
| 2307 | + * @return Array aircraft information |
|
| 2308 | + * |
|
| 2309 | + */ |
|
| 2310 | 2310 | public function getAircraftInfoByRegistration($registration) |
| 2311 | 2311 | { |
| 2312 | 2312 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2333,12 +2333,12 @@ discard block |
||
| 2333 | 2333 | } |
| 2334 | 2334 | |
| 2335 | 2335 | /** |
| 2336 | - * Gets the aircraft owner & base based on the aircraft registration |
|
| 2337 | - * |
|
| 2338 | - * @param String $registration the aircraft registration |
|
| 2339 | - * @return Array aircraft information |
|
| 2340 | - * |
|
| 2341 | - */ |
|
| 2336 | + * Gets the aircraft owner & base based on the aircraft registration |
|
| 2337 | + * |
|
| 2338 | + * @param String $registration the aircraft registration |
|
| 2339 | + * @return Array aircraft information |
|
| 2340 | + * |
|
| 2341 | + */ |
|
| 2342 | 2342 | public function getAircraftOwnerByRegistration($registration) |
| 2343 | 2343 | { |
| 2344 | 2344 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2355,11 +2355,11 @@ discard block |
||
| 2355 | 2355 | |
| 2356 | 2356 | |
| 2357 | 2357 | /** |
| 2358 | - * Gets all flights (but with only little info) |
|
| 2359 | - * |
|
| 2360 | - * @return Array basic flight information |
|
| 2361 | - * |
|
| 2362 | - */ |
|
| 2358 | + * Gets all flights (but with only little info) |
|
| 2359 | + * |
|
| 2360 | + * @return Array basic flight information |
|
| 2361 | + * |
|
| 2362 | + */ |
|
| 2363 | 2363 | public function getAllFlightsforSitemap() |
| 2364 | 2364 | { |
| 2365 | 2365 | //$query = "SELECT spotter_output.spotter_id, spotter_output.ident, spotter_output.airline_name, spotter_output.aircraft_name, spotter_output.aircraft_icao FROM spotter_output ORDER BY LIMIT "; |
@@ -2367,7 +2367,7 @@ discard block |
||
| 2367 | 2367 | |
| 2368 | 2368 | $sth = $this->db->prepare($query); |
| 2369 | 2369 | $sth->execute(); |
| 2370 | - /* |
|
| 2370 | + /* |
|
| 2371 | 2371 | $flight_array = array(); |
| 2372 | 2372 | $temp_array = array(); |
| 2373 | 2373 | |
@@ -2389,11 +2389,11 @@ discard block |
||
| 2389 | 2389 | } |
| 2390 | 2390 | |
| 2391 | 2391 | /** |
| 2392 | - * Gets a list of all aircraft manufacturers |
|
| 2393 | - * |
|
| 2394 | - * @return Array list of aircraft types |
|
| 2395 | - * |
|
| 2396 | - */ |
|
| 2392 | + * Gets a list of all aircraft manufacturers |
|
| 2393 | + * |
|
| 2394 | + * @return Array list of aircraft types |
|
| 2395 | + * |
|
| 2396 | + */ |
|
| 2397 | 2397 | public function getAllManufacturers() |
| 2398 | 2398 | { |
| 2399 | 2399 | /* |
@@ -2422,11 +2422,11 @@ discard block |
||
| 2422 | 2422 | |
| 2423 | 2423 | |
| 2424 | 2424 | /** |
| 2425 | - * Gets a list of all aircraft types |
|
| 2426 | - * |
|
| 2427 | - * @return Array list of aircraft types |
|
| 2428 | - * |
|
| 2429 | - */ |
|
| 2425 | + * Gets a list of all aircraft types |
|
| 2426 | + * |
|
| 2427 | + * @return Array list of aircraft types |
|
| 2428 | + * |
|
| 2429 | + */ |
|
| 2430 | 2430 | public function getAllAircraftTypes($filters = array()) |
| 2431 | 2431 | { |
| 2432 | 2432 | /* |
@@ -2461,11 +2461,11 @@ discard block |
||
| 2461 | 2461 | |
| 2462 | 2462 | |
| 2463 | 2463 | /** |
| 2464 | - * Gets a list of all aircraft registrations |
|
| 2465 | - * |
|
| 2466 | - * @return Array list of aircraft registrations |
|
| 2467 | - * |
|
| 2468 | - */ |
|
| 2464 | + * Gets a list of all aircraft registrations |
|
| 2465 | + * |
|
| 2466 | + * @return Array list of aircraft registrations |
|
| 2467 | + * |
|
| 2468 | + */ |
|
| 2469 | 2469 | public function getAllAircraftRegistrations($filters = array()) |
| 2470 | 2470 | { |
| 2471 | 2471 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2490,12 +2490,12 @@ discard block |
||
| 2490 | 2490 | } |
| 2491 | 2491 | |
| 2492 | 2492 | /** |
| 2493 | - * Gets all source name |
|
| 2494 | - * |
|
| 2495 | - * @param String type format of source |
|
| 2496 | - * @return Array list of source name |
|
| 2497 | - * |
|
| 2498 | - */ |
|
| 2493 | + * Gets all source name |
|
| 2494 | + * |
|
| 2495 | + * @param String type format of source |
|
| 2496 | + * @return Array list of source name |
|
| 2497 | + * |
|
| 2498 | + */ |
|
| 2499 | 2499 | public function getAllSourceName($type = '',$filters = array()) |
| 2500 | 2500 | { |
| 2501 | 2501 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2526,11 +2526,11 @@ discard block |
||
| 2526 | 2526 | |
| 2527 | 2527 | |
| 2528 | 2528 | /** |
| 2529 | - * Gets a list of all airline names |
|
| 2530 | - * |
|
| 2531 | - * @return Array list of airline names |
|
| 2532 | - * |
|
| 2533 | - */ |
|
| 2529 | + * Gets a list of all airline names |
|
| 2530 | + * |
|
| 2531 | + * @return Array list of airline names |
|
| 2532 | + * |
|
| 2533 | + */ |
|
| 2534 | 2534 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
| 2535 | 2535 | { |
| 2536 | 2536 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2579,11 +2579,11 @@ discard block |
||
| 2579 | 2579 | } |
| 2580 | 2580 | |
| 2581 | 2581 | /** |
| 2582 | - * Gets a list of all alliance names |
|
| 2583 | - * |
|
| 2584 | - * @return Array list of alliance names |
|
| 2585 | - * |
|
| 2586 | - */ |
|
| 2582 | + * Gets a list of all alliance names |
|
| 2583 | + * |
|
| 2584 | + * @return Array list of alliance names |
|
| 2585 | + * |
|
| 2586 | + */ |
|
| 2587 | 2587 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
| 2588 | 2588 | { |
| 2589 | 2589 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2608,11 +2608,11 @@ discard block |
||
| 2608 | 2608 | } |
| 2609 | 2609 | |
| 2610 | 2610 | /** |
| 2611 | - * Gets a list of all airline countries |
|
| 2612 | - * |
|
| 2613 | - * @return Array list of airline countries |
|
| 2614 | - * |
|
| 2615 | - */ |
|
| 2611 | + * Gets a list of all airline countries |
|
| 2612 | + * |
|
| 2613 | + * @return Array list of airline countries |
|
| 2614 | + * |
|
| 2615 | + */ |
|
| 2616 | 2616 | public function getAllAirlineCountries($filters = array()) |
| 2617 | 2617 | { |
| 2618 | 2618 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2640,11 +2640,11 @@ discard block |
||
| 2640 | 2640 | |
| 2641 | 2641 | |
| 2642 | 2642 | /** |
| 2643 | - * Gets a list of all departure & arrival names |
|
| 2644 | - * |
|
| 2645 | - * @return Array list of airport names |
|
| 2646 | - * |
|
| 2647 | - */ |
|
| 2643 | + * Gets a list of all departure & arrival names |
|
| 2644 | + * |
|
| 2645 | + * @return Array list of airport names |
|
| 2646 | + * |
|
| 2647 | + */ |
|
| 2648 | 2648 | public function getAllAirportNames($filters = array()) |
| 2649 | 2649 | { |
| 2650 | 2650 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2693,11 +2693,11 @@ discard block |
||
| 2693 | 2693 | |
| 2694 | 2694 | |
| 2695 | 2695 | /** |
| 2696 | - * Gets a list of all departure & arrival airport countries |
|
| 2697 | - * |
|
| 2698 | - * @return Array list of airport countries |
|
| 2699 | - * |
|
| 2700 | - */ |
|
| 2696 | + * Gets a list of all departure & arrival airport countries |
|
| 2697 | + * |
|
| 2698 | + * @return Array list of airport countries |
|
| 2699 | + * |
|
| 2700 | + */ |
|
| 2701 | 2701 | public function getAllAirportCountries($filters = array()) |
| 2702 | 2702 | { |
| 2703 | 2703 | $airport_array = array(); |
@@ -2745,11 +2745,11 @@ discard block |
||
| 2745 | 2745 | |
| 2746 | 2746 | |
| 2747 | 2747 | /** |
| 2748 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2749 | - * |
|
| 2750 | - * @return Array list of countries |
|
| 2751 | - * |
|
| 2752 | - */ |
|
| 2748 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2749 | + * |
|
| 2750 | + * @return Array list of countries |
|
| 2751 | + * |
|
| 2752 | + */ |
|
| 2753 | 2753 | public function getAllCountries($filters = array()) |
| 2754 | 2754 | { |
| 2755 | 2755 | $Connection= new Connection($this->db); |
@@ -2826,11 +2826,11 @@ discard block |
||
| 2826 | 2826 | |
| 2827 | 2827 | |
| 2828 | 2828 | /** |
| 2829 | - * Gets a list of all idents/callsigns |
|
| 2830 | - * |
|
| 2831 | - * @return Array list of ident/callsign names |
|
| 2832 | - * |
|
| 2833 | - */ |
|
| 2829 | + * Gets a list of all idents/callsigns |
|
| 2830 | + * |
|
| 2831 | + * @return Array list of ident/callsign names |
|
| 2832 | + * |
|
| 2833 | + */ |
|
| 2834 | 2834 | public function getAllIdents($filters = array()) |
| 2835 | 2835 | { |
| 2836 | 2836 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2854,9 +2854,9 @@ discard block |
||
| 2854 | 2854 | } |
| 2855 | 2855 | |
| 2856 | 2856 | /** |
| 2857 | - * Get a list of flights from airport since 7 days |
|
| 2858 | - * @return Array number, icao, name and city of airports |
|
| 2859 | - */ |
|
| 2857 | + * Get a list of flights from airport since 7 days |
|
| 2858 | + * @return Array number, icao, name and city of airports |
|
| 2859 | + */ |
|
| 2860 | 2860 | |
| 2861 | 2861 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
| 2862 | 2862 | global $globalTimezone, $globalDBdriver; |
@@ -2887,9 +2887,9 @@ discard block |
||
| 2887 | 2887 | } |
| 2888 | 2888 | |
| 2889 | 2889 | /** |
| 2890 | - * Get a list of flights from airport since 7 days |
|
| 2891 | - * @return Array number, icao, name and city of airports |
|
| 2892 | - */ |
|
| 2890 | + * Get a list of flights from airport since 7 days |
|
| 2891 | + * @return Array number, icao, name and city of airports |
|
| 2892 | + */ |
|
| 2893 | 2893 | |
| 2894 | 2894 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
| 2895 | 2895 | global $globalTimezone, $globalDBdriver; |
@@ -2919,9 +2919,9 @@ discard block |
||
| 2919 | 2919 | } |
| 2920 | 2920 | |
| 2921 | 2921 | /** |
| 2922 | - * Get a list of flights from detected airport since 7 days |
|
| 2923 | - * @return Array number, icao, name and city of airports |
|
| 2924 | - */ |
|
| 2922 | + * Get a list of flights from detected airport since 7 days |
|
| 2923 | + * @return Array number, icao, name and city of airports |
|
| 2924 | + */ |
|
| 2925 | 2925 | |
| 2926 | 2926 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
| 2927 | 2927 | global $globalTimezone, $globalDBdriver; |
@@ -2959,9 +2959,9 @@ discard block |
||
| 2959 | 2959 | } |
| 2960 | 2960 | |
| 2961 | 2961 | /** |
| 2962 | - * Get a list of flights from detected airport since 7 days |
|
| 2963 | - * @return Array number, icao, name and city of airports |
|
| 2964 | - */ |
|
| 2962 | + * Get a list of flights from detected airport since 7 days |
|
| 2963 | + * @return Array number, icao, name and city of airports |
|
| 2964 | + */ |
|
| 2965 | 2965 | |
| 2966 | 2966 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
| 2967 | 2967 | global $globalTimezone, $globalDBdriver; |
@@ -3003,9 +3003,9 @@ discard block |
||
| 3003 | 3003 | |
| 3004 | 3004 | |
| 3005 | 3005 | /** |
| 3006 | - * Get a list of flights to airport since 7 days |
|
| 3007 | - * @return Array number, icao, name and city of airports |
|
| 3008 | - */ |
|
| 3006 | + * Get a list of flights to airport since 7 days |
|
| 3007 | + * @return Array number, icao, name and city of airports |
|
| 3008 | + */ |
|
| 3009 | 3009 | |
| 3010 | 3010 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
| 3011 | 3011 | global $globalTimezone, $globalDBdriver; |
@@ -3038,9 +3038,9 @@ discard block |
||
| 3038 | 3038 | |
| 3039 | 3039 | |
| 3040 | 3040 | /** |
| 3041 | - * Get a list of flights detected to airport since 7 days |
|
| 3042 | - * @return Array number, icao, name and city of airports |
|
| 3043 | - */ |
|
| 3041 | + * Get a list of flights detected to airport since 7 days |
|
| 3042 | + * @return Array number, icao, name and city of airports |
|
| 3043 | + */ |
|
| 3044 | 3044 | |
| 3045 | 3045 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
| 3046 | 3046 | global $globalTimezone, $globalDBdriver; |
@@ -3081,9 +3081,9 @@ discard block |
||
| 3081 | 3081 | |
| 3082 | 3082 | |
| 3083 | 3083 | /** |
| 3084 | - * Get a list of flights to airport since 7 days |
|
| 3085 | - * @return Array number, icao, name and city of airports |
|
| 3086 | - */ |
|
| 3084 | + * Get a list of flights to airport since 7 days |
|
| 3085 | + * @return Array number, icao, name and city of airports |
|
| 3086 | + */ |
|
| 3087 | 3087 | |
| 3088 | 3088 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
| 3089 | 3089 | global $globalTimezone, $globalDBdriver; |
@@ -3115,9 +3115,9 @@ discard block |
||
| 3115 | 3115 | |
| 3116 | 3116 | |
| 3117 | 3117 | /** |
| 3118 | - * Get a list of flights detected to airport since 7 days |
|
| 3119 | - * @return Array number, icao, name and city of airports |
|
| 3120 | - */ |
|
| 3118 | + * Get a list of flights detected to airport since 7 days |
|
| 3119 | + * @return Array number, icao, name and city of airports |
|
| 3120 | + */ |
|
| 3121 | 3121 | |
| 3122 | 3122 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
| 3123 | 3123 | global $globalTimezone, $globalDBdriver; |
@@ -3161,11 +3161,11 @@ discard block |
||
| 3161 | 3161 | |
| 3162 | 3162 | |
| 3163 | 3163 | /** |
| 3164 | - * Gets a list of all dates |
|
| 3165 | - * |
|
| 3166 | - * @return Array list of date names |
|
| 3167 | - * |
|
| 3168 | - */ |
|
| 3164 | + * Gets a list of all dates |
|
| 3165 | + * |
|
| 3166 | + * @return Array list of date names |
|
| 3167 | + * |
|
| 3168 | + */ |
|
| 3169 | 3169 | public function getAllDates() |
| 3170 | 3170 | { |
| 3171 | 3171 | global $globalTimezone, $globalDBdriver; |
@@ -3206,11 +3206,11 @@ discard block |
||
| 3206 | 3206 | |
| 3207 | 3207 | |
| 3208 | 3208 | /** |
| 3209 | - * Gets all route combinations |
|
| 3210 | - * |
|
| 3211 | - * @return Array the route list |
|
| 3212 | - * |
|
| 3213 | - */ |
|
| 3209 | + * Gets all route combinations |
|
| 3210 | + * |
|
| 3211 | + * @return Array the route list |
|
| 3212 | + * |
|
| 3213 | + */ |
|
| 3214 | 3214 | public function getAllRoutes() |
| 3215 | 3215 | { |
| 3216 | 3216 | $query = "SELECT DISTINCT concat(spotter_output.departure_airport_icao, ' - ', spotter_output.arrival_airport_icao) AS route, spotter_output.departure_airport_icao, spotter_output.arrival_airport_icao |
@@ -3236,13 +3236,13 @@ discard block |
||
| 3236 | 3236 | } |
| 3237 | 3237 | |
| 3238 | 3238 | /** |
| 3239 | - * Update ident spotter data |
|
| 3240 | - * |
|
| 3241 | - * @param String $flightaware_id the ID from flightaware |
|
| 3242 | - * @param String $ident the flight ident |
|
| 3243 | - * @return String success or false |
|
| 3244 | - * |
|
| 3245 | - */ |
|
| 3239 | + * Update ident spotter data |
|
| 3240 | + * |
|
| 3241 | + * @param String $flightaware_id the ID from flightaware |
|
| 3242 | + * @param String $ident the flight ident |
|
| 3243 | + * @return String success or false |
|
| 3244 | + * |
|
| 3245 | + */ |
|
| 3246 | 3246 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
| 3247 | 3247 | { |
| 3248 | 3248 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3263,14 +3263,14 @@ discard block |
||
| 3263 | 3263 | } else { |
| 3264 | 3264 | $airline_array = $this->getAllAirlineInfo("NA"); |
| 3265 | 3265 | } |
| 3266 | - $airline_name = $airline_array[0]['name']; |
|
| 3267 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3268 | - $airline_country = $airline_array[0]['country']; |
|
| 3269 | - $airline_type = $airline_array[0]['type']; |
|
| 3266 | + $airline_name = $airline_array[0]['name']; |
|
| 3267 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3268 | + $airline_country = $airline_array[0]['country']; |
|
| 3269 | + $airline_type = $airline_array[0]['type']; |
|
| 3270 | 3270 | |
| 3271 | 3271 | |
| 3272 | 3272 | $query = 'UPDATE spotter_output SET ident = :ident, airline_name = :airline_name, airline_icao = :airline_icao, airline_country = :airline_country, airline_type = :airline_type WHERE flightaware_id = :flightaware_id'; |
| 3273 | - $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type); |
|
| 3273 | + $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type); |
|
| 3274 | 3274 | |
| 3275 | 3275 | try { |
| 3276 | 3276 | $sth = $this->db->prepare($query); |
@@ -3283,19 +3283,19 @@ discard block |
||
| 3283 | 3283 | |
| 3284 | 3284 | } |
| 3285 | 3285 | /** |
| 3286 | - * Update latest spotter data |
|
| 3287 | - * |
|
| 3288 | - * @param String $flightaware_id the ID from flightaware |
|
| 3289 | - * @param String $ident the flight ident |
|
| 3290 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3291 | - * @return String success or false |
|
| 3292 | - * |
|
| 3293 | - */ |
|
| 3286 | + * Update latest spotter data |
|
| 3287 | + * |
|
| 3288 | + * @param String $flightaware_id the ID from flightaware |
|
| 3289 | + * @param String $ident the flight ident |
|
| 3290 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3291 | + * @return String success or false |
|
| 3292 | + * |
|
| 3293 | + */ |
|
| 3294 | 3294 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
| 3295 | 3295 | { |
| 3296 | 3296 | if ($groundspeed == '') $groundspeed = NULL; |
| 3297 | 3297 | $query = 'UPDATE spotter_output SET ident = :ident, last_latitude = :last_latitude, last_longitude = :last_longitude, last_altitude = :last_altitude, last_ground = :last_ground, last_seen = :last_seen, real_arrival_airport_icao = :real_arrival_airport_icao, real_arrival_airport_time = :real_arrival_airport_time, last_ground_speed = :last_ground_speed WHERE flightaware_id = :flightaware_id'; |
| 3298 | - $query_values = array(':flightaware_id' => $flightaware_id,':real_arrival_airport_icao' => $arrival_airport_icao,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':real_arrival_airport_time' => $arrival_airport_time, ':last_ground' => $ground, ':ident' => $ident); |
|
| 3298 | + $query_values = array(':flightaware_id' => $flightaware_id,':real_arrival_airport_icao' => $arrival_airport_icao,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':real_arrival_airport_time' => $arrival_airport_time, ':last_ground' => $ground, ':ident' => $ident); |
|
| 3299 | 3299 | |
| 3300 | 3300 | try { |
| 3301 | 3301 | $sth = $this->db->prepare($query); |
@@ -3309,32 +3309,32 @@ discard block |
||
| 3309 | 3309 | } |
| 3310 | 3310 | |
| 3311 | 3311 | /** |
| 3312 | - * Adds a new spotter data |
|
| 3313 | - * |
|
| 3314 | - * @param String $flightaware_id the ID from flightaware |
|
| 3315 | - * @param String $ident the flight ident |
|
| 3316 | - * @param String $aircraft_icao the aircraft type |
|
| 3317 | - * @param String $departure_airport_icao the departure airport |
|
| 3318 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3319 | - * @param String $latitude latitude of flight |
|
| 3320 | - * @param String $longitude latitude of flight |
|
| 3321 | - * @param String $waypoints waypoints of flight |
|
| 3322 | - * @param String $altitude altitude of flight |
|
| 3323 | - * @param String $heading heading of flight |
|
| 3324 | - * @param String $groundspeed speed of flight |
|
| 3325 | - * @param String $date date of flight |
|
| 3326 | - * @param String $departure_airport_time departure time of flight |
|
| 3327 | - * @param String $arrival_airport_time arrival time of flight |
|
| 3328 | - * @param String $squawk squawk code of flight |
|
| 3329 | - * @param String $route_stop route stop of flight |
|
| 3330 | - * @param String $highlight highlight or not |
|
| 3331 | - * @param String $ModeS ModesS code of flight |
|
| 3332 | - * @param String $registration registration code of flight |
|
| 3333 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3334 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3335 | - * @param String $verticalrate vertival rate of flight |
|
| 3336 | - * @return String success or false |
|
| 3337 | - */ |
|
| 3312 | + * Adds a new spotter data |
|
| 3313 | + * |
|
| 3314 | + * @param String $flightaware_id the ID from flightaware |
|
| 3315 | + * @param String $ident the flight ident |
|
| 3316 | + * @param String $aircraft_icao the aircraft type |
|
| 3317 | + * @param String $departure_airport_icao the departure airport |
|
| 3318 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3319 | + * @param String $latitude latitude of flight |
|
| 3320 | + * @param String $longitude latitude of flight |
|
| 3321 | + * @param String $waypoints waypoints of flight |
|
| 3322 | + * @param String $altitude altitude of flight |
|
| 3323 | + * @param String $heading heading of flight |
|
| 3324 | + * @param String $groundspeed speed of flight |
|
| 3325 | + * @param String $date date of flight |
|
| 3326 | + * @param String $departure_airport_time departure time of flight |
|
| 3327 | + * @param String $arrival_airport_time arrival time of flight |
|
| 3328 | + * @param String $squawk squawk code of flight |
|
| 3329 | + * @param String $route_stop route stop of flight |
|
| 3330 | + * @param String $highlight highlight or not |
|
| 3331 | + * @param String $ModeS ModesS code of flight |
|
| 3332 | + * @param String $registration registration code of flight |
|
| 3333 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3334 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3335 | + * @param String $verticalrate vertival rate of flight |
|
| 3336 | + * @return String success or false |
|
| 3337 | + */ |
|
| 3338 | 3338 | public function addSpotterData($flightaware_id = '', $ident = '', $aircraft_icao = '', $departure_airport_icao = '', $arrival_airport_icao = '', $latitude = '', $longitude = '', $waypoints = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $departure_airport_time = '', $arrival_airport_time = '',$squawk = '', $route_stop = '', $highlight = '', $ModeS = '', $registration = '',$pilot_id = '', $pilot_name = '', $verticalrate = '', $ground = false,$format_source = '', $source_name = '') |
| 3339 | 3339 | { |
| 3340 | 3340 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3549,8 +3549,8 @@ discard block |
||
| 3549 | 3549 | |
| 3550 | 3550 | if ($globalIVAO && $aircraft_icao != '') |
| 3551 | 3551 | { |
| 3552 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3553 | - else $airline_icao = ''; |
|
| 3552 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3553 | + else $airline_icao = ''; |
|
| 3554 | 3554 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
| 3555 | 3555 | if (!isset($image_array[0]['registration'])) |
| 3556 | 3556 | { |
@@ -3581,53 +3581,53 @@ discard block |
||
| 3581 | 3581 | |
| 3582 | 3582 | if (count($airline_array) == 0) |
| 3583 | 3583 | { |
| 3584 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3585 | - } |
|
| 3586 | - if (count($aircraft_array) == 0) |
|
| 3587 | - { |
|
| 3588 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3589 | - } |
|
| 3590 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3591 | - { |
|
| 3592 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3593 | - } |
|
| 3594 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3595 | - { |
|
| 3596 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3597 | - } |
|
| 3598 | - if ($registration == '') $registration = 'NA'; |
|
| 3599 | - if ($latitude == '' && $longitude == '') { |
|
| 3600 | - $latitude = 0; |
|
| 3601 | - $longitude = 0; |
|
| 3602 | - } |
|
| 3603 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3604 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3605 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3606 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3607 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3608 | - $query = "INSERT INTO spotter_output (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, latitude, longitude, waypoints, altitude, heading, ground_speed, date, departure_airport_time, arrival_airport_time, squawk, route_stop,highlight,ModeS, pilot_id, pilot_name, verticalrate, owner_name, ground, format_source, source_name) |
|
| 3584 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3585 | + } |
|
| 3586 | + if (count($aircraft_array) == 0) |
|
| 3587 | + { |
|
| 3588 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3589 | + } |
|
| 3590 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3591 | + { |
|
| 3592 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3593 | + } |
|
| 3594 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3595 | + { |
|
| 3596 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3597 | + } |
|
| 3598 | + if ($registration == '') $registration = 'NA'; |
|
| 3599 | + if ($latitude == '' && $longitude == '') { |
|
| 3600 | + $latitude = 0; |
|
| 3601 | + $longitude = 0; |
|
| 3602 | + } |
|
| 3603 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3604 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3605 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3606 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3607 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3608 | + $query = "INSERT INTO spotter_output (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, latitude, longitude, waypoints, altitude, heading, ground_speed, date, departure_airport_time, arrival_airport_time, squawk, route_stop,highlight,ModeS, pilot_id, pilot_name, verticalrate, owner_name, ground, format_source, source_name) |
|
| 3609 | 3609 | VALUES (:flightaware_id,:ident,:registration,:airline_name,:airline_icao,:airline_country,:airline_type,:aircraft_icao,:aircraft_type,:aircraft_manufacturer,:departure_airport_icao,:departure_airport_name,:departure_airport_city,:departure_airport_country, :arrival_airport_icao, :arrival_airport_name, :arrival_airport_city, :arrival_airport_country, :latitude,:longitude,:waypoints,:altitude,:heading,:groundspeed,:date, :departure_airport_time, :arrival_airport_time, :squawk, :route_stop, :highlight, :ModeS, :pilot_id, :pilot_name, :verticalrate, :owner_name,:ground, :format_source, :source_name)"; |
| 3610 | 3610 | |
| 3611 | - $airline_name = $airline_array[0]['name']; |
|
| 3612 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3613 | - $airline_country = $airline_array[0]['country']; |
|
| 3614 | - $airline_type = $airline_array[0]['type']; |
|
| 3611 | + $airline_name = $airline_array[0]['name']; |
|
| 3612 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3613 | + $airline_country = $airline_array[0]['country']; |
|
| 3614 | + $airline_type = $airline_array[0]['type']; |
|
| 3615 | 3615 | if ($airline_type == '') { |
| 3616 | 3616 | $timeelapsed = microtime(true); |
| 3617 | 3617 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
| 3618 | 3618 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
| 3619 | 3619 | } |
| 3620 | 3620 | if ($airline_type == null) $airline_type = ''; |
| 3621 | - $aircraft_type = $aircraft_array[0]['type']; |
|
| 3622 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3623 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3624 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3625 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3621 | + $aircraft_type = $aircraft_array[0]['type']; |
|
| 3622 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3623 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3624 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3625 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3626 | 3626 | |
| 3627 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3628 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3629 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3630 | - $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident, ':registration' => $registration,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type,':aircraft_icao' => $aircraft_icao,':aircraft_type' => $aircraft_type,':aircraft_manufacturer' => $aircraft_manufacturer,':departure_airport_icao' => $departure_airport_icao,':departure_airport_name' => $departure_airport_name,':departure_airport_city' => $departure_airport_city,':departure_airport_country' => $departure_airport_country,':arrival_airport_icao' => $arrival_airport_icao,':arrival_airport_name' => $arrival_airport_name,':arrival_airport_city' => $arrival_airport_city,':arrival_airport_country' => $arrival_airport_country,':latitude' => $latitude,':longitude' => $longitude, ':waypoints' => $waypoints,':altitude' => $altitude,':heading' => $heading,':groundspeed' => $groundspeed,':date' => $date,':departure_airport_time' => $departure_airport_time,':arrival_airport_time' => $arrival_airport_time, ':squawk' => $squawk, ':route_stop' => $route_stop, ':highlight' => $highlight, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':owner_name' => $aircraft_owner, ':format_source' => $format_source, ':ground' => $ground, ':source_name' => $source_name); |
|
| 3627 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3628 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3629 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3630 | + $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident, ':registration' => $registration,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type,':aircraft_icao' => $aircraft_icao,':aircraft_type' => $aircraft_type,':aircraft_manufacturer' => $aircraft_manufacturer,':departure_airport_icao' => $departure_airport_icao,':departure_airport_name' => $departure_airport_name,':departure_airport_city' => $departure_airport_city,':departure_airport_country' => $departure_airport_country,':arrival_airport_icao' => $arrival_airport_icao,':arrival_airport_name' => $arrival_airport_name,':arrival_airport_city' => $arrival_airport_city,':arrival_airport_country' => $arrival_airport_country,':latitude' => $latitude,':longitude' => $longitude, ':waypoints' => $waypoints,':altitude' => $altitude,':heading' => $heading,':groundspeed' => $groundspeed,':date' => $date,':departure_airport_time' => $departure_airport_time,':arrival_airport_time' => $arrival_airport_time, ':squawk' => $squawk, ':route_stop' => $route_stop, ':highlight' => $highlight, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':owner_name' => $aircraft_owner, ':format_source' => $format_source, ':ground' => $ground, ':source_name' => $source_name); |
|
| 3631 | 3631 | |
| 3632 | 3632 | try { |
| 3633 | 3633 | |
@@ -3635,7 +3635,7 @@ discard block |
||
| 3635 | 3635 | $sth->execute($query_values); |
| 3636 | 3636 | $this->db = null; |
| 3637 | 3637 | } catch (PDOException $e) { |
| 3638 | - return "error : ".$e->getMessage(); |
|
| 3638 | + return "error : ".$e->getMessage(); |
|
| 3639 | 3639 | } |
| 3640 | 3640 | |
| 3641 | 3641 | return "success"; |
@@ -3644,11 +3644,11 @@ discard block |
||
| 3644 | 3644 | |
| 3645 | 3645 | |
| 3646 | 3646 | /** |
| 3647 | - * Gets the aircraft ident within the last hour |
|
| 3648 | - * |
|
| 3649 | - * @return String the ident |
|
| 3650 | - * |
|
| 3651 | - */ |
|
| 3647 | + * Gets the aircraft ident within the last hour |
|
| 3648 | + * |
|
| 3649 | + * @return String the ident |
|
| 3650 | + * |
|
| 3651 | + */ |
|
| 3652 | 3652 | public function getIdentFromLastHour($ident) |
| 3653 | 3653 | { |
| 3654 | 3654 | global $globalDBdriver, $globalTimezone; |
@@ -3664,11 +3664,11 @@ discard block |
||
| 3664 | 3664 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
| 3665 | 3665 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
| 3666 | 3666 | $query_data = array(':ident' => $ident); |
| 3667 | - } |
|
| 3667 | + } |
|
| 3668 | 3668 | |
| 3669 | 3669 | $sth = $this->db->prepare($query); |
| 3670 | 3670 | $sth->execute($query_data); |
| 3671 | - $ident_result=''; |
|
| 3671 | + $ident_result=''; |
|
| 3672 | 3672 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 3673 | 3673 | { |
| 3674 | 3674 | $ident_result = $row['ident']; |
@@ -3679,11 +3679,11 @@ discard block |
||
| 3679 | 3679 | |
| 3680 | 3680 | |
| 3681 | 3681 | /** |
| 3682 | - * Gets the aircraft data from the last 20 seconds |
|
| 3683 | - * |
|
| 3684 | - * @return Array the spotter data |
|
| 3685 | - * |
|
| 3686 | - */ |
|
| 3682 | + * Gets the aircraft data from the last 20 seconds |
|
| 3683 | + * |
|
| 3684 | + * @return Array the spotter data |
|
| 3685 | + * |
|
| 3686 | + */ |
|
| 3687 | 3687 | public function getRealTimeData($q = '') |
| 3688 | 3688 | { |
| 3689 | 3689 | global $globalDBdriver; |
@@ -3727,11 +3727,11 @@ discard block |
||
| 3727 | 3727 | |
| 3728 | 3728 | |
| 3729 | 3729 | /** |
| 3730 | - * Gets all airlines that have flown over |
|
| 3731 | - * |
|
| 3732 | - * @return Array the airline list |
|
| 3733 | - * |
|
| 3734 | - */ |
|
| 3730 | + * Gets all airlines that have flown over |
|
| 3731 | + * |
|
| 3732 | + * @return Array the airline list |
|
| 3733 | + * |
|
| 3734 | + */ |
|
| 3735 | 3735 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3736 | 3736 | { |
| 3737 | 3737 | global $globalDBdriver; |
@@ -3745,7 +3745,7 @@ discard block |
||
| 3745 | 3745 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3746 | 3746 | } |
| 3747 | 3747 | } |
| 3748 | - if ($sincedate != '') { |
|
| 3748 | + if ($sincedate != '') { |
|
| 3749 | 3749 | if ($globalDBdriver == 'mysql') { |
| 3750 | 3750 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3751 | 3751 | } else { |
@@ -3772,26 +3772,26 @@ discard block |
||
| 3772 | 3772 | } |
| 3773 | 3773 | |
| 3774 | 3774 | /** |
| 3775 | - * Gets all pilots that have flown over |
|
| 3776 | - * |
|
| 3777 | - * @return Array the pilots list |
|
| 3778 | - * |
|
| 3779 | - */ |
|
| 3775 | + * Gets all pilots that have flown over |
|
| 3776 | + * |
|
| 3777 | + * @return Array the pilots list |
|
| 3778 | + * |
|
| 3779 | + */ |
|
| 3780 | 3780 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3781 | 3781 | { |
| 3782 | 3782 | global $globalDBdriver; |
| 3783 | 3783 | $filter_query = $this->getFilter($filters,true,true); |
| 3784 | 3784 | $query = "SELECT DISTINCT spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
| 3785 | 3785 | FROM spotter_output".$filter_query." spotter_output.pilot_id <> '' "; |
| 3786 | - if ($olderthanmonths > 0) { |
|
| 3787 | - if ($globalDBdriver == 'mysql') { |
|
| 3786 | + if ($olderthanmonths > 0) { |
|
| 3787 | + if ($globalDBdriver == 'mysql') { |
|
| 3788 | 3788 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3789 | 3789 | } else { |
| 3790 | 3790 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3791 | 3791 | } |
| 3792 | 3792 | } |
| 3793 | - if ($sincedate != '') { |
|
| 3794 | - if ($globalDBdriver == 'mysql') { |
|
| 3793 | + if ($sincedate != '') { |
|
| 3794 | + if ($globalDBdriver == 'mysql') { |
|
| 3795 | 3795 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3796 | 3796 | } else { |
| 3797 | 3797 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3819,25 +3819,25 @@ discard block |
||
| 3819 | 3819 | } |
| 3820 | 3820 | |
| 3821 | 3821 | /** |
| 3822 | - * Gets all pilots that have flown over |
|
| 3823 | - * |
|
| 3824 | - * @return Array the pilots list |
|
| 3825 | - * |
|
| 3826 | - */ |
|
| 3822 | + * Gets all pilots that have flown over |
|
| 3823 | + * |
|
| 3824 | + * @return Array the pilots list |
|
| 3825 | + * |
|
| 3826 | + */ |
|
| 3827 | 3827 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
| 3828 | 3828 | { |
| 3829 | 3829 | global $globalDBdriver; |
| 3830 | 3830 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
| 3831 | 3831 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
| 3832 | - if ($olderthanmonths > 0) { |
|
| 3833 | - if ($globalDBdriver == 'mysql') { |
|
| 3832 | + if ($olderthanmonths > 0) { |
|
| 3833 | + if ($globalDBdriver == 'mysql') { |
|
| 3834 | 3834 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3835 | 3835 | } else { |
| 3836 | 3836 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3837 | 3837 | } |
| 3838 | 3838 | } |
| 3839 | - if ($sincedate != '') { |
|
| 3840 | - if ($globalDBdriver == 'mysql') { |
|
| 3839 | + if ($sincedate != '') { |
|
| 3840 | + if ($globalDBdriver == 'mysql') { |
|
| 3841 | 3841 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3842 | 3842 | } else { |
| 3843 | 3843 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3866,26 +3866,26 @@ discard block |
||
| 3866 | 3866 | } |
| 3867 | 3867 | |
| 3868 | 3868 | /** |
| 3869 | - * Gets all owner that have flown over |
|
| 3870 | - * |
|
| 3871 | - * @return Array the pilots list |
|
| 3872 | - * |
|
| 3873 | - */ |
|
| 3869 | + * Gets all owner that have flown over |
|
| 3870 | + * |
|
| 3871 | + * @return Array the pilots list |
|
| 3872 | + * |
|
| 3873 | + */ |
|
| 3874 | 3874 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3875 | 3875 | { |
| 3876 | 3876 | global $globalDBdriver; |
| 3877 | 3877 | $filter_query = $this->getFilter($filters,true,true); |
| 3878 | 3878 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 3879 | 3879 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
| 3880 | - if ($olderthanmonths > 0) { |
|
| 3881 | - if ($globalDBdriver == 'mysql') { |
|
| 3880 | + if ($olderthanmonths > 0) { |
|
| 3881 | + if ($globalDBdriver == 'mysql') { |
|
| 3882 | 3882 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3883 | 3883 | } else { |
| 3884 | 3884 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3885 | 3885 | } |
| 3886 | 3886 | } |
| 3887 | - if ($sincedate != '') { |
|
| 3888 | - if ($globalDBdriver == 'mysql') { |
|
| 3887 | + if ($sincedate != '') { |
|
| 3888 | + if ($globalDBdriver == 'mysql') { |
|
| 3889 | 3889 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3890 | 3890 | } else { |
| 3891 | 3891 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3911,26 +3911,26 @@ discard block |
||
| 3911 | 3911 | } |
| 3912 | 3912 | |
| 3913 | 3913 | /** |
| 3914 | - * Gets all owner that have flown over |
|
| 3915 | - * |
|
| 3916 | - * @return Array the pilots list |
|
| 3917 | - * |
|
| 3918 | - */ |
|
| 3914 | + * Gets all owner that have flown over |
|
| 3915 | + * |
|
| 3916 | + * @return Array the pilots list |
|
| 3917 | + * |
|
| 3918 | + */ |
|
| 3919 | 3919 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3920 | 3920 | { |
| 3921 | 3921 | global $globalDBdriver; |
| 3922 | 3922 | $filter_query = $this->getFilter($filters,true,true); |
| 3923 | 3923 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 3924 | 3924 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
| 3925 | - if ($olderthanmonths > 0) { |
|
| 3926 | - if ($globalDBdriver == 'mysql') { |
|
| 3925 | + if ($olderthanmonths > 0) { |
|
| 3926 | + if ($globalDBdriver == 'mysql') { |
|
| 3927 | 3927 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3928 | 3928 | } else { |
| 3929 | 3929 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3930 | 3930 | } |
| 3931 | 3931 | } |
| 3932 | - if ($sincedate != '') { |
|
| 3933 | - if ($globalDBdriver == 'mysql') { |
|
| 3932 | + if ($sincedate != '') { |
|
| 3933 | + if ($globalDBdriver == 'mysql') { |
|
| 3934 | 3934 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3935 | 3935 | } else { |
| 3936 | 3936 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3957,11 +3957,11 @@ discard block |
||
| 3957 | 3957 | } |
| 3958 | 3958 | |
| 3959 | 3959 | /** |
| 3960 | - * Gets all airlines that have flown over by aircraft |
|
| 3961 | - * |
|
| 3962 | - * @return Array the airline list |
|
| 3963 | - * |
|
| 3964 | - */ |
|
| 3960 | + * Gets all airlines that have flown over by aircraft |
|
| 3961 | + * |
|
| 3962 | + * @return Array the airline list |
|
| 3963 | + * |
|
| 3964 | + */ |
|
| 3965 | 3965 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
| 3966 | 3966 | { |
| 3967 | 3967 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -3993,11 +3993,11 @@ discard block |
||
| 3993 | 3993 | |
| 3994 | 3994 | |
| 3995 | 3995 | /** |
| 3996 | - * Gets all airline countries that have flown over by aircraft |
|
| 3997 | - * |
|
| 3998 | - * @return Array the airline country list |
|
| 3999 | - * |
|
| 4000 | - */ |
|
| 3996 | + * Gets all airline countries that have flown over by aircraft |
|
| 3997 | + * |
|
| 3998 | + * @return Array the airline country list |
|
| 3999 | + * |
|
| 4000 | + */ |
|
| 4001 | 4001 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
| 4002 | 4002 | { |
| 4003 | 4003 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4029,11 +4029,11 @@ discard block |
||
| 4029 | 4029 | |
| 4030 | 4030 | |
| 4031 | 4031 | /** |
| 4032 | - * Gets all airlines that have flown over by airport |
|
| 4033 | - * |
|
| 4034 | - * @return Array the airline list |
|
| 4035 | - * |
|
| 4036 | - */ |
|
| 4032 | + * Gets all airlines that have flown over by airport |
|
| 4033 | + * |
|
| 4034 | + * @return Array the airline list |
|
| 4035 | + * |
|
| 4036 | + */ |
|
| 4037 | 4037 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
| 4038 | 4038 | { |
| 4039 | 4039 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4064,11 +4064,11 @@ discard block |
||
| 4064 | 4064 | |
| 4065 | 4065 | |
| 4066 | 4066 | /** |
| 4067 | - * Gets all airline countries that have flown over by airport icao |
|
| 4068 | - * |
|
| 4069 | - * @return Array the airline country list |
|
| 4070 | - * |
|
| 4071 | - */ |
|
| 4067 | + * Gets all airline countries that have flown over by airport icao |
|
| 4068 | + * |
|
| 4069 | + * @return Array the airline country list |
|
| 4070 | + * |
|
| 4071 | + */ |
|
| 4072 | 4072 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
| 4073 | 4073 | { |
| 4074 | 4074 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4098,11 +4098,11 @@ discard block |
||
| 4098 | 4098 | |
| 4099 | 4099 | |
| 4100 | 4100 | /** |
| 4101 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4102 | - * |
|
| 4103 | - * @return Array the airline list |
|
| 4104 | - * |
|
| 4105 | - */ |
|
| 4101 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4102 | + * |
|
| 4103 | + * @return Array the airline list |
|
| 4104 | + * |
|
| 4105 | + */ |
|
| 4106 | 4106 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4107 | 4107 | { |
| 4108 | 4108 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4133,11 +4133,11 @@ discard block |
||
| 4133 | 4133 | |
| 4134 | 4134 | |
| 4135 | 4135 | /** |
| 4136 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4137 | - * |
|
| 4138 | - * @return Array the airline country list |
|
| 4139 | - * |
|
| 4140 | - */ |
|
| 4136 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4137 | + * |
|
| 4138 | + * @return Array the airline country list |
|
| 4139 | + * |
|
| 4140 | + */ |
|
| 4141 | 4141 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4142 | 4142 | { |
| 4143 | 4143 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4166,11 +4166,11 @@ discard block |
||
| 4166 | 4166 | |
| 4167 | 4167 | |
| 4168 | 4168 | /** |
| 4169 | - * Gets all airlines that have flown over by date |
|
| 4170 | - * |
|
| 4171 | - * @return Array the airline list |
|
| 4172 | - * |
|
| 4173 | - */ |
|
| 4169 | + * Gets all airlines that have flown over by date |
|
| 4170 | + * |
|
| 4171 | + * @return Array the airline list |
|
| 4172 | + * |
|
| 4173 | + */ |
|
| 4174 | 4174 | public function countAllAirlinesByDate($date,$filters = array()) |
| 4175 | 4175 | { |
| 4176 | 4176 | global $globalTimezone, $globalDBdriver; |
@@ -4214,11 +4214,11 @@ discard block |
||
| 4214 | 4214 | |
| 4215 | 4215 | |
| 4216 | 4216 | /** |
| 4217 | - * Gets all airline countries that have flown over by date |
|
| 4218 | - * |
|
| 4219 | - * @return Array the airline country list |
|
| 4220 | - * |
|
| 4221 | - */ |
|
| 4217 | + * Gets all airline countries that have flown over by date |
|
| 4218 | + * |
|
| 4219 | + * @return Array the airline country list |
|
| 4220 | + * |
|
| 4221 | + */ |
|
| 4222 | 4222 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
| 4223 | 4223 | { |
| 4224 | 4224 | global $globalTimezone, $globalDBdriver; |
@@ -4261,11 +4261,11 @@ discard block |
||
| 4261 | 4261 | |
| 4262 | 4262 | |
| 4263 | 4263 | /** |
| 4264 | - * Gets all airlines that have flown over by ident/callsign |
|
| 4265 | - * |
|
| 4266 | - * @return Array the airline list |
|
| 4267 | - * |
|
| 4268 | - */ |
|
| 4264 | + * Gets all airlines that have flown over by ident/callsign |
|
| 4265 | + * |
|
| 4266 | + * @return Array the airline list |
|
| 4267 | + * |
|
| 4268 | + */ |
|
| 4269 | 4269 | public function countAllAirlinesByIdent($ident,$filters = array()) |
| 4270 | 4270 | { |
| 4271 | 4271 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4295,11 +4295,11 @@ discard block |
||
| 4295 | 4295 | } |
| 4296 | 4296 | |
| 4297 | 4297 | /** |
| 4298 | - * Gets all airlines that have flown over by route |
|
| 4299 | - * |
|
| 4300 | - * @return Array the airline list |
|
| 4301 | - * |
|
| 4302 | - */ |
|
| 4298 | + * Gets all airlines that have flown over by route |
|
| 4299 | + * |
|
| 4300 | + * @return Array the airline list |
|
| 4301 | + * |
|
| 4302 | + */ |
|
| 4303 | 4303 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 4304 | 4304 | { |
| 4305 | 4305 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4331,11 +4331,11 @@ discard block |
||
| 4331 | 4331 | } |
| 4332 | 4332 | |
| 4333 | 4333 | /** |
| 4334 | - * Gets all airline countries that have flown over by route |
|
| 4335 | - * |
|
| 4336 | - * @return Array the airline country list |
|
| 4337 | - * |
|
| 4338 | - */ |
|
| 4334 | + * Gets all airline countries that have flown over by route |
|
| 4335 | + * |
|
| 4336 | + * @return Array the airline country list |
|
| 4337 | + * |
|
| 4338 | + */ |
|
| 4339 | 4339 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
| 4340 | 4340 | { |
| 4341 | 4341 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4367,11 +4367,11 @@ discard block |
||
| 4367 | 4367 | |
| 4368 | 4368 | |
| 4369 | 4369 | /** |
| 4370 | - * Gets all airlines that have flown over by country |
|
| 4371 | - * |
|
| 4372 | - * @return Array the airline list |
|
| 4373 | - * |
|
| 4374 | - */ |
|
| 4370 | + * Gets all airlines that have flown over by country |
|
| 4371 | + * |
|
| 4372 | + * @return Array the airline list |
|
| 4373 | + * |
|
| 4374 | + */ |
|
| 4375 | 4375 | public function countAllAirlinesByCountry($country,$filters = array()) |
| 4376 | 4376 | { |
| 4377 | 4377 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4401,11 +4401,11 @@ discard block |
||
| 4401 | 4401 | |
| 4402 | 4402 | |
| 4403 | 4403 | /** |
| 4404 | - * Gets all airline countries that have flown over by country |
|
| 4405 | - * |
|
| 4406 | - * @return Array the airline country list |
|
| 4407 | - * |
|
| 4408 | - */ |
|
| 4404 | + * Gets all airline countries that have flown over by country |
|
| 4405 | + * |
|
| 4406 | + * @return Array the airline country list |
|
| 4407 | + * |
|
| 4408 | + */ |
|
| 4409 | 4409 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
| 4410 | 4410 | { |
| 4411 | 4411 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4434,11 +4434,11 @@ discard block |
||
| 4434 | 4434 | |
| 4435 | 4435 | |
| 4436 | 4436 | /** |
| 4437 | - * Gets all airlines countries |
|
| 4438 | - * |
|
| 4439 | - * @return Array the airline country list |
|
| 4440 | - * |
|
| 4441 | - */ |
|
| 4437 | + * Gets all airlines countries |
|
| 4438 | + * |
|
| 4439 | + * @return Array the airline country list |
|
| 4440 | + * |
|
| 4441 | + */ |
|
| 4442 | 4442 | public function countAllAirlineCountries($limit = true, $filters = array()) |
| 4443 | 4443 | { |
| 4444 | 4444 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4464,11 +4464,11 @@ discard block |
||
| 4464 | 4464 | } |
| 4465 | 4465 | |
| 4466 | 4466 | /** |
| 4467 | - * Gets all number of flight over countries |
|
| 4468 | - * |
|
| 4469 | - * @return Array the airline country list |
|
| 4470 | - * |
|
| 4471 | - */ |
|
| 4467 | + * Gets all number of flight over countries |
|
| 4468 | + * |
|
| 4469 | + * @return Array the airline country list |
|
| 4470 | + * |
|
| 4471 | + */ |
|
| 4472 | 4472 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4473 | 4473 | { |
| 4474 | 4474 | global $globalDBdriver; |
@@ -4490,15 +4490,15 @@ discard block |
||
| 4490 | 4490 | $SpotterLive = new SpotterLive(); |
| 4491 | 4491 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
| 4492 | 4492 | $filter_query .= ' over_country IS NOT NULL'; |
| 4493 | - if ($olderthanmonths > 0) { |
|
| 4493 | + if ($olderthanmonths > 0) { |
|
| 4494 | 4494 | if ($globalDBdriver == 'mysql') { |
| 4495 | 4495 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 4496 | 4496 | } else { |
| 4497 | 4497 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 4498 | 4498 | } |
| 4499 | 4499 | } |
| 4500 | - if ($sincedate != '') { |
|
| 4501 | - if ($globalDBdriver == 'mysql') { |
|
| 4500 | + if ($sincedate != '') { |
|
| 4501 | + if ($globalDBdriver == 'mysql') { |
|
| 4502 | 4502 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
| 4503 | 4503 | } else { |
| 4504 | 4504 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4528,11 +4528,11 @@ discard block |
||
| 4528 | 4528 | |
| 4529 | 4529 | |
| 4530 | 4530 | /** |
| 4531 | - * Gets all aircraft types that have flown over |
|
| 4532 | - * |
|
| 4533 | - * @return Array the aircraft list |
|
| 4534 | - * |
|
| 4535 | - */ |
|
| 4531 | + * Gets all aircraft types that have flown over |
|
| 4532 | + * |
|
| 4533 | + * @return Array the aircraft list |
|
| 4534 | + * |
|
| 4535 | + */ |
|
| 4536 | 4536 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4537 | 4537 | { |
| 4538 | 4538 | global $globalDBdriver; |
@@ -4575,11 +4575,11 @@ discard block |
||
| 4575 | 4575 | } |
| 4576 | 4576 | |
| 4577 | 4577 | /** |
| 4578 | - * Gets all aircraft types that have flown over by airline |
|
| 4579 | - * |
|
| 4580 | - * @return Array the aircraft list |
|
| 4581 | - * |
|
| 4582 | - */ |
|
| 4578 | + * Gets all aircraft types that have flown over by airline |
|
| 4579 | + * |
|
| 4580 | + * @return Array the aircraft list |
|
| 4581 | + * |
|
| 4582 | + */ |
|
| 4583 | 4583 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4584 | 4584 | { |
| 4585 | 4585 | global $globalDBdriver; |
@@ -4622,11 +4622,11 @@ discard block |
||
| 4622 | 4622 | } |
| 4623 | 4623 | |
| 4624 | 4624 | /** |
| 4625 | - * Gets all aircraft types that have flown over by months |
|
| 4626 | - * |
|
| 4627 | - * @return Array the aircraft list |
|
| 4628 | - * |
|
| 4629 | - */ |
|
| 4625 | + * Gets all aircraft types that have flown over by months |
|
| 4626 | + * |
|
| 4627 | + * @return Array the aircraft list |
|
| 4628 | + * |
|
| 4629 | + */ |
|
| 4630 | 4630 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4631 | 4631 | { |
| 4632 | 4632 | global $globalDBdriver; |
@@ -4670,11 +4670,11 @@ discard block |
||
| 4670 | 4670 | |
| 4671 | 4671 | |
| 4672 | 4672 | /** |
| 4673 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4674 | - * |
|
| 4675 | - * @return Array the aircraft list |
|
| 4676 | - * |
|
| 4677 | - */ |
|
| 4673 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4674 | + * |
|
| 4675 | + * @return Array the aircraft list |
|
| 4676 | + * |
|
| 4677 | + */ |
|
| 4678 | 4678 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
| 4679 | 4679 | { |
| 4680 | 4680 | $Image = new Image($this->db); |
@@ -4713,11 +4713,11 @@ discard block |
||
| 4713 | 4713 | |
| 4714 | 4714 | |
| 4715 | 4715 | /** |
| 4716 | - * Gets all aircraft types that have flown over by airline icao |
|
| 4717 | - * |
|
| 4718 | - * @return Array the aircraft list |
|
| 4719 | - * |
|
| 4720 | - */ |
|
| 4716 | + * Gets all aircraft types that have flown over by airline icao |
|
| 4717 | + * |
|
| 4718 | + * @return Array the aircraft list |
|
| 4719 | + * |
|
| 4720 | + */ |
|
| 4721 | 4721 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
| 4722 | 4722 | { |
| 4723 | 4723 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4746,11 +4746,11 @@ discard block |
||
| 4746 | 4746 | |
| 4747 | 4747 | |
| 4748 | 4748 | /** |
| 4749 | - * Gets all aircraft registration that have flown over by airline icao |
|
| 4750 | - * |
|
| 4751 | - * @return Array the aircraft list |
|
| 4752 | - * |
|
| 4753 | - */ |
|
| 4749 | + * Gets all aircraft registration that have flown over by airline icao |
|
| 4750 | + * |
|
| 4751 | + * @return Array the aircraft list |
|
| 4752 | + * |
|
| 4753 | + */ |
|
| 4754 | 4754 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
| 4755 | 4755 | { |
| 4756 | 4756 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4788,11 +4788,11 @@ discard block |
||
| 4788 | 4788 | |
| 4789 | 4789 | |
| 4790 | 4790 | /** |
| 4791 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 4792 | - * |
|
| 4793 | - * @return Array the aircraft list |
|
| 4794 | - * |
|
| 4795 | - */ |
|
| 4791 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 4792 | + * |
|
| 4793 | + * @return Array the aircraft list |
|
| 4794 | + * |
|
| 4795 | + */ |
|
| 4796 | 4796 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
| 4797 | 4797 | { |
| 4798 | 4798 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4820,11 +4820,11 @@ discard block |
||
| 4820 | 4820 | |
| 4821 | 4821 | |
| 4822 | 4822 | /** |
| 4823 | - * Gets all aircraft types that have flown over by airline icao |
|
| 4824 | - * |
|
| 4825 | - * @return Array the aircraft list |
|
| 4826 | - * |
|
| 4827 | - */ |
|
| 4823 | + * Gets all aircraft types that have flown over by airline icao |
|
| 4824 | + * |
|
| 4825 | + * @return Array the aircraft list |
|
| 4826 | + * |
|
| 4827 | + */ |
|
| 4828 | 4828 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
| 4829 | 4829 | { |
| 4830 | 4830 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4853,11 +4853,11 @@ discard block |
||
| 4853 | 4853 | |
| 4854 | 4854 | |
| 4855 | 4855 | /** |
| 4856 | - * Gets all aircraft registration that have flown over by airport icao |
|
| 4857 | - * |
|
| 4858 | - * @return Array the aircraft list |
|
| 4859 | - * |
|
| 4860 | - */ |
|
| 4856 | + * Gets all aircraft registration that have flown over by airport icao |
|
| 4857 | + * |
|
| 4858 | + * @return Array the aircraft list |
|
| 4859 | + * |
|
| 4860 | + */ |
|
| 4861 | 4861 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
| 4862 | 4862 | { |
| 4863 | 4863 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4894,11 +4894,11 @@ discard block |
||
| 4894 | 4894 | |
| 4895 | 4895 | |
| 4896 | 4896 | /** |
| 4897 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 4898 | - * |
|
| 4899 | - * @return Array the aircraft list |
|
| 4900 | - * |
|
| 4901 | - */ |
|
| 4897 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 4898 | + * |
|
| 4899 | + * @return Array the aircraft list |
|
| 4900 | + * |
|
| 4901 | + */ |
|
| 4902 | 4902 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
| 4903 | 4903 | { |
| 4904 | 4904 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4924,11 +4924,11 @@ discard block |
||
| 4924 | 4924 | } |
| 4925 | 4925 | |
| 4926 | 4926 | /** |
| 4927 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 4928 | - * |
|
| 4929 | - * @return Array the aircraft list |
|
| 4930 | - * |
|
| 4931 | - */ |
|
| 4927 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 4928 | + * |
|
| 4929 | + * @return Array the aircraft list |
|
| 4930 | + * |
|
| 4931 | + */ |
|
| 4932 | 4932 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4933 | 4933 | { |
| 4934 | 4934 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4955,11 +4955,11 @@ discard block |
||
| 4955 | 4955 | |
| 4956 | 4956 | |
| 4957 | 4957 | /** |
| 4958 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 4959 | - * |
|
| 4960 | - * @return Array the aircraft list |
|
| 4961 | - * |
|
| 4962 | - */ |
|
| 4958 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 4959 | + * |
|
| 4960 | + * @return Array the aircraft list |
|
| 4961 | + * |
|
| 4962 | + */ |
|
| 4963 | 4963 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
| 4964 | 4964 | { |
| 4965 | 4965 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4995,11 +4995,11 @@ discard block |
||
| 4995 | 4995 | } |
| 4996 | 4996 | |
| 4997 | 4997 | /** |
| 4998 | - * Gets all aircraft types that have flown over by date |
|
| 4999 | - * |
|
| 5000 | - * @return Array the aircraft list |
|
| 5001 | - * |
|
| 5002 | - */ |
|
| 4998 | + * Gets all aircraft types that have flown over by date |
|
| 4999 | + * |
|
| 5000 | + * @return Array the aircraft list |
|
| 5001 | + * |
|
| 5002 | + */ |
|
| 5003 | 5003 | public function countAllAircraftTypesByDate($date,$filters = array()) |
| 5004 | 5004 | { |
| 5005 | 5005 | global $globalTimezone, $globalDBdriver; |
@@ -5041,11 +5041,11 @@ discard block |
||
| 5041 | 5041 | |
| 5042 | 5042 | |
| 5043 | 5043 | /** |
| 5044 | - * Gets all aircraft registration that have flown over by date |
|
| 5045 | - * |
|
| 5046 | - * @return Array the aircraft list |
|
| 5047 | - * |
|
| 5048 | - */ |
|
| 5044 | + * Gets all aircraft registration that have flown over by date |
|
| 5045 | + * |
|
| 5046 | + * @return Array the aircraft list |
|
| 5047 | + * |
|
| 5048 | + */ |
|
| 5049 | 5049 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
| 5050 | 5050 | { |
| 5051 | 5051 | global $globalTimezone, $globalDBdriver; |
@@ -5096,11 +5096,11 @@ discard block |
||
| 5096 | 5096 | |
| 5097 | 5097 | |
| 5098 | 5098 | /** |
| 5099 | - * Gets all aircraft manufacturer that have flown over by date |
|
| 5100 | - * |
|
| 5101 | - * @return Array the aircraft manufacturer list |
|
| 5102 | - * |
|
| 5103 | - */ |
|
| 5099 | + * Gets all aircraft manufacturer that have flown over by date |
|
| 5100 | + * |
|
| 5101 | + * @return Array the aircraft manufacturer list |
|
| 5102 | + * |
|
| 5103 | + */ |
|
| 5104 | 5104 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
| 5105 | 5105 | { |
| 5106 | 5106 | global $globalTimezone, $globalDBdriver; |
@@ -5142,11 +5142,11 @@ discard block |
||
| 5142 | 5142 | |
| 5143 | 5143 | |
| 5144 | 5144 | /** |
| 5145 | - * Gets all aircraft types that have flown over by ident/callsign |
|
| 5146 | - * |
|
| 5147 | - * @return Array the aircraft list |
|
| 5148 | - * |
|
| 5149 | - */ |
|
| 5145 | + * Gets all aircraft types that have flown over by ident/callsign |
|
| 5146 | + * |
|
| 5147 | + * @return Array the aircraft list |
|
| 5148 | + * |
|
| 5149 | + */ |
|
| 5150 | 5150 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
| 5151 | 5151 | { |
| 5152 | 5152 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5175,11 +5175,11 @@ discard block |
||
| 5175 | 5175 | |
| 5176 | 5176 | |
| 5177 | 5177 | /** |
| 5178 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5179 | - * |
|
| 5180 | - * @return Array the aircraft list |
|
| 5181 | - * |
|
| 5182 | - */ |
|
| 5178 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5179 | + * |
|
| 5180 | + * @return Array the aircraft list |
|
| 5181 | + * |
|
| 5182 | + */ |
|
| 5183 | 5183 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
| 5184 | 5184 | { |
| 5185 | 5185 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5219,11 +5219,11 @@ discard block |
||
| 5219 | 5219 | |
| 5220 | 5220 | |
| 5221 | 5221 | /** |
| 5222 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5223 | - * |
|
| 5224 | - * @return Array the aircraft manufacturer list |
|
| 5225 | - * |
|
| 5226 | - */ |
|
| 5222 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5223 | + * |
|
| 5224 | + * @return Array the aircraft manufacturer list |
|
| 5225 | + * |
|
| 5226 | + */ |
|
| 5227 | 5227 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
| 5228 | 5228 | { |
| 5229 | 5229 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5249,11 +5249,11 @@ discard block |
||
| 5249 | 5249 | |
| 5250 | 5250 | |
| 5251 | 5251 | /** |
| 5252 | - * Gets all aircraft types that have flown over by route |
|
| 5253 | - * |
|
| 5254 | - * @return Array the aircraft list |
|
| 5255 | - * |
|
| 5256 | - */ |
|
| 5252 | + * Gets all aircraft types that have flown over by route |
|
| 5253 | + * |
|
| 5254 | + * @return Array the aircraft list |
|
| 5255 | + * |
|
| 5256 | + */ |
|
| 5257 | 5257 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5258 | 5258 | { |
| 5259 | 5259 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5282,11 +5282,11 @@ discard block |
||
| 5282 | 5282 | } |
| 5283 | 5283 | |
| 5284 | 5284 | /** |
| 5285 | - * Gets all aircraft registration that have flown over by route |
|
| 5286 | - * |
|
| 5287 | - * @return Array the aircraft list |
|
| 5288 | - * |
|
| 5289 | - */ |
|
| 5285 | + * Gets all aircraft registration that have flown over by route |
|
| 5286 | + * |
|
| 5287 | + * @return Array the aircraft list |
|
| 5288 | + * |
|
| 5289 | + */ |
|
| 5290 | 5290 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5291 | 5291 | { |
| 5292 | 5292 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5328,11 +5328,11 @@ discard block |
||
| 5328 | 5328 | |
| 5329 | 5329 | |
| 5330 | 5330 | /** |
| 5331 | - * Gets all aircraft manufacturer that have flown over by route |
|
| 5332 | - * |
|
| 5333 | - * @return Array the aircraft manufacturer list |
|
| 5334 | - * |
|
| 5335 | - */ |
|
| 5331 | + * Gets all aircraft manufacturer that have flown over by route |
|
| 5332 | + * |
|
| 5333 | + * @return Array the aircraft manufacturer list |
|
| 5334 | + * |
|
| 5335 | + */ |
|
| 5336 | 5336 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5337 | 5337 | { |
| 5338 | 5338 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5366,11 +5366,11 @@ discard block |
||
| 5366 | 5366 | |
| 5367 | 5367 | |
| 5368 | 5368 | /** |
| 5369 | - * Gets all aircraft types that have flown over by country |
|
| 5370 | - * |
|
| 5371 | - * @return Array the aircraft list |
|
| 5372 | - * |
|
| 5373 | - */ |
|
| 5369 | + * Gets all aircraft types that have flown over by country |
|
| 5370 | + * |
|
| 5371 | + * @return Array the aircraft list |
|
| 5372 | + * |
|
| 5373 | + */ |
|
| 5374 | 5374 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
| 5375 | 5375 | { |
| 5376 | 5376 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5401,11 +5401,11 @@ discard block |
||
| 5401 | 5401 | |
| 5402 | 5402 | |
| 5403 | 5403 | /** |
| 5404 | - * Gets all aircraft registration that have flown over by country |
|
| 5405 | - * |
|
| 5406 | - * @return Array the aircraft list |
|
| 5407 | - * |
|
| 5408 | - */ |
|
| 5404 | + * Gets all aircraft registration that have flown over by country |
|
| 5405 | + * |
|
| 5406 | + * @return Array the aircraft list |
|
| 5407 | + * |
|
| 5408 | + */ |
|
| 5409 | 5409 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
| 5410 | 5410 | { |
| 5411 | 5411 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5445,11 +5445,11 @@ discard block |
||
| 5445 | 5445 | |
| 5446 | 5446 | |
| 5447 | 5447 | /** |
| 5448 | - * Gets all aircraft manufacturer that have flown over by country |
|
| 5449 | - * |
|
| 5450 | - * @return Array the aircraft manufacturer list |
|
| 5451 | - * |
|
| 5452 | - */ |
|
| 5448 | + * Gets all aircraft manufacturer that have flown over by country |
|
| 5449 | + * |
|
| 5450 | + * @return Array the aircraft manufacturer list |
|
| 5451 | + * |
|
| 5452 | + */ |
|
| 5453 | 5453 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
| 5454 | 5454 | { |
| 5455 | 5455 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5480,17 +5480,17 @@ discard block |
||
| 5480 | 5480 | |
| 5481 | 5481 | |
| 5482 | 5482 | /** |
| 5483 | - * Gets all aircraft manufacturers that have flown over |
|
| 5484 | - * |
|
| 5485 | - * @return Array the aircraft list |
|
| 5486 | - * |
|
| 5487 | - */ |
|
| 5483 | + * Gets all aircraft manufacturers that have flown over |
|
| 5484 | + * |
|
| 5485 | + * @return Array the aircraft list |
|
| 5486 | + * |
|
| 5487 | + */ |
|
| 5488 | 5488 | public function countAllAircraftManufacturers($filters = array()) |
| 5489 | 5489 | { |
| 5490 | 5490 | $filter_query = $this->getFilter($filters,true,true); |
| 5491 | 5491 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
| 5492 | 5492 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
| 5493 | - $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
| 5493 | + $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
| 5494 | 5494 | ORDER BY aircraft_manufacturer_count DESC |
| 5495 | 5495 | LIMIT 10"; |
| 5496 | 5496 | |
@@ -5515,11 +5515,11 @@ discard block |
||
| 5515 | 5515 | |
| 5516 | 5516 | |
| 5517 | 5517 | /** |
| 5518 | - * Gets all aircraft registrations that have flown over |
|
| 5519 | - * |
|
| 5520 | - * @return Array the aircraft list |
|
| 5521 | - * |
|
| 5522 | - */ |
|
| 5518 | + * Gets all aircraft registrations that have flown over |
|
| 5519 | + * |
|
| 5520 | + * @return Array the aircraft list |
|
| 5521 | + * |
|
| 5522 | + */ |
|
| 5523 | 5523 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 5524 | 5524 | { |
| 5525 | 5525 | global $globalDBdriver; |
@@ -5527,15 +5527,15 @@ discard block |
||
| 5527 | 5527 | $filter_query = $this->getFilter($filters,true,true); |
| 5528 | 5528 | $query = "SELECT DISTINCT spotter_output.registration, COUNT(spotter_output.registration) AS aircraft_registration_count, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name |
| 5529 | 5529 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
| 5530 | - if ($olderthanmonths > 0) { |
|
| 5531 | - if ($globalDBdriver == 'mysql') { |
|
| 5530 | + if ($olderthanmonths > 0) { |
|
| 5531 | + if ($globalDBdriver == 'mysql') { |
|
| 5532 | 5532 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5533 | 5533 | } else { |
| 5534 | 5534 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5535 | 5535 | } |
| 5536 | 5536 | } |
| 5537 | - if ($sincedate != '') { |
|
| 5538 | - if ($globalDBdriver == 'mysql') { |
|
| 5537 | + if ($sincedate != '') { |
|
| 5538 | + if ($globalDBdriver == 'mysql') { |
|
| 5539 | 5539 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5540 | 5540 | } else { |
| 5541 | 5541 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5544,7 +5544,7 @@ discard block |
||
| 5544 | 5544 | |
| 5545 | 5545 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5546 | 5546 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
| 5547 | - $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5547 | + $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5548 | 5548 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5549 | 5549 | |
| 5550 | 5550 | $sth = $this->db->prepare($query); |
@@ -5575,11 +5575,11 @@ discard block |
||
| 5575 | 5575 | |
| 5576 | 5576 | |
| 5577 | 5577 | /** |
| 5578 | - * Gets all aircraft registrations that have flown over |
|
| 5579 | - * |
|
| 5580 | - * @return Array the aircraft list |
|
| 5581 | - * |
|
| 5582 | - */ |
|
| 5578 | + * Gets all aircraft registrations that have flown over |
|
| 5579 | + * |
|
| 5580 | + * @return Array the aircraft list |
|
| 5581 | + * |
|
| 5582 | + */ |
|
| 5583 | 5583 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 5584 | 5584 | { |
| 5585 | 5585 | global $globalDBdriver; |
@@ -5587,15 +5587,15 @@ discard block |
||
| 5587 | 5587 | $Image = new Image($this->db); |
| 5588 | 5588 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.registration, COUNT(spotter_output.registration) AS aircraft_registration_count, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name |
| 5589 | 5589 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
| 5590 | - if ($olderthanmonths > 0) { |
|
| 5591 | - if ($globalDBdriver == 'mysql') { |
|
| 5590 | + if ($olderthanmonths > 0) { |
|
| 5591 | + if ($globalDBdriver == 'mysql') { |
|
| 5592 | 5592 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5593 | 5593 | } else { |
| 5594 | 5594 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5595 | 5595 | } |
| 5596 | 5596 | } |
| 5597 | - if ($sincedate != '') { |
|
| 5598 | - if ($globalDBdriver == 'mysql') { |
|
| 5597 | + if ($sincedate != '') { |
|
| 5598 | + if ($globalDBdriver == 'mysql') { |
|
| 5599 | 5599 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5600 | 5600 | } else { |
| 5601 | 5601 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5604,7 +5604,7 @@ discard block |
||
| 5604 | 5604 | |
| 5605 | 5605 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5606 | 5606 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
| 5607 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5607 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5608 | 5608 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5609 | 5609 | |
| 5610 | 5610 | $sth = $this->db->prepare($query); |
@@ -5636,35 +5636,35 @@ discard block |
||
| 5636 | 5636 | |
| 5637 | 5637 | |
| 5638 | 5638 | /** |
| 5639 | - * Gets all departure airports of the airplanes that have flown over |
|
| 5640 | - * |
|
| 5641 | - * @return Array the airport list |
|
| 5642 | - * |
|
| 5643 | - */ |
|
| 5639 | + * Gets all departure airports of the airplanes that have flown over |
|
| 5640 | + * |
|
| 5641 | + * @return Array the airport list |
|
| 5642 | + * |
|
| 5643 | + */ |
|
| 5644 | 5644 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5645 | 5645 | { |
| 5646 | 5646 | global $globalDBdriver; |
| 5647 | 5647 | $filter_query = $this->getFilter($filters,true,true); |
| 5648 | 5648 | $query = "SELECT DISTINCT spotter_output.departure_airport_icao, COUNT(spotter_output.departure_airport_icao) AS airport_departure_icao_count, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
| 5649 | 5649 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
| 5650 | - if ($olderthanmonths > 0) { |
|
| 5651 | - if ($globalDBdriver == 'mysql') { |
|
| 5650 | + if ($olderthanmonths > 0) { |
|
| 5651 | + if ($globalDBdriver == 'mysql') { |
|
| 5652 | 5652 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5653 | 5653 | } else { |
| 5654 | 5654 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5655 | 5655 | } |
| 5656 | - } |
|
| 5657 | - if ($sincedate != '') { |
|
| 5658 | - if ($globalDBdriver == 'mysql') { |
|
| 5656 | + } |
|
| 5657 | + if ($sincedate != '') { |
|
| 5658 | + if ($globalDBdriver == 'mysql') { |
|
| 5659 | 5659 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5660 | 5660 | } else { |
| 5661 | 5661 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5662 | 5662 | } |
| 5663 | 5663 | } |
| 5664 | 5664 | |
| 5665 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5666 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5667 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5665 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5666 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5667 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5668 | 5668 | ORDER BY airport_departure_icao_count DESC"; |
| 5669 | 5669 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5670 | 5670 | |
@@ -5688,35 +5688,35 @@ discard block |
||
| 5688 | 5688 | } |
| 5689 | 5689 | |
| 5690 | 5690 | /** |
| 5691 | - * Gets all departure airports of the airplanes that have flown over |
|
| 5692 | - * |
|
| 5693 | - * @return Array the airport list |
|
| 5694 | - * |
|
| 5695 | - */ |
|
| 5691 | + * Gets all departure airports of the airplanes that have flown over |
|
| 5692 | + * |
|
| 5693 | + * @return Array the airport list |
|
| 5694 | + * |
|
| 5695 | + */ |
|
| 5696 | 5696 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5697 | 5697 | { |
| 5698 | 5698 | global $globalDBdriver; |
| 5699 | 5699 | $filter_query = $this->getFilter($filters,true,true); |
| 5700 | 5700 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.departure_airport_icao, COUNT(spotter_output.departure_airport_icao) AS airport_departure_icao_count, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
| 5701 | 5701 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> '' "; |
| 5702 | - if ($olderthanmonths > 0) { |
|
| 5703 | - if ($globalDBdriver == 'mysql') { |
|
| 5702 | + if ($olderthanmonths > 0) { |
|
| 5703 | + if ($globalDBdriver == 'mysql') { |
|
| 5704 | 5704 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5705 | 5705 | } else { |
| 5706 | 5706 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5707 | 5707 | } |
| 5708 | - } |
|
| 5709 | - if ($sincedate != '') { |
|
| 5710 | - if ($globalDBdriver == 'mysql') { |
|
| 5708 | + } |
|
| 5709 | + if ($sincedate != '') { |
|
| 5710 | + if ($globalDBdriver == 'mysql') { |
|
| 5711 | 5711 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5712 | 5712 | } else { |
| 5713 | 5713 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5714 | 5714 | } |
| 5715 | 5715 | } |
| 5716 | 5716 | |
| 5717 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5718 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5719 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5717 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5718 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5719 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5720 | 5720 | ORDER BY airport_departure_icao_count DESC"; |
| 5721 | 5721 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5722 | 5722 | |
@@ -5741,37 +5741,37 @@ discard block |
||
| 5741 | 5741 | } |
| 5742 | 5742 | |
| 5743 | 5743 | /** |
| 5744 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 5745 | - * |
|
| 5746 | - * @return Array the airport list |
|
| 5747 | - * |
|
| 5748 | - */ |
|
| 5744 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 5745 | + * |
|
| 5746 | + * @return Array the airport list |
|
| 5747 | + * |
|
| 5748 | + */ |
|
| 5749 | 5749 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5750 | 5750 | { |
| 5751 | 5751 | global $globalDBdriver; |
| 5752 | 5752 | $filter_query = $this->getFilter($filters,true,true); |
| 5753 | 5753 | $query = "SELECT DISTINCT spotter_output.real_departure_airport_icao AS departure_airport_icao, COUNT(spotter_output.real_departure_airport_icao) AS airport_departure_icao_count, airport.name as departure_airport_name, airport.city as departure_airport_city, airport.country as departure_airport_country |
| 5754 | 5754 | FROM airport, spotter_output".$filter_query." spotter_output.real_departure_airport_icao <> '' AND spotter_output.real_departure_airport_icao <> 'NA' AND airport.icao = spotter_output.real_departure_airport_icao"; |
| 5755 | - if ($olderthanmonths > 0) { |
|
| 5756 | - if ($globalDBdriver == 'mysql') { |
|
| 5755 | + if ($olderthanmonths > 0) { |
|
| 5756 | + if ($globalDBdriver == 'mysql') { |
|
| 5757 | 5757 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5758 | 5758 | } else { |
| 5759 | 5759 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5760 | 5760 | } |
| 5761 | - } |
|
| 5762 | - if ($sincedate != '') { |
|
| 5763 | - if ($globalDBdriver == 'mysql') { |
|
| 5761 | + } |
|
| 5762 | + if ($sincedate != '') { |
|
| 5763 | + if ($globalDBdriver == 'mysql') { |
|
| 5764 | 5764 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5765 | 5765 | } else { |
| 5766 | 5766 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5767 | 5767 | } |
| 5768 | 5768 | } |
| 5769 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5770 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5771 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5769 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5770 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5771 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5772 | 5772 | ORDER BY airport_departure_icao_count DESC"; |
| 5773 | 5773 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5774 | - //echo $query; |
|
| 5774 | + //echo $query; |
|
| 5775 | 5775 | $sth = $this->db->prepare($query); |
| 5776 | 5776 | $sth->execute(); |
| 5777 | 5777 | |
@@ -5792,35 +5792,35 @@ discard block |
||
| 5792 | 5792 | } |
| 5793 | 5793 | |
| 5794 | 5794 | /** |
| 5795 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 5796 | - * |
|
| 5797 | - * @return Array the airport list |
|
| 5798 | - * |
|
| 5799 | - */ |
|
| 5795 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 5796 | + * |
|
| 5797 | + * @return Array the airport list |
|
| 5798 | + * |
|
| 5799 | + */ |
|
| 5800 | 5800 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5801 | 5801 | { |
| 5802 | 5802 | global $globalDBdriver; |
| 5803 | 5803 | $filter_query = $this->getFilter($filters,true,true); |
| 5804 | 5804 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.real_departure_airport_icao AS departure_airport_icao, COUNT(spotter_output.real_departure_airport_icao) AS airport_departure_icao_count, airport.name as departure_airport_name, airport.city as departure_airport_city, airport.country as departure_airport_country |
| 5805 | 5805 | FROM airport, spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.real_departure_airport_icao <> '' AND spotter_output.real_departure_airport_icao <> 'NA' AND airport.icao = spotter_output.real_departure_airport_icao "; |
| 5806 | - if ($olderthanmonths > 0) { |
|
| 5807 | - if ($globalDBdriver == 'mysql') { |
|
| 5806 | + if ($olderthanmonths > 0) { |
|
| 5807 | + if ($globalDBdriver == 'mysql') { |
|
| 5808 | 5808 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5809 | 5809 | } else { |
| 5810 | 5810 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5811 | 5811 | } |
| 5812 | - } |
|
| 5813 | - if ($sincedate != '') { |
|
| 5814 | - if ($globalDBdriver == 'mysql') { |
|
| 5812 | + } |
|
| 5813 | + if ($sincedate != '') { |
|
| 5814 | + if ($globalDBdriver == 'mysql') { |
|
| 5815 | 5815 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5816 | 5816 | } else { |
| 5817 | 5817 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
| 5818 | 5818 | } |
| 5819 | 5819 | } |
| 5820 | 5820 | |
| 5821 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5822 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5823 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5821 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5822 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5823 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5824 | 5824 | ORDER BY airport_departure_icao_count DESC"; |
| 5825 | 5825 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5826 | 5826 | |
@@ -5845,11 +5845,11 @@ discard block |
||
| 5845 | 5845 | } |
| 5846 | 5846 | |
| 5847 | 5847 | /** |
| 5848 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 5849 | - * |
|
| 5850 | - * @return Array the airport list |
|
| 5851 | - * |
|
| 5852 | - */ |
|
| 5848 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 5849 | + * |
|
| 5850 | + * @return Array the airport list |
|
| 5851 | + * |
|
| 5852 | + */ |
|
| 5853 | 5853 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
| 5854 | 5854 | { |
| 5855 | 5855 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5883,11 +5883,11 @@ discard block |
||
| 5883 | 5883 | |
| 5884 | 5884 | |
| 5885 | 5885 | /** |
| 5886 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 5887 | - * |
|
| 5888 | - * @return Array the airport list |
|
| 5889 | - * |
|
| 5890 | - */ |
|
| 5886 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 5887 | + * |
|
| 5888 | + * @return Array the airport list |
|
| 5889 | + * |
|
| 5890 | + */ |
|
| 5891 | 5891 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
| 5892 | 5892 | { |
| 5893 | 5893 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5918,11 +5918,11 @@ discard block |
||
| 5918 | 5918 | |
| 5919 | 5919 | |
| 5920 | 5920 | /** |
| 5921 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 5922 | - * |
|
| 5923 | - * @return Array the airport list |
|
| 5924 | - * |
|
| 5925 | - */ |
|
| 5921 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 5922 | + * |
|
| 5923 | + * @return Array the airport list |
|
| 5924 | + * |
|
| 5925 | + */ |
|
| 5926 | 5926 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
| 5927 | 5927 | { |
| 5928 | 5928 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5955,11 +5955,11 @@ discard block |
||
| 5955 | 5955 | |
| 5956 | 5956 | |
| 5957 | 5957 | /** |
| 5958 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 5959 | - * |
|
| 5960 | - * @return Array the airport list |
|
| 5961 | - * |
|
| 5962 | - */ |
|
| 5958 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 5959 | + * |
|
| 5960 | + * @return Array the airport list |
|
| 5961 | + * |
|
| 5962 | + */ |
|
| 5963 | 5963 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 5964 | 5964 | { |
| 5965 | 5965 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5989,11 +5989,11 @@ discard block |
||
| 5989 | 5989 | |
| 5990 | 5990 | |
| 5991 | 5991 | /** |
| 5992 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 5993 | - * |
|
| 5994 | - * @return Array the airport list |
|
| 5995 | - * |
|
| 5996 | - */ |
|
| 5992 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 5993 | + * |
|
| 5994 | + * @return Array the airport list |
|
| 5995 | + * |
|
| 5996 | + */ |
|
| 5997 | 5997 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
| 5998 | 5998 | { |
| 5999 | 5999 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6026,11 +6026,11 @@ discard block |
||
| 6026 | 6026 | |
| 6027 | 6027 | |
| 6028 | 6028 | /** |
| 6029 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6030 | - * |
|
| 6031 | - * @return Array the airport list |
|
| 6032 | - * |
|
| 6033 | - */ |
|
| 6029 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6030 | + * |
|
| 6031 | + * @return Array the airport list |
|
| 6032 | + * |
|
| 6033 | + */ |
|
| 6034 | 6034 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
| 6035 | 6035 | { |
| 6036 | 6036 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6060,11 +6060,11 @@ discard block |
||
| 6060 | 6060 | |
| 6061 | 6061 | |
| 6062 | 6062 | /** |
| 6063 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6064 | - * |
|
| 6065 | - * @return Array the airport list |
|
| 6066 | - * |
|
| 6067 | - */ |
|
| 6063 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6064 | + * |
|
| 6065 | + * @return Array the airport list |
|
| 6066 | + * |
|
| 6067 | + */ |
|
| 6068 | 6068 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
| 6069 | 6069 | { |
| 6070 | 6070 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6097,11 +6097,11 @@ discard block |
||
| 6097 | 6097 | |
| 6098 | 6098 | |
| 6099 | 6099 | /** |
| 6100 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6101 | - * |
|
| 6102 | - * @return Array the airport list |
|
| 6103 | - * |
|
| 6104 | - */ |
|
| 6100 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6101 | + * |
|
| 6102 | + * @return Array the airport list |
|
| 6103 | + * |
|
| 6104 | + */ |
|
| 6105 | 6105 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
| 6106 | 6106 | { |
| 6107 | 6107 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6132,11 +6132,11 @@ discard block |
||
| 6132 | 6132 | |
| 6133 | 6133 | |
| 6134 | 6134 | /** |
| 6135 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6136 | - * |
|
| 6137 | - * @return Array the airport list |
|
| 6138 | - * |
|
| 6139 | - */ |
|
| 6135 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6136 | + * |
|
| 6137 | + * @return Array the airport list |
|
| 6138 | + * |
|
| 6139 | + */ |
|
| 6140 | 6140 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6141 | 6141 | { |
| 6142 | 6142 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6169,11 +6169,11 @@ discard block |
||
| 6169 | 6169 | |
| 6170 | 6170 | |
| 6171 | 6171 | /** |
| 6172 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6173 | - * |
|
| 6174 | - * @return Array the airport list |
|
| 6175 | - * |
|
| 6176 | - */ |
|
| 6172 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6173 | + * |
|
| 6174 | + * @return Array the airport list |
|
| 6175 | + * |
|
| 6176 | + */ |
|
| 6177 | 6177 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6178 | 6178 | { |
| 6179 | 6179 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6203,11 +6203,11 @@ discard block |
||
| 6203 | 6203 | |
| 6204 | 6204 | |
| 6205 | 6205 | /** |
| 6206 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6207 | - * |
|
| 6208 | - * @return Array the airport list |
|
| 6209 | - * |
|
| 6210 | - */ |
|
| 6206 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6207 | + * |
|
| 6208 | + * @return Array the airport list |
|
| 6209 | + * |
|
| 6210 | + */ |
|
| 6211 | 6211 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
| 6212 | 6212 | { |
| 6213 | 6213 | global $globalTimezone, $globalDBdriver; |
@@ -6253,11 +6253,11 @@ discard block |
||
| 6253 | 6253 | |
| 6254 | 6254 | |
| 6255 | 6255 | /** |
| 6256 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6257 | - * |
|
| 6258 | - * @return Array the airport list |
|
| 6259 | - * |
|
| 6260 | - */ |
|
| 6256 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6257 | + * |
|
| 6258 | + * @return Array the airport list |
|
| 6259 | + * |
|
| 6260 | + */ |
|
| 6261 | 6261 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
| 6262 | 6262 | { |
| 6263 | 6263 | global $globalTimezone, $globalDBdriver; |
@@ -6300,11 +6300,11 @@ discard block |
||
| 6300 | 6300 | |
| 6301 | 6301 | |
| 6302 | 6302 | /** |
| 6303 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6304 | - * |
|
| 6305 | - * @return Array the airport list |
|
| 6306 | - * |
|
| 6307 | - */ |
|
| 6303 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6304 | + * |
|
| 6305 | + * @return Array the airport list |
|
| 6306 | + * |
|
| 6307 | + */ |
|
| 6308 | 6308 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
| 6309 | 6309 | { |
| 6310 | 6310 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6338,11 +6338,11 @@ discard block |
||
| 6338 | 6338 | |
| 6339 | 6339 | |
| 6340 | 6340 | /** |
| 6341 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6342 | - * |
|
| 6343 | - * @return Array the airport list |
|
| 6344 | - * |
|
| 6345 | - */ |
|
| 6341 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6342 | + * |
|
| 6343 | + * @return Array the airport list |
|
| 6344 | + * |
|
| 6345 | + */ |
|
| 6346 | 6346 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
| 6347 | 6347 | { |
| 6348 | 6348 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6373,11 +6373,11 @@ discard block |
||
| 6373 | 6373 | |
| 6374 | 6374 | |
| 6375 | 6375 | /** |
| 6376 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6377 | - * |
|
| 6378 | - * @return Array the airport list |
|
| 6379 | - * |
|
| 6380 | - */ |
|
| 6376 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6377 | + * |
|
| 6378 | + * @return Array the airport list |
|
| 6379 | + * |
|
| 6380 | + */ |
|
| 6381 | 6381 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
| 6382 | 6382 | { |
| 6383 | 6383 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6411,11 +6411,11 @@ discard block |
||
| 6411 | 6411 | |
| 6412 | 6412 | |
| 6413 | 6413 | /** |
| 6414 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6415 | - * |
|
| 6416 | - * @return Array the airport list |
|
| 6417 | - * |
|
| 6418 | - */ |
|
| 6414 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6415 | + * |
|
| 6416 | + * @return Array the airport list |
|
| 6417 | + * |
|
| 6418 | + */ |
|
| 6419 | 6419 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
| 6420 | 6420 | { |
| 6421 | 6421 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6445,40 +6445,40 @@ discard block |
||
| 6445 | 6445 | |
| 6446 | 6446 | |
| 6447 | 6447 | /** |
| 6448 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6449 | - * |
|
| 6450 | - * @param Boolean $limit Limit result to 10 or not |
|
| 6451 | - * @param Integer $olderthanmonths Only show result older than x months |
|
| 6452 | - * @param String $sincedate Only show result since x date |
|
| 6453 | - * @param Boolean $icaoaskey Show result by ICAO |
|
| 6454 | - * @param Array $filters Filter used here |
|
| 6455 | - * @return Array the airport list |
|
| 6456 | - * |
|
| 6457 | - */ |
|
| 6448 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6449 | + * |
|
| 6450 | + * @param Boolean $limit Limit result to 10 or not |
|
| 6451 | + * @param Integer $olderthanmonths Only show result older than x months |
|
| 6452 | + * @param String $sincedate Only show result since x date |
|
| 6453 | + * @param Boolean $icaoaskey Show result by ICAO |
|
| 6454 | + * @param Array $filters Filter used here |
|
| 6455 | + * @return Array the airport list |
|
| 6456 | + * |
|
| 6457 | + */ |
|
| 6458 | 6458 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
| 6459 | 6459 | { |
| 6460 | 6460 | global $globalDBdriver; |
| 6461 | 6461 | $filter_query = $this->getFilter($filters,true,true); |
| 6462 | 6462 | $query = "SELECT DISTINCT spotter_output.arrival_airport_icao, COUNT(spotter_output.arrival_airport_icao) AS airport_arrival_icao_count, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
| 6463 | 6463 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
| 6464 | - if ($olderthanmonths > 0) { |
|
| 6465 | - if ($globalDBdriver == 'mysql') { |
|
| 6464 | + if ($olderthanmonths > 0) { |
|
| 6465 | + if ($globalDBdriver == 'mysql') { |
|
| 6466 | 6466 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6467 | 6467 | } else { |
| 6468 | 6468 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6469 | 6469 | } |
| 6470 | 6470 | } |
| 6471 | - if ($sincedate != '') { |
|
| 6472 | - if ($globalDBdriver == 'mysql') { |
|
| 6471 | + if ($sincedate != '') { |
|
| 6472 | + if ($globalDBdriver == 'mysql') { |
|
| 6473 | 6473 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6474 | 6474 | } else { |
| 6475 | 6475 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6476 | 6476 | } |
| 6477 | 6477 | } |
| 6478 | 6478 | |
| 6479 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6480 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6481 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6479 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6480 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6481 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6482 | 6482 | ORDER BY airport_arrival_icao_count DESC"; |
| 6483 | 6483 | if ($limit) $query .= " LIMIT 10"; |
| 6484 | 6484 | |
@@ -6507,35 +6507,35 @@ discard block |
||
| 6507 | 6507 | } |
| 6508 | 6508 | |
| 6509 | 6509 | /** |
| 6510 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6511 | - * |
|
| 6512 | - * @return Array the airport list |
|
| 6513 | - * |
|
| 6514 | - */ |
|
| 6510 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6511 | + * |
|
| 6512 | + * @return Array the airport list |
|
| 6513 | + * |
|
| 6514 | + */ |
|
| 6515 | 6515 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
| 6516 | 6516 | { |
| 6517 | 6517 | global $globalDBdriver; |
| 6518 | 6518 | $filter_query = $this->getFilter($filters,true,true); |
| 6519 | 6519 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.arrival_airport_icao, COUNT(spotter_output.arrival_airport_icao) AS airport_arrival_icao_count, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
| 6520 | 6520 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> '' "; |
| 6521 | - if ($olderthanmonths > 0) { |
|
| 6522 | - if ($globalDBdriver == 'mysql') { |
|
| 6521 | + if ($olderthanmonths > 0) { |
|
| 6522 | + if ($globalDBdriver == 'mysql') { |
|
| 6523 | 6523 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6524 | 6524 | } else { |
| 6525 | 6525 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6526 | 6526 | } |
| 6527 | 6527 | } |
| 6528 | - if ($sincedate != '') { |
|
| 6529 | - if ($globalDBdriver == 'mysql') { |
|
| 6528 | + if ($sincedate != '') { |
|
| 6529 | + if ($globalDBdriver == 'mysql') { |
|
| 6530 | 6530 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6531 | 6531 | } else { |
| 6532 | 6532 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6533 | 6533 | } |
| 6534 | 6534 | } |
| 6535 | 6535 | |
| 6536 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6537 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6538 | - $query .= "GROUP BY spotter_output.airline_icao,spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6536 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6537 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6538 | + $query .= "GROUP BY spotter_output.airline_icao,spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6539 | 6539 | ORDER BY airport_arrival_icao_count DESC"; |
| 6540 | 6540 | if ($limit) $query .= " LIMIT 10"; |
| 6541 | 6541 | |
@@ -6566,34 +6566,34 @@ discard block |
||
| 6566 | 6566 | |
| 6567 | 6567 | |
| 6568 | 6568 | /** |
| 6569 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6570 | - * |
|
| 6571 | - * @return Array the airport list |
|
| 6572 | - * |
|
| 6573 | - */ |
|
| 6569 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6570 | + * |
|
| 6571 | + * @return Array the airport list |
|
| 6572 | + * |
|
| 6573 | + */ |
|
| 6574 | 6574 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
| 6575 | 6575 | { |
| 6576 | 6576 | global $globalDBdriver; |
| 6577 | 6577 | $filter_query = $this->getFilter($filters,true,true); |
| 6578 | 6578 | $query = "SELECT DISTINCT spotter_output.real_arrival_airport_icao as arrival_airport_icao, COUNT(spotter_output.real_arrival_airport_icao) AS airport_arrival_icao_count, airport.name AS arrival_airport_name, airport.city AS arrival_airport_city, airport.country AS arrival_airport_country |
| 6579 | 6579 | FROM airport,spotter_output".$filter_query." spotter_output.real_arrival_airport_icao <> '' AND spotter_output.real_arrival_airport_icao <> 'NA' AND airport.icao = spotter_output.real_arrival_airport_icao"; |
| 6580 | - if ($olderthanmonths > 0) { |
|
| 6581 | - if ($globalDBdriver == 'mysql') { |
|
| 6580 | + if ($olderthanmonths > 0) { |
|
| 6581 | + if ($globalDBdriver == 'mysql') { |
|
| 6582 | 6582 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6583 | 6583 | } else { |
| 6584 | 6584 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6585 | 6585 | } |
| 6586 | 6586 | } |
| 6587 | - if ($sincedate != '') { |
|
| 6588 | - if ($globalDBdriver == 'mysql') { |
|
| 6587 | + if ($sincedate != '') { |
|
| 6588 | + if ($globalDBdriver == 'mysql') { |
|
| 6589 | 6589 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6590 | 6590 | } else { |
| 6591 | 6591 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6592 | 6592 | } |
| 6593 | 6593 | } |
| 6594 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6595 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6596 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6594 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6595 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6596 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6597 | 6597 | ORDER BY airport_arrival_icao_count DESC"; |
| 6598 | 6598 | if ($limit) $query .= " LIMIT 10"; |
| 6599 | 6599 | |
@@ -6622,35 +6622,35 @@ discard block |
||
| 6622 | 6622 | } |
| 6623 | 6623 | |
| 6624 | 6624 | /** |
| 6625 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6626 | - * |
|
| 6627 | - * @return Array the airport list |
|
| 6628 | - * |
|
| 6629 | - */ |
|
| 6625 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6626 | + * |
|
| 6627 | + * @return Array the airport list |
|
| 6628 | + * |
|
| 6629 | + */ |
|
| 6630 | 6630 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
| 6631 | 6631 | { |
| 6632 | 6632 | global $globalDBdriver; |
| 6633 | 6633 | $filter_query = $this->getFilter($filters,true,true); |
| 6634 | 6634 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.real_arrival_airport_icao as arrival_airport_icao, COUNT(spotter_output.real_arrival_airport_icao) AS airport_arrival_icao_count, airport.name AS arrival_airport_name, airport.city AS arrival_airport_city, airport.country AS arrival_airport_country |
| 6635 | 6635 | FROM airport,spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.real_arrival_airport_icao <> '' AND spotter_output.real_arrival_airport_icao <> 'NA' AND airport.icao = spotter_output.real_arrival_airport_icao "; |
| 6636 | - if ($olderthanmonths > 0) { |
|
| 6637 | - if ($globalDBdriver == 'mysql') { |
|
| 6636 | + if ($olderthanmonths > 0) { |
|
| 6637 | + if ($globalDBdriver == 'mysql') { |
|
| 6638 | 6638 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6639 | 6639 | } else { |
| 6640 | 6640 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6641 | 6641 | } |
| 6642 | 6642 | } |
| 6643 | - if ($sincedate != '') { |
|
| 6644 | - if ($globalDBdriver == 'mysql') { |
|
| 6643 | + if ($sincedate != '') { |
|
| 6644 | + if ($globalDBdriver == 'mysql') { |
|
| 6645 | 6645 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6646 | 6646 | } else { |
| 6647 | 6647 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6648 | 6648 | } |
| 6649 | 6649 | } |
| 6650 | 6650 | |
| 6651 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6652 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6653 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6651 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6652 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6653 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6654 | 6654 | ORDER BY airport_arrival_icao_count DESC"; |
| 6655 | 6655 | if ($limit) $query .= " LIMIT 10"; |
| 6656 | 6656 | |
@@ -6680,11 +6680,11 @@ discard block |
||
| 6680 | 6680 | } |
| 6681 | 6681 | |
| 6682 | 6682 | /** |
| 6683 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 6684 | - * |
|
| 6685 | - * @return Array the airport list |
|
| 6686 | - * |
|
| 6687 | - */ |
|
| 6683 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 6684 | + * |
|
| 6685 | + * @return Array the airport list |
|
| 6686 | + * |
|
| 6687 | + */ |
|
| 6688 | 6688 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
| 6689 | 6689 | { |
| 6690 | 6690 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6716,11 +6716,11 @@ discard block |
||
| 6716 | 6716 | |
| 6717 | 6717 | |
| 6718 | 6718 | /** |
| 6719 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 6720 | - * |
|
| 6721 | - * @return Array the airport list |
|
| 6722 | - * |
|
| 6723 | - */ |
|
| 6719 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 6720 | + * |
|
| 6721 | + * @return Array the airport list |
|
| 6722 | + * |
|
| 6723 | + */ |
|
| 6724 | 6724 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
| 6725 | 6725 | { |
| 6726 | 6726 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6751,11 +6751,11 @@ discard block |
||
| 6751 | 6751 | |
| 6752 | 6752 | |
| 6753 | 6753 | /** |
| 6754 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 6755 | - * |
|
| 6756 | - * @return Array the airport list |
|
| 6757 | - * |
|
| 6758 | - */ |
|
| 6754 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 6755 | + * |
|
| 6756 | + * @return Array the airport list |
|
| 6757 | + * |
|
| 6758 | + */ |
|
| 6759 | 6759 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
| 6760 | 6760 | { |
| 6761 | 6761 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6789,11 +6789,11 @@ discard block |
||
| 6789 | 6789 | |
| 6790 | 6790 | |
| 6791 | 6791 | /** |
| 6792 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6793 | - * |
|
| 6794 | - * @return Array the airport list |
|
| 6795 | - * |
|
| 6796 | - */ |
|
| 6792 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6793 | + * |
|
| 6794 | + * @return Array the airport list |
|
| 6795 | + * |
|
| 6796 | + */ |
|
| 6797 | 6797 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 6798 | 6798 | { |
| 6799 | 6799 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6823,11 +6823,11 @@ discard block |
||
| 6823 | 6823 | |
| 6824 | 6824 | |
| 6825 | 6825 | /** |
| 6826 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 6827 | - * |
|
| 6828 | - * @return Array the airport list |
|
| 6829 | - * |
|
| 6830 | - */ |
|
| 6826 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 6827 | + * |
|
| 6828 | + * @return Array the airport list |
|
| 6829 | + * |
|
| 6830 | + */ |
|
| 6831 | 6831 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
| 6832 | 6832 | { |
| 6833 | 6833 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6861,11 +6861,11 @@ discard block |
||
| 6861 | 6861 | |
| 6862 | 6862 | |
| 6863 | 6863 | /** |
| 6864 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6865 | - * |
|
| 6866 | - * @return Array the airport list |
|
| 6867 | - * |
|
| 6868 | - */ |
|
| 6864 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6865 | + * |
|
| 6866 | + * @return Array the airport list |
|
| 6867 | + * |
|
| 6868 | + */ |
|
| 6869 | 6869 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
| 6870 | 6870 | { |
| 6871 | 6871 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6896,11 +6896,11 @@ discard block |
||
| 6896 | 6896 | |
| 6897 | 6897 | |
| 6898 | 6898 | /** |
| 6899 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 6900 | - * |
|
| 6901 | - * @return Array the airport list |
|
| 6902 | - * |
|
| 6903 | - */ |
|
| 6899 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 6900 | + * |
|
| 6901 | + * @return Array the airport list |
|
| 6902 | + * |
|
| 6903 | + */ |
|
| 6904 | 6904 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
| 6905 | 6905 | { |
| 6906 | 6906 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6933,11 +6933,11 @@ discard block |
||
| 6933 | 6933 | |
| 6934 | 6934 | |
| 6935 | 6935 | /** |
| 6936 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 6937 | - * |
|
| 6938 | - * @return Array the airport list |
|
| 6939 | - * |
|
| 6940 | - */ |
|
| 6936 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 6937 | + * |
|
| 6938 | + * @return Array the airport list |
|
| 6939 | + * |
|
| 6940 | + */ |
|
| 6941 | 6941 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
| 6942 | 6942 | { |
| 6943 | 6943 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6967,11 +6967,11 @@ discard block |
||
| 6967 | 6967 | |
| 6968 | 6968 | |
| 6969 | 6969 | /** |
| 6970 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 6971 | - * |
|
| 6972 | - * @return Array the airport list |
|
| 6973 | - * |
|
| 6974 | - */ |
|
| 6970 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 6971 | + * |
|
| 6972 | + * @return Array the airport list |
|
| 6973 | + * |
|
| 6974 | + */ |
|
| 6975 | 6975 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6976 | 6976 | { |
| 6977 | 6977 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7005,11 +7005,11 @@ discard block |
||
| 7005 | 7005 | |
| 7006 | 7006 | |
| 7007 | 7007 | /** |
| 7008 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7009 | - * |
|
| 7010 | - * @return Array the airport list |
|
| 7011 | - * |
|
| 7012 | - */ |
|
| 7008 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7009 | + * |
|
| 7010 | + * @return Array the airport list |
|
| 7011 | + * |
|
| 7012 | + */ |
|
| 7013 | 7013 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 7014 | 7014 | { |
| 7015 | 7015 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7040,11 +7040,11 @@ discard block |
||
| 7040 | 7040 | |
| 7041 | 7041 | |
| 7042 | 7042 | /** |
| 7043 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7044 | - * |
|
| 7045 | - * @return Array the airport list |
|
| 7046 | - * |
|
| 7047 | - */ |
|
| 7043 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7044 | + * |
|
| 7045 | + * @return Array the airport list |
|
| 7046 | + * |
|
| 7047 | + */ |
|
| 7048 | 7048 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
| 7049 | 7049 | { |
| 7050 | 7050 | global $globalTimezone, $globalDBdriver; |
@@ -7090,11 +7090,11 @@ discard block |
||
| 7090 | 7090 | |
| 7091 | 7091 | |
| 7092 | 7092 | /** |
| 7093 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7094 | - * |
|
| 7095 | - * @return Array the airport list |
|
| 7096 | - * |
|
| 7097 | - */ |
|
| 7093 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7094 | + * |
|
| 7095 | + * @return Array the airport list |
|
| 7096 | + * |
|
| 7097 | + */ |
|
| 7098 | 7098 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
| 7099 | 7099 | { |
| 7100 | 7100 | global $globalTimezone, $globalDBdriver; |
@@ -7137,11 +7137,11 @@ discard block |
||
| 7137 | 7137 | |
| 7138 | 7138 | |
| 7139 | 7139 | /** |
| 7140 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7141 | - * |
|
| 7142 | - * @return Array the airport list |
|
| 7143 | - * |
|
| 7144 | - */ |
|
| 7140 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7141 | + * |
|
| 7142 | + * @return Array the airport list |
|
| 7143 | + * |
|
| 7144 | + */ |
|
| 7145 | 7145 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
| 7146 | 7146 | { |
| 7147 | 7147 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7174,11 +7174,11 @@ discard block |
||
| 7174 | 7174 | |
| 7175 | 7175 | |
| 7176 | 7176 | /** |
| 7177 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7178 | - * |
|
| 7179 | - * @return Array the airport list |
|
| 7180 | - * |
|
| 7181 | - */ |
|
| 7177 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7178 | + * |
|
| 7179 | + * @return Array the airport list |
|
| 7180 | + * |
|
| 7181 | + */ |
|
| 7182 | 7182 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
| 7183 | 7183 | { |
| 7184 | 7184 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7209,11 +7209,11 @@ discard block |
||
| 7209 | 7209 | |
| 7210 | 7210 | |
| 7211 | 7211 | /** |
| 7212 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7213 | - * |
|
| 7214 | - * @return Array the airport list |
|
| 7215 | - * |
|
| 7216 | - */ |
|
| 7212 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7213 | + * |
|
| 7214 | + * @return Array the airport list |
|
| 7215 | + * |
|
| 7216 | + */ |
|
| 7217 | 7217 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
| 7218 | 7218 | { |
| 7219 | 7219 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7246,11 +7246,11 @@ discard block |
||
| 7246 | 7246 | |
| 7247 | 7247 | |
| 7248 | 7248 | /** |
| 7249 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7250 | - * |
|
| 7251 | - * @return Array the airport list |
|
| 7252 | - * |
|
| 7253 | - */ |
|
| 7249 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7250 | + * |
|
| 7251 | + * @return Array the airport list |
|
| 7252 | + * |
|
| 7253 | + */ |
|
| 7254 | 7254 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
| 7255 | 7255 | { |
| 7256 | 7256 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7281,11 +7281,11 @@ discard block |
||
| 7281 | 7281 | |
| 7282 | 7282 | |
| 7283 | 7283 | /** |
| 7284 | - * Counts all airport departure countries |
|
| 7285 | - * |
|
| 7286 | - * @return Array the airport departure list |
|
| 7287 | - * |
|
| 7288 | - */ |
|
| 7284 | + * Counts all airport departure countries |
|
| 7285 | + * |
|
| 7286 | + * @return Array the airport departure list |
|
| 7287 | + * |
|
| 7288 | + */ |
|
| 7289 | 7289 | public function countAllDepartureCountries($filters = array()) |
| 7290 | 7290 | { |
| 7291 | 7291 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7315,11 +7315,11 @@ discard block |
||
| 7315 | 7315 | |
| 7316 | 7316 | |
| 7317 | 7317 | /** |
| 7318 | - * Counts all airport arrival countries |
|
| 7319 | - * |
|
| 7320 | - * @return Array the airport arrival list |
|
| 7321 | - * |
|
| 7322 | - */ |
|
| 7318 | + * Counts all airport arrival countries |
|
| 7319 | + * |
|
| 7320 | + * @return Array the airport arrival list |
|
| 7321 | + * |
|
| 7322 | + */ |
|
| 7323 | 7323 | public function countAllArrivalCountries($limit = true,$filters = array()) |
| 7324 | 7324 | { |
| 7325 | 7325 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7352,11 +7352,11 @@ discard block |
||
| 7352 | 7352 | |
| 7353 | 7353 | |
| 7354 | 7354 | /** |
| 7355 | - * Gets all route combinations |
|
| 7356 | - * |
|
| 7357 | - * @return Array the route list |
|
| 7358 | - * |
|
| 7359 | - */ |
|
| 7355 | + * Gets all route combinations |
|
| 7356 | + * |
|
| 7357 | + * @return Array the route list |
|
| 7358 | + * |
|
| 7359 | + */ |
|
| 7360 | 7360 | public function countAllRoutes($filters = array()) |
| 7361 | 7361 | { |
| 7362 | 7362 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7395,11 +7395,11 @@ discard block |
||
| 7395 | 7395 | |
| 7396 | 7396 | |
| 7397 | 7397 | /** |
| 7398 | - * Gets all route combinations based on an aircraft |
|
| 7399 | - * |
|
| 7400 | - * @return Array the route list |
|
| 7401 | - * |
|
| 7402 | - */ |
|
| 7398 | + * Gets all route combinations based on an aircraft |
|
| 7399 | + * |
|
| 7400 | + * @return Array the route list |
|
| 7401 | + * |
|
| 7402 | + */ |
|
| 7403 | 7403 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
| 7404 | 7404 | { |
| 7405 | 7405 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7435,11 +7435,11 @@ discard block |
||
| 7435 | 7435 | |
| 7436 | 7436 | |
| 7437 | 7437 | /** |
| 7438 | - * Gets all route combinations based on an aircraft registration |
|
| 7439 | - * |
|
| 7440 | - * @return Array the route list |
|
| 7441 | - * |
|
| 7442 | - */ |
|
| 7438 | + * Gets all route combinations based on an aircraft registration |
|
| 7439 | + * |
|
| 7440 | + * @return Array the route list |
|
| 7441 | + * |
|
| 7442 | + */ |
|
| 7443 | 7443 | public function countAllRoutesByRegistration($registration, $filters = array()) |
| 7444 | 7444 | { |
| 7445 | 7445 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7477,11 +7477,11 @@ discard block |
||
| 7477 | 7477 | |
| 7478 | 7478 | |
| 7479 | 7479 | /** |
| 7480 | - * Gets all route combinations based on an airline |
|
| 7481 | - * |
|
| 7482 | - * @return Array the route list |
|
| 7483 | - * |
|
| 7484 | - */ |
|
| 7480 | + * Gets all route combinations based on an airline |
|
| 7481 | + * |
|
| 7482 | + * @return Array the route list |
|
| 7483 | + * |
|
| 7484 | + */ |
|
| 7485 | 7485 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
| 7486 | 7486 | { |
| 7487 | 7487 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7519,11 +7519,11 @@ discard block |
||
| 7519 | 7519 | |
| 7520 | 7520 | |
| 7521 | 7521 | /** |
| 7522 | - * Gets all route combinations based on an airport |
|
| 7523 | - * |
|
| 7524 | - * @return Array the route list |
|
| 7525 | - * |
|
| 7526 | - */ |
|
| 7522 | + * Gets all route combinations based on an airport |
|
| 7523 | + * |
|
| 7524 | + * @return Array the route list |
|
| 7525 | + * |
|
| 7526 | + */ |
|
| 7527 | 7527 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
| 7528 | 7528 | { |
| 7529 | 7529 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7560,11 +7560,11 @@ discard block |
||
| 7560 | 7560 | |
| 7561 | 7561 | |
| 7562 | 7562 | /** |
| 7563 | - * Gets all route combinations based on an country |
|
| 7564 | - * |
|
| 7565 | - * @return Array the route list |
|
| 7566 | - * |
|
| 7567 | - */ |
|
| 7563 | + * Gets all route combinations based on an country |
|
| 7564 | + * |
|
| 7565 | + * @return Array the route list |
|
| 7566 | + * |
|
| 7567 | + */ |
|
| 7568 | 7568 | public function countAllRoutesByCountry($country, $filters = array()) |
| 7569 | 7569 | { |
| 7570 | 7570 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7600,11 +7600,11 @@ discard block |
||
| 7600 | 7600 | |
| 7601 | 7601 | |
| 7602 | 7602 | /** |
| 7603 | - * Gets all route combinations based on an date |
|
| 7604 | - * |
|
| 7605 | - * @return Array the route list |
|
| 7606 | - * |
|
| 7607 | - */ |
|
| 7603 | + * Gets all route combinations based on an date |
|
| 7604 | + * |
|
| 7605 | + * @return Array the route list |
|
| 7606 | + * |
|
| 7607 | + */ |
|
| 7608 | 7608 | public function countAllRoutesByDate($date, $filters = array()) |
| 7609 | 7609 | { |
| 7610 | 7610 | global $globalTimezone, $globalDBdriver; |
@@ -7654,11 +7654,11 @@ discard block |
||
| 7654 | 7654 | |
| 7655 | 7655 | |
| 7656 | 7656 | /** |
| 7657 | - * Gets all route combinations based on an ident/callsign |
|
| 7658 | - * |
|
| 7659 | - * @return Array the route list |
|
| 7660 | - * |
|
| 7661 | - */ |
|
| 7657 | + * Gets all route combinations based on an ident/callsign |
|
| 7658 | + * |
|
| 7659 | + * @return Array the route list |
|
| 7660 | + * |
|
| 7661 | + */ |
|
| 7662 | 7662 | public function countAllRoutesByIdent($ident, $filters = array()) |
| 7663 | 7663 | { |
| 7664 | 7664 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7695,11 +7695,11 @@ discard block |
||
| 7695 | 7695 | |
| 7696 | 7696 | |
| 7697 | 7697 | /** |
| 7698 | - * Gets all route combinations based on an manufacturer |
|
| 7699 | - * |
|
| 7700 | - * @return Array the route list |
|
| 7701 | - * |
|
| 7702 | - */ |
|
| 7698 | + * Gets all route combinations based on an manufacturer |
|
| 7699 | + * |
|
| 7700 | + * @return Array the route list |
|
| 7701 | + * |
|
| 7702 | + */ |
|
| 7703 | 7703 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
| 7704 | 7704 | { |
| 7705 | 7705 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7737,11 +7737,11 @@ discard block |
||
| 7737 | 7737 | |
| 7738 | 7738 | |
| 7739 | 7739 | /** |
| 7740 | - * Gets all route combinations with waypoints |
|
| 7741 | - * |
|
| 7742 | - * @return Array the route list |
|
| 7743 | - * |
|
| 7744 | - */ |
|
| 7740 | + * Gets all route combinations with waypoints |
|
| 7741 | + * |
|
| 7742 | + * @return Array the route list |
|
| 7743 | + * |
|
| 7744 | + */ |
|
| 7745 | 7745 | public function countAllRoutesWithWaypoints($filters = array()) |
| 7746 | 7746 | { |
| 7747 | 7747 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7778,11 +7778,11 @@ discard block |
||
| 7778 | 7778 | } |
| 7779 | 7779 | |
| 7780 | 7780 | /** |
| 7781 | - * Gets all callsigns that have flown over |
|
| 7782 | - * |
|
| 7783 | - * @return Array the callsign list |
|
| 7784 | - * |
|
| 7785 | - */ |
|
| 7781 | + * Gets all callsigns that have flown over |
|
| 7782 | + * |
|
| 7783 | + * @return Array the callsign list |
|
| 7784 | + * |
|
| 7785 | + */ |
|
| 7786 | 7786 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 7787 | 7787 | { |
| 7788 | 7788 | global $globalDBdriver; |
@@ -7820,11 +7820,11 @@ discard block |
||
| 7820 | 7820 | } |
| 7821 | 7821 | |
| 7822 | 7822 | /** |
| 7823 | - * Gets all callsigns that have flown over |
|
| 7824 | - * |
|
| 7825 | - * @return Array the callsign list |
|
| 7826 | - * |
|
| 7827 | - */ |
|
| 7823 | + * Gets all callsigns that have flown over |
|
| 7824 | + * |
|
| 7825 | + * @return Array the callsign list |
|
| 7826 | + * |
|
| 7827 | + */ |
|
| 7828 | 7828 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
| 7829 | 7829 | { |
| 7830 | 7830 | global $globalDBdriver; |
@@ -7865,11 +7865,11 @@ discard block |
||
| 7865 | 7865 | |
| 7866 | 7866 | |
| 7867 | 7867 | /** |
| 7868 | - * Counts all dates |
|
| 7869 | - * |
|
| 7870 | - * @return Array the date list |
|
| 7871 | - * |
|
| 7872 | - */ |
|
| 7868 | + * Counts all dates |
|
| 7869 | + * |
|
| 7870 | + * @return Array the date list |
|
| 7871 | + * |
|
| 7872 | + */ |
|
| 7873 | 7873 | public function countAllDates($filters = array()) |
| 7874 | 7874 | { |
| 7875 | 7875 | global $globalTimezone, $globalDBdriver; |
@@ -7914,11 +7914,11 @@ discard block |
||
| 7914 | 7914 | } |
| 7915 | 7915 | |
| 7916 | 7916 | /** |
| 7917 | - * Counts all dates |
|
| 7918 | - * |
|
| 7919 | - * @return Array the date list |
|
| 7920 | - * |
|
| 7921 | - */ |
|
| 7917 | + * Counts all dates |
|
| 7918 | + * |
|
| 7919 | + * @return Array the date list |
|
| 7920 | + * |
|
| 7921 | + */ |
|
| 7922 | 7922 | public function countAllDatesByAirlines($filters = array()) |
| 7923 | 7923 | { |
| 7924 | 7924 | global $globalTimezone, $globalDBdriver; |
@@ -7963,11 +7963,11 @@ discard block |
||
| 7963 | 7963 | } |
| 7964 | 7964 | |
| 7965 | 7965 | /** |
| 7966 | - * Counts all dates during the last 7 days |
|
| 7967 | - * |
|
| 7968 | - * @return Array the date list |
|
| 7969 | - * |
|
| 7970 | - */ |
|
| 7966 | + * Counts all dates during the last 7 days |
|
| 7967 | + * |
|
| 7968 | + * @return Array the date list |
|
| 7969 | + * |
|
| 7970 | + */ |
|
| 7971 | 7971 | public function countAllDatesLast7Days($filters = array()) |
| 7972 | 7972 | { |
| 7973 | 7973 | global $globalTimezone, $globalDBdriver; |
@@ -7989,7 +7989,7 @@ discard block |
||
| 7989 | 7989 | $query .= " GROUP BY date_name |
| 7990 | 7990 | ORDER BY date_name ASC"; |
| 7991 | 7991 | $query_data = array(':offset' => $offset); |
| 7992 | - } |
|
| 7992 | + } |
|
| 7993 | 7993 | |
| 7994 | 7994 | $sth = $this->db->prepare($query); |
| 7995 | 7995 | $sth->execute($query_data); |
@@ -8009,11 +8009,11 @@ discard block |
||
| 8009 | 8009 | } |
| 8010 | 8010 | |
| 8011 | 8011 | /** |
| 8012 | - * Counts all dates during the last month |
|
| 8013 | - * |
|
| 8014 | - * @return Array the date list |
|
| 8015 | - * |
|
| 8016 | - */ |
|
| 8012 | + * Counts all dates during the last month |
|
| 8013 | + * |
|
| 8014 | + * @return Array the date list |
|
| 8015 | + * |
|
| 8016 | + */ |
|
| 8017 | 8017 | public function countAllDatesLastMonth($filters = array()) |
| 8018 | 8018 | { |
| 8019 | 8019 | global $globalTimezone, $globalDBdriver; |
@@ -8035,7 +8035,7 @@ discard block |
||
| 8035 | 8035 | $query .= " GROUP BY date_name |
| 8036 | 8036 | ORDER BY date_name ASC"; |
| 8037 | 8037 | $query_data = array(':offset' => $offset); |
| 8038 | - } |
|
| 8038 | + } |
|
| 8039 | 8039 | |
| 8040 | 8040 | $sth = $this->db->prepare($query); |
| 8041 | 8041 | $sth->execute($query_data); |
@@ -8056,11 +8056,11 @@ discard block |
||
| 8056 | 8056 | |
| 8057 | 8057 | |
| 8058 | 8058 | /** |
| 8059 | - * Counts all dates during the last month |
|
| 8060 | - * |
|
| 8061 | - * @return Array the date list |
|
| 8062 | - * |
|
| 8063 | - */ |
|
| 8059 | + * Counts all dates during the last month |
|
| 8060 | + * |
|
| 8061 | + * @return Array the date list |
|
| 8062 | + * |
|
| 8063 | + */ |
|
| 8064 | 8064 | public function countAllDatesLastMonthByAirlines($filters = array()) |
| 8065 | 8065 | { |
| 8066 | 8066 | global $globalTimezone, $globalDBdriver; |
@@ -8083,7 +8083,7 @@ discard block |
||
| 8083 | 8083 | GROUP BY spotter_output.airline_icao, date_name |
| 8084 | 8084 | ORDER BY date_name ASC"; |
| 8085 | 8085 | $query_data = array(':offset' => $offset); |
| 8086 | - } |
|
| 8086 | + } |
|
| 8087 | 8087 | |
| 8088 | 8088 | $sth = $this->db->prepare($query); |
| 8089 | 8089 | $sth->execute($query_data); |
@@ -8105,11 +8105,11 @@ discard block |
||
| 8105 | 8105 | |
| 8106 | 8106 | |
| 8107 | 8107 | /** |
| 8108 | - * Counts all month |
|
| 8109 | - * |
|
| 8110 | - * @return Array the month list |
|
| 8111 | - * |
|
| 8112 | - */ |
|
| 8108 | + * Counts all month |
|
| 8109 | + * |
|
| 8110 | + * @return Array the month list |
|
| 8111 | + * |
|
| 8112 | + */ |
|
| 8113 | 8113 | public function countAllMonths($filters = array()) |
| 8114 | 8114 | { |
| 8115 | 8115 | global $globalTimezone, $globalDBdriver; |
@@ -8151,11 +8151,11 @@ discard block |
||
| 8151 | 8151 | } |
| 8152 | 8152 | |
| 8153 | 8153 | /** |
| 8154 | - * Counts all month |
|
| 8155 | - * |
|
| 8156 | - * @return Array the month list |
|
| 8157 | - * |
|
| 8158 | - */ |
|
| 8154 | + * Counts all month |
|
| 8155 | + * |
|
| 8156 | + * @return Array the month list |
|
| 8157 | + * |
|
| 8158 | + */ |
|
| 8159 | 8159 | public function countAllMonthsByAirlines($filters = array()) |
| 8160 | 8160 | { |
| 8161 | 8161 | global $globalTimezone, $globalDBdriver; |
@@ -8200,11 +8200,11 @@ discard block |
||
| 8200 | 8200 | } |
| 8201 | 8201 | |
| 8202 | 8202 | /** |
| 8203 | - * Counts all military month |
|
| 8204 | - * |
|
| 8205 | - * @return Array the month list |
|
| 8206 | - * |
|
| 8207 | - */ |
|
| 8203 | + * Counts all military month |
|
| 8204 | + * |
|
| 8205 | + * @return Array the month list |
|
| 8206 | + * |
|
| 8207 | + */ |
|
| 8208 | 8208 | public function countAllMilitaryMonths($filters = array()) |
| 8209 | 8209 | { |
| 8210 | 8210 | global $globalTimezone, $globalDBdriver; |
@@ -8245,11 +8245,11 @@ discard block |
||
| 8245 | 8245 | } |
| 8246 | 8246 | |
| 8247 | 8247 | /** |
| 8248 | - * Counts all month owners |
|
| 8249 | - * |
|
| 8250 | - * @return Array the month list |
|
| 8251 | - * |
|
| 8252 | - */ |
|
| 8248 | + * Counts all month owners |
|
| 8249 | + * |
|
| 8250 | + * @return Array the month list |
|
| 8251 | + * |
|
| 8252 | + */ |
|
| 8253 | 8253 | public function countAllMonthsOwners($filters = array()) |
| 8254 | 8254 | { |
| 8255 | 8255 | global $globalTimezone, $globalDBdriver; |
@@ -8291,11 +8291,11 @@ discard block |
||
| 8291 | 8291 | } |
| 8292 | 8292 | |
| 8293 | 8293 | /** |
| 8294 | - * Counts all month owners |
|
| 8295 | - * |
|
| 8296 | - * @return Array the month list |
|
| 8297 | - * |
|
| 8298 | - */ |
|
| 8294 | + * Counts all month owners |
|
| 8295 | + * |
|
| 8296 | + * @return Array the month list |
|
| 8297 | + * |
|
| 8298 | + */ |
|
| 8299 | 8299 | public function countAllMonthsOwnersByAirlines($filters = array()) |
| 8300 | 8300 | { |
| 8301 | 8301 | global $globalTimezone, $globalDBdriver; |
@@ -8338,11 +8338,11 @@ discard block |
||
| 8338 | 8338 | } |
| 8339 | 8339 | |
| 8340 | 8340 | /** |
| 8341 | - * Counts all month pilot |
|
| 8342 | - * |
|
| 8343 | - * @return Array the month list |
|
| 8344 | - * |
|
| 8345 | - */ |
|
| 8341 | + * Counts all month pilot |
|
| 8342 | + * |
|
| 8343 | + * @return Array the month list |
|
| 8344 | + * |
|
| 8345 | + */ |
|
| 8346 | 8346 | public function countAllMonthsPilots($filters = array()) |
| 8347 | 8347 | { |
| 8348 | 8348 | global $globalTimezone, $globalDBdriver; |
@@ -8384,11 +8384,11 @@ discard block |
||
| 8384 | 8384 | } |
| 8385 | 8385 | |
| 8386 | 8386 | /** |
| 8387 | - * Counts all month pilot |
|
| 8388 | - * |
|
| 8389 | - * @return Array the month list |
|
| 8390 | - * |
|
| 8391 | - */ |
|
| 8387 | + * Counts all month pilot |
|
| 8388 | + * |
|
| 8389 | + * @return Array the month list |
|
| 8390 | + * |
|
| 8391 | + */ |
|
| 8392 | 8392 | public function countAllMonthsPilotsByAirlines($filters = array()) |
| 8393 | 8393 | { |
| 8394 | 8394 | global $globalTimezone, $globalDBdriver; |
@@ -8431,11 +8431,11 @@ discard block |
||
| 8431 | 8431 | } |
| 8432 | 8432 | |
| 8433 | 8433 | /** |
| 8434 | - * Counts all month airline |
|
| 8435 | - * |
|
| 8436 | - * @return Array the month list |
|
| 8437 | - * |
|
| 8438 | - */ |
|
| 8434 | + * Counts all month airline |
|
| 8435 | + * |
|
| 8436 | + * @return Array the month list |
|
| 8437 | + * |
|
| 8438 | + */ |
|
| 8439 | 8439 | public function countAllMonthsAirlines($filters = array()) |
| 8440 | 8440 | { |
| 8441 | 8441 | global $globalTimezone, $globalDBdriver; |
@@ -8477,11 +8477,11 @@ discard block |
||
| 8477 | 8477 | } |
| 8478 | 8478 | |
| 8479 | 8479 | /** |
| 8480 | - * Counts all month aircraft |
|
| 8481 | - * |
|
| 8482 | - * @return Array the month list |
|
| 8483 | - * |
|
| 8484 | - */ |
|
| 8480 | + * Counts all month aircraft |
|
| 8481 | + * |
|
| 8482 | + * @return Array the month list |
|
| 8483 | + * |
|
| 8484 | + */ |
|
| 8485 | 8485 | public function countAllMonthsAircrafts($filters = array()) |
| 8486 | 8486 | { |
| 8487 | 8487 | global $globalTimezone, $globalDBdriver; |
@@ -8524,11 +8524,11 @@ discard block |
||
| 8524 | 8524 | |
| 8525 | 8525 | |
| 8526 | 8526 | /** |
| 8527 | - * Counts all month aircraft |
|
| 8528 | - * |
|
| 8529 | - * @return Array the month list |
|
| 8530 | - * |
|
| 8531 | - */ |
|
| 8527 | + * Counts all month aircraft |
|
| 8528 | + * |
|
| 8529 | + * @return Array the month list |
|
| 8530 | + * |
|
| 8531 | + */ |
|
| 8532 | 8532 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
| 8533 | 8533 | { |
| 8534 | 8534 | global $globalTimezone, $globalDBdriver; |
@@ -8571,11 +8571,11 @@ discard block |
||
| 8571 | 8571 | } |
| 8572 | 8572 | |
| 8573 | 8573 | /** |
| 8574 | - * Counts all month real arrival |
|
| 8575 | - * |
|
| 8576 | - * @return Array the month list |
|
| 8577 | - * |
|
| 8578 | - */ |
|
| 8574 | + * Counts all month real arrival |
|
| 8575 | + * |
|
| 8576 | + * @return Array the month list |
|
| 8577 | + * |
|
| 8578 | + */ |
|
| 8579 | 8579 | public function countAllMonthsRealArrivals($filters = array()) |
| 8580 | 8580 | { |
| 8581 | 8581 | global $globalTimezone, $globalDBdriver; |
@@ -8618,11 +8618,11 @@ discard block |
||
| 8618 | 8618 | |
| 8619 | 8619 | |
| 8620 | 8620 | /** |
| 8621 | - * Counts all month real arrival |
|
| 8622 | - * |
|
| 8623 | - * @return Array the month list |
|
| 8624 | - * |
|
| 8625 | - */ |
|
| 8621 | + * Counts all month real arrival |
|
| 8622 | + * |
|
| 8623 | + * @return Array the month list |
|
| 8624 | + * |
|
| 8625 | + */ |
|
| 8626 | 8626 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
| 8627 | 8627 | { |
| 8628 | 8628 | global $globalTimezone, $globalDBdriver; |
@@ -8666,11 +8666,11 @@ discard block |
||
| 8666 | 8666 | |
| 8667 | 8667 | |
| 8668 | 8668 | /** |
| 8669 | - * Counts all dates during the last year |
|
| 8670 | - * |
|
| 8671 | - * @return Array the date list |
|
| 8672 | - * |
|
| 8673 | - */ |
|
| 8669 | + * Counts all dates during the last year |
|
| 8670 | + * |
|
| 8671 | + * @return Array the date list |
|
| 8672 | + * |
|
| 8673 | + */ |
|
| 8674 | 8674 | public function countAllMonthsLastYear($filters) |
| 8675 | 8675 | { |
| 8676 | 8676 | global $globalTimezone, $globalDBdriver; |
@@ -8692,7 +8692,7 @@ discard block |
||
| 8692 | 8692 | $query .= " GROUP BY year_name, month_name |
| 8693 | 8693 | ORDER BY year_name, month_name ASC"; |
| 8694 | 8694 | $query_data = array(':offset' => $offset); |
| 8695 | - } |
|
| 8695 | + } |
|
| 8696 | 8696 | |
| 8697 | 8697 | $sth = $this->db->prepare($query); |
| 8698 | 8698 | $sth->execute($query_data); |
@@ -8715,11 +8715,11 @@ discard block |
||
| 8715 | 8715 | |
| 8716 | 8716 | |
| 8717 | 8717 | /** |
| 8718 | - * Counts all hours |
|
| 8719 | - * |
|
| 8720 | - * @return Array the hour list |
|
| 8721 | - * |
|
| 8722 | - */ |
|
| 8718 | + * Counts all hours |
|
| 8719 | + * |
|
| 8720 | + * @return Array the hour list |
|
| 8721 | + * |
|
| 8722 | + */ |
|
| 8723 | 8723 | public function countAllHours($orderby,$filters = array()) |
| 8724 | 8724 | { |
| 8725 | 8725 | global $globalTimezone, $globalDBdriver; |
@@ -8780,11 +8780,11 @@ discard block |
||
| 8780 | 8780 | } |
| 8781 | 8781 | |
| 8782 | 8782 | /** |
| 8783 | - * Counts all hours |
|
| 8784 | - * |
|
| 8785 | - * @return Array the hour list |
|
| 8786 | - * |
|
| 8787 | - */ |
|
| 8783 | + * Counts all hours |
|
| 8784 | + * |
|
| 8785 | + * @return Array the hour list |
|
| 8786 | + * |
|
| 8787 | + */ |
|
| 8788 | 8788 | public function countAllHoursByAirlines($orderby, $filters = array()) |
| 8789 | 8789 | { |
| 8790 | 8790 | global $globalTimezone, $globalDBdriver; |
@@ -8847,11 +8847,11 @@ discard block |
||
| 8847 | 8847 | |
| 8848 | 8848 | |
| 8849 | 8849 | /** |
| 8850 | - * Counts all hours by airline |
|
| 8851 | - * |
|
| 8852 | - * @return Array the hour list |
|
| 8853 | - * |
|
| 8854 | - */ |
|
| 8850 | + * Counts all hours by airline |
|
| 8851 | + * |
|
| 8852 | + * @return Array the hour list |
|
| 8853 | + * |
|
| 8854 | + */ |
|
| 8855 | 8855 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
| 8856 | 8856 | { |
| 8857 | 8857 | global $globalTimezone, $globalDBdriver; |
@@ -8897,11 +8897,11 @@ discard block |
||
| 8897 | 8897 | |
| 8898 | 8898 | |
| 8899 | 8899 | /** |
| 8900 | - * Counts all hours by aircraft |
|
| 8901 | - * |
|
| 8902 | - * @return Array the hour list |
|
| 8903 | - * |
|
| 8904 | - */ |
|
| 8900 | + * Counts all hours by aircraft |
|
| 8901 | + * |
|
| 8902 | + * @return Array the hour list |
|
| 8903 | + * |
|
| 8904 | + */ |
|
| 8905 | 8905 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
| 8906 | 8906 | { |
| 8907 | 8907 | global $globalTimezone, $globalDBdriver; |
@@ -8944,11 +8944,11 @@ discard block |
||
| 8944 | 8944 | |
| 8945 | 8945 | |
| 8946 | 8946 | /** |
| 8947 | - * Counts all hours by aircraft registration |
|
| 8948 | - * |
|
| 8949 | - * @return Array the hour list |
|
| 8950 | - * |
|
| 8951 | - */ |
|
| 8947 | + * Counts all hours by aircraft registration |
|
| 8948 | + * |
|
| 8949 | + * @return Array the hour list |
|
| 8950 | + * |
|
| 8951 | + */ |
|
| 8952 | 8952 | public function countAllHoursByRegistration($registration, $filters = array()) |
| 8953 | 8953 | { |
| 8954 | 8954 | global $globalTimezone, $globalDBdriver; |
@@ -8991,11 +8991,11 @@ discard block |
||
| 8991 | 8991 | |
| 8992 | 8992 | |
| 8993 | 8993 | /** |
| 8994 | - * Counts all hours by airport |
|
| 8995 | - * |
|
| 8996 | - * @return Array the hour list |
|
| 8997 | - * |
|
| 8998 | - */ |
|
| 8994 | + * Counts all hours by airport |
|
| 8995 | + * |
|
| 8996 | + * @return Array the hour list |
|
| 8997 | + * |
|
| 8998 | + */ |
|
| 8999 | 8999 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
| 9000 | 9000 | { |
| 9001 | 9001 | global $globalTimezone, $globalDBdriver; |
@@ -9039,11 +9039,11 @@ discard block |
||
| 9039 | 9039 | |
| 9040 | 9040 | |
| 9041 | 9041 | /** |
| 9042 | - * Counts all hours by manufacturer |
|
| 9043 | - * |
|
| 9044 | - * @return Array the hour list |
|
| 9045 | - * |
|
| 9046 | - */ |
|
| 9042 | + * Counts all hours by manufacturer |
|
| 9043 | + * |
|
| 9044 | + * @return Array the hour list |
|
| 9045 | + * |
|
| 9046 | + */ |
|
| 9047 | 9047 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
| 9048 | 9048 | { |
| 9049 | 9049 | global $globalTimezone, $globalDBdriver; |
@@ -9087,11 +9087,11 @@ discard block |
||
| 9087 | 9087 | |
| 9088 | 9088 | |
| 9089 | 9089 | /** |
| 9090 | - * Counts all hours by date |
|
| 9091 | - * |
|
| 9092 | - * @return Array the hour list |
|
| 9093 | - * |
|
| 9094 | - */ |
|
| 9090 | + * Counts all hours by date |
|
| 9091 | + * |
|
| 9092 | + * @return Array the hour list |
|
| 9093 | + * |
|
| 9094 | + */ |
|
| 9095 | 9095 | public function countAllHoursByDate($date, $filters = array()) |
| 9096 | 9096 | { |
| 9097 | 9097 | global $globalTimezone, $globalDBdriver; |
@@ -9135,11 +9135,11 @@ discard block |
||
| 9135 | 9135 | |
| 9136 | 9136 | |
| 9137 | 9137 | /** |
| 9138 | - * Counts all hours by a ident/callsign |
|
| 9139 | - * |
|
| 9140 | - * @return Array the hour list |
|
| 9141 | - * |
|
| 9142 | - */ |
|
| 9138 | + * Counts all hours by a ident/callsign |
|
| 9139 | + * |
|
| 9140 | + * @return Array the hour list |
|
| 9141 | + * |
|
| 9142 | + */ |
|
| 9143 | 9143 | public function countAllHoursByIdent($ident, $filters = array()) |
| 9144 | 9144 | { |
| 9145 | 9145 | global $globalTimezone, $globalDBdriver; |
@@ -9184,11 +9184,11 @@ discard block |
||
| 9184 | 9184 | |
| 9185 | 9185 | |
| 9186 | 9186 | /** |
| 9187 | - * Counts all hours by route |
|
| 9188 | - * |
|
| 9189 | - * @return Array the hour list |
|
| 9190 | - * |
|
| 9191 | - */ |
|
| 9187 | + * Counts all hours by route |
|
| 9188 | + * |
|
| 9189 | + * @return Array the hour list |
|
| 9190 | + * |
|
| 9191 | + */ |
|
| 9192 | 9192 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
| 9193 | 9193 | { |
| 9194 | 9194 | global $globalTimezone, $globalDBdriver; |
@@ -9232,11 +9232,11 @@ discard block |
||
| 9232 | 9232 | |
| 9233 | 9233 | |
| 9234 | 9234 | /** |
| 9235 | - * Counts all hours by country |
|
| 9236 | - * |
|
| 9237 | - * @return Array the hour list |
|
| 9238 | - * |
|
| 9239 | - */ |
|
| 9235 | + * Counts all hours by country |
|
| 9236 | + * |
|
| 9237 | + * @return Array the hour list |
|
| 9238 | + * |
|
| 9239 | + */ |
|
| 9240 | 9240 | public function countAllHoursByCountry($country, $filters = array()) |
| 9241 | 9241 | { |
| 9242 | 9242 | global $globalTimezone, $globalDBdriver; |
@@ -9281,11 +9281,11 @@ discard block |
||
| 9281 | 9281 | |
| 9282 | 9282 | |
| 9283 | 9283 | /** |
| 9284 | - * Counts all aircraft that have flown over |
|
| 9285 | - * |
|
| 9286 | - * @return Integer the number of aircrafts |
|
| 9287 | - * |
|
| 9288 | - */ |
|
| 9284 | + * Counts all aircraft that have flown over |
|
| 9285 | + * |
|
| 9286 | + * @return Integer the number of aircrafts |
|
| 9287 | + * |
|
| 9288 | + */ |
|
| 9289 | 9289 | public function countOverallAircrafts($filters = array()) |
| 9290 | 9290 | { |
| 9291 | 9291 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9297,11 +9297,11 @@ discard block |
||
| 9297 | 9297 | } |
| 9298 | 9298 | |
| 9299 | 9299 | /** |
| 9300 | - * Counts all flight that really arrival |
|
| 9301 | - * |
|
| 9302 | - * @return Integer the number of aircrafts |
|
| 9303 | - * |
|
| 9304 | - */ |
|
| 9300 | + * Counts all flight that really arrival |
|
| 9301 | + * |
|
| 9302 | + * @return Integer the number of aircrafts |
|
| 9303 | + * |
|
| 9304 | + */ |
|
| 9305 | 9305 | public function countOverallArrival($filters = array()) |
| 9306 | 9306 | { |
| 9307 | 9307 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9314,11 +9314,11 @@ discard block |
||
| 9314 | 9314 | } |
| 9315 | 9315 | |
| 9316 | 9316 | /** |
| 9317 | - * Counts all pilots that have flown over |
|
| 9318 | - * |
|
| 9319 | - * @return Integer the number of pilots |
|
| 9320 | - * |
|
| 9321 | - */ |
|
| 9317 | + * Counts all pilots that have flown over |
|
| 9318 | + * |
|
| 9319 | + * @return Integer the number of pilots |
|
| 9320 | + * |
|
| 9321 | + */ |
|
| 9322 | 9322 | public function countOverallPilots($filters = array()) |
| 9323 | 9323 | { |
| 9324 | 9324 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9330,11 +9330,11 @@ discard block |
||
| 9330 | 9330 | } |
| 9331 | 9331 | |
| 9332 | 9332 | /** |
| 9333 | - * Counts all owners that have flown over |
|
| 9334 | - * |
|
| 9335 | - * @return Integer the number of owners |
|
| 9336 | - * |
|
| 9337 | - */ |
|
| 9333 | + * Counts all owners that have flown over |
|
| 9334 | + * |
|
| 9335 | + * @return Integer the number of owners |
|
| 9336 | + * |
|
| 9337 | + */ |
|
| 9338 | 9338 | public function countOverallOwners($filters = array()) |
| 9339 | 9339 | { |
| 9340 | 9340 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9347,11 +9347,11 @@ discard block |
||
| 9347 | 9347 | |
| 9348 | 9348 | |
| 9349 | 9349 | /** |
| 9350 | - * Counts all flights that have flown over |
|
| 9351 | - * |
|
| 9352 | - * @return Integer the number of flights |
|
| 9353 | - * |
|
| 9354 | - */ |
|
| 9350 | + * Counts all flights that have flown over |
|
| 9351 | + * |
|
| 9352 | + * @return Integer the number of flights |
|
| 9353 | + * |
|
| 9354 | + */ |
|
| 9355 | 9355 | public function countOverallFlights($filters = array()) |
| 9356 | 9356 | { |
| 9357 | 9357 | $query = "SELECT COUNT(spotter_output.spotter_id) AS flight_count |
@@ -9364,11 +9364,11 @@ discard block |
||
| 9364 | 9364 | } |
| 9365 | 9365 | |
| 9366 | 9366 | /** |
| 9367 | - * Counts all military flights that have flown over |
|
| 9368 | - * |
|
| 9369 | - * @return Integer the number of flights |
|
| 9370 | - * |
|
| 9371 | - */ |
|
| 9367 | + * Counts all military flights that have flown over |
|
| 9368 | + * |
|
| 9369 | + * @return Integer the number of flights |
|
| 9370 | + * |
|
| 9371 | + */ |
|
| 9372 | 9372 | public function countOverallMilitaryFlights($filters = array()) |
| 9373 | 9373 | { |
| 9374 | 9374 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9383,11 +9383,11 @@ discard block |
||
| 9383 | 9383 | |
| 9384 | 9384 | |
| 9385 | 9385 | /** |
| 9386 | - * Counts all airlines that have flown over |
|
| 9387 | - * |
|
| 9388 | - * @return Integer the number of airlines |
|
| 9389 | - * |
|
| 9390 | - */ |
|
| 9386 | + * Counts all airlines that have flown over |
|
| 9387 | + * |
|
| 9388 | + * @return Integer the number of airlines |
|
| 9389 | + * |
|
| 9390 | + */ |
|
| 9391 | 9391 | public function countOverallAirlines($filters = array()) |
| 9392 | 9392 | { |
| 9393 | 9393 | $query = "SELECT COUNT(DISTINCT spotter_output.airline_name) AS airline_count |
@@ -9401,11 +9401,11 @@ discard block |
||
| 9401 | 9401 | |
| 9402 | 9402 | |
| 9403 | 9403 | /** |
| 9404 | - * Counts all hours of today |
|
| 9405 | - * |
|
| 9406 | - * @return Array the hour list |
|
| 9407 | - * |
|
| 9408 | - */ |
|
| 9404 | + * Counts all hours of today |
|
| 9405 | + * |
|
| 9406 | + * @return Array the hour list |
|
| 9407 | + * |
|
| 9408 | + */ |
|
| 9409 | 9409 | public function countAllHoursFromToday($filters = array()) |
| 9410 | 9410 | { |
| 9411 | 9411 | global $globalTimezone, $globalDBdriver; |
@@ -9445,11 +9445,11 @@ discard block |
||
| 9445 | 9445 | } |
| 9446 | 9446 | |
| 9447 | 9447 | /** |
| 9448 | - * Gets all the spotter information based on calculated upcoming flights |
|
| 9449 | - * |
|
| 9450 | - * @return Array the spotter information |
|
| 9451 | - * |
|
| 9452 | - */ |
|
| 9448 | + * Gets all the spotter information based on calculated upcoming flights |
|
| 9449 | + * |
|
| 9450 | + * @return Array the spotter information |
|
| 9451 | + * |
|
| 9452 | + */ |
|
| 9453 | 9453 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
| 9454 | 9454 | { |
| 9455 | 9455 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -9524,12 +9524,12 @@ discard block |
||
| 9524 | 9524 | } |
| 9525 | 9525 | |
| 9526 | 9526 | |
| 9527 | - /** |
|
| 9528 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 9529 | - * |
|
| 9530 | - * @return Integer the Barrie Spotter ID |
|
| 9527 | + /** |
|
| 9528 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 9529 | + * |
|
| 9530 | + * @return Integer the Barrie Spotter ID |
|
| 9531 | 9531 | q * |
| 9532 | - */ |
|
| 9532 | + */ |
|
| 9533 | 9533 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
| 9534 | 9534 | { |
| 9535 | 9535 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -9550,13 +9550,13 @@ discard block |
||
| 9550 | 9550 | |
| 9551 | 9551 | |
| 9552 | 9552 | /** |
| 9553 | - * Parses a date string |
|
| 9554 | - * |
|
| 9555 | - * @param String $dateString the date string |
|
| 9556 | - * @param String $timezone the timezone of a user |
|
| 9557 | - * @return Array the time information |
|
| 9558 | - * |
|
| 9559 | - */ |
|
| 9553 | + * Parses a date string |
|
| 9554 | + * |
|
| 9555 | + * @param String $dateString the date string |
|
| 9556 | + * @param String $timezone the timezone of a user |
|
| 9557 | + * @return Array the time information |
|
| 9558 | + * |
|
| 9559 | + */ |
|
| 9560 | 9560 | public function parseDateString($dateString, $timezone = '') |
| 9561 | 9561 | { |
| 9562 | 9562 | $time_array = array(); |
@@ -9592,12 +9592,12 @@ discard block |
||
| 9592 | 9592 | |
| 9593 | 9593 | |
| 9594 | 9594 | /** |
| 9595 | - * Parses the direction degrees to working |
|
| 9596 | - * |
|
| 9597 | - * @param Float $direction the direction in degrees |
|
| 9598 | - * @return Array the direction information |
|
| 9599 | - * |
|
| 9600 | - */ |
|
| 9595 | + * Parses the direction degrees to working |
|
| 9596 | + * |
|
| 9597 | + * @param Float $direction the direction in degrees |
|
| 9598 | + * @return Array the direction information |
|
| 9599 | + * |
|
| 9600 | + */ |
|
| 9601 | 9601 | public function parseDirection($direction = 0) |
| 9602 | 9602 | { |
| 9603 | 9603 | if ($direction == '') $direction = 0; |
@@ -9676,12 +9676,12 @@ discard block |
||
| 9676 | 9676 | |
| 9677 | 9677 | |
| 9678 | 9678 | /** |
| 9679 | - * Gets the aircraft registration |
|
| 9680 | - * |
|
| 9681 | - * @param String $flightaware_id the flight aware id |
|
| 9682 | - * @return String the aircraft registration |
|
| 9683 | - * |
|
| 9684 | - */ |
|
| 9679 | + * Gets the aircraft registration |
|
| 9680 | + * |
|
| 9681 | + * @param String $flightaware_id the flight aware id |
|
| 9682 | + * @return String the aircraft registration |
|
| 9683 | + * |
|
| 9684 | + */ |
|
| 9685 | 9685 | |
| 9686 | 9686 | public function getAircraftRegistration($flightaware_id) |
| 9687 | 9687 | { |
@@ -9710,12 +9710,12 @@ discard block |
||
| 9710 | 9710 | |
| 9711 | 9711 | |
| 9712 | 9712 | /** |
| 9713 | - * Gets the aircraft registration from ModeS |
|
| 9714 | - * |
|
| 9715 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 9716 | - * @return String the aircraft registration |
|
| 9717 | - * |
|
| 9718 | - */ |
|
| 9713 | + * Gets the aircraft registration from ModeS |
|
| 9714 | + * |
|
| 9715 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 9716 | + * @return String the aircraft registration |
|
| 9717 | + * |
|
| 9718 | + */ |
|
| 9719 | 9719 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
| 9720 | 9720 | { |
| 9721 | 9721 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9728,19 +9728,19 @@ discard block |
||
| 9728 | 9728 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 9729 | 9729 | $sth->closeCursor(); |
| 9730 | 9730 | if (count($row) > 0) { |
| 9731 | - //return $row['Registration']; |
|
| 9732 | - return $row['registration']; |
|
| 9731 | + //return $row['Registration']; |
|
| 9732 | + return $row['registration']; |
|
| 9733 | 9733 | } else return ''; |
| 9734 | 9734 | |
| 9735 | 9735 | } |
| 9736 | 9736 | |
| 9737 | 9737 | /** |
| 9738 | - * Gets the aircraft type from ModeS |
|
| 9739 | - * |
|
| 9740 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 9741 | - * @return String the aircraft type |
|
| 9742 | - * |
|
| 9743 | - */ |
|
| 9738 | + * Gets the aircraft type from ModeS |
|
| 9739 | + * |
|
| 9740 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 9741 | + * @return String the aircraft type |
|
| 9742 | + * |
|
| 9743 | + */ |
|
| 9744 | 9744 | public function getAircraftTypeBymodeS($aircraft_modes) |
| 9745 | 9745 | { |
| 9746 | 9746 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9753,19 +9753,19 @@ discard block |
||
| 9753 | 9753 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 9754 | 9754 | $sth->closeCursor(); |
| 9755 | 9755 | if (count($row) > 0) { |
| 9756 | - if ($row['type_flight'] == null) return ''; |
|
| 9757 | - else return $row['type_flight']; |
|
| 9756 | + if ($row['type_flight'] == null) return ''; |
|
| 9757 | + else return $row['type_flight']; |
|
| 9758 | 9758 | } else return ''; |
| 9759 | 9759 | |
| 9760 | 9760 | } |
| 9761 | 9761 | |
| 9762 | 9762 | /** |
| 9763 | - * Gets Country from latitude/longitude |
|
| 9764 | - * |
|
| 9765 | - * @param Float $latitude latitute of the flight |
|
| 9766 | - * @param Float $longitude longitute of the flight |
|
| 9767 | - * @return String the countrie |
|
| 9768 | - */ |
|
| 9763 | + * Gets Country from latitude/longitude |
|
| 9764 | + * |
|
| 9765 | + * @param Float $latitude latitute of the flight |
|
| 9766 | + * @param Float $longitude longitute of the flight |
|
| 9767 | + * @return String the countrie |
|
| 9768 | + */ |
|
| 9769 | 9769 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
| 9770 | 9770 | { |
| 9771 | 9771 | global $globalDBdriver, $globalDebug; |
@@ -9802,11 +9802,11 @@ discard block |
||
| 9802 | 9802 | } |
| 9803 | 9803 | |
| 9804 | 9804 | /** |
| 9805 | - * Gets Country from iso2 |
|
| 9806 | - * |
|
| 9807 | - * @param String $iso2 ISO2 country code |
|
| 9808 | - * @return String the countrie |
|
| 9809 | - */ |
|
| 9805 | + * Gets Country from iso2 |
|
| 9806 | + * |
|
| 9807 | + * @param String $iso2 ISO2 country code |
|
| 9808 | + * @return String the countrie |
|
| 9809 | + */ |
|
| 9810 | 9810 | public function getCountryFromISO2($iso2) |
| 9811 | 9811 | { |
| 9812 | 9812 | global $globalDBdriver, $globalDebug; |
@@ -9834,12 +9834,12 @@ discard block |
||
| 9834 | 9834 | } |
| 9835 | 9835 | |
| 9836 | 9836 | /** |
| 9837 | - * converts the registration code using the country prefix |
|
| 9838 | - * |
|
| 9839 | - * @param String $registration the aircraft registration |
|
| 9840 | - * @return String the aircraft registration |
|
| 9841 | - * |
|
| 9842 | - */ |
|
| 9837 | + * converts the registration code using the country prefix |
|
| 9838 | + * |
|
| 9839 | + * @param String $registration the aircraft registration |
|
| 9840 | + * @return String the aircraft registration |
|
| 9841 | + * |
|
| 9842 | + */ |
|
| 9843 | 9843 | public function convertAircraftRegistration($registration) |
| 9844 | 9844 | { |
| 9845 | 9845 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9891,12 +9891,12 @@ discard block |
||
| 9891 | 9891 | } |
| 9892 | 9892 | |
| 9893 | 9893 | /** |
| 9894 | - * Country from the registration code |
|
| 9895 | - * |
|
| 9896 | - * @param String $registration the aircraft registration |
|
| 9897 | - * @return String the country |
|
| 9898 | - * |
|
| 9899 | - */ |
|
| 9894 | + * Country from the registration code |
|
| 9895 | + * |
|
| 9896 | + * @param String $registration the aircraft registration |
|
| 9897 | + * @return String the country |
|
| 9898 | + * |
|
| 9899 | + */ |
|
| 9900 | 9900 | public function countryFromAircraftRegistration($registration) |
| 9901 | 9901 | { |
| 9902 | 9902 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9915,8 +9915,8 @@ discard block |
||
| 9915 | 9915 | $country = $row['country']; |
| 9916 | 9916 | } |
| 9917 | 9917 | } else { |
| 9918 | - $registration_1 = substr($registration, 0, 1); |
|
| 9919 | - $registration_2 = substr($registration, 0, 2); |
|
| 9918 | + $registration_1 = substr($registration, 0, 1); |
|
| 9919 | + $registration_2 = substr($registration, 0, 2); |
|
| 9920 | 9920 | |
| 9921 | 9921 | $country = ''; |
| 9922 | 9922 | //first get the prefix based on two characters |
@@ -9952,12 +9952,12 @@ discard block |
||
| 9952 | 9952 | } |
| 9953 | 9953 | |
| 9954 | 9954 | /** |
| 9955 | - * Registration prefix from the registration code |
|
| 9956 | - * |
|
| 9957 | - * @param String $registration the aircraft registration |
|
| 9958 | - * @return String the registration prefix |
|
| 9959 | - * |
|
| 9960 | - */ |
|
| 9955 | + * Registration prefix from the registration code |
|
| 9956 | + * |
|
| 9957 | + * @param String $registration the aircraft registration |
|
| 9958 | + * @return String the registration prefix |
|
| 9959 | + * |
|
| 9960 | + */ |
|
| 9961 | 9961 | public function registrationPrefixFromAircraftRegistration($registration) |
| 9962 | 9962 | { |
| 9963 | 9963 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9976,8 +9976,8 @@ discard block |
||
| 9976 | 9976 | //$country = $row['country']; |
| 9977 | 9977 | } |
| 9978 | 9978 | } else { |
| 9979 | - $registration_1 = substr($registration, 0, 1); |
|
| 9980 | - $registration_2 = substr($registration, 0, 2); |
|
| 9979 | + $registration_1 = substr($registration, 0, 1); |
|
| 9980 | + $registration_2 = substr($registration, 0, 2); |
|
| 9981 | 9981 | |
| 9982 | 9982 | //first get the prefix based on two characters |
| 9983 | 9983 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -10013,12 +10013,12 @@ discard block |
||
| 10013 | 10013 | |
| 10014 | 10014 | |
| 10015 | 10015 | /** |
| 10016 | - * Country from the registration code |
|
| 10017 | - * |
|
| 10018 | - * @param String $registration the aircraft registration |
|
| 10019 | - * @return String the country |
|
| 10020 | - * |
|
| 10021 | - */ |
|
| 10016 | + * Country from the registration code |
|
| 10017 | + * |
|
| 10018 | + * @param String $registration the aircraft registration |
|
| 10019 | + * @return String the country |
|
| 10020 | + * |
|
| 10021 | + */ |
|
| 10022 | 10022 | public function countryFromAircraftRegistrationCode($registration) |
| 10023 | 10023 | { |
| 10024 | 10024 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10035,11 +10035,11 @@ discard block |
||
| 10035 | 10035 | } |
| 10036 | 10036 | |
| 10037 | 10037 | /** |
| 10038 | - * Set a new highlight value for a flight |
|
| 10039 | - * |
|
| 10040 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10041 | - * @param String $highlight New highlight value |
|
| 10042 | - */ |
|
| 10038 | + * Set a new highlight value for a flight |
|
| 10039 | + * |
|
| 10040 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10041 | + * @param String $highlight New highlight value |
|
| 10042 | + */ |
|
| 10043 | 10043 | public function setHighlightFlight($flightaware_id,$highlight) { |
| 10044 | 10044 | |
| 10045 | 10045 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -10048,12 +10048,12 @@ discard block |
||
| 10048 | 10048 | } |
| 10049 | 10049 | |
| 10050 | 10050 | /** |
| 10051 | - * Set a new highlight value for a flight by Registration |
|
| 10052 | - * |
|
| 10053 | - * @param String $registration Registration of the aircraft |
|
| 10054 | - * @param String $date Date of spotted aircraft |
|
| 10055 | - * @param String $highlight New highlight value |
|
| 10056 | - */ |
|
| 10051 | + * Set a new highlight value for a flight by Registration |
|
| 10052 | + * |
|
| 10053 | + * @param String $registration Registration of the aircraft |
|
| 10054 | + * @param String $date Date of spotted aircraft |
|
| 10055 | + * @param String $highlight New highlight value |
|
| 10056 | + */ |
|
| 10057 | 10057 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
| 10058 | 10058 | if ($date == '') { |
| 10059 | 10059 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -10067,12 +10067,12 @@ discard block |
||
| 10067 | 10067 | } |
| 10068 | 10068 | |
| 10069 | 10069 | /** |
| 10070 | - * Gets the short url from bit.ly |
|
| 10071 | - * |
|
| 10072 | - * @param String $url the full url |
|
| 10073 | - * @return String the bit.ly url |
|
| 10074 | - * |
|
| 10075 | - */ |
|
| 10070 | + * Gets the short url from bit.ly |
|
| 10071 | + * |
|
| 10072 | + * @param String $url the full url |
|
| 10073 | + * @return String the bit.ly url |
|
| 10074 | + * |
|
| 10075 | + */ |
|
| 10076 | 10076 | public function getBitlyURL($url) |
| 10077 | 10077 | { |
| 10078 | 10078 | global $globalBitlyAccessToken; |
@@ -10361,11 +10361,11 @@ discard block |
||
| 10361 | 10361 | $query="SELECT name, icao, latitude, longitude, altitude, 3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - latitude)*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(latitude*pi()/180)*POWER(SIN(($origLon-longitude)*pi()/180/2),2))) as distance |
| 10362 | 10362 | FROM airport WHERE longitude between ($origLon-$dist/cos(radians($origLat))*69) and ($origLon+$dist/cos(radians($origLat)*69)) and latitude between ($origLat-($dist/69)) and ($origLat+($dist/69)) |
| 10363 | 10363 | AND (3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - latitude)*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(latitude*pi()/180)*POWER(SIN(($origLon-longitude)*pi()/180/2),2)))) < $dist ORDER BY distance limit 100;"; |
| 10364 | - } else { |
|
| 10364 | + } else { |
|
| 10365 | 10365 | $query="SELECT name, icao, latitude, longitude, altitude, 3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - CAST(latitude as double precision))*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(CAST(latitude as double precision)*pi()/180)*POWER(SIN(($origLon-CAST(longitude as double precision))*pi()/180/2),2))) as distance |
| 10366 | 10366 | FROM airport WHERE CAST(longitude as double precision) between ($origLon-$dist/cos(radians($origLat))*69) and ($origLon+$dist/cos(radians($origLat))*69) and CAST(latitude as double precision) between ($origLat-($dist/69)) and ($origLat+($dist/69)) |
| 10367 | 10367 | AND (3956 * 2 * ASIN(SQRT( POWER(SIN(($origLat - CAST(latitude as double precision))*pi()/180/2),2)+COS( $origLat *pi()/180)*COS(CAST(latitude as double precision)*pi()/180)*POWER(SIN(($origLon-CAST(longitude as double precision))*pi()/180/2),2)))) < $dist ORDER BY distance limit 100;"; |
| 10368 | - } |
|
| 10368 | + } |
|
| 10369 | 10369 | $sth = $this->db->prepare($query); |
| 10370 | 10370 | $sth->execute(); |
| 10371 | 10371 | return $sth->fetchAll(PDO::FETCH_ASSOC); |