@@ -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, $globalDBdriver; |
64 | 64 | $filters = array(); |
@@ -149,14 +149,14 @@ discard block |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
152 | - * Executes the SQL statements to get the spotter information |
|
153 | - * |
|
154 | - * @param String $query the SQL query |
|
155 | - * @param Array $params parameter of the query |
|
156 | - * @param String $limitQuery the limit query |
|
157 | - * @return Array the spotter information |
|
158 | - * |
|
159 | - */ |
|
152 | + * Executes the SQL statements to get the spotter information |
|
153 | + * |
|
154 | + * @param String $query the SQL query |
|
155 | + * @param Array $params parameter of the query |
|
156 | + * @param String $limitQuery the limit query |
|
157 | + * @return Array the spotter information |
|
158 | + * |
|
159 | + */ |
|
160 | 160 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
161 | 161 | { |
162 | 162 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -323,11 +323,11 @@ discard block |
||
323 | 323 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
324 | 324 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
325 | 325 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
326 | - } else { |
|
327 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
326 | + } else { |
|
327 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
328 | 328 | $temp_array['aircraft_name'] = 'N/A'; |
329 | 329 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
330 | - } |
|
330 | + } |
|
331 | 331 | } |
332 | 332 | $fromsource = NULL; |
333 | 333 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -523,11 +523,11 @@ discard block |
||
523 | 523 | |
524 | 524 | |
525 | 525 | /** |
526 | - * Gets all the spotter information |
|
527 | - * |
|
528 | - * @return Array the spotter information |
|
529 | - * |
|
530 | - */ |
|
526 | + * Gets all the spotter information |
|
527 | + * |
|
528 | + * @return Array the spotter information |
|
529 | + * |
|
530 | + */ |
|
531 | 531 | 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()) |
532 | 532 | { |
533 | 533 | global $globalTimezone, $globalDBdriver; |
@@ -874,11 +874,11 @@ discard block |
||
874 | 874 | |
875 | 875 | |
876 | 876 | /** |
877 | - * Gets all the spotter information based on the latest data entry |
|
878 | - * |
|
879 | - * @return Array the spotter information |
|
880 | - * |
|
881 | - */ |
|
877 | + * Gets all the spotter information based on the latest data entry |
|
878 | + * |
|
879 | + * @return Array the spotter information |
|
880 | + * |
|
881 | + */ |
|
882 | 882 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
883 | 883 | { |
884 | 884 | global $global_query; |
@@ -917,12 +917,12 @@ discard block |
||
917 | 917 | } |
918 | 918 | |
919 | 919 | |
920 | - /** |
|
921 | - * Gets all the spotter information based on a user's latitude and longitude |
|
922 | - * |
|
923 | - * @return Array the spotter information |
|
924 | - * |
|
925 | - */ |
|
920 | + /** |
|
921 | + * Gets all the spotter information based on a user's latitude and longitude |
|
922 | + * |
|
923 | + * @return Array the spotter information |
|
924 | + * |
|
925 | + */ |
|
926 | 926 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
927 | 927 | { |
928 | 928 | date_default_timezone_set('UTC'); |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | return false; |
951 | 951 | } |
952 | 952 | } |
953 | - $additional_query = ''; |
|
953 | + $additional_query = ''; |
|
954 | 954 | if ($interval != "") |
955 | 955 | { |
956 | 956 | if (!is_string($interval)) |
@@ -990,12 +990,12 @@ discard block |
||
990 | 990 | } |
991 | 991 | |
992 | 992 | |
993 | - /** |
|
994 | - * Gets all the spotter information sorted by the newest aircraft type |
|
995 | - * |
|
996 | - * @return Array the spotter information |
|
997 | - * |
|
998 | - */ |
|
993 | + /** |
|
994 | + * Gets all the spotter information sorted by the newest aircraft type |
|
995 | + * |
|
996 | + * @return Array the spotter information |
|
997 | + * |
|
998 | + */ |
|
999 | 999 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
1000 | 1000 | { |
1001 | 1001 | global $global_query; |
@@ -1036,11 +1036,11 @@ discard block |
||
1036 | 1036 | |
1037 | 1037 | |
1038 | 1038 | /** |
1039 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
1040 | - * |
|
1041 | - * @return Array the spotter information |
|
1042 | - * |
|
1043 | - */ |
|
1039 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
1040 | + * |
|
1041 | + * @return Array the spotter information |
|
1042 | + * |
|
1043 | + */ |
|
1044 | 1044 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
1045 | 1045 | { |
1046 | 1046 | global $global_query; |
@@ -1080,11 +1080,11 @@ discard block |
||
1080 | 1080 | |
1081 | 1081 | |
1082 | 1082 | /** |
1083 | - * Gets all the spotter information sorted by the newest airline |
|
1084 | - * |
|
1085 | - * @return Array the spotter information |
|
1086 | - * |
|
1087 | - */ |
|
1083 | + * Gets all the spotter information sorted by the newest airline |
|
1084 | + * |
|
1085 | + * @return Array the spotter information |
|
1086 | + * |
|
1087 | + */ |
|
1088 | 1088 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
1089 | 1089 | { |
1090 | 1090 | global $global_query; |
@@ -1123,12 +1123,12 @@ discard block |
||
1123 | 1123 | } |
1124 | 1124 | |
1125 | 1125 | |
1126 | - /** |
|
1127 | - * Gets all the spotter information sorted by the newest departure airport |
|
1128 | - * |
|
1129 | - * @return Array the spotter information |
|
1130 | - * |
|
1131 | - */ |
|
1126 | + /** |
|
1127 | + * Gets all the spotter information sorted by the newest departure airport |
|
1128 | + * |
|
1129 | + * @return Array the spotter information |
|
1130 | + * |
|
1131 | + */ |
|
1132 | 1132 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
1133 | 1133 | { |
1134 | 1134 | global $global_query; |
@@ -1170,11 +1170,11 @@ discard block |
||
1170 | 1170 | |
1171 | 1171 | |
1172 | 1172 | /** |
1173 | - * Gets all the spotter information sorted by the newest arrival airport |
|
1174 | - * |
|
1175 | - * @return Array the spotter information |
|
1176 | - * |
|
1177 | - */ |
|
1173 | + * Gets all the spotter information sorted by the newest arrival airport |
|
1174 | + * |
|
1175 | + * @return Array the spotter information |
|
1176 | + * |
|
1177 | + */ |
|
1178 | 1178 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
1179 | 1179 | { |
1180 | 1180 | global $global_query; |
@@ -1213,11 +1213,11 @@ discard block |
||
1213 | 1213 | |
1214 | 1214 | |
1215 | 1215 | /** |
1216 | - * Gets all the spotter information based on the spotter id |
|
1217 | - * |
|
1218 | - * @return Array the spotter information |
|
1219 | - * |
|
1220 | - */ |
|
1216 | + * Gets all the spotter information based on the spotter id |
|
1217 | + * |
|
1218 | + * @return Array the spotter information |
|
1219 | + * |
|
1220 | + */ |
|
1221 | 1221 | public function getSpotterDataByID($id = '') |
1222 | 1222 | { |
1223 | 1223 | global $global_query; |
@@ -1239,11 +1239,11 @@ discard block |
||
1239 | 1239 | |
1240 | 1240 | |
1241 | 1241 | /** |
1242 | - * Gets all the spotter information based on the callsign |
|
1243 | - * |
|
1244 | - * @return Array the spotter information |
|
1245 | - * |
|
1246 | - */ |
|
1242 | + * Gets all the spotter information based on the callsign |
|
1243 | + * |
|
1244 | + * @return Array the spotter information |
|
1245 | + * |
|
1246 | + */ |
|
1247 | 1247 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '', $filter = array()) |
1248 | 1248 | { |
1249 | 1249 | global $global_query; |
@@ -1295,11 +1295,11 @@ discard block |
||
1295 | 1295 | } |
1296 | 1296 | |
1297 | 1297 | /** |
1298 | - * Gets all the spotter information based on the owner |
|
1299 | - * |
|
1300 | - * @return Array the spotter information |
|
1301 | - * |
|
1302 | - */ |
|
1298 | + * Gets all the spotter information based on the owner |
|
1299 | + * |
|
1300 | + * @return Array the spotter information |
|
1301 | + * |
|
1302 | + */ |
|
1303 | 1303 | public function getSpotterDataByOwner($owner = '', $limit = '', $sort = '', $filter = array()) |
1304 | 1304 | { |
1305 | 1305 | global $global_query; |
@@ -1352,11 +1352,11 @@ discard block |
||
1352 | 1352 | } |
1353 | 1353 | |
1354 | 1354 | /** |
1355 | - * Gets all the spotter information based on the pilot |
|
1356 | - * |
|
1357 | - * @return Array the spotter information |
|
1358 | - * |
|
1359 | - */ |
|
1355 | + * Gets all the spotter information based on the pilot |
|
1356 | + * |
|
1357 | + * @return Array the spotter information |
|
1358 | + * |
|
1359 | + */ |
|
1360 | 1360 | public function getSpotterDataByPilot($pilot = '', $limit = '', $sort = '', $filter = array()) |
1361 | 1361 | { |
1362 | 1362 | global $global_query; |
@@ -1405,11 +1405,11 @@ discard block |
||
1405 | 1405 | |
1406 | 1406 | |
1407 | 1407 | /** |
1408 | - * Gets all the spotter information based on the aircraft type |
|
1409 | - * |
|
1410 | - * @return Array the spotter information |
|
1411 | - * |
|
1412 | - */ |
|
1408 | + * Gets all the spotter information based on the aircraft type |
|
1409 | + * |
|
1410 | + * @return Array the spotter information |
|
1411 | + * |
|
1412 | + */ |
|
1413 | 1413 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
1414 | 1414 | { |
1415 | 1415 | global $global_query; |
@@ -1463,11 +1463,11 @@ discard block |
||
1463 | 1463 | |
1464 | 1464 | |
1465 | 1465 | /** |
1466 | - * Gets all the spotter information based on the aircraft registration |
|
1467 | - * |
|
1468 | - * @return Array the spotter information |
|
1469 | - * |
|
1470 | - */ |
|
1466 | + * Gets all the spotter information based on the aircraft registration |
|
1467 | + * |
|
1468 | + * @return Array the spotter information |
|
1469 | + * |
|
1470 | + */ |
|
1471 | 1471 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
1472 | 1472 | { |
1473 | 1473 | global $global_query; |
@@ -1524,11 +1524,11 @@ discard block |
||
1524 | 1524 | |
1525 | 1525 | |
1526 | 1526 | /** |
1527 | - * Gets all the spotter information based on the airline |
|
1528 | - * |
|
1529 | - * @return Array the spotter information |
|
1530 | - * |
|
1531 | - */ |
|
1527 | + * Gets all the spotter information based on the airline |
|
1528 | + * |
|
1529 | + * @return Array the spotter information |
|
1530 | + * |
|
1531 | + */ |
|
1532 | 1532 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
1533 | 1533 | { |
1534 | 1534 | global $global_query; |
@@ -1581,11 +1581,11 @@ discard block |
||
1581 | 1581 | |
1582 | 1582 | |
1583 | 1583 | /** |
1584 | - * Gets all the spotter information based on the airport |
|
1585 | - * |
|
1586 | - * @return Array the spotter information |
|
1587 | - * |
|
1588 | - */ |
|
1584 | + * Gets all the spotter information based on the airport |
|
1585 | + * |
|
1586 | + * @return Array the spotter information |
|
1587 | + * |
|
1588 | + */ |
|
1589 | 1589 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
1590 | 1590 | { |
1591 | 1591 | global $global_query; |
@@ -1639,11 +1639,11 @@ discard block |
||
1639 | 1639 | |
1640 | 1640 | |
1641 | 1641 | /** |
1642 | - * Gets all the spotter information based on the date |
|
1643 | - * |
|
1644 | - * @return Array the spotter information |
|
1645 | - * |
|
1646 | - */ |
|
1642 | + * Gets all the spotter information based on the date |
|
1643 | + * |
|
1644 | + * @return Array the spotter information |
|
1645 | + * |
|
1646 | + */ |
|
1647 | 1647 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
1648 | 1648 | { |
1649 | 1649 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1707,11 +1707,11 @@ discard block |
||
1707 | 1707 | |
1708 | 1708 | |
1709 | 1709 | /** |
1710 | - * Gets all the spotter information based on the country name |
|
1711 | - * |
|
1712 | - * @return Array the spotter information |
|
1713 | - * |
|
1714 | - */ |
|
1710 | + * Gets all the spotter information based on the country name |
|
1711 | + * |
|
1712 | + * @return Array the spotter information |
|
1713 | + * |
|
1714 | + */ |
|
1715 | 1715 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
1716 | 1716 | { |
1717 | 1717 | global $global_query; |
@@ -1765,11 +1765,11 @@ discard block |
||
1765 | 1765 | |
1766 | 1766 | |
1767 | 1767 | /** |
1768 | - * Gets all the spotter information based on the manufacturer name |
|
1769 | - * |
|
1770 | - * @return Array the spotter information |
|
1771 | - * |
|
1772 | - */ |
|
1768 | + * Gets all the spotter information based on the manufacturer name |
|
1769 | + * |
|
1770 | + * @return Array the spotter information |
|
1771 | + * |
|
1772 | + */ |
|
1773 | 1773 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
1774 | 1774 | { |
1775 | 1775 | global $global_query; |
@@ -1825,13 +1825,13 @@ discard block |
||
1825 | 1825 | |
1826 | 1826 | |
1827 | 1827 | /** |
1828 | - * Gets a list of all aircraft that take a route |
|
1829 | - * |
|
1830 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
1831 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1832 | - * @return Array the spotter information |
|
1833 | - * |
|
1834 | - */ |
|
1828 | + * Gets a list of all aircraft that take a route |
|
1829 | + * |
|
1830 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
1831 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1832 | + * @return Array the spotter information |
|
1833 | + * |
|
1834 | + */ |
|
1835 | 1835 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
1836 | 1836 | { |
1837 | 1837 | global $global_query; |
@@ -1900,11 +1900,11 @@ discard block |
||
1900 | 1900 | |
1901 | 1901 | |
1902 | 1902 | /** |
1903 | - * Gets all the spotter information based on the special column in the table |
|
1904 | - * |
|
1905 | - * @return Array the spotter information |
|
1906 | - * |
|
1907 | - */ |
|
1903 | + * Gets all the spotter information based on the special column in the table |
|
1904 | + * |
|
1905 | + * @return Array the spotter information |
|
1906 | + * |
|
1907 | + */ |
|
1908 | 1908 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
1909 | 1909 | { |
1910 | 1910 | global $global_query; |
@@ -1943,11 +1943,11 @@ discard block |
||
1943 | 1943 | } |
1944 | 1944 | |
1945 | 1945 | /** |
1946 | - * Gets all the highlight based on a aircraft registration |
|
1947 | - * |
|
1948 | - * @return String the highlight text |
|
1949 | - * |
|
1950 | - */ |
|
1946 | + * Gets all the highlight based on a aircraft registration |
|
1947 | + * |
|
1948 | + * @return String the highlight text |
|
1949 | + * |
|
1950 | + */ |
|
1951 | 1951 | public function getHighlightByRegistration($registration,$filter = array()) |
1952 | 1952 | { |
1953 | 1953 | global $global_query; |
@@ -1969,13 +1969,13 @@ discard block |
||
1969 | 1969 | |
1970 | 1970 | |
1971 | 1971 | /** |
1972 | - * Gets the squawk usage from squawk code |
|
1973 | - * |
|
1974 | - * @param String $squawk squawk code |
|
1975 | - * @param String $country country |
|
1976 | - * @return String usage |
|
1977 | - * |
|
1978 | - */ |
|
1972 | + * Gets the squawk usage from squawk code |
|
1973 | + * |
|
1974 | + * @param String $squawk squawk code |
|
1975 | + * @param String $country country |
|
1976 | + * @return String usage |
|
1977 | + * |
|
1978 | + */ |
|
1979 | 1979 | public function getSquawkUsage($squawk = '',$country = 'FR') |
1980 | 1980 | { |
1981 | 1981 | |
@@ -1996,12 +1996,12 @@ discard block |
||
1996 | 1996 | } |
1997 | 1997 | |
1998 | 1998 | /** |
1999 | - * Gets the airport icao from the iata |
|
2000 | - * |
|
2001 | - * @param String $airport_iata the iata code of the airport |
|
2002 | - * @return String airport iata |
|
2003 | - * |
|
2004 | - */ |
|
1999 | + * Gets the airport icao from the iata |
|
2000 | + * |
|
2001 | + * @param String $airport_iata the iata code of the airport |
|
2002 | + * @return String airport iata |
|
2003 | + * |
|
2004 | + */ |
|
2005 | 2005 | public function getAirportIcao($airport_iata = '') |
2006 | 2006 | { |
2007 | 2007 | |
@@ -2021,14 +2021,14 @@ discard block |
||
2021 | 2021 | } |
2022 | 2022 | |
2023 | 2023 | /** |
2024 | - * Gets the airport distance |
|
2025 | - * |
|
2026 | - * @param String $airport_icao the icao code of the airport |
|
2027 | - * @param Float $latitude the latitude |
|
2028 | - * @param Float $longitude the longitude |
|
2029 | - * @return Float distance to the airport |
|
2030 | - * |
|
2031 | - */ |
|
2024 | + * Gets the airport distance |
|
2025 | + * |
|
2026 | + * @param String $airport_icao the icao code of the airport |
|
2027 | + * @param Float $latitude the latitude |
|
2028 | + * @param Float $longitude the longitude |
|
2029 | + * @return Float distance to the airport |
|
2030 | + * |
|
2031 | + */ |
|
2032 | 2032 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
2033 | 2033 | { |
2034 | 2034 | |
@@ -2049,12 +2049,12 @@ discard block |
||
2049 | 2049 | } |
2050 | 2050 | |
2051 | 2051 | /** |
2052 | - * Gets the airport info based on the icao |
|
2053 | - * |
|
2054 | - * @param String $airport the icao code of the airport |
|
2055 | - * @return Array airport information |
|
2056 | - * |
|
2057 | - */ |
|
2052 | + * Gets the airport info based on the icao |
|
2053 | + * |
|
2054 | + * @param String $airport the icao code of the airport |
|
2055 | + * @return Array airport information |
|
2056 | + * |
|
2057 | + */ |
|
2058 | 2058 | public function getAllAirportInfo($airport = '') |
2059 | 2059 | { |
2060 | 2060 | |
@@ -2100,12 +2100,12 @@ discard block |
||
2100 | 2100 | } |
2101 | 2101 | |
2102 | 2102 | /** |
2103 | - * Gets the airport info based on the country |
|
2104 | - * |
|
2105 | - * @param Array $countries Airports countries |
|
2106 | - * @return Array airport information |
|
2107 | - * |
|
2108 | - */ |
|
2103 | + * Gets the airport info based on the country |
|
2104 | + * |
|
2105 | + * @param Array $countries Airports countries |
|
2106 | + * @return Array airport information |
|
2107 | + * |
|
2108 | + */ |
|
2109 | 2109 | public function getAllAirportInfobyCountry($countries) |
2110 | 2110 | { |
2111 | 2111 | $lst_countries = ''; |
@@ -2143,12 +2143,12 @@ discard block |
||
2143 | 2143 | } |
2144 | 2144 | |
2145 | 2145 | /** |
2146 | - * Gets airports info based on the coord |
|
2147 | - * |
|
2148 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2149 | - * @return Array airport information |
|
2150 | - * |
|
2151 | - */ |
|
2146 | + * Gets airports info based on the coord |
|
2147 | + * |
|
2148 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2149 | + * @return Array airport information |
|
2150 | + * |
|
2151 | + */ |
|
2152 | 2152 | public function getAllAirportInfobyCoord($coord) |
2153 | 2153 | { |
2154 | 2154 | global $globalDBdriver; |
@@ -2179,12 +2179,12 @@ discard block |
||
2179 | 2179 | } |
2180 | 2180 | |
2181 | 2181 | /** |
2182 | - * Gets waypoints info based on the coord |
|
2183 | - * |
|
2184 | - * @param Array $coord waypoints coord |
|
2185 | - * @return Array airport information |
|
2186 | - * |
|
2187 | - */ |
|
2182 | + * Gets waypoints info based on the coord |
|
2183 | + * |
|
2184 | + * @param Array $coord waypoints coord |
|
2185 | + * @return Array airport information |
|
2186 | + * |
|
2187 | + */ |
|
2188 | 2188 | public function getAllWaypointsInfobyCoord($coord) |
2189 | 2189 | { |
2190 | 2190 | if (is_array($coord)) { |
@@ -2218,12 +2218,12 @@ discard block |
||
2218 | 2218 | |
2219 | 2219 | |
2220 | 2220 | /** |
2221 | - * Gets the airline info based on the icao code or iata code |
|
2222 | - * |
|
2223 | - * @param String $airline_icao the iata code of the airport |
|
2224 | - * @return Array airport information |
|
2225 | - * |
|
2226 | - */ |
|
2221 | + * Gets the airline info based on the icao code or iata code |
|
2222 | + * |
|
2223 | + * @param String $airline_icao the iata code of the airport |
|
2224 | + * @return Array airport information |
|
2225 | + * |
|
2226 | + */ |
|
2227 | 2227 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
2228 | 2228 | { |
2229 | 2229 | global $globalUseRealAirlines; |
@@ -2254,7 +2254,7 @@ discard block |
||
2254 | 2254 | } else { |
2255 | 2255 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
2256 | 2256 | } |
2257 | - /* |
|
2257 | + /* |
|
2258 | 2258 | $airline_array = array(); |
2259 | 2259 | $temp_array = array(); |
2260 | 2260 | |
@@ -2287,12 +2287,12 @@ discard block |
||
2287 | 2287 | } |
2288 | 2288 | |
2289 | 2289 | /** |
2290 | - * Gets the airline info based on the airline name |
|
2291 | - * |
|
2292 | - * @param String $airline_name the name of the airline |
|
2293 | - * @return Array airline information |
|
2294 | - * |
|
2295 | - */ |
|
2290 | + * Gets the airline info based on the airline name |
|
2291 | + * |
|
2292 | + * @param String $airline_name the name of the airline |
|
2293 | + * @return Array airline information |
|
2294 | + * |
|
2295 | + */ |
|
2296 | 2296 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
2297 | 2297 | { |
2298 | 2298 | global $globalUseRealAirlines; |
@@ -2320,12 +2320,12 @@ discard block |
||
2320 | 2320 | |
2321 | 2321 | |
2322 | 2322 | /** |
2323 | - * Gets the aircraft info based on the aircraft type |
|
2324 | - * |
|
2325 | - * @param String $aircraft_type the aircraft type |
|
2326 | - * @return Array aircraft information |
|
2327 | - * |
|
2328 | - */ |
|
2323 | + * Gets the aircraft info based on the aircraft type |
|
2324 | + * |
|
2325 | + * @param String $aircraft_type the aircraft type |
|
2326 | + * @return Array aircraft information |
|
2327 | + * |
|
2328 | + */ |
|
2329 | 2329 | public function getAllAircraftInfo($aircraft_type) |
2330 | 2330 | { |
2331 | 2331 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2357,12 +2357,12 @@ discard block |
||
2357 | 2357 | } |
2358 | 2358 | |
2359 | 2359 | /** |
2360 | - * Gets the aircraft icao based on the aircraft name/type |
|
2361 | - * |
|
2362 | - * @param String $aircraft_type the aircraft type |
|
2363 | - * @return String aircraft information |
|
2364 | - * |
|
2365 | - */ |
|
2360 | + * Gets the aircraft icao based on the aircraft name/type |
|
2361 | + * |
|
2362 | + * @param String $aircraft_type the aircraft type |
|
2363 | + * @return String aircraft information |
|
2364 | + * |
|
2365 | + */ |
|
2366 | 2366 | public function getAircraftIcao($aircraft_type) |
2367 | 2367 | { |
2368 | 2368 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2387,12 +2387,12 @@ discard block |
||
2387 | 2387 | } |
2388 | 2388 | |
2389 | 2389 | /** |
2390 | - * Gets the aircraft info based on the aircraft modes |
|
2391 | - * |
|
2392 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
2393 | - * @return String aircraft type |
|
2394 | - * |
|
2395 | - */ |
|
2390 | + * Gets the aircraft info based on the aircraft modes |
|
2391 | + * |
|
2392 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
2393 | + * @return String aircraft type |
|
2394 | + * |
|
2395 | + */ |
|
2396 | 2396 | public function getAllAircraftType($aircraft_modes) |
2397 | 2397 | { |
2398 | 2398 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2412,12 +2412,12 @@ discard block |
||
2412 | 2412 | } |
2413 | 2413 | |
2414 | 2414 | /** |
2415 | - * Gets the aircraft info based on the aircraft registration |
|
2416 | - * |
|
2417 | - * @param String $registration the aircraft registration |
|
2418 | - * @return String aircraft type |
|
2419 | - * |
|
2420 | - */ |
|
2415 | + * Gets the aircraft info based on the aircraft registration |
|
2416 | + * |
|
2417 | + * @param String $registration the aircraft registration |
|
2418 | + * @return String aircraft type |
|
2419 | + * |
|
2420 | + */ |
|
2421 | 2421 | public function getAllAircraftTypeByRegistration($registration) |
2422 | 2422 | { |
2423 | 2423 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2435,12 +2435,12 @@ discard block |
||
2435 | 2435 | } |
2436 | 2436 | |
2437 | 2437 | /** |
2438 | - * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2439 | - * |
|
2440 | - * @param String $registration the aircraft registration |
|
2441 | - * @return Array spotter_id and flightaware_id |
|
2442 | - * |
|
2443 | - */ |
|
2438 | + * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2439 | + * |
|
2440 | + * @param String $registration the aircraft registration |
|
2441 | + * @return Array spotter_id and flightaware_id |
|
2442 | + * |
|
2443 | + */ |
|
2444 | 2444 | public function getAllIDByRegistration($registration) |
2445 | 2445 | { |
2446 | 2446 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2459,12 +2459,12 @@ discard block |
||
2459 | 2459 | } |
2460 | 2460 | |
2461 | 2461 | /** |
2462 | - * Gets correct aircraft operator code |
|
2463 | - * |
|
2464 | - * @param String $operator the aircraft operator code (callsign) |
|
2465 | - * @return String aircraft operator code |
|
2466 | - * |
|
2467 | - */ |
|
2462 | + * Gets correct aircraft operator code |
|
2463 | + * |
|
2464 | + * @param String $operator the aircraft operator code (callsign) |
|
2465 | + * @return String aircraft operator code |
|
2466 | + * |
|
2467 | + */ |
|
2468 | 2468 | public function getOperator($operator) |
2469 | 2469 | { |
2470 | 2470 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2481,16 +2481,16 @@ discard block |
||
2481 | 2481 | } |
2482 | 2482 | |
2483 | 2483 | /** |
2484 | - * Gets the aircraft route based on the aircraft callsign |
|
2485 | - * |
|
2486 | - * @param String $callsign the aircraft callsign |
|
2487 | - * @return Array aircraft type |
|
2488 | - * |
|
2489 | - */ |
|
2484 | + * Gets the aircraft route based on the aircraft callsign |
|
2485 | + * |
|
2486 | + * @param String $callsign the aircraft callsign |
|
2487 | + * @return Array aircraft type |
|
2488 | + * |
|
2489 | + */ |
|
2490 | 2490 | public function getRouteInfo($callsign) |
2491 | 2491 | { |
2492 | 2492 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
2493 | - if ($callsign == '') return array(); |
|
2493 | + if ($callsign == '') return array(); |
|
2494 | 2494 | $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"; |
2495 | 2495 | |
2496 | 2496 | $sth = $this->db->prepare($query); |
@@ -2504,12 +2504,12 @@ discard block |
||
2504 | 2504 | } |
2505 | 2505 | |
2506 | 2506 | /** |
2507 | - * Gets the aircraft info based on the aircraft registration |
|
2508 | - * |
|
2509 | - * @param String $registration the aircraft registration |
|
2510 | - * @return Array aircraft information |
|
2511 | - * |
|
2512 | - */ |
|
2507 | + * Gets the aircraft info based on the aircraft registration |
|
2508 | + * |
|
2509 | + * @param String $registration the aircraft registration |
|
2510 | + * @return Array aircraft information |
|
2511 | + * |
|
2512 | + */ |
|
2513 | 2513 | public function getAircraftInfoByRegistration($registration) |
2514 | 2514 | { |
2515 | 2515 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2536,12 +2536,12 @@ discard block |
||
2536 | 2536 | } |
2537 | 2537 | |
2538 | 2538 | /** |
2539 | - * Gets the aircraft owner & base based on the aircraft registration |
|
2540 | - * |
|
2541 | - * @param String $registration the aircraft registration |
|
2542 | - * @return Array aircraft information |
|
2543 | - * |
|
2544 | - */ |
|
2539 | + * Gets the aircraft owner & base based on the aircraft registration |
|
2540 | + * |
|
2541 | + * @param String $registration the aircraft registration |
|
2542 | + * @return Array aircraft information |
|
2543 | + * |
|
2544 | + */ |
|
2545 | 2545 | public function getAircraftOwnerByRegistration($registration) |
2546 | 2546 | { |
2547 | 2547 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2558,11 +2558,11 @@ discard block |
||
2558 | 2558 | |
2559 | 2559 | |
2560 | 2560 | /** |
2561 | - * Gets all flights (but with only little info) |
|
2562 | - * |
|
2563 | - * @return Array basic flight information |
|
2564 | - * |
|
2565 | - */ |
|
2561 | + * Gets all flights (but with only little info) |
|
2562 | + * |
|
2563 | + * @return Array basic flight information |
|
2564 | + * |
|
2565 | + */ |
|
2566 | 2566 | public function getAllFlightsforSitemap() |
2567 | 2567 | { |
2568 | 2568 | //$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 "; |
@@ -2570,7 +2570,7 @@ discard block |
||
2570 | 2570 | |
2571 | 2571 | $sth = $this->db->prepare($query); |
2572 | 2572 | $sth->execute(); |
2573 | - /* |
|
2573 | + /* |
|
2574 | 2574 | $flight_array = array(); |
2575 | 2575 | $temp_array = array(); |
2576 | 2576 | |
@@ -2592,11 +2592,11 @@ discard block |
||
2592 | 2592 | } |
2593 | 2593 | |
2594 | 2594 | /** |
2595 | - * Gets a list of all aircraft manufacturers |
|
2596 | - * |
|
2597 | - * @return Array list of aircraft types |
|
2598 | - * |
|
2599 | - */ |
|
2595 | + * Gets a list of all aircraft manufacturers |
|
2596 | + * |
|
2597 | + * @return Array list of aircraft types |
|
2598 | + * |
|
2599 | + */ |
|
2600 | 2600 | public function getAllManufacturers() |
2601 | 2601 | { |
2602 | 2602 | /* |
@@ -2625,11 +2625,11 @@ discard block |
||
2625 | 2625 | |
2626 | 2626 | |
2627 | 2627 | /** |
2628 | - * Gets a list of all aircraft types |
|
2629 | - * |
|
2630 | - * @return Array list of aircraft types |
|
2631 | - * |
|
2632 | - */ |
|
2628 | + * Gets a list of all aircraft types |
|
2629 | + * |
|
2630 | + * @return Array list of aircraft types |
|
2631 | + * |
|
2632 | + */ |
|
2633 | 2633 | public function getAllAircraftTypes($filters = array()) |
2634 | 2634 | { |
2635 | 2635 | /* |
@@ -2664,11 +2664,11 @@ discard block |
||
2664 | 2664 | |
2665 | 2665 | |
2666 | 2666 | /** |
2667 | - * Gets a list of all aircraft registrations |
|
2668 | - * |
|
2669 | - * @return Array list of aircraft registrations |
|
2670 | - * |
|
2671 | - */ |
|
2667 | + * Gets a list of all aircraft registrations |
|
2668 | + * |
|
2669 | + * @return Array list of aircraft registrations |
|
2670 | + * |
|
2671 | + */ |
|
2672 | 2672 | public function getAllAircraftRegistrations($filters = array()) |
2673 | 2673 | { |
2674 | 2674 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2693,12 +2693,12 @@ discard block |
||
2693 | 2693 | } |
2694 | 2694 | |
2695 | 2695 | /** |
2696 | - * Gets all source name |
|
2697 | - * |
|
2698 | - * @param String type format of source |
|
2699 | - * @return Array list of source name |
|
2700 | - * |
|
2701 | - */ |
|
2696 | + * Gets all source name |
|
2697 | + * |
|
2698 | + * @param String type format of source |
|
2699 | + * @return Array list of source name |
|
2700 | + * |
|
2701 | + */ |
|
2702 | 2702 | public function getAllSourceName($type = '',$filters = array()) |
2703 | 2703 | { |
2704 | 2704 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2729,11 +2729,11 @@ discard block |
||
2729 | 2729 | |
2730 | 2730 | |
2731 | 2731 | /** |
2732 | - * Gets a list of all airline names |
|
2733 | - * |
|
2734 | - * @return Array list of airline names |
|
2735 | - * |
|
2736 | - */ |
|
2732 | + * Gets a list of all airline names |
|
2733 | + * |
|
2734 | + * @return Array list of airline names |
|
2735 | + * |
|
2736 | + */ |
|
2737 | 2737 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
2738 | 2738 | { |
2739 | 2739 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2782,11 +2782,11 @@ discard block |
||
2782 | 2782 | } |
2783 | 2783 | |
2784 | 2784 | /** |
2785 | - * Gets a list of all alliance names |
|
2786 | - * |
|
2787 | - * @return Array list of alliance names |
|
2788 | - * |
|
2789 | - */ |
|
2785 | + * Gets a list of all alliance names |
|
2786 | + * |
|
2787 | + * @return Array list of alliance names |
|
2788 | + * |
|
2789 | + */ |
|
2790 | 2790 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
2791 | 2791 | { |
2792 | 2792 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2811,11 +2811,11 @@ discard block |
||
2811 | 2811 | } |
2812 | 2812 | |
2813 | 2813 | /** |
2814 | - * Gets a list of all airline countries |
|
2815 | - * |
|
2816 | - * @return Array list of airline countries |
|
2817 | - * |
|
2818 | - */ |
|
2814 | + * Gets a list of all airline countries |
|
2815 | + * |
|
2816 | + * @return Array list of airline countries |
|
2817 | + * |
|
2818 | + */ |
|
2819 | 2819 | public function getAllAirlineCountries($filters = array()) |
2820 | 2820 | { |
2821 | 2821 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2843,11 +2843,11 @@ discard block |
||
2843 | 2843 | |
2844 | 2844 | |
2845 | 2845 | /** |
2846 | - * Gets a list of all departure & arrival names |
|
2847 | - * |
|
2848 | - * @return Array list of airport names |
|
2849 | - * |
|
2850 | - */ |
|
2846 | + * Gets a list of all departure & arrival names |
|
2847 | + * |
|
2848 | + * @return Array list of airport names |
|
2849 | + * |
|
2850 | + */ |
|
2851 | 2851 | public function getAllAirportNames($filters = array()) |
2852 | 2852 | { |
2853 | 2853 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2895,11 +2895,11 @@ discard block |
||
2895 | 2895 | } |
2896 | 2896 | |
2897 | 2897 | /** |
2898 | - * Gets a list of all owner names |
|
2899 | - * |
|
2900 | - * @return Array list of owner names |
|
2901 | - * |
|
2902 | - */ |
|
2898 | + * Gets a list of all owner names |
|
2899 | + * |
|
2900 | + * @return Array list of owner names |
|
2901 | + * |
|
2902 | + */ |
|
2903 | 2903 | public function getAllOwnerNames($filters = array()) |
2904 | 2904 | { |
2905 | 2905 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2913,11 +2913,11 @@ discard block |
||
2913 | 2913 | } |
2914 | 2914 | |
2915 | 2915 | /** |
2916 | - * Gets a list of all pilot names and pilot ids |
|
2917 | - * |
|
2918 | - * @return Array list of pilot names and pilot ids |
|
2919 | - * |
|
2920 | - */ |
|
2916 | + * Gets a list of all pilot names and pilot ids |
|
2917 | + * |
|
2918 | + * @return Array list of pilot names and pilot ids |
|
2919 | + * |
|
2920 | + */ |
|
2921 | 2921 | public function getAllPilotNames($filters = array()) |
2922 | 2922 | { |
2923 | 2923 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2932,11 +2932,11 @@ discard block |
||
2932 | 2932 | |
2933 | 2933 | |
2934 | 2934 | /** |
2935 | - * Gets a list of all departure & arrival airport countries |
|
2936 | - * |
|
2937 | - * @return Array list of airport countries |
|
2938 | - * |
|
2939 | - */ |
|
2935 | + * Gets a list of all departure & arrival airport countries |
|
2936 | + * |
|
2937 | + * @return Array list of airport countries |
|
2938 | + * |
|
2939 | + */ |
|
2940 | 2940 | public function getAllAirportCountries($filters = array()) |
2941 | 2941 | { |
2942 | 2942 | $airport_array = array(); |
@@ -2984,11 +2984,11 @@ discard block |
||
2984 | 2984 | |
2985 | 2985 | |
2986 | 2986 | /** |
2987 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2988 | - * |
|
2989 | - * @return Array list of countries |
|
2990 | - * |
|
2991 | - */ |
|
2987 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2988 | + * |
|
2989 | + * @return Array list of countries |
|
2990 | + * |
|
2991 | + */ |
|
2992 | 2992 | public function getAllCountries($filters = array()) |
2993 | 2993 | { |
2994 | 2994 | $Connection= new Connection($this->db); |
@@ -3065,11 +3065,11 @@ discard block |
||
3065 | 3065 | |
3066 | 3066 | |
3067 | 3067 | /** |
3068 | - * Gets a list of all idents/callsigns |
|
3069 | - * |
|
3070 | - * @return Array list of ident/callsign names |
|
3071 | - * |
|
3072 | - */ |
|
3068 | + * Gets a list of all idents/callsigns |
|
3069 | + * |
|
3070 | + * @return Array list of ident/callsign names |
|
3071 | + * |
|
3072 | + */ |
|
3073 | 3073 | public function getAllIdents($filters = array()) |
3074 | 3074 | { |
3075 | 3075 | $filter_query = $this->getFilter($filters,true,true); |
@@ -3093,9 +3093,9 @@ discard block |
||
3093 | 3093 | } |
3094 | 3094 | |
3095 | 3095 | /** |
3096 | - * Get a list of flights from airport since 7 days |
|
3097 | - * @return Array number, icao, name and city of airports |
|
3098 | - */ |
|
3096 | + * Get a list of flights from airport since 7 days |
|
3097 | + * @return Array number, icao, name and city of airports |
|
3098 | + */ |
|
3099 | 3099 | |
3100 | 3100 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
3101 | 3101 | global $globalTimezone, $globalDBdriver; |
@@ -3126,9 +3126,9 @@ discard block |
||
3126 | 3126 | } |
3127 | 3127 | |
3128 | 3128 | /** |
3129 | - * Get a list of flights from airport since 7 days |
|
3130 | - * @return Array number, icao, name and city of airports |
|
3131 | - */ |
|
3129 | + * Get a list of flights from airport since 7 days |
|
3130 | + * @return Array number, icao, name and city of airports |
|
3131 | + */ |
|
3132 | 3132 | |
3133 | 3133 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
3134 | 3134 | global $globalTimezone, $globalDBdriver; |
@@ -3158,9 +3158,9 @@ discard block |
||
3158 | 3158 | } |
3159 | 3159 | |
3160 | 3160 | /** |
3161 | - * Get a list of flights from detected airport since 7 days |
|
3162 | - * @return Array number, icao, name and city of airports |
|
3163 | - */ |
|
3161 | + * Get a list of flights from detected airport since 7 days |
|
3162 | + * @return Array number, icao, name and city of airports |
|
3163 | + */ |
|
3164 | 3164 | |
3165 | 3165 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
3166 | 3166 | global $globalTimezone, $globalDBdriver; |
@@ -3198,9 +3198,9 @@ discard block |
||
3198 | 3198 | } |
3199 | 3199 | |
3200 | 3200 | /** |
3201 | - * Get a list of flights from detected airport since 7 days |
|
3202 | - * @return Array number, icao, name and city of airports |
|
3203 | - */ |
|
3201 | + * Get a list of flights from detected airport since 7 days |
|
3202 | + * @return Array number, icao, name and city of airports |
|
3203 | + */ |
|
3204 | 3204 | |
3205 | 3205 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
3206 | 3206 | global $globalTimezone, $globalDBdriver; |
@@ -3242,9 +3242,9 @@ discard block |
||
3242 | 3242 | |
3243 | 3243 | |
3244 | 3244 | /** |
3245 | - * Get a list of flights to airport since 7 days |
|
3246 | - * @return Array number, icao, name and city of airports |
|
3247 | - */ |
|
3245 | + * Get a list of flights to airport since 7 days |
|
3246 | + * @return Array number, icao, name and city of airports |
|
3247 | + */ |
|
3248 | 3248 | |
3249 | 3249 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
3250 | 3250 | global $globalTimezone, $globalDBdriver; |
@@ -3277,9 +3277,9 @@ discard block |
||
3277 | 3277 | |
3278 | 3278 | |
3279 | 3279 | /** |
3280 | - * Get a list of flights detected to airport since 7 days |
|
3281 | - * @return Array number, icao, name and city of airports |
|
3282 | - */ |
|
3280 | + * Get a list of flights detected to airport since 7 days |
|
3281 | + * @return Array number, icao, name and city of airports |
|
3282 | + */ |
|
3283 | 3283 | |
3284 | 3284 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
3285 | 3285 | global $globalTimezone, $globalDBdriver; |
@@ -3320,9 +3320,9 @@ discard block |
||
3320 | 3320 | |
3321 | 3321 | |
3322 | 3322 | /** |
3323 | - * Get a list of flights to airport since 7 days |
|
3324 | - * @return Array number, icao, name and city of airports |
|
3325 | - */ |
|
3323 | + * Get a list of flights to airport since 7 days |
|
3324 | + * @return Array number, icao, name and city of airports |
|
3325 | + */ |
|
3326 | 3326 | |
3327 | 3327 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
3328 | 3328 | global $globalTimezone, $globalDBdriver; |
@@ -3354,9 +3354,9 @@ discard block |
||
3354 | 3354 | |
3355 | 3355 | |
3356 | 3356 | /** |
3357 | - * Get a list of flights detected to airport since 7 days |
|
3358 | - * @return Array number, icao, name and city of airports |
|
3359 | - */ |
|
3357 | + * Get a list of flights detected to airport since 7 days |
|
3358 | + * @return Array number, icao, name and city of airports |
|
3359 | + */ |
|
3360 | 3360 | |
3361 | 3361 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
3362 | 3362 | global $globalTimezone, $globalDBdriver; |
@@ -3400,11 +3400,11 @@ discard block |
||
3400 | 3400 | |
3401 | 3401 | |
3402 | 3402 | /** |
3403 | - * Gets a list of all dates |
|
3404 | - * |
|
3405 | - * @return Array list of date names |
|
3406 | - * |
|
3407 | - */ |
|
3403 | + * Gets a list of all dates |
|
3404 | + * |
|
3405 | + * @return Array list of date names |
|
3406 | + * |
|
3407 | + */ |
|
3408 | 3408 | public function getAllDates() |
3409 | 3409 | { |
3410 | 3410 | global $globalTimezone, $globalDBdriver; |
@@ -3445,11 +3445,11 @@ discard block |
||
3445 | 3445 | |
3446 | 3446 | |
3447 | 3447 | /** |
3448 | - * Gets all route combinations |
|
3449 | - * |
|
3450 | - * @return Array the route list |
|
3451 | - * |
|
3452 | - */ |
|
3448 | + * Gets all route combinations |
|
3449 | + * |
|
3450 | + * @return Array the route list |
|
3451 | + * |
|
3452 | + */ |
|
3453 | 3453 | public function getAllRoutes() |
3454 | 3454 | { |
3455 | 3455 | $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 |
@@ -3475,13 +3475,13 @@ discard block |
||
3475 | 3475 | } |
3476 | 3476 | |
3477 | 3477 | /** |
3478 | - * Update ident spotter data |
|
3479 | - * |
|
3480 | - * @param String $flightaware_id the ID from flightaware |
|
3481 | - * @param String $ident the flight ident |
|
3482 | - * @return String success or false |
|
3483 | - * |
|
3484 | - */ |
|
3478 | + * Update ident spotter data |
|
3479 | + * |
|
3480 | + * @param String $flightaware_id the ID from flightaware |
|
3481 | + * @param String $ident the flight ident |
|
3482 | + * @return String success or false |
|
3483 | + * |
|
3484 | + */ |
|
3485 | 3485 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
3486 | 3486 | { |
3487 | 3487 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3502,14 +3502,14 @@ discard block |
||
3502 | 3502 | } else { |
3503 | 3503 | $airline_array = $this->getAllAirlineInfo("NA"); |
3504 | 3504 | } |
3505 | - $airline_name = $airline_array[0]['name']; |
|
3506 | - $airline_icao = $airline_array[0]['icao']; |
|
3507 | - $airline_country = $airline_array[0]['country']; |
|
3508 | - $airline_type = $airline_array[0]['type']; |
|
3505 | + $airline_name = $airline_array[0]['name']; |
|
3506 | + $airline_icao = $airline_array[0]['icao']; |
|
3507 | + $airline_country = $airline_array[0]['country']; |
|
3508 | + $airline_type = $airline_array[0]['type']; |
|
3509 | 3509 | |
3510 | 3510 | |
3511 | 3511 | $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'; |
3512 | - $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); |
|
3512 | + $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); |
|
3513 | 3513 | |
3514 | 3514 | try { |
3515 | 3515 | $sth = $this->db->prepare($query); |
@@ -3522,19 +3522,19 @@ discard block |
||
3522 | 3522 | |
3523 | 3523 | } |
3524 | 3524 | /** |
3525 | - * Update latest spotter data |
|
3526 | - * |
|
3527 | - * @param String $flightaware_id the ID from flightaware |
|
3528 | - * @param String $ident the flight ident |
|
3529 | - * @param String $arrival_airport_icao the arrival airport |
|
3530 | - * @return String success or false |
|
3531 | - * |
|
3532 | - */ |
|
3525 | + * Update latest spotter data |
|
3526 | + * |
|
3527 | + * @param String $flightaware_id the ID from flightaware |
|
3528 | + * @param String $ident the flight ident |
|
3529 | + * @param String $arrival_airport_icao the arrival airport |
|
3530 | + * @return String success or false |
|
3531 | + * |
|
3532 | + */ |
|
3533 | 3533 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
3534 | 3534 | { |
3535 | 3535 | if ($groundspeed == '') $groundspeed = NULL; |
3536 | 3536 | $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'; |
3537 | - $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); |
|
3537 | + $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); |
|
3538 | 3538 | |
3539 | 3539 | try { |
3540 | 3540 | $sth = $this->db->prepare($query); |
@@ -3548,32 +3548,32 @@ discard block |
||
3548 | 3548 | } |
3549 | 3549 | |
3550 | 3550 | /** |
3551 | - * Adds a new spotter data |
|
3552 | - * |
|
3553 | - * @param String $flightaware_id the ID from flightaware |
|
3554 | - * @param String $ident the flight ident |
|
3555 | - * @param String $aircraft_icao the aircraft type |
|
3556 | - * @param String $departure_airport_icao the departure airport |
|
3557 | - * @param String $arrival_airport_icao the arrival airport |
|
3558 | - * @param String $latitude latitude of flight |
|
3559 | - * @param String $longitude latitude of flight |
|
3560 | - * @param String $waypoints waypoints of flight |
|
3561 | - * @param String $altitude altitude of flight |
|
3562 | - * @param String $heading heading of flight |
|
3563 | - * @param String $groundspeed speed of flight |
|
3564 | - * @param String $date date of flight |
|
3565 | - * @param String $departure_airport_time departure time of flight |
|
3566 | - * @param String $arrival_airport_time arrival time of flight |
|
3567 | - * @param String $squawk squawk code of flight |
|
3568 | - * @param String $route_stop route stop of flight |
|
3569 | - * @param String $highlight highlight or not |
|
3570 | - * @param String $ModeS ModesS code of flight |
|
3571 | - * @param String $registration registration code of flight |
|
3572 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3573 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3574 | - * @param String $verticalrate vertival rate of flight |
|
3575 | - * @return String success or false |
|
3576 | - */ |
|
3551 | + * Adds a new spotter data |
|
3552 | + * |
|
3553 | + * @param String $flightaware_id the ID from flightaware |
|
3554 | + * @param String $ident the flight ident |
|
3555 | + * @param String $aircraft_icao the aircraft type |
|
3556 | + * @param String $departure_airport_icao the departure airport |
|
3557 | + * @param String $arrival_airport_icao the arrival airport |
|
3558 | + * @param String $latitude latitude of flight |
|
3559 | + * @param String $longitude latitude of flight |
|
3560 | + * @param String $waypoints waypoints of flight |
|
3561 | + * @param String $altitude altitude of flight |
|
3562 | + * @param String $heading heading of flight |
|
3563 | + * @param String $groundspeed speed of flight |
|
3564 | + * @param String $date date of flight |
|
3565 | + * @param String $departure_airport_time departure time of flight |
|
3566 | + * @param String $arrival_airport_time arrival time of flight |
|
3567 | + * @param String $squawk squawk code of flight |
|
3568 | + * @param String $route_stop route stop of flight |
|
3569 | + * @param String $highlight highlight or not |
|
3570 | + * @param String $ModeS ModesS code of flight |
|
3571 | + * @param String $registration registration code of flight |
|
3572 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3573 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3574 | + * @param String $verticalrate vertival rate of flight |
|
3575 | + * @return String success or false |
|
3576 | + */ |
|
3577 | 3577 | 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 = '') |
3578 | 3578 | { |
3579 | 3579 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3788,8 +3788,8 @@ discard block |
||
3788 | 3788 | |
3789 | 3789 | if ($globalIVAO && $aircraft_icao != '') |
3790 | 3790 | { |
3791 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3792 | - else $airline_icao = ''; |
|
3791 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3792 | + else $airline_icao = ''; |
|
3793 | 3793 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
3794 | 3794 | if (!isset($image_array[0]['registration'])) |
3795 | 3795 | { |
@@ -3820,53 +3820,53 @@ discard block |
||
3820 | 3820 | |
3821 | 3821 | if (count($airline_array) == 0) |
3822 | 3822 | { |
3823 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
3824 | - } |
|
3825 | - if (count($aircraft_array) == 0) |
|
3826 | - { |
|
3827 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3828 | - } |
|
3829 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3830 | - { |
|
3831 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3832 | - } |
|
3833 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3834 | - { |
|
3835 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3836 | - } |
|
3837 | - if ($registration == '') $registration = 'NA'; |
|
3838 | - if ($latitude == '' && $longitude == '') { |
|
3839 | - $latitude = 0; |
|
3840 | - $longitude = 0; |
|
3841 | - } |
|
3842 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3843 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3844 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3845 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3846 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3847 | - $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) |
|
3823 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
3824 | + } |
|
3825 | + if (count($aircraft_array) == 0) |
|
3826 | + { |
|
3827 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3828 | + } |
|
3829 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3830 | + { |
|
3831 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3832 | + } |
|
3833 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3834 | + { |
|
3835 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3836 | + } |
|
3837 | + if ($registration == '') $registration = 'NA'; |
|
3838 | + if ($latitude == '' && $longitude == '') { |
|
3839 | + $latitude = 0; |
|
3840 | + $longitude = 0; |
|
3841 | + } |
|
3842 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3843 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3844 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3845 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3846 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3847 | + $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) |
|
3848 | 3848 | 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)"; |
3849 | 3849 | |
3850 | - $airline_name = $airline_array[0]['name']; |
|
3851 | - $airline_icao = $airline_array[0]['icao']; |
|
3852 | - $airline_country = $airline_array[0]['country']; |
|
3853 | - $airline_type = $airline_array[0]['type']; |
|
3850 | + $airline_name = $airline_array[0]['name']; |
|
3851 | + $airline_icao = $airline_array[0]['icao']; |
|
3852 | + $airline_country = $airline_array[0]['country']; |
|
3853 | + $airline_type = $airline_array[0]['type']; |
|
3854 | 3854 | if ($airline_type == '') { |
3855 | 3855 | $timeelapsed = microtime(true); |
3856 | 3856 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
3857 | 3857 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
3858 | 3858 | } |
3859 | 3859 | if ($airline_type == null) $airline_type = ''; |
3860 | - $aircraft_type = $aircraft_array[0]['type']; |
|
3861 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3862 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
3863 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
3864 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
3860 | + $aircraft_type = $aircraft_array[0]['type']; |
|
3861 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3862 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
3863 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
3864 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
3865 | 3865 | |
3866 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3867 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3868 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3869 | - $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); |
|
3866 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3867 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3868 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3869 | + $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); |
|
3870 | 3870 | |
3871 | 3871 | try { |
3872 | 3872 | |
@@ -3874,7 +3874,7 @@ discard block |
||
3874 | 3874 | $sth->execute($query_values); |
3875 | 3875 | $this->db = null; |
3876 | 3876 | } catch (PDOException $e) { |
3877 | - return "error : ".$e->getMessage(); |
|
3877 | + return "error : ".$e->getMessage(); |
|
3878 | 3878 | } |
3879 | 3879 | |
3880 | 3880 | return "success"; |
@@ -3883,11 +3883,11 @@ discard block |
||
3883 | 3883 | |
3884 | 3884 | |
3885 | 3885 | /** |
3886 | - * Gets the aircraft ident within the last hour |
|
3887 | - * |
|
3888 | - * @return String the ident |
|
3889 | - * |
|
3890 | - */ |
|
3886 | + * Gets the aircraft ident within the last hour |
|
3887 | + * |
|
3888 | + * @return String the ident |
|
3889 | + * |
|
3890 | + */ |
|
3891 | 3891 | public function getIdentFromLastHour($ident) |
3892 | 3892 | { |
3893 | 3893 | global $globalDBdriver, $globalTimezone; |
@@ -3903,11 +3903,11 @@ discard block |
||
3903 | 3903 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
3904 | 3904 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
3905 | 3905 | $query_data = array(':ident' => $ident); |
3906 | - } |
|
3906 | + } |
|
3907 | 3907 | |
3908 | 3908 | $sth = $this->db->prepare($query); |
3909 | 3909 | $sth->execute($query_data); |
3910 | - $ident_result=''; |
|
3910 | + $ident_result=''; |
|
3911 | 3911 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
3912 | 3912 | { |
3913 | 3913 | $ident_result = $row['ident']; |
@@ -3918,11 +3918,11 @@ discard block |
||
3918 | 3918 | |
3919 | 3919 | |
3920 | 3920 | /** |
3921 | - * Gets the aircraft data from the last 20 seconds |
|
3922 | - * |
|
3923 | - * @return Array the spotter data |
|
3924 | - * |
|
3925 | - */ |
|
3921 | + * Gets the aircraft data from the last 20 seconds |
|
3922 | + * |
|
3923 | + * @return Array the spotter data |
|
3924 | + * |
|
3925 | + */ |
|
3926 | 3926 | public function getRealTimeData($q = '') |
3927 | 3927 | { |
3928 | 3928 | global $globalDBdriver; |
@@ -3966,11 +3966,11 @@ discard block |
||
3966 | 3966 | |
3967 | 3967 | |
3968 | 3968 | /** |
3969 | - * Gets all airlines that have flown over |
|
3970 | - * |
|
3971 | - * @return Array the airline list |
|
3972 | - * |
|
3973 | - */ |
|
3969 | + * Gets all airlines that have flown over |
|
3970 | + * |
|
3971 | + * @return Array the airline list |
|
3972 | + * |
|
3973 | + */ |
|
3974 | 3974 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(), $year = '', $month = '', $day = '') |
3975 | 3975 | { |
3976 | 3976 | global $globalDBdriver; |
@@ -3984,7 +3984,7 @@ discard block |
||
3984 | 3984 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
3985 | 3985 | } |
3986 | 3986 | } |
3987 | - if ($sincedate != '') { |
|
3987 | + if ($sincedate != '') { |
|
3988 | 3988 | if ($globalDBdriver == 'mysql') { |
3989 | 3989 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
3990 | 3990 | } else { |
@@ -4038,26 +4038,26 @@ discard block |
||
4038 | 4038 | } |
4039 | 4039 | |
4040 | 4040 | /** |
4041 | - * Gets all pilots that have flown over |
|
4042 | - * |
|
4043 | - * @return Array the pilots list |
|
4044 | - * |
|
4045 | - */ |
|
4041 | + * Gets all pilots that have flown over |
|
4042 | + * |
|
4043 | + * @return Array the pilots list |
|
4044 | + * |
|
4045 | + */ |
|
4046 | 4046 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '',$day = '') |
4047 | 4047 | { |
4048 | 4048 | global $globalDBdriver; |
4049 | 4049 | $filter_query = $this->getFilter($filters,true,true); |
4050 | 4050 | $query = "SELECT DISTINCT spotter_output.pilot_id, s.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
4051 | 4051 | FROM spotter_output LEFT JOIN (SELECT DISTINCT pilot_id, pilot_name, max(date) as date FROM spotter_output GROUP BY pilot_id, pilot_name) s ON s.pilot_id = spotter_output.pilot_id".$filter_query." spotter_output.pilot_id <> ''"; |
4052 | - if ($olderthanmonths > 0) { |
|
4053 | - if ($globalDBdriver == 'mysql') { |
|
4052 | + if ($olderthanmonths > 0) { |
|
4053 | + if ($globalDBdriver == 'mysql') { |
|
4054 | 4054 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
4055 | 4055 | } else { |
4056 | 4056 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4057 | 4057 | } |
4058 | 4058 | } |
4059 | - if ($sincedate != '') { |
|
4060 | - if ($globalDBdriver == 'mysql') { |
|
4059 | + if ($sincedate != '') { |
|
4060 | + if ($globalDBdriver == 'mysql') { |
|
4061 | 4061 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
4062 | 4062 | } else { |
4063 | 4063 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4112,25 +4112,25 @@ discard block |
||
4112 | 4112 | } |
4113 | 4113 | |
4114 | 4114 | /** |
4115 | - * Gets all pilots that have flown over |
|
4116 | - * |
|
4117 | - * @return Array the pilots list |
|
4118 | - * |
|
4119 | - */ |
|
4115 | + * Gets all pilots that have flown over |
|
4116 | + * |
|
4117 | + * @return Array the pilots list |
|
4118 | + * |
|
4119 | + */ |
|
4120 | 4120 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
4121 | 4121 | { |
4122 | 4122 | global $globalDBdriver; |
4123 | 4123 | $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 |
4124 | 4124 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
4125 | - if ($olderthanmonths > 0) { |
|
4126 | - if ($globalDBdriver == 'mysql') { |
|
4125 | + if ($olderthanmonths > 0) { |
|
4126 | + if ($globalDBdriver == 'mysql') { |
|
4127 | 4127 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4128 | 4128 | } else { |
4129 | 4129 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4130 | 4130 | } |
4131 | 4131 | } |
4132 | - if ($sincedate != '') { |
|
4133 | - if ($globalDBdriver == 'mysql') { |
|
4132 | + if ($sincedate != '') { |
|
4133 | + if ($globalDBdriver == 'mysql') { |
|
4134 | 4134 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4135 | 4135 | } else { |
4136 | 4136 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4159,26 +4159,26 @@ discard block |
||
4159 | 4159 | } |
4160 | 4160 | |
4161 | 4161 | /** |
4162 | - * Gets all owner that have flown over |
|
4163 | - * |
|
4164 | - * @return Array the pilots list |
|
4165 | - * |
|
4166 | - */ |
|
4162 | + * Gets all owner that have flown over |
|
4163 | + * |
|
4164 | + * @return Array the pilots list |
|
4165 | + * |
|
4166 | + */ |
|
4167 | 4167 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
4168 | 4168 | { |
4169 | 4169 | global $globalDBdriver; |
4170 | 4170 | $filter_query = $this->getFilter($filters,true,true); |
4171 | 4171 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4172 | 4172 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL"; |
4173 | - if ($olderthanmonths > 0) { |
|
4174 | - if ($globalDBdriver == 'mysql') { |
|
4173 | + if ($olderthanmonths > 0) { |
|
4174 | + if ($globalDBdriver == 'mysql') { |
|
4175 | 4175 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
4176 | 4176 | } else { |
4177 | 4177 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4178 | 4178 | } |
4179 | 4179 | } |
4180 | - if ($sincedate != '') { |
|
4181 | - if ($globalDBdriver == 'mysql') { |
|
4180 | + if ($sincedate != '') { |
|
4181 | + if ($globalDBdriver == 'mysql') { |
|
4182 | 4182 | $query .= " AND spotter_output.date > '".$sincedate."' "; |
4183 | 4183 | } else { |
4184 | 4184 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4229,26 +4229,26 @@ discard block |
||
4229 | 4229 | } |
4230 | 4230 | |
4231 | 4231 | /** |
4232 | - * Gets all owner that have flown over |
|
4233 | - * |
|
4234 | - * @return Array the pilots list |
|
4235 | - * |
|
4236 | - */ |
|
4232 | + * Gets all owner that have flown over |
|
4233 | + * |
|
4234 | + * @return Array the pilots list |
|
4235 | + * |
|
4236 | + */ |
|
4237 | 4237 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
4238 | 4238 | { |
4239 | 4239 | global $globalDBdriver; |
4240 | 4240 | $filter_query = $this->getFilter($filters,true,true); |
4241 | 4241 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4242 | 4242 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
4243 | - if ($olderthanmonths > 0) { |
|
4244 | - if ($globalDBdriver == 'mysql') { |
|
4243 | + if ($olderthanmonths > 0) { |
|
4244 | + if ($globalDBdriver == 'mysql') { |
|
4245 | 4245 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4246 | 4246 | } else { |
4247 | 4247 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4248 | 4248 | } |
4249 | 4249 | } |
4250 | - if ($sincedate != '') { |
|
4251 | - if ($globalDBdriver == 'mysql') { |
|
4250 | + if ($sincedate != '') { |
|
4251 | + if ($globalDBdriver == 'mysql') { |
|
4252 | 4252 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4253 | 4253 | } else { |
4254 | 4254 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4275,11 +4275,11 @@ discard block |
||
4275 | 4275 | } |
4276 | 4276 | |
4277 | 4277 | /** |
4278 | - * Gets all airlines that have flown over by aircraft |
|
4279 | - * |
|
4280 | - * @return Array the airline list |
|
4281 | - * |
|
4282 | - */ |
|
4278 | + * Gets all airlines that have flown over by aircraft |
|
4279 | + * |
|
4280 | + * @return Array the airline list |
|
4281 | + * |
|
4282 | + */ |
|
4283 | 4283 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
4284 | 4284 | { |
4285 | 4285 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4311,11 +4311,11 @@ discard block |
||
4311 | 4311 | |
4312 | 4312 | |
4313 | 4313 | /** |
4314 | - * Gets all airline countries that have flown over by aircraft |
|
4315 | - * |
|
4316 | - * @return Array the airline country list |
|
4317 | - * |
|
4318 | - */ |
|
4314 | + * Gets all airline countries that have flown over by aircraft |
|
4315 | + * |
|
4316 | + * @return Array the airline country list |
|
4317 | + * |
|
4318 | + */ |
|
4319 | 4319 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
4320 | 4320 | { |
4321 | 4321 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4347,11 +4347,11 @@ discard block |
||
4347 | 4347 | |
4348 | 4348 | |
4349 | 4349 | /** |
4350 | - * Gets all airlines that have flown over by airport |
|
4351 | - * |
|
4352 | - * @return Array the airline list |
|
4353 | - * |
|
4354 | - */ |
|
4350 | + * Gets all airlines that have flown over by airport |
|
4351 | + * |
|
4352 | + * @return Array the airline list |
|
4353 | + * |
|
4354 | + */ |
|
4355 | 4355 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
4356 | 4356 | { |
4357 | 4357 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4382,11 +4382,11 @@ discard block |
||
4382 | 4382 | |
4383 | 4383 | |
4384 | 4384 | /** |
4385 | - * Gets all airline countries that have flown over by airport icao |
|
4386 | - * |
|
4387 | - * @return Array the airline country list |
|
4388 | - * |
|
4389 | - */ |
|
4385 | + * Gets all airline countries that have flown over by airport icao |
|
4386 | + * |
|
4387 | + * @return Array the airline country list |
|
4388 | + * |
|
4389 | + */ |
|
4390 | 4390 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
4391 | 4391 | { |
4392 | 4392 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4416,11 +4416,11 @@ discard block |
||
4416 | 4416 | |
4417 | 4417 | |
4418 | 4418 | /** |
4419 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
4420 | - * |
|
4421 | - * @return Array the airline list |
|
4422 | - * |
|
4423 | - */ |
|
4419 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
4420 | + * |
|
4421 | + * @return Array the airline list |
|
4422 | + * |
|
4423 | + */ |
|
4424 | 4424 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
4425 | 4425 | { |
4426 | 4426 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4451,11 +4451,11 @@ discard block |
||
4451 | 4451 | |
4452 | 4452 | |
4453 | 4453 | /** |
4454 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
4455 | - * |
|
4456 | - * @return Array the airline country list |
|
4457 | - * |
|
4458 | - */ |
|
4454 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
4455 | + * |
|
4456 | + * @return Array the airline country list |
|
4457 | + * |
|
4458 | + */ |
|
4459 | 4459 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
4460 | 4460 | { |
4461 | 4461 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4484,11 +4484,11 @@ discard block |
||
4484 | 4484 | |
4485 | 4485 | |
4486 | 4486 | /** |
4487 | - * Gets all airlines that have flown over by date |
|
4488 | - * |
|
4489 | - * @return Array the airline list |
|
4490 | - * |
|
4491 | - */ |
|
4487 | + * Gets all airlines that have flown over by date |
|
4488 | + * |
|
4489 | + * @return Array the airline list |
|
4490 | + * |
|
4491 | + */ |
|
4492 | 4492 | public function countAllAirlinesByDate($date,$filters = array()) |
4493 | 4493 | { |
4494 | 4494 | global $globalTimezone, $globalDBdriver; |
@@ -4532,11 +4532,11 @@ discard block |
||
4532 | 4532 | |
4533 | 4533 | |
4534 | 4534 | /** |
4535 | - * Gets all airline countries that have flown over by date |
|
4536 | - * |
|
4537 | - * @return Array the airline country list |
|
4538 | - * |
|
4539 | - */ |
|
4535 | + * Gets all airline countries that have flown over by date |
|
4536 | + * |
|
4537 | + * @return Array the airline country list |
|
4538 | + * |
|
4539 | + */ |
|
4540 | 4540 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
4541 | 4541 | { |
4542 | 4542 | global $globalTimezone, $globalDBdriver; |
@@ -4579,11 +4579,11 @@ discard block |
||
4579 | 4579 | |
4580 | 4580 | |
4581 | 4581 | /** |
4582 | - * Gets all airlines that have flown over by ident/callsign |
|
4583 | - * |
|
4584 | - * @return Array the airline list |
|
4585 | - * |
|
4586 | - */ |
|
4582 | + * Gets all airlines that have flown over by ident/callsign |
|
4583 | + * |
|
4584 | + * @return Array the airline list |
|
4585 | + * |
|
4586 | + */ |
|
4587 | 4587 | public function countAllAirlinesByIdent($ident,$filters = array()) |
4588 | 4588 | { |
4589 | 4589 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4600,11 +4600,11 @@ discard block |
||
4600 | 4600 | } |
4601 | 4601 | |
4602 | 4602 | /** |
4603 | - * Gets all airlines by owner |
|
4604 | - * |
|
4605 | - * @return Array the airline list |
|
4606 | - * |
|
4607 | - */ |
|
4603 | + * Gets all airlines by owner |
|
4604 | + * |
|
4605 | + * @return Array the airline list |
|
4606 | + * |
|
4607 | + */ |
|
4608 | 4608 | public function countAllAirlinesByOwner($owner,$filters = array()) |
4609 | 4609 | { |
4610 | 4610 | $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
@@ -4621,11 +4621,11 @@ discard block |
||
4621 | 4621 | } |
4622 | 4622 | |
4623 | 4623 | /** |
4624 | - * Gets flight duration by owner |
|
4625 | - * |
|
4626 | - * @return String Duration of all flights |
|
4627 | - * |
|
4628 | - */ |
|
4624 | + * Gets flight duration by owner |
|
4625 | + * |
|
4626 | + * @return String Duration of all flights |
|
4627 | + * |
|
4628 | + */ |
|
4629 | 4629 | public function getFlightDurationByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
4630 | 4630 | { |
4631 | 4631 | global $globalDBdriver; |
@@ -4670,11 +4670,11 @@ discard block |
||
4670 | 4670 | } |
4671 | 4671 | |
4672 | 4672 | /** |
4673 | - * Count flights by owner |
|
4674 | - * |
|
4675 | - * @return String Duration of all flights |
|
4676 | - * |
|
4677 | - */ |
|
4673 | + * Count flights by owner |
|
4674 | + * |
|
4675 | + * @return String Duration of all flights |
|
4676 | + * |
|
4677 | + */ |
|
4678 | 4678 | public function countFlightsByOwner($owner,$filters = array()) |
4679 | 4679 | { |
4680 | 4680 | $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
@@ -4690,11 +4690,11 @@ discard block |
||
4690 | 4690 | } |
4691 | 4691 | |
4692 | 4692 | /** |
4693 | - * Count flights by pilot |
|
4694 | - * |
|
4695 | - * @return String Duration of all flights |
|
4696 | - * |
|
4697 | - */ |
|
4693 | + * Count flights by pilot |
|
4694 | + * |
|
4695 | + * @return String Duration of all flights |
|
4696 | + * |
|
4697 | + */ |
|
4698 | 4698 | public function countFlightsByPilot($pilot,$filters = array()) |
4699 | 4699 | { |
4700 | 4700 | $pilot = filter_var($pilot,FILTER_SANITIZE_STRING); |
@@ -4710,11 +4710,11 @@ discard block |
||
4710 | 4710 | } |
4711 | 4711 | |
4712 | 4712 | /** |
4713 | - * Gets flight duration by pilot |
|
4714 | - * |
|
4715 | - * @return String Duration of all flights |
|
4716 | - * |
|
4717 | - */ |
|
4713 | + * Gets flight duration by pilot |
|
4714 | + * |
|
4715 | + * @return String Duration of all flights |
|
4716 | + * |
|
4717 | + */ |
|
4718 | 4718 | public function getFlightDurationByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
4719 | 4719 | { |
4720 | 4720 | global $globalDBdriver; |
@@ -4759,11 +4759,11 @@ discard block |
||
4759 | 4759 | } |
4760 | 4760 | |
4761 | 4761 | /** |
4762 | - * Gets all airlines used by pilot |
|
4763 | - * |
|
4764 | - * @return Array the airline list |
|
4765 | - * |
|
4766 | - */ |
|
4762 | + * Gets all airlines used by pilot |
|
4763 | + * |
|
4764 | + * @return Array the airline list |
|
4765 | + * |
|
4766 | + */ |
|
4767 | 4767 | public function countAllAirlinesByPilot($pilot,$filters = array()) |
4768 | 4768 | { |
4769 | 4769 | $pilot = filter_var($pilot,FILTER_SANITIZE_STRING); |
@@ -4780,11 +4780,11 @@ discard block |
||
4780 | 4780 | } |
4781 | 4781 | |
4782 | 4782 | /** |
4783 | - * Gets all airlines that have flown over by route |
|
4784 | - * |
|
4785 | - * @return Array the airline list |
|
4786 | - * |
|
4787 | - */ |
|
4783 | + * Gets all airlines that have flown over by route |
|
4784 | + * |
|
4785 | + * @return Array the airline list |
|
4786 | + * |
|
4787 | + */ |
|
4788 | 4788 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
4789 | 4789 | { |
4790 | 4790 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4816,11 +4816,11 @@ discard block |
||
4816 | 4816 | } |
4817 | 4817 | |
4818 | 4818 | /** |
4819 | - * Gets all airline countries that have flown over by route |
|
4820 | - * |
|
4821 | - * @return Array the airline country list |
|
4822 | - * |
|
4823 | - */ |
|
4819 | + * Gets all airline countries that have flown over by route |
|
4820 | + * |
|
4821 | + * @return Array the airline country list |
|
4822 | + * |
|
4823 | + */ |
|
4824 | 4824 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
4825 | 4825 | { |
4826 | 4826 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4852,11 +4852,11 @@ discard block |
||
4852 | 4852 | |
4853 | 4853 | |
4854 | 4854 | /** |
4855 | - * Gets all airlines that have flown over by country |
|
4856 | - * |
|
4857 | - * @return Array the airline list |
|
4858 | - * |
|
4859 | - */ |
|
4855 | + * Gets all airlines that have flown over by country |
|
4856 | + * |
|
4857 | + * @return Array the airline list |
|
4858 | + * |
|
4859 | + */ |
|
4860 | 4860 | public function countAllAirlinesByCountry($country,$filters = array()) |
4861 | 4861 | { |
4862 | 4862 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4886,11 +4886,11 @@ discard block |
||
4886 | 4886 | |
4887 | 4887 | |
4888 | 4888 | /** |
4889 | - * Gets all airline countries that have flown over by country |
|
4890 | - * |
|
4891 | - * @return Array the airline country list |
|
4892 | - * |
|
4893 | - */ |
|
4889 | + * Gets all airline countries that have flown over by country |
|
4890 | + * |
|
4891 | + * @return Array the airline country list |
|
4892 | + * |
|
4893 | + */ |
|
4894 | 4894 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
4895 | 4895 | { |
4896 | 4896 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4919,11 +4919,11 @@ discard block |
||
4919 | 4919 | |
4920 | 4920 | |
4921 | 4921 | /** |
4922 | - * Gets all airlines countries |
|
4923 | - * |
|
4924 | - * @return Array the airline country list |
|
4925 | - * |
|
4926 | - */ |
|
4922 | + * Gets all airlines countries |
|
4923 | + * |
|
4924 | + * @return Array the airline country list |
|
4925 | + * |
|
4926 | + */ |
|
4927 | 4927 | public function countAllAirlineCountries($limit = true, $filters = array(), $year = '', $month = '', $day = '') |
4928 | 4928 | { |
4929 | 4929 | global $globalDBdriver; |
@@ -4978,11 +4978,11 @@ discard block |
||
4978 | 4978 | } |
4979 | 4979 | |
4980 | 4980 | /** |
4981 | - * Gets all number of flight over countries |
|
4982 | - * |
|
4983 | - * @return Array the airline country list |
|
4984 | - * |
|
4985 | - */ |
|
4981 | + * Gets all number of flight over countries |
|
4982 | + * |
|
4983 | + * @return Array the airline country list |
|
4984 | + * |
|
4985 | + */ |
|
4986 | 4986 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
4987 | 4987 | { |
4988 | 4988 | global $globalDBdriver; |
@@ -5004,15 +5004,15 @@ discard block |
||
5004 | 5004 | $SpotterLive = new SpotterLive(); |
5005 | 5005 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
5006 | 5006 | $filter_query .= ' over_country IS NOT NULL'; |
5007 | - if ($olderthanmonths > 0) { |
|
5007 | + if ($olderthanmonths > 0) { |
|
5008 | 5008 | if ($globalDBdriver == 'mysql') { |
5009 | 5009 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
5010 | 5010 | } else { |
5011 | 5011 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
5012 | 5012 | } |
5013 | 5013 | } |
5014 | - if ($sincedate != '') { |
|
5015 | - if ($globalDBdriver == 'mysql') { |
|
5014 | + if ($sincedate != '') { |
|
5015 | + if ($globalDBdriver == 'mysql') { |
|
5016 | 5016 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
5017 | 5017 | } else { |
5018 | 5018 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5042,11 +5042,11 @@ discard block |
||
5042 | 5042 | |
5043 | 5043 | |
5044 | 5044 | /** |
5045 | - * Gets all aircraft types that have flown over |
|
5046 | - * |
|
5047 | - * @return Array the aircraft list |
|
5048 | - * |
|
5049 | - */ |
|
5045 | + * Gets all aircraft types that have flown over |
|
5046 | + * |
|
5047 | + * @return Array the aircraft list |
|
5048 | + * |
|
5049 | + */ |
|
5050 | 5050 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
5051 | 5051 | { |
5052 | 5052 | global $globalDBdriver; |
@@ -5116,11 +5116,11 @@ discard block |
||
5116 | 5116 | } |
5117 | 5117 | |
5118 | 5118 | /** |
5119 | - * Gets all aircraft types that have flown over by airline |
|
5120 | - * |
|
5121 | - * @return Array the aircraft list |
|
5122 | - * |
|
5123 | - */ |
|
5119 | + * Gets all aircraft types that have flown over by airline |
|
5120 | + * |
|
5121 | + * @return Array the aircraft list |
|
5122 | + * |
|
5123 | + */ |
|
5124 | 5124 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '', $day = '') |
5125 | 5125 | { |
5126 | 5126 | global $globalDBdriver; |
@@ -5191,11 +5191,11 @@ discard block |
||
5191 | 5191 | } |
5192 | 5192 | |
5193 | 5193 | /** |
5194 | - * Gets all aircraft types that have flown over by months |
|
5195 | - * |
|
5196 | - * @return Array the aircraft list |
|
5197 | - * |
|
5198 | - */ |
|
5194 | + * Gets all aircraft types that have flown over by months |
|
5195 | + * |
|
5196 | + * @return Array the aircraft list |
|
5197 | + * |
|
5198 | + */ |
|
5199 | 5199 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
5200 | 5200 | { |
5201 | 5201 | global $globalDBdriver; |
@@ -5239,11 +5239,11 @@ discard block |
||
5239 | 5239 | |
5240 | 5240 | |
5241 | 5241 | /** |
5242 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
5243 | - * |
|
5244 | - * @return Array the aircraft list |
|
5245 | - * |
|
5246 | - */ |
|
5242 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
5243 | + * |
|
5244 | + * @return Array the aircraft list |
|
5245 | + * |
|
5246 | + */ |
|
5247 | 5247 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
5248 | 5248 | { |
5249 | 5249 | $Image = new Image($this->db); |
@@ -5282,11 +5282,11 @@ discard block |
||
5282 | 5282 | |
5283 | 5283 | |
5284 | 5284 | /** |
5285 | - * Gets all aircraft types that have flown over by airline icao |
|
5286 | - * |
|
5287 | - * @return Array the aircraft list |
|
5288 | - * |
|
5289 | - */ |
|
5285 | + * Gets all aircraft types that have flown over by airline icao |
|
5286 | + * |
|
5287 | + * @return Array the aircraft list |
|
5288 | + * |
|
5289 | + */ |
|
5290 | 5290 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
5291 | 5291 | { |
5292 | 5292 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5315,11 +5315,11 @@ discard block |
||
5315 | 5315 | |
5316 | 5316 | |
5317 | 5317 | /** |
5318 | - * Gets all aircraft registration that have flown over by airline icao |
|
5319 | - * |
|
5320 | - * @return Array the aircraft list |
|
5321 | - * |
|
5322 | - */ |
|
5318 | + * Gets all aircraft registration that have flown over by airline icao |
|
5319 | + * |
|
5320 | + * @return Array the aircraft list |
|
5321 | + * |
|
5322 | + */ |
|
5323 | 5323 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
5324 | 5324 | { |
5325 | 5325 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5357,11 +5357,11 @@ discard block |
||
5357 | 5357 | |
5358 | 5358 | |
5359 | 5359 | /** |
5360 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
5361 | - * |
|
5362 | - * @return Array the aircraft list |
|
5363 | - * |
|
5364 | - */ |
|
5360 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
5361 | + * |
|
5362 | + * @return Array the aircraft list |
|
5363 | + * |
|
5364 | + */ |
|
5365 | 5365 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
5366 | 5366 | { |
5367 | 5367 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5389,11 +5389,11 @@ discard block |
||
5389 | 5389 | |
5390 | 5390 | |
5391 | 5391 | /** |
5392 | - * Gets all aircraft types that have flown over by airline icao |
|
5393 | - * |
|
5394 | - * @return Array the aircraft list |
|
5395 | - * |
|
5396 | - */ |
|
5392 | + * Gets all aircraft types that have flown over by airline icao |
|
5393 | + * |
|
5394 | + * @return Array the aircraft list |
|
5395 | + * |
|
5396 | + */ |
|
5397 | 5397 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
5398 | 5398 | { |
5399 | 5399 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5422,11 +5422,11 @@ discard block |
||
5422 | 5422 | |
5423 | 5423 | |
5424 | 5424 | /** |
5425 | - * Gets all aircraft registration that have flown over by airport icao |
|
5426 | - * |
|
5427 | - * @return Array the aircraft list |
|
5428 | - * |
|
5429 | - */ |
|
5425 | + * Gets all aircraft registration that have flown over by airport icao |
|
5426 | + * |
|
5427 | + * @return Array the aircraft list |
|
5428 | + * |
|
5429 | + */ |
|
5430 | 5430 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
5431 | 5431 | { |
5432 | 5432 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5463,11 +5463,11 @@ discard block |
||
5463 | 5463 | |
5464 | 5464 | |
5465 | 5465 | /** |
5466 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
5467 | - * |
|
5468 | - * @return Array the aircraft list |
|
5469 | - * |
|
5470 | - */ |
|
5466 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
5467 | + * |
|
5468 | + * @return Array the aircraft list |
|
5469 | + * |
|
5470 | + */ |
|
5471 | 5471 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
5472 | 5472 | { |
5473 | 5473 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5493,11 +5493,11 @@ discard block |
||
5493 | 5493 | } |
5494 | 5494 | |
5495 | 5495 | /** |
5496 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5497 | - * |
|
5498 | - * @return Array the aircraft list |
|
5499 | - * |
|
5500 | - */ |
|
5496 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5497 | + * |
|
5498 | + * @return Array the aircraft list |
|
5499 | + * |
|
5500 | + */ |
|
5501 | 5501 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
5502 | 5502 | { |
5503 | 5503 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5524,11 +5524,11 @@ discard block |
||
5524 | 5524 | |
5525 | 5525 | |
5526 | 5526 | /** |
5527 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5528 | - * |
|
5529 | - * @return Array the aircraft list |
|
5530 | - * |
|
5531 | - */ |
|
5527 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5528 | + * |
|
5529 | + * @return Array the aircraft list |
|
5530 | + * |
|
5531 | + */ |
|
5532 | 5532 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
5533 | 5533 | { |
5534 | 5534 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5564,11 +5564,11 @@ discard block |
||
5564 | 5564 | } |
5565 | 5565 | |
5566 | 5566 | /** |
5567 | - * Gets all aircraft types that have flown over by date |
|
5568 | - * |
|
5569 | - * @return Array the aircraft list |
|
5570 | - * |
|
5571 | - */ |
|
5567 | + * Gets all aircraft types that have flown over by date |
|
5568 | + * |
|
5569 | + * @return Array the aircraft list |
|
5570 | + * |
|
5571 | + */ |
|
5572 | 5572 | public function countAllAircraftTypesByDate($date,$filters = array()) |
5573 | 5573 | { |
5574 | 5574 | global $globalTimezone, $globalDBdriver; |
@@ -5610,11 +5610,11 @@ discard block |
||
5610 | 5610 | |
5611 | 5611 | |
5612 | 5612 | /** |
5613 | - * Gets all aircraft registration that have flown over by date |
|
5614 | - * |
|
5615 | - * @return Array the aircraft list |
|
5616 | - * |
|
5617 | - */ |
|
5613 | + * Gets all aircraft registration that have flown over by date |
|
5614 | + * |
|
5615 | + * @return Array the aircraft list |
|
5616 | + * |
|
5617 | + */ |
|
5618 | 5618 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
5619 | 5619 | { |
5620 | 5620 | global $globalTimezone, $globalDBdriver; |
@@ -5665,11 +5665,11 @@ discard block |
||
5665 | 5665 | |
5666 | 5666 | |
5667 | 5667 | /** |
5668 | - * Gets all aircraft manufacturer that have flown over by date |
|
5669 | - * |
|
5670 | - * @return Array the aircraft manufacturer list |
|
5671 | - * |
|
5672 | - */ |
|
5668 | + * Gets all aircraft manufacturer that have flown over by date |
|
5669 | + * |
|
5670 | + * @return Array the aircraft manufacturer list |
|
5671 | + * |
|
5672 | + */ |
|
5673 | 5673 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
5674 | 5674 | { |
5675 | 5675 | global $globalTimezone, $globalDBdriver; |
@@ -5711,11 +5711,11 @@ discard block |
||
5711 | 5711 | |
5712 | 5712 | |
5713 | 5713 | /** |
5714 | - * Gets all aircraft types that have flown over by ident/callsign |
|
5715 | - * |
|
5716 | - * @return Array the aircraft list |
|
5717 | - * |
|
5718 | - */ |
|
5714 | + * Gets all aircraft types that have flown over by ident/callsign |
|
5715 | + * |
|
5716 | + * @return Array the aircraft list |
|
5717 | + * |
|
5718 | + */ |
|
5719 | 5719 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
5720 | 5720 | { |
5721 | 5721 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5743,11 +5743,11 @@ discard block |
||
5743 | 5743 | } |
5744 | 5744 | |
5745 | 5745 | /** |
5746 | - * Gets all aircraft types that have flown over by pilot |
|
5747 | - * |
|
5748 | - * @return Array the aircraft list |
|
5749 | - * |
|
5750 | - */ |
|
5746 | + * Gets all aircraft types that have flown over by pilot |
|
5747 | + * |
|
5748 | + * @return Array the aircraft list |
|
5749 | + * |
|
5750 | + */ |
|
5751 | 5751 | public function countAllAircraftTypesByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
5752 | 5752 | { |
5753 | 5753 | global $globalDBdriver; |
@@ -5793,11 +5793,11 @@ discard block |
||
5793 | 5793 | } |
5794 | 5794 | |
5795 | 5795 | /** |
5796 | - * Gets all aircraft types that have flown over by owner |
|
5797 | - * |
|
5798 | - * @return Array the aircraft list |
|
5799 | - * |
|
5800 | - */ |
|
5796 | + * Gets all aircraft types that have flown over by owner |
|
5797 | + * |
|
5798 | + * @return Array the aircraft list |
|
5799 | + * |
|
5800 | + */ |
|
5801 | 5801 | public function countAllAircraftTypesByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
5802 | 5802 | { |
5803 | 5803 | global $globalDBdriver; |
@@ -5842,11 +5842,11 @@ discard block |
||
5842 | 5842 | } |
5843 | 5843 | |
5844 | 5844 | /** |
5845 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
5846 | - * |
|
5847 | - * @return Array the aircraft list |
|
5848 | - * |
|
5849 | - */ |
|
5845 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
5846 | + * |
|
5847 | + * @return Array the aircraft list |
|
5848 | + * |
|
5849 | + */ |
|
5850 | 5850 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
5851 | 5851 | { |
5852 | 5852 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5885,11 +5885,11 @@ discard block |
||
5885 | 5885 | } |
5886 | 5886 | |
5887 | 5887 | /** |
5888 | - * Gets all aircraft registration that have flown over by owner |
|
5889 | - * |
|
5890 | - * @return Array the aircraft list |
|
5891 | - * |
|
5892 | - */ |
|
5888 | + * Gets all aircraft registration that have flown over by owner |
|
5889 | + * |
|
5890 | + * @return Array the aircraft list |
|
5891 | + * |
|
5892 | + */ |
|
5893 | 5893 | public function countAllAircraftRegistrationByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
5894 | 5894 | { |
5895 | 5895 | global $globalDBdriver; |
@@ -5960,11 +5960,11 @@ discard block |
||
5960 | 5960 | } |
5961 | 5961 | |
5962 | 5962 | /** |
5963 | - * Gets all aircraft registration that have flown over by pilot |
|
5964 | - * |
|
5965 | - * @return Array the aircraft list |
|
5966 | - * |
|
5967 | - */ |
|
5963 | + * Gets all aircraft registration that have flown over by pilot |
|
5964 | + * |
|
5965 | + * @return Array the aircraft list |
|
5966 | + * |
|
5967 | + */ |
|
5968 | 5968 | public function countAllAircraftRegistrationByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
5969 | 5969 | { |
5970 | 5970 | global $globalDBdriver; |
@@ -6036,11 +6036,11 @@ discard block |
||
6036 | 6036 | |
6037 | 6037 | |
6038 | 6038 | /** |
6039 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
6040 | - * |
|
6041 | - * @return Array the aircraft manufacturer list |
|
6042 | - * |
|
6043 | - */ |
|
6039 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
6040 | + * |
|
6041 | + * @return Array the aircraft manufacturer list |
|
6042 | + * |
|
6043 | + */ |
|
6044 | 6044 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
6045 | 6045 | { |
6046 | 6046 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6065,11 +6065,11 @@ discard block |
||
6065 | 6065 | } |
6066 | 6066 | |
6067 | 6067 | /** |
6068 | - * Gets all aircraft manufacturer that have flown over by owner |
|
6069 | - * |
|
6070 | - * @return Array the aircraft manufacturer list |
|
6071 | - * |
|
6072 | - */ |
|
6068 | + * Gets all aircraft manufacturer that have flown over by owner |
|
6069 | + * |
|
6070 | + * @return Array the aircraft manufacturer list |
|
6071 | + * |
|
6072 | + */ |
|
6073 | 6073 | public function countAllAircraftManufacturerByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
6074 | 6074 | { |
6075 | 6075 | global $globalDBdriver; |
@@ -6117,11 +6117,11 @@ discard block |
||
6117 | 6117 | } |
6118 | 6118 | |
6119 | 6119 | /** |
6120 | - * Gets all aircraft manufacturer that have flown over by pilot |
|
6121 | - * |
|
6122 | - * @return Array the aircraft manufacturer list |
|
6123 | - * |
|
6124 | - */ |
|
6120 | + * Gets all aircraft manufacturer that have flown over by pilot |
|
6121 | + * |
|
6122 | + * @return Array the aircraft manufacturer list |
|
6123 | + * |
|
6124 | + */ |
|
6125 | 6125 | public function countAllAircraftManufacturerByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
6126 | 6126 | { |
6127 | 6127 | global $globalDBdriver; |
@@ -6170,11 +6170,11 @@ discard block |
||
6170 | 6170 | |
6171 | 6171 | |
6172 | 6172 | /** |
6173 | - * Gets all aircraft types that have flown over by route |
|
6174 | - * |
|
6175 | - * @return Array the aircraft list |
|
6176 | - * |
|
6177 | - */ |
|
6173 | + * Gets all aircraft types that have flown over by route |
|
6174 | + * |
|
6175 | + * @return Array the aircraft list |
|
6176 | + * |
|
6177 | + */ |
|
6178 | 6178 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6179 | 6179 | { |
6180 | 6180 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6203,11 +6203,11 @@ discard block |
||
6203 | 6203 | } |
6204 | 6204 | |
6205 | 6205 | /** |
6206 | - * Gets all aircraft registration that have flown over by route |
|
6207 | - * |
|
6208 | - * @return Array the aircraft list |
|
6209 | - * |
|
6210 | - */ |
|
6206 | + * Gets all aircraft registration that have flown over by route |
|
6207 | + * |
|
6208 | + * @return Array the aircraft list |
|
6209 | + * |
|
6210 | + */ |
|
6211 | 6211 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6212 | 6212 | { |
6213 | 6213 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6249,11 +6249,11 @@ discard block |
||
6249 | 6249 | |
6250 | 6250 | |
6251 | 6251 | /** |
6252 | - * Gets all aircraft manufacturer that have flown over by route |
|
6253 | - * |
|
6254 | - * @return Array the aircraft manufacturer list |
|
6255 | - * |
|
6256 | - */ |
|
6252 | + * Gets all aircraft manufacturer that have flown over by route |
|
6253 | + * |
|
6254 | + * @return Array the aircraft manufacturer list |
|
6255 | + * |
|
6256 | + */ |
|
6257 | 6257 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6258 | 6258 | { |
6259 | 6259 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6287,11 +6287,11 @@ discard block |
||
6287 | 6287 | |
6288 | 6288 | |
6289 | 6289 | /** |
6290 | - * Gets all aircraft types that have flown over by country |
|
6291 | - * |
|
6292 | - * @return Array the aircraft list |
|
6293 | - * |
|
6294 | - */ |
|
6290 | + * Gets all aircraft types that have flown over by country |
|
6291 | + * |
|
6292 | + * @return Array the aircraft list |
|
6293 | + * |
|
6294 | + */ |
|
6295 | 6295 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
6296 | 6296 | { |
6297 | 6297 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6322,11 +6322,11 @@ discard block |
||
6322 | 6322 | |
6323 | 6323 | |
6324 | 6324 | /** |
6325 | - * Gets all aircraft registration that have flown over by country |
|
6326 | - * |
|
6327 | - * @return Array the aircraft list |
|
6328 | - * |
|
6329 | - */ |
|
6325 | + * Gets all aircraft registration that have flown over by country |
|
6326 | + * |
|
6327 | + * @return Array the aircraft list |
|
6328 | + * |
|
6329 | + */ |
|
6330 | 6330 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
6331 | 6331 | { |
6332 | 6332 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6366,11 +6366,11 @@ discard block |
||
6366 | 6366 | |
6367 | 6367 | |
6368 | 6368 | /** |
6369 | - * Gets all aircraft manufacturer that have flown over by country |
|
6370 | - * |
|
6371 | - * @return Array the aircraft manufacturer list |
|
6372 | - * |
|
6373 | - */ |
|
6369 | + * Gets all aircraft manufacturer that have flown over by country |
|
6370 | + * |
|
6371 | + * @return Array the aircraft manufacturer list |
|
6372 | + * |
|
6373 | + */ |
|
6374 | 6374 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
6375 | 6375 | { |
6376 | 6376 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6401,18 +6401,18 @@ discard block |
||
6401 | 6401 | |
6402 | 6402 | |
6403 | 6403 | /** |
6404 | - * Gets all aircraft manufacturers that have flown over |
|
6405 | - * |
|
6406 | - * @return Array the aircraft list |
|
6407 | - * |
|
6408 | - */ |
|
6404 | + * Gets all aircraft manufacturers that have flown over |
|
6405 | + * |
|
6406 | + * @return Array the aircraft list |
|
6407 | + * |
|
6408 | + */ |
|
6409 | 6409 | public function countAllAircraftManufacturers($filters = array(),$year = '',$month = '',$day = '') |
6410 | 6410 | { |
6411 | 6411 | global $globalDBdriver; |
6412 | 6412 | $filter_query = $this->getFilter($filters,true,true); |
6413 | 6413 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
6414 | 6414 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
6415 | - $query_values = array(); |
|
6415 | + $query_values = array(); |
|
6416 | 6416 | if ($year != '') { |
6417 | 6417 | if ($globalDBdriver == 'mysql') { |
6418 | 6418 | $query .= " AND YEAR(spotter_output.date) = :year"; |
@@ -6465,11 +6465,11 @@ discard block |
||
6465 | 6465 | |
6466 | 6466 | |
6467 | 6467 | /** |
6468 | - * Gets all aircraft registrations that have flown over |
|
6469 | - * |
|
6470 | - * @return Array the aircraft list |
|
6471 | - * |
|
6472 | - */ |
|
6468 | + * Gets all aircraft registrations that have flown over |
|
6469 | + * |
|
6470 | + * @return Array the aircraft list |
|
6471 | + * |
|
6472 | + */ |
|
6473 | 6473 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
6474 | 6474 | { |
6475 | 6475 | global $globalDBdriver; |
@@ -6477,15 +6477,15 @@ discard block |
||
6477 | 6477 | $filter_query = $this->getFilter($filters,true,true); |
6478 | 6478 | $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 |
6479 | 6479 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
6480 | - if ($olderthanmonths > 0) { |
|
6481 | - if ($globalDBdriver == 'mysql') { |
|
6480 | + if ($olderthanmonths > 0) { |
|
6481 | + if ($globalDBdriver == 'mysql') { |
|
6482 | 6482 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6483 | 6483 | } else { |
6484 | 6484 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6485 | 6485 | } |
6486 | 6486 | } |
6487 | - if ($sincedate != '') { |
|
6488 | - if ($globalDBdriver == 'mysql') { |
|
6487 | + if ($sincedate != '') { |
|
6488 | + if ($globalDBdriver == 'mysql') { |
|
6489 | 6489 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6490 | 6490 | } else { |
6491 | 6491 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6550,11 +6550,11 @@ discard block |
||
6550 | 6550 | |
6551 | 6551 | |
6552 | 6552 | /** |
6553 | - * Gets all aircraft registrations that have flown over |
|
6554 | - * |
|
6555 | - * @return Array the aircraft list |
|
6556 | - * |
|
6557 | - */ |
|
6553 | + * Gets all aircraft registrations that have flown over |
|
6554 | + * |
|
6555 | + * @return Array the aircraft list |
|
6556 | + * |
|
6557 | + */ |
|
6558 | 6558 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
6559 | 6559 | { |
6560 | 6560 | global $globalDBdriver; |
@@ -6562,15 +6562,15 @@ discard block |
||
6562 | 6562 | $Image = new Image($this->db); |
6563 | 6563 | $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 |
6564 | 6564 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
6565 | - if ($olderthanmonths > 0) { |
|
6566 | - if ($globalDBdriver == 'mysql') { |
|
6565 | + if ($olderthanmonths > 0) { |
|
6566 | + if ($globalDBdriver == 'mysql') { |
|
6567 | 6567 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6568 | 6568 | } else { |
6569 | 6569 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6570 | 6570 | } |
6571 | 6571 | } |
6572 | - if ($sincedate != '') { |
|
6573 | - if ($globalDBdriver == 'mysql') { |
|
6572 | + if ($sincedate != '') { |
|
6573 | + if ($globalDBdriver == 'mysql') { |
|
6574 | 6574 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6575 | 6575 | } else { |
6576 | 6576 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6579,7 +6579,7 @@ discard block |
||
6579 | 6579 | |
6580 | 6580 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
6581 | 6581 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
6582 | - $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"; |
|
6582 | + $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"; |
|
6583 | 6583 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6584 | 6584 | |
6585 | 6585 | $sth = $this->db->prepare($query); |
@@ -6611,26 +6611,26 @@ discard block |
||
6611 | 6611 | |
6612 | 6612 | |
6613 | 6613 | /** |
6614 | - * Gets all departure airports of the airplanes that have flown over |
|
6615 | - * |
|
6616 | - * @return Array the airport list |
|
6617 | - * |
|
6618 | - */ |
|
6614 | + * Gets all departure airports of the airplanes that have flown over |
|
6615 | + * |
|
6616 | + * @return Array the airport list |
|
6617 | + * |
|
6618 | + */ |
|
6619 | 6619 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6620 | 6620 | { |
6621 | 6621 | global $globalDBdriver; |
6622 | 6622 | $filter_query = $this->getFilter($filters,true,true); |
6623 | 6623 | $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 |
6624 | 6624 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
6625 | - if ($olderthanmonths > 0) { |
|
6626 | - if ($globalDBdriver == 'mysql') { |
|
6625 | + if ($olderthanmonths > 0) { |
|
6626 | + if ($globalDBdriver == 'mysql') { |
|
6627 | 6627 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6628 | 6628 | } else { |
6629 | 6629 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6630 | 6630 | } |
6631 | - } |
|
6632 | - if ($sincedate != '') { |
|
6633 | - if ($globalDBdriver == 'mysql') { |
|
6631 | + } |
|
6632 | + if ($sincedate != '') { |
|
6633 | + if ($globalDBdriver == 'mysql') { |
|
6634 | 6634 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6635 | 6635 | } else { |
6636 | 6636 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6664,7 +6664,7 @@ discard block |
||
6664 | 6664 | $query_values = array_merge($query_values,array(':day' => $day)); |
6665 | 6665 | } |
6666 | 6666 | } |
6667 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
6667 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
6668 | 6668 | ORDER BY airport_departure_icao_count DESC"; |
6669 | 6669 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6670 | 6670 | |
@@ -6687,35 +6687,35 @@ discard block |
||
6687 | 6687 | } |
6688 | 6688 | |
6689 | 6689 | /** |
6690 | - * Gets all departure airports of the airplanes that have flown over |
|
6691 | - * |
|
6692 | - * @return Array the airport list |
|
6693 | - * |
|
6694 | - */ |
|
6690 | + * Gets all departure airports of the airplanes that have flown over |
|
6691 | + * |
|
6692 | + * @return Array the airport list |
|
6693 | + * |
|
6694 | + */ |
|
6695 | 6695 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6696 | 6696 | { |
6697 | 6697 | global $globalDBdriver; |
6698 | 6698 | $filter_query = $this->getFilter($filters,true,true); |
6699 | 6699 | $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 |
6700 | 6700 | 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 <> '' "; |
6701 | - if ($olderthanmonths > 0) { |
|
6702 | - if ($globalDBdriver == 'mysql') { |
|
6701 | + if ($olderthanmonths > 0) { |
|
6702 | + if ($globalDBdriver == 'mysql') { |
|
6703 | 6703 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6704 | 6704 | } else { |
6705 | 6705 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6706 | 6706 | } |
6707 | - } |
|
6708 | - if ($sincedate != '') { |
|
6709 | - if ($globalDBdriver == 'mysql') { |
|
6707 | + } |
|
6708 | + if ($sincedate != '') { |
|
6709 | + if ($globalDBdriver == 'mysql') { |
|
6710 | 6710 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6711 | 6711 | } else { |
6712 | 6712 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6713 | 6713 | } |
6714 | 6714 | } |
6715 | 6715 | |
6716 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6717 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6718 | - $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 |
|
6716 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6717 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6718 | + $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 |
|
6719 | 6719 | ORDER BY airport_departure_icao_count DESC"; |
6720 | 6720 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6721 | 6721 | |
@@ -6740,26 +6740,26 @@ discard block |
||
6740 | 6740 | } |
6741 | 6741 | |
6742 | 6742 | /** |
6743 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6744 | - * |
|
6745 | - * @return Array the airport list |
|
6746 | - * |
|
6747 | - */ |
|
6743 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6744 | + * |
|
6745 | + * @return Array the airport list |
|
6746 | + * |
|
6747 | + */ |
|
6748 | 6748 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6749 | 6749 | { |
6750 | 6750 | global $globalDBdriver; |
6751 | 6751 | $filter_query = $this->getFilter($filters,true,true); |
6752 | 6752 | $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 |
6753 | 6753 | 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"; |
6754 | - if ($olderthanmonths > 0) { |
|
6755 | - if ($globalDBdriver == 'mysql') { |
|
6754 | + if ($olderthanmonths > 0) { |
|
6755 | + if ($globalDBdriver == 'mysql') { |
|
6756 | 6756 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6757 | 6757 | } else { |
6758 | 6758 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6759 | 6759 | } |
6760 | - } |
|
6761 | - if ($sincedate != '') { |
|
6762 | - if ($globalDBdriver == 'mysql') { |
|
6760 | + } |
|
6761 | + if ($sincedate != '') { |
|
6762 | + if ($globalDBdriver == 'mysql') { |
|
6763 | 6763 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6764 | 6764 | } else { |
6765 | 6765 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6793,10 +6793,10 @@ discard block |
||
6793 | 6793 | $query_values = array_merge($query_values,array(':day' => $day)); |
6794 | 6794 | } |
6795 | 6795 | } |
6796 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6796 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6797 | 6797 | ORDER BY airport_departure_icao_count DESC"; |
6798 | 6798 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6799 | - //echo $query; |
|
6799 | + //echo $query; |
|
6800 | 6800 | $sth = $this->db->prepare($query); |
6801 | 6801 | $sth->execute($query_values); |
6802 | 6802 | |
@@ -6817,35 +6817,35 @@ discard block |
||
6817 | 6817 | } |
6818 | 6818 | |
6819 | 6819 | /** |
6820 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6821 | - * |
|
6822 | - * @return Array the airport list |
|
6823 | - * |
|
6824 | - */ |
|
6820 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6821 | + * |
|
6822 | + * @return Array the airport list |
|
6823 | + * |
|
6824 | + */ |
|
6825 | 6825 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6826 | 6826 | { |
6827 | 6827 | global $globalDBdriver; |
6828 | 6828 | $filter_query = $this->getFilter($filters,true,true); |
6829 | 6829 | $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 |
6830 | 6830 | 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 "; |
6831 | - if ($olderthanmonths > 0) { |
|
6832 | - if ($globalDBdriver == 'mysql') { |
|
6831 | + if ($olderthanmonths > 0) { |
|
6832 | + if ($globalDBdriver == 'mysql') { |
|
6833 | 6833 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6834 | 6834 | } else { |
6835 | 6835 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6836 | 6836 | } |
6837 | - } |
|
6838 | - if ($sincedate != '') { |
|
6839 | - if ($globalDBdriver == 'mysql') { |
|
6837 | + } |
|
6838 | + if ($sincedate != '') { |
|
6839 | + if ($globalDBdriver == 'mysql') { |
|
6840 | 6840 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6841 | 6841 | } else { |
6842 | 6842 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
6843 | 6843 | } |
6844 | 6844 | } |
6845 | 6845 | |
6846 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6847 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6848 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6846 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6847 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6848 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6849 | 6849 | ORDER BY airport_departure_icao_count DESC"; |
6850 | 6850 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6851 | 6851 | |
@@ -6870,11 +6870,11 @@ discard block |
||
6870 | 6870 | } |
6871 | 6871 | |
6872 | 6872 | /** |
6873 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6874 | - * |
|
6875 | - * @return Array the airport list |
|
6876 | - * |
|
6877 | - */ |
|
6873 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6874 | + * |
|
6875 | + * @return Array the airport list |
|
6876 | + * |
|
6877 | + */ |
|
6878 | 6878 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
6879 | 6879 | { |
6880 | 6880 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6908,11 +6908,11 @@ discard block |
||
6908 | 6908 | |
6909 | 6909 | |
6910 | 6910 | /** |
6911 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6912 | - * |
|
6913 | - * @return Array the airport list |
|
6914 | - * |
|
6915 | - */ |
|
6911 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6912 | + * |
|
6913 | + * @return Array the airport list |
|
6914 | + * |
|
6915 | + */ |
|
6916 | 6916 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
6917 | 6917 | { |
6918 | 6918 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6943,11 +6943,11 @@ discard block |
||
6943 | 6943 | |
6944 | 6944 | |
6945 | 6945 | /** |
6946 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6947 | - * |
|
6948 | - * @return Array the airport list |
|
6949 | - * |
|
6950 | - */ |
|
6946 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6947 | + * |
|
6948 | + * @return Array the airport list |
|
6949 | + * |
|
6950 | + */ |
|
6951 | 6951 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
6952 | 6952 | { |
6953 | 6953 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6980,11 +6980,11 @@ discard block |
||
6980 | 6980 | |
6981 | 6981 | |
6982 | 6982 | /** |
6983 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6984 | - * |
|
6985 | - * @return Array the airport list |
|
6986 | - * |
|
6987 | - */ |
|
6983 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6984 | + * |
|
6985 | + * @return Array the airport list |
|
6986 | + * |
|
6987 | + */ |
|
6988 | 6988 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
6989 | 6989 | { |
6990 | 6990 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7014,11 +7014,11 @@ discard block |
||
7014 | 7014 | |
7015 | 7015 | |
7016 | 7016 | /** |
7017 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
7018 | - * |
|
7019 | - * @return Array the airport list |
|
7020 | - * |
|
7021 | - */ |
|
7017 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
7018 | + * |
|
7019 | + * @return Array the airport list |
|
7020 | + * |
|
7021 | + */ |
|
7022 | 7022 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
7023 | 7023 | { |
7024 | 7024 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7051,11 +7051,11 @@ discard block |
||
7051 | 7051 | |
7052 | 7052 | |
7053 | 7053 | /** |
7054 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
7055 | - * |
|
7056 | - * @return Array the airport list |
|
7057 | - * |
|
7058 | - */ |
|
7054 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
7055 | + * |
|
7056 | + * @return Array the airport list |
|
7057 | + * |
|
7058 | + */ |
|
7059 | 7059 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
7060 | 7060 | { |
7061 | 7061 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7085,11 +7085,11 @@ discard block |
||
7085 | 7085 | |
7086 | 7086 | |
7087 | 7087 | /** |
7088 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
7089 | - * |
|
7090 | - * @return Array the airport list |
|
7091 | - * |
|
7092 | - */ |
|
7088 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
7089 | + * |
|
7090 | + * @return Array the airport list |
|
7091 | + * |
|
7092 | + */ |
|
7093 | 7093 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
7094 | 7094 | { |
7095 | 7095 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7122,11 +7122,11 @@ discard block |
||
7122 | 7122 | |
7123 | 7123 | |
7124 | 7124 | /** |
7125 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
7126 | - * |
|
7127 | - * @return Array the airport list |
|
7128 | - * |
|
7129 | - */ |
|
7125 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
7126 | + * |
|
7127 | + * @return Array the airport list |
|
7128 | + * |
|
7129 | + */ |
|
7130 | 7130 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
7131 | 7131 | { |
7132 | 7132 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7157,11 +7157,11 @@ discard block |
||
7157 | 7157 | |
7158 | 7158 | |
7159 | 7159 | /** |
7160 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
7161 | - * |
|
7162 | - * @return Array the airport list |
|
7163 | - * |
|
7164 | - */ |
|
7160 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
7161 | + * |
|
7162 | + * @return Array the airport list |
|
7163 | + * |
|
7164 | + */ |
|
7165 | 7165 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
7166 | 7166 | { |
7167 | 7167 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7194,11 +7194,11 @@ discard block |
||
7194 | 7194 | |
7195 | 7195 | |
7196 | 7196 | /** |
7197 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
7198 | - * |
|
7199 | - * @return Array the airport list |
|
7200 | - * |
|
7201 | - */ |
|
7197 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
7198 | + * |
|
7199 | + * @return Array the airport list |
|
7200 | + * |
|
7201 | + */ |
|
7202 | 7202 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
7203 | 7203 | { |
7204 | 7204 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7228,11 +7228,11 @@ discard block |
||
7228 | 7228 | |
7229 | 7229 | |
7230 | 7230 | /** |
7231 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
7232 | - * |
|
7233 | - * @return Array the airport list |
|
7234 | - * |
|
7235 | - */ |
|
7231 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
7232 | + * |
|
7233 | + * @return Array the airport list |
|
7234 | + * |
|
7235 | + */ |
|
7236 | 7236 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
7237 | 7237 | { |
7238 | 7238 | global $globalTimezone, $globalDBdriver; |
@@ -7278,11 +7278,11 @@ discard block |
||
7278 | 7278 | |
7279 | 7279 | |
7280 | 7280 | /** |
7281 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
7282 | - * |
|
7283 | - * @return Array the airport list |
|
7284 | - * |
|
7285 | - */ |
|
7281 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
7282 | + * |
|
7283 | + * @return Array the airport list |
|
7284 | + * |
|
7285 | + */ |
|
7286 | 7286 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
7287 | 7287 | { |
7288 | 7288 | global $globalTimezone, $globalDBdriver; |
@@ -7325,11 +7325,11 @@ discard block |
||
7325 | 7325 | |
7326 | 7326 | |
7327 | 7327 | /** |
7328 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
7329 | - * |
|
7330 | - * @return Array the airport list |
|
7331 | - * |
|
7332 | - */ |
|
7328 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
7329 | + * |
|
7330 | + * @return Array the airport list |
|
7331 | + * |
|
7332 | + */ |
|
7333 | 7333 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
7334 | 7334 | { |
7335 | 7335 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7361,11 +7361,11 @@ discard block |
||
7361 | 7361 | } |
7362 | 7362 | |
7363 | 7363 | /** |
7364 | - * Gets all departure airports of the airplanes that have flown over based on a owner |
|
7365 | - * |
|
7366 | - * @return Array the airport list |
|
7367 | - * |
|
7368 | - */ |
|
7364 | + * Gets all departure airports of the airplanes that have flown over based on a owner |
|
7365 | + * |
|
7366 | + * @return Array the airport list |
|
7367 | + * |
|
7368 | + */ |
|
7369 | 7369 | public function countAllDepartureAirportsByOwner($owner,$filters = array()) |
7370 | 7370 | { |
7371 | 7371 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7397,11 +7397,11 @@ discard block |
||
7397 | 7397 | } |
7398 | 7398 | |
7399 | 7399 | /** |
7400 | - * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7401 | - * |
|
7402 | - * @return Array the airport list |
|
7403 | - * |
|
7404 | - */ |
|
7400 | + * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7401 | + * |
|
7402 | + * @return Array the airport list |
|
7403 | + * |
|
7404 | + */ |
|
7405 | 7405 | public function countAllDepartureAirportsByPilot($pilot,$filters = array()) |
7406 | 7406 | { |
7407 | 7407 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7434,11 +7434,11 @@ discard block |
||
7434 | 7434 | |
7435 | 7435 | |
7436 | 7436 | /** |
7437 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7438 | - * |
|
7439 | - * @return Array the airport list |
|
7440 | - * |
|
7441 | - */ |
|
7437 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7438 | + * |
|
7439 | + * @return Array the airport list |
|
7440 | + * |
|
7441 | + */ |
|
7442 | 7442 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
7443 | 7443 | { |
7444 | 7444 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7467,11 +7467,11 @@ discard block |
||
7467 | 7467 | } |
7468 | 7468 | |
7469 | 7469 | /** |
7470 | - * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7471 | - * |
|
7472 | - * @return Array the airport list |
|
7473 | - * |
|
7474 | - */ |
|
7470 | + * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7471 | + * |
|
7472 | + * @return Array the airport list |
|
7473 | + * |
|
7474 | + */ |
|
7475 | 7475 | public function countAllDepartureAirportCountriesByOwner($owner,$filters = array()) |
7476 | 7476 | { |
7477 | 7477 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7487,11 +7487,11 @@ discard block |
||
7487 | 7487 | } |
7488 | 7488 | |
7489 | 7489 | /** |
7490 | - * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7491 | - * |
|
7492 | - * @return Array the airport list |
|
7493 | - * |
|
7494 | - */ |
|
7490 | + * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7491 | + * |
|
7492 | + * @return Array the airport list |
|
7493 | + * |
|
7494 | + */ |
|
7495 | 7495 | public function countAllDepartureAirportCountriesByPilot($pilot,$filters = array()) |
7496 | 7496 | { |
7497 | 7497 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7509,11 +7509,11 @@ discard block |
||
7509 | 7509 | |
7510 | 7510 | |
7511 | 7511 | /** |
7512 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
7513 | - * |
|
7514 | - * @return Array the airport list |
|
7515 | - * |
|
7516 | - */ |
|
7512 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
7513 | + * |
|
7514 | + * @return Array the airport list |
|
7515 | + * |
|
7516 | + */ |
|
7517 | 7517 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
7518 | 7518 | { |
7519 | 7519 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7547,11 +7547,11 @@ discard block |
||
7547 | 7547 | |
7548 | 7548 | |
7549 | 7549 | /** |
7550 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7551 | - * |
|
7552 | - * @return Array the airport list |
|
7553 | - * |
|
7554 | - */ |
|
7550 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7551 | + * |
|
7552 | + * @return Array the airport list |
|
7553 | + * |
|
7554 | + */ |
|
7555 | 7555 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
7556 | 7556 | { |
7557 | 7557 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7581,31 +7581,31 @@ discard block |
||
7581 | 7581 | |
7582 | 7582 | |
7583 | 7583 | /** |
7584 | - * Gets all arrival airports of the airplanes that have flown over |
|
7585 | - * |
|
7586 | - * @param Boolean $limit Limit result to 10 or not |
|
7587 | - * @param Integer $olderthanmonths Only show result older than x months |
|
7588 | - * @param String $sincedate Only show result since x date |
|
7589 | - * @param Boolean $icaoaskey Show result by ICAO |
|
7590 | - * @param Array $filters Filter used here |
|
7591 | - * @return Array the airport list |
|
7592 | - * |
|
7593 | - */ |
|
7584 | + * Gets all arrival airports of the airplanes that have flown over |
|
7585 | + * |
|
7586 | + * @param Boolean $limit Limit result to 10 or not |
|
7587 | + * @param Integer $olderthanmonths Only show result older than x months |
|
7588 | + * @param String $sincedate Only show result since x date |
|
7589 | + * @param Boolean $icaoaskey Show result by ICAO |
|
7590 | + * @param Array $filters Filter used here |
|
7591 | + * @return Array the airport list |
|
7592 | + * |
|
7593 | + */ |
|
7594 | 7594 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7595 | 7595 | { |
7596 | 7596 | global $globalDBdriver; |
7597 | 7597 | $filter_query = $this->getFilter($filters,true,true); |
7598 | 7598 | $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 |
7599 | 7599 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
7600 | - if ($olderthanmonths > 0) { |
|
7601 | - if ($globalDBdriver == 'mysql') { |
|
7600 | + if ($olderthanmonths > 0) { |
|
7601 | + if ($globalDBdriver == 'mysql') { |
|
7602 | 7602 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7603 | 7603 | } else { |
7604 | 7604 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7605 | 7605 | } |
7606 | 7606 | } |
7607 | - if ($sincedate != '') { |
|
7608 | - if ($globalDBdriver == 'mysql') { |
|
7607 | + if ($sincedate != '') { |
|
7608 | + if ($globalDBdriver == 'mysql') { |
|
7609 | 7609 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7610 | 7610 | } else { |
7611 | 7611 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7639,7 +7639,7 @@ discard block |
||
7639 | 7639 | $query_values = array_merge($query_values,array(':day' => $day)); |
7640 | 7640 | } |
7641 | 7641 | } |
7642 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
7642 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
7643 | 7643 | ORDER BY airport_arrival_icao_count DESC"; |
7644 | 7644 | if ($limit) $query .= " LIMIT 10"; |
7645 | 7645 | |
@@ -7668,35 +7668,35 @@ discard block |
||
7668 | 7668 | } |
7669 | 7669 | |
7670 | 7670 | /** |
7671 | - * Gets all arrival airports of the airplanes that have flown over |
|
7672 | - * |
|
7673 | - * @return Array the airport list |
|
7674 | - * |
|
7675 | - */ |
|
7671 | + * Gets all arrival airports of the airplanes that have flown over |
|
7672 | + * |
|
7673 | + * @return Array the airport list |
|
7674 | + * |
|
7675 | + */ |
|
7676 | 7676 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
7677 | 7677 | { |
7678 | 7678 | global $globalDBdriver; |
7679 | 7679 | $filter_query = $this->getFilter($filters,true,true); |
7680 | 7680 | $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 |
7681 | 7681 | 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 <> '' "; |
7682 | - if ($olderthanmonths > 0) { |
|
7683 | - if ($globalDBdriver == 'mysql') { |
|
7682 | + if ($olderthanmonths > 0) { |
|
7683 | + if ($globalDBdriver == 'mysql') { |
|
7684 | 7684 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7685 | 7685 | } else { |
7686 | 7686 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7687 | 7687 | } |
7688 | 7688 | } |
7689 | - if ($sincedate != '') { |
|
7690 | - if ($globalDBdriver == 'mysql') { |
|
7689 | + if ($sincedate != '') { |
|
7690 | + if ($globalDBdriver == 'mysql') { |
|
7691 | 7691 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7692 | 7692 | } else { |
7693 | 7693 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7694 | 7694 | } |
7695 | 7695 | } |
7696 | 7696 | |
7697 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7698 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7699 | - $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 |
|
7697 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7698 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7699 | + $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 |
|
7700 | 7700 | ORDER BY airport_arrival_icao_count DESC"; |
7701 | 7701 | if ($limit) $query .= " LIMIT 10"; |
7702 | 7702 | |
@@ -7727,26 +7727,26 @@ discard block |
||
7727 | 7727 | |
7728 | 7728 | |
7729 | 7729 | /** |
7730 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7731 | - * |
|
7732 | - * @return Array the airport list |
|
7733 | - * |
|
7734 | - */ |
|
7730 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7731 | + * |
|
7732 | + * @return Array the airport list |
|
7733 | + * |
|
7734 | + */ |
|
7735 | 7735 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7736 | 7736 | { |
7737 | 7737 | global $globalDBdriver; |
7738 | 7738 | $filter_query = $this->getFilter($filters,true,true); |
7739 | 7739 | $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 |
7740 | 7740 | 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"; |
7741 | - if ($olderthanmonths > 0) { |
|
7742 | - if ($globalDBdriver == 'mysql') { |
|
7741 | + if ($olderthanmonths > 0) { |
|
7742 | + if ($globalDBdriver == 'mysql') { |
|
7743 | 7743 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7744 | 7744 | } else { |
7745 | 7745 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7746 | 7746 | } |
7747 | 7747 | } |
7748 | - if ($sincedate != '') { |
|
7749 | - if ($globalDBdriver == 'mysql') { |
|
7748 | + if ($sincedate != '') { |
|
7749 | + if ($globalDBdriver == 'mysql') { |
|
7750 | 7750 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7751 | 7751 | } else { |
7752 | 7752 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7780,7 +7780,7 @@ discard block |
||
7780 | 7780 | $query_values = array_merge($query_values,array(':day' => $day)); |
7781 | 7781 | } |
7782 | 7782 | } |
7783 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7783 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7784 | 7784 | ORDER BY airport_arrival_icao_count DESC"; |
7785 | 7785 | if ($limit) $query .= " LIMIT 10"; |
7786 | 7786 | |
@@ -7808,35 +7808,35 @@ discard block |
||
7808 | 7808 | } |
7809 | 7809 | |
7810 | 7810 | /** |
7811 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7812 | - * |
|
7813 | - * @return Array the airport list |
|
7814 | - * |
|
7815 | - */ |
|
7811 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7812 | + * |
|
7813 | + * @return Array the airport list |
|
7814 | + * |
|
7815 | + */ |
|
7816 | 7816 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
7817 | 7817 | { |
7818 | 7818 | global $globalDBdriver; |
7819 | 7819 | $filter_query = $this->getFilter($filters,true,true); |
7820 | 7820 | $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 |
7821 | 7821 | 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 "; |
7822 | - if ($olderthanmonths > 0) { |
|
7823 | - if ($globalDBdriver == 'mysql') { |
|
7822 | + if ($olderthanmonths > 0) { |
|
7823 | + if ($globalDBdriver == 'mysql') { |
|
7824 | 7824 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7825 | 7825 | } else { |
7826 | 7826 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7827 | 7827 | } |
7828 | 7828 | } |
7829 | - if ($sincedate != '') { |
|
7830 | - if ($globalDBdriver == 'mysql') { |
|
7829 | + if ($sincedate != '') { |
|
7830 | + if ($globalDBdriver == 'mysql') { |
|
7831 | 7831 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7832 | 7832 | } else { |
7833 | 7833 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7834 | 7834 | } |
7835 | 7835 | } |
7836 | 7836 | |
7837 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7838 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7839 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7837 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7838 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7839 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7840 | 7840 | ORDER BY airport_arrival_icao_count DESC"; |
7841 | 7841 | if ($limit) $query .= " LIMIT 10"; |
7842 | 7842 | |
@@ -7866,11 +7866,11 @@ discard block |
||
7866 | 7866 | } |
7867 | 7867 | |
7868 | 7868 | /** |
7869 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7870 | - * |
|
7871 | - * @return Array the airport list |
|
7872 | - * |
|
7873 | - */ |
|
7869 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7870 | + * |
|
7871 | + * @return Array the airport list |
|
7872 | + * |
|
7873 | + */ |
|
7874 | 7874 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
7875 | 7875 | { |
7876 | 7876 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7902,11 +7902,11 @@ discard block |
||
7902 | 7902 | |
7903 | 7903 | |
7904 | 7904 | /** |
7905 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7906 | - * |
|
7907 | - * @return Array the airport list |
|
7908 | - * |
|
7909 | - */ |
|
7905 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7906 | + * |
|
7907 | + * @return Array the airport list |
|
7908 | + * |
|
7909 | + */ |
|
7910 | 7910 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
7911 | 7911 | { |
7912 | 7912 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7937,11 +7937,11 @@ discard block |
||
7937 | 7937 | |
7938 | 7938 | |
7939 | 7939 | /** |
7940 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7941 | - * |
|
7942 | - * @return Array the airport list |
|
7943 | - * |
|
7944 | - */ |
|
7940 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7941 | + * |
|
7942 | + * @return Array the airport list |
|
7943 | + * |
|
7944 | + */ |
|
7945 | 7945 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
7946 | 7946 | { |
7947 | 7947 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7975,11 +7975,11 @@ discard block |
||
7975 | 7975 | |
7976 | 7976 | |
7977 | 7977 | /** |
7978 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
7979 | - * |
|
7980 | - * @return Array the airport list |
|
7981 | - * |
|
7982 | - */ |
|
7978 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
7979 | + * |
|
7980 | + * @return Array the airport list |
|
7981 | + * |
|
7982 | + */ |
|
7983 | 7983 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
7984 | 7984 | { |
7985 | 7985 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8009,11 +8009,11 @@ discard block |
||
8009 | 8009 | |
8010 | 8010 | |
8011 | 8011 | /** |
8012 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
8013 | - * |
|
8014 | - * @return Array the airport list |
|
8015 | - * |
|
8016 | - */ |
|
8012 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
8013 | + * |
|
8014 | + * @return Array the airport list |
|
8015 | + * |
|
8016 | + */ |
|
8017 | 8017 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
8018 | 8018 | { |
8019 | 8019 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8047,11 +8047,11 @@ discard block |
||
8047 | 8047 | |
8048 | 8048 | |
8049 | 8049 | /** |
8050 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
8051 | - * |
|
8052 | - * @return Array the airport list |
|
8053 | - * |
|
8054 | - */ |
|
8050 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
8051 | + * |
|
8052 | + * @return Array the airport list |
|
8053 | + * |
|
8054 | + */ |
|
8055 | 8055 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
8056 | 8056 | { |
8057 | 8057 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8082,11 +8082,11 @@ discard block |
||
8082 | 8082 | |
8083 | 8083 | |
8084 | 8084 | /** |
8085 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
8086 | - * |
|
8087 | - * @return Array the airport list |
|
8088 | - * |
|
8089 | - */ |
|
8085 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
8086 | + * |
|
8087 | + * @return Array the airport list |
|
8088 | + * |
|
8089 | + */ |
|
8090 | 8090 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
8091 | 8091 | { |
8092 | 8092 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8119,11 +8119,11 @@ discard block |
||
8119 | 8119 | |
8120 | 8120 | |
8121 | 8121 | /** |
8122 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
8123 | - * |
|
8124 | - * @return Array the airport list |
|
8125 | - * |
|
8126 | - */ |
|
8122 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
8123 | + * |
|
8124 | + * @return Array the airport list |
|
8125 | + * |
|
8126 | + */ |
|
8127 | 8127 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
8128 | 8128 | { |
8129 | 8129 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8153,11 +8153,11 @@ discard block |
||
8153 | 8153 | |
8154 | 8154 | |
8155 | 8155 | /** |
8156 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
8157 | - * |
|
8158 | - * @return Array the airport list |
|
8159 | - * |
|
8160 | - */ |
|
8156 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
8157 | + * |
|
8158 | + * @return Array the airport list |
|
8159 | + * |
|
8160 | + */ |
|
8161 | 8161 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
8162 | 8162 | { |
8163 | 8163 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8191,11 +8191,11 @@ discard block |
||
8191 | 8191 | |
8192 | 8192 | |
8193 | 8193 | /** |
8194 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
8195 | - * |
|
8196 | - * @return Array the airport list |
|
8197 | - * |
|
8198 | - */ |
|
8194 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
8195 | + * |
|
8196 | + * @return Array the airport list |
|
8197 | + * |
|
8198 | + */ |
|
8199 | 8199 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
8200 | 8200 | { |
8201 | 8201 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8226,11 +8226,11 @@ discard block |
||
8226 | 8226 | |
8227 | 8227 | |
8228 | 8228 | /** |
8229 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
8230 | - * |
|
8231 | - * @return Array the airport list |
|
8232 | - * |
|
8233 | - */ |
|
8229 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
8230 | + * |
|
8231 | + * @return Array the airport list |
|
8232 | + * |
|
8233 | + */ |
|
8234 | 8234 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
8235 | 8235 | { |
8236 | 8236 | global $globalTimezone, $globalDBdriver; |
@@ -8276,11 +8276,11 @@ discard block |
||
8276 | 8276 | |
8277 | 8277 | |
8278 | 8278 | /** |
8279 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
8280 | - * |
|
8281 | - * @return Array the airport list |
|
8282 | - * |
|
8283 | - */ |
|
8279 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
8280 | + * |
|
8281 | + * @return Array the airport list |
|
8282 | + * |
|
8283 | + */ |
|
8284 | 8284 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
8285 | 8285 | { |
8286 | 8286 | global $globalTimezone, $globalDBdriver; |
@@ -8323,11 +8323,11 @@ discard block |
||
8323 | 8323 | |
8324 | 8324 | |
8325 | 8325 | /** |
8326 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
8327 | - * |
|
8328 | - * @return Array the airport list |
|
8329 | - * |
|
8330 | - */ |
|
8326 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
8327 | + * |
|
8328 | + * @return Array the airport list |
|
8329 | + * |
|
8330 | + */ |
|
8331 | 8331 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
8332 | 8332 | { |
8333 | 8333 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8359,11 +8359,11 @@ discard block |
||
8359 | 8359 | } |
8360 | 8360 | |
8361 | 8361 | /** |
8362 | - * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
8363 | - * |
|
8364 | - * @return Array the airport list |
|
8365 | - * |
|
8366 | - */ |
|
8362 | + * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
8363 | + * |
|
8364 | + * @return Array the airport list |
|
8365 | + * |
|
8366 | + */ |
|
8367 | 8367 | public function countAllArrivalAirportsByOwner($owner,$filters = array()) |
8368 | 8368 | { |
8369 | 8369 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8394,11 +8394,11 @@ discard block |
||
8394 | 8394 | } |
8395 | 8395 | |
8396 | 8396 | /** |
8397 | - * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8398 | - * |
|
8399 | - * @return Array the airport list |
|
8400 | - * |
|
8401 | - */ |
|
8397 | + * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8398 | + * |
|
8399 | + * @return Array the airport list |
|
8400 | + * |
|
8401 | + */ |
|
8402 | 8402 | public function countAllArrivalAirportsByPilot($pilot,$filters = array()) |
8403 | 8403 | { |
8404 | 8404 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8429,11 +8429,11 @@ discard block |
||
8429 | 8429 | } |
8430 | 8430 | |
8431 | 8431 | /** |
8432 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8433 | - * |
|
8434 | - * @return Array the airport list |
|
8435 | - * |
|
8436 | - */ |
|
8432 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8433 | + * |
|
8434 | + * @return Array the airport list |
|
8435 | + * |
|
8436 | + */ |
|
8437 | 8437 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
8438 | 8438 | { |
8439 | 8439 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8462,11 +8462,11 @@ discard block |
||
8462 | 8462 | } |
8463 | 8463 | |
8464 | 8464 | /** |
8465 | - * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8466 | - * |
|
8467 | - * @return Array the airport list |
|
8468 | - * |
|
8469 | - */ |
|
8465 | + * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8466 | + * |
|
8467 | + * @return Array the airport list |
|
8468 | + * |
|
8469 | + */ |
|
8470 | 8470 | public function countAllArrivalAirportCountriesByOwner($owner, $filters = array()) |
8471 | 8471 | { |
8472 | 8472 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8482,11 +8482,11 @@ discard block |
||
8482 | 8482 | } |
8483 | 8483 | |
8484 | 8484 | /** |
8485 | - * Gets all arrival airports by country of the airplanes that have flown over based on a pilot |
|
8486 | - * |
|
8487 | - * @return Array the airport list |
|
8488 | - * |
|
8489 | - */ |
|
8485 | + * Gets all arrival airports by country of the airplanes that have flown over based on a pilot |
|
8486 | + * |
|
8487 | + * @return Array the airport list |
|
8488 | + * |
|
8489 | + */ |
|
8490 | 8490 | public function countAllArrivalAirportCountriesByPilot($pilot, $filters = array()) |
8491 | 8491 | { |
8492 | 8492 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8504,11 +8504,11 @@ discard block |
||
8504 | 8504 | |
8505 | 8505 | |
8506 | 8506 | /** |
8507 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8508 | - * |
|
8509 | - * @return Array the airport list |
|
8510 | - * |
|
8511 | - */ |
|
8507 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8508 | + * |
|
8509 | + * @return Array the airport list |
|
8510 | + * |
|
8511 | + */ |
|
8512 | 8512 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
8513 | 8513 | { |
8514 | 8514 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8541,11 +8541,11 @@ discard block |
||
8541 | 8541 | |
8542 | 8542 | |
8543 | 8543 | /** |
8544 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8545 | - * |
|
8546 | - * @return Array the airport list |
|
8547 | - * |
|
8548 | - */ |
|
8544 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8545 | + * |
|
8546 | + * @return Array the airport list |
|
8547 | + * |
|
8548 | + */ |
|
8549 | 8549 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
8550 | 8550 | { |
8551 | 8551 | global $globalDBdriver; |
@@ -8577,11 +8577,11 @@ discard block |
||
8577 | 8577 | |
8578 | 8578 | |
8579 | 8579 | /** |
8580 | - * Counts all airport departure countries |
|
8581 | - * |
|
8582 | - * @return Array the airport departure list |
|
8583 | - * |
|
8584 | - */ |
|
8580 | + * Counts all airport departure countries |
|
8581 | + * |
|
8582 | + * @return Array the airport departure list |
|
8583 | + * |
|
8584 | + */ |
|
8585 | 8585 | public function countAllDepartureCountries($filters = array(),$year = '',$month = '', $day = '') |
8586 | 8586 | { |
8587 | 8587 | global $globalDBdriver; |
@@ -8640,11 +8640,11 @@ discard block |
||
8640 | 8640 | |
8641 | 8641 | |
8642 | 8642 | /** |
8643 | - * Counts all airport arrival countries |
|
8644 | - * |
|
8645 | - * @return Array the airport arrival list |
|
8646 | - * |
|
8647 | - */ |
|
8643 | + * Counts all airport arrival countries |
|
8644 | + * |
|
8645 | + * @return Array the airport arrival list |
|
8646 | + * |
|
8647 | + */ |
|
8648 | 8648 | public function countAllArrivalCountries($limit = true,$filters = array(),$year = '',$month = '',$day = '') |
8649 | 8649 | { |
8650 | 8650 | global $globalDBdriver; |
@@ -8706,11 +8706,11 @@ discard block |
||
8706 | 8706 | |
8707 | 8707 | |
8708 | 8708 | /** |
8709 | - * Gets all route combinations |
|
8710 | - * |
|
8711 | - * @return Array the route list |
|
8712 | - * |
|
8713 | - */ |
|
8709 | + * Gets all route combinations |
|
8710 | + * |
|
8711 | + * @return Array the route list |
|
8712 | + * |
|
8713 | + */ |
|
8714 | 8714 | public function countAllRoutes($filters = array()) |
8715 | 8715 | { |
8716 | 8716 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8749,11 +8749,11 @@ discard block |
||
8749 | 8749 | |
8750 | 8750 | |
8751 | 8751 | /** |
8752 | - * Gets all route combinations based on an aircraft |
|
8753 | - * |
|
8754 | - * @return Array the route list |
|
8755 | - * |
|
8756 | - */ |
|
8752 | + * Gets all route combinations based on an aircraft |
|
8753 | + * |
|
8754 | + * @return Array the route list |
|
8755 | + * |
|
8756 | + */ |
|
8757 | 8757 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
8758 | 8758 | { |
8759 | 8759 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8789,11 +8789,11 @@ discard block |
||
8789 | 8789 | |
8790 | 8790 | |
8791 | 8791 | /** |
8792 | - * Gets all route combinations based on an aircraft registration |
|
8793 | - * |
|
8794 | - * @return Array the route list |
|
8795 | - * |
|
8796 | - */ |
|
8792 | + * Gets all route combinations based on an aircraft registration |
|
8793 | + * |
|
8794 | + * @return Array the route list |
|
8795 | + * |
|
8796 | + */ |
|
8797 | 8797 | public function countAllRoutesByRegistration($registration, $filters = array()) |
8798 | 8798 | { |
8799 | 8799 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8831,11 +8831,11 @@ discard block |
||
8831 | 8831 | |
8832 | 8832 | |
8833 | 8833 | /** |
8834 | - * Gets all route combinations based on an airline |
|
8835 | - * |
|
8836 | - * @return Array the route list |
|
8837 | - * |
|
8838 | - */ |
|
8834 | + * Gets all route combinations based on an airline |
|
8835 | + * |
|
8836 | + * @return Array the route list |
|
8837 | + * |
|
8838 | + */ |
|
8839 | 8839 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
8840 | 8840 | { |
8841 | 8841 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8873,11 +8873,11 @@ discard block |
||
8873 | 8873 | |
8874 | 8874 | |
8875 | 8875 | /** |
8876 | - * Gets all route combinations based on an airport |
|
8877 | - * |
|
8878 | - * @return Array the route list |
|
8879 | - * |
|
8880 | - */ |
|
8876 | + * Gets all route combinations based on an airport |
|
8877 | + * |
|
8878 | + * @return Array the route list |
|
8879 | + * |
|
8880 | + */ |
|
8881 | 8881 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
8882 | 8882 | { |
8883 | 8883 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8914,11 +8914,11 @@ discard block |
||
8914 | 8914 | |
8915 | 8915 | |
8916 | 8916 | /** |
8917 | - * Gets all route combinations based on an country |
|
8918 | - * |
|
8919 | - * @return Array the route list |
|
8920 | - * |
|
8921 | - */ |
|
8917 | + * Gets all route combinations based on an country |
|
8918 | + * |
|
8919 | + * @return Array the route list |
|
8920 | + * |
|
8921 | + */ |
|
8922 | 8922 | public function countAllRoutesByCountry($country, $filters = array()) |
8923 | 8923 | { |
8924 | 8924 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8954,11 +8954,11 @@ discard block |
||
8954 | 8954 | |
8955 | 8955 | |
8956 | 8956 | /** |
8957 | - * Gets all route combinations based on an date |
|
8958 | - * |
|
8959 | - * @return Array the route list |
|
8960 | - * |
|
8961 | - */ |
|
8957 | + * Gets all route combinations based on an date |
|
8958 | + * |
|
8959 | + * @return Array the route list |
|
8960 | + * |
|
8961 | + */ |
|
8962 | 8962 | public function countAllRoutesByDate($date, $filters = array()) |
8963 | 8963 | { |
8964 | 8964 | global $globalTimezone, $globalDBdriver; |
@@ -9008,11 +9008,11 @@ discard block |
||
9008 | 9008 | |
9009 | 9009 | |
9010 | 9010 | /** |
9011 | - * Gets all route combinations based on an ident/callsign |
|
9012 | - * |
|
9013 | - * @return Array the route list |
|
9014 | - * |
|
9015 | - */ |
|
9011 | + * Gets all route combinations based on an ident/callsign |
|
9012 | + * |
|
9013 | + * @return Array the route list |
|
9014 | + * |
|
9015 | + */ |
|
9016 | 9016 | public function countAllRoutesByIdent($ident, $filters = array()) |
9017 | 9017 | { |
9018 | 9018 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9048,11 +9048,11 @@ discard block |
||
9048 | 9048 | } |
9049 | 9049 | |
9050 | 9050 | /** |
9051 | - * Gets all route combinations based on an owner |
|
9052 | - * |
|
9053 | - * @return Array the route list |
|
9054 | - * |
|
9055 | - */ |
|
9051 | + * Gets all route combinations based on an owner |
|
9052 | + * |
|
9053 | + * @return Array the route list |
|
9054 | + * |
|
9055 | + */ |
|
9056 | 9056 | public function countAllRoutesByOwner($owner,$filters = array()) |
9057 | 9057 | { |
9058 | 9058 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9088,11 +9088,11 @@ discard block |
||
9088 | 9088 | } |
9089 | 9089 | |
9090 | 9090 | /** |
9091 | - * Gets all route combinations based on a pilot |
|
9092 | - * |
|
9093 | - * @return Array the route list |
|
9094 | - * |
|
9095 | - */ |
|
9091 | + * Gets all route combinations based on a pilot |
|
9092 | + * |
|
9093 | + * @return Array the route list |
|
9094 | + * |
|
9095 | + */ |
|
9096 | 9096 | public function countAllRoutesByPilot($pilot,$filters = array()) |
9097 | 9097 | { |
9098 | 9098 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9129,11 +9129,11 @@ discard block |
||
9129 | 9129 | |
9130 | 9130 | |
9131 | 9131 | /** |
9132 | - * Gets all route combinations based on an manufacturer |
|
9133 | - * |
|
9134 | - * @return Array the route list |
|
9135 | - * |
|
9136 | - */ |
|
9132 | + * Gets all route combinations based on an manufacturer |
|
9133 | + * |
|
9134 | + * @return Array the route list |
|
9135 | + * |
|
9136 | + */ |
|
9137 | 9137 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
9138 | 9138 | { |
9139 | 9139 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9171,11 +9171,11 @@ discard block |
||
9171 | 9171 | |
9172 | 9172 | |
9173 | 9173 | /** |
9174 | - * Gets all route combinations with waypoints |
|
9175 | - * |
|
9176 | - * @return Array the route list |
|
9177 | - * |
|
9178 | - */ |
|
9174 | + * Gets all route combinations with waypoints |
|
9175 | + * |
|
9176 | + * @return Array the route list |
|
9177 | + * |
|
9178 | + */ |
|
9179 | 9179 | public function countAllRoutesWithWaypoints($filters = array()) |
9180 | 9180 | { |
9181 | 9181 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9212,11 +9212,11 @@ discard block |
||
9212 | 9212 | } |
9213 | 9213 | |
9214 | 9214 | /** |
9215 | - * Gets all callsigns that have flown over |
|
9216 | - * |
|
9217 | - * @return Array the callsign list |
|
9218 | - * |
|
9219 | - */ |
|
9215 | + * Gets all callsigns that have flown over |
|
9216 | + * |
|
9217 | + * @return Array the callsign list |
|
9218 | + * |
|
9219 | + */ |
|
9220 | 9220 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
9221 | 9221 | { |
9222 | 9222 | global $globalDBdriver; |
@@ -9282,11 +9282,11 @@ discard block |
||
9282 | 9282 | } |
9283 | 9283 | |
9284 | 9284 | /** |
9285 | - * Gets all callsigns that have flown over |
|
9286 | - * |
|
9287 | - * @return Array the callsign list |
|
9288 | - * |
|
9289 | - */ |
|
9285 | + * Gets all callsigns that have flown over |
|
9286 | + * |
|
9287 | + * @return Array the callsign list |
|
9288 | + * |
|
9289 | + */ |
|
9290 | 9290 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
9291 | 9291 | { |
9292 | 9292 | global $globalDBdriver; |
@@ -9327,11 +9327,11 @@ discard block |
||
9327 | 9327 | |
9328 | 9328 | |
9329 | 9329 | /** |
9330 | - * Counts all dates |
|
9331 | - * |
|
9332 | - * @return Array the date list |
|
9333 | - * |
|
9334 | - */ |
|
9330 | + * Counts all dates |
|
9331 | + * |
|
9332 | + * @return Array the date list |
|
9333 | + * |
|
9334 | + */ |
|
9335 | 9335 | public function countAllDates($filters = array()) |
9336 | 9336 | { |
9337 | 9337 | global $globalTimezone, $globalDBdriver; |
@@ -9376,11 +9376,11 @@ discard block |
||
9376 | 9376 | } |
9377 | 9377 | |
9378 | 9378 | /** |
9379 | - * Counts all dates |
|
9380 | - * |
|
9381 | - * @return Array the date list |
|
9382 | - * |
|
9383 | - */ |
|
9379 | + * Counts all dates |
|
9380 | + * |
|
9381 | + * @return Array the date list |
|
9382 | + * |
|
9383 | + */ |
|
9384 | 9384 | public function countAllDatesByAirlines($filters = array()) |
9385 | 9385 | { |
9386 | 9386 | global $globalTimezone, $globalDBdriver; |
@@ -9425,11 +9425,11 @@ discard block |
||
9425 | 9425 | } |
9426 | 9426 | |
9427 | 9427 | /** |
9428 | - * Counts all dates during the last 7 days |
|
9429 | - * |
|
9430 | - * @return Array the date list |
|
9431 | - * |
|
9432 | - */ |
|
9428 | + * Counts all dates during the last 7 days |
|
9429 | + * |
|
9430 | + * @return Array the date list |
|
9431 | + * |
|
9432 | + */ |
|
9433 | 9433 | public function countAllDatesLast7Days($filters = array()) |
9434 | 9434 | { |
9435 | 9435 | global $globalTimezone, $globalDBdriver; |
@@ -9451,7 +9451,7 @@ discard block |
||
9451 | 9451 | $query .= " GROUP BY date_name |
9452 | 9452 | ORDER BY date_name ASC"; |
9453 | 9453 | $query_data = array(':offset' => $offset); |
9454 | - } |
|
9454 | + } |
|
9455 | 9455 | |
9456 | 9456 | $sth = $this->db->prepare($query); |
9457 | 9457 | $sth->execute($query_data); |
@@ -9471,11 +9471,11 @@ discard block |
||
9471 | 9471 | } |
9472 | 9472 | |
9473 | 9473 | /** |
9474 | - * Counts all dates during the last month |
|
9475 | - * |
|
9476 | - * @return Array the date list |
|
9477 | - * |
|
9478 | - */ |
|
9474 | + * Counts all dates during the last month |
|
9475 | + * |
|
9476 | + * @return Array the date list |
|
9477 | + * |
|
9478 | + */ |
|
9479 | 9479 | public function countAllDatesLastMonth($filters = array()) |
9480 | 9480 | { |
9481 | 9481 | global $globalTimezone, $globalDBdriver; |
@@ -9497,7 +9497,7 @@ discard block |
||
9497 | 9497 | $query .= " GROUP BY date_name |
9498 | 9498 | ORDER BY date_name ASC"; |
9499 | 9499 | $query_data = array(':offset' => $offset); |
9500 | - } |
|
9500 | + } |
|
9501 | 9501 | |
9502 | 9502 | $sth = $this->db->prepare($query); |
9503 | 9503 | $sth->execute($query_data); |
@@ -9518,11 +9518,11 @@ discard block |
||
9518 | 9518 | |
9519 | 9519 | |
9520 | 9520 | /** |
9521 | - * Counts all dates during the last month |
|
9522 | - * |
|
9523 | - * @return Array the date list |
|
9524 | - * |
|
9525 | - */ |
|
9521 | + * Counts all dates during the last month |
|
9522 | + * |
|
9523 | + * @return Array the date list |
|
9524 | + * |
|
9525 | + */ |
|
9526 | 9526 | public function countAllDatesLastMonthByAirlines($filters = array()) |
9527 | 9527 | { |
9528 | 9528 | global $globalTimezone, $globalDBdriver; |
@@ -9545,7 +9545,7 @@ discard block |
||
9545 | 9545 | GROUP BY spotter_output.airline_icao, date_name |
9546 | 9546 | ORDER BY date_name ASC"; |
9547 | 9547 | $query_data = array(':offset' => $offset); |
9548 | - } |
|
9548 | + } |
|
9549 | 9549 | |
9550 | 9550 | $sth = $this->db->prepare($query); |
9551 | 9551 | $sth->execute($query_data); |
@@ -9567,11 +9567,11 @@ discard block |
||
9567 | 9567 | |
9568 | 9568 | |
9569 | 9569 | /** |
9570 | - * Counts all month |
|
9571 | - * |
|
9572 | - * @return Array the month list |
|
9573 | - * |
|
9574 | - */ |
|
9570 | + * Counts all month |
|
9571 | + * |
|
9572 | + * @return Array the month list |
|
9573 | + * |
|
9574 | + */ |
|
9575 | 9575 | public function countAllMonths($filters = array()) |
9576 | 9576 | { |
9577 | 9577 | global $globalTimezone, $globalDBdriver; |
@@ -9613,11 +9613,11 @@ discard block |
||
9613 | 9613 | } |
9614 | 9614 | |
9615 | 9615 | /** |
9616 | - * Counts all month |
|
9617 | - * |
|
9618 | - * @return Array the month list |
|
9619 | - * |
|
9620 | - */ |
|
9616 | + * Counts all month |
|
9617 | + * |
|
9618 | + * @return Array the month list |
|
9619 | + * |
|
9620 | + */ |
|
9621 | 9621 | public function countAllMonthsByAirlines($filters = array()) |
9622 | 9622 | { |
9623 | 9623 | global $globalTimezone, $globalDBdriver; |
@@ -9662,11 +9662,11 @@ discard block |
||
9662 | 9662 | } |
9663 | 9663 | |
9664 | 9664 | /** |
9665 | - * Counts all military month |
|
9666 | - * |
|
9667 | - * @return Array the month list |
|
9668 | - * |
|
9669 | - */ |
|
9665 | + * Counts all military month |
|
9666 | + * |
|
9667 | + * @return Array the month list |
|
9668 | + * |
|
9669 | + */ |
|
9670 | 9670 | public function countAllMilitaryMonths($filters = array()) |
9671 | 9671 | { |
9672 | 9672 | global $globalTimezone, $globalDBdriver; |
@@ -9707,11 +9707,11 @@ discard block |
||
9707 | 9707 | } |
9708 | 9708 | |
9709 | 9709 | /** |
9710 | - * Counts all month owners |
|
9711 | - * |
|
9712 | - * @return Array the month list |
|
9713 | - * |
|
9714 | - */ |
|
9710 | + * Counts all month owners |
|
9711 | + * |
|
9712 | + * @return Array the month list |
|
9713 | + * |
|
9714 | + */ |
|
9715 | 9715 | public function countAllMonthsOwners($filters = array()) |
9716 | 9716 | { |
9717 | 9717 | global $globalTimezone, $globalDBdriver; |
@@ -9753,11 +9753,11 @@ discard block |
||
9753 | 9753 | } |
9754 | 9754 | |
9755 | 9755 | /** |
9756 | - * Counts all month owners |
|
9757 | - * |
|
9758 | - * @return Array the month list |
|
9759 | - * |
|
9760 | - */ |
|
9756 | + * Counts all month owners |
|
9757 | + * |
|
9758 | + * @return Array the month list |
|
9759 | + * |
|
9760 | + */ |
|
9761 | 9761 | public function countAllMonthsOwnersByAirlines($filters = array()) |
9762 | 9762 | { |
9763 | 9763 | global $globalTimezone, $globalDBdriver; |
@@ -9800,11 +9800,11 @@ discard block |
||
9800 | 9800 | } |
9801 | 9801 | |
9802 | 9802 | /** |
9803 | - * Counts all month pilot |
|
9804 | - * |
|
9805 | - * @return Array the month list |
|
9806 | - * |
|
9807 | - */ |
|
9803 | + * Counts all month pilot |
|
9804 | + * |
|
9805 | + * @return Array the month list |
|
9806 | + * |
|
9807 | + */ |
|
9808 | 9808 | public function countAllMonthsPilots($filters = array()) |
9809 | 9809 | { |
9810 | 9810 | global $globalTimezone, $globalDBdriver; |
@@ -9846,11 +9846,11 @@ discard block |
||
9846 | 9846 | } |
9847 | 9847 | |
9848 | 9848 | /** |
9849 | - * Counts all month pilot |
|
9850 | - * |
|
9851 | - * @return Array the month list |
|
9852 | - * |
|
9853 | - */ |
|
9849 | + * Counts all month pilot |
|
9850 | + * |
|
9851 | + * @return Array the month list |
|
9852 | + * |
|
9853 | + */ |
|
9854 | 9854 | public function countAllMonthsPilotsByAirlines($filters = array()) |
9855 | 9855 | { |
9856 | 9856 | global $globalTimezone, $globalDBdriver; |
@@ -9893,11 +9893,11 @@ discard block |
||
9893 | 9893 | } |
9894 | 9894 | |
9895 | 9895 | /** |
9896 | - * Counts all month airline |
|
9897 | - * |
|
9898 | - * @return Array the month list |
|
9899 | - * |
|
9900 | - */ |
|
9896 | + * Counts all month airline |
|
9897 | + * |
|
9898 | + * @return Array the month list |
|
9899 | + * |
|
9900 | + */ |
|
9901 | 9901 | public function countAllMonthsAirlines($filters = array()) |
9902 | 9902 | { |
9903 | 9903 | global $globalTimezone, $globalDBdriver; |
@@ -9939,11 +9939,11 @@ discard block |
||
9939 | 9939 | } |
9940 | 9940 | |
9941 | 9941 | /** |
9942 | - * Counts all month aircraft |
|
9943 | - * |
|
9944 | - * @return Array the month list |
|
9945 | - * |
|
9946 | - */ |
|
9942 | + * Counts all month aircraft |
|
9943 | + * |
|
9944 | + * @return Array the month list |
|
9945 | + * |
|
9946 | + */ |
|
9947 | 9947 | public function countAllMonthsAircrafts($filters = array()) |
9948 | 9948 | { |
9949 | 9949 | global $globalTimezone, $globalDBdriver; |
@@ -9986,11 +9986,11 @@ discard block |
||
9986 | 9986 | |
9987 | 9987 | |
9988 | 9988 | /** |
9989 | - * Counts all month aircraft |
|
9990 | - * |
|
9991 | - * @return Array the month list |
|
9992 | - * |
|
9993 | - */ |
|
9989 | + * Counts all month aircraft |
|
9990 | + * |
|
9991 | + * @return Array the month list |
|
9992 | + * |
|
9993 | + */ |
|
9994 | 9994 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
9995 | 9995 | { |
9996 | 9996 | global $globalTimezone, $globalDBdriver; |
@@ -10033,11 +10033,11 @@ discard block |
||
10033 | 10033 | } |
10034 | 10034 | |
10035 | 10035 | /** |
10036 | - * Counts all month real arrival |
|
10037 | - * |
|
10038 | - * @return Array the month list |
|
10039 | - * |
|
10040 | - */ |
|
10036 | + * Counts all month real arrival |
|
10037 | + * |
|
10038 | + * @return Array the month list |
|
10039 | + * |
|
10040 | + */ |
|
10041 | 10041 | public function countAllMonthsRealArrivals($filters = array()) |
10042 | 10042 | { |
10043 | 10043 | global $globalTimezone, $globalDBdriver; |
@@ -10080,11 +10080,11 @@ discard block |
||
10080 | 10080 | |
10081 | 10081 | |
10082 | 10082 | /** |
10083 | - * Counts all month real arrival |
|
10084 | - * |
|
10085 | - * @return Array the month list |
|
10086 | - * |
|
10087 | - */ |
|
10083 | + * Counts all month real arrival |
|
10084 | + * |
|
10085 | + * @return Array the month list |
|
10086 | + * |
|
10087 | + */ |
|
10088 | 10088 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
10089 | 10089 | { |
10090 | 10090 | global $globalTimezone, $globalDBdriver; |
@@ -10128,11 +10128,11 @@ discard block |
||
10128 | 10128 | |
10129 | 10129 | |
10130 | 10130 | /** |
10131 | - * Counts all dates during the last year |
|
10132 | - * |
|
10133 | - * @return Array the date list |
|
10134 | - * |
|
10135 | - */ |
|
10131 | + * Counts all dates during the last year |
|
10132 | + * |
|
10133 | + * @return Array the date list |
|
10134 | + * |
|
10135 | + */ |
|
10136 | 10136 | public function countAllMonthsLastYear($filters) |
10137 | 10137 | { |
10138 | 10138 | global $globalTimezone, $globalDBdriver; |
@@ -10154,7 +10154,7 @@ discard block |
||
10154 | 10154 | $query .= " GROUP BY year_name, month_name |
10155 | 10155 | ORDER BY year_name, month_name ASC"; |
10156 | 10156 | $query_data = array(':offset' => $offset); |
10157 | - } |
|
10157 | + } |
|
10158 | 10158 | |
10159 | 10159 | $sth = $this->db->prepare($query); |
10160 | 10160 | $sth->execute($query_data); |
@@ -10177,11 +10177,11 @@ discard block |
||
10177 | 10177 | |
10178 | 10178 | |
10179 | 10179 | /** |
10180 | - * Counts all hours |
|
10181 | - * |
|
10182 | - * @return Array the hour list |
|
10183 | - * |
|
10184 | - */ |
|
10180 | + * Counts all hours |
|
10181 | + * |
|
10182 | + * @return Array the hour list |
|
10183 | + * |
|
10184 | + */ |
|
10185 | 10185 | public function countAllHours($orderby,$filters = array()) |
10186 | 10186 | { |
10187 | 10187 | global $globalTimezone, $globalDBdriver; |
@@ -10242,11 +10242,11 @@ discard block |
||
10242 | 10242 | } |
10243 | 10243 | |
10244 | 10244 | /** |
10245 | - * Counts all hours |
|
10246 | - * |
|
10247 | - * @return Array the hour list |
|
10248 | - * |
|
10249 | - */ |
|
10245 | + * Counts all hours |
|
10246 | + * |
|
10247 | + * @return Array the hour list |
|
10248 | + * |
|
10249 | + */ |
|
10250 | 10250 | public function countAllHoursByAirlines($orderby, $filters = array()) |
10251 | 10251 | { |
10252 | 10252 | global $globalTimezone, $globalDBdriver; |
@@ -10309,11 +10309,11 @@ discard block |
||
10309 | 10309 | |
10310 | 10310 | |
10311 | 10311 | /** |
10312 | - * Counts all hours by airline |
|
10313 | - * |
|
10314 | - * @return Array the hour list |
|
10315 | - * |
|
10316 | - */ |
|
10312 | + * Counts all hours by airline |
|
10313 | + * |
|
10314 | + * @return Array the hour list |
|
10315 | + * |
|
10316 | + */ |
|
10317 | 10317 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
10318 | 10318 | { |
10319 | 10319 | global $globalTimezone, $globalDBdriver; |
@@ -10359,11 +10359,11 @@ discard block |
||
10359 | 10359 | |
10360 | 10360 | |
10361 | 10361 | /** |
10362 | - * Counts all hours by aircraft |
|
10363 | - * |
|
10364 | - * @return Array the hour list |
|
10365 | - * |
|
10366 | - */ |
|
10362 | + * Counts all hours by aircraft |
|
10363 | + * |
|
10364 | + * @return Array the hour list |
|
10365 | + * |
|
10366 | + */ |
|
10367 | 10367 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
10368 | 10368 | { |
10369 | 10369 | global $globalTimezone, $globalDBdriver; |
@@ -10406,11 +10406,11 @@ discard block |
||
10406 | 10406 | |
10407 | 10407 | |
10408 | 10408 | /** |
10409 | - * Counts all hours by aircraft registration |
|
10410 | - * |
|
10411 | - * @return Array the hour list |
|
10412 | - * |
|
10413 | - */ |
|
10409 | + * Counts all hours by aircraft registration |
|
10410 | + * |
|
10411 | + * @return Array the hour list |
|
10412 | + * |
|
10413 | + */ |
|
10414 | 10414 | public function countAllHoursByRegistration($registration, $filters = array()) |
10415 | 10415 | { |
10416 | 10416 | global $globalTimezone, $globalDBdriver; |
@@ -10453,11 +10453,11 @@ discard block |
||
10453 | 10453 | |
10454 | 10454 | |
10455 | 10455 | /** |
10456 | - * Counts all hours by airport |
|
10457 | - * |
|
10458 | - * @return Array the hour list |
|
10459 | - * |
|
10460 | - */ |
|
10456 | + * Counts all hours by airport |
|
10457 | + * |
|
10458 | + * @return Array the hour list |
|
10459 | + * |
|
10460 | + */ |
|
10461 | 10461 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
10462 | 10462 | { |
10463 | 10463 | global $globalTimezone, $globalDBdriver; |
@@ -10501,11 +10501,11 @@ discard block |
||
10501 | 10501 | |
10502 | 10502 | |
10503 | 10503 | /** |
10504 | - * Counts all hours by manufacturer |
|
10505 | - * |
|
10506 | - * @return Array the hour list |
|
10507 | - * |
|
10508 | - */ |
|
10504 | + * Counts all hours by manufacturer |
|
10505 | + * |
|
10506 | + * @return Array the hour list |
|
10507 | + * |
|
10508 | + */ |
|
10509 | 10509 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
10510 | 10510 | { |
10511 | 10511 | global $globalTimezone, $globalDBdriver; |
@@ -10549,11 +10549,11 @@ discard block |
||
10549 | 10549 | |
10550 | 10550 | |
10551 | 10551 | /** |
10552 | - * Counts all hours by date |
|
10553 | - * |
|
10554 | - * @return Array the hour list |
|
10555 | - * |
|
10556 | - */ |
|
10552 | + * Counts all hours by date |
|
10553 | + * |
|
10554 | + * @return Array the hour list |
|
10555 | + * |
|
10556 | + */ |
|
10557 | 10557 | public function countAllHoursByDate($date, $filters = array()) |
10558 | 10558 | { |
10559 | 10559 | global $globalTimezone, $globalDBdriver; |
@@ -10597,11 +10597,11 @@ discard block |
||
10597 | 10597 | |
10598 | 10598 | |
10599 | 10599 | /** |
10600 | - * Counts all hours by a ident/callsign |
|
10601 | - * |
|
10602 | - * @return Array the hour list |
|
10603 | - * |
|
10604 | - */ |
|
10600 | + * Counts all hours by a ident/callsign |
|
10601 | + * |
|
10602 | + * @return Array the hour list |
|
10603 | + * |
|
10604 | + */ |
|
10605 | 10605 | public function countAllHoursByIdent($ident, $filters = array()) |
10606 | 10606 | { |
10607 | 10607 | global $globalTimezone, $globalDBdriver; |
@@ -10644,11 +10644,11 @@ discard block |
||
10644 | 10644 | } |
10645 | 10645 | |
10646 | 10646 | /** |
10647 | - * Counts all hours by a owner |
|
10648 | - * |
|
10649 | - * @return Array the hour list |
|
10650 | - * |
|
10651 | - */ |
|
10647 | + * Counts all hours by a owner |
|
10648 | + * |
|
10649 | + * @return Array the hour list |
|
10650 | + * |
|
10651 | + */ |
|
10652 | 10652 | public function countAllHoursByOwner($owner, $filters = array()) |
10653 | 10653 | { |
10654 | 10654 | global $globalTimezone, $globalDBdriver; |
@@ -10691,11 +10691,11 @@ discard block |
||
10691 | 10691 | } |
10692 | 10692 | |
10693 | 10693 | /** |
10694 | - * Counts all hours by a pilot |
|
10695 | - * |
|
10696 | - * @return Array the hour list |
|
10697 | - * |
|
10698 | - */ |
|
10694 | + * Counts all hours by a pilot |
|
10695 | + * |
|
10696 | + * @return Array the hour list |
|
10697 | + * |
|
10698 | + */ |
|
10699 | 10699 | public function countAllHoursByPilot($pilot, $filters = array()) |
10700 | 10700 | { |
10701 | 10701 | global $globalTimezone, $globalDBdriver; |
@@ -10740,11 +10740,11 @@ discard block |
||
10740 | 10740 | |
10741 | 10741 | |
10742 | 10742 | /** |
10743 | - * Counts all hours by route |
|
10744 | - * |
|
10745 | - * @return Array the hour list |
|
10746 | - * |
|
10747 | - */ |
|
10743 | + * Counts all hours by route |
|
10744 | + * |
|
10745 | + * @return Array the hour list |
|
10746 | + * |
|
10747 | + */ |
|
10748 | 10748 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
10749 | 10749 | { |
10750 | 10750 | global $globalTimezone, $globalDBdriver; |
@@ -10788,11 +10788,11 @@ discard block |
||
10788 | 10788 | |
10789 | 10789 | |
10790 | 10790 | /** |
10791 | - * Counts all hours by country |
|
10792 | - * |
|
10793 | - * @return Array the hour list |
|
10794 | - * |
|
10795 | - */ |
|
10791 | + * Counts all hours by country |
|
10792 | + * |
|
10793 | + * @return Array the hour list |
|
10794 | + * |
|
10795 | + */ |
|
10796 | 10796 | public function countAllHoursByCountry($country, $filters = array()) |
10797 | 10797 | { |
10798 | 10798 | global $globalTimezone, $globalDBdriver; |
@@ -10837,11 +10837,11 @@ discard block |
||
10837 | 10837 | |
10838 | 10838 | |
10839 | 10839 | /** |
10840 | - * Counts all aircraft that have flown over |
|
10841 | - * |
|
10842 | - * @return Integer the number of aircrafts |
|
10843 | - * |
|
10844 | - */ |
|
10840 | + * Counts all aircraft that have flown over |
|
10841 | + * |
|
10842 | + * @return Integer the number of aircrafts |
|
10843 | + * |
|
10844 | + */ |
|
10845 | 10845 | public function countOverallAircrafts($filters = array(),$year = '',$month = '') |
10846 | 10846 | { |
10847 | 10847 | global $globalDBdriver; |
@@ -10874,11 +10874,11 @@ discard block |
||
10874 | 10874 | } |
10875 | 10875 | |
10876 | 10876 | /** |
10877 | - * Counts all flight that really arrival |
|
10878 | - * |
|
10879 | - * @return Integer the number of aircrafts |
|
10880 | - * |
|
10881 | - */ |
|
10877 | + * Counts all flight that really arrival |
|
10878 | + * |
|
10879 | + * @return Integer the number of aircrafts |
|
10880 | + * |
|
10881 | + */ |
|
10882 | 10882 | public function countOverallArrival($filters = array(),$year = '',$month = '') |
10883 | 10883 | { |
10884 | 10884 | global $globalDBdriver; |
@@ -10911,11 +10911,11 @@ discard block |
||
10911 | 10911 | } |
10912 | 10912 | |
10913 | 10913 | /** |
10914 | - * Counts all pilots that have flown over |
|
10915 | - * |
|
10916 | - * @return Integer the number of pilots |
|
10917 | - * |
|
10918 | - */ |
|
10914 | + * Counts all pilots that have flown over |
|
10915 | + * |
|
10916 | + * @return Integer the number of pilots |
|
10917 | + * |
|
10918 | + */ |
|
10919 | 10919 | public function countOverallPilots($filters = array(),$year = '',$month = '') |
10920 | 10920 | { |
10921 | 10921 | global $globalDBdriver; |
@@ -10947,11 +10947,11 @@ discard block |
||
10947 | 10947 | } |
10948 | 10948 | |
10949 | 10949 | /** |
10950 | - * Counts all owners that have flown over |
|
10951 | - * |
|
10952 | - * @return Integer the number of owners |
|
10953 | - * |
|
10954 | - */ |
|
10950 | + * Counts all owners that have flown over |
|
10951 | + * |
|
10952 | + * @return Integer the number of owners |
|
10953 | + * |
|
10954 | + */ |
|
10955 | 10955 | public function countOverallOwners($filters = array(),$year = '',$month = '') |
10956 | 10956 | { |
10957 | 10957 | global $globalDBdriver; |
@@ -10984,11 +10984,11 @@ discard block |
||
10984 | 10984 | |
10985 | 10985 | |
10986 | 10986 | /** |
10987 | - * Counts all flights that have flown over |
|
10988 | - * |
|
10989 | - * @return Integer the number of flights |
|
10990 | - * |
|
10991 | - */ |
|
10987 | + * Counts all flights that have flown over |
|
10988 | + * |
|
10989 | + * @return Integer the number of flights |
|
10990 | + * |
|
10991 | + */ |
|
10992 | 10992 | public function countOverallFlights($filters = array(),$year = '',$month = '') |
10993 | 10993 | { |
10994 | 10994 | global $globalDBdriver; |
@@ -11022,11 +11022,11 @@ discard block |
||
11022 | 11022 | } |
11023 | 11023 | |
11024 | 11024 | /** |
11025 | - * Counts all military flights that have flown over |
|
11026 | - * |
|
11027 | - * @return Integer the number of flights |
|
11028 | - * |
|
11029 | - */ |
|
11025 | + * Counts all military flights that have flown over |
|
11026 | + * |
|
11027 | + * @return Integer the number of flights |
|
11028 | + * |
|
11029 | + */ |
|
11030 | 11030 | public function countOverallMilitaryFlights($filters = array(),$year = '',$month = '') |
11031 | 11031 | { |
11032 | 11032 | global $globalDBdriver; |
@@ -11061,11 +11061,11 @@ discard block |
||
11061 | 11061 | |
11062 | 11062 | |
11063 | 11063 | /** |
11064 | - * Counts all airlines that have flown over |
|
11065 | - * |
|
11066 | - * @return Integer the number of airlines |
|
11067 | - * |
|
11068 | - */ |
|
11064 | + * Counts all airlines that have flown over |
|
11065 | + * |
|
11066 | + * @return Integer the number of airlines |
|
11067 | + * |
|
11068 | + */ |
|
11069 | 11069 | public function countOverallAirlines($filters = array(),$year = '',$month = '') |
11070 | 11070 | { |
11071 | 11071 | global $globalDBdriver; |
@@ -11092,8 +11092,8 @@ discard block |
||
11092 | 11092 | $query_values = array_merge($query_values,array(':month' => $month)); |
11093 | 11093 | } |
11094 | 11094 | } |
11095 | - if ($query == '') $queryi .= $this->getFilter($filters); |
|
11096 | - else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
11095 | + if ($query == '') $queryi .= $this->getFilter($filters); |
|
11096 | + else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
11097 | 11097 | |
11098 | 11098 | |
11099 | 11099 | $sth = $this->db->prepare($queryi); |
@@ -11103,11 +11103,11 @@ discard block |
||
11103 | 11103 | |
11104 | 11104 | |
11105 | 11105 | /** |
11106 | - * Counts all hours of today |
|
11107 | - * |
|
11108 | - * @return Array the hour list |
|
11109 | - * |
|
11110 | - */ |
|
11106 | + * Counts all hours of today |
|
11107 | + * |
|
11108 | + * @return Array the hour list |
|
11109 | + * |
|
11110 | + */ |
|
11111 | 11111 | public function countAllHoursFromToday($filters = array()) |
11112 | 11112 | { |
11113 | 11113 | global $globalTimezone, $globalDBdriver; |
@@ -11147,11 +11147,11 @@ discard block |
||
11147 | 11147 | } |
11148 | 11148 | |
11149 | 11149 | /** |
11150 | - * Gets all the spotter information based on calculated upcoming flights |
|
11151 | - * |
|
11152 | - * @return Array the spotter information |
|
11153 | - * |
|
11154 | - */ |
|
11150 | + * Gets all the spotter information based on calculated upcoming flights |
|
11151 | + * |
|
11152 | + * @return Array the spotter information |
|
11153 | + * |
|
11154 | + */ |
|
11155 | 11155 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
11156 | 11156 | { |
11157 | 11157 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -11226,12 +11226,12 @@ discard block |
||
11226 | 11226 | } |
11227 | 11227 | |
11228 | 11228 | |
11229 | - /** |
|
11230 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
11231 | - * |
|
11232 | - * @return Integer the Barrie Spotter ID |
|
11229 | + /** |
|
11230 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
11231 | + * |
|
11232 | + * @return Integer the Barrie Spotter ID |
|
11233 | 11233 | q * |
11234 | - */ |
|
11234 | + */ |
|
11235 | 11235 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
11236 | 11236 | { |
11237 | 11237 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -11252,13 +11252,13 @@ discard block |
||
11252 | 11252 | |
11253 | 11253 | |
11254 | 11254 | /** |
11255 | - * Parses a date string |
|
11256 | - * |
|
11257 | - * @param String $dateString the date string |
|
11258 | - * @param String $timezone the timezone of a user |
|
11259 | - * @return Array the time information |
|
11260 | - * |
|
11261 | - */ |
|
11255 | + * Parses a date string |
|
11256 | + * |
|
11257 | + * @param String $dateString the date string |
|
11258 | + * @param String $timezone the timezone of a user |
|
11259 | + * @return Array the time information |
|
11260 | + * |
|
11261 | + */ |
|
11262 | 11262 | public function parseDateString($dateString, $timezone = '') |
11263 | 11263 | { |
11264 | 11264 | $time_array = array(); |
@@ -11294,12 +11294,12 @@ discard block |
||
11294 | 11294 | |
11295 | 11295 | |
11296 | 11296 | /** |
11297 | - * Parses the direction degrees to working |
|
11298 | - * |
|
11299 | - * @param Float $direction the direction in degrees |
|
11300 | - * @return Array the direction information |
|
11301 | - * |
|
11302 | - */ |
|
11297 | + * Parses the direction degrees to working |
|
11298 | + * |
|
11299 | + * @param Float $direction the direction in degrees |
|
11300 | + * @return Array the direction information |
|
11301 | + * |
|
11302 | + */ |
|
11303 | 11303 | public function parseDirection($direction = 0) |
11304 | 11304 | { |
11305 | 11305 | if ($direction == '') $direction = 0; |
@@ -11378,12 +11378,12 @@ discard block |
||
11378 | 11378 | |
11379 | 11379 | |
11380 | 11380 | /** |
11381 | - * Gets the aircraft registration |
|
11382 | - * |
|
11383 | - * @param String $flightaware_id the flight aware id |
|
11384 | - * @return String the aircraft registration |
|
11385 | - * |
|
11386 | - */ |
|
11381 | + * Gets the aircraft registration |
|
11382 | + * |
|
11383 | + * @param String $flightaware_id the flight aware id |
|
11384 | + * @return String the aircraft registration |
|
11385 | + * |
|
11386 | + */ |
|
11387 | 11387 | |
11388 | 11388 | public function getAircraftRegistration($flightaware_id) |
11389 | 11389 | { |
@@ -11412,12 +11412,12 @@ discard block |
||
11412 | 11412 | |
11413 | 11413 | |
11414 | 11414 | /** |
11415 | - * Gets the aircraft registration from ModeS |
|
11416 | - * |
|
11417 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11418 | - * @return String the aircraft registration |
|
11419 | - * |
|
11420 | - */ |
|
11415 | + * Gets the aircraft registration from ModeS |
|
11416 | + * |
|
11417 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11418 | + * @return String the aircraft registration |
|
11419 | + * |
|
11420 | + */ |
|
11421 | 11421 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
11422 | 11422 | { |
11423 | 11423 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11430,19 +11430,19 @@ discard block |
||
11430 | 11430 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
11431 | 11431 | $sth->closeCursor(); |
11432 | 11432 | if (count($row) > 0) { |
11433 | - //return $row['Registration']; |
|
11434 | - return $row['registration']; |
|
11433 | + //return $row['Registration']; |
|
11434 | + return $row['registration']; |
|
11435 | 11435 | } else return ''; |
11436 | 11436 | |
11437 | 11437 | } |
11438 | 11438 | |
11439 | 11439 | /** |
11440 | - * Gets the aircraft type from ModeS |
|
11441 | - * |
|
11442 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11443 | - * @return String the aircraft type |
|
11444 | - * |
|
11445 | - */ |
|
11440 | + * Gets the aircraft type from ModeS |
|
11441 | + * |
|
11442 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11443 | + * @return String the aircraft type |
|
11444 | + * |
|
11445 | + */ |
|
11446 | 11446 | public function getAircraftTypeBymodeS($aircraft_modes) |
11447 | 11447 | { |
11448 | 11448 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11455,19 +11455,19 @@ discard block |
||
11455 | 11455 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
11456 | 11456 | $sth->closeCursor(); |
11457 | 11457 | if (count($row) > 0) { |
11458 | - if ($row['type_flight'] == null) return ''; |
|
11459 | - else return $row['type_flight']; |
|
11458 | + if ($row['type_flight'] == null) return ''; |
|
11459 | + else return $row['type_flight']; |
|
11460 | 11460 | } else return ''; |
11461 | 11461 | |
11462 | 11462 | } |
11463 | 11463 | |
11464 | 11464 | /** |
11465 | - * Gets Country from latitude/longitude |
|
11466 | - * |
|
11467 | - * @param Float $latitude latitute of the flight |
|
11468 | - * @param Float $longitude longitute of the flight |
|
11469 | - * @return String the countrie |
|
11470 | - */ |
|
11465 | + * Gets Country from latitude/longitude |
|
11466 | + * |
|
11467 | + * @param Float $latitude latitute of the flight |
|
11468 | + * @param Float $longitude longitute of the flight |
|
11469 | + * @return String the countrie |
|
11470 | + */ |
|
11471 | 11471 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
11472 | 11472 | { |
11473 | 11473 | global $globalDBdriver, $globalDebug; |
@@ -11504,11 +11504,11 @@ discard block |
||
11504 | 11504 | } |
11505 | 11505 | |
11506 | 11506 | /** |
11507 | - * Gets Country from iso2 |
|
11508 | - * |
|
11509 | - * @param String $iso2 ISO2 country code |
|
11510 | - * @return String the countrie |
|
11511 | - */ |
|
11507 | + * Gets Country from iso2 |
|
11508 | + * |
|
11509 | + * @param String $iso2 ISO2 country code |
|
11510 | + * @return String the countrie |
|
11511 | + */ |
|
11512 | 11512 | public function getCountryFromISO2($iso2) |
11513 | 11513 | { |
11514 | 11514 | global $globalDBdriver, $globalDebug; |
@@ -11536,12 +11536,12 @@ discard block |
||
11536 | 11536 | } |
11537 | 11537 | |
11538 | 11538 | /** |
11539 | - * converts the registration code using the country prefix |
|
11540 | - * |
|
11541 | - * @param String $registration the aircraft registration |
|
11542 | - * @return String the aircraft registration |
|
11543 | - * |
|
11544 | - */ |
|
11539 | + * converts the registration code using the country prefix |
|
11540 | + * |
|
11541 | + * @param String $registration the aircraft registration |
|
11542 | + * @return String the aircraft registration |
|
11543 | + * |
|
11544 | + */ |
|
11545 | 11545 | public function convertAircraftRegistration($registration) |
11546 | 11546 | { |
11547 | 11547 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11593,12 +11593,12 @@ discard block |
||
11593 | 11593 | } |
11594 | 11594 | |
11595 | 11595 | /** |
11596 | - * Country from the registration code |
|
11597 | - * |
|
11598 | - * @param String $registration the aircraft registration |
|
11599 | - * @return String the country |
|
11600 | - * |
|
11601 | - */ |
|
11596 | + * Country from the registration code |
|
11597 | + * |
|
11598 | + * @param String $registration the aircraft registration |
|
11599 | + * @return String the country |
|
11600 | + * |
|
11601 | + */ |
|
11602 | 11602 | public function countryFromAircraftRegistration($registration) |
11603 | 11603 | { |
11604 | 11604 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11617,8 +11617,8 @@ discard block |
||
11617 | 11617 | $country = $row['country']; |
11618 | 11618 | } |
11619 | 11619 | } else { |
11620 | - $registration_1 = substr($registration, 0, 1); |
|
11621 | - $registration_2 = substr($registration, 0, 2); |
|
11620 | + $registration_1 = substr($registration, 0, 1); |
|
11621 | + $registration_2 = substr($registration, 0, 2); |
|
11622 | 11622 | |
11623 | 11623 | $country = ''; |
11624 | 11624 | //first get the prefix based on two characters |
@@ -11654,12 +11654,12 @@ discard block |
||
11654 | 11654 | } |
11655 | 11655 | |
11656 | 11656 | /** |
11657 | - * Registration prefix from the registration code |
|
11658 | - * |
|
11659 | - * @param String $registration the aircraft registration |
|
11660 | - * @return String the registration prefix |
|
11661 | - * |
|
11662 | - */ |
|
11657 | + * Registration prefix from the registration code |
|
11658 | + * |
|
11659 | + * @param String $registration the aircraft registration |
|
11660 | + * @return String the registration prefix |
|
11661 | + * |
|
11662 | + */ |
|
11663 | 11663 | public function registrationPrefixFromAircraftRegistration($registration) |
11664 | 11664 | { |
11665 | 11665 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11678,8 +11678,8 @@ discard block |
||
11678 | 11678 | //$country = $row['country']; |
11679 | 11679 | } |
11680 | 11680 | } else { |
11681 | - $registration_1 = substr($registration, 0, 1); |
|
11682 | - $registration_2 = substr($registration, 0, 2); |
|
11681 | + $registration_1 = substr($registration, 0, 1); |
|
11682 | + $registration_2 = substr($registration, 0, 2); |
|
11683 | 11683 | |
11684 | 11684 | //first get the prefix based on two characters |
11685 | 11685 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -11715,12 +11715,12 @@ discard block |
||
11715 | 11715 | |
11716 | 11716 | |
11717 | 11717 | /** |
11718 | - * Country from the registration code |
|
11719 | - * |
|
11720 | - * @param String $registration the aircraft registration |
|
11721 | - * @return String the country |
|
11722 | - * |
|
11723 | - */ |
|
11718 | + * Country from the registration code |
|
11719 | + * |
|
11720 | + * @param String $registration the aircraft registration |
|
11721 | + * @return String the country |
|
11722 | + * |
|
11723 | + */ |
|
11724 | 11724 | public function countryFromAircraftRegistrationCode($registration) |
11725 | 11725 | { |
11726 | 11726 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11737,11 +11737,11 @@ discard block |
||
11737 | 11737 | } |
11738 | 11738 | |
11739 | 11739 | /** |
11740 | - * Set a new highlight value for a flight |
|
11741 | - * |
|
11742 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
11743 | - * @param String $highlight New highlight value |
|
11744 | - */ |
|
11740 | + * Set a new highlight value for a flight |
|
11741 | + * |
|
11742 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
11743 | + * @param String $highlight New highlight value |
|
11744 | + */ |
|
11745 | 11745 | public function setHighlightFlight($flightaware_id,$highlight) { |
11746 | 11746 | |
11747 | 11747 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -11750,12 +11750,12 @@ discard block |
||
11750 | 11750 | } |
11751 | 11751 | |
11752 | 11752 | /** |
11753 | - * Set a new highlight value for a flight by Registration |
|
11754 | - * |
|
11755 | - * @param String $registration Registration of the aircraft |
|
11756 | - * @param String $date Date of spotted aircraft |
|
11757 | - * @param String $highlight New highlight value |
|
11758 | - */ |
|
11753 | + * Set a new highlight value for a flight by Registration |
|
11754 | + * |
|
11755 | + * @param String $registration Registration of the aircraft |
|
11756 | + * @param String $date Date of spotted aircraft |
|
11757 | + * @param String $highlight New highlight value |
|
11758 | + */ |
|
11759 | 11759 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
11760 | 11760 | if ($date == '') { |
11761 | 11761 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -11769,12 +11769,12 @@ discard block |
||
11769 | 11769 | } |
11770 | 11770 | |
11771 | 11771 | /** |
11772 | - * Gets the short url from bit.ly |
|
11773 | - * |
|
11774 | - * @param String $url the full url |
|
11775 | - * @return String the bit.ly url |
|
11776 | - * |
|
11777 | - */ |
|
11772 | + * Gets the short url from bit.ly |
|
11773 | + * |
|
11774 | + * @param String $url the full url |
|
11775 | + * @return String the bit.ly url |
|
11776 | + * |
|
11777 | + */ |
|
11778 | 11778 | public function getBitlyURL($url) |
11779 | 11779 | { |
11780 | 11780 | global $globalBitlyAccessToken; |
@@ -12063,11 +12063,11 @@ discard block |
||
12063 | 12063 | $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 |
12064 | 12064 | 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)) |
12065 | 12065 | 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;"; |
12066 | - } else { |
|
12066 | + } else { |
|
12067 | 12067 | $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 |
12068 | 12068 | 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)) |
12069 | 12069 | 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;"; |
12070 | - } |
|
12070 | + } |
|
12071 | 12071 | $sth = $this->db->prepare($query); |
12072 | 12072 | $sth->execute(); |
12073 | 12073 | return $sth->fetchAll(PDO::FETCH_ASSOC); |