@@ -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(); |
@@ -166,14 +166,14 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * Executes the SQL statements to get the spotter information |
|
170 | - * |
|
171 | - * @param String $query the SQL query |
|
172 | - * @param Array $params parameter of the query |
|
173 | - * @param String $limitQuery the limit query |
|
174 | - * @return Array the spotter information |
|
175 | - * |
|
176 | - */ |
|
169 | + * Executes the SQL statements to get the spotter information |
|
170 | + * |
|
171 | + * @param String $query the SQL query |
|
172 | + * @param Array $params parameter of the query |
|
173 | + * @param String $limitQuery the limit query |
|
174 | + * @return Array the spotter information |
|
175 | + * |
|
176 | + */ |
|
177 | 177 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
178 | 178 | { |
179 | 179 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -342,11 +342,11 @@ discard block |
||
342 | 342 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
343 | 343 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
344 | 344 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
345 | - } else { |
|
346 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
345 | + } else { |
|
346 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
347 | 347 | $temp_array['aircraft_name'] = 'N/A'; |
348 | 348 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
349 | - } |
|
349 | + } |
|
350 | 350 | } |
351 | 351 | $fromsource = NULL; |
352 | 352 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -543,11 +543,11 @@ discard block |
||
543 | 543 | |
544 | 544 | |
545 | 545 | /** |
546 | - * Gets all the spotter information |
|
547 | - * |
|
548 | - * @return Array the spotter information |
|
549 | - * |
|
550 | - */ |
|
546 | + * Gets all the spotter information |
|
547 | + * |
|
548 | + * @return Array the spotter information |
|
549 | + * |
|
550 | + */ |
|
551 | 551 | 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()) |
552 | 552 | { |
553 | 553 | global $globalTimezone, $globalDBdriver; |
@@ -894,11 +894,11 @@ discard block |
||
894 | 894 | |
895 | 895 | |
896 | 896 | /** |
897 | - * Gets all the spotter information based on the latest data entry |
|
898 | - * |
|
899 | - * @return Array the spotter information |
|
900 | - * |
|
901 | - */ |
|
897 | + * Gets all the spotter information based on the latest data entry |
|
898 | + * |
|
899 | + * @return Array the spotter information |
|
900 | + * |
|
901 | + */ |
|
902 | 902 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
903 | 903 | { |
904 | 904 | global $global_query; |
@@ -937,12 +937,12 @@ discard block |
||
937 | 937 | } |
938 | 938 | |
939 | 939 | |
940 | - /** |
|
941 | - * Gets all the spotter information based on a user's latitude and longitude |
|
942 | - * |
|
943 | - * @return Array the spotter information |
|
944 | - * |
|
945 | - */ |
|
940 | + /** |
|
941 | + * Gets all the spotter information based on a user's latitude and longitude |
|
942 | + * |
|
943 | + * @return Array the spotter information |
|
944 | + * |
|
945 | + */ |
|
946 | 946 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
947 | 947 | { |
948 | 948 | date_default_timezone_set('UTC'); |
@@ -970,7 +970,7 @@ discard block |
||
970 | 970 | return false; |
971 | 971 | } |
972 | 972 | } |
973 | - $additional_query = ''; |
|
973 | + $additional_query = ''; |
|
974 | 974 | if ($interval != "") |
975 | 975 | { |
976 | 976 | if (!is_string($interval)) |
@@ -1010,12 +1010,12 @@ discard block |
||
1010 | 1010 | } |
1011 | 1011 | |
1012 | 1012 | |
1013 | - /** |
|
1014 | - * Gets all the spotter information sorted by the newest aircraft type |
|
1015 | - * |
|
1016 | - * @return Array the spotter information |
|
1017 | - * |
|
1018 | - */ |
|
1013 | + /** |
|
1014 | + * Gets all the spotter information sorted by the newest aircraft type |
|
1015 | + * |
|
1016 | + * @return Array the spotter information |
|
1017 | + * |
|
1018 | + */ |
|
1019 | 1019 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
1020 | 1020 | { |
1021 | 1021 | global $global_query; |
@@ -1056,11 +1056,11 @@ discard block |
||
1056 | 1056 | |
1057 | 1057 | |
1058 | 1058 | /** |
1059 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
1060 | - * |
|
1061 | - * @return Array the spotter information |
|
1062 | - * |
|
1063 | - */ |
|
1059 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
1060 | + * |
|
1061 | + * @return Array the spotter information |
|
1062 | + * |
|
1063 | + */ |
|
1064 | 1064 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
1065 | 1065 | { |
1066 | 1066 | global $global_query; |
@@ -1100,11 +1100,11 @@ discard block |
||
1100 | 1100 | |
1101 | 1101 | |
1102 | 1102 | /** |
1103 | - * Gets all the spotter information sorted by the newest airline |
|
1104 | - * |
|
1105 | - * @return Array the spotter information |
|
1106 | - * |
|
1107 | - */ |
|
1103 | + * Gets all the spotter information sorted by the newest airline |
|
1104 | + * |
|
1105 | + * @return Array the spotter information |
|
1106 | + * |
|
1107 | + */ |
|
1108 | 1108 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
1109 | 1109 | { |
1110 | 1110 | global $global_query; |
@@ -1143,12 +1143,12 @@ discard block |
||
1143 | 1143 | } |
1144 | 1144 | |
1145 | 1145 | |
1146 | - /** |
|
1147 | - * Gets all the spotter information sorted by the newest departure airport |
|
1148 | - * |
|
1149 | - * @return Array the spotter information |
|
1150 | - * |
|
1151 | - */ |
|
1146 | + /** |
|
1147 | + * Gets all the spotter information sorted by the newest departure airport |
|
1148 | + * |
|
1149 | + * @return Array the spotter information |
|
1150 | + * |
|
1151 | + */ |
|
1152 | 1152 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
1153 | 1153 | { |
1154 | 1154 | global $global_query; |
@@ -1190,11 +1190,11 @@ discard block |
||
1190 | 1190 | |
1191 | 1191 | |
1192 | 1192 | /** |
1193 | - * Gets all the spotter information sorted by the newest arrival airport |
|
1194 | - * |
|
1195 | - * @return Array the spotter information |
|
1196 | - * |
|
1197 | - */ |
|
1193 | + * Gets all the spotter information sorted by the newest arrival airport |
|
1194 | + * |
|
1195 | + * @return Array the spotter information |
|
1196 | + * |
|
1197 | + */ |
|
1198 | 1198 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
1199 | 1199 | { |
1200 | 1200 | global $global_query; |
@@ -1233,11 +1233,11 @@ discard block |
||
1233 | 1233 | |
1234 | 1234 | |
1235 | 1235 | /** |
1236 | - * Gets all the spotter information based on the spotter id |
|
1237 | - * |
|
1238 | - * @return Array the spotter information |
|
1239 | - * |
|
1240 | - */ |
|
1236 | + * Gets all the spotter information based on the spotter id |
|
1237 | + * |
|
1238 | + * @return Array the spotter information |
|
1239 | + * |
|
1240 | + */ |
|
1241 | 1241 | public function getSpotterDataByID($id = '') |
1242 | 1242 | { |
1243 | 1243 | global $global_query; |
@@ -1259,11 +1259,11 @@ discard block |
||
1259 | 1259 | |
1260 | 1260 | |
1261 | 1261 | /** |
1262 | - * Gets all the spotter information based on the callsign |
|
1263 | - * |
|
1264 | - * @return Array the spotter information |
|
1265 | - * |
|
1266 | - */ |
|
1262 | + * Gets all the spotter information based on the callsign |
|
1263 | + * |
|
1264 | + * @return Array the spotter information |
|
1265 | + * |
|
1266 | + */ |
|
1267 | 1267 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '', $filter = array()) |
1268 | 1268 | { |
1269 | 1269 | global $global_query; |
@@ -1315,11 +1315,11 @@ discard block |
||
1315 | 1315 | } |
1316 | 1316 | |
1317 | 1317 | /** |
1318 | - * Gets all the spotter information based on the owner |
|
1319 | - * |
|
1320 | - * @return Array the spotter information |
|
1321 | - * |
|
1322 | - */ |
|
1318 | + * Gets all the spotter information based on the owner |
|
1319 | + * |
|
1320 | + * @return Array the spotter information |
|
1321 | + * |
|
1322 | + */ |
|
1323 | 1323 | public function getSpotterDataByOwner($owner = '', $limit = '', $sort = '', $filter = array()) |
1324 | 1324 | { |
1325 | 1325 | global $global_query; |
@@ -1372,11 +1372,11 @@ discard block |
||
1372 | 1372 | } |
1373 | 1373 | |
1374 | 1374 | /** |
1375 | - * Gets all the spotter information based on the pilot |
|
1376 | - * |
|
1377 | - * @return Array the spotter information |
|
1378 | - * |
|
1379 | - */ |
|
1375 | + * Gets all the spotter information based on the pilot |
|
1376 | + * |
|
1377 | + * @return Array the spotter information |
|
1378 | + * |
|
1379 | + */ |
|
1380 | 1380 | public function getSpotterDataByPilot($pilot = '', $limit = '', $sort = '', $filter = array()) |
1381 | 1381 | { |
1382 | 1382 | global $global_query; |
@@ -1425,11 +1425,11 @@ discard block |
||
1425 | 1425 | |
1426 | 1426 | |
1427 | 1427 | /** |
1428 | - * Gets all the spotter information based on the aircraft type |
|
1429 | - * |
|
1430 | - * @return Array the spotter information |
|
1431 | - * |
|
1432 | - */ |
|
1428 | + * Gets all the spotter information based on the aircraft type |
|
1429 | + * |
|
1430 | + * @return Array the spotter information |
|
1431 | + * |
|
1432 | + */ |
|
1433 | 1433 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
1434 | 1434 | { |
1435 | 1435 | global $global_query; |
@@ -1483,11 +1483,11 @@ discard block |
||
1483 | 1483 | |
1484 | 1484 | |
1485 | 1485 | /** |
1486 | - * Gets all the spotter information based on the aircraft registration |
|
1487 | - * |
|
1488 | - * @return Array the spotter information |
|
1489 | - * |
|
1490 | - */ |
|
1486 | + * Gets all the spotter information based on the aircraft registration |
|
1487 | + * |
|
1488 | + * @return Array the spotter information |
|
1489 | + * |
|
1490 | + */ |
|
1491 | 1491 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
1492 | 1492 | { |
1493 | 1493 | global $global_query; |
@@ -1544,11 +1544,11 @@ discard block |
||
1544 | 1544 | |
1545 | 1545 | |
1546 | 1546 | /** |
1547 | - * Gets all the spotter information based on the airline |
|
1548 | - * |
|
1549 | - * @return Array the spotter information |
|
1550 | - * |
|
1551 | - */ |
|
1547 | + * Gets all the spotter information based on the airline |
|
1548 | + * |
|
1549 | + * @return Array the spotter information |
|
1550 | + * |
|
1551 | + */ |
|
1552 | 1552 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
1553 | 1553 | { |
1554 | 1554 | global $global_query; |
@@ -1601,11 +1601,11 @@ discard block |
||
1601 | 1601 | |
1602 | 1602 | |
1603 | 1603 | /** |
1604 | - * Gets all the spotter information based on the airport |
|
1605 | - * |
|
1606 | - * @return Array the spotter information |
|
1607 | - * |
|
1608 | - */ |
|
1604 | + * Gets all the spotter information based on the airport |
|
1605 | + * |
|
1606 | + * @return Array the spotter information |
|
1607 | + * |
|
1608 | + */ |
|
1609 | 1609 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
1610 | 1610 | { |
1611 | 1611 | global $global_query; |
@@ -1659,11 +1659,11 @@ discard block |
||
1659 | 1659 | |
1660 | 1660 | |
1661 | 1661 | /** |
1662 | - * Gets all the spotter information based on the date |
|
1663 | - * |
|
1664 | - * @return Array the spotter information |
|
1665 | - * |
|
1666 | - */ |
|
1662 | + * Gets all the spotter information based on the date |
|
1663 | + * |
|
1664 | + * @return Array the spotter information |
|
1665 | + * |
|
1666 | + */ |
|
1667 | 1667 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
1668 | 1668 | { |
1669 | 1669 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1727,11 +1727,11 @@ discard block |
||
1727 | 1727 | |
1728 | 1728 | |
1729 | 1729 | /** |
1730 | - * Gets all the spotter information based on the country name |
|
1731 | - * |
|
1732 | - * @return Array the spotter information |
|
1733 | - * |
|
1734 | - */ |
|
1730 | + * Gets all the spotter information based on the country name |
|
1731 | + * |
|
1732 | + * @return Array the spotter information |
|
1733 | + * |
|
1734 | + */ |
|
1735 | 1735 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
1736 | 1736 | { |
1737 | 1737 | global $global_query; |
@@ -1785,11 +1785,11 @@ discard block |
||
1785 | 1785 | |
1786 | 1786 | |
1787 | 1787 | /** |
1788 | - * Gets all the spotter information based on the manufacturer name |
|
1789 | - * |
|
1790 | - * @return Array the spotter information |
|
1791 | - * |
|
1792 | - */ |
|
1788 | + * Gets all the spotter information based on the manufacturer name |
|
1789 | + * |
|
1790 | + * @return Array the spotter information |
|
1791 | + * |
|
1792 | + */ |
|
1793 | 1793 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
1794 | 1794 | { |
1795 | 1795 | global $global_query; |
@@ -1845,13 +1845,13 @@ discard block |
||
1845 | 1845 | |
1846 | 1846 | |
1847 | 1847 | /** |
1848 | - * Gets a list of all aircraft that take a route |
|
1849 | - * |
|
1850 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
1851 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1852 | - * @return Array the spotter information |
|
1853 | - * |
|
1854 | - */ |
|
1848 | + * Gets a list of all aircraft that take a route |
|
1849 | + * |
|
1850 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
1851 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1852 | + * @return Array the spotter information |
|
1853 | + * |
|
1854 | + */ |
|
1855 | 1855 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
1856 | 1856 | { |
1857 | 1857 | global $global_query; |
@@ -1920,11 +1920,11 @@ discard block |
||
1920 | 1920 | |
1921 | 1921 | |
1922 | 1922 | /** |
1923 | - * Gets all the spotter information based on the special column in the table |
|
1924 | - * |
|
1925 | - * @return Array the spotter information |
|
1926 | - * |
|
1927 | - */ |
|
1923 | + * Gets all the spotter information based on the special column in the table |
|
1924 | + * |
|
1925 | + * @return Array the spotter information |
|
1926 | + * |
|
1927 | + */ |
|
1928 | 1928 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
1929 | 1929 | { |
1930 | 1930 | global $global_query; |
@@ -1963,11 +1963,11 @@ discard block |
||
1963 | 1963 | } |
1964 | 1964 | |
1965 | 1965 | /** |
1966 | - * Gets all the highlight based on a aircraft registration |
|
1967 | - * |
|
1968 | - * @return String the highlight text |
|
1969 | - * |
|
1970 | - */ |
|
1966 | + * Gets all the highlight based on a aircraft registration |
|
1967 | + * |
|
1968 | + * @return String the highlight text |
|
1969 | + * |
|
1970 | + */ |
|
1971 | 1971 | public function getHighlightByRegistration($registration,$filter = array()) |
1972 | 1972 | { |
1973 | 1973 | global $global_query; |
@@ -1989,13 +1989,13 @@ discard block |
||
1989 | 1989 | |
1990 | 1990 | |
1991 | 1991 | /** |
1992 | - * Gets the squawk usage from squawk code |
|
1993 | - * |
|
1994 | - * @param String $squawk squawk code |
|
1995 | - * @param String $country country |
|
1996 | - * @return String usage |
|
1997 | - * |
|
1998 | - */ |
|
1992 | + * Gets the squawk usage from squawk code |
|
1993 | + * |
|
1994 | + * @param String $squawk squawk code |
|
1995 | + * @param String $country country |
|
1996 | + * @return String usage |
|
1997 | + * |
|
1998 | + */ |
|
1999 | 1999 | public function getSquawkUsage($squawk = '',$country = 'FR') |
2000 | 2000 | { |
2001 | 2001 | |
@@ -2016,12 +2016,12 @@ discard block |
||
2016 | 2016 | } |
2017 | 2017 | |
2018 | 2018 | /** |
2019 | - * Gets the airport icao from the iata |
|
2020 | - * |
|
2021 | - * @param String $airport_iata the iata code of the airport |
|
2022 | - * @return String airport iata |
|
2023 | - * |
|
2024 | - */ |
|
2019 | + * Gets the airport icao from the iata |
|
2020 | + * |
|
2021 | + * @param String $airport_iata the iata code of the airport |
|
2022 | + * @return String airport iata |
|
2023 | + * |
|
2024 | + */ |
|
2025 | 2025 | public function getAirportIcao($airport_iata = '') |
2026 | 2026 | { |
2027 | 2027 | |
@@ -2041,14 +2041,14 @@ discard block |
||
2041 | 2041 | } |
2042 | 2042 | |
2043 | 2043 | /** |
2044 | - * Gets the airport distance |
|
2045 | - * |
|
2046 | - * @param String $airport_icao the icao code of the airport |
|
2047 | - * @param Float $latitude the latitude |
|
2048 | - * @param Float $longitude the longitude |
|
2049 | - * @return Float distance to the airport |
|
2050 | - * |
|
2051 | - */ |
|
2044 | + * Gets the airport distance |
|
2045 | + * |
|
2046 | + * @param String $airport_icao the icao code of the airport |
|
2047 | + * @param Float $latitude the latitude |
|
2048 | + * @param Float $longitude the longitude |
|
2049 | + * @return Float distance to the airport |
|
2050 | + * |
|
2051 | + */ |
|
2052 | 2052 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
2053 | 2053 | { |
2054 | 2054 | |
@@ -2069,12 +2069,12 @@ discard block |
||
2069 | 2069 | } |
2070 | 2070 | |
2071 | 2071 | /** |
2072 | - * Gets the airport info based on the icao |
|
2073 | - * |
|
2074 | - * @param String $airport the icao code of the airport |
|
2075 | - * @return Array airport information |
|
2076 | - * |
|
2077 | - */ |
|
2072 | + * Gets the airport info based on the icao |
|
2073 | + * |
|
2074 | + * @param String $airport the icao code of the airport |
|
2075 | + * @return Array airport information |
|
2076 | + * |
|
2077 | + */ |
|
2078 | 2078 | public function getAllAirportInfo($airport = '') |
2079 | 2079 | { |
2080 | 2080 | |
@@ -2120,12 +2120,12 @@ discard block |
||
2120 | 2120 | } |
2121 | 2121 | |
2122 | 2122 | /** |
2123 | - * Gets the airport info based on the country |
|
2124 | - * |
|
2125 | - * @param Array $countries Airports countries |
|
2126 | - * @return Array airport information |
|
2127 | - * |
|
2128 | - */ |
|
2123 | + * Gets the airport info based on the country |
|
2124 | + * |
|
2125 | + * @param Array $countries Airports countries |
|
2126 | + * @return Array airport information |
|
2127 | + * |
|
2128 | + */ |
|
2129 | 2129 | public function getAllAirportInfobyCountry($countries) |
2130 | 2130 | { |
2131 | 2131 | $lst_countries = ''; |
@@ -2163,12 +2163,12 @@ discard block |
||
2163 | 2163 | } |
2164 | 2164 | |
2165 | 2165 | /** |
2166 | - * Gets airports info based on the coord |
|
2167 | - * |
|
2168 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2169 | - * @return Array airport information |
|
2170 | - * |
|
2171 | - */ |
|
2166 | + * Gets airports info based on the coord |
|
2167 | + * |
|
2168 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2169 | + * @return Array airport information |
|
2170 | + * |
|
2171 | + */ |
|
2172 | 2172 | public function getAllAirportInfobyCoord($coord) |
2173 | 2173 | { |
2174 | 2174 | global $globalDBdriver; |
@@ -2199,12 +2199,12 @@ discard block |
||
2199 | 2199 | } |
2200 | 2200 | |
2201 | 2201 | /** |
2202 | - * Gets waypoints info based on the coord |
|
2203 | - * |
|
2204 | - * @param Array $coord waypoints coord |
|
2205 | - * @return Array airport information |
|
2206 | - * |
|
2207 | - */ |
|
2202 | + * Gets waypoints info based on the coord |
|
2203 | + * |
|
2204 | + * @param Array $coord waypoints coord |
|
2205 | + * @return Array airport information |
|
2206 | + * |
|
2207 | + */ |
|
2208 | 2208 | public function getAllWaypointsInfobyCoord($coord) |
2209 | 2209 | { |
2210 | 2210 | if (is_array($coord)) { |
@@ -2238,12 +2238,12 @@ discard block |
||
2238 | 2238 | |
2239 | 2239 | |
2240 | 2240 | /** |
2241 | - * Gets the airline info based on the icao code or iata code |
|
2242 | - * |
|
2243 | - * @param String $airline_icao the iata code of the airport |
|
2244 | - * @return Array airport information |
|
2245 | - * |
|
2246 | - */ |
|
2241 | + * Gets the airline info based on the icao code or iata code |
|
2242 | + * |
|
2243 | + * @param String $airline_icao the iata code of the airport |
|
2244 | + * @return Array airport information |
|
2245 | + * |
|
2246 | + */ |
|
2247 | 2247 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
2248 | 2248 | { |
2249 | 2249 | global $globalUseRealAirlines; |
@@ -2274,7 +2274,7 @@ discard block |
||
2274 | 2274 | } else { |
2275 | 2275 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
2276 | 2276 | } |
2277 | - /* |
|
2277 | + /* |
|
2278 | 2278 | $airline_array = array(); |
2279 | 2279 | $temp_array = array(); |
2280 | 2280 | |
@@ -2307,12 +2307,12 @@ discard block |
||
2307 | 2307 | } |
2308 | 2308 | |
2309 | 2309 | /** |
2310 | - * Gets the airline info based on the airline name |
|
2311 | - * |
|
2312 | - * @param String $airline_name the name of the airline |
|
2313 | - * @return Array airline information |
|
2314 | - * |
|
2315 | - */ |
|
2310 | + * Gets the airline info based on the airline name |
|
2311 | + * |
|
2312 | + * @param String $airline_name the name of the airline |
|
2313 | + * @return Array airline information |
|
2314 | + * |
|
2315 | + */ |
|
2316 | 2316 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
2317 | 2317 | { |
2318 | 2318 | global $globalUseRealAirlines; |
@@ -2340,12 +2340,12 @@ discard block |
||
2340 | 2340 | |
2341 | 2341 | |
2342 | 2342 | /** |
2343 | - * Gets the aircraft info based on the aircraft type |
|
2344 | - * |
|
2345 | - * @param String $aircraft_type the aircraft type |
|
2346 | - * @return Array aircraft information |
|
2347 | - * |
|
2348 | - */ |
|
2343 | + * Gets the aircraft info based on the aircraft type |
|
2344 | + * |
|
2345 | + * @param String $aircraft_type the aircraft type |
|
2346 | + * @return Array aircraft information |
|
2347 | + * |
|
2348 | + */ |
|
2349 | 2349 | public function getAllAircraftInfo($aircraft_type) |
2350 | 2350 | { |
2351 | 2351 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2377,12 +2377,12 @@ discard block |
||
2377 | 2377 | } |
2378 | 2378 | |
2379 | 2379 | /** |
2380 | - * Gets the aircraft icao based on the aircraft name/type |
|
2381 | - * |
|
2382 | - * @param String $aircraft_type the aircraft type |
|
2383 | - * @return String aircraft information |
|
2384 | - * |
|
2385 | - */ |
|
2380 | + * Gets the aircraft icao based on the aircraft name/type |
|
2381 | + * |
|
2382 | + * @param String $aircraft_type the aircraft type |
|
2383 | + * @return String aircraft information |
|
2384 | + * |
|
2385 | + */ |
|
2386 | 2386 | public function getAircraftIcao($aircraft_type) |
2387 | 2387 | { |
2388 | 2388 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2407,12 +2407,12 @@ discard block |
||
2407 | 2407 | } |
2408 | 2408 | |
2409 | 2409 | /** |
2410 | - * Gets the aircraft info based on the aircraft modes |
|
2411 | - * |
|
2412 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
2413 | - * @return String aircraft type |
|
2414 | - * |
|
2415 | - */ |
|
2410 | + * Gets the aircraft info based on the aircraft modes |
|
2411 | + * |
|
2412 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
2413 | + * @return String aircraft type |
|
2414 | + * |
|
2415 | + */ |
|
2416 | 2416 | public function getAllAircraftType($aircraft_modes,$source_type = '') |
2417 | 2417 | { |
2418 | 2418 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2439,12 +2439,12 @@ discard block |
||
2439 | 2439 | } |
2440 | 2440 | |
2441 | 2441 | /** |
2442 | - * Gets the aircraft info based on the aircraft registration |
|
2443 | - * |
|
2444 | - * @param String $registration the aircraft registration |
|
2445 | - * @return String aircraft type |
|
2446 | - * |
|
2447 | - */ |
|
2442 | + * Gets the aircraft info based on the aircraft registration |
|
2443 | + * |
|
2444 | + * @param String $registration the aircraft registration |
|
2445 | + * @return String aircraft type |
|
2446 | + * |
|
2447 | + */ |
|
2448 | 2448 | public function getAllAircraftTypeByRegistration($registration) |
2449 | 2449 | { |
2450 | 2450 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2462,12 +2462,12 @@ discard block |
||
2462 | 2462 | } |
2463 | 2463 | |
2464 | 2464 | /** |
2465 | - * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2466 | - * |
|
2467 | - * @param String $registration the aircraft registration |
|
2468 | - * @return Array spotter_id and flightaware_id |
|
2469 | - * |
|
2470 | - */ |
|
2465 | + * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2466 | + * |
|
2467 | + * @param String $registration the aircraft registration |
|
2468 | + * @return Array spotter_id and flightaware_id |
|
2469 | + * |
|
2470 | + */ |
|
2471 | 2471 | public function getAllIDByRegistration($registration) |
2472 | 2472 | { |
2473 | 2473 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2486,12 +2486,12 @@ discard block |
||
2486 | 2486 | } |
2487 | 2487 | |
2488 | 2488 | /** |
2489 | - * Gets correct aircraft operator code |
|
2490 | - * |
|
2491 | - * @param String $operator the aircraft operator code (callsign) |
|
2492 | - * @return String aircraft operator code |
|
2493 | - * |
|
2494 | - */ |
|
2489 | + * Gets correct aircraft operator code |
|
2490 | + * |
|
2491 | + * @param String $operator the aircraft operator code (callsign) |
|
2492 | + * @return String aircraft operator code |
|
2493 | + * |
|
2494 | + */ |
|
2495 | 2495 | public function getOperator($operator) |
2496 | 2496 | { |
2497 | 2497 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2508,16 +2508,16 @@ discard block |
||
2508 | 2508 | } |
2509 | 2509 | |
2510 | 2510 | /** |
2511 | - * Gets the aircraft route based on the aircraft callsign |
|
2512 | - * |
|
2513 | - * @param String $callsign the aircraft callsign |
|
2514 | - * @return Array aircraft type |
|
2515 | - * |
|
2516 | - */ |
|
2511 | + * Gets the aircraft route based on the aircraft callsign |
|
2512 | + * |
|
2513 | + * @param String $callsign the aircraft callsign |
|
2514 | + * @return Array aircraft type |
|
2515 | + * |
|
2516 | + */ |
|
2517 | 2517 | public function getRouteInfo($callsign) |
2518 | 2518 | { |
2519 | 2519 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
2520 | - if ($callsign == '') return array(); |
|
2520 | + if ($callsign == '') return array(); |
|
2521 | 2521 | $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"; |
2522 | 2522 | |
2523 | 2523 | $sth = $this->db->prepare($query); |
@@ -2531,12 +2531,12 @@ discard block |
||
2531 | 2531 | } |
2532 | 2532 | |
2533 | 2533 | /** |
2534 | - * Gets the aircraft info based on the aircraft registration |
|
2535 | - * |
|
2536 | - * @param String $registration the aircraft registration |
|
2537 | - * @return Array aircraft information |
|
2538 | - * |
|
2539 | - */ |
|
2534 | + * Gets the aircraft info based on the aircraft registration |
|
2535 | + * |
|
2536 | + * @param String $registration the aircraft registration |
|
2537 | + * @return Array aircraft information |
|
2538 | + * |
|
2539 | + */ |
|
2540 | 2540 | public function getAircraftInfoByRegistration($registration) |
2541 | 2541 | { |
2542 | 2542 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2563,12 +2563,12 @@ discard block |
||
2563 | 2563 | } |
2564 | 2564 | |
2565 | 2565 | /** |
2566 | - * Gets the aircraft owner & base based on the aircraft registration |
|
2567 | - * |
|
2568 | - * @param String $registration the aircraft registration |
|
2569 | - * @return Array aircraft information |
|
2570 | - * |
|
2571 | - */ |
|
2566 | + * Gets the aircraft owner & base based on the aircraft registration |
|
2567 | + * |
|
2568 | + * @param String $registration the aircraft registration |
|
2569 | + * @return Array aircraft information |
|
2570 | + * |
|
2571 | + */ |
|
2572 | 2572 | public function getAircraftOwnerByRegistration($registration) |
2573 | 2573 | { |
2574 | 2574 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2585,11 +2585,11 @@ discard block |
||
2585 | 2585 | |
2586 | 2586 | |
2587 | 2587 | /** |
2588 | - * Gets all flights (but with only little info) |
|
2589 | - * |
|
2590 | - * @return Array basic flight information |
|
2591 | - * |
|
2592 | - */ |
|
2588 | + * Gets all flights (but with only little info) |
|
2589 | + * |
|
2590 | + * @return Array basic flight information |
|
2591 | + * |
|
2592 | + */ |
|
2593 | 2593 | public function getAllFlightsforSitemap() |
2594 | 2594 | { |
2595 | 2595 | //$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 "; |
@@ -2597,7 +2597,7 @@ discard block |
||
2597 | 2597 | |
2598 | 2598 | $sth = $this->db->prepare($query); |
2599 | 2599 | $sth->execute(); |
2600 | - /* |
|
2600 | + /* |
|
2601 | 2601 | $flight_array = array(); |
2602 | 2602 | $temp_array = array(); |
2603 | 2603 | |
@@ -2619,11 +2619,11 @@ discard block |
||
2619 | 2619 | } |
2620 | 2620 | |
2621 | 2621 | /** |
2622 | - * Gets a list of all aircraft manufacturers |
|
2623 | - * |
|
2624 | - * @return Array list of aircraft types |
|
2625 | - * |
|
2626 | - */ |
|
2622 | + * Gets a list of all aircraft manufacturers |
|
2623 | + * |
|
2624 | + * @return Array list of aircraft types |
|
2625 | + * |
|
2626 | + */ |
|
2627 | 2627 | public function getAllManufacturers() |
2628 | 2628 | { |
2629 | 2629 | /* |
@@ -2652,11 +2652,11 @@ discard block |
||
2652 | 2652 | |
2653 | 2653 | |
2654 | 2654 | /** |
2655 | - * Gets a list of all aircraft types |
|
2656 | - * |
|
2657 | - * @return Array list of aircraft types |
|
2658 | - * |
|
2659 | - */ |
|
2655 | + * Gets a list of all aircraft types |
|
2656 | + * |
|
2657 | + * @return Array list of aircraft types |
|
2658 | + * |
|
2659 | + */ |
|
2660 | 2660 | public function getAllAircraftTypes($filters = array()) |
2661 | 2661 | { |
2662 | 2662 | /* |
@@ -2691,11 +2691,11 @@ discard block |
||
2691 | 2691 | |
2692 | 2692 | |
2693 | 2693 | /** |
2694 | - * Gets a list of all aircraft registrations |
|
2695 | - * |
|
2696 | - * @return Array list of aircraft registrations |
|
2697 | - * |
|
2698 | - */ |
|
2694 | + * Gets a list of all aircraft registrations |
|
2695 | + * |
|
2696 | + * @return Array list of aircraft registrations |
|
2697 | + * |
|
2698 | + */ |
|
2699 | 2699 | public function getAllAircraftRegistrations($filters = array()) |
2700 | 2700 | { |
2701 | 2701 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2720,12 +2720,12 @@ discard block |
||
2720 | 2720 | } |
2721 | 2721 | |
2722 | 2722 | /** |
2723 | - * Gets all source name |
|
2724 | - * |
|
2725 | - * @param String type format of source |
|
2726 | - * @return Array list of source name |
|
2727 | - * |
|
2728 | - */ |
|
2723 | + * Gets all source name |
|
2724 | + * |
|
2725 | + * @param String type format of source |
|
2726 | + * @return Array list of source name |
|
2727 | + * |
|
2728 | + */ |
|
2729 | 2729 | public function getAllSourceName($type = '',$filters = array()) |
2730 | 2730 | { |
2731 | 2731 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2756,11 +2756,11 @@ discard block |
||
2756 | 2756 | |
2757 | 2757 | |
2758 | 2758 | /** |
2759 | - * Gets a list of all airline names |
|
2760 | - * |
|
2761 | - * @return Array list of airline names |
|
2762 | - * |
|
2763 | - */ |
|
2759 | + * Gets a list of all airline names |
|
2760 | + * |
|
2761 | + * @return Array list of airline names |
|
2762 | + * |
|
2763 | + */ |
|
2764 | 2764 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
2765 | 2765 | { |
2766 | 2766 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2809,11 +2809,11 @@ discard block |
||
2809 | 2809 | } |
2810 | 2810 | |
2811 | 2811 | /** |
2812 | - * Gets a list of all alliance names |
|
2813 | - * |
|
2814 | - * @return Array list of alliance names |
|
2815 | - * |
|
2816 | - */ |
|
2812 | + * Gets a list of all alliance names |
|
2813 | + * |
|
2814 | + * @return Array list of alliance names |
|
2815 | + * |
|
2816 | + */ |
|
2817 | 2817 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
2818 | 2818 | { |
2819 | 2819 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2838,11 +2838,11 @@ discard block |
||
2838 | 2838 | } |
2839 | 2839 | |
2840 | 2840 | /** |
2841 | - * Gets a list of all airline countries |
|
2842 | - * |
|
2843 | - * @return Array list of airline countries |
|
2844 | - * |
|
2845 | - */ |
|
2841 | + * Gets a list of all airline countries |
|
2842 | + * |
|
2843 | + * @return Array list of airline countries |
|
2844 | + * |
|
2845 | + */ |
|
2846 | 2846 | public function getAllAirlineCountries($filters = array()) |
2847 | 2847 | { |
2848 | 2848 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2870,11 +2870,11 @@ discard block |
||
2870 | 2870 | |
2871 | 2871 | |
2872 | 2872 | /** |
2873 | - * Gets a list of all departure & arrival names |
|
2874 | - * |
|
2875 | - * @return Array list of airport names |
|
2876 | - * |
|
2877 | - */ |
|
2873 | + * Gets a list of all departure & arrival names |
|
2874 | + * |
|
2875 | + * @return Array list of airport names |
|
2876 | + * |
|
2877 | + */ |
|
2878 | 2878 | public function getAllAirportNames($filters = array()) |
2879 | 2879 | { |
2880 | 2880 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2922,11 +2922,11 @@ discard block |
||
2922 | 2922 | } |
2923 | 2923 | |
2924 | 2924 | /** |
2925 | - * Gets a list of all owner names |
|
2926 | - * |
|
2927 | - * @return Array list of owner names |
|
2928 | - * |
|
2929 | - */ |
|
2925 | + * Gets a list of all owner names |
|
2926 | + * |
|
2927 | + * @return Array list of owner names |
|
2928 | + * |
|
2929 | + */ |
|
2930 | 2930 | public function getAllOwnerNames($filters = array()) |
2931 | 2931 | { |
2932 | 2932 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2940,11 +2940,11 @@ discard block |
||
2940 | 2940 | } |
2941 | 2941 | |
2942 | 2942 | /** |
2943 | - * Gets a list of all pilot names and pilot ids |
|
2944 | - * |
|
2945 | - * @return Array list of pilot names and pilot ids |
|
2946 | - * |
|
2947 | - */ |
|
2943 | + * Gets a list of all pilot names and pilot ids |
|
2944 | + * |
|
2945 | + * @return Array list of pilot names and pilot ids |
|
2946 | + * |
|
2947 | + */ |
|
2948 | 2948 | public function getAllPilotNames($filters = array()) |
2949 | 2949 | { |
2950 | 2950 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2959,11 +2959,11 @@ discard block |
||
2959 | 2959 | |
2960 | 2960 | |
2961 | 2961 | /** |
2962 | - * Gets a list of all departure & arrival airport countries |
|
2963 | - * |
|
2964 | - * @return Array list of airport countries |
|
2965 | - * |
|
2966 | - */ |
|
2962 | + * Gets a list of all departure & arrival airport countries |
|
2963 | + * |
|
2964 | + * @return Array list of airport countries |
|
2965 | + * |
|
2966 | + */ |
|
2967 | 2967 | public function getAllAirportCountries($filters = array()) |
2968 | 2968 | { |
2969 | 2969 | $airport_array = array(); |
@@ -3011,11 +3011,11 @@ discard block |
||
3011 | 3011 | |
3012 | 3012 | |
3013 | 3013 | /** |
3014 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
3015 | - * |
|
3016 | - * @return Array list of countries |
|
3017 | - * |
|
3018 | - */ |
|
3014 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
3015 | + * |
|
3016 | + * @return Array list of countries |
|
3017 | + * |
|
3018 | + */ |
|
3019 | 3019 | public function getAllCountries($filters = array()) |
3020 | 3020 | { |
3021 | 3021 | $Connection= new Connection($this->db); |
@@ -3092,11 +3092,11 @@ discard block |
||
3092 | 3092 | |
3093 | 3093 | |
3094 | 3094 | /** |
3095 | - * Gets a list of all idents/callsigns |
|
3096 | - * |
|
3097 | - * @return Array list of ident/callsign names |
|
3098 | - * |
|
3099 | - */ |
|
3095 | + * Gets a list of all idents/callsigns |
|
3096 | + * |
|
3097 | + * @return Array list of ident/callsign names |
|
3098 | + * |
|
3099 | + */ |
|
3100 | 3100 | public function getAllIdents($filters = array()) |
3101 | 3101 | { |
3102 | 3102 | $filter_query = $this->getFilter($filters,true,true); |
@@ -3120,9 +3120,9 @@ discard block |
||
3120 | 3120 | } |
3121 | 3121 | |
3122 | 3122 | /** |
3123 | - * Get a list of flights from airport since 7 days |
|
3124 | - * @return Array number, icao, name and city of airports |
|
3125 | - */ |
|
3123 | + * Get a list of flights from airport since 7 days |
|
3124 | + * @return Array number, icao, name and city of airports |
|
3125 | + */ |
|
3126 | 3126 | |
3127 | 3127 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
3128 | 3128 | global $globalTimezone, $globalDBdriver; |
@@ -3153,9 +3153,9 @@ discard block |
||
3153 | 3153 | } |
3154 | 3154 | |
3155 | 3155 | /** |
3156 | - * Get a list of flights from airport since 7 days |
|
3157 | - * @return Array number, icao, name and city of airports |
|
3158 | - */ |
|
3156 | + * Get a list of flights from airport since 7 days |
|
3157 | + * @return Array number, icao, name and city of airports |
|
3158 | + */ |
|
3159 | 3159 | |
3160 | 3160 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
3161 | 3161 | global $globalTimezone, $globalDBdriver; |
@@ -3185,9 +3185,9 @@ discard block |
||
3185 | 3185 | } |
3186 | 3186 | |
3187 | 3187 | /** |
3188 | - * Get a list of flights from detected airport since 7 days |
|
3189 | - * @return Array number, icao, name and city of airports |
|
3190 | - */ |
|
3188 | + * Get a list of flights from detected airport since 7 days |
|
3189 | + * @return Array number, icao, name and city of airports |
|
3190 | + */ |
|
3191 | 3191 | |
3192 | 3192 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
3193 | 3193 | global $globalTimezone, $globalDBdriver; |
@@ -3225,9 +3225,9 @@ discard block |
||
3225 | 3225 | } |
3226 | 3226 | |
3227 | 3227 | /** |
3228 | - * Get a list of flights from detected airport since 7 days |
|
3229 | - * @return Array number, icao, name and city of airports |
|
3230 | - */ |
|
3228 | + * Get a list of flights from detected airport since 7 days |
|
3229 | + * @return Array number, icao, name and city of airports |
|
3230 | + */ |
|
3231 | 3231 | |
3232 | 3232 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
3233 | 3233 | global $globalTimezone, $globalDBdriver; |
@@ -3269,9 +3269,9 @@ discard block |
||
3269 | 3269 | |
3270 | 3270 | |
3271 | 3271 | /** |
3272 | - * Get a list of flights to airport since 7 days |
|
3273 | - * @return Array number, icao, name and city of airports |
|
3274 | - */ |
|
3272 | + * Get a list of flights to airport since 7 days |
|
3273 | + * @return Array number, icao, name and city of airports |
|
3274 | + */ |
|
3275 | 3275 | |
3276 | 3276 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
3277 | 3277 | global $globalTimezone, $globalDBdriver; |
@@ -3304,9 +3304,9 @@ discard block |
||
3304 | 3304 | |
3305 | 3305 | |
3306 | 3306 | /** |
3307 | - * Get a list of flights detected to airport since 7 days |
|
3308 | - * @return Array number, icao, name and city of airports |
|
3309 | - */ |
|
3307 | + * Get a list of flights detected to airport since 7 days |
|
3308 | + * @return Array number, icao, name and city of airports |
|
3309 | + */ |
|
3310 | 3310 | |
3311 | 3311 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
3312 | 3312 | global $globalTimezone, $globalDBdriver; |
@@ -3347,9 +3347,9 @@ discard block |
||
3347 | 3347 | |
3348 | 3348 | |
3349 | 3349 | /** |
3350 | - * Get a list of flights to airport since 7 days |
|
3351 | - * @return Array number, icao, name and city of airports |
|
3352 | - */ |
|
3350 | + * Get a list of flights to airport since 7 days |
|
3351 | + * @return Array number, icao, name and city of airports |
|
3352 | + */ |
|
3353 | 3353 | |
3354 | 3354 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
3355 | 3355 | global $globalTimezone, $globalDBdriver; |
@@ -3381,9 +3381,9 @@ discard block |
||
3381 | 3381 | |
3382 | 3382 | |
3383 | 3383 | /** |
3384 | - * Get a list of flights detected to airport since 7 days |
|
3385 | - * @return Array number, icao, name and city of airports |
|
3386 | - */ |
|
3384 | + * Get a list of flights detected to airport since 7 days |
|
3385 | + * @return Array number, icao, name and city of airports |
|
3386 | + */ |
|
3387 | 3387 | |
3388 | 3388 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
3389 | 3389 | global $globalTimezone, $globalDBdriver; |
@@ -3427,11 +3427,11 @@ discard block |
||
3427 | 3427 | |
3428 | 3428 | |
3429 | 3429 | /** |
3430 | - * Gets a list of all dates |
|
3431 | - * |
|
3432 | - * @return Array list of date names |
|
3433 | - * |
|
3434 | - */ |
|
3430 | + * Gets a list of all dates |
|
3431 | + * |
|
3432 | + * @return Array list of date names |
|
3433 | + * |
|
3434 | + */ |
|
3435 | 3435 | public function getAllDates() |
3436 | 3436 | { |
3437 | 3437 | global $globalTimezone, $globalDBdriver; |
@@ -3472,11 +3472,11 @@ discard block |
||
3472 | 3472 | |
3473 | 3473 | |
3474 | 3474 | /** |
3475 | - * Gets all route combinations |
|
3476 | - * |
|
3477 | - * @return Array the route list |
|
3478 | - * |
|
3479 | - */ |
|
3475 | + * Gets all route combinations |
|
3476 | + * |
|
3477 | + * @return Array the route list |
|
3478 | + * |
|
3479 | + */ |
|
3480 | 3480 | public function getAllRoutes() |
3481 | 3481 | { |
3482 | 3482 | $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 |
@@ -3502,13 +3502,13 @@ discard block |
||
3502 | 3502 | } |
3503 | 3503 | |
3504 | 3504 | /** |
3505 | - * Update ident spotter data |
|
3506 | - * |
|
3507 | - * @param String $flightaware_id the ID from flightaware |
|
3508 | - * @param String $ident the flight ident |
|
3509 | - * @return String success or false |
|
3510 | - * |
|
3511 | - */ |
|
3505 | + * Update ident spotter data |
|
3506 | + * |
|
3507 | + * @param String $flightaware_id the ID from flightaware |
|
3508 | + * @param String $ident the flight ident |
|
3509 | + * @return String success or false |
|
3510 | + * |
|
3511 | + */ |
|
3512 | 3512 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
3513 | 3513 | { |
3514 | 3514 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3529,14 +3529,14 @@ discard block |
||
3529 | 3529 | } else { |
3530 | 3530 | $airline_array = $this->getAllAirlineInfo("NA"); |
3531 | 3531 | } |
3532 | - $airline_name = $airline_array[0]['name']; |
|
3533 | - $airline_icao = $airline_array[0]['icao']; |
|
3534 | - $airline_country = $airline_array[0]['country']; |
|
3535 | - $airline_type = $airline_array[0]['type']; |
|
3532 | + $airline_name = $airline_array[0]['name']; |
|
3533 | + $airline_icao = $airline_array[0]['icao']; |
|
3534 | + $airline_country = $airline_array[0]['country']; |
|
3535 | + $airline_type = $airline_array[0]['type']; |
|
3536 | 3536 | |
3537 | 3537 | |
3538 | 3538 | $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'; |
3539 | - $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); |
|
3539 | + $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); |
|
3540 | 3540 | |
3541 | 3541 | try { |
3542 | 3542 | $sth = $this->db->prepare($query); |
@@ -3549,19 +3549,19 @@ discard block |
||
3549 | 3549 | |
3550 | 3550 | } |
3551 | 3551 | /** |
3552 | - * Update latest spotter data |
|
3553 | - * |
|
3554 | - * @param String $flightaware_id the ID from flightaware |
|
3555 | - * @param String $ident the flight ident |
|
3556 | - * @param String $arrival_airport_icao the arrival airport |
|
3557 | - * @return String success or false |
|
3558 | - * |
|
3559 | - */ |
|
3552 | + * Update latest spotter data |
|
3553 | + * |
|
3554 | + * @param String $flightaware_id the ID from flightaware |
|
3555 | + * @param String $ident the flight ident |
|
3556 | + * @param String $arrival_airport_icao the arrival airport |
|
3557 | + * @return String success or false |
|
3558 | + * |
|
3559 | + */ |
|
3560 | 3560 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
3561 | 3561 | { |
3562 | 3562 | if ($groundspeed == '') $groundspeed = NULL; |
3563 | 3563 | $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'; |
3564 | - $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); |
|
3564 | + $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); |
|
3565 | 3565 | |
3566 | 3566 | try { |
3567 | 3567 | $sth = $this->db->prepare($query); |
@@ -3575,32 +3575,32 @@ discard block |
||
3575 | 3575 | } |
3576 | 3576 | |
3577 | 3577 | /** |
3578 | - * Adds a new spotter data |
|
3579 | - * |
|
3580 | - * @param String $flightaware_id the ID from flightaware |
|
3581 | - * @param String $ident the flight ident |
|
3582 | - * @param String $aircraft_icao the aircraft type |
|
3583 | - * @param String $departure_airport_icao the departure airport |
|
3584 | - * @param String $arrival_airport_icao the arrival airport |
|
3585 | - * @param String $latitude latitude of flight |
|
3586 | - * @param String $longitude latitude of flight |
|
3587 | - * @param String $waypoints waypoints of flight |
|
3588 | - * @param String $altitude altitude of flight |
|
3589 | - * @param String $heading heading of flight |
|
3590 | - * @param String $groundspeed speed of flight |
|
3591 | - * @param String $date date of flight |
|
3592 | - * @param String $departure_airport_time departure time of flight |
|
3593 | - * @param String $arrival_airport_time arrival time of flight |
|
3594 | - * @param String $squawk squawk code of flight |
|
3595 | - * @param String $route_stop route stop of flight |
|
3596 | - * @param String $highlight highlight or not |
|
3597 | - * @param String $ModeS ModesS code of flight |
|
3598 | - * @param String $registration registration code of flight |
|
3599 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3600 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3601 | - * @param String $verticalrate vertival rate of flight |
|
3602 | - * @return String success or false |
|
3603 | - */ |
|
3578 | + * Adds a new spotter data |
|
3579 | + * |
|
3580 | + * @param String $flightaware_id the ID from flightaware |
|
3581 | + * @param String $ident the flight ident |
|
3582 | + * @param String $aircraft_icao the aircraft type |
|
3583 | + * @param String $departure_airport_icao the departure airport |
|
3584 | + * @param String $arrival_airport_icao the arrival airport |
|
3585 | + * @param String $latitude latitude of flight |
|
3586 | + * @param String $longitude latitude of flight |
|
3587 | + * @param String $waypoints waypoints of flight |
|
3588 | + * @param String $altitude altitude of flight |
|
3589 | + * @param String $heading heading of flight |
|
3590 | + * @param String $groundspeed speed of flight |
|
3591 | + * @param String $date date of flight |
|
3592 | + * @param String $departure_airport_time departure time of flight |
|
3593 | + * @param String $arrival_airport_time arrival time of flight |
|
3594 | + * @param String $squawk squawk code of flight |
|
3595 | + * @param String $route_stop route stop of flight |
|
3596 | + * @param String $highlight highlight or not |
|
3597 | + * @param String $ModeS ModesS code of flight |
|
3598 | + * @param String $registration registration code of flight |
|
3599 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3600 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3601 | + * @param String $verticalrate vertival rate of flight |
|
3602 | + * @return String success or false |
|
3603 | + */ |
|
3604 | 3604 | public function addSpotterData($flightaware_id = '', $ident = '', $aircraft_icao = '', $departure_airport_icao = '', $arrival_airport_icao = '', $latitude = '', $longitude = '', $waypoints = '', $altitude = '', $altitude_real = '',$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 = '',$source_type = '') |
3605 | 3605 | { |
3606 | 3606 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3815,8 +3815,8 @@ discard block |
||
3815 | 3815 | |
3816 | 3816 | if (($globalIVAO || $globalVATSIM || $globalphpVMS || $globalVAM) && $aircraft_icao != '') |
3817 | 3817 | { |
3818 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3819 | - else $airline_icao = ''; |
|
3818 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3819 | + else $airline_icao = ''; |
|
3820 | 3820 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
3821 | 3821 | if (!isset($image_array[0]['registration'])) |
3822 | 3822 | { |
@@ -3847,53 +3847,53 @@ discard block |
||
3847 | 3847 | |
3848 | 3848 | if (count($airline_array) == 0) |
3849 | 3849 | { |
3850 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
3851 | - } |
|
3852 | - if (count($aircraft_array) == 0) |
|
3853 | - { |
|
3854 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3855 | - } |
|
3856 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3857 | - { |
|
3858 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3859 | - } |
|
3860 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3861 | - { |
|
3862 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3863 | - } |
|
3864 | - if ($registration == '') $registration = 'NA'; |
|
3865 | - if ($latitude == '' && $longitude == '') { |
|
3866 | - $latitude = 0; |
|
3867 | - $longitude = 0; |
|
3868 | - } |
|
3869 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3870 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3871 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3872 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3873 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3874 | - $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) |
|
3850 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
3851 | + } |
|
3852 | + if (count($aircraft_array) == 0) |
|
3853 | + { |
|
3854 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3855 | + } |
|
3856 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3857 | + { |
|
3858 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3859 | + } |
|
3860 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3861 | + { |
|
3862 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3863 | + } |
|
3864 | + if ($registration == '') $registration = 'NA'; |
|
3865 | + if ($latitude == '' && $longitude == '') { |
|
3866 | + $latitude = 0; |
|
3867 | + $longitude = 0; |
|
3868 | + } |
|
3869 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3870 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3871 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3872 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3873 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3874 | + $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) |
|
3875 | 3875 | 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)"; |
3876 | 3876 | |
3877 | - $airline_name = $airline_array[0]['name']; |
|
3878 | - $airline_icao = $airline_array[0]['icao']; |
|
3879 | - $airline_country = $airline_array[0]['country']; |
|
3880 | - $airline_type = $airline_array[0]['type']; |
|
3877 | + $airline_name = $airline_array[0]['name']; |
|
3878 | + $airline_icao = $airline_array[0]['icao']; |
|
3879 | + $airline_country = $airline_array[0]['country']; |
|
3880 | + $airline_type = $airline_array[0]['type']; |
|
3881 | 3881 | if ($airline_type == '') { |
3882 | 3882 | $timeelapsed = microtime(true); |
3883 | 3883 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
3884 | 3884 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
3885 | 3885 | } |
3886 | 3886 | if ($airline_type == null) $airline_type = ''; |
3887 | - $aircraft_type = $aircraft_array[0]['type']; |
|
3888 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3889 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
3890 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
3891 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
3887 | + $aircraft_type = $aircraft_array[0]['type']; |
|
3888 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3889 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
3890 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
3891 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
3892 | 3892 | |
3893 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3894 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3895 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3896 | - $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); |
|
3893 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3894 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3895 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3896 | + $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); |
|
3897 | 3897 | |
3898 | 3898 | try { |
3899 | 3899 | |
@@ -3901,7 +3901,7 @@ discard block |
||
3901 | 3901 | $sth->execute($query_values); |
3902 | 3902 | $this->db = null; |
3903 | 3903 | } catch (PDOException $e) { |
3904 | - return "error : ".$e->getMessage(); |
|
3904 | + return "error : ".$e->getMessage(); |
|
3905 | 3905 | } |
3906 | 3906 | |
3907 | 3907 | return "success"; |
@@ -3910,11 +3910,11 @@ discard block |
||
3910 | 3910 | |
3911 | 3911 | |
3912 | 3912 | /** |
3913 | - * Gets the aircraft ident within the last hour |
|
3914 | - * |
|
3915 | - * @return String the ident |
|
3916 | - * |
|
3917 | - */ |
|
3913 | + * Gets the aircraft ident within the last hour |
|
3914 | + * |
|
3915 | + * @return String the ident |
|
3916 | + * |
|
3917 | + */ |
|
3918 | 3918 | public function getIdentFromLastHour($ident) |
3919 | 3919 | { |
3920 | 3920 | global $globalDBdriver, $globalTimezone; |
@@ -3930,11 +3930,11 @@ discard block |
||
3930 | 3930 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
3931 | 3931 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
3932 | 3932 | $query_data = array(':ident' => $ident); |
3933 | - } |
|
3933 | + } |
|
3934 | 3934 | |
3935 | 3935 | $sth = $this->db->prepare($query); |
3936 | 3936 | $sth->execute($query_data); |
3937 | - $ident_result=''; |
|
3937 | + $ident_result=''; |
|
3938 | 3938 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
3939 | 3939 | { |
3940 | 3940 | $ident_result = $row['ident']; |
@@ -3945,11 +3945,11 @@ discard block |
||
3945 | 3945 | |
3946 | 3946 | |
3947 | 3947 | /** |
3948 | - * Gets the aircraft data from the last 20 seconds |
|
3949 | - * |
|
3950 | - * @return Array the spotter data |
|
3951 | - * |
|
3952 | - */ |
|
3948 | + * Gets the aircraft data from the last 20 seconds |
|
3949 | + * |
|
3950 | + * @return Array the spotter data |
|
3951 | + * |
|
3952 | + */ |
|
3953 | 3953 | public function getRealTimeData($q = '') |
3954 | 3954 | { |
3955 | 3955 | global $globalDBdriver; |
@@ -3993,11 +3993,11 @@ discard block |
||
3993 | 3993 | |
3994 | 3994 | |
3995 | 3995 | /** |
3996 | - * Gets all airlines that have flown over |
|
3997 | - * |
|
3998 | - * @return Array the airline list |
|
3999 | - * |
|
4000 | - */ |
|
3996 | + * Gets all airlines that have flown over |
|
3997 | + * |
|
3998 | + * @return Array the airline list |
|
3999 | + * |
|
4000 | + */ |
|
4001 | 4001 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(), $year = '', $month = '', $day = '') |
4002 | 4002 | { |
4003 | 4003 | global $globalDBdriver; |
@@ -4011,7 +4011,7 @@ discard block |
||
4011 | 4011 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4012 | 4012 | } |
4013 | 4013 | } |
4014 | - if ($sincedate != '') { |
|
4014 | + if ($sincedate != '') { |
|
4015 | 4015 | if ($globalDBdriver == 'mysql') { |
4016 | 4016 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
4017 | 4017 | } else { |
@@ -4065,26 +4065,26 @@ discard block |
||
4065 | 4065 | } |
4066 | 4066 | |
4067 | 4067 | /** |
4068 | - * Gets all pilots that have flown over |
|
4069 | - * |
|
4070 | - * @return Array the pilots list |
|
4071 | - * |
|
4072 | - */ |
|
4068 | + * Gets all pilots that have flown over |
|
4069 | + * |
|
4070 | + * @return Array the pilots list |
|
4071 | + * |
|
4072 | + */ |
|
4073 | 4073 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '',$day = '') |
4074 | 4074 | { |
4075 | 4075 | global $globalDBdriver; |
4076 | 4076 | $filter_query = $this->getFilter($filters,true,true); |
4077 | 4077 | $query = "SELECT DISTINCT spotter_output.pilot_id, s.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
4078 | 4078 | 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 <> ''"; |
4079 | - if ($olderthanmonths > 0) { |
|
4080 | - if ($globalDBdriver == 'mysql') { |
|
4079 | + if ($olderthanmonths > 0) { |
|
4080 | + if ($globalDBdriver == 'mysql') { |
|
4081 | 4081 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
4082 | 4082 | } else { |
4083 | 4083 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4084 | 4084 | } |
4085 | 4085 | } |
4086 | - if ($sincedate != '') { |
|
4087 | - if ($globalDBdriver == 'mysql') { |
|
4086 | + if ($sincedate != '') { |
|
4087 | + if ($globalDBdriver == 'mysql') { |
|
4088 | 4088 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
4089 | 4089 | } else { |
4090 | 4090 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4139,25 +4139,25 @@ discard block |
||
4139 | 4139 | } |
4140 | 4140 | |
4141 | 4141 | /** |
4142 | - * Gets all pilots that have flown over |
|
4143 | - * |
|
4144 | - * @return Array the pilots list |
|
4145 | - * |
|
4146 | - */ |
|
4142 | + * Gets all pilots that have flown over |
|
4143 | + * |
|
4144 | + * @return Array the pilots list |
|
4145 | + * |
|
4146 | + */ |
|
4147 | 4147 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
4148 | 4148 | { |
4149 | 4149 | global $globalDBdriver; |
4150 | 4150 | $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 |
4151 | 4151 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
4152 | - if ($olderthanmonths > 0) { |
|
4153 | - if ($globalDBdriver == 'mysql') { |
|
4152 | + if ($olderthanmonths > 0) { |
|
4153 | + if ($globalDBdriver == 'mysql') { |
|
4154 | 4154 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4155 | 4155 | } else { |
4156 | 4156 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4157 | 4157 | } |
4158 | 4158 | } |
4159 | - if ($sincedate != '') { |
|
4160 | - if ($globalDBdriver == 'mysql') { |
|
4159 | + if ($sincedate != '') { |
|
4160 | + if ($globalDBdriver == 'mysql') { |
|
4161 | 4161 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4162 | 4162 | } else { |
4163 | 4163 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4186,26 +4186,26 @@ discard block |
||
4186 | 4186 | } |
4187 | 4187 | |
4188 | 4188 | /** |
4189 | - * Gets all owner that have flown over |
|
4190 | - * |
|
4191 | - * @return Array the pilots list |
|
4192 | - * |
|
4193 | - */ |
|
4189 | + * Gets all owner that have flown over |
|
4190 | + * |
|
4191 | + * @return Array the pilots list |
|
4192 | + * |
|
4193 | + */ |
|
4194 | 4194 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
4195 | 4195 | { |
4196 | 4196 | global $globalDBdriver; |
4197 | 4197 | $filter_query = $this->getFilter($filters,true,true); |
4198 | 4198 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4199 | 4199 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL"; |
4200 | - if ($olderthanmonths > 0) { |
|
4201 | - if ($globalDBdriver == 'mysql') { |
|
4200 | + if ($olderthanmonths > 0) { |
|
4201 | + if ($globalDBdriver == 'mysql') { |
|
4202 | 4202 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
4203 | 4203 | } else { |
4204 | 4204 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4205 | 4205 | } |
4206 | 4206 | } |
4207 | - if ($sincedate != '') { |
|
4208 | - if ($globalDBdriver == 'mysql') { |
|
4207 | + if ($sincedate != '') { |
|
4208 | + if ($globalDBdriver == 'mysql') { |
|
4209 | 4209 | $query .= " AND spotter_output.date > '".$sincedate."' "; |
4210 | 4210 | } else { |
4211 | 4211 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4256,26 +4256,26 @@ discard block |
||
4256 | 4256 | } |
4257 | 4257 | |
4258 | 4258 | /** |
4259 | - * Gets all owner that have flown over |
|
4260 | - * |
|
4261 | - * @return Array the pilots list |
|
4262 | - * |
|
4263 | - */ |
|
4259 | + * Gets all owner that have flown over |
|
4260 | + * |
|
4261 | + * @return Array the pilots list |
|
4262 | + * |
|
4263 | + */ |
|
4264 | 4264 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
4265 | 4265 | { |
4266 | 4266 | global $globalDBdriver; |
4267 | 4267 | $filter_query = $this->getFilter($filters,true,true); |
4268 | 4268 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4269 | 4269 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
4270 | - if ($olderthanmonths > 0) { |
|
4271 | - if ($globalDBdriver == 'mysql') { |
|
4270 | + if ($olderthanmonths > 0) { |
|
4271 | + if ($globalDBdriver == 'mysql') { |
|
4272 | 4272 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4273 | 4273 | } else { |
4274 | 4274 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4275 | 4275 | } |
4276 | 4276 | } |
4277 | - if ($sincedate != '') { |
|
4278 | - if ($globalDBdriver == 'mysql') { |
|
4277 | + if ($sincedate != '') { |
|
4278 | + if ($globalDBdriver == 'mysql') { |
|
4279 | 4279 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4280 | 4280 | } else { |
4281 | 4281 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4302,11 +4302,11 @@ discard block |
||
4302 | 4302 | } |
4303 | 4303 | |
4304 | 4304 | /** |
4305 | - * Gets all airlines that have flown over by aircraft |
|
4306 | - * |
|
4307 | - * @return Array the airline list |
|
4308 | - * |
|
4309 | - */ |
|
4305 | + * Gets all airlines that have flown over by aircraft |
|
4306 | + * |
|
4307 | + * @return Array the airline list |
|
4308 | + * |
|
4309 | + */ |
|
4310 | 4310 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
4311 | 4311 | { |
4312 | 4312 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4338,11 +4338,11 @@ discard block |
||
4338 | 4338 | |
4339 | 4339 | |
4340 | 4340 | /** |
4341 | - * Gets all airline countries that have flown over by aircraft |
|
4342 | - * |
|
4343 | - * @return Array the airline country list |
|
4344 | - * |
|
4345 | - */ |
|
4341 | + * Gets all airline countries that have flown over by aircraft |
|
4342 | + * |
|
4343 | + * @return Array the airline country list |
|
4344 | + * |
|
4345 | + */ |
|
4346 | 4346 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
4347 | 4347 | { |
4348 | 4348 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4375,11 +4375,11 @@ discard block |
||
4375 | 4375 | |
4376 | 4376 | |
4377 | 4377 | /** |
4378 | - * Gets all airlines that have flown over by airport |
|
4379 | - * |
|
4380 | - * @return Array the airline list |
|
4381 | - * |
|
4382 | - */ |
|
4378 | + * Gets all airlines that have flown over by airport |
|
4379 | + * |
|
4380 | + * @return Array the airline list |
|
4381 | + * |
|
4382 | + */ |
|
4383 | 4383 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
4384 | 4384 | { |
4385 | 4385 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4410,11 +4410,11 @@ discard block |
||
4410 | 4410 | |
4411 | 4411 | |
4412 | 4412 | /** |
4413 | - * Gets all airline countries that have flown over by airport icao |
|
4414 | - * |
|
4415 | - * @return Array the airline country list |
|
4416 | - * |
|
4417 | - */ |
|
4413 | + * Gets all airline countries that have flown over by airport icao |
|
4414 | + * |
|
4415 | + * @return Array the airline country list |
|
4416 | + * |
|
4417 | + */ |
|
4418 | 4418 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
4419 | 4419 | { |
4420 | 4420 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4445,11 +4445,11 @@ discard block |
||
4445 | 4445 | |
4446 | 4446 | |
4447 | 4447 | /** |
4448 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
4449 | - * |
|
4450 | - * @return Array the airline list |
|
4451 | - * |
|
4452 | - */ |
|
4448 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
4449 | + * |
|
4450 | + * @return Array the airline list |
|
4451 | + * |
|
4452 | + */ |
|
4453 | 4453 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
4454 | 4454 | { |
4455 | 4455 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4480,11 +4480,11 @@ discard block |
||
4480 | 4480 | |
4481 | 4481 | |
4482 | 4482 | /** |
4483 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
4484 | - * |
|
4485 | - * @return Array the airline country list |
|
4486 | - * |
|
4487 | - */ |
|
4483 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
4484 | + * |
|
4485 | + * @return Array the airline country list |
|
4486 | + * |
|
4487 | + */ |
|
4488 | 4488 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
4489 | 4489 | { |
4490 | 4490 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4513,11 +4513,11 @@ discard block |
||
4513 | 4513 | |
4514 | 4514 | |
4515 | 4515 | /** |
4516 | - * Gets all airlines that have flown over by date |
|
4517 | - * |
|
4518 | - * @return Array the airline list |
|
4519 | - * |
|
4520 | - */ |
|
4516 | + * Gets all airlines that have flown over by date |
|
4517 | + * |
|
4518 | + * @return Array the airline list |
|
4519 | + * |
|
4520 | + */ |
|
4521 | 4521 | public function countAllAirlinesByDate($date,$filters = array()) |
4522 | 4522 | { |
4523 | 4523 | global $globalTimezone, $globalDBdriver; |
@@ -4561,11 +4561,11 @@ discard block |
||
4561 | 4561 | |
4562 | 4562 | |
4563 | 4563 | /** |
4564 | - * Gets all airline countries that have flown over by date |
|
4565 | - * |
|
4566 | - * @return Array the airline country list |
|
4567 | - * |
|
4568 | - */ |
|
4564 | + * Gets all airline countries that have flown over by date |
|
4565 | + * |
|
4566 | + * @return Array the airline country list |
|
4567 | + * |
|
4568 | + */ |
|
4569 | 4569 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
4570 | 4570 | { |
4571 | 4571 | global $globalTimezone, $globalDBdriver; |
@@ -4608,11 +4608,11 @@ discard block |
||
4608 | 4608 | |
4609 | 4609 | |
4610 | 4610 | /** |
4611 | - * Gets all airlines that have flown over by ident/callsign |
|
4612 | - * |
|
4613 | - * @return Array the airline list |
|
4614 | - * |
|
4615 | - */ |
|
4611 | + * Gets all airlines that have flown over by ident/callsign |
|
4612 | + * |
|
4613 | + * @return Array the airline list |
|
4614 | + * |
|
4615 | + */ |
|
4616 | 4616 | public function countAllAirlinesByIdent($ident,$filters = array()) |
4617 | 4617 | { |
4618 | 4618 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4629,11 +4629,11 @@ discard block |
||
4629 | 4629 | } |
4630 | 4630 | |
4631 | 4631 | /** |
4632 | - * Gets all airlines by owner |
|
4633 | - * |
|
4634 | - * @return Array the airline list |
|
4635 | - * |
|
4636 | - */ |
|
4632 | + * Gets all airlines by owner |
|
4633 | + * |
|
4634 | + * @return Array the airline list |
|
4635 | + * |
|
4636 | + */ |
|
4637 | 4637 | public function countAllAirlinesByOwner($owner,$filters = array()) |
4638 | 4638 | { |
4639 | 4639 | $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
@@ -4650,11 +4650,11 @@ discard block |
||
4650 | 4650 | } |
4651 | 4651 | |
4652 | 4652 | /** |
4653 | - * Gets flight duration by owner |
|
4654 | - * |
|
4655 | - * @return String Duration of all flights |
|
4656 | - * |
|
4657 | - */ |
|
4653 | + * Gets flight duration by owner |
|
4654 | + * |
|
4655 | + * @return String Duration of all flights |
|
4656 | + * |
|
4657 | + */ |
|
4658 | 4658 | public function getFlightDurationByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
4659 | 4659 | { |
4660 | 4660 | global $globalDBdriver; |
@@ -4701,11 +4701,11 @@ discard block |
||
4701 | 4701 | } |
4702 | 4702 | |
4703 | 4703 | /** |
4704 | - * Count flights by owner |
|
4705 | - * |
|
4706 | - * @return String Duration of all flights |
|
4707 | - * |
|
4708 | - */ |
|
4704 | + * Count flights by owner |
|
4705 | + * |
|
4706 | + * @return String Duration of all flights |
|
4707 | + * |
|
4708 | + */ |
|
4709 | 4709 | public function countFlightsByOwner($owner,$filters = array()) |
4710 | 4710 | { |
4711 | 4711 | $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
@@ -4721,11 +4721,11 @@ discard block |
||
4721 | 4721 | } |
4722 | 4722 | |
4723 | 4723 | /** |
4724 | - * Count flights by pilot |
|
4725 | - * |
|
4726 | - * @return String Duration of all flights |
|
4727 | - * |
|
4728 | - */ |
|
4724 | + * Count flights by pilot |
|
4725 | + * |
|
4726 | + * @return String Duration of all flights |
|
4727 | + * |
|
4728 | + */ |
|
4729 | 4729 | public function countFlightsByPilot($pilot,$filters = array()) |
4730 | 4730 | { |
4731 | 4731 | $pilot = filter_var($pilot,FILTER_SANITIZE_STRING); |
@@ -4741,11 +4741,11 @@ discard block |
||
4741 | 4741 | } |
4742 | 4742 | |
4743 | 4743 | /** |
4744 | - * Gets flight duration by pilot |
|
4745 | - * |
|
4746 | - * @return String Duration of all flights |
|
4747 | - * |
|
4748 | - */ |
|
4744 | + * Gets flight duration by pilot |
|
4745 | + * |
|
4746 | + * @return String Duration of all flights |
|
4747 | + * |
|
4748 | + */ |
|
4749 | 4749 | public function getFlightDurationByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
4750 | 4750 | { |
4751 | 4751 | global $globalDBdriver; |
@@ -4791,11 +4791,11 @@ discard block |
||
4791 | 4791 | } |
4792 | 4792 | |
4793 | 4793 | /** |
4794 | - * Gets all airlines used by pilot |
|
4795 | - * |
|
4796 | - * @return Array the airline list |
|
4797 | - * |
|
4798 | - */ |
|
4794 | + * Gets all airlines used by pilot |
|
4795 | + * |
|
4796 | + * @return Array the airline list |
|
4797 | + * |
|
4798 | + */ |
|
4799 | 4799 | public function countAllAirlinesByPilot($pilot,$filters = array()) |
4800 | 4800 | { |
4801 | 4801 | $pilot = filter_var($pilot,FILTER_SANITIZE_STRING); |
@@ -4812,11 +4812,11 @@ discard block |
||
4812 | 4812 | } |
4813 | 4813 | |
4814 | 4814 | /** |
4815 | - * Gets all airlines that have flown over by route |
|
4816 | - * |
|
4817 | - * @return Array the airline list |
|
4818 | - * |
|
4819 | - */ |
|
4815 | + * Gets all airlines that have flown over by route |
|
4816 | + * |
|
4817 | + * @return Array the airline list |
|
4818 | + * |
|
4819 | + */ |
|
4820 | 4820 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
4821 | 4821 | { |
4822 | 4822 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4848,11 +4848,11 @@ discard block |
||
4848 | 4848 | } |
4849 | 4849 | |
4850 | 4850 | /** |
4851 | - * Gets all airline countries that have flown over by route |
|
4852 | - * |
|
4853 | - * @return Array the airline country list |
|
4854 | - * |
|
4855 | - */ |
|
4851 | + * Gets all airline countries that have flown over by route |
|
4852 | + * |
|
4853 | + * @return Array the airline country list |
|
4854 | + * |
|
4855 | + */ |
|
4856 | 4856 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
4857 | 4857 | { |
4858 | 4858 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4884,11 +4884,11 @@ discard block |
||
4884 | 4884 | |
4885 | 4885 | |
4886 | 4886 | /** |
4887 | - * Gets all airlines that have flown over by country |
|
4888 | - * |
|
4889 | - * @return Array the airline list |
|
4890 | - * |
|
4891 | - */ |
|
4887 | + * Gets all airlines that have flown over by country |
|
4888 | + * |
|
4889 | + * @return Array the airline list |
|
4890 | + * |
|
4891 | + */ |
|
4892 | 4892 | public function countAllAirlinesByCountry($country,$filters = array()) |
4893 | 4893 | { |
4894 | 4894 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4918,11 +4918,11 @@ discard block |
||
4918 | 4918 | |
4919 | 4919 | |
4920 | 4920 | /** |
4921 | - * Gets all airline countries that have flown over by country |
|
4922 | - * |
|
4923 | - * @return Array the airline country list |
|
4924 | - * |
|
4925 | - */ |
|
4921 | + * Gets all airline countries that have flown over by country |
|
4922 | + * |
|
4923 | + * @return Array the airline country list |
|
4924 | + * |
|
4925 | + */ |
|
4926 | 4926 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
4927 | 4927 | { |
4928 | 4928 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4951,11 +4951,11 @@ discard block |
||
4951 | 4951 | |
4952 | 4952 | |
4953 | 4953 | /** |
4954 | - * Gets all airlines countries |
|
4955 | - * |
|
4956 | - * @return Array the airline country list |
|
4957 | - * |
|
4958 | - */ |
|
4954 | + * Gets all airlines countries |
|
4955 | + * |
|
4956 | + * @return Array the airline country list |
|
4957 | + * |
|
4958 | + */ |
|
4959 | 4959 | public function countAllAirlineCountries($limit = true, $filters = array(), $year = '', $month = '', $day = '') |
4960 | 4960 | { |
4961 | 4961 | global $globalDBdriver; |
@@ -5011,11 +5011,11 @@ discard block |
||
5011 | 5011 | } |
5012 | 5012 | |
5013 | 5013 | /** |
5014 | - * Gets all number of flight over countries |
|
5015 | - * |
|
5016 | - * @return Array the airline country list |
|
5017 | - * |
|
5018 | - */ |
|
5014 | + * Gets all number of flight over countries |
|
5015 | + * |
|
5016 | + * @return Array the airline country list |
|
5017 | + * |
|
5018 | + */ |
|
5019 | 5019 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
5020 | 5020 | { |
5021 | 5021 | global $globalDBdriver; |
@@ -5037,15 +5037,15 @@ discard block |
||
5037 | 5037 | $SpotterLive = new SpotterLive(); |
5038 | 5038 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
5039 | 5039 | $filter_query .= ' over_country IS NOT NULL'; |
5040 | - if ($olderthanmonths > 0) { |
|
5040 | + if ($olderthanmonths > 0) { |
|
5041 | 5041 | if ($globalDBdriver == 'mysql') { |
5042 | 5042 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
5043 | 5043 | } else { |
5044 | 5044 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
5045 | 5045 | } |
5046 | 5046 | } |
5047 | - if ($sincedate != '') { |
|
5048 | - if ($globalDBdriver == 'mysql') { |
|
5047 | + if ($sincedate != '') { |
|
5048 | + if ($globalDBdriver == 'mysql') { |
|
5049 | 5049 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
5050 | 5050 | } else { |
5051 | 5051 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5075,11 +5075,11 @@ discard block |
||
5075 | 5075 | |
5076 | 5076 | |
5077 | 5077 | /** |
5078 | - * Gets all aircraft types that have flown over |
|
5079 | - * |
|
5080 | - * @return Array the aircraft list |
|
5081 | - * |
|
5082 | - */ |
|
5078 | + * Gets all aircraft types that have flown over |
|
5079 | + * |
|
5080 | + * @return Array the aircraft list |
|
5081 | + * |
|
5082 | + */ |
|
5083 | 5083 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
5084 | 5084 | { |
5085 | 5085 | global $globalDBdriver; |
@@ -5149,11 +5149,11 @@ discard block |
||
5149 | 5149 | } |
5150 | 5150 | |
5151 | 5151 | /** |
5152 | - * Gets all aircraft types that have flown over by airline |
|
5153 | - * |
|
5154 | - * @return Array the aircraft list |
|
5155 | - * |
|
5156 | - */ |
|
5152 | + * Gets all aircraft types that have flown over by airline |
|
5153 | + * |
|
5154 | + * @return Array the aircraft list |
|
5155 | + * |
|
5156 | + */ |
|
5157 | 5157 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '', $day = '') |
5158 | 5158 | { |
5159 | 5159 | global $globalDBdriver; |
@@ -5224,11 +5224,11 @@ discard block |
||
5224 | 5224 | } |
5225 | 5225 | |
5226 | 5226 | /** |
5227 | - * Gets all aircraft types that have flown over by months |
|
5228 | - * |
|
5229 | - * @return Array the aircraft list |
|
5230 | - * |
|
5231 | - */ |
|
5227 | + * Gets all aircraft types that have flown over by months |
|
5228 | + * |
|
5229 | + * @return Array the aircraft list |
|
5230 | + * |
|
5231 | + */ |
|
5232 | 5232 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
5233 | 5233 | { |
5234 | 5234 | global $globalDBdriver; |
@@ -5272,11 +5272,11 @@ discard block |
||
5272 | 5272 | |
5273 | 5273 | |
5274 | 5274 | /** |
5275 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
5276 | - * |
|
5277 | - * @return Array the aircraft list |
|
5278 | - * |
|
5279 | - */ |
|
5275 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
5276 | + * |
|
5277 | + * @return Array the aircraft list |
|
5278 | + * |
|
5279 | + */ |
|
5280 | 5280 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
5281 | 5281 | { |
5282 | 5282 | $Image = new Image($this->db); |
@@ -5315,11 +5315,11 @@ discard block |
||
5315 | 5315 | |
5316 | 5316 | |
5317 | 5317 | /** |
5318 | - * Gets all aircraft types that have flown over by airline icao |
|
5319 | - * |
|
5320 | - * @return Array the aircraft list |
|
5321 | - * |
|
5322 | - */ |
|
5318 | + * Gets all aircraft types that have flown over by airline icao |
|
5319 | + * |
|
5320 | + * @return Array the aircraft list |
|
5321 | + * |
|
5322 | + */ |
|
5323 | 5323 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
5324 | 5324 | { |
5325 | 5325 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5348,11 +5348,11 @@ discard block |
||
5348 | 5348 | |
5349 | 5349 | |
5350 | 5350 | /** |
5351 | - * Gets all aircraft registration that have flown over by airline icao |
|
5352 | - * |
|
5353 | - * @return Array the aircraft list |
|
5354 | - * |
|
5355 | - */ |
|
5351 | + * Gets all aircraft registration that have flown over by airline icao |
|
5352 | + * |
|
5353 | + * @return Array the aircraft list |
|
5354 | + * |
|
5355 | + */ |
|
5356 | 5356 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
5357 | 5357 | { |
5358 | 5358 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5390,11 +5390,11 @@ discard block |
||
5390 | 5390 | |
5391 | 5391 | |
5392 | 5392 | /** |
5393 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
5394 | - * |
|
5395 | - * @return Array the aircraft list |
|
5396 | - * |
|
5397 | - */ |
|
5393 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
5394 | + * |
|
5395 | + * @return Array the aircraft list |
|
5396 | + * |
|
5397 | + */ |
|
5398 | 5398 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
5399 | 5399 | { |
5400 | 5400 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5422,11 +5422,11 @@ discard block |
||
5422 | 5422 | |
5423 | 5423 | |
5424 | 5424 | /** |
5425 | - * Gets all aircraft types that have flown over by airline icao |
|
5426 | - * |
|
5427 | - * @return Array the aircraft list |
|
5428 | - * |
|
5429 | - */ |
|
5425 | + * Gets all aircraft types that have flown over by airline icao |
|
5426 | + * |
|
5427 | + * @return Array the aircraft list |
|
5428 | + * |
|
5429 | + */ |
|
5430 | 5430 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
5431 | 5431 | { |
5432 | 5432 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5455,11 +5455,11 @@ discard block |
||
5455 | 5455 | |
5456 | 5456 | |
5457 | 5457 | /** |
5458 | - * Gets all aircraft registration that have flown over by airport icao |
|
5459 | - * |
|
5460 | - * @return Array the aircraft list |
|
5461 | - * |
|
5462 | - */ |
|
5458 | + * Gets all aircraft registration that have flown over by airport icao |
|
5459 | + * |
|
5460 | + * @return Array the aircraft list |
|
5461 | + * |
|
5462 | + */ |
|
5463 | 5463 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
5464 | 5464 | { |
5465 | 5465 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5496,11 +5496,11 @@ discard block |
||
5496 | 5496 | |
5497 | 5497 | |
5498 | 5498 | /** |
5499 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
5500 | - * |
|
5501 | - * @return Array the aircraft list |
|
5502 | - * |
|
5503 | - */ |
|
5499 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
5500 | + * |
|
5501 | + * @return Array the aircraft list |
|
5502 | + * |
|
5503 | + */ |
|
5504 | 5504 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
5505 | 5505 | { |
5506 | 5506 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5526,11 +5526,11 @@ discard block |
||
5526 | 5526 | } |
5527 | 5527 | |
5528 | 5528 | /** |
5529 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5530 | - * |
|
5531 | - * @return Array the aircraft list |
|
5532 | - * |
|
5533 | - */ |
|
5529 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5530 | + * |
|
5531 | + * @return Array the aircraft list |
|
5532 | + * |
|
5533 | + */ |
|
5534 | 5534 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
5535 | 5535 | { |
5536 | 5536 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5557,11 +5557,11 @@ discard block |
||
5557 | 5557 | |
5558 | 5558 | |
5559 | 5559 | /** |
5560 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5561 | - * |
|
5562 | - * @return Array the aircraft list |
|
5563 | - * |
|
5564 | - */ |
|
5560 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5561 | + * |
|
5562 | + * @return Array the aircraft list |
|
5563 | + * |
|
5564 | + */ |
|
5565 | 5565 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
5566 | 5566 | { |
5567 | 5567 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5597,11 +5597,11 @@ discard block |
||
5597 | 5597 | } |
5598 | 5598 | |
5599 | 5599 | /** |
5600 | - * Gets all aircraft types that have flown over by date |
|
5601 | - * |
|
5602 | - * @return Array the aircraft list |
|
5603 | - * |
|
5604 | - */ |
|
5600 | + * Gets all aircraft types that have flown over by date |
|
5601 | + * |
|
5602 | + * @return Array the aircraft list |
|
5603 | + * |
|
5604 | + */ |
|
5605 | 5605 | public function countAllAircraftTypesByDate($date,$filters = array()) |
5606 | 5606 | { |
5607 | 5607 | global $globalTimezone, $globalDBdriver; |
@@ -5643,11 +5643,11 @@ discard block |
||
5643 | 5643 | |
5644 | 5644 | |
5645 | 5645 | /** |
5646 | - * Gets all aircraft registration that have flown over by date |
|
5647 | - * |
|
5648 | - * @return Array the aircraft list |
|
5649 | - * |
|
5650 | - */ |
|
5646 | + * Gets all aircraft registration that have flown over by date |
|
5647 | + * |
|
5648 | + * @return Array the aircraft list |
|
5649 | + * |
|
5650 | + */ |
|
5651 | 5651 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
5652 | 5652 | { |
5653 | 5653 | global $globalTimezone, $globalDBdriver; |
@@ -5698,11 +5698,11 @@ discard block |
||
5698 | 5698 | |
5699 | 5699 | |
5700 | 5700 | /** |
5701 | - * Gets all aircraft manufacturer that have flown over by date |
|
5702 | - * |
|
5703 | - * @return Array the aircraft manufacturer list |
|
5704 | - * |
|
5705 | - */ |
|
5701 | + * Gets all aircraft manufacturer that have flown over by date |
|
5702 | + * |
|
5703 | + * @return Array the aircraft manufacturer list |
|
5704 | + * |
|
5705 | + */ |
|
5706 | 5706 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
5707 | 5707 | { |
5708 | 5708 | global $globalTimezone, $globalDBdriver; |
@@ -5744,11 +5744,11 @@ discard block |
||
5744 | 5744 | |
5745 | 5745 | |
5746 | 5746 | /** |
5747 | - * Gets all aircraft types that have flown over by ident/callsign |
|
5748 | - * |
|
5749 | - * @return Array the aircraft list |
|
5750 | - * |
|
5751 | - */ |
|
5747 | + * Gets all aircraft types that have flown over by ident/callsign |
|
5748 | + * |
|
5749 | + * @return Array the aircraft list |
|
5750 | + * |
|
5751 | + */ |
|
5752 | 5752 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
5753 | 5753 | { |
5754 | 5754 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5776,11 +5776,11 @@ discard block |
||
5776 | 5776 | } |
5777 | 5777 | |
5778 | 5778 | /** |
5779 | - * Gets all aircraft types that have flown over by pilot |
|
5780 | - * |
|
5781 | - * @return Array the aircraft list |
|
5782 | - * |
|
5783 | - */ |
|
5779 | + * Gets all aircraft types that have flown over by pilot |
|
5780 | + * |
|
5781 | + * @return Array the aircraft list |
|
5782 | + * |
|
5783 | + */ |
|
5784 | 5784 | public function countAllAircraftTypesByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
5785 | 5785 | { |
5786 | 5786 | global $globalDBdriver; |
@@ -5826,11 +5826,11 @@ discard block |
||
5826 | 5826 | } |
5827 | 5827 | |
5828 | 5828 | /** |
5829 | - * Gets all aircraft types that have flown over by owner |
|
5830 | - * |
|
5831 | - * @return Array the aircraft list |
|
5832 | - * |
|
5833 | - */ |
|
5829 | + * Gets all aircraft types that have flown over by owner |
|
5830 | + * |
|
5831 | + * @return Array the aircraft list |
|
5832 | + * |
|
5833 | + */ |
|
5834 | 5834 | public function countAllAircraftTypesByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
5835 | 5835 | { |
5836 | 5836 | global $globalDBdriver; |
@@ -5875,11 +5875,11 @@ discard block |
||
5875 | 5875 | } |
5876 | 5876 | |
5877 | 5877 | /** |
5878 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
5879 | - * |
|
5880 | - * @return Array the aircraft list |
|
5881 | - * |
|
5882 | - */ |
|
5878 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
5879 | + * |
|
5880 | + * @return Array the aircraft list |
|
5881 | + * |
|
5882 | + */ |
|
5883 | 5883 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
5884 | 5884 | { |
5885 | 5885 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5918,11 +5918,11 @@ discard block |
||
5918 | 5918 | } |
5919 | 5919 | |
5920 | 5920 | /** |
5921 | - * Gets all aircraft registration that have flown over by owner |
|
5922 | - * |
|
5923 | - * @return Array the aircraft list |
|
5924 | - * |
|
5925 | - */ |
|
5921 | + * Gets all aircraft registration that have flown over by owner |
|
5922 | + * |
|
5923 | + * @return Array the aircraft list |
|
5924 | + * |
|
5925 | + */ |
|
5926 | 5926 | public function countAllAircraftRegistrationByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
5927 | 5927 | { |
5928 | 5928 | global $globalDBdriver; |
@@ -5993,11 +5993,11 @@ discard block |
||
5993 | 5993 | } |
5994 | 5994 | |
5995 | 5995 | /** |
5996 | - * Gets all aircraft registration that have flown over by pilot |
|
5997 | - * |
|
5998 | - * @return Array the aircraft list |
|
5999 | - * |
|
6000 | - */ |
|
5996 | + * Gets all aircraft registration that have flown over by pilot |
|
5997 | + * |
|
5998 | + * @return Array the aircraft list |
|
5999 | + * |
|
6000 | + */ |
|
6001 | 6001 | public function countAllAircraftRegistrationByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
6002 | 6002 | { |
6003 | 6003 | global $globalDBdriver; |
@@ -6069,11 +6069,11 @@ discard block |
||
6069 | 6069 | |
6070 | 6070 | |
6071 | 6071 | /** |
6072 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
6073 | - * |
|
6074 | - * @return Array the aircraft manufacturer list |
|
6075 | - * |
|
6076 | - */ |
|
6072 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
6073 | + * |
|
6074 | + * @return Array the aircraft manufacturer list |
|
6075 | + * |
|
6076 | + */ |
|
6077 | 6077 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
6078 | 6078 | { |
6079 | 6079 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6098,11 +6098,11 @@ discard block |
||
6098 | 6098 | } |
6099 | 6099 | |
6100 | 6100 | /** |
6101 | - * Gets all aircraft manufacturer that have flown over by owner |
|
6102 | - * |
|
6103 | - * @return Array the aircraft manufacturer list |
|
6104 | - * |
|
6105 | - */ |
|
6101 | + * Gets all aircraft manufacturer that have flown over by owner |
|
6102 | + * |
|
6103 | + * @return Array the aircraft manufacturer list |
|
6104 | + * |
|
6105 | + */ |
|
6106 | 6106 | public function countAllAircraftManufacturerByOwner($owner,$filters = array(),$year = '',$month = '',$day = '') |
6107 | 6107 | { |
6108 | 6108 | global $globalDBdriver; |
@@ -6150,11 +6150,11 @@ discard block |
||
6150 | 6150 | } |
6151 | 6151 | |
6152 | 6152 | /** |
6153 | - * Gets all aircraft manufacturer that have flown over by pilot |
|
6154 | - * |
|
6155 | - * @return Array the aircraft manufacturer list |
|
6156 | - * |
|
6157 | - */ |
|
6153 | + * Gets all aircraft manufacturer that have flown over by pilot |
|
6154 | + * |
|
6155 | + * @return Array the aircraft manufacturer list |
|
6156 | + * |
|
6157 | + */ |
|
6158 | 6158 | public function countAllAircraftManufacturerByPilot($pilot,$filters = array(),$year = '',$month = '',$day = '') |
6159 | 6159 | { |
6160 | 6160 | global $globalDBdriver; |
@@ -6203,11 +6203,11 @@ discard block |
||
6203 | 6203 | |
6204 | 6204 | |
6205 | 6205 | /** |
6206 | - * Gets all aircraft types that have flown over by route |
|
6207 | - * |
|
6208 | - * @return Array the aircraft list |
|
6209 | - * |
|
6210 | - */ |
|
6206 | + * Gets all aircraft types that have flown over by route |
|
6207 | + * |
|
6208 | + * @return Array the aircraft list |
|
6209 | + * |
|
6210 | + */ |
|
6211 | 6211 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6212 | 6212 | { |
6213 | 6213 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6236,11 +6236,11 @@ discard block |
||
6236 | 6236 | } |
6237 | 6237 | |
6238 | 6238 | /** |
6239 | - * Gets all aircraft registration that have flown over by route |
|
6240 | - * |
|
6241 | - * @return Array the aircraft list |
|
6242 | - * |
|
6243 | - */ |
|
6239 | + * Gets all aircraft registration that have flown over by route |
|
6240 | + * |
|
6241 | + * @return Array the aircraft list |
|
6242 | + * |
|
6243 | + */ |
|
6244 | 6244 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6245 | 6245 | { |
6246 | 6246 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6282,11 +6282,11 @@ discard block |
||
6282 | 6282 | |
6283 | 6283 | |
6284 | 6284 | /** |
6285 | - * Gets all aircraft manufacturer that have flown over by route |
|
6286 | - * |
|
6287 | - * @return Array the aircraft manufacturer list |
|
6288 | - * |
|
6289 | - */ |
|
6285 | + * Gets all aircraft manufacturer that have flown over by route |
|
6286 | + * |
|
6287 | + * @return Array the aircraft manufacturer list |
|
6288 | + * |
|
6289 | + */ |
|
6290 | 6290 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
6291 | 6291 | { |
6292 | 6292 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6320,11 +6320,11 @@ discard block |
||
6320 | 6320 | |
6321 | 6321 | |
6322 | 6322 | /** |
6323 | - * Gets all aircraft types that have flown over by country |
|
6324 | - * |
|
6325 | - * @return Array the aircraft list |
|
6326 | - * |
|
6327 | - */ |
|
6323 | + * Gets all aircraft types that have flown over by country |
|
6324 | + * |
|
6325 | + * @return Array the aircraft list |
|
6326 | + * |
|
6327 | + */ |
|
6328 | 6328 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
6329 | 6329 | { |
6330 | 6330 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6355,11 +6355,11 @@ discard block |
||
6355 | 6355 | |
6356 | 6356 | |
6357 | 6357 | /** |
6358 | - * Gets all aircraft registration that have flown over by country |
|
6359 | - * |
|
6360 | - * @return Array the aircraft list |
|
6361 | - * |
|
6362 | - */ |
|
6358 | + * Gets all aircraft registration that have flown over by country |
|
6359 | + * |
|
6360 | + * @return Array the aircraft list |
|
6361 | + * |
|
6362 | + */ |
|
6363 | 6363 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
6364 | 6364 | { |
6365 | 6365 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6399,11 +6399,11 @@ discard block |
||
6399 | 6399 | |
6400 | 6400 | |
6401 | 6401 | /** |
6402 | - * Gets all aircraft manufacturer that have flown over by country |
|
6403 | - * |
|
6404 | - * @return Array the aircraft manufacturer list |
|
6405 | - * |
|
6406 | - */ |
|
6402 | + * Gets all aircraft manufacturer that have flown over by country |
|
6403 | + * |
|
6404 | + * @return Array the aircraft manufacturer list |
|
6405 | + * |
|
6406 | + */ |
|
6407 | 6407 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
6408 | 6408 | { |
6409 | 6409 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6434,18 +6434,18 @@ discard block |
||
6434 | 6434 | |
6435 | 6435 | |
6436 | 6436 | /** |
6437 | - * Gets all aircraft manufacturers that have flown over |
|
6438 | - * |
|
6439 | - * @return Array the aircraft list |
|
6440 | - * |
|
6441 | - */ |
|
6437 | + * Gets all aircraft manufacturers that have flown over |
|
6438 | + * |
|
6439 | + * @return Array the aircraft list |
|
6440 | + * |
|
6441 | + */ |
|
6442 | 6442 | public function countAllAircraftManufacturers($filters = array(),$year = '',$month = '',$day = '') |
6443 | 6443 | { |
6444 | 6444 | global $globalDBdriver; |
6445 | 6445 | $filter_query = $this->getFilter($filters,true,true); |
6446 | 6446 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
6447 | 6447 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
6448 | - $query_values = array(); |
|
6448 | + $query_values = array(); |
|
6449 | 6449 | if ($year != '') { |
6450 | 6450 | if ($globalDBdriver == 'mysql') { |
6451 | 6451 | $query .= " AND YEAR(spotter_output.date) = :year"; |
@@ -6498,11 +6498,11 @@ discard block |
||
6498 | 6498 | |
6499 | 6499 | |
6500 | 6500 | /** |
6501 | - * Gets all aircraft registrations that have flown over |
|
6502 | - * |
|
6503 | - * @return Array the aircraft list |
|
6504 | - * |
|
6505 | - */ |
|
6501 | + * Gets all aircraft registrations that have flown over |
|
6502 | + * |
|
6503 | + * @return Array the aircraft list |
|
6504 | + * |
|
6505 | + */ |
|
6506 | 6506 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
6507 | 6507 | { |
6508 | 6508 | global $globalDBdriver; |
@@ -6510,15 +6510,15 @@ discard block |
||
6510 | 6510 | $filter_query = $this->getFilter($filters,true,true); |
6511 | 6511 | $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 |
6512 | 6512 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
6513 | - if ($olderthanmonths > 0) { |
|
6514 | - if ($globalDBdriver == 'mysql') { |
|
6513 | + if ($olderthanmonths > 0) { |
|
6514 | + if ($globalDBdriver == 'mysql') { |
|
6515 | 6515 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6516 | 6516 | } else { |
6517 | 6517 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6518 | 6518 | } |
6519 | 6519 | } |
6520 | - if ($sincedate != '') { |
|
6521 | - if ($globalDBdriver == 'mysql') { |
|
6520 | + if ($sincedate != '') { |
|
6521 | + if ($globalDBdriver == 'mysql') { |
|
6522 | 6522 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6523 | 6523 | } else { |
6524 | 6524 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6583,11 +6583,11 @@ discard block |
||
6583 | 6583 | |
6584 | 6584 | |
6585 | 6585 | /** |
6586 | - * Gets all aircraft registrations that have flown over |
|
6587 | - * |
|
6588 | - * @return Array the aircraft list |
|
6589 | - * |
|
6590 | - */ |
|
6586 | + * Gets all aircraft registrations that have flown over |
|
6587 | + * |
|
6588 | + * @return Array the aircraft list |
|
6589 | + * |
|
6590 | + */ |
|
6591 | 6591 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
6592 | 6592 | { |
6593 | 6593 | global $globalDBdriver; |
@@ -6595,15 +6595,15 @@ discard block |
||
6595 | 6595 | $Image = new Image($this->db); |
6596 | 6596 | $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 |
6597 | 6597 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
6598 | - if ($olderthanmonths > 0) { |
|
6599 | - if ($globalDBdriver == 'mysql') { |
|
6598 | + if ($olderthanmonths > 0) { |
|
6599 | + if ($globalDBdriver == 'mysql') { |
|
6600 | 6600 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6601 | 6601 | } else { |
6602 | 6602 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6603 | 6603 | } |
6604 | 6604 | } |
6605 | - if ($sincedate != '') { |
|
6606 | - if ($globalDBdriver == 'mysql') { |
|
6605 | + if ($sincedate != '') { |
|
6606 | + if ($globalDBdriver == 'mysql') { |
|
6607 | 6607 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6608 | 6608 | } else { |
6609 | 6609 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6612,7 +6612,7 @@ discard block |
||
6612 | 6612 | |
6613 | 6613 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
6614 | 6614 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
6615 | - $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"; |
|
6615 | + $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"; |
|
6616 | 6616 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6617 | 6617 | |
6618 | 6618 | $sth = $this->db->prepare($query); |
@@ -6644,26 +6644,26 @@ discard block |
||
6644 | 6644 | |
6645 | 6645 | |
6646 | 6646 | /** |
6647 | - * Gets all departure airports of the airplanes that have flown over |
|
6648 | - * |
|
6649 | - * @return Array the airport list |
|
6650 | - * |
|
6651 | - */ |
|
6647 | + * Gets all departure airports of the airplanes that have flown over |
|
6648 | + * |
|
6649 | + * @return Array the airport list |
|
6650 | + * |
|
6651 | + */ |
|
6652 | 6652 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6653 | 6653 | { |
6654 | 6654 | global $globalDBdriver; |
6655 | 6655 | $filter_query = $this->getFilter($filters,true,true); |
6656 | 6656 | $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, airport.latitude, airport.longitude |
6657 | 6657 | FROM airport, spotter_output".$filter_query." airport.icao = spotter_output.departure_airport_icao AND spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
6658 | - if ($olderthanmonths > 0) { |
|
6659 | - if ($globalDBdriver == 'mysql') { |
|
6658 | + if ($olderthanmonths > 0) { |
|
6659 | + if ($globalDBdriver == 'mysql') { |
|
6660 | 6660 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6661 | 6661 | } else { |
6662 | 6662 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6663 | 6663 | } |
6664 | - } |
|
6665 | - if ($sincedate != '') { |
|
6666 | - if ($globalDBdriver == 'mysql') { |
|
6664 | + } |
|
6665 | + if ($sincedate != '') { |
|
6666 | + if ($globalDBdriver == 'mysql') { |
|
6667 | 6667 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6668 | 6668 | } else { |
6669 | 6669 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6697,7 +6697,7 @@ discard block |
||
6697 | 6697 | $query_values = array_merge($query_values,array(':day' => $day)); |
6698 | 6698 | } |
6699 | 6699 | } |
6700 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country, airport.latitude, airport.longitude |
|
6700 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country, airport.latitude, airport.longitude |
|
6701 | 6701 | ORDER BY airport_departure_icao_count DESC"; |
6702 | 6702 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6703 | 6703 | |
@@ -6721,35 +6721,35 @@ discard block |
||
6721 | 6721 | } |
6722 | 6722 | |
6723 | 6723 | /** |
6724 | - * Gets all departure airports of the airplanes that have flown over |
|
6725 | - * |
|
6726 | - * @return Array the airport list |
|
6727 | - * |
|
6728 | - */ |
|
6724 | + * Gets all departure airports of the airplanes that have flown over |
|
6725 | + * |
|
6726 | + * @return Array the airport list |
|
6727 | + * |
|
6728 | + */ |
|
6729 | 6729 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6730 | 6730 | { |
6731 | 6731 | global $globalDBdriver; |
6732 | 6732 | $filter_query = $this->getFilter($filters,true,true); |
6733 | 6733 | $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 |
6734 | 6734 | 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 <> '' "; |
6735 | - if ($olderthanmonths > 0) { |
|
6736 | - if ($globalDBdriver == 'mysql') { |
|
6735 | + if ($olderthanmonths > 0) { |
|
6736 | + if ($globalDBdriver == 'mysql') { |
|
6737 | 6737 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6738 | 6738 | } else { |
6739 | 6739 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6740 | 6740 | } |
6741 | - } |
|
6742 | - if ($sincedate != '') { |
|
6743 | - if ($globalDBdriver == 'mysql') { |
|
6741 | + } |
|
6742 | + if ($sincedate != '') { |
|
6743 | + if ($globalDBdriver == 'mysql') { |
|
6744 | 6744 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6745 | 6745 | } else { |
6746 | 6746 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6747 | 6747 | } |
6748 | 6748 | } |
6749 | 6749 | |
6750 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6751 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6752 | - $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 |
|
6750 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6751 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6752 | + $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 |
|
6753 | 6753 | ORDER BY airport_departure_icao_count DESC"; |
6754 | 6754 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6755 | 6755 | |
@@ -6774,26 +6774,26 @@ discard block |
||
6774 | 6774 | } |
6775 | 6775 | |
6776 | 6776 | /** |
6777 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6778 | - * |
|
6779 | - * @return Array the airport list |
|
6780 | - * |
|
6781 | - */ |
|
6777 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6778 | + * |
|
6779 | + * @return Array the airport list |
|
6780 | + * |
|
6781 | + */ |
|
6782 | 6782 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6783 | 6783 | { |
6784 | 6784 | global $globalDBdriver; |
6785 | 6785 | $filter_query = $this->getFilter($filters,true,true); |
6786 | 6786 | $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, airport.latitude as departure_airport_latitude, airport.longitude as departure_airport_longitude |
6787 | 6787 | 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"; |
6788 | - if ($olderthanmonths > 0) { |
|
6789 | - if ($globalDBdriver == 'mysql') { |
|
6788 | + if ($olderthanmonths > 0) { |
|
6789 | + if ($globalDBdriver == 'mysql') { |
|
6790 | 6790 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6791 | 6791 | } else { |
6792 | 6792 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6793 | 6793 | } |
6794 | - } |
|
6795 | - if ($sincedate != '') { |
|
6796 | - if ($globalDBdriver == 'mysql') { |
|
6794 | + } |
|
6795 | + if ($sincedate != '') { |
|
6796 | + if ($globalDBdriver == 'mysql') { |
|
6797 | 6797 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6798 | 6798 | } else { |
6799 | 6799 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6827,10 +6827,10 @@ discard block |
||
6827 | 6827 | $query_values = array_merge($query_values,array(':day' => $day)); |
6828 | 6828 | } |
6829 | 6829 | } |
6830 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country, airport.latitude, airport.longitude |
|
6830 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country, airport.latitude, airport.longitude |
|
6831 | 6831 | ORDER BY airport_departure_icao_count DESC"; |
6832 | 6832 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6833 | - //echo $query; |
|
6833 | + //echo $query; |
|
6834 | 6834 | $sth = $this->db->prepare($query); |
6835 | 6835 | $sth->execute($query_values); |
6836 | 6836 | |
@@ -6853,35 +6853,35 @@ discard block |
||
6853 | 6853 | } |
6854 | 6854 | |
6855 | 6855 | /** |
6856 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6857 | - * |
|
6858 | - * @return Array the airport list |
|
6859 | - * |
|
6860 | - */ |
|
6856 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6857 | + * |
|
6858 | + * @return Array the airport list |
|
6859 | + * |
|
6860 | + */ |
|
6861 | 6861 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6862 | 6862 | { |
6863 | 6863 | global $globalDBdriver; |
6864 | 6864 | $filter_query = $this->getFilter($filters,true,true); |
6865 | 6865 | $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 |
6866 | 6866 | 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 "; |
6867 | - if ($olderthanmonths > 0) { |
|
6868 | - if ($globalDBdriver == 'mysql') { |
|
6867 | + if ($olderthanmonths > 0) { |
|
6868 | + if ($globalDBdriver == 'mysql') { |
|
6869 | 6869 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6870 | 6870 | } else { |
6871 | 6871 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6872 | 6872 | } |
6873 | - } |
|
6874 | - if ($sincedate != '') { |
|
6875 | - if ($globalDBdriver == 'mysql') { |
|
6873 | + } |
|
6874 | + if ($sincedate != '') { |
|
6875 | + if ($globalDBdriver == 'mysql') { |
|
6876 | 6876 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6877 | 6877 | } else { |
6878 | 6878 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
6879 | 6879 | } |
6880 | 6880 | } |
6881 | 6881 | |
6882 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6883 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6884 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6882 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6883 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6884 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6885 | 6885 | ORDER BY airport_departure_icao_count DESC"; |
6886 | 6886 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6887 | 6887 | |
@@ -6906,11 +6906,11 @@ discard block |
||
6906 | 6906 | } |
6907 | 6907 | |
6908 | 6908 | /** |
6909 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6910 | - * |
|
6911 | - * @return Array the airport list |
|
6912 | - * |
|
6913 | - */ |
|
6909 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6910 | + * |
|
6911 | + * @return Array the airport list |
|
6912 | + * |
|
6913 | + */ |
|
6914 | 6914 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
6915 | 6915 | { |
6916 | 6916 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6944,11 +6944,11 @@ discard block |
||
6944 | 6944 | |
6945 | 6945 | |
6946 | 6946 | /** |
6947 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6948 | - * |
|
6949 | - * @return Array the airport list |
|
6950 | - * |
|
6951 | - */ |
|
6947 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6948 | + * |
|
6949 | + * @return Array the airport list |
|
6950 | + * |
|
6951 | + */ |
|
6952 | 6952 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
6953 | 6953 | { |
6954 | 6954 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6977,11 +6977,11 @@ discard block |
||
6977 | 6977 | |
6978 | 6978 | |
6979 | 6979 | /** |
6980 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6981 | - * |
|
6982 | - * @return Array the airport list |
|
6983 | - * |
|
6984 | - */ |
|
6980 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6981 | + * |
|
6982 | + * @return Array the airport list |
|
6983 | + * |
|
6984 | + */ |
|
6985 | 6985 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
6986 | 6986 | { |
6987 | 6987 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7014,11 +7014,11 @@ discard block |
||
7014 | 7014 | |
7015 | 7015 | |
7016 | 7016 | /** |
7017 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7018 | - * |
|
7019 | - * @return Array the airport list |
|
7020 | - * |
|
7021 | - */ |
|
7017 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7018 | + * |
|
7019 | + * @return Array the airport list |
|
7020 | + * |
|
7021 | + */ |
|
7022 | 7022 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
7023 | 7023 | { |
7024 | 7024 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7048,11 +7048,11 @@ discard block |
||
7048 | 7048 | |
7049 | 7049 | |
7050 | 7050 | /** |
7051 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
7052 | - * |
|
7053 | - * @return Array the airport list |
|
7054 | - * |
|
7055 | - */ |
|
7051 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
7052 | + * |
|
7053 | + * @return Array the airport list |
|
7054 | + * |
|
7055 | + */ |
|
7056 | 7056 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
7057 | 7057 | { |
7058 | 7058 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7085,11 +7085,11 @@ discard block |
||
7085 | 7085 | |
7086 | 7086 | |
7087 | 7087 | /** |
7088 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
7089 | - * |
|
7090 | - * @return Array the airport list |
|
7091 | - * |
|
7092 | - */ |
|
7088 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
7089 | + * |
|
7090 | + * @return Array the airport list |
|
7091 | + * |
|
7092 | + */ |
|
7093 | 7093 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
7094 | 7094 | { |
7095 | 7095 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7119,11 +7119,11 @@ discard block |
||
7119 | 7119 | |
7120 | 7120 | |
7121 | 7121 | /** |
7122 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
7123 | - * |
|
7124 | - * @return Array the airport list |
|
7125 | - * |
|
7126 | - */ |
|
7122 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
7123 | + * |
|
7124 | + * @return Array the airport list |
|
7125 | + * |
|
7126 | + */ |
|
7127 | 7127 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
7128 | 7128 | { |
7129 | 7129 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7156,11 +7156,11 @@ discard block |
||
7156 | 7156 | |
7157 | 7157 | |
7158 | 7158 | /** |
7159 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
7160 | - * |
|
7161 | - * @return Array the airport list |
|
7162 | - * |
|
7163 | - */ |
|
7159 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
7160 | + * |
|
7161 | + * @return Array the airport list |
|
7162 | + * |
|
7163 | + */ |
|
7164 | 7164 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
7165 | 7165 | { |
7166 | 7166 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7189,11 +7189,11 @@ discard block |
||
7189 | 7189 | |
7190 | 7190 | |
7191 | 7191 | /** |
7192 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
7193 | - * |
|
7194 | - * @return Array the airport list |
|
7195 | - * |
|
7196 | - */ |
|
7192 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
7193 | + * |
|
7194 | + * @return Array the airport list |
|
7195 | + * |
|
7196 | + */ |
|
7197 | 7197 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
7198 | 7198 | { |
7199 | 7199 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7226,11 +7226,11 @@ discard block |
||
7226 | 7226 | |
7227 | 7227 | |
7228 | 7228 | /** |
7229 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
7230 | - * |
|
7231 | - * @return Array the airport list |
|
7232 | - * |
|
7233 | - */ |
|
7229 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
7230 | + * |
|
7231 | + * @return Array the airport list |
|
7232 | + * |
|
7233 | + */ |
|
7234 | 7234 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
7235 | 7235 | { |
7236 | 7236 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7260,11 +7260,11 @@ discard block |
||
7260 | 7260 | |
7261 | 7261 | |
7262 | 7262 | /** |
7263 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
7264 | - * |
|
7265 | - * @return Array the airport list |
|
7266 | - * |
|
7267 | - */ |
|
7263 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
7264 | + * |
|
7265 | + * @return Array the airport list |
|
7266 | + * |
|
7267 | + */ |
|
7268 | 7268 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
7269 | 7269 | { |
7270 | 7270 | global $globalTimezone, $globalDBdriver; |
@@ -7310,11 +7310,11 @@ discard block |
||
7310 | 7310 | |
7311 | 7311 | |
7312 | 7312 | /** |
7313 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
7314 | - * |
|
7315 | - * @return Array the airport list |
|
7316 | - * |
|
7317 | - */ |
|
7313 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
7314 | + * |
|
7315 | + * @return Array the airport list |
|
7316 | + * |
|
7317 | + */ |
|
7318 | 7318 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
7319 | 7319 | { |
7320 | 7320 | global $globalTimezone, $globalDBdriver; |
@@ -7357,11 +7357,11 @@ discard block |
||
7357 | 7357 | |
7358 | 7358 | |
7359 | 7359 | /** |
7360 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
7361 | - * |
|
7362 | - * @return Array the airport list |
|
7363 | - * |
|
7364 | - */ |
|
7360 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
7361 | + * |
|
7362 | + * @return Array the airport list |
|
7363 | + * |
|
7364 | + */ |
|
7365 | 7365 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
7366 | 7366 | { |
7367 | 7367 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7393,11 +7393,11 @@ discard block |
||
7393 | 7393 | } |
7394 | 7394 | |
7395 | 7395 | /** |
7396 | - * Gets all departure airports of the airplanes that have flown over based on a owner |
|
7397 | - * |
|
7398 | - * @return Array the airport list |
|
7399 | - * |
|
7400 | - */ |
|
7396 | + * Gets all departure airports of the airplanes that have flown over based on a owner |
|
7397 | + * |
|
7398 | + * @return Array the airport list |
|
7399 | + * |
|
7400 | + */ |
|
7401 | 7401 | public function countAllDepartureAirportsByOwner($owner,$filters = array()) |
7402 | 7402 | { |
7403 | 7403 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7429,11 +7429,11 @@ discard block |
||
7429 | 7429 | } |
7430 | 7430 | |
7431 | 7431 | /** |
7432 | - * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7433 | - * |
|
7434 | - * @return Array the airport list |
|
7435 | - * |
|
7436 | - */ |
|
7432 | + * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7433 | + * |
|
7434 | + * @return Array the airport list |
|
7435 | + * |
|
7436 | + */ |
|
7437 | 7437 | public function countAllDepartureAirportsByPilot($pilot,$filters = array()) |
7438 | 7438 | { |
7439 | 7439 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7466,11 +7466,11 @@ discard block |
||
7466 | 7466 | |
7467 | 7467 | |
7468 | 7468 | /** |
7469 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7470 | - * |
|
7471 | - * @return Array the airport list |
|
7472 | - * |
|
7473 | - */ |
|
7469 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7470 | + * |
|
7471 | + * @return Array the airport list |
|
7472 | + * |
|
7473 | + */ |
|
7474 | 7474 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
7475 | 7475 | { |
7476 | 7476 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7499,11 +7499,11 @@ discard block |
||
7499 | 7499 | } |
7500 | 7500 | |
7501 | 7501 | /** |
7502 | - * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7503 | - * |
|
7504 | - * @return Array the airport list |
|
7505 | - * |
|
7506 | - */ |
|
7502 | + * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7503 | + * |
|
7504 | + * @return Array the airport list |
|
7505 | + * |
|
7506 | + */ |
|
7507 | 7507 | public function countAllDepartureAirportCountriesByOwner($owner,$filters = array()) |
7508 | 7508 | { |
7509 | 7509 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7519,11 +7519,11 @@ discard block |
||
7519 | 7519 | } |
7520 | 7520 | |
7521 | 7521 | /** |
7522 | - * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7523 | - * |
|
7524 | - * @return Array the airport list |
|
7525 | - * |
|
7526 | - */ |
|
7522 | + * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7523 | + * |
|
7524 | + * @return Array the airport list |
|
7525 | + * |
|
7526 | + */ |
|
7527 | 7527 | public function countAllDepartureAirportCountriesByPilot($pilot,$filters = array()) |
7528 | 7528 | { |
7529 | 7529 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7541,11 +7541,11 @@ discard block |
||
7541 | 7541 | |
7542 | 7542 | |
7543 | 7543 | /** |
7544 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
7545 | - * |
|
7546 | - * @return Array the airport list |
|
7547 | - * |
|
7548 | - */ |
|
7544 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
7545 | + * |
|
7546 | + * @return Array the airport list |
|
7547 | + * |
|
7548 | + */ |
|
7549 | 7549 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
7550 | 7550 | { |
7551 | 7551 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7579,11 +7579,11 @@ discard block |
||
7579 | 7579 | |
7580 | 7580 | |
7581 | 7581 | /** |
7582 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7583 | - * |
|
7584 | - * @return Array the airport list |
|
7585 | - * |
|
7586 | - */ |
|
7582 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7583 | + * |
|
7584 | + * @return Array the airport list |
|
7585 | + * |
|
7586 | + */ |
|
7587 | 7587 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
7588 | 7588 | { |
7589 | 7589 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7613,31 +7613,31 @@ discard block |
||
7613 | 7613 | |
7614 | 7614 | |
7615 | 7615 | /** |
7616 | - * Gets all arrival airports of the airplanes that have flown over |
|
7617 | - * |
|
7618 | - * @param Boolean $limit Limit result to 10 or not |
|
7619 | - * @param Integer $olderthanmonths Only show result older than x months |
|
7620 | - * @param String $sincedate Only show result since x date |
|
7621 | - * @param Boolean $icaoaskey Show result by ICAO |
|
7622 | - * @param Array $filters Filter used here |
|
7623 | - * @return Array the airport list |
|
7624 | - * |
|
7625 | - */ |
|
7616 | + * Gets all arrival airports of the airplanes that have flown over |
|
7617 | + * |
|
7618 | + * @param Boolean $limit Limit result to 10 or not |
|
7619 | + * @param Integer $olderthanmonths Only show result older than x months |
|
7620 | + * @param String $sincedate Only show result since x date |
|
7621 | + * @param Boolean $icaoaskey Show result by ICAO |
|
7622 | + * @param Array $filters Filter used here |
|
7623 | + * @return Array the airport list |
|
7624 | + * |
|
7625 | + */ |
|
7626 | 7626 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7627 | 7627 | { |
7628 | 7628 | global $globalDBdriver; |
7629 | 7629 | $filter_query = $this->getFilter($filters,true,true); |
7630 | 7630 | $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, airport.latitude as arrival_airport_latitude, airport.longitude as arrival_airport_longitude |
7631 | 7631 | FROM airport, spotter_output".$filter_query." airport.icao = spotter_output.arrival_airport_icao AND spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
7632 | - if ($olderthanmonths > 0) { |
|
7633 | - if ($globalDBdriver == 'mysql') { |
|
7632 | + if ($olderthanmonths > 0) { |
|
7633 | + if ($globalDBdriver == 'mysql') { |
|
7634 | 7634 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7635 | 7635 | } else { |
7636 | 7636 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7637 | 7637 | } |
7638 | 7638 | } |
7639 | - if ($sincedate != '') { |
|
7640 | - if ($globalDBdriver == 'mysql') { |
|
7639 | + if ($sincedate != '') { |
|
7640 | + if ($globalDBdriver == 'mysql') { |
|
7641 | 7641 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7642 | 7642 | } else { |
7643 | 7643 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7671,7 +7671,7 @@ discard block |
||
7671 | 7671 | $query_values = array_merge($query_values,array(':day' => $day)); |
7672 | 7672 | } |
7673 | 7673 | } |
7674 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country, airport.latitude, airport.longitude |
|
7674 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country, airport.latitude, airport.longitude |
|
7675 | 7675 | ORDER BY airport_arrival_icao_count DESC"; |
7676 | 7676 | if ($limit) $query .= " LIMIT 10"; |
7677 | 7677 | |
@@ -7702,35 +7702,35 @@ discard block |
||
7702 | 7702 | } |
7703 | 7703 | |
7704 | 7704 | /** |
7705 | - * Gets all arrival airports of the airplanes that have flown over |
|
7706 | - * |
|
7707 | - * @return Array the airport list |
|
7708 | - * |
|
7709 | - */ |
|
7705 | + * Gets all arrival airports of the airplanes that have flown over |
|
7706 | + * |
|
7707 | + * @return Array the airport list |
|
7708 | + * |
|
7709 | + */ |
|
7710 | 7710 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
7711 | 7711 | { |
7712 | 7712 | global $globalDBdriver; |
7713 | 7713 | $filter_query = $this->getFilter($filters,true,true); |
7714 | 7714 | $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, country.iso3 AS arrival_airport_country_iso3 |
7715 | 7715 | FROM countries,spotter_output".$filter_query." countries.name = spotter_output.arrival_airport_country AND spotter_output.airline_icao <> '' AND spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> '' "; |
7716 | - if ($olderthanmonths > 0) { |
|
7717 | - if ($globalDBdriver == 'mysql') { |
|
7716 | + if ($olderthanmonths > 0) { |
|
7717 | + if ($globalDBdriver == 'mysql') { |
|
7718 | 7718 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7719 | 7719 | } else { |
7720 | 7720 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7721 | 7721 | } |
7722 | 7722 | } |
7723 | - if ($sincedate != '') { |
|
7724 | - if ($globalDBdriver == 'mysql') { |
|
7723 | + if ($sincedate != '') { |
|
7724 | + if ($globalDBdriver == 'mysql') { |
|
7725 | 7725 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7726 | 7726 | } else { |
7727 | 7727 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7728 | 7728 | } |
7729 | 7729 | } |
7730 | 7730 | |
7731 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7732 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7733 | - $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, countries.iso3 |
|
7731 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7732 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7733 | + $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, countries.iso3 |
|
7734 | 7734 | ORDER BY airport_arrival_icao_count DESC"; |
7735 | 7735 | if ($limit) $query .= " LIMIT 10"; |
7736 | 7736 | |
@@ -7762,26 +7762,26 @@ discard block |
||
7762 | 7762 | |
7763 | 7763 | |
7764 | 7764 | /** |
7765 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7766 | - * |
|
7767 | - * @return Array the airport list |
|
7768 | - * |
|
7769 | - */ |
|
7765 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7766 | + * |
|
7767 | + * @return Array the airport list |
|
7768 | + * |
|
7769 | + */ |
|
7770 | 7770 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7771 | 7771 | { |
7772 | 7772 | global $globalDBdriver; |
7773 | 7773 | $filter_query = $this->getFilter($filters,true,true); |
7774 | 7774 | $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, airport.latitude AS arrival_airport_latitude, airport.longitude AS arrival_airport_longitude |
7775 | 7775 | 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"; |
7776 | - if ($olderthanmonths > 0) { |
|
7777 | - if ($globalDBdriver == 'mysql') { |
|
7776 | + if ($olderthanmonths > 0) { |
|
7777 | + if ($globalDBdriver == 'mysql') { |
|
7778 | 7778 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7779 | 7779 | } else { |
7780 | 7780 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7781 | 7781 | } |
7782 | 7782 | } |
7783 | - if ($sincedate != '') { |
|
7784 | - if ($globalDBdriver == 'mysql') { |
|
7783 | + if ($sincedate != '') { |
|
7784 | + if ($globalDBdriver == 'mysql') { |
|
7785 | 7785 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7786 | 7786 | } else { |
7787 | 7787 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7843,35 +7843,35 @@ discard block |
||
7843 | 7843 | } |
7844 | 7844 | |
7845 | 7845 | /** |
7846 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7847 | - * |
|
7848 | - * @return Array the airport list |
|
7849 | - * |
|
7850 | - */ |
|
7846 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7847 | + * |
|
7848 | + * @return Array the airport list |
|
7849 | + * |
|
7850 | + */ |
|
7851 | 7851 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
7852 | 7852 | { |
7853 | 7853 | global $globalDBdriver; |
7854 | 7854 | $filter_query = $this->getFilter($filters,true,true); |
7855 | 7855 | $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 |
7856 | 7856 | 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 "; |
7857 | - if ($olderthanmonths > 0) { |
|
7858 | - if ($globalDBdriver == 'mysql') { |
|
7857 | + if ($olderthanmonths > 0) { |
|
7858 | + if ($globalDBdriver == 'mysql') { |
|
7859 | 7859 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7860 | 7860 | } else { |
7861 | 7861 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7862 | 7862 | } |
7863 | 7863 | } |
7864 | - if ($sincedate != '') { |
|
7865 | - if ($globalDBdriver == 'mysql') { |
|
7864 | + if ($sincedate != '') { |
|
7865 | + if ($globalDBdriver == 'mysql') { |
|
7866 | 7866 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7867 | 7867 | } else { |
7868 | 7868 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7869 | 7869 | } |
7870 | 7870 | } |
7871 | 7871 | |
7872 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7873 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7874 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7872 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7873 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7874 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7875 | 7875 | ORDER BY airport_arrival_icao_count DESC"; |
7876 | 7876 | if ($limit) $query .= " LIMIT 10"; |
7877 | 7877 | |
@@ -7901,11 +7901,11 @@ discard block |
||
7901 | 7901 | } |
7902 | 7902 | |
7903 | 7903 | /** |
7904 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7905 | - * |
|
7906 | - * @return Array the airport list |
|
7907 | - * |
|
7908 | - */ |
|
7904 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7905 | + * |
|
7906 | + * @return Array the airport list |
|
7907 | + * |
|
7908 | + */ |
|
7909 | 7909 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
7910 | 7910 | { |
7911 | 7911 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7937,11 +7937,11 @@ discard block |
||
7937 | 7937 | |
7938 | 7938 | |
7939 | 7939 | /** |
7940 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7941 | - * |
|
7942 | - * @return Array the airport list |
|
7943 | - * |
|
7944 | - */ |
|
7940 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7941 | + * |
|
7942 | + * @return Array the airport list |
|
7943 | + * |
|
7944 | + */ |
|
7945 | 7945 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
7946 | 7946 | { |
7947 | 7947 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7971,11 +7971,11 @@ discard block |
||
7971 | 7971 | |
7972 | 7972 | |
7973 | 7973 | /** |
7974 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7975 | - * |
|
7976 | - * @return Array the airport list |
|
7977 | - * |
|
7978 | - */ |
|
7974 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7975 | + * |
|
7976 | + * @return Array the airport list |
|
7977 | + * |
|
7978 | + */ |
|
7979 | 7979 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
7980 | 7980 | { |
7981 | 7981 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8009,11 +8009,11 @@ discard block |
||
8009 | 8009 | |
8010 | 8010 | |
8011 | 8011 | /** |
8012 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
8013 | - * |
|
8014 | - * @return Array the airport list |
|
8015 | - * |
|
8016 | - */ |
|
8012 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
8013 | + * |
|
8014 | + * @return Array the airport list |
|
8015 | + * |
|
8016 | + */ |
|
8017 | 8017 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
8018 | 8018 | { |
8019 | 8019 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8043,11 +8043,11 @@ discard block |
||
8043 | 8043 | |
8044 | 8044 | |
8045 | 8045 | /** |
8046 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
8047 | - * |
|
8048 | - * @return Array the airport list |
|
8049 | - * |
|
8050 | - */ |
|
8046 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
8047 | + * |
|
8048 | + * @return Array the airport list |
|
8049 | + * |
|
8050 | + */ |
|
8051 | 8051 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
8052 | 8052 | { |
8053 | 8053 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8081,11 +8081,11 @@ discard block |
||
8081 | 8081 | |
8082 | 8082 | |
8083 | 8083 | /** |
8084 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
8085 | - * |
|
8086 | - * @return Array the airport list |
|
8087 | - * |
|
8088 | - */ |
|
8084 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
8085 | + * |
|
8086 | + * @return Array the airport list |
|
8087 | + * |
|
8088 | + */ |
|
8089 | 8089 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
8090 | 8090 | { |
8091 | 8091 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8116,11 +8116,11 @@ discard block |
||
8116 | 8116 | |
8117 | 8117 | |
8118 | 8118 | /** |
8119 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
8120 | - * |
|
8121 | - * @return Array the airport list |
|
8122 | - * |
|
8123 | - */ |
|
8119 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
8120 | + * |
|
8121 | + * @return Array the airport list |
|
8122 | + * |
|
8123 | + */ |
|
8124 | 8124 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
8125 | 8125 | { |
8126 | 8126 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8153,11 +8153,11 @@ discard block |
||
8153 | 8153 | |
8154 | 8154 | |
8155 | 8155 | /** |
8156 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
8157 | - * |
|
8158 | - * @return Array the airport list |
|
8159 | - * |
|
8160 | - */ |
|
8156 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
8157 | + * |
|
8158 | + * @return Array the airport list |
|
8159 | + * |
|
8160 | + */ |
|
8161 | 8161 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
8162 | 8162 | { |
8163 | 8163 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8185,11 +8185,11 @@ discard block |
||
8185 | 8185 | |
8186 | 8186 | |
8187 | 8187 | /** |
8188 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
8189 | - * |
|
8190 | - * @return Array the airport list |
|
8191 | - * |
|
8192 | - */ |
|
8188 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
8189 | + * |
|
8190 | + * @return Array the airport list |
|
8191 | + * |
|
8192 | + */ |
|
8193 | 8193 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
8194 | 8194 | { |
8195 | 8195 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8223,11 +8223,11 @@ discard block |
||
8223 | 8223 | |
8224 | 8224 | |
8225 | 8225 | /** |
8226 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
8227 | - * |
|
8228 | - * @return Array the airport list |
|
8229 | - * |
|
8230 | - */ |
|
8226 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
8227 | + * |
|
8228 | + * @return Array the airport list |
|
8229 | + * |
|
8230 | + */ |
|
8231 | 8231 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
8232 | 8232 | { |
8233 | 8233 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8258,11 +8258,11 @@ discard block |
||
8258 | 8258 | |
8259 | 8259 | |
8260 | 8260 | /** |
8261 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
8262 | - * |
|
8263 | - * @return Array the airport list |
|
8264 | - * |
|
8265 | - */ |
|
8261 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
8262 | + * |
|
8263 | + * @return Array the airport list |
|
8264 | + * |
|
8265 | + */ |
|
8266 | 8266 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
8267 | 8267 | { |
8268 | 8268 | global $globalTimezone, $globalDBdriver; |
@@ -8308,11 +8308,11 @@ discard block |
||
8308 | 8308 | |
8309 | 8309 | |
8310 | 8310 | /** |
8311 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
8312 | - * |
|
8313 | - * @return Array the airport list |
|
8314 | - * |
|
8315 | - */ |
|
8311 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
8312 | + * |
|
8313 | + * @return Array the airport list |
|
8314 | + * |
|
8315 | + */ |
|
8316 | 8316 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
8317 | 8317 | { |
8318 | 8318 | global $globalTimezone, $globalDBdriver; |
@@ -8355,11 +8355,11 @@ discard block |
||
8355 | 8355 | |
8356 | 8356 | |
8357 | 8357 | /** |
8358 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
8359 | - * |
|
8360 | - * @return Array the airport list |
|
8361 | - * |
|
8362 | - */ |
|
8358 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
8359 | + * |
|
8360 | + * @return Array the airport list |
|
8361 | + * |
|
8362 | + */ |
|
8363 | 8363 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
8364 | 8364 | { |
8365 | 8365 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8391,11 +8391,11 @@ discard block |
||
8391 | 8391 | } |
8392 | 8392 | |
8393 | 8393 | /** |
8394 | - * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
8395 | - * |
|
8396 | - * @return Array the airport list |
|
8397 | - * |
|
8398 | - */ |
|
8394 | + * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
8395 | + * |
|
8396 | + * @return Array the airport list |
|
8397 | + * |
|
8398 | + */ |
|
8399 | 8399 | public function countAllArrivalAirportsByOwner($owner,$filters = array()) |
8400 | 8400 | { |
8401 | 8401 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8426,11 +8426,11 @@ discard block |
||
8426 | 8426 | } |
8427 | 8427 | |
8428 | 8428 | /** |
8429 | - * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8430 | - * |
|
8431 | - * @return Array the airport list |
|
8432 | - * |
|
8433 | - */ |
|
8429 | + * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8430 | + * |
|
8431 | + * @return Array the airport list |
|
8432 | + * |
|
8433 | + */ |
|
8434 | 8434 | public function countAllArrivalAirportsByPilot($pilot,$filters = array()) |
8435 | 8435 | { |
8436 | 8436 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8461,11 +8461,11 @@ discard block |
||
8461 | 8461 | } |
8462 | 8462 | |
8463 | 8463 | /** |
8464 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8465 | - * |
|
8466 | - * @return Array the airport list |
|
8467 | - * |
|
8468 | - */ |
|
8464 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8465 | + * |
|
8466 | + * @return Array the airport list |
|
8467 | + * |
|
8468 | + */ |
|
8469 | 8469 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
8470 | 8470 | { |
8471 | 8471 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8494,11 +8494,11 @@ discard block |
||
8494 | 8494 | } |
8495 | 8495 | |
8496 | 8496 | /** |
8497 | - * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8498 | - * |
|
8499 | - * @return Array the airport list |
|
8500 | - * |
|
8501 | - */ |
|
8497 | + * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8498 | + * |
|
8499 | + * @return Array the airport list |
|
8500 | + * |
|
8501 | + */ |
|
8502 | 8502 | public function countAllArrivalAirportCountriesByOwner($owner, $filters = array()) |
8503 | 8503 | { |
8504 | 8504 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8514,11 +8514,11 @@ discard block |
||
8514 | 8514 | } |
8515 | 8515 | |
8516 | 8516 | /** |
8517 | - * Gets all arrival airports by country of the airplanes that have flown over based on a pilot |
|
8518 | - * |
|
8519 | - * @return Array the airport list |
|
8520 | - * |
|
8521 | - */ |
|
8517 | + * Gets all arrival airports by country of the airplanes that have flown over based on a pilot |
|
8518 | + * |
|
8519 | + * @return Array the airport list |
|
8520 | + * |
|
8521 | + */ |
|
8522 | 8522 | public function countAllArrivalAirportCountriesByPilot($pilot, $filters = array()) |
8523 | 8523 | { |
8524 | 8524 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8536,11 +8536,11 @@ discard block |
||
8536 | 8536 | |
8537 | 8537 | |
8538 | 8538 | /** |
8539 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8540 | - * |
|
8541 | - * @return Array the airport list |
|
8542 | - * |
|
8543 | - */ |
|
8539 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8540 | + * |
|
8541 | + * @return Array the airport list |
|
8542 | + * |
|
8543 | + */ |
|
8544 | 8544 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
8545 | 8545 | { |
8546 | 8546 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8573,11 +8573,11 @@ discard block |
||
8573 | 8573 | |
8574 | 8574 | |
8575 | 8575 | /** |
8576 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8577 | - * |
|
8578 | - * @return Array the airport list |
|
8579 | - * |
|
8580 | - */ |
|
8576 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8577 | + * |
|
8578 | + * @return Array the airport list |
|
8579 | + * |
|
8580 | + */ |
|
8581 | 8581 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
8582 | 8582 | { |
8583 | 8583 | global $globalDBdriver; |
@@ -8609,11 +8609,11 @@ discard block |
||
8609 | 8609 | |
8610 | 8610 | |
8611 | 8611 | /** |
8612 | - * Counts all airport departure countries |
|
8613 | - * |
|
8614 | - * @return Array the airport departure list |
|
8615 | - * |
|
8616 | - */ |
|
8612 | + * Counts all airport departure countries |
|
8613 | + * |
|
8614 | + * @return Array the airport departure list |
|
8615 | + * |
|
8616 | + */ |
|
8617 | 8617 | public function countAllDepartureCountries($filters = array(),$year = '',$month = '', $day = '') |
8618 | 8618 | { |
8619 | 8619 | global $globalDBdriver; |
@@ -8672,11 +8672,11 @@ discard block |
||
8672 | 8672 | |
8673 | 8673 | |
8674 | 8674 | /** |
8675 | - * Counts all airport arrival countries |
|
8676 | - * |
|
8677 | - * @return Array the airport arrival list |
|
8678 | - * |
|
8679 | - */ |
|
8675 | + * Counts all airport arrival countries |
|
8676 | + * |
|
8677 | + * @return Array the airport arrival list |
|
8678 | + * |
|
8679 | + */ |
|
8680 | 8680 | public function countAllArrivalCountries($limit = true,$filters = array(),$year = '',$month = '',$day = '') |
8681 | 8681 | { |
8682 | 8682 | global $globalDBdriver; |
@@ -8739,11 +8739,11 @@ discard block |
||
8739 | 8739 | |
8740 | 8740 | |
8741 | 8741 | /** |
8742 | - * Gets all route combinations |
|
8743 | - * |
|
8744 | - * @return Array the route list |
|
8745 | - * |
|
8746 | - */ |
|
8742 | + * Gets all route combinations |
|
8743 | + * |
|
8744 | + * @return Array the route list |
|
8745 | + * |
|
8746 | + */ |
|
8747 | 8747 | public function countAllRoutes($filters = array()) |
8748 | 8748 | { |
8749 | 8749 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8782,11 +8782,11 @@ discard block |
||
8782 | 8782 | |
8783 | 8783 | |
8784 | 8784 | /** |
8785 | - * Gets all route combinations based on an aircraft |
|
8786 | - * |
|
8787 | - * @return Array the route list |
|
8788 | - * |
|
8789 | - */ |
|
8785 | + * Gets all route combinations based on an aircraft |
|
8786 | + * |
|
8787 | + * @return Array the route list |
|
8788 | + * |
|
8789 | + */ |
|
8790 | 8790 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
8791 | 8791 | { |
8792 | 8792 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8822,11 +8822,11 @@ discard block |
||
8822 | 8822 | |
8823 | 8823 | |
8824 | 8824 | /** |
8825 | - * Gets all route combinations based on an aircraft registration |
|
8826 | - * |
|
8827 | - * @return Array the route list |
|
8828 | - * |
|
8829 | - */ |
|
8825 | + * Gets all route combinations based on an aircraft registration |
|
8826 | + * |
|
8827 | + * @return Array the route list |
|
8828 | + * |
|
8829 | + */ |
|
8830 | 8830 | public function countAllRoutesByRegistration($registration, $filters = array()) |
8831 | 8831 | { |
8832 | 8832 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8864,11 +8864,11 @@ discard block |
||
8864 | 8864 | |
8865 | 8865 | |
8866 | 8866 | /** |
8867 | - * Gets all route combinations based on an airline |
|
8868 | - * |
|
8869 | - * @return Array the route list |
|
8870 | - * |
|
8871 | - */ |
|
8867 | + * Gets all route combinations based on an airline |
|
8868 | + * |
|
8869 | + * @return Array the route list |
|
8870 | + * |
|
8871 | + */ |
|
8872 | 8872 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
8873 | 8873 | { |
8874 | 8874 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8906,11 +8906,11 @@ discard block |
||
8906 | 8906 | |
8907 | 8907 | |
8908 | 8908 | /** |
8909 | - * Gets all route combinations based on an airport |
|
8910 | - * |
|
8911 | - * @return Array the route list |
|
8912 | - * |
|
8913 | - */ |
|
8909 | + * Gets all route combinations based on an airport |
|
8910 | + * |
|
8911 | + * @return Array the route list |
|
8912 | + * |
|
8913 | + */ |
|
8914 | 8914 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
8915 | 8915 | { |
8916 | 8916 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8947,11 +8947,11 @@ discard block |
||
8947 | 8947 | |
8948 | 8948 | |
8949 | 8949 | /** |
8950 | - * Gets all route combinations based on an country |
|
8951 | - * |
|
8952 | - * @return Array the route list |
|
8953 | - * |
|
8954 | - */ |
|
8950 | + * Gets all route combinations based on an country |
|
8951 | + * |
|
8952 | + * @return Array the route list |
|
8953 | + * |
|
8954 | + */ |
|
8955 | 8955 | public function countAllRoutesByCountry($country, $filters = array()) |
8956 | 8956 | { |
8957 | 8957 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8987,11 +8987,11 @@ discard block |
||
8987 | 8987 | |
8988 | 8988 | |
8989 | 8989 | /** |
8990 | - * Gets all route combinations based on an date |
|
8991 | - * |
|
8992 | - * @return Array the route list |
|
8993 | - * |
|
8994 | - */ |
|
8990 | + * Gets all route combinations based on an date |
|
8991 | + * |
|
8992 | + * @return Array the route list |
|
8993 | + * |
|
8994 | + */ |
|
8995 | 8995 | public function countAllRoutesByDate($date, $filters = array()) |
8996 | 8996 | { |
8997 | 8997 | global $globalTimezone, $globalDBdriver; |
@@ -9041,11 +9041,11 @@ discard block |
||
9041 | 9041 | |
9042 | 9042 | |
9043 | 9043 | /** |
9044 | - * Gets all route combinations based on an ident/callsign |
|
9045 | - * |
|
9046 | - * @return Array the route list |
|
9047 | - * |
|
9048 | - */ |
|
9044 | + * Gets all route combinations based on an ident/callsign |
|
9045 | + * |
|
9046 | + * @return Array the route list |
|
9047 | + * |
|
9048 | + */ |
|
9049 | 9049 | public function countAllRoutesByIdent($ident, $filters = array()) |
9050 | 9050 | { |
9051 | 9051 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9081,11 +9081,11 @@ discard block |
||
9081 | 9081 | } |
9082 | 9082 | |
9083 | 9083 | /** |
9084 | - * Gets all route combinations based on an owner |
|
9085 | - * |
|
9086 | - * @return Array the route list |
|
9087 | - * |
|
9088 | - */ |
|
9084 | + * Gets all route combinations based on an owner |
|
9085 | + * |
|
9086 | + * @return Array the route list |
|
9087 | + * |
|
9088 | + */ |
|
9089 | 9089 | public function countAllRoutesByOwner($owner,$filters = array()) |
9090 | 9090 | { |
9091 | 9091 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9121,11 +9121,11 @@ discard block |
||
9121 | 9121 | } |
9122 | 9122 | |
9123 | 9123 | /** |
9124 | - * Gets all route combinations based on a pilot |
|
9125 | - * |
|
9126 | - * @return Array the route list |
|
9127 | - * |
|
9128 | - */ |
|
9124 | + * Gets all route combinations based on a pilot |
|
9125 | + * |
|
9126 | + * @return Array the route list |
|
9127 | + * |
|
9128 | + */ |
|
9129 | 9129 | public function countAllRoutesByPilot($pilot,$filters = array()) |
9130 | 9130 | { |
9131 | 9131 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9162,11 +9162,11 @@ discard block |
||
9162 | 9162 | |
9163 | 9163 | |
9164 | 9164 | /** |
9165 | - * Gets all route combinations based on an manufacturer |
|
9166 | - * |
|
9167 | - * @return Array the route list |
|
9168 | - * |
|
9169 | - */ |
|
9165 | + * Gets all route combinations based on an manufacturer |
|
9166 | + * |
|
9167 | + * @return Array the route list |
|
9168 | + * |
|
9169 | + */ |
|
9170 | 9170 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
9171 | 9171 | { |
9172 | 9172 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9204,11 +9204,11 @@ discard block |
||
9204 | 9204 | |
9205 | 9205 | |
9206 | 9206 | /** |
9207 | - * Gets all route combinations with waypoints |
|
9208 | - * |
|
9209 | - * @return Array the route list |
|
9210 | - * |
|
9211 | - */ |
|
9207 | + * Gets all route combinations with waypoints |
|
9208 | + * |
|
9209 | + * @return Array the route list |
|
9210 | + * |
|
9211 | + */ |
|
9212 | 9212 | public function countAllRoutesWithWaypoints($filters = array()) |
9213 | 9213 | { |
9214 | 9214 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9245,11 +9245,11 @@ discard block |
||
9245 | 9245 | } |
9246 | 9246 | |
9247 | 9247 | /** |
9248 | - * Gets all callsigns that have flown over |
|
9249 | - * |
|
9250 | - * @return Array the callsign list |
|
9251 | - * |
|
9252 | - */ |
|
9248 | + * Gets all callsigns that have flown over |
|
9249 | + * |
|
9250 | + * @return Array the callsign list |
|
9251 | + * |
|
9252 | + */ |
|
9253 | 9253 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
9254 | 9254 | { |
9255 | 9255 | global $globalDBdriver; |
@@ -9315,11 +9315,11 @@ discard block |
||
9315 | 9315 | } |
9316 | 9316 | |
9317 | 9317 | /** |
9318 | - * Gets all callsigns that have flown over |
|
9319 | - * |
|
9320 | - * @return Array the callsign list |
|
9321 | - * |
|
9322 | - */ |
|
9318 | + * Gets all callsigns that have flown over |
|
9319 | + * |
|
9320 | + * @return Array the callsign list |
|
9321 | + * |
|
9322 | + */ |
|
9323 | 9323 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
9324 | 9324 | { |
9325 | 9325 | global $globalDBdriver; |
@@ -9360,11 +9360,11 @@ discard block |
||
9360 | 9360 | |
9361 | 9361 | |
9362 | 9362 | /** |
9363 | - * Counts all dates |
|
9364 | - * |
|
9365 | - * @return Array the date list |
|
9366 | - * |
|
9367 | - */ |
|
9363 | + * Counts all dates |
|
9364 | + * |
|
9365 | + * @return Array the date list |
|
9366 | + * |
|
9367 | + */ |
|
9368 | 9368 | public function countAllDates($filters = array()) |
9369 | 9369 | { |
9370 | 9370 | global $globalTimezone, $globalDBdriver; |
@@ -9409,11 +9409,11 @@ discard block |
||
9409 | 9409 | } |
9410 | 9410 | |
9411 | 9411 | /** |
9412 | - * Counts all dates |
|
9413 | - * |
|
9414 | - * @return Array the date list |
|
9415 | - * |
|
9416 | - */ |
|
9412 | + * Counts all dates |
|
9413 | + * |
|
9414 | + * @return Array the date list |
|
9415 | + * |
|
9416 | + */ |
|
9417 | 9417 | public function countAllDatesByAirlines($filters = array()) |
9418 | 9418 | { |
9419 | 9419 | global $globalTimezone, $globalDBdriver; |
@@ -9458,11 +9458,11 @@ discard block |
||
9458 | 9458 | } |
9459 | 9459 | |
9460 | 9460 | /** |
9461 | - * Counts all dates during the last 7 days |
|
9462 | - * |
|
9463 | - * @return Array the date list |
|
9464 | - * |
|
9465 | - */ |
|
9461 | + * Counts all dates during the last 7 days |
|
9462 | + * |
|
9463 | + * @return Array the date list |
|
9464 | + * |
|
9465 | + */ |
|
9466 | 9466 | public function countAllDatesLast7Days($filters = array()) |
9467 | 9467 | { |
9468 | 9468 | global $globalTimezone, $globalDBdriver; |
@@ -9484,7 +9484,7 @@ discard block |
||
9484 | 9484 | $query .= " GROUP BY date_name |
9485 | 9485 | ORDER BY date_name ASC"; |
9486 | 9486 | $query_data = array(':offset' => $offset); |
9487 | - } |
|
9487 | + } |
|
9488 | 9488 | |
9489 | 9489 | $sth = $this->db->prepare($query); |
9490 | 9490 | $sth->execute($query_data); |
@@ -9504,11 +9504,11 @@ discard block |
||
9504 | 9504 | } |
9505 | 9505 | |
9506 | 9506 | /** |
9507 | - * Counts all dates during the last month |
|
9508 | - * |
|
9509 | - * @return Array the date list |
|
9510 | - * |
|
9511 | - */ |
|
9507 | + * Counts all dates during the last month |
|
9508 | + * |
|
9509 | + * @return Array the date list |
|
9510 | + * |
|
9511 | + */ |
|
9512 | 9512 | public function countAllDatesLastMonth($filters = array()) |
9513 | 9513 | { |
9514 | 9514 | global $globalTimezone, $globalDBdriver; |
@@ -9530,7 +9530,7 @@ discard block |
||
9530 | 9530 | $query .= " GROUP BY date_name |
9531 | 9531 | ORDER BY date_name ASC"; |
9532 | 9532 | $query_data = array(':offset' => $offset); |
9533 | - } |
|
9533 | + } |
|
9534 | 9534 | |
9535 | 9535 | $sth = $this->db->prepare($query); |
9536 | 9536 | $sth->execute($query_data); |
@@ -9551,11 +9551,11 @@ discard block |
||
9551 | 9551 | |
9552 | 9552 | |
9553 | 9553 | /** |
9554 | - * Counts all dates during the last month |
|
9555 | - * |
|
9556 | - * @return Array the date list |
|
9557 | - * |
|
9558 | - */ |
|
9554 | + * Counts all dates during the last month |
|
9555 | + * |
|
9556 | + * @return Array the date list |
|
9557 | + * |
|
9558 | + */ |
|
9559 | 9559 | public function countAllDatesLastMonthByAirlines($filters = array()) |
9560 | 9560 | { |
9561 | 9561 | global $globalTimezone, $globalDBdriver; |
@@ -9578,7 +9578,7 @@ discard block |
||
9578 | 9578 | GROUP BY spotter_output.airline_icao, date_name |
9579 | 9579 | ORDER BY date_name ASC"; |
9580 | 9580 | $query_data = array(':offset' => $offset); |
9581 | - } |
|
9581 | + } |
|
9582 | 9582 | |
9583 | 9583 | $sth = $this->db->prepare($query); |
9584 | 9584 | $sth->execute($query_data); |
@@ -9600,11 +9600,11 @@ discard block |
||
9600 | 9600 | |
9601 | 9601 | |
9602 | 9602 | /** |
9603 | - * Counts all month |
|
9604 | - * |
|
9605 | - * @return Array the month list |
|
9606 | - * |
|
9607 | - */ |
|
9603 | + * Counts all month |
|
9604 | + * |
|
9605 | + * @return Array the month list |
|
9606 | + * |
|
9607 | + */ |
|
9608 | 9608 | public function countAllMonths($filters = array()) |
9609 | 9609 | { |
9610 | 9610 | global $globalTimezone, $globalDBdriver; |
@@ -9646,11 +9646,11 @@ discard block |
||
9646 | 9646 | } |
9647 | 9647 | |
9648 | 9648 | /** |
9649 | - * Counts all month |
|
9650 | - * |
|
9651 | - * @return Array the month list |
|
9652 | - * |
|
9653 | - */ |
|
9649 | + * Counts all month |
|
9650 | + * |
|
9651 | + * @return Array the month list |
|
9652 | + * |
|
9653 | + */ |
|
9654 | 9654 | public function countAllMonthsByAirlines($filters = array()) |
9655 | 9655 | { |
9656 | 9656 | global $globalTimezone, $globalDBdriver; |
@@ -9695,11 +9695,11 @@ discard block |
||
9695 | 9695 | } |
9696 | 9696 | |
9697 | 9697 | /** |
9698 | - * Counts all military month |
|
9699 | - * |
|
9700 | - * @return Array the month list |
|
9701 | - * |
|
9702 | - */ |
|
9698 | + * Counts all military month |
|
9699 | + * |
|
9700 | + * @return Array the month list |
|
9701 | + * |
|
9702 | + */ |
|
9703 | 9703 | public function countAllMilitaryMonths($filters = array()) |
9704 | 9704 | { |
9705 | 9705 | global $globalTimezone, $globalDBdriver; |
@@ -9740,11 +9740,11 @@ discard block |
||
9740 | 9740 | } |
9741 | 9741 | |
9742 | 9742 | /** |
9743 | - * Counts all month owners |
|
9744 | - * |
|
9745 | - * @return Array the month list |
|
9746 | - * |
|
9747 | - */ |
|
9743 | + * Counts all month owners |
|
9744 | + * |
|
9745 | + * @return Array the month list |
|
9746 | + * |
|
9747 | + */ |
|
9748 | 9748 | public function countAllMonthsOwners($filters = array()) |
9749 | 9749 | { |
9750 | 9750 | global $globalTimezone, $globalDBdriver; |
@@ -9786,11 +9786,11 @@ discard block |
||
9786 | 9786 | } |
9787 | 9787 | |
9788 | 9788 | /** |
9789 | - * Counts all month owners |
|
9790 | - * |
|
9791 | - * @return Array the month list |
|
9792 | - * |
|
9793 | - */ |
|
9789 | + * Counts all month owners |
|
9790 | + * |
|
9791 | + * @return Array the month list |
|
9792 | + * |
|
9793 | + */ |
|
9794 | 9794 | public function countAllMonthsOwnersByAirlines($filters = array()) |
9795 | 9795 | { |
9796 | 9796 | global $globalTimezone, $globalDBdriver; |
@@ -9833,11 +9833,11 @@ discard block |
||
9833 | 9833 | } |
9834 | 9834 | |
9835 | 9835 | /** |
9836 | - * Counts all month pilot |
|
9837 | - * |
|
9838 | - * @return Array the month list |
|
9839 | - * |
|
9840 | - */ |
|
9836 | + * Counts all month pilot |
|
9837 | + * |
|
9838 | + * @return Array the month list |
|
9839 | + * |
|
9840 | + */ |
|
9841 | 9841 | public function countAllMonthsPilots($filters = array()) |
9842 | 9842 | { |
9843 | 9843 | global $globalTimezone, $globalDBdriver; |
@@ -9879,11 +9879,11 @@ discard block |
||
9879 | 9879 | } |
9880 | 9880 | |
9881 | 9881 | /** |
9882 | - * Counts all month pilot |
|
9883 | - * |
|
9884 | - * @return Array the month list |
|
9885 | - * |
|
9886 | - */ |
|
9882 | + * Counts all month pilot |
|
9883 | + * |
|
9884 | + * @return Array the month list |
|
9885 | + * |
|
9886 | + */ |
|
9887 | 9887 | public function countAllMonthsPilotsByAirlines($filters = array()) |
9888 | 9888 | { |
9889 | 9889 | global $globalTimezone, $globalDBdriver; |
@@ -9926,11 +9926,11 @@ discard block |
||
9926 | 9926 | } |
9927 | 9927 | |
9928 | 9928 | /** |
9929 | - * Counts all month airline |
|
9930 | - * |
|
9931 | - * @return Array the month list |
|
9932 | - * |
|
9933 | - */ |
|
9929 | + * Counts all month airline |
|
9930 | + * |
|
9931 | + * @return Array the month list |
|
9932 | + * |
|
9933 | + */ |
|
9934 | 9934 | public function countAllMonthsAirlines($filters = array()) |
9935 | 9935 | { |
9936 | 9936 | global $globalTimezone, $globalDBdriver; |
@@ -9972,11 +9972,11 @@ discard block |
||
9972 | 9972 | } |
9973 | 9973 | |
9974 | 9974 | /** |
9975 | - * Counts all month aircraft |
|
9976 | - * |
|
9977 | - * @return Array the month list |
|
9978 | - * |
|
9979 | - */ |
|
9975 | + * Counts all month aircraft |
|
9976 | + * |
|
9977 | + * @return Array the month list |
|
9978 | + * |
|
9979 | + */ |
|
9980 | 9980 | public function countAllMonthsAircrafts($filters = array()) |
9981 | 9981 | { |
9982 | 9982 | global $globalTimezone, $globalDBdriver; |
@@ -10019,11 +10019,11 @@ discard block |
||
10019 | 10019 | |
10020 | 10020 | |
10021 | 10021 | /** |
10022 | - * Counts all month aircraft |
|
10023 | - * |
|
10024 | - * @return Array the month list |
|
10025 | - * |
|
10026 | - */ |
|
10022 | + * Counts all month aircraft |
|
10023 | + * |
|
10024 | + * @return Array the month list |
|
10025 | + * |
|
10026 | + */ |
|
10027 | 10027 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
10028 | 10028 | { |
10029 | 10029 | global $globalTimezone, $globalDBdriver; |
@@ -10066,11 +10066,11 @@ discard block |
||
10066 | 10066 | } |
10067 | 10067 | |
10068 | 10068 | /** |
10069 | - * Counts all month real arrival |
|
10070 | - * |
|
10071 | - * @return Array the month list |
|
10072 | - * |
|
10073 | - */ |
|
10069 | + * Counts all month real arrival |
|
10070 | + * |
|
10071 | + * @return Array the month list |
|
10072 | + * |
|
10073 | + */ |
|
10074 | 10074 | public function countAllMonthsRealArrivals($filters = array()) |
10075 | 10075 | { |
10076 | 10076 | global $globalTimezone, $globalDBdriver; |
@@ -10113,11 +10113,11 @@ discard block |
||
10113 | 10113 | |
10114 | 10114 | |
10115 | 10115 | /** |
10116 | - * Counts all month real arrival |
|
10117 | - * |
|
10118 | - * @return Array the month list |
|
10119 | - * |
|
10120 | - */ |
|
10116 | + * Counts all month real arrival |
|
10117 | + * |
|
10118 | + * @return Array the month list |
|
10119 | + * |
|
10120 | + */ |
|
10121 | 10121 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
10122 | 10122 | { |
10123 | 10123 | global $globalTimezone, $globalDBdriver; |
@@ -10161,11 +10161,11 @@ discard block |
||
10161 | 10161 | |
10162 | 10162 | |
10163 | 10163 | /** |
10164 | - * Counts all dates during the last year |
|
10165 | - * |
|
10166 | - * @return Array the date list |
|
10167 | - * |
|
10168 | - */ |
|
10164 | + * Counts all dates during the last year |
|
10165 | + * |
|
10166 | + * @return Array the date list |
|
10167 | + * |
|
10168 | + */ |
|
10169 | 10169 | public function countAllMonthsLastYear($filters) |
10170 | 10170 | { |
10171 | 10171 | global $globalTimezone, $globalDBdriver; |
@@ -10187,7 +10187,7 @@ discard block |
||
10187 | 10187 | $query .= " GROUP BY year_name, month_name |
10188 | 10188 | ORDER BY year_name, month_name ASC"; |
10189 | 10189 | $query_data = array(':offset' => $offset); |
10190 | - } |
|
10190 | + } |
|
10191 | 10191 | |
10192 | 10192 | $sth = $this->db->prepare($query); |
10193 | 10193 | $sth->execute($query_data); |
@@ -10210,11 +10210,11 @@ discard block |
||
10210 | 10210 | |
10211 | 10211 | |
10212 | 10212 | /** |
10213 | - * Counts all hours |
|
10214 | - * |
|
10215 | - * @return Array the hour list |
|
10216 | - * |
|
10217 | - */ |
|
10213 | + * Counts all hours |
|
10214 | + * |
|
10215 | + * @return Array the hour list |
|
10216 | + * |
|
10217 | + */ |
|
10218 | 10218 | public function countAllHours($orderby,$filters = array()) |
10219 | 10219 | { |
10220 | 10220 | global $globalTimezone, $globalDBdriver; |
@@ -10275,11 +10275,11 @@ discard block |
||
10275 | 10275 | } |
10276 | 10276 | |
10277 | 10277 | /** |
10278 | - * Counts all hours |
|
10279 | - * |
|
10280 | - * @return Array the hour list |
|
10281 | - * |
|
10282 | - */ |
|
10278 | + * Counts all hours |
|
10279 | + * |
|
10280 | + * @return Array the hour list |
|
10281 | + * |
|
10282 | + */ |
|
10283 | 10283 | public function countAllHoursByAirlines($orderby, $filters = array()) |
10284 | 10284 | { |
10285 | 10285 | global $globalTimezone, $globalDBdriver; |
@@ -10342,11 +10342,11 @@ discard block |
||
10342 | 10342 | |
10343 | 10343 | |
10344 | 10344 | /** |
10345 | - * Counts all hours by airline |
|
10346 | - * |
|
10347 | - * @return Array the hour list |
|
10348 | - * |
|
10349 | - */ |
|
10345 | + * Counts all hours by airline |
|
10346 | + * |
|
10347 | + * @return Array the hour list |
|
10348 | + * |
|
10349 | + */ |
|
10350 | 10350 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
10351 | 10351 | { |
10352 | 10352 | global $globalTimezone, $globalDBdriver; |
@@ -10392,11 +10392,11 @@ discard block |
||
10392 | 10392 | |
10393 | 10393 | |
10394 | 10394 | /** |
10395 | - * Counts all hours by aircraft |
|
10396 | - * |
|
10397 | - * @return Array the hour list |
|
10398 | - * |
|
10399 | - */ |
|
10395 | + * Counts all hours by aircraft |
|
10396 | + * |
|
10397 | + * @return Array the hour list |
|
10398 | + * |
|
10399 | + */ |
|
10400 | 10400 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
10401 | 10401 | { |
10402 | 10402 | global $globalTimezone, $globalDBdriver; |
@@ -10439,11 +10439,11 @@ discard block |
||
10439 | 10439 | |
10440 | 10440 | |
10441 | 10441 | /** |
10442 | - * Counts all hours by aircraft registration |
|
10443 | - * |
|
10444 | - * @return Array the hour list |
|
10445 | - * |
|
10446 | - */ |
|
10442 | + * Counts all hours by aircraft registration |
|
10443 | + * |
|
10444 | + * @return Array the hour list |
|
10445 | + * |
|
10446 | + */ |
|
10447 | 10447 | public function countAllHoursByRegistration($registration, $filters = array()) |
10448 | 10448 | { |
10449 | 10449 | global $globalTimezone, $globalDBdriver; |
@@ -10486,11 +10486,11 @@ discard block |
||
10486 | 10486 | |
10487 | 10487 | |
10488 | 10488 | /** |
10489 | - * Counts all hours by airport |
|
10490 | - * |
|
10491 | - * @return Array the hour list |
|
10492 | - * |
|
10493 | - */ |
|
10489 | + * Counts all hours by airport |
|
10490 | + * |
|
10491 | + * @return Array the hour list |
|
10492 | + * |
|
10493 | + */ |
|
10494 | 10494 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
10495 | 10495 | { |
10496 | 10496 | global $globalTimezone, $globalDBdriver; |
@@ -10534,11 +10534,11 @@ discard block |
||
10534 | 10534 | |
10535 | 10535 | |
10536 | 10536 | /** |
10537 | - * Counts all hours by manufacturer |
|
10538 | - * |
|
10539 | - * @return Array the hour list |
|
10540 | - * |
|
10541 | - */ |
|
10537 | + * Counts all hours by manufacturer |
|
10538 | + * |
|
10539 | + * @return Array the hour list |
|
10540 | + * |
|
10541 | + */ |
|
10542 | 10542 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
10543 | 10543 | { |
10544 | 10544 | global $globalTimezone, $globalDBdriver; |
@@ -10582,11 +10582,11 @@ discard block |
||
10582 | 10582 | |
10583 | 10583 | |
10584 | 10584 | /** |
10585 | - * Counts all hours by date |
|
10586 | - * |
|
10587 | - * @return Array the hour list |
|
10588 | - * |
|
10589 | - */ |
|
10585 | + * Counts all hours by date |
|
10586 | + * |
|
10587 | + * @return Array the hour list |
|
10588 | + * |
|
10589 | + */ |
|
10590 | 10590 | public function countAllHoursByDate($date, $filters = array()) |
10591 | 10591 | { |
10592 | 10592 | global $globalTimezone, $globalDBdriver; |
@@ -10630,11 +10630,11 @@ discard block |
||
10630 | 10630 | |
10631 | 10631 | |
10632 | 10632 | /** |
10633 | - * Counts all hours by a ident/callsign |
|
10634 | - * |
|
10635 | - * @return Array the hour list |
|
10636 | - * |
|
10637 | - */ |
|
10633 | + * Counts all hours by a ident/callsign |
|
10634 | + * |
|
10635 | + * @return Array the hour list |
|
10636 | + * |
|
10637 | + */ |
|
10638 | 10638 | public function countAllHoursByIdent($ident, $filters = array()) |
10639 | 10639 | { |
10640 | 10640 | global $globalTimezone, $globalDBdriver; |
@@ -10677,11 +10677,11 @@ discard block |
||
10677 | 10677 | } |
10678 | 10678 | |
10679 | 10679 | /** |
10680 | - * Counts all hours by a owner |
|
10681 | - * |
|
10682 | - * @return Array the hour list |
|
10683 | - * |
|
10684 | - */ |
|
10680 | + * Counts all hours by a owner |
|
10681 | + * |
|
10682 | + * @return Array the hour list |
|
10683 | + * |
|
10684 | + */ |
|
10685 | 10685 | public function countAllHoursByOwner($owner, $filters = array()) |
10686 | 10686 | { |
10687 | 10687 | global $globalTimezone, $globalDBdriver; |
@@ -10724,11 +10724,11 @@ discard block |
||
10724 | 10724 | } |
10725 | 10725 | |
10726 | 10726 | /** |
10727 | - * Counts all hours by a pilot |
|
10728 | - * |
|
10729 | - * @return Array the hour list |
|
10730 | - * |
|
10731 | - */ |
|
10727 | + * Counts all hours by a pilot |
|
10728 | + * |
|
10729 | + * @return Array the hour list |
|
10730 | + * |
|
10731 | + */ |
|
10732 | 10732 | public function countAllHoursByPilot($pilot, $filters = array()) |
10733 | 10733 | { |
10734 | 10734 | global $globalTimezone, $globalDBdriver; |
@@ -10773,11 +10773,11 @@ discard block |
||
10773 | 10773 | |
10774 | 10774 | |
10775 | 10775 | /** |
10776 | - * Counts all hours by route |
|
10777 | - * |
|
10778 | - * @return Array the hour list |
|
10779 | - * |
|
10780 | - */ |
|
10776 | + * Counts all hours by route |
|
10777 | + * |
|
10778 | + * @return Array the hour list |
|
10779 | + * |
|
10780 | + */ |
|
10781 | 10781 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
10782 | 10782 | { |
10783 | 10783 | global $globalTimezone, $globalDBdriver; |
@@ -10821,11 +10821,11 @@ discard block |
||
10821 | 10821 | |
10822 | 10822 | |
10823 | 10823 | /** |
10824 | - * Counts all hours by country |
|
10825 | - * |
|
10826 | - * @return Array the hour list |
|
10827 | - * |
|
10828 | - */ |
|
10824 | + * Counts all hours by country |
|
10825 | + * |
|
10826 | + * @return Array the hour list |
|
10827 | + * |
|
10828 | + */ |
|
10829 | 10829 | public function countAllHoursByCountry($country, $filters = array()) |
10830 | 10830 | { |
10831 | 10831 | global $globalTimezone, $globalDBdriver; |
@@ -10870,11 +10870,11 @@ discard block |
||
10870 | 10870 | |
10871 | 10871 | |
10872 | 10872 | /** |
10873 | - * Counts all aircraft that have flown over |
|
10874 | - * |
|
10875 | - * @return Integer the number of aircrafts |
|
10876 | - * |
|
10877 | - */ |
|
10873 | + * Counts all aircraft that have flown over |
|
10874 | + * |
|
10875 | + * @return Integer the number of aircrafts |
|
10876 | + * |
|
10877 | + */ |
|
10878 | 10878 | public function countOverallAircrafts($filters = array(),$year = '',$month = '') |
10879 | 10879 | { |
10880 | 10880 | global $globalDBdriver; |
@@ -10907,11 +10907,11 @@ discard block |
||
10907 | 10907 | } |
10908 | 10908 | |
10909 | 10909 | /** |
10910 | - * Counts all flight that really arrival |
|
10911 | - * |
|
10912 | - * @return Integer the number of aircrafts |
|
10913 | - * |
|
10914 | - */ |
|
10910 | + * Counts all flight that really arrival |
|
10911 | + * |
|
10912 | + * @return Integer the number of aircrafts |
|
10913 | + * |
|
10914 | + */ |
|
10915 | 10915 | public function countOverallArrival($filters = array(),$year = '',$month = '') |
10916 | 10916 | { |
10917 | 10917 | global $globalDBdriver; |
@@ -10944,11 +10944,11 @@ discard block |
||
10944 | 10944 | } |
10945 | 10945 | |
10946 | 10946 | /** |
10947 | - * Counts all pilots that have flown over |
|
10948 | - * |
|
10949 | - * @return Integer the number of pilots |
|
10950 | - * |
|
10951 | - */ |
|
10947 | + * Counts all pilots that have flown over |
|
10948 | + * |
|
10949 | + * @return Integer the number of pilots |
|
10950 | + * |
|
10951 | + */ |
|
10952 | 10952 | public function countOverallPilots($filters = array(),$year = '',$month = '') |
10953 | 10953 | { |
10954 | 10954 | global $globalDBdriver; |
@@ -10980,11 +10980,11 @@ discard block |
||
10980 | 10980 | } |
10981 | 10981 | |
10982 | 10982 | /** |
10983 | - * Counts all owners that have flown over |
|
10984 | - * |
|
10985 | - * @return Integer the number of owners |
|
10986 | - * |
|
10987 | - */ |
|
10983 | + * Counts all owners that have flown over |
|
10984 | + * |
|
10985 | + * @return Integer the number of owners |
|
10986 | + * |
|
10987 | + */ |
|
10988 | 10988 | public function countOverallOwners($filters = array(),$year = '',$month = '') |
10989 | 10989 | { |
10990 | 10990 | global $globalDBdriver; |
@@ -11017,11 +11017,11 @@ discard block |
||
11017 | 11017 | |
11018 | 11018 | |
11019 | 11019 | /** |
11020 | - * Counts all flights that have flown over |
|
11021 | - * |
|
11022 | - * @return Integer the number of flights |
|
11023 | - * |
|
11024 | - */ |
|
11020 | + * Counts all flights that have flown over |
|
11021 | + * |
|
11022 | + * @return Integer the number of flights |
|
11023 | + * |
|
11024 | + */ |
|
11025 | 11025 | public function countOverallFlights($filters = array(),$year = '',$month = '') |
11026 | 11026 | { |
11027 | 11027 | global $globalDBdriver; |
@@ -11055,11 +11055,11 @@ discard block |
||
11055 | 11055 | } |
11056 | 11056 | |
11057 | 11057 | /** |
11058 | - * Counts all military flights that have flown over |
|
11059 | - * |
|
11060 | - * @return Integer the number of flights |
|
11061 | - * |
|
11062 | - */ |
|
11058 | + * Counts all military flights that have flown over |
|
11059 | + * |
|
11060 | + * @return Integer the number of flights |
|
11061 | + * |
|
11062 | + */ |
|
11063 | 11063 | public function countOverallMilitaryFlights($filters = array(),$year = '',$month = '') |
11064 | 11064 | { |
11065 | 11065 | global $globalDBdriver; |
@@ -11094,11 +11094,11 @@ discard block |
||
11094 | 11094 | |
11095 | 11095 | |
11096 | 11096 | /** |
11097 | - * Counts all airlines that have flown over |
|
11098 | - * |
|
11099 | - * @return Integer the number of airlines |
|
11100 | - * |
|
11101 | - */ |
|
11097 | + * Counts all airlines that have flown over |
|
11098 | + * |
|
11099 | + * @return Integer the number of airlines |
|
11100 | + * |
|
11101 | + */ |
|
11102 | 11102 | public function countOverallAirlines($filters = array(),$year = '',$month = '') |
11103 | 11103 | { |
11104 | 11104 | global $globalDBdriver; |
@@ -11125,8 +11125,8 @@ discard block |
||
11125 | 11125 | $query_values = array_merge($query_values,array(':month' => $month)); |
11126 | 11126 | } |
11127 | 11127 | } |
11128 | - if ($query == '') $queryi .= $this->getFilter($filters); |
|
11129 | - else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
11128 | + if ($query == '') $queryi .= $this->getFilter($filters); |
|
11129 | + else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
11130 | 11130 | |
11131 | 11131 | |
11132 | 11132 | $sth = $this->db->prepare($queryi); |
@@ -11136,11 +11136,11 @@ discard block |
||
11136 | 11136 | |
11137 | 11137 | |
11138 | 11138 | /** |
11139 | - * Counts all hours of today |
|
11140 | - * |
|
11141 | - * @return Array the hour list |
|
11142 | - * |
|
11143 | - */ |
|
11139 | + * Counts all hours of today |
|
11140 | + * |
|
11141 | + * @return Array the hour list |
|
11142 | + * |
|
11143 | + */ |
|
11144 | 11144 | public function countAllHoursFromToday($filters = array()) |
11145 | 11145 | { |
11146 | 11146 | global $globalTimezone, $globalDBdriver; |
@@ -11180,11 +11180,11 @@ discard block |
||
11180 | 11180 | } |
11181 | 11181 | |
11182 | 11182 | /** |
11183 | - * Gets all the spotter information based on calculated upcoming flights |
|
11184 | - * |
|
11185 | - * @return Array the spotter information |
|
11186 | - * |
|
11187 | - */ |
|
11183 | + * Gets all the spotter information based on calculated upcoming flights |
|
11184 | + * |
|
11185 | + * @return Array the spotter information |
|
11186 | + * |
|
11187 | + */ |
|
11188 | 11188 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
11189 | 11189 | { |
11190 | 11190 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -11259,12 +11259,12 @@ discard block |
||
11259 | 11259 | } |
11260 | 11260 | |
11261 | 11261 | |
11262 | - /** |
|
11263 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
11264 | - * |
|
11265 | - * @return Integer the Barrie Spotter ID |
|
11262 | + /** |
|
11263 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
11264 | + * |
|
11265 | + * @return Integer the Barrie Spotter ID |
|
11266 | 11266 | q * |
11267 | - */ |
|
11267 | + */ |
|
11268 | 11268 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
11269 | 11269 | { |
11270 | 11270 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -11285,13 +11285,13 @@ discard block |
||
11285 | 11285 | |
11286 | 11286 | |
11287 | 11287 | /** |
11288 | - * Parses a date string |
|
11289 | - * |
|
11290 | - * @param String $dateString the date string |
|
11291 | - * @param String $timezone the timezone of a user |
|
11292 | - * @return Array the time information |
|
11293 | - * |
|
11294 | - */ |
|
11288 | + * Parses a date string |
|
11289 | + * |
|
11290 | + * @param String $dateString the date string |
|
11291 | + * @param String $timezone the timezone of a user |
|
11292 | + * @return Array the time information |
|
11293 | + * |
|
11294 | + */ |
|
11295 | 11295 | public function parseDateString($dateString, $timezone = '') |
11296 | 11296 | { |
11297 | 11297 | $time_array = array(); |
@@ -11327,12 +11327,12 @@ discard block |
||
11327 | 11327 | |
11328 | 11328 | |
11329 | 11329 | /** |
11330 | - * Parses the direction degrees to working |
|
11331 | - * |
|
11332 | - * @param Float $direction the direction in degrees |
|
11333 | - * @return Array the direction information |
|
11334 | - * |
|
11335 | - */ |
|
11330 | + * Parses the direction degrees to working |
|
11331 | + * |
|
11332 | + * @param Float $direction the direction in degrees |
|
11333 | + * @return Array the direction information |
|
11334 | + * |
|
11335 | + */ |
|
11336 | 11336 | public function parseDirection($direction = 0) |
11337 | 11337 | { |
11338 | 11338 | if ($direction == '') $direction = 0; |
@@ -11411,12 +11411,12 @@ discard block |
||
11411 | 11411 | |
11412 | 11412 | |
11413 | 11413 | /** |
11414 | - * Gets the aircraft registration |
|
11415 | - * |
|
11416 | - * @param String $flightaware_id the flight aware id |
|
11417 | - * @return String the aircraft registration |
|
11418 | - * |
|
11419 | - */ |
|
11414 | + * Gets the aircraft registration |
|
11415 | + * |
|
11416 | + * @param String $flightaware_id the flight aware id |
|
11417 | + * @return String the aircraft registration |
|
11418 | + * |
|
11419 | + */ |
|
11420 | 11420 | |
11421 | 11421 | public function getAircraftRegistration($flightaware_id) |
11422 | 11422 | { |
@@ -11445,12 +11445,12 @@ discard block |
||
11445 | 11445 | |
11446 | 11446 | |
11447 | 11447 | /** |
11448 | - * Gets the aircraft registration from ModeS |
|
11449 | - * |
|
11450 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11451 | - * @return String the aircraft registration |
|
11452 | - * |
|
11453 | - */ |
|
11448 | + * Gets the aircraft registration from ModeS |
|
11449 | + * |
|
11450 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11451 | + * @return String the aircraft registration |
|
11452 | + * |
|
11453 | + */ |
|
11454 | 11454 | public function getAircraftRegistrationBymodeS($aircraft_modes, $source_type = '') |
11455 | 11455 | { |
11456 | 11456 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11466,8 +11466,8 @@ discard block |
||
11466 | 11466 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
11467 | 11467 | $sth->closeCursor(); |
11468 | 11468 | if (count($row) > 0) { |
11469 | - //return $row['Registration']; |
|
11470 | - return $row['registration']; |
|
11469 | + //return $row['Registration']; |
|
11470 | + return $row['registration']; |
|
11471 | 11471 | } elseif ($source_type == 'flarm') { |
11472 | 11472 | return $this->getAircraftRegistrationBymodeS($aircraft_modes); |
11473 | 11473 | } else return ''; |
@@ -11475,12 +11475,12 @@ discard block |
||
11475 | 11475 | } |
11476 | 11476 | |
11477 | 11477 | /** |
11478 | - * Gets the aircraft type from ModeS |
|
11479 | - * |
|
11480 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11481 | - * @return String the aircraft type |
|
11482 | - * |
|
11483 | - */ |
|
11478 | + * Gets the aircraft type from ModeS |
|
11479 | + * |
|
11480 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11481 | + * @return String the aircraft type |
|
11482 | + * |
|
11483 | + */ |
|
11484 | 11484 | public function getAircraftTypeBymodeS($aircraft_modes,$source_type = '') |
11485 | 11485 | { |
11486 | 11486 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11506,12 +11506,12 @@ discard block |
||
11506 | 11506 | } |
11507 | 11507 | |
11508 | 11508 | /** |
11509 | - * Gets Country from latitude/longitude |
|
11510 | - * |
|
11511 | - * @param Float $latitude latitute of the flight |
|
11512 | - * @param Float $longitude longitute of the flight |
|
11513 | - * @return String the countrie |
|
11514 | - */ |
|
11509 | + * Gets Country from latitude/longitude |
|
11510 | + * |
|
11511 | + * @param Float $latitude latitute of the flight |
|
11512 | + * @param Float $longitude longitute of the flight |
|
11513 | + * @return String the countrie |
|
11514 | + */ |
|
11515 | 11515 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
11516 | 11516 | { |
11517 | 11517 | global $globalDBdriver, $globalDebug; |
@@ -11548,11 +11548,11 @@ discard block |
||
11548 | 11548 | } |
11549 | 11549 | |
11550 | 11550 | /** |
11551 | - * Gets Country from iso2 |
|
11552 | - * |
|
11553 | - * @param String $iso2 ISO2 country code |
|
11554 | - * @return String the countrie |
|
11555 | - */ |
|
11551 | + * Gets Country from iso2 |
|
11552 | + * |
|
11553 | + * @param String $iso2 ISO2 country code |
|
11554 | + * @return String the countrie |
|
11555 | + */ |
|
11556 | 11556 | public function getCountryFromISO2($iso2) |
11557 | 11557 | { |
11558 | 11558 | global $globalDBdriver, $globalDebug; |
@@ -11580,12 +11580,12 @@ discard block |
||
11580 | 11580 | } |
11581 | 11581 | |
11582 | 11582 | /** |
11583 | - * converts the registration code using the country prefix |
|
11584 | - * |
|
11585 | - * @param String $registration the aircraft registration |
|
11586 | - * @return String the aircraft registration |
|
11587 | - * |
|
11588 | - */ |
|
11583 | + * converts the registration code using the country prefix |
|
11584 | + * |
|
11585 | + * @param String $registration the aircraft registration |
|
11586 | + * @return String the aircraft registration |
|
11587 | + * |
|
11588 | + */ |
|
11589 | 11589 | public function convertAircraftRegistration($registration) |
11590 | 11590 | { |
11591 | 11591 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11637,12 +11637,12 @@ discard block |
||
11637 | 11637 | } |
11638 | 11638 | |
11639 | 11639 | /** |
11640 | - * Country from the registration code |
|
11641 | - * |
|
11642 | - * @param String $registration the aircraft registration |
|
11643 | - * @return String the country |
|
11644 | - * |
|
11645 | - */ |
|
11640 | + * Country from the registration code |
|
11641 | + * |
|
11642 | + * @param String $registration the aircraft registration |
|
11643 | + * @return String the country |
|
11644 | + * |
|
11645 | + */ |
|
11646 | 11646 | public function countryFromAircraftRegistration($registration) |
11647 | 11647 | { |
11648 | 11648 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11661,8 +11661,8 @@ discard block |
||
11661 | 11661 | $country = $row['country']; |
11662 | 11662 | } |
11663 | 11663 | } else { |
11664 | - $registration_1 = substr($registration, 0, 1); |
|
11665 | - $registration_2 = substr($registration, 0, 2); |
|
11664 | + $registration_1 = substr($registration, 0, 1); |
|
11665 | + $registration_2 = substr($registration, 0, 2); |
|
11666 | 11666 | |
11667 | 11667 | $country = ''; |
11668 | 11668 | //first get the prefix based on two characters |
@@ -11698,12 +11698,12 @@ discard block |
||
11698 | 11698 | } |
11699 | 11699 | |
11700 | 11700 | /** |
11701 | - * Registration prefix from the registration code |
|
11702 | - * |
|
11703 | - * @param String $registration the aircraft registration |
|
11704 | - * @return String the registration prefix |
|
11705 | - * |
|
11706 | - */ |
|
11701 | + * Registration prefix from the registration code |
|
11702 | + * |
|
11703 | + * @param String $registration the aircraft registration |
|
11704 | + * @return String the registration prefix |
|
11705 | + * |
|
11706 | + */ |
|
11707 | 11707 | public function registrationPrefixFromAircraftRegistration($registration) |
11708 | 11708 | { |
11709 | 11709 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11722,8 +11722,8 @@ discard block |
||
11722 | 11722 | //$country = $row['country']; |
11723 | 11723 | } |
11724 | 11724 | } else { |
11725 | - $registration_1 = substr($registration, 0, 1); |
|
11726 | - $registration_2 = substr($registration, 0, 2); |
|
11725 | + $registration_1 = substr($registration, 0, 1); |
|
11726 | + $registration_2 = substr($registration, 0, 2); |
|
11727 | 11727 | |
11728 | 11728 | //first get the prefix based on two characters |
11729 | 11729 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -11759,12 +11759,12 @@ discard block |
||
11759 | 11759 | |
11760 | 11760 | |
11761 | 11761 | /** |
11762 | - * Country from the registration code |
|
11763 | - * |
|
11764 | - * @param String $registration the aircraft registration |
|
11765 | - * @return String the country |
|
11766 | - * |
|
11767 | - */ |
|
11762 | + * Country from the registration code |
|
11763 | + * |
|
11764 | + * @param String $registration the aircraft registration |
|
11765 | + * @return String the country |
|
11766 | + * |
|
11767 | + */ |
|
11768 | 11768 | public function countryFromAircraftRegistrationCode($registration) |
11769 | 11769 | { |
11770 | 11770 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11781,11 +11781,11 @@ discard block |
||
11781 | 11781 | } |
11782 | 11782 | |
11783 | 11783 | /** |
11784 | - * Set a new highlight value for a flight |
|
11785 | - * |
|
11786 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
11787 | - * @param String $highlight New highlight value |
|
11788 | - */ |
|
11784 | + * Set a new highlight value for a flight |
|
11785 | + * |
|
11786 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
11787 | + * @param String $highlight New highlight value |
|
11788 | + */ |
|
11789 | 11789 | public function setHighlightFlight($flightaware_id,$highlight) { |
11790 | 11790 | |
11791 | 11791 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -11794,12 +11794,12 @@ discard block |
||
11794 | 11794 | } |
11795 | 11795 | |
11796 | 11796 | /** |
11797 | - * Set a new highlight value for a flight by Registration |
|
11798 | - * |
|
11799 | - * @param String $registration Registration of the aircraft |
|
11800 | - * @param String $date Date of spotted aircraft |
|
11801 | - * @param String $highlight New highlight value |
|
11802 | - */ |
|
11797 | + * Set a new highlight value for a flight by Registration |
|
11798 | + * |
|
11799 | + * @param String $registration Registration of the aircraft |
|
11800 | + * @param String $date Date of spotted aircraft |
|
11801 | + * @param String $highlight New highlight value |
|
11802 | + */ |
|
11803 | 11803 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
11804 | 11804 | if ($date == '') { |
11805 | 11805 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -11813,12 +11813,12 @@ discard block |
||
11813 | 11813 | } |
11814 | 11814 | |
11815 | 11815 | /** |
11816 | - * Gets the short url from bit.ly |
|
11817 | - * |
|
11818 | - * @param String $url the full url |
|
11819 | - * @return String the bit.ly url |
|
11820 | - * |
|
11821 | - */ |
|
11816 | + * Gets the short url from bit.ly |
|
11817 | + * |
|
11818 | + * @param String $url the full url |
|
11819 | + * @return String the bit.ly url |
|
11820 | + * |
|
11821 | + */ |
|
11822 | 11822 | public function getBitlyURL($url) |
11823 | 11823 | { |
11824 | 11824 | global $globalBitlyAccessToken; |
@@ -12107,11 +12107,11 @@ discard block |
||
12107 | 12107 | $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 |
12108 | 12108 | 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)) |
12109 | 12109 | 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;"; |
12110 | - } else { |
|
12110 | + } else { |
|
12111 | 12111 | $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 |
12112 | 12112 | 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)) |
12113 | 12113 | 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;"; |
12114 | - } |
|
12114 | + } |
|
12115 | 12115 | $sth = $this->db->prepare($query); |
12116 | 12116 | $sth->execute(); |
12117 | 12117 | return $sth->fetchAll(PDO::FETCH_ASSOC); |