@@ -390,17 +390,17 @@ discard block |
||
| 390 | 390 | else { |
| 391 | 391 | $planespotter_url_array = explode("_", $spotter_item['image']); |
| 392 | 392 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 393 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 393 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 394 | 394 | } |
| 395 | 395 | if (isset($spotter_item['airline_name'])) { |
| 396 | 396 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 397 | 397 | } else { |
| 398 | 398 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 399 | 399 | } |
| 400 | - } else { |
|
| 401 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 402 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 403 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 400 | + } else { |
|
| 401 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 402 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 403 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 404 | 404 | if (isset($spotter_item['airline_name'])) { |
| 405 | 405 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 406 | 406 | } else { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | } |
| 416 | 416 | } elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){ |
| 417 | 417 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
| 418 | - $spotter_item['squawk'] = '-'; |
|
| 418 | + $spotter_item['squawk'] = '-'; |
|
| 419 | 419 | } |
| 420 | 420 | if ($spotter_item['image_thumbnail'] != "") |
| 421 | 421 | { |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | else { |
| 427 | 427 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
| 428 | 428 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
| 429 | - $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 429 | + $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
|
| 430 | 430 | } |
| 431 | 431 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 432 | 432 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -438,9 +438,9 @@ discard block |
||
| 438 | 438 | print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 439 | 439 | } |
| 440 | 440 | } else { |
| 441 | - if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 442 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 443 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 441 | + if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
|
| 442 | + $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 443 | + } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
| 444 | 444 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 445 | 445 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
| 446 | 446 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -454,7 +454,7 @@ discard block |
||
| 454 | 454 | print '</td>'."\n"; |
| 455 | 455 | } else { |
| 456 | 456 | print '<td class="aircraft_thumbnail">'."\n"; |
| 457 | - // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
| 457 | + // print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>'; |
|
| 458 | 458 | //} |
| 459 | 459 | if (!isset($spotter_item['airline_name']) && !isset($spotter_item['aircraft_name'])) { |
| 460 | 460 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '._("Not available").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n"; |
@@ -559,13 +559,13 @@ discard block |
||
| 559 | 559 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
| 560 | 560 | } else $distance = ''; |
| 561 | 561 | if ($distance != '') { |
| 562 | - if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 563 | - echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
| 564 | - } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 565 | - echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
| 566 | - } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 567 | - echo '<br/><i>'.$distance.' km</i>'; |
|
| 568 | - } |
|
| 562 | + if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
| 563 | + echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
|
| 564 | + } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
| 565 | + echo '<br/><i>'.round($distance*0.621371).' mi</i>'; |
|
| 566 | + } elseif ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
| 567 | + echo '<br/><i>'.$distance.' km</i>'; |
|
| 568 | + } |
|
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | print '</td>'."\n"; |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * Get SQL query part for filter used |
|
| 59 | - * @param Array $filter the filter |
|
| 60 | - * @return Array the SQL part |
|
| 61 | - */ |
|
| 58 | + * Get SQL query part for filter used |
|
| 59 | + * @param Array $filter the filter |
|
| 60 | + * @return Array the SQL part |
|
| 61 | + */ |
|
| 62 | 62 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 63 | 63 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
| 64 | 64 | $filters = array(); |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * Executes the SQL statements to get the spotter information |
|
| 133 | - * |
|
| 134 | - * @param String $query the SQL query |
|
| 135 | - * @param Array $params parameter of the query |
|
| 136 | - * @param String $limitQuery the limit query |
|
| 137 | - * @return Array the spotter information |
|
| 138 | - * |
|
| 139 | - */ |
|
| 132 | + * Executes the SQL statements to get the spotter information |
|
| 133 | + * |
|
| 134 | + * @param String $query the SQL query |
|
| 135 | + * @param Array $params parameter of the query |
|
| 136 | + * @param String $limitQuery the limit query |
|
| 137 | + * @return Array the spotter information |
|
| 138 | + * |
|
| 139 | + */ |
|
| 140 | 140 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
| 141 | 141 | { |
| 142 | 142 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -300,11 +300,11 @@ discard block |
||
| 300 | 300 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
| 301 | 301 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
| 302 | 302 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
| 303 | - } else { |
|
| 304 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 303 | + } else { |
|
| 304 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 305 | 305 | $temp_array['aircraft_name'] = 'N/A'; |
| 306 | 306 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
| 307 | - } |
|
| 307 | + } |
|
| 308 | 308 | } |
| 309 | 309 | $fromsource = NULL; |
| 310 | 310 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -500,11 +500,11 @@ discard block |
||
| 500 | 500 | |
| 501 | 501 | |
| 502 | 502 | /** |
| 503 | - * Gets all the spotter information |
|
| 504 | - * |
|
| 505 | - * @return Array the spotter information |
|
| 506 | - * |
|
| 507 | - */ |
|
| 503 | + * Gets all the spotter information |
|
| 504 | + * |
|
| 505 | + * @return Array the spotter information |
|
| 506 | + * |
|
| 507 | + */ |
|
| 508 | 508 | 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()) |
| 509 | 509 | { |
| 510 | 510 | global $globalTimezone, $globalDBdriver; |
@@ -851,11 +851,11 @@ discard block |
||
| 851 | 851 | |
| 852 | 852 | |
| 853 | 853 | /** |
| 854 | - * Gets all the spotter information based on the latest data entry |
|
| 855 | - * |
|
| 856 | - * @return Array the spotter information |
|
| 857 | - * |
|
| 858 | - */ |
|
| 854 | + * Gets all the spotter information based on the latest data entry |
|
| 855 | + * |
|
| 856 | + * @return Array the spotter information |
|
| 857 | + * |
|
| 858 | + */ |
|
| 859 | 859 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
| 860 | 860 | { |
| 861 | 861 | global $global_query; |
@@ -894,12 +894,12 @@ discard block |
||
| 894 | 894 | } |
| 895 | 895 | |
| 896 | 896 | |
| 897 | - /** |
|
| 898 | - * Gets all the spotter information based on a user's latitude and longitude |
|
| 899 | - * |
|
| 900 | - * @return Array the spotter information |
|
| 901 | - * |
|
| 902 | - */ |
|
| 897 | + /** |
|
| 898 | + * Gets all the spotter information based on a user's latitude and longitude |
|
| 899 | + * |
|
| 900 | + * @return Array the spotter information |
|
| 901 | + * |
|
| 902 | + */ |
|
| 903 | 903 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
| 904 | 904 | { |
| 905 | 905 | date_default_timezone_set('UTC'); |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | return false; |
| 928 | 928 | } |
| 929 | 929 | } |
| 930 | - $additional_query = ''; |
|
| 930 | + $additional_query = ''; |
|
| 931 | 931 | if ($interval != "") |
| 932 | 932 | { |
| 933 | 933 | if (!is_string($interval)) |
@@ -967,12 +967,12 @@ discard block |
||
| 967 | 967 | } |
| 968 | 968 | |
| 969 | 969 | |
| 970 | - /** |
|
| 971 | - * Gets all the spotter information sorted by the newest aircraft type |
|
| 972 | - * |
|
| 973 | - * @return Array the spotter information |
|
| 974 | - * |
|
| 975 | - */ |
|
| 970 | + /** |
|
| 971 | + * Gets all the spotter information sorted by the newest aircraft type |
|
| 972 | + * |
|
| 973 | + * @return Array the spotter information |
|
| 974 | + * |
|
| 975 | + */ |
|
| 976 | 976 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
| 977 | 977 | { |
| 978 | 978 | global $global_query; |
@@ -1013,11 +1013,11 @@ discard block |
||
| 1013 | 1013 | |
| 1014 | 1014 | |
| 1015 | 1015 | /** |
| 1016 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
| 1017 | - * |
|
| 1018 | - * @return Array the spotter information |
|
| 1019 | - * |
|
| 1020 | - */ |
|
| 1016 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
| 1017 | + * |
|
| 1018 | + * @return Array the spotter information |
|
| 1019 | + * |
|
| 1020 | + */ |
|
| 1021 | 1021 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
| 1022 | 1022 | { |
| 1023 | 1023 | global $global_query; |
@@ -1057,11 +1057,11 @@ discard block |
||
| 1057 | 1057 | |
| 1058 | 1058 | |
| 1059 | 1059 | /** |
| 1060 | - * Gets all the spotter information sorted by the newest airline |
|
| 1061 | - * |
|
| 1062 | - * @return Array the spotter information |
|
| 1063 | - * |
|
| 1064 | - */ |
|
| 1060 | + * Gets all the spotter information sorted by the newest airline |
|
| 1061 | + * |
|
| 1062 | + * @return Array the spotter information |
|
| 1063 | + * |
|
| 1064 | + */ |
|
| 1065 | 1065 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
| 1066 | 1066 | { |
| 1067 | 1067 | global $global_query; |
@@ -1100,12 +1100,12 @@ discard block |
||
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | 1102 | |
| 1103 | - /** |
|
| 1104 | - * Gets all the spotter information sorted by the newest departure airport |
|
| 1105 | - * |
|
| 1106 | - * @return Array the spotter information |
|
| 1107 | - * |
|
| 1108 | - */ |
|
| 1103 | + /** |
|
| 1104 | + * Gets all the spotter information sorted by the newest departure airport |
|
| 1105 | + * |
|
| 1106 | + * @return Array the spotter information |
|
| 1107 | + * |
|
| 1108 | + */ |
|
| 1109 | 1109 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
| 1110 | 1110 | { |
| 1111 | 1111 | global $global_query; |
@@ -1147,11 +1147,11 @@ discard block |
||
| 1147 | 1147 | |
| 1148 | 1148 | |
| 1149 | 1149 | /** |
| 1150 | - * Gets all the spotter information sorted by the newest arrival airport |
|
| 1151 | - * |
|
| 1152 | - * @return Array the spotter information |
|
| 1153 | - * |
|
| 1154 | - */ |
|
| 1150 | + * Gets all the spotter information sorted by the newest arrival airport |
|
| 1151 | + * |
|
| 1152 | + * @return Array the spotter information |
|
| 1153 | + * |
|
| 1154 | + */ |
|
| 1155 | 1155 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
| 1156 | 1156 | { |
| 1157 | 1157 | global $global_query; |
@@ -1190,11 +1190,11 @@ discard block |
||
| 1190 | 1190 | |
| 1191 | 1191 | |
| 1192 | 1192 | /** |
| 1193 | - * Gets all the spotter information based on the spotter id |
|
| 1194 | - * |
|
| 1195 | - * @return Array the spotter information |
|
| 1196 | - * |
|
| 1197 | - */ |
|
| 1193 | + * Gets all the spotter information based on the spotter id |
|
| 1194 | + * |
|
| 1195 | + * @return Array the spotter information |
|
| 1196 | + * |
|
| 1197 | + */ |
|
| 1198 | 1198 | public function getSpotterDataByID($id = '') |
| 1199 | 1199 | { |
| 1200 | 1200 | global $global_query; |
@@ -1216,11 +1216,11 @@ discard block |
||
| 1216 | 1216 | |
| 1217 | 1217 | |
| 1218 | 1218 | /** |
| 1219 | - * Gets all the spotter information based on the callsign |
|
| 1220 | - * |
|
| 1221 | - * @return Array the spotter information |
|
| 1222 | - * |
|
| 1223 | - */ |
|
| 1219 | + * Gets all the spotter information based on the callsign |
|
| 1220 | + * |
|
| 1221 | + * @return Array the spotter information |
|
| 1222 | + * |
|
| 1223 | + */ |
|
| 1224 | 1224 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '') |
| 1225 | 1225 | { |
| 1226 | 1226 | global $global_query; |
@@ -1273,11 +1273,11 @@ discard block |
||
| 1273 | 1273 | |
| 1274 | 1274 | |
| 1275 | 1275 | /** |
| 1276 | - * Gets all the spotter information based on the aircraft type |
|
| 1277 | - * |
|
| 1278 | - * @return Array the spotter information |
|
| 1279 | - * |
|
| 1280 | - */ |
|
| 1276 | + * Gets all the spotter information based on the aircraft type |
|
| 1277 | + * |
|
| 1278 | + * @return Array the spotter information |
|
| 1279 | + * |
|
| 1280 | + */ |
|
| 1281 | 1281 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
| 1282 | 1282 | { |
| 1283 | 1283 | global $global_query; |
@@ -1331,11 +1331,11 @@ discard block |
||
| 1331 | 1331 | |
| 1332 | 1332 | |
| 1333 | 1333 | /** |
| 1334 | - * Gets all the spotter information based on the aircraft registration |
|
| 1335 | - * |
|
| 1336 | - * @return Array the spotter information |
|
| 1337 | - * |
|
| 1338 | - */ |
|
| 1334 | + * Gets all the spotter information based on the aircraft registration |
|
| 1335 | + * |
|
| 1336 | + * @return Array the spotter information |
|
| 1337 | + * |
|
| 1338 | + */ |
|
| 1339 | 1339 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
| 1340 | 1340 | { |
| 1341 | 1341 | global $global_query; |
@@ -1392,11 +1392,11 @@ discard block |
||
| 1392 | 1392 | |
| 1393 | 1393 | |
| 1394 | 1394 | /** |
| 1395 | - * Gets all the spotter information based on the airline |
|
| 1396 | - * |
|
| 1397 | - * @return Array the spotter information |
|
| 1398 | - * |
|
| 1399 | - */ |
|
| 1395 | + * Gets all the spotter information based on the airline |
|
| 1396 | + * |
|
| 1397 | + * @return Array the spotter information |
|
| 1398 | + * |
|
| 1399 | + */ |
|
| 1400 | 1400 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
| 1401 | 1401 | { |
| 1402 | 1402 | global $global_query; |
@@ -1449,11 +1449,11 @@ discard block |
||
| 1449 | 1449 | |
| 1450 | 1450 | |
| 1451 | 1451 | /** |
| 1452 | - * Gets all the spotter information based on the airport |
|
| 1453 | - * |
|
| 1454 | - * @return Array the spotter information |
|
| 1455 | - * |
|
| 1456 | - */ |
|
| 1452 | + * Gets all the spotter information based on the airport |
|
| 1453 | + * |
|
| 1454 | + * @return Array the spotter information |
|
| 1455 | + * |
|
| 1456 | + */ |
|
| 1457 | 1457 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
| 1458 | 1458 | { |
| 1459 | 1459 | global $global_query; |
@@ -1507,11 +1507,11 @@ discard block |
||
| 1507 | 1507 | |
| 1508 | 1508 | |
| 1509 | 1509 | /** |
| 1510 | - * Gets all the spotter information based on the date |
|
| 1511 | - * |
|
| 1512 | - * @return Array the spotter information |
|
| 1513 | - * |
|
| 1514 | - */ |
|
| 1510 | + * Gets all the spotter information based on the date |
|
| 1511 | + * |
|
| 1512 | + * @return Array the spotter information |
|
| 1513 | + * |
|
| 1514 | + */ |
|
| 1515 | 1515 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
| 1516 | 1516 | { |
| 1517 | 1517 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1575,11 +1575,11 @@ discard block |
||
| 1575 | 1575 | |
| 1576 | 1576 | |
| 1577 | 1577 | /** |
| 1578 | - * Gets all the spotter information based on the country name |
|
| 1579 | - * |
|
| 1580 | - * @return Array the spotter information |
|
| 1581 | - * |
|
| 1582 | - */ |
|
| 1578 | + * Gets all the spotter information based on the country name |
|
| 1579 | + * |
|
| 1580 | + * @return Array the spotter information |
|
| 1581 | + * |
|
| 1582 | + */ |
|
| 1583 | 1583 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
| 1584 | 1584 | { |
| 1585 | 1585 | global $global_query; |
@@ -1633,11 +1633,11 @@ discard block |
||
| 1633 | 1633 | |
| 1634 | 1634 | |
| 1635 | 1635 | /** |
| 1636 | - * Gets all the spotter information based on the manufacturer name |
|
| 1637 | - * |
|
| 1638 | - * @return Array the spotter information |
|
| 1639 | - * |
|
| 1640 | - */ |
|
| 1636 | + * Gets all the spotter information based on the manufacturer name |
|
| 1637 | + * |
|
| 1638 | + * @return Array the spotter information |
|
| 1639 | + * |
|
| 1640 | + */ |
|
| 1641 | 1641 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
| 1642 | 1642 | { |
| 1643 | 1643 | global $global_query; |
@@ -1693,13 +1693,13 @@ discard block |
||
| 1693 | 1693 | |
| 1694 | 1694 | |
| 1695 | 1695 | /** |
| 1696 | - * Gets a list of all aircraft that take a route |
|
| 1697 | - * |
|
| 1698 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1699 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1700 | - * @return Array the spotter information |
|
| 1701 | - * |
|
| 1702 | - */ |
|
| 1696 | + * Gets a list of all aircraft that take a route |
|
| 1697 | + * |
|
| 1698 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1699 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1700 | + * @return Array the spotter information |
|
| 1701 | + * |
|
| 1702 | + */ |
|
| 1703 | 1703 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
| 1704 | 1704 | { |
| 1705 | 1705 | global $global_query; |
@@ -1768,11 +1768,11 @@ discard block |
||
| 1768 | 1768 | |
| 1769 | 1769 | |
| 1770 | 1770 | /** |
| 1771 | - * Gets all the spotter information based on the special column in the table |
|
| 1772 | - * |
|
| 1773 | - * @return Array the spotter information |
|
| 1774 | - * |
|
| 1775 | - */ |
|
| 1771 | + * Gets all the spotter information based on the special column in the table |
|
| 1772 | + * |
|
| 1773 | + * @return Array the spotter information |
|
| 1774 | + * |
|
| 1775 | + */ |
|
| 1776 | 1776 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
| 1777 | 1777 | { |
| 1778 | 1778 | global $global_query; |
@@ -1811,11 +1811,11 @@ discard block |
||
| 1811 | 1811 | } |
| 1812 | 1812 | |
| 1813 | 1813 | /** |
| 1814 | - * Gets all the highlight based on a aircraft registration |
|
| 1815 | - * |
|
| 1816 | - * @return String the highlight text |
|
| 1817 | - * |
|
| 1818 | - */ |
|
| 1814 | + * Gets all the highlight based on a aircraft registration |
|
| 1815 | + * |
|
| 1816 | + * @return String the highlight text |
|
| 1817 | + * |
|
| 1818 | + */ |
|
| 1819 | 1819 | public function getHighlightByRegistration($registration,$filter = array()) |
| 1820 | 1820 | { |
| 1821 | 1821 | global $global_query; |
@@ -1837,13 +1837,13 @@ discard block |
||
| 1837 | 1837 | |
| 1838 | 1838 | |
| 1839 | 1839 | /** |
| 1840 | - * Gets the squawk usage from squawk code |
|
| 1841 | - * |
|
| 1842 | - * @param String $squawk squawk code |
|
| 1843 | - * @param String $country country |
|
| 1844 | - * @return String usage |
|
| 1845 | - * |
|
| 1846 | - */ |
|
| 1840 | + * Gets the squawk usage from squawk code |
|
| 1841 | + * |
|
| 1842 | + * @param String $squawk squawk code |
|
| 1843 | + * @param String $country country |
|
| 1844 | + * @return String usage |
|
| 1845 | + * |
|
| 1846 | + */ |
|
| 1847 | 1847 | public function getSquawkUsage($squawk = '',$country = 'FR') |
| 1848 | 1848 | { |
| 1849 | 1849 | |
@@ -1864,12 +1864,12 @@ discard block |
||
| 1864 | 1864 | } |
| 1865 | 1865 | |
| 1866 | 1866 | /** |
| 1867 | - * Gets the airport icao from the iata |
|
| 1868 | - * |
|
| 1869 | - * @param String $airport_iata the iata code of the airport |
|
| 1870 | - * @return String airport iata |
|
| 1871 | - * |
|
| 1872 | - */ |
|
| 1867 | + * Gets the airport icao from the iata |
|
| 1868 | + * |
|
| 1869 | + * @param String $airport_iata the iata code of the airport |
|
| 1870 | + * @return String airport iata |
|
| 1871 | + * |
|
| 1872 | + */ |
|
| 1873 | 1873 | public function getAirportIcao($airport_iata = '') |
| 1874 | 1874 | { |
| 1875 | 1875 | |
@@ -1889,14 +1889,14 @@ discard block |
||
| 1889 | 1889 | } |
| 1890 | 1890 | |
| 1891 | 1891 | /** |
| 1892 | - * Gets the airport distance |
|
| 1893 | - * |
|
| 1894 | - * @param String $airport_icao the icao code of the airport |
|
| 1895 | - * @param Float $latitude the latitude |
|
| 1896 | - * @param Float $longitude the longitude |
|
| 1897 | - * @return Float distance to the airport |
|
| 1898 | - * |
|
| 1899 | - */ |
|
| 1892 | + * Gets the airport distance |
|
| 1893 | + * |
|
| 1894 | + * @param String $airport_icao the icao code of the airport |
|
| 1895 | + * @param Float $latitude the latitude |
|
| 1896 | + * @param Float $longitude the longitude |
|
| 1897 | + * @return Float distance to the airport |
|
| 1898 | + * |
|
| 1899 | + */ |
|
| 1900 | 1900 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
| 1901 | 1901 | { |
| 1902 | 1902 | |
@@ -1917,12 +1917,12 @@ discard block |
||
| 1917 | 1917 | } |
| 1918 | 1918 | |
| 1919 | 1919 | /** |
| 1920 | - * Gets the airport info based on the icao |
|
| 1921 | - * |
|
| 1922 | - * @param String $airport the icao code of the airport |
|
| 1923 | - * @return Array airport information |
|
| 1924 | - * |
|
| 1925 | - */ |
|
| 1920 | + * Gets the airport info based on the icao |
|
| 1921 | + * |
|
| 1922 | + * @param String $airport the icao code of the airport |
|
| 1923 | + * @return Array airport information |
|
| 1924 | + * |
|
| 1925 | + */ |
|
| 1926 | 1926 | public function getAllAirportInfo($airport = '') |
| 1927 | 1927 | { |
| 1928 | 1928 | |
@@ -1968,12 +1968,12 @@ discard block |
||
| 1968 | 1968 | } |
| 1969 | 1969 | |
| 1970 | 1970 | /** |
| 1971 | - * Gets the airport info based on the country |
|
| 1972 | - * |
|
| 1973 | - * @param Array $countries Airports countries |
|
| 1974 | - * @return Array airport information |
|
| 1975 | - * |
|
| 1976 | - */ |
|
| 1971 | + * Gets the airport info based on the country |
|
| 1972 | + * |
|
| 1973 | + * @param Array $countries Airports countries |
|
| 1974 | + * @return Array airport information |
|
| 1975 | + * |
|
| 1976 | + */ |
|
| 1977 | 1977 | public function getAllAirportInfobyCountry($countries) |
| 1978 | 1978 | { |
| 1979 | 1979 | $lst_countries = ''; |
@@ -2011,12 +2011,12 @@ discard block |
||
| 2011 | 2011 | } |
| 2012 | 2012 | |
| 2013 | 2013 | /** |
| 2014 | - * Gets airports info based on the coord |
|
| 2015 | - * |
|
| 2016 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 2017 | - * @return Array airport information |
|
| 2018 | - * |
|
| 2019 | - */ |
|
| 2014 | + * Gets airports info based on the coord |
|
| 2015 | + * |
|
| 2016 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 2017 | + * @return Array airport information |
|
| 2018 | + * |
|
| 2019 | + */ |
|
| 2020 | 2020 | public function getAllAirportInfobyCoord($coord) |
| 2021 | 2021 | { |
| 2022 | 2022 | global $globalDBdriver; |
@@ -2047,12 +2047,12 @@ discard block |
||
| 2047 | 2047 | } |
| 2048 | 2048 | |
| 2049 | 2049 | /** |
| 2050 | - * Gets waypoints info based on the coord |
|
| 2051 | - * |
|
| 2052 | - * @param Array $coord waypoints coord |
|
| 2053 | - * @return Array airport information |
|
| 2054 | - * |
|
| 2055 | - */ |
|
| 2050 | + * Gets waypoints info based on the coord |
|
| 2051 | + * |
|
| 2052 | + * @param Array $coord waypoints coord |
|
| 2053 | + * @return Array airport information |
|
| 2054 | + * |
|
| 2055 | + */ |
|
| 2056 | 2056 | public function getAllWaypointsInfobyCoord($coord) |
| 2057 | 2057 | { |
| 2058 | 2058 | if (is_array($coord)) { |
@@ -2086,12 +2086,12 @@ discard block |
||
| 2086 | 2086 | |
| 2087 | 2087 | |
| 2088 | 2088 | /** |
| 2089 | - * Gets the airline info based on the icao code or iata code |
|
| 2090 | - * |
|
| 2091 | - * @param String $airline_icao the iata code of the airport |
|
| 2092 | - * @return Array airport information |
|
| 2093 | - * |
|
| 2094 | - */ |
|
| 2089 | + * Gets the airline info based on the icao code or iata code |
|
| 2090 | + * |
|
| 2091 | + * @param String $airline_icao the iata code of the airport |
|
| 2092 | + * @return Array airport information |
|
| 2093 | + * |
|
| 2094 | + */ |
|
| 2095 | 2095 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
| 2096 | 2096 | { |
| 2097 | 2097 | global $globalUseRealAirlines; |
@@ -2122,7 +2122,7 @@ discard block |
||
| 2122 | 2122 | } else { |
| 2123 | 2123 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
| 2124 | 2124 | } |
| 2125 | - /* |
|
| 2125 | + /* |
|
| 2126 | 2126 | $airline_array = array(); |
| 2127 | 2127 | $temp_array = array(); |
| 2128 | 2128 | |
@@ -2152,12 +2152,12 @@ discard block |
||
| 2152 | 2152 | } |
| 2153 | 2153 | |
| 2154 | 2154 | /** |
| 2155 | - * Gets the airline info based on the airline name |
|
| 2156 | - * |
|
| 2157 | - * @param String $airline_name the name of the airline |
|
| 2158 | - * @return Array airline information |
|
| 2159 | - * |
|
| 2160 | - */ |
|
| 2155 | + * Gets the airline info based on the airline name |
|
| 2156 | + * |
|
| 2157 | + * @param String $airline_name the name of the airline |
|
| 2158 | + * @return Array airline information |
|
| 2159 | + * |
|
| 2160 | + */ |
|
| 2161 | 2161 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
| 2162 | 2162 | { |
| 2163 | 2163 | global $globalUseRealAirlines; |
@@ -2185,12 +2185,12 @@ discard block |
||
| 2185 | 2185 | |
| 2186 | 2186 | |
| 2187 | 2187 | /** |
| 2188 | - * Gets the aircraft info based on the aircraft type |
|
| 2189 | - * |
|
| 2190 | - * @param String $aircraft_type the aircraft type |
|
| 2191 | - * @return Array aircraft information |
|
| 2192 | - * |
|
| 2193 | - */ |
|
| 2188 | + * Gets the aircraft info based on the aircraft type |
|
| 2189 | + * |
|
| 2190 | + * @param String $aircraft_type the aircraft type |
|
| 2191 | + * @return Array aircraft information |
|
| 2192 | + * |
|
| 2193 | + */ |
|
| 2194 | 2194 | public function getAllAircraftInfo($aircraft_type) |
| 2195 | 2195 | { |
| 2196 | 2196 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2222,12 +2222,12 @@ discard block |
||
| 2222 | 2222 | } |
| 2223 | 2223 | |
| 2224 | 2224 | /** |
| 2225 | - * Gets the aircraft icao based on the aircraft name/type |
|
| 2226 | - * |
|
| 2227 | - * @param String $aircraft_type the aircraft type |
|
| 2228 | - * @return String aircraft information |
|
| 2229 | - * |
|
| 2230 | - */ |
|
| 2225 | + * Gets the aircraft icao based on the aircraft name/type |
|
| 2226 | + * |
|
| 2227 | + * @param String $aircraft_type the aircraft type |
|
| 2228 | + * @return String aircraft information |
|
| 2229 | + * |
|
| 2230 | + */ |
|
| 2231 | 2231 | public function getAircraftIcao($aircraft_type) |
| 2232 | 2232 | { |
| 2233 | 2233 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2252,12 +2252,12 @@ discard block |
||
| 2252 | 2252 | } |
| 2253 | 2253 | |
| 2254 | 2254 | /** |
| 2255 | - * Gets the aircraft info based on the aircraft modes |
|
| 2256 | - * |
|
| 2257 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2258 | - * @return String aircraft type |
|
| 2259 | - * |
|
| 2260 | - */ |
|
| 2255 | + * Gets the aircraft info based on the aircraft modes |
|
| 2256 | + * |
|
| 2257 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2258 | + * @return String aircraft type |
|
| 2259 | + * |
|
| 2260 | + */ |
|
| 2261 | 2261 | public function getAllAircraftType($aircraft_modes) |
| 2262 | 2262 | { |
| 2263 | 2263 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2277,12 +2277,12 @@ discard block |
||
| 2277 | 2277 | } |
| 2278 | 2278 | |
| 2279 | 2279 | /** |
| 2280 | - * Gets the aircraft info based on the aircraft registration |
|
| 2281 | - * |
|
| 2282 | - * @param String $registration the aircraft registration |
|
| 2283 | - * @return String aircraft type |
|
| 2284 | - * |
|
| 2285 | - */ |
|
| 2280 | + * Gets the aircraft info based on the aircraft registration |
|
| 2281 | + * |
|
| 2282 | + * @param String $registration the aircraft registration |
|
| 2283 | + * @return String aircraft type |
|
| 2284 | + * |
|
| 2285 | + */ |
|
| 2286 | 2286 | public function getAllAircraftTypeByRegistration($registration) |
| 2287 | 2287 | { |
| 2288 | 2288 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2300,12 +2300,12 @@ discard block |
||
| 2300 | 2300 | } |
| 2301 | 2301 | |
| 2302 | 2302 | /** |
| 2303 | - * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
| 2304 | - * |
|
| 2305 | - * @param String $registration the aircraft registration |
|
| 2306 | - * @return Array spotter_id and flightaware_id |
|
| 2307 | - * |
|
| 2308 | - */ |
|
| 2303 | + * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
| 2304 | + * |
|
| 2305 | + * @param String $registration the aircraft registration |
|
| 2306 | + * @return Array spotter_id and flightaware_id |
|
| 2307 | + * |
|
| 2308 | + */ |
|
| 2309 | 2309 | public function getAllIDByRegistration($registration) |
| 2310 | 2310 | { |
| 2311 | 2311 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2324,12 +2324,12 @@ discard block |
||
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | 2326 | /** |
| 2327 | - * Gets correct aircraft operator code |
|
| 2328 | - * |
|
| 2329 | - * @param String $operator the aircraft operator code (callsign) |
|
| 2330 | - * @return String aircraft operator code |
|
| 2331 | - * |
|
| 2332 | - */ |
|
| 2327 | + * Gets correct aircraft operator code |
|
| 2328 | + * |
|
| 2329 | + * @param String $operator the aircraft operator code (callsign) |
|
| 2330 | + * @return String aircraft operator code |
|
| 2331 | + * |
|
| 2332 | + */ |
|
| 2333 | 2333 | public function getOperator($operator) |
| 2334 | 2334 | { |
| 2335 | 2335 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2346,16 +2346,16 @@ discard block |
||
| 2346 | 2346 | } |
| 2347 | 2347 | |
| 2348 | 2348 | /** |
| 2349 | - * Gets the aircraft route based on the aircraft callsign |
|
| 2350 | - * |
|
| 2351 | - * @param String $callsign the aircraft callsign |
|
| 2352 | - * @return Array aircraft type |
|
| 2353 | - * |
|
| 2354 | - */ |
|
| 2349 | + * Gets the aircraft route based on the aircraft callsign |
|
| 2350 | + * |
|
| 2351 | + * @param String $callsign the aircraft callsign |
|
| 2352 | + * @return Array aircraft type |
|
| 2353 | + * |
|
| 2354 | + */ |
|
| 2355 | 2355 | public function getRouteInfo($callsign) |
| 2356 | 2356 | { |
| 2357 | 2357 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
| 2358 | - if ($callsign == '') return array(); |
|
| 2358 | + if ($callsign == '') return array(); |
|
| 2359 | 2359 | $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"; |
| 2360 | 2360 | |
| 2361 | 2361 | $sth = $this->db->prepare($query); |
@@ -2369,12 +2369,12 @@ discard block |
||
| 2369 | 2369 | } |
| 2370 | 2370 | |
| 2371 | 2371 | /** |
| 2372 | - * Gets the aircraft info based on the aircraft registration |
|
| 2373 | - * |
|
| 2374 | - * @param String $registration the aircraft registration |
|
| 2375 | - * @return Array aircraft information |
|
| 2376 | - * |
|
| 2377 | - */ |
|
| 2372 | + * Gets the aircraft info based on the aircraft registration |
|
| 2373 | + * |
|
| 2374 | + * @param String $registration the aircraft registration |
|
| 2375 | + * @return Array aircraft information |
|
| 2376 | + * |
|
| 2377 | + */ |
|
| 2378 | 2378 | public function getAircraftInfoByRegistration($registration) |
| 2379 | 2379 | { |
| 2380 | 2380 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2401,12 +2401,12 @@ discard block |
||
| 2401 | 2401 | } |
| 2402 | 2402 | |
| 2403 | 2403 | /** |
| 2404 | - * Gets the aircraft owner & base based on the aircraft registration |
|
| 2405 | - * |
|
| 2406 | - * @param String $registration the aircraft registration |
|
| 2407 | - * @return Array aircraft information |
|
| 2408 | - * |
|
| 2409 | - */ |
|
| 2404 | + * Gets the aircraft owner & base based on the aircraft registration |
|
| 2405 | + * |
|
| 2406 | + * @param String $registration the aircraft registration |
|
| 2407 | + * @return Array aircraft information |
|
| 2408 | + * |
|
| 2409 | + */ |
|
| 2410 | 2410 | public function getAircraftOwnerByRegistration($registration) |
| 2411 | 2411 | { |
| 2412 | 2412 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2423,11 +2423,11 @@ discard block |
||
| 2423 | 2423 | |
| 2424 | 2424 | |
| 2425 | 2425 | /** |
| 2426 | - * Gets all flights (but with only little info) |
|
| 2427 | - * |
|
| 2428 | - * @return Array basic flight information |
|
| 2429 | - * |
|
| 2430 | - */ |
|
| 2426 | + * Gets all flights (but with only little info) |
|
| 2427 | + * |
|
| 2428 | + * @return Array basic flight information |
|
| 2429 | + * |
|
| 2430 | + */ |
|
| 2431 | 2431 | public function getAllFlightsforSitemap() |
| 2432 | 2432 | { |
| 2433 | 2433 | //$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 "; |
@@ -2435,7 +2435,7 @@ discard block |
||
| 2435 | 2435 | |
| 2436 | 2436 | $sth = $this->db->prepare($query); |
| 2437 | 2437 | $sth->execute(); |
| 2438 | - /* |
|
| 2438 | + /* |
|
| 2439 | 2439 | $flight_array = array(); |
| 2440 | 2440 | $temp_array = array(); |
| 2441 | 2441 | |
@@ -2457,11 +2457,11 @@ discard block |
||
| 2457 | 2457 | } |
| 2458 | 2458 | |
| 2459 | 2459 | /** |
| 2460 | - * Gets a list of all aircraft manufacturers |
|
| 2461 | - * |
|
| 2462 | - * @return Array list of aircraft types |
|
| 2463 | - * |
|
| 2464 | - */ |
|
| 2460 | + * Gets a list of all aircraft manufacturers |
|
| 2461 | + * |
|
| 2462 | + * @return Array list of aircraft types |
|
| 2463 | + * |
|
| 2464 | + */ |
|
| 2465 | 2465 | public function getAllManufacturers() |
| 2466 | 2466 | { |
| 2467 | 2467 | /* |
@@ -2490,11 +2490,11 @@ discard block |
||
| 2490 | 2490 | |
| 2491 | 2491 | |
| 2492 | 2492 | /** |
| 2493 | - * Gets a list of all aircraft types |
|
| 2494 | - * |
|
| 2495 | - * @return Array list of aircraft types |
|
| 2496 | - * |
|
| 2497 | - */ |
|
| 2493 | + * Gets a list of all aircraft types |
|
| 2494 | + * |
|
| 2495 | + * @return Array list of aircraft types |
|
| 2496 | + * |
|
| 2497 | + */ |
|
| 2498 | 2498 | public function getAllAircraftTypes($filters = array()) |
| 2499 | 2499 | { |
| 2500 | 2500 | /* |
@@ -2529,11 +2529,11 @@ discard block |
||
| 2529 | 2529 | |
| 2530 | 2530 | |
| 2531 | 2531 | /** |
| 2532 | - * Gets a list of all aircraft registrations |
|
| 2533 | - * |
|
| 2534 | - * @return Array list of aircraft registrations |
|
| 2535 | - * |
|
| 2536 | - */ |
|
| 2532 | + * Gets a list of all aircraft registrations |
|
| 2533 | + * |
|
| 2534 | + * @return Array list of aircraft registrations |
|
| 2535 | + * |
|
| 2536 | + */ |
|
| 2537 | 2537 | public function getAllAircraftRegistrations($filters = array()) |
| 2538 | 2538 | { |
| 2539 | 2539 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2558,12 +2558,12 @@ discard block |
||
| 2558 | 2558 | } |
| 2559 | 2559 | |
| 2560 | 2560 | /** |
| 2561 | - * Gets all source name |
|
| 2562 | - * |
|
| 2563 | - * @param String type format of source |
|
| 2564 | - * @return Array list of source name |
|
| 2565 | - * |
|
| 2566 | - */ |
|
| 2561 | + * Gets all source name |
|
| 2562 | + * |
|
| 2563 | + * @param String type format of source |
|
| 2564 | + * @return Array list of source name |
|
| 2565 | + * |
|
| 2566 | + */ |
|
| 2567 | 2567 | public function getAllSourceName($type = '',$filters = array()) |
| 2568 | 2568 | { |
| 2569 | 2569 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2594,11 +2594,11 @@ discard block |
||
| 2594 | 2594 | |
| 2595 | 2595 | |
| 2596 | 2596 | /** |
| 2597 | - * Gets a list of all airline names |
|
| 2598 | - * |
|
| 2599 | - * @return Array list of airline names |
|
| 2600 | - * |
|
| 2601 | - */ |
|
| 2597 | + * Gets a list of all airline names |
|
| 2598 | + * |
|
| 2599 | + * @return Array list of airline names |
|
| 2600 | + * |
|
| 2601 | + */ |
|
| 2602 | 2602 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
| 2603 | 2603 | { |
| 2604 | 2604 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2647,11 +2647,11 @@ discard block |
||
| 2647 | 2647 | } |
| 2648 | 2648 | |
| 2649 | 2649 | /** |
| 2650 | - * Gets a list of all alliance names |
|
| 2651 | - * |
|
| 2652 | - * @return Array list of alliance names |
|
| 2653 | - * |
|
| 2654 | - */ |
|
| 2650 | + * Gets a list of all alliance names |
|
| 2651 | + * |
|
| 2652 | + * @return Array list of alliance names |
|
| 2653 | + * |
|
| 2654 | + */ |
|
| 2655 | 2655 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
| 2656 | 2656 | { |
| 2657 | 2657 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2676,11 +2676,11 @@ discard block |
||
| 2676 | 2676 | } |
| 2677 | 2677 | |
| 2678 | 2678 | /** |
| 2679 | - * Gets a list of all airline countries |
|
| 2680 | - * |
|
| 2681 | - * @return Array list of airline countries |
|
| 2682 | - * |
|
| 2683 | - */ |
|
| 2679 | + * Gets a list of all airline countries |
|
| 2680 | + * |
|
| 2681 | + * @return Array list of airline countries |
|
| 2682 | + * |
|
| 2683 | + */ |
|
| 2684 | 2684 | public function getAllAirlineCountries($filters = array()) |
| 2685 | 2685 | { |
| 2686 | 2686 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2708,11 +2708,11 @@ discard block |
||
| 2708 | 2708 | |
| 2709 | 2709 | |
| 2710 | 2710 | /** |
| 2711 | - * Gets a list of all departure & arrival names |
|
| 2712 | - * |
|
| 2713 | - * @return Array list of airport names |
|
| 2714 | - * |
|
| 2715 | - */ |
|
| 2711 | + * Gets a list of all departure & arrival names |
|
| 2712 | + * |
|
| 2713 | + * @return Array list of airport names |
|
| 2714 | + * |
|
| 2715 | + */ |
|
| 2716 | 2716 | public function getAllAirportNames($filters = array()) |
| 2717 | 2717 | { |
| 2718 | 2718 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2761,11 +2761,11 @@ discard block |
||
| 2761 | 2761 | |
| 2762 | 2762 | |
| 2763 | 2763 | /** |
| 2764 | - * Gets a list of all departure & arrival airport countries |
|
| 2765 | - * |
|
| 2766 | - * @return Array list of airport countries |
|
| 2767 | - * |
|
| 2768 | - */ |
|
| 2764 | + * Gets a list of all departure & arrival airport countries |
|
| 2765 | + * |
|
| 2766 | + * @return Array list of airport countries |
|
| 2767 | + * |
|
| 2768 | + */ |
|
| 2769 | 2769 | public function getAllAirportCountries($filters = array()) |
| 2770 | 2770 | { |
| 2771 | 2771 | $airport_array = array(); |
@@ -2813,11 +2813,11 @@ discard block |
||
| 2813 | 2813 | |
| 2814 | 2814 | |
| 2815 | 2815 | /** |
| 2816 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2817 | - * |
|
| 2818 | - * @return Array list of countries |
|
| 2819 | - * |
|
| 2820 | - */ |
|
| 2816 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2817 | + * |
|
| 2818 | + * @return Array list of countries |
|
| 2819 | + * |
|
| 2820 | + */ |
|
| 2821 | 2821 | public function getAllCountries($filters = array()) |
| 2822 | 2822 | { |
| 2823 | 2823 | $Connection= new Connection($this->db); |
@@ -2894,11 +2894,11 @@ discard block |
||
| 2894 | 2894 | |
| 2895 | 2895 | |
| 2896 | 2896 | /** |
| 2897 | - * Gets a list of all idents/callsigns |
|
| 2898 | - * |
|
| 2899 | - * @return Array list of ident/callsign names |
|
| 2900 | - * |
|
| 2901 | - */ |
|
| 2897 | + * Gets a list of all idents/callsigns |
|
| 2898 | + * |
|
| 2899 | + * @return Array list of ident/callsign names |
|
| 2900 | + * |
|
| 2901 | + */ |
|
| 2902 | 2902 | public function getAllIdents($filters = array()) |
| 2903 | 2903 | { |
| 2904 | 2904 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2922,9 +2922,9 @@ discard block |
||
| 2922 | 2922 | } |
| 2923 | 2923 | |
| 2924 | 2924 | /** |
| 2925 | - * Get a list of flights from airport since 7 days |
|
| 2926 | - * @return Array number, icao, name and city of airports |
|
| 2927 | - */ |
|
| 2925 | + * Get a list of flights from airport since 7 days |
|
| 2926 | + * @return Array number, icao, name and city of airports |
|
| 2927 | + */ |
|
| 2928 | 2928 | |
| 2929 | 2929 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
| 2930 | 2930 | global $globalTimezone, $globalDBdriver; |
@@ -2955,9 +2955,9 @@ discard block |
||
| 2955 | 2955 | } |
| 2956 | 2956 | |
| 2957 | 2957 | /** |
| 2958 | - * Get a list of flights from airport since 7 days |
|
| 2959 | - * @return Array number, icao, name and city of airports |
|
| 2960 | - */ |
|
| 2958 | + * Get a list of flights from airport since 7 days |
|
| 2959 | + * @return Array number, icao, name and city of airports |
|
| 2960 | + */ |
|
| 2961 | 2961 | |
| 2962 | 2962 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
| 2963 | 2963 | global $globalTimezone, $globalDBdriver; |
@@ -2987,9 +2987,9 @@ discard block |
||
| 2987 | 2987 | } |
| 2988 | 2988 | |
| 2989 | 2989 | /** |
| 2990 | - * Get a list of flights from detected airport since 7 days |
|
| 2991 | - * @return Array number, icao, name and city of airports |
|
| 2992 | - */ |
|
| 2990 | + * Get a list of flights from detected airport since 7 days |
|
| 2991 | + * @return Array number, icao, name and city of airports |
|
| 2992 | + */ |
|
| 2993 | 2993 | |
| 2994 | 2994 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
| 2995 | 2995 | global $globalTimezone, $globalDBdriver; |
@@ -3027,9 +3027,9 @@ discard block |
||
| 3027 | 3027 | } |
| 3028 | 3028 | |
| 3029 | 3029 | /** |
| 3030 | - * Get a list of flights from detected airport since 7 days |
|
| 3031 | - * @return Array number, icao, name and city of airports |
|
| 3032 | - */ |
|
| 3030 | + * Get a list of flights from detected airport since 7 days |
|
| 3031 | + * @return Array number, icao, name and city of airports |
|
| 3032 | + */ |
|
| 3033 | 3033 | |
| 3034 | 3034 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
| 3035 | 3035 | global $globalTimezone, $globalDBdriver; |
@@ -3071,9 +3071,9 @@ discard block |
||
| 3071 | 3071 | |
| 3072 | 3072 | |
| 3073 | 3073 | /** |
| 3074 | - * Get a list of flights to airport since 7 days |
|
| 3075 | - * @return Array number, icao, name and city of airports |
|
| 3076 | - */ |
|
| 3074 | + * Get a list of flights to airport since 7 days |
|
| 3075 | + * @return Array number, icao, name and city of airports |
|
| 3076 | + */ |
|
| 3077 | 3077 | |
| 3078 | 3078 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
| 3079 | 3079 | global $globalTimezone, $globalDBdriver; |
@@ -3106,9 +3106,9 @@ discard block |
||
| 3106 | 3106 | |
| 3107 | 3107 | |
| 3108 | 3108 | /** |
| 3109 | - * Get a list of flights detected to airport since 7 days |
|
| 3110 | - * @return Array number, icao, name and city of airports |
|
| 3111 | - */ |
|
| 3109 | + * Get a list of flights detected to airport since 7 days |
|
| 3110 | + * @return Array number, icao, name and city of airports |
|
| 3111 | + */ |
|
| 3112 | 3112 | |
| 3113 | 3113 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
| 3114 | 3114 | global $globalTimezone, $globalDBdriver; |
@@ -3149,9 +3149,9 @@ discard block |
||
| 3149 | 3149 | |
| 3150 | 3150 | |
| 3151 | 3151 | /** |
| 3152 | - * Get a list of flights to airport since 7 days |
|
| 3153 | - * @return Array number, icao, name and city of airports |
|
| 3154 | - */ |
|
| 3152 | + * Get a list of flights to airport since 7 days |
|
| 3153 | + * @return Array number, icao, name and city of airports |
|
| 3154 | + */ |
|
| 3155 | 3155 | |
| 3156 | 3156 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
| 3157 | 3157 | global $globalTimezone, $globalDBdriver; |
@@ -3183,9 +3183,9 @@ discard block |
||
| 3183 | 3183 | |
| 3184 | 3184 | |
| 3185 | 3185 | /** |
| 3186 | - * Get a list of flights detected to airport since 7 days |
|
| 3187 | - * @return Array number, icao, name and city of airports |
|
| 3188 | - */ |
|
| 3186 | + * Get a list of flights detected to airport since 7 days |
|
| 3187 | + * @return Array number, icao, name and city of airports |
|
| 3188 | + */ |
|
| 3189 | 3189 | |
| 3190 | 3190 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
| 3191 | 3191 | global $globalTimezone, $globalDBdriver; |
@@ -3229,11 +3229,11 @@ discard block |
||
| 3229 | 3229 | |
| 3230 | 3230 | |
| 3231 | 3231 | /** |
| 3232 | - * Gets a list of all dates |
|
| 3233 | - * |
|
| 3234 | - * @return Array list of date names |
|
| 3235 | - * |
|
| 3236 | - */ |
|
| 3232 | + * Gets a list of all dates |
|
| 3233 | + * |
|
| 3234 | + * @return Array list of date names |
|
| 3235 | + * |
|
| 3236 | + */ |
|
| 3237 | 3237 | public function getAllDates() |
| 3238 | 3238 | { |
| 3239 | 3239 | global $globalTimezone, $globalDBdriver; |
@@ -3274,11 +3274,11 @@ discard block |
||
| 3274 | 3274 | |
| 3275 | 3275 | |
| 3276 | 3276 | /** |
| 3277 | - * Gets all route combinations |
|
| 3278 | - * |
|
| 3279 | - * @return Array the route list |
|
| 3280 | - * |
|
| 3281 | - */ |
|
| 3277 | + * Gets all route combinations |
|
| 3278 | + * |
|
| 3279 | + * @return Array the route list |
|
| 3280 | + * |
|
| 3281 | + */ |
|
| 3282 | 3282 | public function getAllRoutes() |
| 3283 | 3283 | { |
| 3284 | 3284 | $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 |
@@ -3304,13 +3304,13 @@ discard block |
||
| 3304 | 3304 | } |
| 3305 | 3305 | |
| 3306 | 3306 | /** |
| 3307 | - * Update ident spotter data |
|
| 3308 | - * |
|
| 3309 | - * @param String $flightaware_id the ID from flightaware |
|
| 3310 | - * @param String $ident the flight ident |
|
| 3311 | - * @return String success or false |
|
| 3312 | - * |
|
| 3313 | - */ |
|
| 3307 | + * Update ident spotter data |
|
| 3308 | + * |
|
| 3309 | + * @param String $flightaware_id the ID from flightaware |
|
| 3310 | + * @param String $ident the flight ident |
|
| 3311 | + * @return String success or false |
|
| 3312 | + * |
|
| 3313 | + */ |
|
| 3314 | 3314 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
| 3315 | 3315 | { |
| 3316 | 3316 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3331,14 +3331,14 @@ discard block |
||
| 3331 | 3331 | } else { |
| 3332 | 3332 | $airline_array = $this->getAllAirlineInfo("NA"); |
| 3333 | 3333 | } |
| 3334 | - $airline_name = $airline_array[0]['name']; |
|
| 3335 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3336 | - $airline_country = $airline_array[0]['country']; |
|
| 3337 | - $airline_type = $airline_array[0]['type']; |
|
| 3334 | + $airline_name = $airline_array[0]['name']; |
|
| 3335 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3336 | + $airline_country = $airline_array[0]['country']; |
|
| 3337 | + $airline_type = $airline_array[0]['type']; |
|
| 3338 | 3338 | |
| 3339 | 3339 | |
| 3340 | 3340 | $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'; |
| 3341 | - $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); |
|
| 3341 | + $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); |
|
| 3342 | 3342 | |
| 3343 | 3343 | try { |
| 3344 | 3344 | $sth = $this->db->prepare($query); |
@@ -3351,19 +3351,19 @@ discard block |
||
| 3351 | 3351 | |
| 3352 | 3352 | } |
| 3353 | 3353 | /** |
| 3354 | - * Update latest spotter data |
|
| 3355 | - * |
|
| 3356 | - * @param String $flightaware_id the ID from flightaware |
|
| 3357 | - * @param String $ident the flight ident |
|
| 3358 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3359 | - * @return String success or false |
|
| 3360 | - * |
|
| 3361 | - */ |
|
| 3354 | + * Update latest spotter data |
|
| 3355 | + * |
|
| 3356 | + * @param String $flightaware_id the ID from flightaware |
|
| 3357 | + * @param String $ident the flight ident |
|
| 3358 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3359 | + * @return String success or false |
|
| 3360 | + * |
|
| 3361 | + */ |
|
| 3362 | 3362 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
| 3363 | 3363 | { |
| 3364 | 3364 | if ($groundspeed == '') $groundspeed = NULL; |
| 3365 | 3365 | $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'; |
| 3366 | - $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); |
|
| 3366 | + $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); |
|
| 3367 | 3367 | |
| 3368 | 3368 | try { |
| 3369 | 3369 | $sth = $this->db->prepare($query); |
@@ -3377,32 +3377,32 @@ discard block |
||
| 3377 | 3377 | } |
| 3378 | 3378 | |
| 3379 | 3379 | /** |
| 3380 | - * Adds a new spotter data |
|
| 3381 | - * |
|
| 3382 | - * @param String $flightaware_id the ID from flightaware |
|
| 3383 | - * @param String $ident the flight ident |
|
| 3384 | - * @param String $aircraft_icao the aircraft type |
|
| 3385 | - * @param String $departure_airport_icao the departure airport |
|
| 3386 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3387 | - * @param String $latitude latitude of flight |
|
| 3388 | - * @param String $longitude latitude of flight |
|
| 3389 | - * @param String $waypoints waypoints of flight |
|
| 3390 | - * @param String $altitude altitude of flight |
|
| 3391 | - * @param String $heading heading of flight |
|
| 3392 | - * @param String $groundspeed speed of flight |
|
| 3393 | - * @param String $date date of flight |
|
| 3394 | - * @param String $departure_airport_time departure time of flight |
|
| 3395 | - * @param String $arrival_airport_time arrival time of flight |
|
| 3396 | - * @param String $squawk squawk code of flight |
|
| 3397 | - * @param String $route_stop route stop of flight |
|
| 3398 | - * @param String $highlight highlight or not |
|
| 3399 | - * @param String $ModeS ModesS code of flight |
|
| 3400 | - * @param String $registration registration code of flight |
|
| 3401 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3402 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3403 | - * @param String $verticalrate vertival rate of flight |
|
| 3404 | - * @return String success or false |
|
| 3405 | - */ |
|
| 3380 | + * Adds a new spotter data |
|
| 3381 | + * |
|
| 3382 | + * @param String $flightaware_id the ID from flightaware |
|
| 3383 | + * @param String $ident the flight ident |
|
| 3384 | + * @param String $aircraft_icao the aircraft type |
|
| 3385 | + * @param String $departure_airport_icao the departure airport |
|
| 3386 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3387 | + * @param String $latitude latitude of flight |
|
| 3388 | + * @param String $longitude latitude of flight |
|
| 3389 | + * @param String $waypoints waypoints of flight |
|
| 3390 | + * @param String $altitude altitude of flight |
|
| 3391 | + * @param String $heading heading of flight |
|
| 3392 | + * @param String $groundspeed speed of flight |
|
| 3393 | + * @param String $date date of flight |
|
| 3394 | + * @param String $departure_airport_time departure time of flight |
|
| 3395 | + * @param String $arrival_airport_time arrival time of flight |
|
| 3396 | + * @param String $squawk squawk code of flight |
|
| 3397 | + * @param String $route_stop route stop of flight |
|
| 3398 | + * @param String $highlight highlight or not |
|
| 3399 | + * @param String $ModeS ModesS code of flight |
|
| 3400 | + * @param String $registration registration code of flight |
|
| 3401 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3402 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3403 | + * @param String $verticalrate vertival rate of flight |
|
| 3404 | + * @return String success or false |
|
| 3405 | + */ |
|
| 3406 | 3406 | 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 = '') |
| 3407 | 3407 | { |
| 3408 | 3408 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3617,8 +3617,8 @@ discard block |
||
| 3617 | 3617 | |
| 3618 | 3618 | if ($globalIVAO && $aircraft_icao != '') |
| 3619 | 3619 | { |
| 3620 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3621 | - else $airline_icao = ''; |
|
| 3620 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3621 | + else $airline_icao = ''; |
|
| 3622 | 3622 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
| 3623 | 3623 | if (!isset($image_array[0]['registration'])) |
| 3624 | 3624 | { |
@@ -3649,53 +3649,53 @@ discard block |
||
| 3649 | 3649 | |
| 3650 | 3650 | if (count($airline_array) == 0) |
| 3651 | 3651 | { |
| 3652 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3653 | - } |
|
| 3654 | - if (count($aircraft_array) == 0) |
|
| 3655 | - { |
|
| 3656 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3657 | - } |
|
| 3658 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3659 | - { |
|
| 3660 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3661 | - } |
|
| 3662 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3663 | - { |
|
| 3664 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3665 | - } |
|
| 3666 | - if ($registration == '') $registration = 'NA'; |
|
| 3667 | - if ($latitude == '' && $longitude == '') { |
|
| 3668 | - $latitude = 0; |
|
| 3669 | - $longitude = 0; |
|
| 3670 | - } |
|
| 3671 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3672 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3673 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3674 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3675 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3676 | - $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) |
|
| 3652 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3653 | + } |
|
| 3654 | + if (count($aircraft_array) == 0) |
|
| 3655 | + { |
|
| 3656 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3657 | + } |
|
| 3658 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3659 | + { |
|
| 3660 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3661 | + } |
|
| 3662 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3663 | + { |
|
| 3664 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3665 | + } |
|
| 3666 | + if ($registration == '') $registration = 'NA'; |
|
| 3667 | + if ($latitude == '' && $longitude == '') { |
|
| 3668 | + $latitude = 0; |
|
| 3669 | + $longitude = 0; |
|
| 3670 | + } |
|
| 3671 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3672 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3673 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3674 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3675 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3676 | + $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) |
|
| 3677 | 3677 | 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)"; |
| 3678 | 3678 | |
| 3679 | - $airline_name = $airline_array[0]['name']; |
|
| 3680 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3681 | - $airline_country = $airline_array[0]['country']; |
|
| 3682 | - $airline_type = $airline_array[0]['type']; |
|
| 3679 | + $airline_name = $airline_array[0]['name']; |
|
| 3680 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3681 | + $airline_country = $airline_array[0]['country']; |
|
| 3682 | + $airline_type = $airline_array[0]['type']; |
|
| 3683 | 3683 | if ($airline_type == '') { |
| 3684 | 3684 | $timeelapsed = microtime(true); |
| 3685 | 3685 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
| 3686 | 3686 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
| 3687 | 3687 | } |
| 3688 | 3688 | if ($airline_type == null) $airline_type = ''; |
| 3689 | - $aircraft_type = $aircraft_array[0]['type']; |
|
| 3690 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3691 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3692 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3693 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3689 | + $aircraft_type = $aircraft_array[0]['type']; |
|
| 3690 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3691 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3692 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3693 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3694 | 3694 | |
| 3695 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3696 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3697 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3698 | - $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); |
|
| 3695 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3696 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3697 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3698 | + $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); |
|
| 3699 | 3699 | |
| 3700 | 3700 | try { |
| 3701 | 3701 | |
@@ -3703,7 +3703,7 @@ discard block |
||
| 3703 | 3703 | $sth->execute($query_values); |
| 3704 | 3704 | $this->db = null; |
| 3705 | 3705 | } catch (PDOException $e) { |
| 3706 | - return "error : ".$e->getMessage(); |
|
| 3706 | + return "error : ".$e->getMessage(); |
|
| 3707 | 3707 | } |
| 3708 | 3708 | |
| 3709 | 3709 | return "success"; |
@@ -3712,11 +3712,11 @@ discard block |
||
| 3712 | 3712 | |
| 3713 | 3713 | |
| 3714 | 3714 | /** |
| 3715 | - * Gets the aircraft ident within the last hour |
|
| 3716 | - * |
|
| 3717 | - * @return String the ident |
|
| 3718 | - * |
|
| 3719 | - */ |
|
| 3715 | + * Gets the aircraft ident within the last hour |
|
| 3716 | + * |
|
| 3717 | + * @return String the ident |
|
| 3718 | + * |
|
| 3719 | + */ |
|
| 3720 | 3720 | public function getIdentFromLastHour($ident) |
| 3721 | 3721 | { |
| 3722 | 3722 | global $globalDBdriver, $globalTimezone; |
@@ -3732,11 +3732,11 @@ discard block |
||
| 3732 | 3732 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
| 3733 | 3733 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
| 3734 | 3734 | $query_data = array(':ident' => $ident); |
| 3735 | - } |
|
| 3735 | + } |
|
| 3736 | 3736 | |
| 3737 | 3737 | $sth = $this->db->prepare($query); |
| 3738 | 3738 | $sth->execute($query_data); |
| 3739 | - $ident_result=''; |
|
| 3739 | + $ident_result=''; |
|
| 3740 | 3740 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 3741 | 3741 | { |
| 3742 | 3742 | $ident_result = $row['ident']; |
@@ -3747,11 +3747,11 @@ discard block |
||
| 3747 | 3747 | |
| 3748 | 3748 | |
| 3749 | 3749 | /** |
| 3750 | - * Gets the aircraft data from the last 20 seconds |
|
| 3751 | - * |
|
| 3752 | - * @return Array the spotter data |
|
| 3753 | - * |
|
| 3754 | - */ |
|
| 3750 | + * Gets the aircraft data from the last 20 seconds |
|
| 3751 | + * |
|
| 3752 | + * @return Array the spotter data |
|
| 3753 | + * |
|
| 3754 | + */ |
|
| 3755 | 3755 | public function getRealTimeData($q = '') |
| 3756 | 3756 | { |
| 3757 | 3757 | global $globalDBdriver; |
@@ -3795,11 +3795,11 @@ discard block |
||
| 3795 | 3795 | |
| 3796 | 3796 | |
| 3797 | 3797 | /** |
| 3798 | - * Gets all airlines that have flown over |
|
| 3799 | - * |
|
| 3800 | - * @return Array the airline list |
|
| 3801 | - * |
|
| 3802 | - */ |
|
| 3798 | + * Gets all airlines that have flown over |
|
| 3799 | + * |
|
| 3800 | + * @return Array the airline list |
|
| 3801 | + * |
|
| 3802 | + */ |
|
| 3803 | 3803 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3804 | 3804 | { |
| 3805 | 3805 | global $globalDBdriver; |
@@ -3813,7 +3813,7 @@ discard block |
||
| 3813 | 3813 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3814 | 3814 | } |
| 3815 | 3815 | } |
| 3816 | - if ($sincedate != '') { |
|
| 3816 | + if ($sincedate != '') { |
|
| 3817 | 3817 | if ($globalDBdriver == 'mysql') { |
| 3818 | 3818 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3819 | 3819 | } else { |
@@ -3840,26 +3840,26 @@ discard block |
||
| 3840 | 3840 | } |
| 3841 | 3841 | |
| 3842 | 3842 | /** |
| 3843 | - * Gets all pilots that have flown over |
|
| 3844 | - * |
|
| 3845 | - * @return Array the pilots list |
|
| 3846 | - * |
|
| 3847 | - */ |
|
| 3843 | + * Gets all pilots that have flown over |
|
| 3844 | + * |
|
| 3845 | + * @return Array the pilots list |
|
| 3846 | + * |
|
| 3847 | + */ |
|
| 3848 | 3848 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3849 | 3849 | { |
| 3850 | 3850 | global $globalDBdriver; |
| 3851 | 3851 | $filter_query = $this->getFilter($filters,true,true); |
| 3852 | 3852 | $query = "SELECT DISTINCT spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
| 3853 | 3853 | FROM spotter_output".$filter_query." spotter_output.pilot_id <> '' "; |
| 3854 | - if ($olderthanmonths > 0) { |
|
| 3855 | - if ($globalDBdriver == 'mysql') { |
|
| 3854 | + if ($olderthanmonths > 0) { |
|
| 3855 | + if ($globalDBdriver == 'mysql') { |
|
| 3856 | 3856 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3857 | 3857 | } else { |
| 3858 | 3858 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3859 | 3859 | } |
| 3860 | 3860 | } |
| 3861 | - if ($sincedate != '') { |
|
| 3862 | - if ($globalDBdriver == 'mysql') { |
|
| 3861 | + if ($sincedate != '') { |
|
| 3862 | + if ($globalDBdriver == 'mysql') { |
|
| 3863 | 3863 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3864 | 3864 | } else { |
| 3865 | 3865 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3887,25 +3887,25 @@ discard block |
||
| 3887 | 3887 | } |
| 3888 | 3888 | |
| 3889 | 3889 | /** |
| 3890 | - * Gets all pilots that have flown over |
|
| 3891 | - * |
|
| 3892 | - * @return Array the pilots list |
|
| 3893 | - * |
|
| 3894 | - */ |
|
| 3890 | + * Gets all pilots that have flown over |
|
| 3891 | + * |
|
| 3892 | + * @return Array the pilots list |
|
| 3893 | + * |
|
| 3894 | + */ |
|
| 3895 | 3895 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
| 3896 | 3896 | { |
| 3897 | 3897 | global $globalDBdriver; |
| 3898 | 3898 | $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 |
| 3899 | 3899 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
| 3900 | - if ($olderthanmonths > 0) { |
|
| 3901 | - if ($globalDBdriver == 'mysql') { |
|
| 3900 | + if ($olderthanmonths > 0) { |
|
| 3901 | + if ($globalDBdriver == 'mysql') { |
|
| 3902 | 3902 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3903 | 3903 | } else { |
| 3904 | 3904 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3905 | 3905 | } |
| 3906 | 3906 | } |
| 3907 | - if ($sincedate != '') { |
|
| 3908 | - if ($globalDBdriver == 'mysql') { |
|
| 3907 | + if ($sincedate != '') { |
|
| 3908 | + if ($globalDBdriver == 'mysql') { |
|
| 3909 | 3909 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3910 | 3910 | } else { |
| 3911 | 3911 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3934,26 +3934,26 @@ discard block |
||
| 3934 | 3934 | } |
| 3935 | 3935 | |
| 3936 | 3936 | /** |
| 3937 | - * Gets all owner that have flown over |
|
| 3938 | - * |
|
| 3939 | - * @return Array the pilots list |
|
| 3940 | - * |
|
| 3941 | - */ |
|
| 3937 | + * Gets all owner that have flown over |
|
| 3938 | + * |
|
| 3939 | + * @return Array the pilots list |
|
| 3940 | + * |
|
| 3941 | + */ |
|
| 3942 | 3942 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3943 | 3943 | { |
| 3944 | 3944 | global $globalDBdriver; |
| 3945 | 3945 | $filter_query = $this->getFilter($filters,true,true); |
| 3946 | 3946 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 3947 | 3947 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
| 3948 | - if ($olderthanmonths > 0) { |
|
| 3949 | - if ($globalDBdriver == 'mysql') { |
|
| 3948 | + if ($olderthanmonths > 0) { |
|
| 3949 | + if ($globalDBdriver == 'mysql') { |
|
| 3950 | 3950 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3951 | 3951 | } else { |
| 3952 | 3952 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3953 | 3953 | } |
| 3954 | 3954 | } |
| 3955 | - if ($sincedate != '') { |
|
| 3956 | - if ($globalDBdriver == 'mysql') { |
|
| 3955 | + if ($sincedate != '') { |
|
| 3956 | + if ($globalDBdriver == 'mysql') { |
|
| 3957 | 3957 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3958 | 3958 | } else { |
| 3959 | 3959 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3979,26 +3979,26 @@ discard block |
||
| 3979 | 3979 | } |
| 3980 | 3980 | |
| 3981 | 3981 | /** |
| 3982 | - * Gets all owner that have flown over |
|
| 3983 | - * |
|
| 3984 | - * @return Array the pilots list |
|
| 3985 | - * |
|
| 3986 | - */ |
|
| 3982 | + * Gets all owner that have flown over |
|
| 3983 | + * |
|
| 3984 | + * @return Array the pilots list |
|
| 3985 | + * |
|
| 3986 | + */ |
|
| 3987 | 3987 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 3988 | 3988 | { |
| 3989 | 3989 | global $globalDBdriver; |
| 3990 | 3990 | $filter_query = $this->getFilter($filters,true,true); |
| 3991 | 3991 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 3992 | 3992 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
| 3993 | - if ($olderthanmonths > 0) { |
|
| 3994 | - if ($globalDBdriver == 'mysql') { |
|
| 3993 | + if ($olderthanmonths > 0) { |
|
| 3994 | + if ($globalDBdriver == 'mysql') { |
|
| 3995 | 3995 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3996 | 3996 | } else { |
| 3997 | 3997 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3998 | 3998 | } |
| 3999 | 3999 | } |
| 4000 | - if ($sincedate != '') { |
|
| 4001 | - if ($globalDBdriver == 'mysql') { |
|
| 4000 | + if ($sincedate != '') { |
|
| 4001 | + if ($globalDBdriver == 'mysql') { |
|
| 4002 | 4002 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 4003 | 4003 | } else { |
| 4004 | 4004 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4025,11 +4025,11 @@ discard block |
||
| 4025 | 4025 | } |
| 4026 | 4026 | |
| 4027 | 4027 | /** |
| 4028 | - * Gets all airlines that have flown over by aircraft |
|
| 4029 | - * |
|
| 4030 | - * @return Array the airline list |
|
| 4031 | - * |
|
| 4032 | - */ |
|
| 4028 | + * Gets all airlines that have flown over by aircraft |
|
| 4029 | + * |
|
| 4030 | + * @return Array the airline list |
|
| 4031 | + * |
|
| 4032 | + */ |
|
| 4033 | 4033 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
| 4034 | 4034 | { |
| 4035 | 4035 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4061,11 +4061,11 @@ discard block |
||
| 4061 | 4061 | |
| 4062 | 4062 | |
| 4063 | 4063 | /** |
| 4064 | - * Gets all airline countries that have flown over by aircraft |
|
| 4065 | - * |
|
| 4066 | - * @return Array the airline country list |
|
| 4067 | - * |
|
| 4068 | - */ |
|
| 4064 | + * Gets all airline countries that have flown over by aircraft |
|
| 4065 | + * |
|
| 4066 | + * @return Array the airline country list |
|
| 4067 | + * |
|
| 4068 | + */ |
|
| 4069 | 4069 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
| 4070 | 4070 | { |
| 4071 | 4071 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4097,11 +4097,11 @@ discard block |
||
| 4097 | 4097 | |
| 4098 | 4098 | |
| 4099 | 4099 | /** |
| 4100 | - * Gets all airlines that have flown over by airport |
|
| 4101 | - * |
|
| 4102 | - * @return Array the airline list |
|
| 4103 | - * |
|
| 4104 | - */ |
|
| 4100 | + * Gets all airlines that have flown over by airport |
|
| 4101 | + * |
|
| 4102 | + * @return Array the airline list |
|
| 4103 | + * |
|
| 4104 | + */ |
|
| 4105 | 4105 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
| 4106 | 4106 | { |
| 4107 | 4107 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4132,11 +4132,11 @@ discard block |
||
| 4132 | 4132 | |
| 4133 | 4133 | |
| 4134 | 4134 | /** |
| 4135 | - * Gets all airline countries that have flown over by airport icao |
|
| 4136 | - * |
|
| 4137 | - * @return Array the airline country list |
|
| 4138 | - * |
|
| 4139 | - */ |
|
| 4135 | + * Gets all airline countries that have flown over by airport icao |
|
| 4136 | + * |
|
| 4137 | + * @return Array the airline country list |
|
| 4138 | + * |
|
| 4139 | + */ |
|
| 4140 | 4140 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
| 4141 | 4141 | { |
| 4142 | 4142 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4166,11 +4166,11 @@ discard block |
||
| 4166 | 4166 | |
| 4167 | 4167 | |
| 4168 | 4168 | /** |
| 4169 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4170 | - * |
|
| 4171 | - * @return Array the airline list |
|
| 4172 | - * |
|
| 4173 | - */ |
|
| 4169 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4170 | + * |
|
| 4171 | + * @return Array the airline list |
|
| 4172 | + * |
|
| 4173 | + */ |
|
| 4174 | 4174 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4175 | 4175 | { |
| 4176 | 4176 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4201,11 +4201,11 @@ discard block |
||
| 4201 | 4201 | |
| 4202 | 4202 | |
| 4203 | 4203 | /** |
| 4204 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4205 | - * |
|
| 4206 | - * @return Array the airline country list |
|
| 4207 | - * |
|
| 4208 | - */ |
|
| 4204 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4205 | + * |
|
| 4206 | + * @return Array the airline country list |
|
| 4207 | + * |
|
| 4208 | + */ |
|
| 4209 | 4209 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4210 | 4210 | { |
| 4211 | 4211 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4234,11 +4234,11 @@ discard block |
||
| 4234 | 4234 | |
| 4235 | 4235 | |
| 4236 | 4236 | /** |
| 4237 | - * Gets all airlines that have flown over by date |
|
| 4238 | - * |
|
| 4239 | - * @return Array the airline list |
|
| 4240 | - * |
|
| 4241 | - */ |
|
| 4237 | + * Gets all airlines that have flown over by date |
|
| 4238 | + * |
|
| 4239 | + * @return Array the airline list |
|
| 4240 | + * |
|
| 4241 | + */ |
|
| 4242 | 4242 | public function countAllAirlinesByDate($date,$filters = array()) |
| 4243 | 4243 | { |
| 4244 | 4244 | global $globalTimezone, $globalDBdriver; |
@@ -4282,11 +4282,11 @@ discard block |
||
| 4282 | 4282 | |
| 4283 | 4283 | |
| 4284 | 4284 | /** |
| 4285 | - * Gets all airline countries that have flown over by date |
|
| 4286 | - * |
|
| 4287 | - * @return Array the airline country list |
|
| 4288 | - * |
|
| 4289 | - */ |
|
| 4285 | + * Gets all airline countries that have flown over by date |
|
| 4286 | + * |
|
| 4287 | + * @return Array the airline country list |
|
| 4288 | + * |
|
| 4289 | + */ |
|
| 4290 | 4290 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
| 4291 | 4291 | { |
| 4292 | 4292 | global $globalTimezone, $globalDBdriver; |
@@ -4329,11 +4329,11 @@ discard block |
||
| 4329 | 4329 | |
| 4330 | 4330 | |
| 4331 | 4331 | /** |
| 4332 | - * Gets all airlines that have flown over by ident/callsign |
|
| 4333 | - * |
|
| 4334 | - * @return Array the airline list |
|
| 4335 | - * |
|
| 4336 | - */ |
|
| 4332 | + * Gets all airlines that have flown over by ident/callsign |
|
| 4333 | + * |
|
| 4334 | + * @return Array the airline list |
|
| 4335 | + * |
|
| 4336 | + */ |
|
| 4337 | 4337 | public function countAllAirlinesByIdent($ident,$filters = array()) |
| 4338 | 4338 | { |
| 4339 | 4339 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4363,11 +4363,11 @@ discard block |
||
| 4363 | 4363 | } |
| 4364 | 4364 | |
| 4365 | 4365 | /** |
| 4366 | - * Gets all airlines that have flown over by route |
|
| 4367 | - * |
|
| 4368 | - * @return Array the airline list |
|
| 4369 | - * |
|
| 4370 | - */ |
|
| 4366 | + * Gets all airlines that have flown over by route |
|
| 4367 | + * |
|
| 4368 | + * @return Array the airline list |
|
| 4369 | + * |
|
| 4370 | + */ |
|
| 4371 | 4371 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 4372 | 4372 | { |
| 4373 | 4373 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4399,11 +4399,11 @@ discard block |
||
| 4399 | 4399 | } |
| 4400 | 4400 | |
| 4401 | 4401 | /** |
| 4402 | - * Gets all airline countries that have flown over by route |
|
| 4403 | - * |
|
| 4404 | - * @return Array the airline country list |
|
| 4405 | - * |
|
| 4406 | - */ |
|
| 4402 | + * Gets all airline countries that have flown over by route |
|
| 4403 | + * |
|
| 4404 | + * @return Array the airline country list |
|
| 4405 | + * |
|
| 4406 | + */ |
|
| 4407 | 4407 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
| 4408 | 4408 | { |
| 4409 | 4409 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4435,11 +4435,11 @@ discard block |
||
| 4435 | 4435 | |
| 4436 | 4436 | |
| 4437 | 4437 | /** |
| 4438 | - * Gets all airlines that have flown over by country |
|
| 4439 | - * |
|
| 4440 | - * @return Array the airline list |
|
| 4441 | - * |
|
| 4442 | - */ |
|
| 4438 | + * Gets all airlines that have flown over by country |
|
| 4439 | + * |
|
| 4440 | + * @return Array the airline list |
|
| 4441 | + * |
|
| 4442 | + */ |
|
| 4443 | 4443 | public function countAllAirlinesByCountry($country,$filters = array()) |
| 4444 | 4444 | { |
| 4445 | 4445 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4469,11 +4469,11 @@ discard block |
||
| 4469 | 4469 | |
| 4470 | 4470 | |
| 4471 | 4471 | /** |
| 4472 | - * Gets all airline countries that have flown over by country |
|
| 4473 | - * |
|
| 4474 | - * @return Array the airline country list |
|
| 4475 | - * |
|
| 4476 | - */ |
|
| 4472 | + * Gets all airline countries that have flown over by country |
|
| 4473 | + * |
|
| 4474 | + * @return Array the airline country list |
|
| 4475 | + * |
|
| 4476 | + */ |
|
| 4477 | 4477 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
| 4478 | 4478 | { |
| 4479 | 4479 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4502,11 +4502,11 @@ discard block |
||
| 4502 | 4502 | |
| 4503 | 4503 | |
| 4504 | 4504 | /** |
| 4505 | - * Gets all airlines countries |
|
| 4506 | - * |
|
| 4507 | - * @return Array the airline country list |
|
| 4508 | - * |
|
| 4509 | - */ |
|
| 4505 | + * Gets all airlines countries |
|
| 4506 | + * |
|
| 4507 | + * @return Array the airline country list |
|
| 4508 | + * |
|
| 4509 | + */ |
|
| 4510 | 4510 | public function countAllAirlineCountries($limit = true, $filters = array()) |
| 4511 | 4511 | { |
| 4512 | 4512 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4532,11 +4532,11 @@ discard block |
||
| 4532 | 4532 | } |
| 4533 | 4533 | |
| 4534 | 4534 | /** |
| 4535 | - * Gets all number of flight over countries |
|
| 4536 | - * |
|
| 4537 | - * @return Array the airline country list |
|
| 4538 | - * |
|
| 4539 | - */ |
|
| 4535 | + * Gets all number of flight over countries |
|
| 4536 | + * |
|
| 4537 | + * @return Array the airline country list |
|
| 4538 | + * |
|
| 4539 | + */ |
|
| 4540 | 4540 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4541 | 4541 | { |
| 4542 | 4542 | global $globalDBdriver; |
@@ -4558,15 +4558,15 @@ discard block |
||
| 4558 | 4558 | $SpotterLive = new SpotterLive(); |
| 4559 | 4559 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
| 4560 | 4560 | $filter_query .= ' over_country IS NOT NULL'; |
| 4561 | - if ($olderthanmonths > 0) { |
|
| 4561 | + if ($olderthanmonths > 0) { |
|
| 4562 | 4562 | if ($globalDBdriver == 'mysql') { |
| 4563 | 4563 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 4564 | 4564 | } else { |
| 4565 | 4565 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 4566 | 4566 | } |
| 4567 | 4567 | } |
| 4568 | - if ($sincedate != '') { |
|
| 4569 | - if ($globalDBdriver == 'mysql') { |
|
| 4568 | + if ($sincedate != '') { |
|
| 4569 | + if ($globalDBdriver == 'mysql') { |
|
| 4570 | 4570 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
| 4571 | 4571 | } else { |
| 4572 | 4572 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4596,11 +4596,11 @@ discard block |
||
| 4596 | 4596 | |
| 4597 | 4597 | |
| 4598 | 4598 | /** |
| 4599 | - * Gets all aircraft types that have flown over |
|
| 4600 | - * |
|
| 4601 | - * @return Array the aircraft list |
|
| 4602 | - * |
|
| 4603 | - */ |
|
| 4599 | + * Gets all aircraft types that have flown over |
|
| 4600 | + * |
|
| 4601 | + * @return Array the aircraft list |
|
| 4602 | + * |
|
| 4603 | + */ |
|
| 4604 | 4604 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4605 | 4605 | { |
| 4606 | 4606 | global $globalDBdriver; |
@@ -4643,11 +4643,11 @@ discard block |
||
| 4643 | 4643 | } |
| 4644 | 4644 | |
| 4645 | 4645 | /** |
| 4646 | - * Gets all aircraft types that have flown over by airline |
|
| 4647 | - * |
|
| 4648 | - * @return Array the aircraft list |
|
| 4649 | - * |
|
| 4650 | - */ |
|
| 4646 | + * Gets all aircraft types that have flown over by airline |
|
| 4647 | + * |
|
| 4648 | + * @return Array the aircraft list |
|
| 4649 | + * |
|
| 4650 | + */ |
|
| 4651 | 4651 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4652 | 4652 | { |
| 4653 | 4653 | global $globalDBdriver; |
@@ -4690,11 +4690,11 @@ discard block |
||
| 4690 | 4690 | } |
| 4691 | 4691 | |
| 4692 | 4692 | /** |
| 4693 | - * Gets all aircraft types that have flown over by months |
|
| 4694 | - * |
|
| 4695 | - * @return Array the aircraft list |
|
| 4696 | - * |
|
| 4697 | - */ |
|
| 4693 | + * Gets all aircraft types that have flown over by months |
|
| 4694 | + * |
|
| 4695 | + * @return Array the aircraft list |
|
| 4696 | + * |
|
| 4697 | + */ |
|
| 4698 | 4698 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4699 | 4699 | { |
| 4700 | 4700 | global $globalDBdriver; |
@@ -4738,11 +4738,11 @@ discard block |
||
| 4738 | 4738 | |
| 4739 | 4739 | |
| 4740 | 4740 | /** |
| 4741 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4742 | - * |
|
| 4743 | - * @return Array the aircraft list |
|
| 4744 | - * |
|
| 4745 | - */ |
|
| 4741 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4742 | + * |
|
| 4743 | + * @return Array the aircraft list |
|
| 4744 | + * |
|
| 4745 | + */ |
|
| 4746 | 4746 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
| 4747 | 4747 | { |
| 4748 | 4748 | $Image = new Image($this->db); |
@@ -4781,11 +4781,11 @@ discard block |
||
| 4781 | 4781 | |
| 4782 | 4782 | |
| 4783 | 4783 | /** |
| 4784 | - * Gets all aircraft types that have flown over by airline icao |
|
| 4785 | - * |
|
| 4786 | - * @return Array the aircraft list |
|
| 4787 | - * |
|
| 4788 | - */ |
|
| 4784 | + * Gets all aircraft types that have flown over by airline icao |
|
| 4785 | + * |
|
| 4786 | + * @return Array the aircraft list |
|
| 4787 | + * |
|
| 4788 | + */ |
|
| 4789 | 4789 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
| 4790 | 4790 | { |
| 4791 | 4791 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4814,11 +4814,11 @@ discard block |
||
| 4814 | 4814 | |
| 4815 | 4815 | |
| 4816 | 4816 | /** |
| 4817 | - * Gets all aircraft registration that have flown over by airline icao |
|
| 4818 | - * |
|
| 4819 | - * @return Array the aircraft list |
|
| 4820 | - * |
|
| 4821 | - */ |
|
| 4817 | + * Gets all aircraft registration that have flown over by airline icao |
|
| 4818 | + * |
|
| 4819 | + * @return Array the aircraft list |
|
| 4820 | + * |
|
| 4821 | + */ |
|
| 4822 | 4822 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
| 4823 | 4823 | { |
| 4824 | 4824 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4856,11 +4856,11 @@ discard block |
||
| 4856 | 4856 | |
| 4857 | 4857 | |
| 4858 | 4858 | /** |
| 4859 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 4860 | - * |
|
| 4861 | - * @return Array the aircraft list |
|
| 4862 | - * |
|
| 4863 | - */ |
|
| 4859 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 4860 | + * |
|
| 4861 | + * @return Array the aircraft list |
|
| 4862 | + * |
|
| 4863 | + */ |
|
| 4864 | 4864 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
| 4865 | 4865 | { |
| 4866 | 4866 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4888,11 +4888,11 @@ discard block |
||
| 4888 | 4888 | |
| 4889 | 4889 | |
| 4890 | 4890 | /** |
| 4891 | - * Gets all aircraft types that have flown over by airline icao |
|
| 4892 | - * |
|
| 4893 | - * @return Array the aircraft list |
|
| 4894 | - * |
|
| 4895 | - */ |
|
| 4891 | + * Gets all aircraft types that have flown over by airline icao |
|
| 4892 | + * |
|
| 4893 | + * @return Array the aircraft list |
|
| 4894 | + * |
|
| 4895 | + */ |
|
| 4896 | 4896 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
| 4897 | 4897 | { |
| 4898 | 4898 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4921,11 +4921,11 @@ discard block |
||
| 4921 | 4921 | |
| 4922 | 4922 | |
| 4923 | 4923 | /** |
| 4924 | - * Gets all aircraft registration that have flown over by airport icao |
|
| 4925 | - * |
|
| 4926 | - * @return Array the aircraft list |
|
| 4927 | - * |
|
| 4928 | - */ |
|
| 4924 | + * Gets all aircraft registration that have flown over by airport icao |
|
| 4925 | + * |
|
| 4926 | + * @return Array the aircraft list |
|
| 4927 | + * |
|
| 4928 | + */ |
|
| 4929 | 4929 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
| 4930 | 4930 | { |
| 4931 | 4931 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4962,11 +4962,11 @@ discard block |
||
| 4962 | 4962 | |
| 4963 | 4963 | |
| 4964 | 4964 | /** |
| 4965 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 4966 | - * |
|
| 4967 | - * @return Array the aircraft list |
|
| 4968 | - * |
|
| 4969 | - */ |
|
| 4965 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 4966 | + * |
|
| 4967 | + * @return Array the aircraft list |
|
| 4968 | + * |
|
| 4969 | + */ |
|
| 4970 | 4970 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
| 4971 | 4971 | { |
| 4972 | 4972 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4992,11 +4992,11 @@ discard block |
||
| 4992 | 4992 | } |
| 4993 | 4993 | |
| 4994 | 4994 | /** |
| 4995 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 4996 | - * |
|
| 4997 | - * @return Array the aircraft list |
|
| 4998 | - * |
|
| 4999 | - */ |
|
| 4995 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 4996 | + * |
|
| 4997 | + * @return Array the aircraft list |
|
| 4998 | + * |
|
| 4999 | + */ |
|
| 5000 | 5000 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 5001 | 5001 | { |
| 5002 | 5002 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5023,11 +5023,11 @@ discard block |
||
| 5023 | 5023 | |
| 5024 | 5024 | |
| 5025 | 5025 | /** |
| 5026 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 5027 | - * |
|
| 5028 | - * @return Array the aircraft list |
|
| 5029 | - * |
|
| 5030 | - */ |
|
| 5026 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 5027 | + * |
|
| 5028 | + * @return Array the aircraft list |
|
| 5029 | + * |
|
| 5030 | + */ |
|
| 5031 | 5031 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
| 5032 | 5032 | { |
| 5033 | 5033 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5063,11 +5063,11 @@ discard block |
||
| 5063 | 5063 | } |
| 5064 | 5064 | |
| 5065 | 5065 | /** |
| 5066 | - * Gets all aircraft types that have flown over by date |
|
| 5067 | - * |
|
| 5068 | - * @return Array the aircraft list |
|
| 5069 | - * |
|
| 5070 | - */ |
|
| 5066 | + * Gets all aircraft types that have flown over by date |
|
| 5067 | + * |
|
| 5068 | + * @return Array the aircraft list |
|
| 5069 | + * |
|
| 5070 | + */ |
|
| 5071 | 5071 | public function countAllAircraftTypesByDate($date,$filters = array()) |
| 5072 | 5072 | { |
| 5073 | 5073 | global $globalTimezone, $globalDBdriver; |
@@ -5109,11 +5109,11 @@ discard block |
||
| 5109 | 5109 | |
| 5110 | 5110 | |
| 5111 | 5111 | /** |
| 5112 | - * Gets all aircraft registration that have flown over by date |
|
| 5113 | - * |
|
| 5114 | - * @return Array the aircraft list |
|
| 5115 | - * |
|
| 5116 | - */ |
|
| 5112 | + * Gets all aircraft registration that have flown over by date |
|
| 5113 | + * |
|
| 5114 | + * @return Array the aircraft list |
|
| 5115 | + * |
|
| 5116 | + */ |
|
| 5117 | 5117 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
| 5118 | 5118 | { |
| 5119 | 5119 | global $globalTimezone, $globalDBdriver; |
@@ -5164,11 +5164,11 @@ discard block |
||
| 5164 | 5164 | |
| 5165 | 5165 | |
| 5166 | 5166 | /** |
| 5167 | - * Gets all aircraft manufacturer that have flown over by date |
|
| 5168 | - * |
|
| 5169 | - * @return Array the aircraft manufacturer list |
|
| 5170 | - * |
|
| 5171 | - */ |
|
| 5167 | + * Gets all aircraft manufacturer that have flown over by date |
|
| 5168 | + * |
|
| 5169 | + * @return Array the aircraft manufacturer list |
|
| 5170 | + * |
|
| 5171 | + */ |
|
| 5172 | 5172 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
| 5173 | 5173 | { |
| 5174 | 5174 | global $globalTimezone, $globalDBdriver; |
@@ -5210,11 +5210,11 @@ discard block |
||
| 5210 | 5210 | |
| 5211 | 5211 | |
| 5212 | 5212 | /** |
| 5213 | - * Gets all aircraft types that have flown over by ident/callsign |
|
| 5214 | - * |
|
| 5215 | - * @return Array the aircraft list |
|
| 5216 | - * |
|
| 5217 | - */ |
|
| 5213 | + * Gets all aircraft types that have flown over by ident/callsign |
|
| 5214 | + * |
|
| 5215 | + * @return Array the aircraft list |
|
| 5216 | + * |
|
| 5217 | + */ |
|
| 5218 | 5218 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
| 5219 | 5219 | { |
| 5220 | 5220 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5243,11 +5243,11 @@ discard block |
||
| 5243 | 5243 | |
| 5244 | 5244 | |
| 5245 | 5245 | /** |
| 5246 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5247 | - * |
|
| 5248 | - * @return Array the aircraft list |
|
| 5249 | - * |
|
| 5250 | - */ |
|
| 5246 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5247 | + * |
|
| 5248 | + * @return Array the aircraft list |
|
| 5249 | + * |
|
| 5250 | + */ |
|
| 5251 | 5251 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
| 5252 | 5252 | { |
| 5253 | 5253 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5287,11 +5287,11 @@ discard block |
||
| 5287 | 5287 | |
| 5288 | 5288 | |
| 5289 | 5289 | /** |
| 5290 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5291 | - * |
|
| 5292 | - * @return Array the aircraft manufacturer list |
|
| 5293 | - * |
|
| 5294 | - */ |
|
| 5290 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5291 | + * |
|
| 5292 | + * @return Array the aircraft manufacturer list |
|
| 5293 | + * |
|
| 5294 | + */ |
|
| 5295 | 5295 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
| 5296 | 5296 | { |
| 5297 | 5297 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5317,11 +5317,11 @@ discard block |
||
| 5317 | 5317 | |
| 5318 | 5318 | |
| 5319 | 5319 | /** |
| 5320 | - * Gets all aircraft types that have flown over by route |
|
| 5321 | - * |
|
| 5322 | - * @return Array the aircraft list |
|
| 5323 | - * |
|
| 5324 | - */ |
|
| 5320 | + * Gets all aircraft types that have flown over by route |
|
| 5321 | + * |
|
| 5322 | + * @return Array the aircraft list |
|
| 5323 | + * |
|
| 5324 | + */ |
|
| 5325 | 5325 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5326 | 5326 | { |
| 5327 | 5327 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5350,11 +5350,11 @@ discard block |
||
| 5350 | 5350 | } |
| 5351 | 5351 | |
| 5352 | 5352 | /** |
| 5353 | - * Gets all aircraft registration that have flown over by route |
|
| 5354 | - * |
|
| 5355 | - * @return Array the aircraft list |
|
| 5356 | - * |
|
| 5357 | - */ |
|
| 5353 | + * Gets all aircraft registration that have flown over by route |
|
| 5354 | + * |
|
| 5355 | + * @return Array the aircraft list |
|
| 5356 | + * |
|
| 5357 | + */ |
|
| 5358 | 5358 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5359 | 5359 | { |
| 5360 | 5360 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5396,11 +5396,11 @@ discard block |
||
| 5396 | 5396 | |
| 5397 | 5397 | |
| 5398 | 5398 | /** |
| 5399 | - * Gets all aircraft manufacturer that have flown over by route |
|
| 5400 | - * |
|
| 5401 | - * @return Array the aircraft manufacturer list |
|
| 5402 | - * |
|
| 5403 | - */ |
|
| 5399 | + * Gets all aircraft manufacturer that have flown over by route |
|
| 5400 | + * |
|
| 5401 | + * @return Array the aircraft manufacturer list |
|
| 5402 | + * |
|
| 5403 | + */ |
|
| 5404 | 5404 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5405 | 5405 | { |
| 5406 | 5406 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5434,11 +5434,11 @@ discard block |
||
| 5434 | 5434 | |
| 5435 | 5435 | |
| 5436 | 5436 | /** |
| 5437 | - * Gets all aircraft types that have flown over by country |
|
| 5438 | - * |
|
| 5439 | - * @return Array the aircraft list |
|
| 5440 | - * |
|
| 5441 | - */ |
|
| 5437 | + * Gets all aircraft types that have flown over by country |
|
| 5438 | + * |
|
| 5439 | + * @return Array the aircraft list |
|
| 5440 | + * |
|
| 5441 | + */ |
|
| 5442 | 5442 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
| 5443 | 5443 | { |
| 5444 | 5444 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5469,11 +5469,11 @@ discard block |
||
| 5469 | 5469 | |
| 5470 | 5470 | |
| 5471 | 5471 | /** |
| 5472 | - * Gets all aircraft registration that have flown over by country |
|
| 5473 | - * |
|
| 5474 | - * @return Array the aircraft list |
|
| 5475 | - * |
|
| 5476 | - */ |
|
| 5472 | + * Gets all aircraft registration that have flown over by country |
|
| 5473 | + * |
|
| 5474 | + * @return Array the aircraft list |
|
| 5475 | + * |
|
| 5476 | + */ |
|
| 5477 | 5477 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
| 5478 | 5478 | { |
| 5479 | 5479 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5513,11 +5513,11 @@ discard block |
||
| 5513 | 5513 | |
| 5514 | 5514 | |
| 5515 | 5515 | /** |
| 5516 | - * Gets all aircraft manufacturer that have flown over by country |
|
| 5517 | - * |
|
| 5518 | - * @return Array the aircraft manufacturer list |
|
| 5519 | - * |
|
| 5520 | - */ |
|
| 5516 | + * Gets all aircraft manufacturer that have flown over by country |
|
| 5517 | + * |
|
| 5518 | + * @return Array the aircraft manufacturer list |
|
| 5519 | + * |
|
| 5520 | + */ |
|
| 5521 | 5521 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
| 5522 | 5522 | { |
| 5523 | 5523 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5548,17 +5548,17 @@ discard block |
||
| 5548 | 5548 | |
| 5549 | 5549 | |
| 5550 | 5550 | /** |
| 5551 | - * Gets all aircraft manufacturers that have flown over |
|
| 5552 | - * |
|
| 5553 | - * @return Array the aircraft list |
|
| 5554 | - * |
|
| 5555 | - */ |
|
| 5551 | + * Gets all aircraft manufacturers that have flown over |
|
| 5552 | + * |
|
| 5553 | + * @return Array the aircraft list |
|
| 5554 | + * |
|
| 5555 | + */ |
|
| 5556 | 5556 | public function countAllAircraftManufacturers($filters = array()) |
| 5557 | 5557 | { |
| 5558 | 5558 | $filter_query = $this->getFilter($filters,true,true); |
| 5559 | 5559 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
| 5560 | 5560 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
| 5561 | - $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
| 5561 | + $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
| 5562 | 5562 | ORDER BY aircraft_manufacturer_count DESC |
| 5563 | 5563 | LIMIT 10"; |
| 5564 | 5564 | |
@@ -5583,11 +5583,11 @@ discard block |
||
| 5583 | 5583 | |
| 5584 | 5584 | |
| 5585 | 5585 | /** |
| 5586 | - * Gets all aircraft registrations that have flown over |
|
| 5587 | - * |
|
| 5588 | - * @return Array the aircraft list |
|
| 5589 | - * |
|
| 5590 | - */ |
|
| 5586 | + * Gets all aircraft registrations that have flown over |
|
| 5587 | + * |
|
| 5588 | + * @return Array the aircraft list |
|
| 5589 | + * |
|
| 5590 | + */ |
|
| 5591 | 5591 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 5592 | 5592 | { |
| 5593 | 5593 | global $globalDBdriver; |
@@ -5595,15 +5595,15 @@ discard block |
||
| 5595 | 5595 | $filter_query = $this->getFilter($filters,true,true); |
| 5596 | 5596 | $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 |
| 5597 | 5597 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
| 5598 | - if ($olderthanmonths > 0) { |
|
| 5599 | - if ($globalDBdriver == 'mysql') { |
|
| 5598 | + if ($olderthanmonths > 0) { |
|
| 5599 | + if ($globalDBdriver == 'mysql') { |
|
| 5600 | 5600 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5601 | 5601 | } else { |
| 5602 | 5602 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5603 | 5603 | } |
| 5604 | 5604 | } |
| 5605 | - if ($sincedate != '') { |
|
| 5606 | - if ($globalDBdriver == 'mysql') { |
|
| 5605 | + if ($sincedate != '') { |
|
| 5606 | + if ($globalDBdriver == 'mysql') { |
|
| 5607 | 5607 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5608 | 5608 | } else { |
| 5609 | 5609 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5612,7 +5612,7 @@ discard block |
||
| 5612 | 5612 | |
| 5613 | 5613 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5614 | 5614 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
| 5615 | - $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5615 | + $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
| 5616 | 5616 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5617 | 5617 | |
| 5618 | 5618 | $sth = $this->db->prepare($query); |
@@ -5643,11 +5643,11 @@ discard block |
||
| 5643 | 5643 | |
| 5644 | 5644 | |
| 5645 | 5645 | /** |
| 5646 | - * Gets all aircraft registrations that have flown over |
|
| 5647 | - * |
|
| 5648 | - * @return Array the aircraft list |
|
| 5649 | - * |
|
| 5650 | - */ |
|
| 5646 | + * Gets all aircraft registrations that have flown over |
|
| 5647 | + * |
|
| 5648 | + * @return Array the aircraft list |
|
| 5649 | + * |
|
| 5650 | + */ |
|
| 5651 | 5651 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 5652 | 5652 | { |
| 5653 | 5653 | global $globalDBdriver; |
@@ -5655,15 +5655,15 @@ discard block |
||
| 5655 | 5655 | $Image = new Image($this->db); |
| 5656 | 5656 | $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 |
| 5657 | 5657 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
| 5658 | - if ($olderthanmonths > 0) { |
|
| 5659 | - if ($globalDBdriver == 'mysql') { |
|
| 5658 | + if ($olderthanmonths > 0) { |
|
| 5659 | + if ($globalDBdriver == 'mysql') { |
|
| 5660 | 5660 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5661 | 5661 | } else { |
| 5662 | 5662 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5663 | 5663 | } |
| 5664 | 5664 | } |
| 5665 | - if ($sincedate != '') { |
|
| 5666 | - if ($globalDBdriver == 'mysql') { |
|
| 5665 | + if ($sincedate != '') { |
|
| 5666 | + if ($globalDBdriver == 'mysql') { |
|
| 5667 | 5667 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5668 | 5668 | } else { |
| 5669 | 5669 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5672,7 +5672,7 @@ discard block |
||
| 5672 | 5672 | |
| 5673 | 5673 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5674 | 5674 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
| 5675 | - $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"; |
|
| 5675 | + $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"; |
|
| 5676 | 5676 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5677 | 5677 | |
| 5678 | 5678 | $sth = $this->db->prepare($query); |
@@ -5704,35 +5704,35 @@ discard block |
||
| 5704 | 5704 | |
| 5705 | 5705 | |
| 5706 | 5706 | /** |
| 5707 | - * Gets all departure airports of the airplanes that have flown over |
|
| 5708 | - * |
|
| 5709 | - * @return Array the airport list |
|
| 5710 | - * |
|
| 5711 | - */ |
|
| 5707 | + * Gets all departure airports of the airplanes that have flown over |
|
| 5708 | + * |
|
| 5709 | + * @return Array the airport list |
|
| 5710 | + * |
|
| 5711 | + */ |
|
| 5712 | 5712 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5713 | 5713 | { |
| 5714 | 5714 | global $globalDBdriver; |
| 5715 | 5715 | $filter_query = $this->getFilter($filters,true,true); |
| 5716 | 5716 | $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 |
| 5717 | 5717 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
| 5718 | - if ($olderthanmonths > 0) { |
|
| 5719 | - if ($globalDBdriver == 'mysql') { |
|
| 5718 | + if ($olderthanmonths > 0) { |
|
| 5719 | + if ($globalDBdriver == 'mysql') { |
|
| 5720 | 5720 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5721 | 5721 | } else { |
| 5722 | 5722 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5723 | 5723 | } |
| 5724 | - } |
|
| 5725 | - if ($sincedate != '') { |
|
| 5726 | - if ($globalDBdriver == 'mysql') { |
|
| 5724 | + } |
|
| 5725 | + if ($sincedate != '') { |
|
| 5726 | + if ($globalDBdriver == 'mysql') { |
|
| 5727 | 5727 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5728 | 5728 | } else { |
| 5729 | 5729 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5730 | 5730 | } |
| 5731 | 5731 | } |
| 5732 | 5732 | |
| 5733 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5734 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5735 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5733 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5734 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5735 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5736 | 5736 | ORDER BY airport_departure_icao_count DESC"; |
| 5737 | 5737 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5738 | 5738 | |
@@ -5756,35 +5756,35 @@ discard block |
||
| 5756 | 5756 | } |
| 5757 | 5757 | |
| 5758 | 5758 | /** |
| 5759 | - * Gets all departure airports of the airplanes that have flown over |
|
| 5760 | - * |
|
| 5761 | - * @return Array the airport list |
|
| 5762 | - * |
|
| 5763 | - */ |
|
| 5759 | + * Gets all departure airports of the airplanes that have flown over |
|
| 5760 | + * |
|
| 5761 | + * @return Array the airport list |
|
| 5762 | + * |
|
| 5763 | + */ |
|
| 5764 | 5764 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5765 | 5765 | { |
| 5766 | 5766 | global $globalDBdriver; |
| 5767 | 5767 | $filter_query = $this->getFilter($filters,true,true); |
| 5768 | 5768 | $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 |
| 5769 | 5769 | 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 <> '' "; |
| 5770 | - if ($olderthanmonths > 0) { |
|
| 5771 | - if ($globalDBdriver == 'mysql') { |
|
| 5770 | + if ($olderthanmonths > 0) { |
|
| 5771 | + if ($globalDBdriver == 'mysql') { |
|
| 5772 | 5772 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5773 | 5773 | } else { |
| 5774 | 5774 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5775 | 5775 | } |
| 5776 | - } |
|
| 5777 | - if ($sincedate != '') { |
|
| 5778 | - if ($globalDBdriver == 'mysql') { |
|
| 5776 | + } |
|
| 5777 | + if ($sincedate != '') { |
|
| 5778 | + if ($globalDBdriver == 'mysql') { |
|
| 5779 | 5779 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5780 | 5780 | } else { |
| 5781 | 5781 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5782 | 5782 | } |
| 5783 | 5783 | } |
| 5784 | 5784 | |
| 5785 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5786 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5787 | - $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 |
|
| 5785 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5786 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5787 | + $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 |
|
| 5788 | 5788 | ORDER BY airport_departure_icao_count DESC"; |
| 5789 | 5789 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5790 | 5790 | |
@@ -5809,37 +5809,37 @@ discard block |
||
| 5809 | 5809 | } |
| 5810 | 5810 | |
| 5811 | 5811 | /** |
| 5812 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 5813 | - * |
|
| 5814 | - * @return Array the airport list |
|
| 5815 | - * |
|
| 5816 | - */ |
|
| 5812 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 5813 | + * |
|
| 5814 | + * @return Array the airport list |
|
| 5815 | + * |
|
| 5816 | + */ |
|
| 5817 | 5817 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5818 | 5818 | { |
| 5819 | 5819 | global $globalDBdriver; |
| 5820 | 5820 | $filter_query = $this->getFilter($filters,true,true); |
| 5821 | 5821 | $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 |
| 5822 | 5822 | 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"; |
| 5823 | - if ($olderthanmonths > 0) { |
|
| 5824 | - if ($globalDBdriver == 'mysql') { |
|
| 5823 | + if ($olderthanmonths > 0) { |
|
| 5824 | + if ($globalDBdriver == 'mysql') { |
|
| 5825 | 5825 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5826 | 5826 | } else { |
| 5827 | 5827 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5828 | 5828 | } |
| 5829 | - } |
|
| 5830 | - if ($sincedate != '') { |
|
| 5831 | - if ($globalDBdriver == 'mysql') { |
|
| 5829 | + } |
|
| 5830 | + if ($sincedate != '') { |
|
| 5831 | + if ($globalDBdriver == 'mysql') { |
|
| 5832 | 5832 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5833 | 5833 | } else { |
| 5834 | 5834 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 5835 | 5835 | } |
| 5836 | 5836 | } |
| 5837 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5838 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5839 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5837 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5838 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5839 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5840 | 5840 | ORDER BY airport_departure_icao_count DESC"; |
| 5841 | 5841 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5842 | - //echo $query; |
|
| 5842 | + //echo $query; |
|
| 5843 | 5843 | $sth = $this->db->prepare($query); |
| 5844 | 5844 | $sth->execute(); |
| 5845 | 5845 | |
@@ -5860,35 +5860,35 @@ discard block |
||
| 5860 | 5860 | } |
| 5861 | 5861 | |
| 5862 | 5862 | /** |
| 5863 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 5864 | - * |
|
| 5865 | - * @return Array the airport list |
|
| 5866 | - * |
|
| 5867 | - */ |
|
| 5863 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 5864 | + * |
|
| 5865 | + * @return Array the airport list |
|
| 5866 | + * |
|
| 5867 | + */ |
|
| 5868 | 5868 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 5869 | 5869 | { |
| 5870 | 5870 | global $globalDBdriver; |
| 5871 | 5871 | $filter_query = $this->getFilter($filters,true,true); |
| 5872 | 5872 | $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 |
| 5873 | 5873 | 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 "; |
| 5874 | - if ($olderthanmonths > 0) { |
|
| 5875 | - if ($globalDBdriver == 'mysql') { |
|
| 5874 | + if ($olderthanmonths > 0) { |
|
| 5875 | + if ($globalDBdriver == 'mysql') { |
|
| 5876 | 5876 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5877 | 5877 | } else { |
| 5878 | 5878 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5879 | 5879 | } |
| 5880 | - } |
|
| 5881 | - if ($sincedate != '') { |
|
| 5882 | - if ($globalDBdriver == 'mysql') { |
|
| 5880 | + } |
|
| 5881 | + if ($sincedate != '') { |
|
| 5882 | + if ($globalDBdriver == 'mysql') { |
|
| 5883 | 5883 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5884 | 5884 | } else { |
| 5885 | 5885 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
| 5886 | 5886 | } |
| 5887 | 5887 | } |
| 5888 | 5888 | |
| 5889 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5890 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5891 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5889 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 5890 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 5891 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 5892 | 5892 | ORDER BY airport_departure_icao_count DESC"; |
| 5893 | 5893 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5894 | 5894 | |
@@ -5913,11 +5913,11 @@ discard block |
||
| 5913 | 5913 | } |
| 5914 | 5914 | |
| 5915 | 5915 | /** |
| 5916 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 5917 | - * |
|
| 5918 | - * @return Array the airport list |
|
| 5919 | - * |
|
| 5920 | - */ |
|
| 5916 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 5917 | + * |
|
| 5918 | + * @return Array the airport list |
|
| 5919 | + * |
|
| 5920 | + */ |
|
| 5921 | 5921 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
| 5922 | 5922 | { |
| 5923 | 5923 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5951,11 +5951,11 @@ discard block |
||
| 5951 | 5951 | |
| 5952 | 5952 | |
| 5953 | 5953 | /** |
| 5954 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 5955 | - * |
|
| 5956 | - * @return Array the airport list |
|
| 5957 | - * |
|
| 5958 | - */ |
|
| 5954 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 5955 | + * |
|
| 5956 | + * @return Array the airport list |
|
| 5957 | + * |
|
| 5958 | + */ |
|
| 5959 | 5959 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
| 5960 | 5960 | { |
| 5961 | 5961 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5986,11 +5986,11 @@ discard block |
||
| 5986 | 5986 | |
| 5987 | 5987 | |
| 5988 | 5988 | /** |
| 5989 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 5990 | - * |
|
| 5991 | - * @return Array the airport list |
|
| 5992 | - * |
|
| 5993 | - */ |
|
| 5989 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 5990 | + * |
|
| 5991 | + * @return Array the airport list |
|
| 5992 | + * |
|
| 5993 | + */ |
|
| 5994 | 5994 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
| 5995 | 5995 | { |
| 5996 | 5996 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6023,11 +6023,11 @@ discard block |
||
| 6023 | 6023 | |
| 6024 | 6024 | |
| 6025 | 6025 | /** |
| 6026 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6027 | - * |
|
| 6028 | - * @return Array the airport list |
|
| 6029 | - * |
|
| 6030 | - */ |
|
| 6026 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6027 | + * |
|
| 6028 | + * @return Array the airport list |
|
| 6029 | + * |
|
| 6030 | + */ |
|
| 6031 | 6031 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 6032 | 6032 | { |
| 6033 | 6033 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6057,11 +6057,11 @@ discard block |
||
| 6057 | 6057 | |
| 6058 | 6058 | |
| 6059 | 6059 | /** |
| 6060 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 6061 | - * |
|
| 6062 | - * @return Array the airport list |
|
| 6063 | - * |
|
| 6064 | - */ |
|
| 6060 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 6061 | + * |
|
| 6062 | + * @return Array the airport list |
|
| 6063 | + * |
|
| 6064 | + */ |
|
| 6065 | 6065 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
| 6066 | 6066 | { |
| 6067 | 6067 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6094,11 +6094,11 @@ discard block |
||
| 6094 | 6094 | |
| 6095 | 6095 | |
| 6096 | 6096 | /** |
| 6097 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6098 | - * |
|
| 6099 | - * @return Array the airport list |
|
| 6100 | - * |
|
| 6101 | - */ |
|
| 6097 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6098 | + * |
|
| 6099 | + * @return Array the airport list |
|
| 6100 | + * |
|
| 6101 | + */ |
|
| 6102 | 6102 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
| 6103 | 6103 | { |
| 6104 | 6104 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6128,11 +6128,11 @@ discard block |
||
| 6128 | 6128 | |
| 6129 | 6129 | |
| 6130 | 6130 | /** |
| 6131 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6132 | - * |
|
| 6133 | - * @return Array the airport list |
|
| 6134 | - * |
|
| 6135 | - */ |
|
| 6131 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6132 | + * |
|
| 6133 | + * @return Array the airport list |
|
| 6134 | + * |
|
| 6135 | + */ |
|
| 6136 | 6136 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
| 6137 | 6137 | { |
| 6138 | 6138 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6165,11 +6165,11 @@ discard block |
||
| 6165 | 6165 | |
| 6166 | 6166 | |
| 6167 | 6167 | /** |
| 6168 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6169 | - * |
|
| 6170 | - * @return Array the airport list |
|
| 6171 | - * |
|
| 6172 | - */ |
|
| 6168 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6169 | + * |
|
| 6170 | + * @return Array the airport list |
|
| 6171 | + * |
|
| 6172 | + */ |
|
| 6173 | 6173 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
| 6174 | 6174 | { |
| 6175 | 6175 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6200,11 +6200,11 @@ discard block |
||
| 6200 | 6200 | |
| 6201 | 6201 | |
| 6202 | 6202 | /** |
| 6203 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6204 | - * |
|
| 6205 | - * @return Array the airport list |
|
| 6206 | - * |
|
| 6207 | - */ |
|
| 6203 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6204 | + * |
|
| 6205 | + * @return Array the airport list |
|
| 6206 | + * |
|
| 6207 | + */ |
|
| 6208 | 6208 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6209 | 6209 | { |
| 6210 | 6210 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6237,11 +6237,11 @@ discard block |
||
| 6237 | 6237 | |
| 6238 | 6238 | |
| 6239 | 6239 | /** |
| 6240 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6241 | - * |
|
| 6242 | - * @return Array the airport list |
|
| 6243 | - * |
|
| 6244 | - */ |
|
| 6240 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6241 | + * |
|
| 6242 | + * @return Array the airport list |
|
| 6243 | + * |
|
| 6244 | + */ |
|
| 6245 | 6245 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6246 | 6246 | { |
| 6247 | 6247 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6271,11 +6271,11 @@ discard block |
||
| 6271 | 6271 | |
| 6272 | 6272 | |
| 6273 | 6273 | /** |
| 6274 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6275 | - * |
|
| 6276 | - * @return Array the airport list |
|
| 6277 | - * |
|
| 6278 | - */ |
|
| 6274 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6275 | + * |
|
| 6276 | + * @return Array the airport list |
|
| 6277 | + * |
|
| 6278 | + */ |
|
| 6279 | 6279 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
| 6280 | 6280 | { |
| 6281 | 6281 | global $globalTimezone, $globalDBdriver; |
@@ -6321,11 +6321,11 @@ discard block |
||
| 6321 | 6321 | |
| 6322 | 6322 | |
| 6323 | 6323 | /** |
| 6324 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6325 | - * |
|
| 6326 | - * @return Array the airport list |
|
| 6327 | - * |
|
| 6328 | - */ |
|
| 6324 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6325 | + * |
|
| 6326 | + * @return Array the airport list |
|
| 6327 | + * |
|
| 6328 | + */ |
|
| 6329 | 6329 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
| 6330 | 6330 | { |
| 6331 | 6331 | global $globalTimezone, $globalDBdriver; |
@@ -6368,11 +6368,11 @@ discard block |
||
| 6368 | 6368 | |
| 6369 | 6369 | |
| 6370 | 6370 | /** |
| 6371 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6372 | - * |
|
| 6373 | - * @return Array the airport list |
|
| 6374 | - * |
|
| 6375 | - */ |
|
| 6371 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6372 | + * |
|
| 6373 | + * @return Array the airport list |
|
| 6374 | + * |
|
| 6375 | + */ |
|
| 6376 | 6376 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
| 6377 | 6377 | { |
| 6378 | 6378 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6406,11 +6406,11 @@ discard block |
||
| 6406 | 6406 | |
| 6407 | 6407 | |
| 6408 | 6408 | /** |
| 6409 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6410 | - * |
|
| 6411 | - * @return Array the airport list |
|
| 6412 | - * |
|
| 6413 | - */ |
|
| 6409 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6410 | + * |
|
| 6411 | + * @return Array the airport list |
|
| 6412 | + * |
|
| 6413 | + */ |
|
| 6414 | 6414 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
| 6415 | 6415 | { |
| 6416 | 6416 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6441,11 +6441,11 @@ discard block |
||
| 6441 | 6441 | |
| 6442 | 6442 | |
| 6443 | 6443 | /** |
| 6444 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6445 | - * |
|
| 6446 | - * @return Array the airport list |
|
| 6447 | - * |
|
| 6448 | - */ |
|
| 6444 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6445 | + * |
|
| 6446 | + * @return Array the airport list |
|
| 6447 | + * |
|
| 6448 | + */ |
|
| 6449 | 6449 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
| 6450 | 6450 | { |
| 6451 | 6451 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6479,11 +6479,11 @@ discard block |
||
| 6479 | 6479 | |
| 6480 | 6480 | |
| 6481 | 6481 | /** |
| 6482 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6483 | - * |
|
| 6484 | - * @return Array the airport list |
|
| 6485 | - * |
|
| 6486 | - */ |
|
| 6482 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6483 | + * |
|
| 6484 | + * @return Array the airport list |
|
| 6485 | + * |
|
| 6486 | + */ |
|
| 6487 | 6487 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
| 6488 | 6488 | { |
| 6489 | 6489 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6513,40 +6513,40 @@ discard block |
||
| 6513 | 6513 | |
| 6514 | 6514 | |
| 6515 | 6515 | /** |
| 6516 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6517 | - * |
|
| 6518 | - * @param Boolean $limit Limit result to 10 or not |
|
| 6519 | - * @param Integer $olderthanmonths Only show result older than x months |
|
| 6520 | - * @param String $sincedate Only show result since x date |
|
| 6521 | - * @param Boolean $icaoaskey Show result by ICAO |
|
| 6522 | - * @param Array $filters Filter used here |
|
| 6523 | - * @return Array the airport list |
|
| 6524 | - * |
|
| 6525 | - */ |
|
| 6516 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6517 | + * |
|
| 6518 | + * @param Boolean $limit Limit result to 10 or not |
|
| 6519 | + * @param Integer $olderthanmonths Only show result older than x months |
|
| 6520 | + * @param String $sincedate Only show result since x date |
|
| 6521 | + * @param Boolean $icaoaskey Show result by ICAO |
|
| 6522 | + * @param Array $filters Filter used here |
|
| 6523 | + * @return Array the airport list |
|
| 6524 | + * |
|
| 6525 | + */ |
|
| 6526 | 6526 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
| 6527 | 6527 | { |
| 6528 | 6528 | global $globalDBdriver; |
| 6529 | 6529 | $filter_query = $this->getFilter($filters,true,true); |
| 6530 | 6530 | $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 |
| 6531 | 6531 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
| 6532 | - if ($olderthanmonths > 0) { |
|
| 6533 | - if ($globalDBdriver == 'mysql') { |
|
| 6532 | + if ($olderthanmonths > 0) { |
|
| 6533 | + if ($globalDBdriver == 'mysql') { |
|
| 6534 | 6534 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6535 | 6535 | } else { |
| 6536 | 6536 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6537 | 6537 | } |
| 6538 | 6538 | } |
| 6539 | - if ($sincedate != '') { |
|
| 6540 | - if ($globalDBdriver == 'mysql') { |
|
| 6539 | + if ($sincedate != '') { |
|
| 6540 | + if ($globalDBdriver == 'mysql') { |
|
| 6541 | 6541 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6542 | 6542 | } else { |
| 6543 | 6543 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6544 | 6544 | } |
| 6545 | 6545 | } |
| 6546 | 6546 | |
| 6547 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6548 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6549 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6547 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6548 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6549 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6550 | 6550 | ORDER BY airport_arrival_icao_count DESC"; |
| 6551 | 6551 | if ($limit) $query .= " LIMIT 10"; |
| 6552 | 6552 | |
@@ -6575,35 +6575,35 @@ discard block |
||
| 6575 | 6575 | } |
| 6576 | 6576 | |
| 6577 | 6577 | /** |
| 6578 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6579 | - * |
|
| 6580 | - * @return Array the airport list |
|
| 6581 | - * |
|
| 6582 | - */ |
|
| 6578 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6579 | + * |
|
| 6580 | + * @return Array the airport list |
|
| 6581 | + * |
|
| 6582 | + */ |
|
| 6583 | 6583 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
| 6584 | 6584 | { |
| 6585 | 6585 | global $globalDBdriver; |
| 6586 | 6586 | $filter_query = $this->getFilter($filters,true,true); |
| 6587 | 6587 | $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 |
| 6588 | 6588 | 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 <> '' "; |
| 6589 | - if ($olderthanmonths > 0) { |
|
| 6590 | - if ($globalDBdriver == 'mysql') { |
|
| 6589 | + if ($olderthanmonths > 0) { |
|
| 6590 | + if ($globalDBdriver == 'mysql') { |
|
| 6591 | 6591 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6592 | 6592 | } else { |
| 6593 | 6593 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6594 | 6594 | } |
| 6595 | 6595 | } |
| 6596 | - if ($sincedate != '') { |
|
| 6597 | - if ($globalDBdriver == 'mysql') { |
|
| 6596 | + if ($sincedate != '') { |
|
| 6597 | + if ($globalDBdriver == 'mysql') { |
|
| 6598 | 6598 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6599 | 6599 | } else { |
| 6600 | 6600 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6601 | 6601 | } |
| 6602 | 6602 | } |
| 6603 | 6603 | |
| 6604 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6605 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6606 | - $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 |
|
| 6604 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6605 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6606 | + $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 |
|
| 6607 | 6607 | ORDER BY airport_arrival_icao_count DESC"; |
| 6608 | 6608 | if ($limit) $query .= " LIMIT 10"; |
| 6609 | 6609 | |
@@ -6634,34 +6634,34 @@ discard block |
||
| 6634 | 6634 | |
| 6635 | 6635 | |
| 6636 | 6636 | /** |
| 6637 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6638 | - * |
|
| 6639 | - * @return Array the airport list |
|
| 6640 | - * |
|
| 6641 | - */ |
|
| 6637 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6638 | + * |
|
| 6639 | + * @return Array the airport list |
|
| 6640 | + * |
|
| 6641 | + */ |
|
| 6642 | 6642 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
| 6643 | 6643 | { |
| 6644 | 6644 | global $globalDBdriver; |
| 6645 | 6645 | $filter_query = $this->getFilter($filters,true,true); |
| 6646 | 6646 | $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 |
| 6647 | 6647 | 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"; |
| 6648 | - if ($olderthanmonths > 0) { |
|
| 6649 | - if ($globalDBdriver == 'mysql') { |
|
| 6648 | + if ($olderthanmonths > 0) { |
|
| 6649 | + if ($globalDBdriver == 'mysql') { |
|
| 6650 | 6650 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6651 | 6651 | } else { |
| 6652 | 6652 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6653 | 6653 | } |
| 6654 | 6654 | } |
| 6655 | - if ($sincedate != '') { |
|
| 6656 | - if ($globalDBdriver == 'mysql') { |
|
| 6655 | + if ($sincedate != '') { |
|
| 6656 | + if ($globalDBdriver == 'mysql') { |
|
| 6657 | 6657 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6658 | 6658 | } else { |
| 6659 | 6659 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6660 | 6660 | } |
| 6661 | 6661 | } |
| 6662 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6663 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6664 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6662 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6663 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6664 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6665 | 6665 | ORDER BY airport_arrival_icao_count DESC"; |
| 6666 | 6666 | if ($limit) $query .= " LIMIT 10"; |
| 6667 | 6667 | |
@@ -6690,35 +6690,35 @@ discard block |
||
| 6690 | 6690 | } |
| 6691 | 6691 | |
| 6692 | 6692 | /** |
| 6693 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6694 | - * |
|
| 6695 | - * @return Array the airport list |
|
| 6696 | - * |
|
| 6697 | - */ |
|
| 6693 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6694 | + * |
|
| 6695 | + * @return Array the airport list |
|
| 6696 | + * |
|
| 6697 | + */ |
|
| 6698 | 6698 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
| 6699 | 6699 | { |
| 6700 | 6700 | global $globalDBdriver; |
| 6701 | 6701 | $filter_query = $this->getFilter($filters,true,true); |
| 6702 | 6702 | $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 |
| 6703 | 6703 | 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 "; |
| 6704 | - if ($olderthanmonths > 0) { |
|
| 6705 | - if ($globalDBdriver == 'mysql') { |
|
| 6704 | + if ($olderthanmonths > 0) { |
|
| 6705 | + if ($globalDBdriver == 'mysql') { |
|
| 6706 | 6706 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6707 | 6707 | } else { |
| 6708 | 6708 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6709 | 6709 | } |
| 6710 | 6710 | } |
| 6711 | - if ($sincedate != '') { |
|
| 6712 | - if ($globalDBdriver == 'mysql') { |
|
| 6711 | + if ($sincedate != '') { |
|
| 6712 | + if ($globalDBdriver == 'mysql') { |
|
| 6713 | 6713 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6714 | 6714 | } else { |
| 6715 | 6715 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6716 | 6716 | } |
| 6717 | 6717 | } |
| 6718 | 6718 | |
| 6719 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6720 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6721 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6719 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6720 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6721 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6722 | 6722 | ORDER BY airport_arrival_icao_count DESC"; |
| 6723 | 6723 | if ($limit) $query .= " LIMIT 10"; |
| 6724 | 6724 | |
@@ -6748,11 +6748,11 @@ discard block |
||
| 6748 | 6748 | } |
| 6749 | 6749 | |
| 6750 | 6750 | /** |
| 6751 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 6752 | - * |
|
| 6753 | - * @return Array the airport list |
|
| 6754 | - * |
|
| 6755 | - */ |
|
| 6751 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 6752 | + * |
|
| 6753 | + * @return Array the airport list |
|
| 6754 | + * |
|
| 6755 | + */ |
|
| 6756 | 6756 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
| 6757 | 6757 | { |
| 6758 | 6758 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6784,11 +6784,11 @@ discard block |
||
| 6784 | 6784 | |
| 6785 | 6785 | |
| 6786 | 6786 | /** |
| 6787 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 6788 | - * |
|
| 6789 | - * @return Array the airport list |
|
| 6790 | - * |
|
| 6791 | - */ |
|
| 6787 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 6788 | + * |
|
| 6789 | + * @return Array the airport list |
|
| 6790 | + * |
|
| 6791 | + */ |
|
| 6792 | 6792 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
| 6793 | 6793 | { |
| 6794 | 6794 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6819,11 +6819,11 @@ discard block |
||
| 6819 | 6819 | |
| 6820 | 6820 | |
| 6821 | 6821 | /** |
| 6822 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 6823 | - * |
|
| 6824 | - * @return Array the airport list |
|
| 6825 | - * |
|
| 6826 | - */ |
|
| 6822 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 6823 | + * |
|
| 6824 | + * @return Array the airport list |
|
| 6825 | + * |
|
| 6826 | + */ |
|
| 6827 | 6827 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
| 6828 | 6828 | { |
| 6829 | 6829 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6857,11 +6857,11 @@ discard block |
||
| 6857 | 6857 | |
| 6858 | 6858 | |
| 6859 | 6859 | /** |
| 6860 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6861 | - * |
|
| 6862 | - * @return Array the airport list |
|
| 6863 | - * |
|
| 6864 | - */ |
|
| 6860 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6861 | + * |
|
| 6862 | + * @return Array the airport list |
|
| 6863 | + * |
|
| 6864 | + */ |
|
| 6865 | 6865 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 6866 | 6866 | { |
| 6867 | 6867 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6891,11 +6891,11 @@ discard block |
||
| 6891 | 6891 | |
| 6892 | 6892 | |
| 6893 | 6893 | /** |
| 6894 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 6895 | - * |
|
| 6896 | - * @return Array the airport list |
|
| 6897 | - * |
|
| 6898 | - */ |
|
| 6894 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 6895 | + * |
|
| 6896 | + * @return Array the airport list |
|
| 6897 | + * |
|
| 6898 | + */ |
|
| 6899 | 6899 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
| 6900 | 6900 | { |
| 6901 | 6901 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6929,11 +6929,11 @@ discard block |
||
| 6929 | 6929 | |
| 6930 | 6930 | |
| 6931 | 6931 | /** |
| 6932 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6933 | - * |
|
| 6934 | - * @return Array the airport list |
|
| 6935 | - * |
|
| 6936 | - */ |
|
| 6932 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6933 | + * |
|
| 6934 | + * @return Array the airport list |
|
| 6935 | + * |
|
| 6936 | + */ |
|
| 6937 | 6937 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
| 6938 | 6938 | { |
| 6939 | 6939 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6964,11 +6964,11 @@ discard block |
||
| 6964 | 6964 | |
| 6965 | 6965 | |
| 6966 | 6966 | /** |
| 6967 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 6968 | - * |
|
| 6969 | - * @return Array the airport list |
|
| 6970 | - * |
|
| 6971 | - */ |
|
| 6967 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 6968 | + * |
|
| 6969 | + * @return Array the airport list |
|
| 6970 | + * |
|
| 6971 | + */ |
|
| 6972 | 6972 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
| 6973 | 6973 | { |
| 6974 | 6974 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7001,11 +7001,11 @@ discard block |
||
| 7001 | 7001 | |
| 7002 | 7002 | |
| 7003 | 7003 | /** |
| 7004 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 7005 | - * |
|
| 7006 | - * @return Array the airport list |
|
| 7007 | - * |
|
| 7008 | - */ |
|
| 7004 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 7005 | + * |
|
| 7006 | + * @return Array the airport list |
|
| 7007 | + * |
|
| 7008 | + */ |
|
| 7009 | 7009 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
| 7010 | 7010 | { |
| 7011 | 7011 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7035,11 +7035,11 @@ discard block |
||
| 7035 | 7035 | |
| 7036 | 7036 | |
| 7037 | 7037 | /** |
| 7038 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7039 | - * |
|
| 7040 | - * @return Array the airport list |
|
| 7041 | - * |
|
| 7042 | - */ |
|
| 7038 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7039 | + * |
|
| 7040 | + * @return Array the airport list |
|
| 7041 | + * |
|
| 7042 | + */ |
|
| 7043 | 7043 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 7044 | 7044 | { |
| 7045 | 7045 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7073,11 +7073,11 @@ discard block |
||
| 7073 | 7073 | |
| 7074 | 7074 | |
| 7075 | 7075 | /** |
| 7076 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7077 | - * |
|
| 7078 | - * @return Array the airport list |
|
| 7079 | - * |
|
| 7080 | - */ |
|
| 7076 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7077 | + * |
|
| 7078 | + * @return Array the airport list |
|
| 7079 | + * |
|
| 7080 | + */ |
|
| 7081 | 7081 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 7082 | 7082 | { |
| 7083 | 7083 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7108,11 +7108,11 @@ discard block |
||
| 7108 | 7108 | |
| 7109 | 7109 | |
| 7110 | 7110 | /** |
| 7111 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7112 | - * |
|
| 7113 | - * @return Array the airport list |
|
| 7114 | - * |
|
| 7115 | - */ |
|
| 7111 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7112 | + * |
|
| 7113 | + * @return Array the airport list |
|
| 7114 | + * |
|
| 7115 | + */ |
|
| 7116 | 7116 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
| 7117 | 7117 | { |
| 7118 | 7118 | global $globalTimezone, $globalDBdriver; |
@@ -7158,11 +7158,11 @@ discard block |
||
| 7158 | 7158 | |
| 7159 | 7159 | |
| 7160 | 7160 | /** |
| 7161 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7162 | - * |
|
| 7163 | - * @return Array the airport list |
|
| 7164 | - * |
|
| 7165 | - */ |
|
| 7161 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7162 | + * |
|
| 7163 | + * @return Array the airport list |
|
| 7164 | + * |
|
| 7165 | + */ |
|
| 7166 | 7166 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
| 7167 | 7167 | { |
| 7168 | 7168 | global $globalTimezone, $globalDBdriver; |
@@ -7205,11 +7205,11 @@ discard block |
||
| 7205 | 7205 | |
| 7206 | 7206 | |
| 7207 | 7207 | /** |
| 7208 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7209 | - * |
|
| 7210 | - * @return Array the airport list |
|
| 7211 | - * |
|
| 7212 | - */ |
|
| 7208 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7209 | + * |
|
| 7210 | + * @return Array the airport list |
|
| 7211 | + * |
|
| 7212 | + */ |
|
| 7213 | 7213 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
| 7214 | 7214 | { |
| 7215 | 7215 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7242,11 +7242,11 @@ discard block |
||
| 7242 | 7242 | |
| 7243 | 7243 | |
| 7244 | 7244 | /** |
| 7245 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7246 | - * |
|
| 7247 | - * @return Array the airport list |
|
| 7248 | - * |
|
| 7249 | - */ |
|
| 7245 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7246 | + * |
|
| 7247 | + * @return Array the airport list |
|
| 7248 | + * |
|
| 7249 | + */ |
|
| 7250 | 7250 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
| 7251 | 7251 | { |
| 7252 | 7252 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7277,11 +7277,11 @@ discard block |
||
| 7277 | 7277 | |
| 7278 | 7278 | |
| 7279 | 7279 | /** |
| 7280 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7281 | - * |
|
| 7282 | - * @return Array the airport list |
|
| 7283 | - * |
|
| 7284 | - */ |
|
| 7280 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7281 | + * |
|
| 7282 | + * @return Array the airport list |
|
| 7283 | + * |
|
| 7284 | + */ |
|
| 7285 | 7285 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
| 7286 | 7286 | { |
| 7287 | 7287 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7314,11 +7314,11 @@ discard block |
||
| 7314 | 7314 | |
| 7315 | 7315 | |
| 7316 | 7316 | /** |
| 7317 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7318 | - * |
|
| 7319 | - * @return Array the airport list |
|
| 7320 | - * |
|
| 7321 | - */ |
|
| 7317 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7318 | + * |
|
| 7319 | + * @return Array the airport list |
|
| 7320 | + * |
|
| 7321 | + */ |
|
| 7322 | 7322 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
| 7323 | 7323 | { |
| 7324 | 7324 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7349,11 +7349,11 @@ discard block |
||
| 7349 | 7349 | |
| 7350 | 7350 | |
| 7351 | 7351 | /** |
| 7352 | - * Counts all airport departure countries |
|
| 7353 | - * |
|
| 7354 | - * @return Array the airport departure list |
|
| 7355 | - * |
|
| 7356 | - */ |
|
| 7352 | + * Counts all airport departure countries |
|
| 7353 | + * |
|
| 7354 | + * @return Array the airport departure list |
|
| 7355 | + * |
|
| 7356 | + */ |
|
| 7357 | 7357 | public function countAllDepartureCountries($filters = array()) |
| 7358 | 7358 | { |
| 7359 | 7359 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7383,11 +7383,11 @@ discard block |
||
| 7383 | 7383 | |
| 7384 | 7384 | |
| 7385 | 7385 | /** |
| 7386 | - * Counts all airport arrival countries |
|
| 7387 | - * |
|
| 7388 | - * @return Array the airport arrival list |
|
| 7389 | - * |
|
| 7390 | - */ |
|
| 7386 | + * Counts all airport arrival countries |
|
| 7387 | + * |
|
| 7388 | + * @return Array the airport arrival list |
|
| 7389 | + * |
|
| 7390 | + */ |
|
| 7391 | 7391 | public function countAllArrivalCountries($limit = true,$filters = array()) |
| 7392 | 7392 | { |
| 7393 | 7393 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7420,11 +7420,11 @@ discard block |
||
| 7420 | 7420 | |
| 7421 | 7421 | |
| 7422 | 7422 | /** |
| 7423 | - * Gets all route combinations |
|
| 7424 | - * |
|
| 7425 | - * @return Array the route list |
|
| 7426 | - * |
|
| 7427 | - */ |
|
| 7423 | + * Gets all route combinations |
|
| 7424 | + * |
|
| 7425 | + * @return Array the route list |
|
| 7426 | + * |
|
| 7427 | + */ |
|
| 7428 | 7428 | public function countAllRoutes($filters = array()) |
| 7429 | 7429 | { |
| 7430 | 7430 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7463,11 +7463,11 @@ discard block |
||
| 7463 | 7463 | |
| 7464 | 7464 | |
| 7465 | 7465 | /** |
| 7466 | - * Gets all route combinations based on an aircraft |
|
| 7467 | - * |
|
| 7468 | - * @return Array the route list |
|
| 7469 | - * |
|
| 7470 | - */ |
|
| 7466 | + * Gets all route combinations based on an aircraft |
|
| 7467 | + * |
|
| 7468 | + * @return Array the route list |
|
| 7469 | + * |
|
| 7470 | + */ |
|
| 7471 | 7471 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
| 7472 | 7472 | { |
| 7473 | 7473 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7503,11 +7503,11 @@ discard block |
||
| 7503 | 7503 | |
| 7504 | 7504 | |
| 7505 | 7505 | /** |
| 7506 | - * Gets all route combinations based on an aircraft registration |
|
| 7507 | - * |
|
| 7508 | - * @return Array the route list |
|
| 7509 | - * |
|
| 7510 | - */ |
|
| 7506 | + * Gets all route combinations based on an aircraft registration |
|
| 7507 | + * |
|
| 7508 | + * @return Array the route list |
|
| 7509 | + * |
|
| 7510 | + */ |
|
| 7511 | 7511 | public function countAllRoutesByRegistration($registration, $filters = array()) |
| 7512 | 7512 | { |
| 7513 | 7513 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7545,11 +7545,11 @@ discard block |
||
| 7545 | 7545 | |
| 7546 | 7546 | |
| 7547 | 7547 | /** |
| 7548 | - * Gets all route combinations based on an airline |
|
| 7549 | - * |
|
| 7550 | - * @return Array the route list |
|
| 7551 | - * |
|
| 7552 | - */ |
|
| 7548 | + * Gets all route combinations based on an airline |
|
| 7549 | + * |
|
| 7550 | + * @return Array the route list |
|
| 7551 | + * |
|
| 7552 | + */ |
|
| 7553 | 7553 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
| 7554 | 7554 | { |
| 7555 | 7555 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7587,11 +7587,11 @@ discard block |
||
| 7587 | 7587 | |
| 7588 | 7588 | |
| 7589 | 7589 | /** |
| 7590 | - * Gets all route combinations based on an airport |
|
| 7591 | - * |
|
| 7592 | - * @return Array the route list |
|
| 7593 | - * |
|
| 7594 | - */ |
|
| 7590 | + * Gets all route combinations based on an airport |
|
| 7591 | + * |
|
| 7592 | + * @return Array the route list |
|
| 7593 | + * |
|
| 7594 | + */ |
|
| 7595 | 7595 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
| 7596 | 7596 | { |
| 7597 | 7597 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7628,11 +7628,11 @@ discard block |
||
| 7628 | 7628 | |
| 7629 | 7629 | |
| 7630 | 7630 | /** |
| 7631 | - * Gets all route combinations based on an country |
|
| 7632 | - * |
|
| 7633 | - * @return Array the route list |
|
| 7634 | - * |
|
| 7635 | - */ |
|
| 7631 | + * Gets all route combinations based on an country |
|
| 7632 | + * |
|
| 7633 | + * @return Array the route list |
|
| 7634 | + * |
|
| 7635 | + */ |
|
| 7636 | 7636 | public function countAllRoutesByCountry($country, $filters = array()) |
| 7637 | 7637 | { |
| 7638 | 7638 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7668,11 +7668,11 @@ discard block |
||
| 7668 | 7668 | |
| 7669 | 7669 | |
| 7670 | 7670 | /** |
| 7671 | - * Gets all route combinations based on an date |
|
| 7672 | - * |
|
| 7673 | - * @return Array the route list |
|
| 7674 | - * |
|
| 7675 | - */ |
|
| 7671 | + * Gets all route combinations based on an date |
|
| 7672 | + * |
|
| 7673 | + * @return Array the route list |
|
| 7674 | + * |
|
| 7675 | + */ |
|
| 7676 | 7676 | public function countAllRoutesByDate($date, $filters = array()) |
| 7677 | 7677 | { |
| 7678 | 7678 | global $globalTimezone, $globalDBdriver; |
@@ -7722,11 +7722,11 @@ discard block |
||
| 7722 | 7722 | |
| 7723 | 7723 | |
| 7724 | 7724 | /** |
| 7725 | - * Gets all route combinations based on an ident/callsign |
|
| 7726 | - * |
|
| 7727 | - * @return Array the route list |
|
| 7728 | - * |
|
| 7729 | - */ |
|
| 7725 | + * Gets all route combinations based on an ident/callsign |
|
| 7726 | + * |
|
| 7727 | + * @return Array the route list |
|
| 7728 | + * |
|
| 7729 | + */ |
|
| 7730 | 7730 | public function countAllRoutesByIdent($ident, $filters = array()) |
| 7731 | 7731 | { |
| 7732 | 7732 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7763,11 +7763,11 @@ discard block |
||
| 7763 | 7763 | |
| 7764 | 7764 | |
| 7765 | 7765 | /** |
| 7766 | - * Gets all route combinations based on an manufacturer |
|
| 7767 | - * |
|
| 7768 | - * @return Array the route list |
|
| 7769 | - * |
|
| 7770 | - */ |
|
| 7766 | + * Gets all route combinations based on an manufacturer |
|
| 7767 | + * |
|
| 7768 | + * @return Array the route list |
|
| 7769 | + * |
|
| 7770 | + */ |
|
| 7771 | 7771 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
| 7772 | 7772 | { |
| 7773 | 7773 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7805,11 +7805,11 @@ discard block |
||
| 7805 | 7805 | |
| 7806 | 7806 | |
| 7807 | 7807 | /** |
| 7808 | - * Gets all route combinations with waypoints |
|
| 7809 | - * |
|
| 7810 | - * @return Array the route list |
|
| 7811 | - * |
|
| 7812 | - */ |
|
| 7808 | + * Gets all route combinations with waypoints |
|
| 7809 | + * |
|
| 7810 | + * @return Array the route list |
|
| 7811 | + * |
|
| 7812 | + */ |
|
| 7813 | 7813 | public function countAllRoutesWithWaypoints($filters = array()) |
| 7814 | 7814 | { |
| 7815 | 7815 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7846,11 +7846,11 @@ discard block |
||
| 7846 | 7846 | } |
| 7847 | 7847 | |
| 7848 | 7848 | /** |
| 7849 | - * Gets all callsigns that have flown over |
|
| 7850 | - * |
|
| 7851 | - * @return Array the callsign list |
|
| 7852 | - * |
|
| 7853 | - */ |
|
| 7849 | + * Gets all callsigns that have flown over |
|
| 7850 | + * |
|
| 7851 | + * @return Array the callsign list |
|
| 7852 | + * |
|
| 7853 | + */ |
|
| 7854 | 7854 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 7855 | 7855 | { |
| 7856 | 7856 | global $globalDBdriver; |
@@ -7888,11 +7888,11 @@ discard block |
||
| 7888 | 7888 | } |
| 7889 | 7889 | |
| 7890 | 7890 | /** |
| 7891 | - * Gets all callsigns that have flown over |
|
| 7892 | - * |
|
| 7893 | - * @return Array the callsign list |
|
| 7894 | - * |
|
| 7895 | - */ |
|
| 7891 | + * Gets all callsigns that have flown over |
|
| 7892 | + * |
|
| 7893 | + * @return Array the callsign list |
|
| 7894 | + * |
|
| 7895 | + */ |
|
| 7896 | 7896 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
| 7897 | 7897 | { |
| 7898 | 7898 | global $globalDBdriver; |
@@ -7933,11 +7933,11 @@ discard block |
||
| 7933 | 7933 | |
| 7934 | 7934 | |
| 7935 | 7935 | /** |
| 7936 | - * Counts all dates |
|
| 7937 | - * |
|
| 7938 | - * @return Array the date list |
|
| 7939 | - * |
|
| 7940 | - */ |
|
| 7936 | + * Counts all dates |
|
| 7937 | + * |
|
| 7938 | + * @return Array the date list |
|
| 7939 | + * |
|
| 7940 | + */ |
|
| 7941 | 7941 | public function countAllDates($filters = array()) |
| 7942 | 7942 | { |
| 7943 | 7943 | global $globalTimezone, $globalDBdriver; |
@@ -7982,11 +7982,11 @@ discard block |
||
| 7982 | 7982 | } |
| 7983 | 7983 | |
| 7984 | 7984 | /** |
| 7985 | - * Counts all dates |
|
| 7986 | - * |
|
| 7987 | - * @return Array the date list |
|
| 7988 | - * |
|
| 7989 | - */ |
|
| 7985 | + * Counts all dates |
|
| 7986 | + * |
|
| 7987 | + * @return Array the date list |
|
| 7988 | + * |
|
| 7989 | + */ |
|
| 7990 | 7990 | public function countAllDatesByAirlines($filters = array()) |
| 7991 | 7991 | { |
| 7992 | 7992 | global $globalTimezone, $globalDBdriver; |
@@ -8031,11 +8031,11 @@ discard block |
||
| 8031 | 8031 | } |
| 8032 | 8032 | |
| 8033 | 8033 | /** |
| 8034 | - * Counts all dates during the last 7 days |
|
| 8035 | - * |
|
| 8036 | - * @return Array the date list |
|
| 8037 | - * |
|
| 8038 | - */ |
|
| 8034 | + * Counts all dates during the last 7 days |
|
| 8035 | + * |
|
| 8036 | + * @return Array the date list |
|
| 8037 | + * |
|
| 8038 | + */ |
|
| 8039 | 8039 | public function countAllDatesLast7Days($filters = array()) |
| 8040 | 8040 | { |
| 8041 | 8041 | global $globalTimezone, $globalDBdriver; |
@@ -8057,7 +8057,7 @@ discard block |
||
| 8057 | 8057 | $query .= " GROUP BY date_name |
| 8058 | 8058 | ORDER BY date_name ASC"; |
| 8059 | 8059 | $query_data = array(':offset' => $offset); |
| 8060 | - } |
|
| 8060 | + } |
|
| 8061 | 8061 | |
| 8062 | 8062 | $sth = $this->db->prepare($query); |
| 8063 | 8063 | $sth->execute($query_data); |
@@ -8077,11 +8077,11 @@ discard block |
||
| 8077 | 8077 | } |
| 8078 | 8078 | |
| 8079 | 8079 | /** |
| 8080 | - * Counts all dates during the last month |
|
| 8081 | - * |
|
| 8082 | - * @return Array the date list |
|
| 8083 | - * |
|
| 8084 | - */ |
|
| 8080 | + * Counts all dates during the last month |
|
| 8081 | + * |
|
| 8082 | + * @return Array the date list |
|
| 8083 | + * |
|
| 8084 | + */ |
|
| 8085 | 8085 | public function countAllDatesLastMonth($filters = array()) |
| 8086 | 8086 | { |
| 8087 | 8087 | global $globalTimezone, $globalDBdriver; |
@@ -8103,7 +8103,7 @@ discard block |
||
| 8103 | 8103 | $query .= " GROUP BY date_name |
| 8104 | 8104 | ORDER BY date_name ASC"; |
| 8105 | 8105 | $query_data = array(':offset' => $offset); |
| 8106 | - } |
|
| 8106 | + } |
|
| 8107 | 8107 | |
| 8108 | 8108 | $sth = $this->db->prepare($query); |
| 8109 | 8109 | $sth->execute($query_data); |
@@ -8124,11 +8124,11 @@ discard block |
||
| 8124 | 8124 | |
| 8125 | 8125 | |
| 8126 | 8126 | /** |
| 8127 | - * Counts all dates during the last month |
|
| 8128 | - * |
|
| 8129 | - * @return Array the date list |
|
| 8130 | - * |
|
| 8131 | - */ |
|
| 8127 | + * Counts all dates during the last month |
|
| 8128 | + * |
|
| 8129 | + * @return Array the date list |
|
| 8130 | + * |
|
| 8131 | + */ |
|
| 8132 | 8132 | public function countAllDatesLastMonthByAirlines($filters = array()) |
| 8133 | 8133 | { |
| 8134 | 8134 | global $globalTimezone, $globalDBdriver; |
@@ -8151,7 +8151,7 @@ discard block |
||
| 8151 | 8151 | GROUP BY spotter_output.airline_icao, date_name |
| 8152 | 8152 | ORDER BY date_name ASC"; |
| 8153 | 8153 | $query_data = array(':offset' => $offset); |
| 8154 | - } |
|
| 8154 | + } |
|
| 8155 | 8155 | |
| 8156 | 8156 | $sth = $this->db->prepare($query); |
| 8157 | 8157 | $sth->execute($query_data); |
@@ -8173,11 +8173,11 @@ discard block |
||
| 8173 | 8173 | |
| 8174 | 8174 | |
| 8175 | 8175 | /** |
| 8176 | - * Counts all month |
|
| 8177 | - * |
|
| 8178 | - * @return Array the month list |
|
| 8179 | - * |
|
| 8180 | - */ |
|
| 8176 | + * Counts all month |
|
| 8177 | + * |
|
| 8178 | + * @return Array the month list |
|
| 8179 | + * |
|
| 8180 | + */ |
|
| 8181 | 8181 | public function countAllMonths($filters = array()) |
| 8182 | 8182 | { |
| 8183 | 8183 | global $globalTimezone, $globalDBdriver; |
@@ -8219,11 +8219,11 @@ discard block |
||
| 8219 | 8219 | } |
| 8220 | 8220 | |
| 8221 | 8221 | /** |
| 8222 | - * Counts all month |
|
| 8223 | - * |
|
| 8224 | - * @return Array the month list |
|
| 8225 | - * |
|
| 8226 | - */ |
|
| 8222 | + * Counts all month |
|
| 8223 | + * |
|
| 8224 | + * @return Array the month list |
|
| 8225 | + * |
|
| 8226 | + */ |
|
| 8227 | 8227 | public function countAllMonthsByAirlines($filters = array()) |
| 8228 | 8228 | { |
| 8229 | 8229 | global $globalTimezone, $globalDBdriver; |
@@ -8268,11 +8268,11 @@ discard block |
||
| 8268 | 8268 | } |
| 8269 | 8269 | |
| 8270 | 8270 | /** |
| 8271 | - * Counts all military month |
|
| 8272 | - * |
|
| 8273 | - * @return Array the month list |
|
| 8274 | - * |
|
| 8275 | - */ |
|
| 8271 | + * Counts all military month |
|
| 8272 | + * |
|
| 8273 | + * @return Array the month list |
|
| 8274 | + * |
|
| 8275 | + */ |
|
| 8276 | 8276 | public function countAllMilitaryMonths($filters = array()) |
| 8277 | 8277 | { |
| 8278 | 8278 | global $globalTimezone, $globalDBdriver; |
@@ -8313,11 +8313,11 @@ discard block |
||
| 8313 | 8313 | } |
| 8314 | 8314 | |
| 8315 | 8315 | /** |
| 8316 | - * Counts all month owners |
|
| 8317 | - * |
|
| 8318 | - * @return Array the month list |
|
| 8319 | - * |
|
| 8320 | - */ |
|
| 8316 | + * Counts all month owners |
|
| 8317 | + * |
|
| 8318 | + * @return Array the month list |
|
| 8319 | + * |
|
| 8320 | + */ |
|
| 8321 | 8321 | public function countAllMonthsOwners($filters = array()) |
| 8322 | 8322 | { |
| 8323 | 8323 | global $globalTimezone, $globalDBdriver; |
@@ -8359,11 +8359,11 @@ discard block |
||
| 8359 | 8359 | } |
| 8360 | 8360 | |
| 8361 | 8361 | /** |
| 8362 | - * Counts all month owners |
|
| 8363 | - * |
|
| 8364 | - * @return Array the month list |
|
| 8365 | - * |
|
| 8366 | - */ |
|
| 8362 | + * Counts all month owners |
|
| 8363 | + * |
|
| 8364 | + * @return Array the month list |
|
| 8365 | + * |
|
| 8366 | + */ |
|
| 8367 | 8367 | public function countAllMonthsOwnersByAirlines($filters = array()) |
| 8368 | 8368 | { |
| 8369 | 8369 | global $globalTimezone, $globalDBdriver; |
@@ -8406,11 +8406,11 @@ discard block |
||
| 8406 | 8406 | } |
| 8407 | 8407 | |
| 8408 | 8408 | /** |
| 8409 | - * Counts all month pilot |
|
| 8410 | - * |
|
| 8411 | - * @return Array the month list |
|
| 8412 | - * |
|
| 8413 | - */ |
|
| 8409 | + * Counts all month pilot |
|
| 8410 | + * |
|
| 8411 | + * @return Array the month list |
|
| 8412 | + * |
|
| 8413 | + */ |
|
| 8414 | 8414 | public function countAllMonthsPilots($filters = array()) |
| 8415 | 8415 | { |
| 8416 | 8416 | global $globalTimezone, $globalDBdriver; |
@@ -8452,11 +8452,11 @@ discard block |
||
| 8452 | 8452 | } |
| 8453 | 8453 | |
| 8454 | 8454 | /** |
| 8455 | - * Counts all month pilot |
|
| 8456 | - * |
|
| 8457 | - * @return Array the month list |
|
| 8458 | - * |
|
| 8459 | - */ |
|
| 8455 | + * Counts all month pilot |
|
| 8456 | + * |
|
| 8457 | + * @return Array the month list |
|
| 8458 | + * |
|
| 8459 | + */ |
|
| 8460 | 8460 | public function countAllMonthsPilotsByAirlines($filters = array()) |
| 8461 | 8461 | { |
| 8462 | 8462 | global $globalTimezone, $globalDBdriver; |
@@ -8499,11 +8499,11 @@ discard block |
||
| 8499 | 8499 | } |
| 8500 | 8500 | |
| 8501 | 8501 | /** |
| 8502 | - * Counts all month airline |
|
| 8503 | - * |
|
| 8504 | - * @return Array the month list |
|
| 8505 | - * |
|
| 8506 | - */ |
|
| 8502 | + * Counts all month airline |
|
| 8503 | + * |
|
| 8504 | + * @return Array the month list |
|
| 8505 | + * |
|
| 8506 | + */ |
|
| 8507 | 8507 | public function countAllMonthsAirlines($filters = array()) |
| 8508 | 8508 | { |
| 8509 | 8509 | global $globalTimezone, $globalDBdriver; |
@@ -8545,11 +8545,11 @@ discard block |
||
| 8545 | 8545 | } |
| 8546 | 8546 | |
| 8547 | 8547 | /** |
| 8548 | - * Counts all month aircraft |
|
| 8549 | - * |
|
| 8550 | - * @return Array the month list |
|
| 8551 | - * |
|
| 8552 | - */ |
|
| 8548 | + * Counts all month aircraft |
|
| 8549 | + * |
|
| 8550 | + * @return Array the month list |
|
| 8551 | + * |
|
| 8552 | + */ |
|
| 8553 | 8553 | public function countAllMonthsAircrafts($filters = array()) |
| 8554 | 8554 | { |
| 8555 | 8555 | global $globalTimezone, $globalDBdriver; |
@@ -8592,11 +8592,11 @@ discard block |
||
| 8592 | 8592 | |
| 8593 | 8593 | |
| 8594 | 8594 | /** |
| 8595 | - * Counts all month aircraft |
|
| 8596 | - * |
|
| 8597 | - * @return Array the month list |
|
| 8598 | - * |
|
| 8599 | - */ |
|
| 8595 | + * Counts all month aircraft |
|
| 8596 | + * |
|
| 8597 | + * @return Array the month list |
|
| 8598 | + * |
|
| 8599 | + */ |
|
| 8600 | 8600 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
| 8601 | 8601 | { |
| 8602 | 8602 | global $globalTimezone, $globalDBdriver; |
@@ -8639,11 +8639,11 @@ discard block |
||
| 8639 | 8639 | } |
| 8640 | 8640 | |
| 8641 | 8641 | /** |
| 8642 | - * Counts all month real arrival |
|
| 8643 | - * |
|
| 8644 | - * @return Array the month list |
|
| 8645 | - * |
|
| 8646 | - */ |
|
| 8642 | + * Counts all month real arrival |
|
| 8643 | + * |
|
| 8644 | + * @return Array the month list |
|
| 8645 | + * |
|
| 8646 | + */ |
|
| 8647 | 8647 | public function countAllMonthsRealArrivals($filters = array()) |
| 8648 | 8648 | { |
| 8649 | 8649 | global $globalTimezone, $globalDBdriver; |
@@ -8686,11 +8686,11 @@ discard block |
||
| 8686 | 8686 | |
| 8687 | 8687 | |
| 8688 | 8688 | /** |
| 8689 | - * Counts all month real arrival |
|
| 8690 | - * |
|
| 8691 | - * @return Array the month list |
|
| 8692 | - * |
|
| 8693 | - */ |
|
| 8689 | + * Counts all month real arrival |
|
| 8690 | + * |
|
| 8691 | + * @return Array the month list |
|
| 8692 | + * |
|
| 8693 | + */ |
|
| 8694 | 8694 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
| 8695 | 8695 | { |
| 8696 | 8696 | global $globalTimezone, $globalDBdriver; |
@@ -8734,11 +8734,11 @@ discard block |
||
| 8734 | 8734 | |
| 8735 | 8735 | |
| 8736 | 8736 | /** |
| 8737 | - * Counts all dates during the last year |
|
| 8738 | - * |
|
| 8739 | - * @return Array the date list |
|
| 8740 | - * |
|
| 8741 | - */ |
|
| 8737 | + * Counts all dates during the last year |
|
| 8738 | + * |
|
| 8739 | + * @return Array the date list |
|
| 8740 | + * |
|
| 8741 | + */ |
|
| 8742 | 8742 | public function countAllMonthsLastYear($filters) |
| 8743 | 8743 | { |
| 8744 | 8744 | global $globalTimezone, $globalDBdriver; |
@@ -8760,7 +8760,7 @@ discard block |
||
| 8760 | 8760 | $query .= " GROUP BY year_name, month_name |
| 8761 | 8761 | ORDER BY year_name, month_name ASC"; |
| 8762 | 8762 | $query_data = array(':offset' => $offset); |
| 8763 | - } |
|
| 8763 | + } |
|
| 8764 | 8764 | |
| 8765 | 8765 | $sth = $this->db->prepare($query); |
| 8766 | 8766 | $sth->execute($query_data); |
@@ -8783,11 +8783,11 @@ discard block |
||
| 8783 | 8783 | |
| 8784 | 8784 | |
| 8785 | 8785 | /** |
| 8786 | - * Counts all hours |
|
| 8787 | - * |
|
| 8788 | - * @return Array the hour list |
|
| 8789 | - * |
|
| 8790 | - */ |
|
| 8786 | + * Counts all hours |
|
| 8787 | + * |
|
| 8788 | + * @return Array the hour list |
|
| 8789 | + * |
|
| 8790 | + */ |
|
| 8791 | 8791 | public function countAllHours($orderby,$filters = array()) |
| 8792 | 8792 | { |
| 8793 | 8793 | global $globalTimezone, $globalDBdriver; |
@@ -8848,11 +8848,11 @@ discard block |
||
| 8848 | 8848 | } |
| 8849 | 8849 | |
| 8850 | 8850 | /** |
| 8851 | - * Counts all hours |
|
| 8852 | - * |
|
| 8853 | - * @return Array the hour list |
|
| 8854 | - * |
|
| 8855 | - */ |
|
| 8851 | + * Counts all hours |
|
| 8852 | + * |
|
| 8853 | + * @return Array the hour list |
|
| 8854 | + * |
|
| 8855 | + */ |
|
| 8856 | 8856 | public function countAllHoursByAirlines($orderby, $filters = array()) |
| 8857 | 8857 | { |
| 8858 | 8858 | global $globalTimezone, $globalDBdriver; |
@@ -8915,11 +8915,11 @@ discard block |
||
| 8915 | 8915 | |
| 8916 | 8916 | |
| 8917 | 8917 | /** |
| 8918 | - * Counts all hours by airline |
|
| 8919 | - * |
|
| 8920 | - * @return Array the hour list |
|
| 8921 | - * |
|
| 8922 | - */ |
|
| 8918 | + * Counts all hours by airline |
|
| 8919 | + * |
|
| 8920 | + * @return Array the hour list |
|
| 8921 | + * |
|
| 8922 | + */ |
|
| 8923 | 8923 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
| 8924 | 8924 | { |
| 8925 | 8925 | global $globalTimezone, $globalDBdriver; |
@@ -8965,11 +8965,11 @@ discard block |
||
| 8965 | 8965 | |
| 8966 | 8966 | |
| 8967 | 8967 | /** |
| 8968 | - * Counts all hours by aircraft |
|
| 8969 | - * |
|
| 8970 | - * @return Array the hour list |
|
| 8971 | - * |
|
| 8972 | - */ |
|
| 8968 | + * Counts all hours by aircraft |
|
| 8969 | + * |
|
| 8970 | + * @return Array the hour list |
|
| 8971 | + * |
|
| 8972 | + */ |
|
| 8973 | 8973 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
| 8974 | 8974 | { |
| 8975 | 8975 | global $globalTimezone, $globalDBdriver; |
@@ -9012,11 +9012,11 @@ discard block |
||
| 9012 | 9012 | |
| 9013 | 9013 | |
| 9014 | 9014 | /** |
| 9015 | - * Counts all hours by aircraft registration |
|
| 9016 | - * |
|
| 9017 | - * @return Array the hour list |
|
| 9018 | - * |
|
| 9019 | - */ |
|
| 9015 | + * Counts all hours by aircraft registration |
|
| 9016 | + * |
|
| 9017 | + * @return Array the hour list |
|
| 9018 | + * |
|
| 9019 | + */ |
|
| 9020 | 9020 | public function countAllHoursByRegistration($registration, $filters = array()) |
| 9021 | 9021 | { |
| 9022 | 9022 | global $globalTimezone, $globalDBdriver; |
@@ -9059,11 +9059,11 @@ discard block |
||
| 9059 | 9059 | |
| 9060 | 9060 | |
| 9061 | 9061 | /** |
| 9062 | - * Counts all hours by airport |
|
| 9063 | - * |
|
| 9064 | - * @return Array the hour list |
|
| 9065 | - * |
|
| 9066 | - */ |
|
| 9062 | + * Counts all hours by airport |
|
| 9063 | + * |
|
| 9064 | + * @return Array the hour list |
|
| 9065 | + * |
|
| 9066 | + */ |
|
| 9067 | 9067 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
| 9068 | 9068 | { |
| 9069 | 9069 | global $globalTimezone, $globalDBdriver; |
@@ -9107,11 +9107,11 @@ discard block |
||
| 9107 | 9107 | |
| 9108 | 9108 | |
| 9109 | 9109 | /** |
| 9110 | - * Counts all hours by manufacturer |
|
| 9111 | - * |
|
| 9112 | - * @return Array the hour list |
|
| 9113 | - * |
|
| 9114 | - */ |
|
| 9110 | + * Counts all hours by manufacturer |
|
| 9111 | + * |
|
| 9112 | + * @return Array the hour list |
|
| 9113 | + * |
|
| 9114 | + */ |
|
| 9115 | 9115 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
| 9116 | 9116 | { |
| 9117 | 9117 | global $globalTimezone, $globalDBdriver; |
@@ -9155,11 +9155,11 @@ discard block |
||
| 9155 | 9155 | |
| 9156 | 9156 | |
| 9157 | 9157 | /** |
| 9158 | - * Counts all hours by date |
|
| 9159 | - * |
|
| 9160 | - * @return Array the hour list |
|
| 9161 | - * |
|
| 9162 | - */ |
|
| 9158 | + * Counts all hours by date |
|
| 9159 | + * |
|
| 9160 | + * @return Array the hour list |
|
| 9161 | + * |
|
| 9162 | + */ |
|
| 9163 | 9163 | public function countAllHoursByDate($date, $filters = array()) |
| 9164 | 9164 | { |
| 9165 | 9165 | global $globalTimezone, $globalDBdriver; |
@@ -9203,11 +9203,11 @@ discard block |
||
| 9203 | 9203 | |
| 9204 | 9204 | |
| 9205 | 9205 | /** |
| 9206 | - * Counts all hours by a ident/callsign |
|
| 9207 | - * |
|
| 9208 | - * @return Array the hour list |
|
| 9209 | - * |
|
| 9210 | - */ |
|
| 9206 | + * Counts all hours by a ident/callsign |
|
| 9207 | + * |
|
| 9208 | + * @return Array the hour list |
|
| 9209 | + * |
|
| 9210 | + */ |
|
| 9211 | 9211 | public function countAllHoursByIdent($ident, $filters = array()) |
| 9212 | 9212 | { |
| 9213 | 9213 | global $globalTimezone, $globalDBdriver; |
@@ -9252,11 +9252,11 @@ discard block |
||
| 9252 | 9252 | |
| 9253 | 9253 | |
| 9254 | 9254 | /** |
| 9255 | - * Counts all hours by route |
|
| 9256 | - * |
|
| 9257 | - * @return Array the hour list |
|
| 9258 | - * |
|
| 9259 | - */ |
|
| 9255 | + * Counts all hours by route |
|
| 9256 | + * |
|
| 9257 | + * @return Array the hour list |
|
| 9258 | + * |
|
| 9259 | + */ |
|
| 9260 | 9260 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
| 9261 | 9261 | { |
| 9262 | 9262 | global $globalTimezone, $globalDBdriver; |
@@ -9300,11 +9300,11 @@ discard block |
||
| 9300 | 9300 | |
| 9301 | 9301 | |
| 9302 | 9302 | /** |
| 9303 | - * Counts all hours by country |
|
| 9304 | - * |
|
| 9305 | - * @return Array the hour list |
|
| 9306 | - * |
|
| 9307 | - */ |
|
| 9303 | + * Counts all hours by country |
|
| 9304 | + * |
|
| 9305 | + * @return Array the hour list |
|
| 9306 | + * |
|
| 9307 | + */ |
|
| 9308 | 9308 | public function countAllHoursByCountry($country, $filters = array()) |
| 9309 | 9309 | { |
| 9310 | 9310 | global $globalTimezone, $globalDBdriver; |
@@ -9349,11 +9349,11 @@ discard block |
||
| 9349 | 9349 | |
| 9350 | 9350 | |
| 9351 | 9351 | /** |
| 9352 | - * Counts all aircraft that have flown over |
|
| 9353 | - * |
|
| 9354 | - * @return Integer the number of aircrafts |
|
| 9355 | - * |
|
| 9356 | - */ |
|
| 9352 | + * Counts all aircraft that have flown over |
|
| 9353 | + * |
|
| 9354 | + * @return Integer the number of aircrafts |
|
| 9355 | + * |
|
| 9356 | + */ |
|
| 9357 | 9357 | public function countOverallAircrafts($filters = array()) |
| 9358 | 9358 | { |
| 9359 | 9359 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9365,11 +9365,11 @@ discard block |
||
| 9365 | 9365 | } |
| 9366 | 9366 | |
| 9367 | 9367 | /** |
| 9368 | - * Counts all flight that really arrival |
|
| 9369 | - * |
|
| 9370 | - * @return Integer the number of aircrafts |
|
| 9371 | - * |
|
| 9372 | - */ |
|
| 9368 | + * Counts all flight that really arrival |
|
| 9369 | + * |
|
| 9370 | + * @return Integer the number of aircrafts |
|
| 9371 | + * |
|
| 9372 | + */ |
|
| 9373 | 9373 | public function countOverallArrival($filters = array()) |
| 9374 | 9374 | { |
| 9375 | 9375 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9382,11 +9382,11 @@ discard block |
||
| 9382 | 9382 | } |
| 9383 | 9383 | |
| 9384 | 9384 | /** |
| 9385 | - * Counts all pilots that have flown over |
|
| 9386 | - * |
|
| 9387 | - * @return Integer the number of pilots |
|
| 9388 | - * |
|
| 9389 | - */ |
|
| 9385 | + * Counts all pilots that have flown over |
|
| 9386 | + * |
|
| 9387 | + * @return Integer the number of pilots |
|
| 9388 | + * |
|
| 9389 | + */ |
|
| 9390 | 9390 | public function countOverallPilots($filters = array()) |
| 9391 | 9391 | { |
| 9392 | 9392 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9398,11 +9398,11 @@ discard block |
||
| 9398 | 9398 | } |
| 9399 | 9399 | |
| 9400 | 9400 | /** |
| 9401 | - * Counts all owners that have flown over |
|
| 9402 | - * |
|
| 9403 | - * @return Integer the number of owners |
|
| 9404 | - * |
|
| 9405 | - */ |
|
| 9401 | + * Counts all owners that have flown over |
|
| 9402 | + * |
|
| 9403 | + * @return Integer the number of owners |
|
| 9404 | + * |
|
| 9405 | + */ |
|
| 9406 | 9406 | public function countOverallOwners($filters = array()) |
| 9407 | 9407 | { |
| 9408 | 9408 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9415,11 +9415,11 @@ discard block |
||
| 9415 | 9415 | |
| 9416 | 9416 | |
| 9417 | 9417 | /** |
| 9418 | - * Counts all flights that have flown over |
|
| 9419 | - * |
|
| 9420 | - * @return Integer the number of flights |
|
| 9421 | - * |
|
| 9422 | - */ |
|
| 9418 | + * Counts all flights that have flown over |
|
| 9419 | + * |
|
| 9420 | + * @return Integer the number of flights |
|
| 9421 | + * |
|
| 9422 | + */ |
|
| 9423 | 9423 | public function countOverallFlights($filters = array()) |
| 9424 | 9424 | { |
| 9425 | 9425 | $query = "SELECT COUNT(spotter_output.spotter_id) AS flight_count |
@@ -9432,11 +9432,11 @@ discard block |
||
| 9432 | 9432 | } |
| 9433 | 9433 | |
| 9434 | 9434 | /** |
| 9435 | - * Counts all military flights that have flown over |
|
| 9436 | - * |
|
| 9437 | - * @return Integer the number of flights |
|
| 9438 | - * |
|
| 9439 | - */ |
|
| 9435 | + * Counts all military flights that have flown over |
|
| 9436 | + * |
|
| 9437 | + * @return Integer the number of flights |
|
| 9438 | + * |
|
| 9439 | + */ |
|
| 9440 | 9440 | public function countOverallMilitaryFlights($filters = array()) |
| 9441 | 9441 | { |
| 9442 | 9442 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9451,11 +9451,11 @@ discard block |
||
| 9451 | 9451 | |
| 9452 | 9452 | |
| 9453 | 9453 | /** |
| 9454 | - * Counts all airlines that have flown over |
|
| 9455 | - * |
|
| 9456 | - * @return Integer the number of airlines |
|
| 9457 | - * |
|
| 9458 | - */ |
|
| 9454 | + * Counts all airlines that have flown over |
|
| 9455 | + * |
|
| 9456 | + * @return Integer the number of airlines |
|
| 9457 | + * |
|
| 9458 | + */ |
|
| 9459 | 9459 | public function countOverallAirlines($filters = array()) |
| 9460 | 9460 | { |
| 9461 | 9461 | $query = "SELECT COUNT(DISTINCT spotter_output.airline_name) AS airline_count |
@@ -9469,11 +9469,11 @@ discard block |
||
| 9469 | 9469 | |
| 9470 | 9470 | |
| 9471 | 9471 | /** |
| 9472 | - * Counts all hours of today |
|
| 9473 | - * |
|
| 9474 | - * @return Array the hour list |
|
| 9475 | - * |
|
| 9476 | - */ |
|
| 9472 | + * Counts all hours of today |
|
| 9473 | + * |
|
| 9474 | + * @return Array the hour list |
|
| 9475 | + * |
|
| 9476 | + */ |
|
| 9477 | 9477 | public function countAllHoursFromToday($filters = array()) |
| 9478 | 9478 | { |
| 9479 | 9479 | global $globalTimezone, $globalDBdriver; |
@@ -9513,11 +9513,11 @@ discard block |
||
| 9513 | 9513 | } |
| 9514 | 9514 | |
| 9515 | 9515 | /** |
| 9516 | - * Gets all the spotter information based on calculated upcoming flights |
|
| 9517 | - * |
|
| 9518 | - * @return Array the spotter information |
|
| 9519 | - * |
|
| 9520 | - */ |
|
| 9516 | + * Gets all the spotter information based on calculated upcoming flights |
|
| 9517 | + * |
|
| 9518 | + * @return Array the spotter information |
|
| 9519 | + * |
|
| 9520 | + */ |
|
| 9521 | 9521 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
| 9522 | 9522 | { |
| 9523 | 9523 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -9592,12 +9592,12 @@ discard block |
||
| 9592 | 9592 | } |
| 9593 | 9593 | |
| 9594 | 9594 | |
| 9595 | - /** |
|
| 9596 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 9597 | - * |
|
| 9598 | - * @return Integer the Barrie Spotter ID |
|
| 9595 | + /** |
|
| 9596 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 9597 | + * |
|
| 9598 | + * @return Integer the Barrie Spotter ID |
|
| 9599 | 9599 | q * |
| 9600 | - */ |
|
| 9600 | + */ |
|
| 9601 | 9601 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
| 9602 | 9602 | { |
| 9603 | 9603 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -9618,13 +9618,13 @@ discard block |
||
| 9618 | 9618 | |
| 9619 | 9619 | |
| 9620 | 9620 | /** |
| 9621 | - * Parses a date string |
|
| 9622 | - * |
|
| 9623 | - * @param String $dateString the date string |
|
| 9624 | - * @param String $timezone the timezone of a user |
|
| 9625 | - * @return Array the time information |
|
| 9626 | - * |
|
| 9627 | - */ |
|
| 9621 | + * Parses a date string |
|
| 9622 | + * |
|
| 9623 | + * @param String $dateString the date string |
|
| 9624 | + * @param String $timezone the timezone of a user |
|
| 9625 | + * @return Array the time information |
|
| 9626 | + * |
|
| 9627 | + */ |
|
| 9628 | 9628 | public function parseDateString($dateString, $timezone = '') |
| 9629 | 9629 | { |
| 9630 | 9630 | $time_array = array(); |
@@ -9660,12 +9660,12 @@ discard block |
||
| 9660 | 9660 | |
| 9661 | 9661 | |
| 9662 | 9662 | /** |
| 9663 | - * Parses the direction degrees to working |
|
| 9664 | - * |
|
| 9665 | - * @param Float $direction the direction in degrees |
|
| 9666 | - * @return Array the direction information |
|
| 9667 | - * |
|
| 9668 | - */ |
|
| 9663 | + * Parses the direction degrees to working |
|
| 9664 | + * |
|
| 9665 | + * @param Float $direction the direction in degrees |
|
| 9666 | + * @return Array the direction information |
|
| 9667 | + * |
|
| 9668 | + */ |
|
| 9669 | 9669 | public function parseDirection($direction = 0) |
| 9670 | 9670 | { |
| 9671 | 9671 | if ($direction == '') $direction = 0; |
@@ -9744,12 +9744,12 @@ discard block |
||
| 9744 | 9744 | |
| 9745 | 9745 | |
| 9746 | 9746 | /** |
| 9747 | - * Gets the aircraft registration |
|
| 9748 | - * |
|
| 9749 | - * @param String $flightaware_id the flight aware id |
|
| 9750 | - * @return String the aircraft registration |
|
| 9751 | - * |
|
| 9752 | - */ |
|
| 9747 | + * Gets the aircraft registration |
|
| 9748 | + * |
|
| 9749 | + * @param String $flightaware_id the flight aware id |
|
| 9750 | + * @return String the aircraft registration |
|
| 9751 | + * |
|
| 9752 | + */ |
|
| 9753 | 9753 | |
| 9754 | 9754 | public function getAircraftRegistration($flightaware_id) |
| 9755 | 9755 | { |
@@ -9778,12 +9778,12 @@ discard block |
||
| 9778 | 9778 | |
| 9779 | 9779 | |
| 9780 | 9780 | /** |
| 9781 | - * Gets the aircraft registration from ModeS |
|
| 9782 | - * |
|
| 9783 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 9784 | - * @return String the aircraft registration |
|
| 9785 | - * |
|
| 9786 | - */ |
|
| 9781 | + * Gets the aircraft registration from ModeS |
|
| 9782 | + * |
|
| 9783 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 9784 | + * @return String the aircraft registration |
|
| 9785 | + * |
|
| 9786 | + */ |
|
| 9787 | 9787 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
| 9788 | 9788 | { |
| 9789 | 9789 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9796,19 +9796,19 @@ discard block |
||
| 9796 | 9796 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 9797 | 9797 | $sth->closeCursor(); |
| 9798 | 9798 | if (count($row) > 0) { |
| 9799 | - //return $row['Registration']; |
|
| 9800 | - return $row['registration']; |
|
| 9799 | + //return $row['Registration']; |
|
| 9800 | + return $row['registration']; |
|
| 9801 | 9801 | } else return ''; |
| 9802 | 9802 | |
| 9803 | 9803 | } |
| 9804 | 9804 | |
| 9805 | 9805 | /** |
| 9806 | - * Gets the aircraft type from ModeS |
|
| 9807 | - * |
|
| 9808 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 9809 | - * @return String the aircraft type |
|
| 9810 | - * |
|
| 9811 | - */ |
|
| 9806 | + * Gets the aircraft type from ModeS |
|
| 9807 | + * |
|
| 9808 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 9809 | + * @return String the aircraft type |
|
| 9810 | + * |
|
| 9811 | + */ |
|
| 9812 | 9812 | public function getAircraftTypeBymodeS($aircraft_modes) |
| 9813 | 9813 | { |
| 9814 | 9814 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9821,19 +9821,19 @@ discard block |
||
| 9821 | 9821 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 9822 | 9822 | $sth->closeCursor(); |
| 9823 | 9823 | if (count($row) > 0) { |
| 9824 | - if ($row['type_flight'] == null) return ''; |
|
| 9825 | - else return $row['type_flight']; |
|
| 9824 | + if ($row['type_flight'] == null) return ''; |
|
| 9825 | + else return $row['type_flight']; |
|
| 9826 | 9826 | } else return ''; |
| 9827 | 9827 | |
| 9828 | 9828 | } |
| 9829 | 9829 | |
| 9830 | 9830 | /** |
| 9831 | - * Gets Country from latitude/longitude |
|
| 9832 | - * |
|
| 9833 | - * @param Float $latitude latitute of the flight |
|
| 9834 | - * @param Float $longitude longitute of the flight |
|
| 9835 | - * @return String the countrie |
|
| 9836 | - */ |
|
| 9831 | + * Gets Country from latitude/longitude |
|
| 9832 | + * |
|
| 9833 | + * @param Float $latitude latitute of the flight |
|
| 9834 | + * @param Float $longitude longitute of the flight |
|
| 9835 | + * @return String the countrie |
|
| 9836 | + */ |
|
| 9837 | 9837 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
| 9838 | 9838 | { |
| 9839 | 9839 | global $globalDBdriver, $globalDebug; |
@@ -9870,11 +9870,11 @@ discard block |
||
| 9870 | 9870 | } |
| 9871 | 9871 | |
| 9872 | 9872 | /** |
| 9873 | - * Gets Country from iso2 |
|
| 9874 | - * |
|
| 9875 | - * @param String $iso2 ISO2 country code |
|
| 9876 | - * @return String the countrie |
|
| 9877 | - */ |
|
| 9873 | + * Gets Country from iso2 |
|
| 9874 | + * |
|
| 9875 | + * @param String $iso2 ISO2 country code |
|
| 9876 | + * @return String the countrie |
|
| 9877 | + */ |
|
| 9878 | 9878 | public function getCountryFromISO2($iso2) |
| 9879 | 9879 | { |
| 9880 | 9880 | global $globalDBdriver, $globalDebug; |
@@ -9902,12 +9902,12 @@ discard block |
||
| 9902 | 9902 | } |
| 9903 | 9903 | |
| 9904 | 9904 | /** |
| 9905 | - * converts the registration code using the country prefix |
|
| 9906 | - * |
|
| 9907 | - * @param String $registration the aircraft registration |
|
| 9908 | - * @return String the aircraft registration |
|
| 9909 | - * |
|
| 9910 | - */ |
|
| 9905 | + * converts the registration code using the country prefix |
|
| 9906 | + * |
|
| 9907 | + * @param String $registration the aircraft registration |
|
| 9908 | + * @return String the aircraft registration |
|
| 9909 | + * |
|
| 9910 | + */ |
|
| 9911 | 9911 | public function convertAircraftRegistration($registration) |
| 9912 | 9912 | { |
| 9913 | 9913 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9959,12 +9959,12 @@ discard block |
||
| 9959 | 9959 | } |
| 9960 | 9960 | |
| 9961 | 9961 | /** |
| 9962 | - * Country from the registration code |
|
| 9963 | - * |
|
| 9964 | - * @param String $registration the aircraft registration |
|
| 9965 | - * @return String the country |
|
| 9966 | - * |
|
| 9967 | - */ |
|
| 9962 | + * Country from the registration code |
|
| 9963 | + * |
|
| 9964 | + * @param String $registration the aircraft registration |
|
| 9965 | + * @return String the country |
|
| 9966 | + * |
|
| 9967 | + */ |
|
| 9968 | 9968 | public function countryFromAircraftRegistration($registration) |
| 9969 | 9969 | { |
| 9970 | 9970 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9983,8 +9983,8 @@ discard block |
||
| 9983 | 9983 | $country = $row['country']; |
| 9984 | 9984 | } |
| 9985 | 9985 | } else { |
| 9986 | - $registration_1 = substr($registration, 0, 1); |
|
| 9987 | - $registration_2 = substr($registration, 0, 2); |
|
| 9986 | + $registration_1 = substr($registration, 0, 1); |
|
| 9987 | + $registration_2 = substr($registration, 0, 2); |
|
| 9988 | 9988 | |
| 9989 | 9989 | $country = ''; |
| 9990 | 9990 | //first get the prefix based on two characters |
@@ -10020,12 +10020,12 @@ discard block |
||
| 10020 | 10020 | } |
| 10021 | 10021 | |
| 10022 | 10022 | /** |
| 10023 | - * Registration prefix from the registration code |
|
| 10024 | - * |
|
| 10025 | - * @param String $registration the aircraft registration |
|
| 10026 | - * @return String the registration prefix |
|
| 10027 | - * |
|
| 10028 | - */ |
|
| 10023 | + * Registration prefix from the registration code |
|
| 10024 | + * |
|
| 10025 | + * @param String $registration the aircraft registration |
|
| 10026 | + * @return String the registration prefix |
|
| 10027 | + * |
|
| 10028 | + */ |
|
| 10029 | 10029 | public function registrationPrefixFromAircraftRegistration($registration) |
| 10030 | 10030 | { |
| 10031 | 10031 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10044,8 +10044,8 @@ discard block |
||
| 10044 | 10044 | //$country = $row['country']; |
| 10045 | 10045 | } |
| 10046 | 10046 | } else { |
| 10047 | - $registration_1 = substr($registration, 0, 1); |
|
| 10048 | - $registration_2 = substr($registration, 0, 2); |
|
| 10047 | + $registration_1 = substr($registration, 0, 1); |
|
| 10048 | + $registration_2 = substr($registration, 0, 2); |
|
| 10049 | 10049 | |
| 10050 | 10050 | //first get the prefix based on two characters |
| 10051 | 10051 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -10081,12 +10081,12 @@ discard block |
||
| 10081 | 10081 | |
| 10082 | 10082 | |
| 10083 | 10083 | /** |
| 10084 | - * Country from the registration code |
|
| 10085 | - * |
|
| 10086 | - * @param String $registration the aircraft registration |
|
| 10087 | - * @return String the country |
|
| 10088 | - * |
|
| 10089 | - */ |
|
| 10084 | + * Country from the registration code |
|
| 10085 | + * |
|
| 10086 | + * @param String $registration the aircraft registration |
|
| 10087 | + * @return String the country |
|
| 10088 | + * |
|
| 10089 | + */ |
|
| 10090 | 10090 | public function countryFromAircraftRegistrationCode($registration) |
| 10091 | 10091 | { |
| 10092 | 10092 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10103,11 +10103,11 @@ discard block |
||
| 10103 | 10103 | } |
| 10104 | 10104 | |
| 10105 | 10105 | /** |
| 10106 | - * Set a new highlight value for a flight |
|
| 10107 | - * |
|
| 10108 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10109 | - * @param String $highlight New highlight value |
|
| 10110 | - */ |
|
| 10106 | + * Set a new highlight value for a flight |
|
| 10107 | + * |
|
| 10108 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10109 | + * @param String $highlight New highlight value |
|
| 10110 | + */ |
|
| 10111 | 10111 | public function setHighlightFlight($flightaware_id,$highlight) { |
| 10112 | 10112 | |
| 10113 | 10113 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -10116,12 +10116,12 @@ discard block |
||
| 10116 | 10116 | } |
| 10117 | 10117 | |
| 10118 | 10118 | /** |
| 10119 | - * Set a new highlight value for a flight by Registration |
|
| 10120 | - * |
|
| 10121 | - * @param String $registration Registration of the aircraft |
|
| 10122 | - * @param String $date Date of spotted aircraft |
|
| 10123 | - * @param String $highlight New highlight value |
|
| 10124 | - */ |
|
| 10119 | + * Set a new highlight value for a flight by Registration |
|
| 10120 | + * |
|
| 10121 | + * @param String $registration Registration of the aircraft |
|
| 10122 | + * @param String $date Date of spotted aircraft |
|
| 10123 | + * @param String $highlight New highlight value |
|
| 10124 | + */ |
|
| 10125 | 10125 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
| 10126 | 10126 | if ($date == '') { |
| 10127 | 10127 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -10135,12 +10135,12 @@ discard block |
||
| 10135 | 10135 | } |
| 10136 | 10136 | |
| 10137 | 10137 | /** |
| 10138 | - * Gets the short url from bit.ly |
|
| 10139 | - * |
|
| 10140 | - * @param String $url the full url |
|
| 10141 | - * @return String the bit.ly url |
|
| 10142 | - * |
|
| 10143 | - */ |
|
| 10138 | + * Gets the short url from bit.ly |
|
| 10139 | + * |
|
| 10140 | + * @param String $url the full url |
|
| 10141 | + * @return String the bit.ly url |
|
| 10142 | + * |
|
| 10143 | + */ |
|
| 10144 | 10144 | public function getBitlyURL($url) |
| 10145 | 10145 | { |
| 10146 | 10146 | global $globalBitlyAccessToken; |
@@ -10429,11 +10429,11 @@ discard block |
||
| 10429 | 10429 | $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 |
| 10430 | 10430 | 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)) |
| 10431 | 10431 | 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;"; |
| 10432 | - } else { |
|
| 10432 | + } else { |
|
| 10433 | 10433 | $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 |
| 10434 | 10434 | 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)) |
| 10435 | 10435 | 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;"; |
| 10436 | - } |
|
| 10436 | + } |
|
| 10437 | 10437 | $sth = $this->db->prepare($query); |
| 10438 | 10438 | $sth->execute(); |
| 10439 | 10439 | return $sth->fetchAll(PDO::FETCH_ASSOC); |