@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
| 58 | - * Get SQL query part for filter used |
|
| 59 | - * @param Array $filter the filter |
|
| 60 | - * @return Array the SQL part |
|
| 61 | - */ |
|
| 58 | + * Get SQL query part for filter used |
|
| 59 | + * @param Array $filter the filter |
|
| 60 | + * @return Array the SQL part |
|
| 61 | + */ |
|
| 62 | 62 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 63 | 63 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
| 64 | 64 | $filters = array(); |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * Executes the SQL statements to get the spotter information |
|
| 133 | - * |
|
| 134 | - * @param String $query the SQL query |
|
| 135 | - * @param Array $params parameter of the query |
|
| 136 | - * @param String $limitQuery the limit query |
|
| 137 | - * @return Array the spotter information |
|
| 138 | - * |
|
| 139 | - */ |
|
| 132 | + * Executes the SQL statements to get the spotter information |
|
| 133 | + * |
|
| 134 | + * @param String $query the SQL query |
|
| 135 | + * @param Array $params parameter of the query |
|
| 136 | + * @param String $limitQuery the limit query |
|
| 137 | + * @return Array the spotter information |
|
| 138 | + * |
|
| 139 | + */ |
|
| 140 | 140 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
| 141 | 141 | { |
| 142 | 142 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -300,11 +300,11 @@ discard block |
||
| 300 | 300 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
| 301 | 301 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
| 302 | 302 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
| 303 | - } else { |
|
| 304 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 303 | + } else { |
|
| 304 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
| 305 | 305 | $temp_array['aircraft_name'] = 'N/A'; |
| 306 | 306 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
| 307 | - } |
|
| 307 | + } |
|
| 308 | 308 | } |
| 309 | 309 | $fromsource = NULL; |
| 310 | 310 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -500,11 +500,11 @@ discard block |
||
| 500 | 500 | |
| 501 | 501 | |
| 502 | 502 | /** |
| 503 | - * Gets all the spotter information |
|
| 504 | - * |
|
| 505 | - * @return Array the spotter information |
|
| 506 | - * |
|
| 507 | - */ |
|
| 503 | + * Gets all the spotter information |
|
| 504 | + * |
|
| 505 | + * @return Array the spotter information |
|
| 506 | + * |
|
| 507 | + */ |
|
| 508 | 508 | public function searchSpotterData($q = '', $registration = '', $aircraft_icao = '', $aircraft_manufacturer = '', $highlights = '', $airline_icao = '', $airline_country = '', $airline_type = '', $airport = '', $airport_country = '', $callsign = '', $departure_airport_route = '', $arrival_airport_route = '', $owner = '',$pilot_id = '',$pilot_name = '',$altitude = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '',$filters = array()) |
| 509 | 509 | { |
| 510 | 510 | global $globalTimezone, $globalDBdriver; |
@@ -851,11 +851,11 @@ discard block |
||
| 851 | 851 | |
| 852 | 852 | |
| 853 | 853 | /** |
| 854 | - * Gets all the spotter information based on the latest data entry |
|
| 855 | - * |
|
| 856 | - * @return Array the spotter information |
|
| 857 | - * |
|
| 858 | - */ |
|
| 854 | + * Gets all the spotter information based on the latest data entry |
|
| 855 | + * |
|
| 856 | + * @return Array the spotter information |
|
| 857 | + * |
|
| 858 | + */ |
|
| 859 | 859 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
| 860 | 860 | { |
| 861 | 861 | global $global_query; |
@@ -894,12 +894,12 @@ discard block |
||
| 894 | 894 | } |
| 895 | 895 | |
| 896 | 896 | |
| 897 | - /** |
|
| 898 | - * Gets all the spotter information based on a user's latitude and longitude |
|
| 899 | - * |
|
| 900 | - * @return Array the spotter information |
|
| 901 | - * |
|
| 902 | - */ |
|
| 897 | + /** |
|
| 898 | + * Gets all the spotter information based on a user's latitude and longitude |
|
| 899 | + * |
|
| 900 | + * @return Array the spotter information |
|
| 901 | + * |
|
| 902 | + */ |
|
| 903 | 903 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
| 904 | 904 | { |
| 905 | 905 | date_default_timezone_set('UTC'); |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | return false; |
| 928 | 928 | } |
| 929 | 929 | } |
| 930 | - $additional_query = ''; |
|
| 930 | + $additional_query = ''; |
|
| 931 | 931 | if ($interval != "") |
| 932 | 932 | { |
| 933 | 933 | if (!is_string($interval)) |
@@ -967,12 +967,12 @@ discard block |
||
| 967 | 967 | } |
| 968 | 968 | |
| 969 | 969 | |
| 970 | - /** |
|
| 971 | - * Gets all the spotter information sorted by the newest aircraft type |
|
| 972 | - * |
|
| 973 | - * @return Array the spotter information |
|
| 974 | - * |
|
| 975 | - */ |
|
| 970 | + /** |
|
| 971 | + * Gets all the spotter information sorted by the newest aircraft type |
|
| 972 | + * |
|
| 973 | + * @return Array the spotter information |
|
| 974 | + * |
|
| 975 | + */ |
|
| 976 | 976 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
| 977 | 977 | { |
| 978 | 978 | global $global_query; |
@@ -1013,11 +1013,11 @@ discard block |
||
| 1013 | 1013 | |
| 1014 | 1014 | |
| 1015 | 1015 | /** |
| 1016 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
| 1017 | - * |
|
| 1018 | - * @return Array the spotter information |
|
| 1019 | - * |
|
| 1020 | - */ |
|
| 1016 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
| 1017 | + * |
|
| 1018 | + * @return Array the spotter information |
|
| 1019 | + * |
|
| 1020 | + */ |
|
| 1021 | 1021 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
| 1022 | 1022 | { |
| 1023 | 1023 | global $global_query; |
@@ -1057,11 +1057,11 @@ discard block |
||
| 1057 | 1057 | |
| 1058 | 1058 | |
| 1059 | 1059 | /** |
| 1060 | - * Gets all the spotter information sorted by the newest airline |
|
| 1061 | - * |
|
| 1062 | - * @return Array the spotter information |
|
| 1063 | - * |
|
| 1064 | - */ |
|
| 1060 | + * Gets all the spotter information sorted by the newest airline |
|
| 1061 | + * |
|
| 1062 | + * @return Array the spotter information |
|
| 1063 | + * |
|
| 1064 | + */ |
|
| 1065 | 1065 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
| 1066 | 1066 | { |
| 1067 | 1067 | global $global_query; |
@@ -1100,12 +1100,12 @@ discard block |
||
| 1100 | 1100 | } |
| 1101 | 1101 | |
| 1102 | 1102 | |
| 1103 | - /** |
|
| 1104 | - * Gets all the spotter information sorted by the newest departure airport |
|
| 1105 | - * |
|
| 1106 | - * @return Array the spotter information |
|
| 1107 | - * |
|
| 1108 | - */ |
|
| 1103 | + /** |
|
| 1104 | + * Gets all the spotter information sorted by the newest departure airport |
|
| 1105 | + * |
|
| 1106 | + * @return Array the spotter information |
|
| 1107 | + * |
|
| 1108 | + */ |
|
| 1109 | 1109 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
| 1110 | 1110 | { |
| 1111 | 1111 | global $global_query; |
@@ -1147,11 +1147,11 @@ discard block |
||
| 1147 | 1147 | |
| 1148 | 1148 | |
| 1149 | 1149 | /** |
| 1150 | - * Gets all the spotter information sorted by the newest arrival airport |
|
| 1151 | - * |
|
| 1152 | - * @return Array the spotter information |
|
| 1153 | - * |
|
| 1154 | - */ |
|
| 1150 | + * Gets all the spotter information sorted by the newest arrival airport |
|
| 1151 | + * |
|
| 1152 | + * @return Array the spotter information |
|
| 1153 | + * |
|
| 1154 | + */ |
|
| 1155 | 1155 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
| 1156 | 1156 | { |
| 1157 | 1157 | global $global_query; |
@@ -1190,11 +1190,11 @@ discard block |
||
| 1190 | 1190 | |
| 1191 | 1191 | |
| 1192 | 1192 | /** |
| 1193 | - * Gets all the spotter information based on the spotter id |
|
| 1194 | - * |
|
| 1195 | - * @return Array the spotter information |
|
| 1196 | - * |
|
| 1197 | - */ |
|
| 1193 | + * Gets all the spotter information based on the spotter id |
|
| 1194 | + * |
|
| 1195 | + * @return Array the spotter information |
|
| 1196 | + * |
|
| 1197 | + */ |
|
| 1198 | 1198 | public function getSpotterDataByID($id = '') |
| 1199 | 1199 | { |
| 1200 | 1200 | global $global_query; |
@@ -1216,11 +1216,11 @@ discard block |
||
| 1216 | 1216 | |
| 1217 | 1217 | |
| 1218 | 1218 | /** |
| 1219 | - * Gets all the spotter information based on the callsign |
|
| 1220 | - * |
|
| 1221 | - * @return Array the spotter information |
|
| 1222 | - * |
|
| 1223 | - */ |
|
| 1219 | + * Gets all the spotter information based on the callsign |
|
| 1220 | + * |
|
| 1221 | + * @return Array the spotter information |
|
| 1222 | + * |
|
| 1223 | + */ |
|
| 1224 | 1224 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '') |
| 1225 | 1225 | { |
| 1226 | 1226 | global $global_query; |
@@ -1273,11 +1273,11 @@ discard block |
||
| 1273 | 1273 | |
| 1274 | 1274 | |
| 1275 | 1275 | /** |
| 1276 | - * Gets all the spotter information based on the aircraft type |
|
| 1277 | - * |
|
| 1278 | - * @return Array the spotter information |
|
| 1279 | - * |
|
| 1280 | - */ |
|
| 1276 | + * Gets all the spotter information based on the aircraft type |
|
| 1277 | + * |
|
| 1278 | + * @return Array the spotter information |
|
| 1279 | + * |
|
| 1280 | + */ |
|
| 1281 | 1281 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
| 1282 | 1282 | { |
| 1283 | 1283 | global $global_query; |
@@ -1331,11 +1331,11 @@ discard block |
||
| 1331 | 1331 | |
| 1332 | 1332 | |
| 1333 | 1333 | /** |
| 1334 | - * Gets all the spotter information based on the aircraft registration |
|
| 1335 | - * |
|
| 1336 | - * @return Array the spotter information |
|
| 1337 | - * |
|
| 1338 | - */ |
|
| 1334 | + * Gets all the spotter information based on the aircraft registration |
|
| 1335 | + * |
|
| 1336 | + * @return Array the spotter information |
|
| 1337 | + * |
|
| 1338 | + */ |
|
| 1339 | 1339 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
| 1340 | 1340 | { |
| 1341 | 1341 | global $global_query; |
@@ -1392,11 +1392,11 @@ discard block |
||
| 1392 | 1392 | |
| 1393 | 1393 | |
| 1394 | 1394 | /** |
| 1395 | - * Gets all the spotter information based on the airline |
|
| 1396 | - * |
|
| 1397 | - * @return Array the spotter information |
|
| 1398 | - * |
|
| 1399 | - */ |
|
| 1395 | + * Gets all the spotter information based on the airline |
|
| 1396 | + * |
|
| 1397 | + * @return Array the spotter information |
|
| 1398 | + * |
|
| 1399 | + */ |
|
| 1400 | 1400 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
| 1401 | 1401 | { |
| 1402 | 1402 | global $global_query; |
@@ -1449,11 +1449,11 @@ discard block |
||
| 1449 | 1449 | |
| 1450 | 1450 | |
| 1451 | 1451 | /** |
| 1452 | - * Gets all the spotter information based on the airport |
|
| 1453 | - * |
|
| 1454 | - * @return Array the spotter information |
|
| 1455 | - * |
|
| 1456 | - */ |
|
| 1452 | + * Gets all the spotter information based on the airport |
|
| 1453 | + * |
|
| 1454 | + * @return Array the spotter information |
|
| 1455 | + * |
|
| 1456 | + */ |
|
| 1457 | 1457 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
| 1458 | 1458 | { |
| 1459 | 1459 | global $global_query; |
@@ -1507,11 +1507,11 @@ discard block |
||
| 1507 | 1507 | |
| 1508 | 1508 | |
| 1509 | 1509 | /** |
| 1510 | - * Gets all the spotter information based on the date |
|
| 1511 | - * |
|
| 1512 | - * @return Array the spotter information |
|
| 1513 | - * |
|
| 1514 | - */ |
|
| 1510 | + * Gets all the spotter information based on the date |
|
| 1511 | + * |
|
| 1512 | + * @return Array the spotter information |
|
| 1513 | + * |
|
| 1514 | + */ |
|
| 1515 | 1515 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
| 1516 | 1516 | { |
| 1517 | 1517 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1575,11 +1575,11 @@ discard block |
||
| 1575 | 1575 | |
| 1576 | 1576 | |
| 1577 | 1577 | /** |
| 1578 | - * Gets all the spotter information based on the country name |
|
| 1579 | - * |
|
| 1580 | - * @return Array the spotter information |
|
| 1581 | - * |
|
| 1582 | - */ |
|
| 1578 | + * Gets all the spotter information based on the country name |
|
| 1579 | + * |
|
| 1580 | + * @return Array the spotter information |
|
| 1581 | + * |
|
| 1582 | + */ |
|
| 1583 | 1583 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
| 1584 | 1584 | { |
| 1585 | 1585 | global $global_query; |
@@ -1633,11 +1633,11 @@ discard block |
||
| 1633 | 1633 | |
| 1634 | 1634 | |
| 1635 | 1635 | /** |
| 1636 | - * Gets all the spotter information based on the manufacturer name |
|
| 1637 | - * |
|
| 1638 | - * @return Array the spotter information |
|
| 1639 | - * |
|
| 1640 | - */ |
|
| 1636 | + * Gets all the spotter information based on the manufacturer name |
|
| 1637 | + * |
|
| 1638 | + * @return Array the spotter information |
|
| 1639 | + * |
|
| 1640 | + */ |
|
| 1641 | 1641 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
| 1642 | 1642 | { |
| 1643 | 1643 | global $global_query; |
@@ -1693,13 +1693,13 @@ discard block |
||
| 1693 | 1693 | |
| 1694 | 1694 | |
| 1695 | 1695 | /** |
| 1696 | - * Gets a list of all aircraft that take a route |
|
| 1697 | - * |
|
| 1698 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1699 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1700 | - * @return Array the spotter information |
|
| 1701 | - * |
|
| 1702 | - */ |
|
| 1696 | + * Gets a list of all aircraft that take a route |
|
| 1697 | + * |
|
| 1698 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
| 1699 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
| 1700 | + * @return Array the spotter information |
|
| 1701 | + * |
|
| 1702 | + */ |
|
| 1703 | 1703 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
| 1704 | 1704 | { |
| 1705 | 1705 | global $global_query; |
@@ -1768,11 +1768,11 @@ discard block |
||
| 1768 | 1768 | |
| 1769 | 1769 | |
| 1770 | 1770 | /** |
| 1771 | - * Gets all the spotter information based on the special column in the table |
|
| 1772 | - * |
|
| 1773 | - * @return Array the spotter information |
|
| 1774 | - * |
|
| 1775 | - */ |
|
| 1771 | + * Gets all the spotter information based on the special column in the table |
|
| 1772 | + * |
|
| 1773 | + * @return Array the spotter information |
|
| 1774 | + * |
|
| 1775 | + */ |
|
| 1776 | 1776 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
| 1777 | 1777 | { |
| 1778 | 1778 | global $global_query; |
@@ -1811,11 +1811,11 @@ discard block |
||
| 1811 | 1811 | } |
| 1812 | 1812 | |
| 1813 | 1813 | /** |
| 1814 | - * Gets all the highlight based on a aircraft registration |
|
| 1815 | - * |
|
| 1816 | - * @return String the highlight text |
|
| 1817 | - * |
|
| 1818 | - */ |
|
| 1814 | + * Gets all the highlight based on a aircraft registration |
|
| 1815 | + * |
|
| 1816 | + * @return String the highlight text |
|
| 1817 | + * |
|
| 1818 | + */ |
|
| 1819 | 1819 | public function getHighlightByRegistration($registration,$filter = array()) |
| 1820 | 1820 | { |
| 1821 | 1821 | global $global_query; |
@@ -1837,13 +1837,13 @@ discard block |
||
| 1837 | 1837 | |
| 1838 | 1838 | |
| 1839 | 1839 | /** |
| 1840 | - * Gets the squawk usage from squawk code |
|
| 1841 | - * |
|
| 1842 | - * @param String $squawk squawk code |
|
| 1843 | - * @param String $country country |
|
| 1844 | - * @return String usage |
|
| 1845 | - * |
|
| 1846 | - */ |
|
| 1840 | + * Gets the squawk usage from squawk code |
|
| 1841 | + * |
|
| 1842 | + * @param String $squawk squawk code |
|
| 1843 | + * @param String $country country |
|
| 1844 | + * @return String usage |
|
| 1845 | + * |
|
| 1846 | + */ |
|
| 1847 | 1847 | public function getSquawkUsage($squawk = '',$country = 'FR') |
| 1848 | 1848 | { |
| 1849 | 1849 | |
@@ -1864,12 +1864,12 @@ discard block |
||
| 1864 | 1864 | } |
| 1865 | 1865 | |
| 1866 | 1866 | /** |
| 1867 | - * Gets the airport icao from the iata |
|
| 1868 | - * |
|
| 1869 | - * @param String $airport_iata the iata code of the airport |
|
| 1870 | - * @return String airport iata |
|
| 1871 | - * |
|
| 1872 | - */ |
|
| 1867 | + * Gets the airport icao from the iata |
|
| 1868 | + * |
|
| 1869 | + * @param String $airport_iata the iata code of the airport |
|
| 1870 | + * @return String airport iata |
|
| 1871 | + * |
|
| 1872 | + */ |
|
| 1873 | 1873 | public function getAirportIcao($airport_iata = '') |
| 1874 | 1874 | { |
| 1875 | 1875 | |
@@ -1889,14 +1889,14 @@ discard block |
||
| 1889 | 1889 | } |
| 1890 | 1890 | |
| 1891 | 1891 | /** |
| 1892 | - * Gets the airport distance |
|
| 1893 | - * |
|
| 1894 | - * @param String $airport_icao the icao code of the airport |
|
| 1895 | - * @param Float $latitude the latitude |
|
| 1896 | - * @param Float $longitude the longitude |
|
| 1897 | - * @return Float distance to the airport |
|
| 1898 | - * |
|
| 1899 | - */ |
|
| 1892 | + * Gets the airport distance |
|
| 1893 | + * |
|
| 1894 | + * @param String $airport_icao the icao code of the airport |
|
| 1895 | + * @param Float $latitude the latitude |
|
| 1896 | + * @param Float $longitude the longitude |
|
| 1897 | + * @return Float distance to the airport |
|
| 1898 | + * |
|
| 1899 | + */ |
|
| 1900 | 1900 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
| 1901 | 1901 | { |
| 1902 | 1902 | |
@@ -1917,12 +1917,12 @@ discard block |
||
| 1917 | 1917 | } |
| 1918 | 1918 | |
| 1919 | 1919 | /** |
| 1920 | - * Gets the airport info based on the icao |
|
| 1921 | - * |
|
| 1922 | - * @param String $airport the icao code of the airport |
|
| 1923 | - * @return Array airport information |
|
| 1924 | - * |
|
| 1925 | - */ |
|
| 1920 | + * Gets the airport info based on the icao |
|
| 1921 | + * |
|
| 1922 | + * @param String $airport the icao code of the airport |
|
| 1923 | + * @return Array airport information |
|
| 1924 | + * |
|
| 1925 | + */ |
|
| 1926 | 1926 | public function getAllAirportInfo($airport = '') |
| 1927 | 1927 | { |
| 1928 | 1928 | |
@@ -1968,12 +1968,12 @@ discard block |
||
| 1968 | 1968 | } |
| 1969 | 1969 | |
| 1970 | 1970 | /** |
| 1971 | - * Gets the airport info based on the country |
|
| 1972 | - * |
|
| 1973 | - * @param Array $countries Airports countries |
|
| 1974 | - * @return Array airport information |
|
| 1975 | - * |
|
| 1976 | - */ |
|
| 1971 | + * Gets the airport info based on the country |
|
| 1972 | + * |
|
| 1973 | + * @param Array $countries Airports countries |
|
| 1974 | + * @return Array airport information |
|
| 1975 | + * |
|
| 1976 | + */ |
|
| 1977 | 1977 | public function getAllAirportInfobyCountry($countries) |
| 1978 | 1978 | { |
| 1979 | 1979 | $lst_countries = ''; |
@@ -2011,12 +2011,12 @@ discard block |
||
| 2011 | 2011 | } |
| 2012 | 2012 | |
| 2013 | 2013 | /** |
| 2014 | - * Gets airports info based on the coord |
|
| 2015 | - * |
|
| 2016 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 2017 | - * @return Array airport information |
|
| 2018 | - * |
|
| 2019 | - */ |
|
| 2014 | + * Gets airports info based on the coord |
|
| 2015 | + * |
|
| 2016 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
| 2017 | + * @return Array airport information |
|
| 2018 | + * |
|
| 2019 | + */ |
|
| 2020 | 2020 | public function getAllAirportInfobyCoord($coord) |
| 2021 | 2021 | { |
| 2022 | 2022 | global $globalDBdriver; |
@@ -2047,12 +2047,12 @@ discard block |
||
| 2047 | 2047 | } |
| 2048 | 2048 | |
| 2049 | 2049 | /** |
| 2050 | - * Gets waypoints info based on the coord |
|
| 2051 | - * |
|
| 2052 | - * @param Array $coord waypoints coord |
|
| 2053 | - * @return Array airport information |
|
| 2054 | - * |
|
| 2055 | - */ |
|
| 2050 | + * Gets waypoints info based on the coord |
|
| 2051 | + * |
|
| 2052 | + * @param Array $coord waypoints coord |
|
| 2053 | + * @return Array airport information |
|
| 2054 | + * |
|
| 2055 | + */ |
|
| 2056 | 2056 | public function getAllWaypointsInfobyCoord($coord) |
| 2057 | 2057 | { |
| 2058 | 2058 | if (is_array($coord)) { |
@@ -2086,12 +2086,12 @@ discard block |
||
| 2086 | 2086 | |
| 2087 | 2087 | |
| 2088 | 2088 | /** |
| 2089 | - * Gets the airline info based on the icao code or iata code |
|
| 2090 | - * |
|
| 2091 | - * @param String $airline_icao the iata code of the airport |
|
| 2092 | - * @return Array airport information |
|
| 2093 | - * |
|
| 2094 | - */ |
|
| 2089 | + * Gets the airline info based on the icao code or iata code |
|
| 2090 | + * |
|
| 2091 | + * @param String $airline_icao the iata code of the airport |
|
| 2092 | + * @return Array airport information |
|
| 2093 | + * |
|
| 2094 | + */ |
|
| 2095 | 2095 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
| 2096 | 2096 | { |
| 2097 | 2097 | global $globalUseRealAirlines; |
@@ -2122,7 +2122,7 @@ discard block |
||
| 2122 | 2122 | } else { |
| 2123 | 2123 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
| 2124 | 2124 | } |
| 2125 | - /* |
|
| 2125 | + /* |
|
| 2126 | 2126 | $airline_array = array(); |
| 2127 | 2127 | $temp_array = array(); |
| 2128 | 2128 | |
@@ -2152,12 +2152,12 @@ discard block |
||
| 2152 | 2152 | } |
| 2153 | 2153 | |
| 2154 | 2154 | /** |
| 2155 | - * Gets the airline info based on the airline name |
|
| 2156 | - * |
|
| 2157 | - * @param String $airline_name the name of the airline |
|
| 2158 | - * @return Array airline information |
|
| 2159 | - * |
|
| 2160 | - */ |
|
| 2155 | + * Gets the airline info based on the airline name |
|
| 2156 | + * |
|
| 2157 | + * @param String $airline_name the name of the airline |
|
| 2158 | + * @return Array airline information |
|
| 2159 | + * |
|
| 2160 | + */ |
|
| 2161 | 2161 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
| 2162 | 2162 | { |
| 2163 | 2163 | global $globalUseRealAirlines; |
@@ -2185,12 +2185,12 @@ discard block |
||
| 2185 | 2185 | |
| 2186 | 2186 | |
| 2187 | 2187 | /** |
| 2188 | - * Gets the aircraft info based on the aircraft type |
|
| 2189 | - * |
|
| 2190 | - * @param String $aircraft_type the aircraft type |
|
| 2191 | - * @return Array aircraft information |
|
| 2192 | - * |
|
| 2193 | - */ |
|
| 2188 | + * Gets the aircraft info based on the aircraft type |
|
| 2189 | + * |
|
| 2190 | + * @param String $aircraft_type the aircraft type |
|
| 2191 | + * @return Array aircraft information |
|
| 2192 | + * |
|
| 2193 | + */ |
|
| 2194 | 2194 | public function getAllAircraftInfo($aircraft_type) |
| 2195 | 2195 | { |
| 2196 | 2196 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2222,12 +2222,12 @@ discard block |
||
| 2222 | 2222 | } |
| 2223 | 2223 | |
| 2224 | 2224 | /** |
| 2225 | - * Gets the aircraft icao based on the aircraft name/type |
|
| 2226 | - * |
|
| 2227 | - * @param String $aircraft_type the aircraft type |
|
| 2228 | - * @return String aircraft information |
|
| 2229 | - * |
|
| 2230 | - */ |
|
| 2225 | + * Gets the aircraft icao based on the aircraft name/type |
|
| 2226 | + * |
|
| 2227 | + * @param String $aircraft_type the aircraft type |
|
| 2228 | + * @return String aircraft information |
|
| 2229 | + * |
|
| 2230 | + */ |
|
| 2231 | 2231 | public function getAircraftIcao($aircraft_type) |
| 2232 | 2232 | { |
| 2233 | 2233 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2252,12 +2252,12 @@ discard block |
||
| 2252 | 2252 | } |
| 2253 | 2253 | |
| 2254 | 2254 | /** |
| 2255 | - * Gets the aircraft info based on the aircraft modes |
|
| 2256 | - * |
|
| 2257 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2258 | - * @return String aircraft type |
|
| 2259 | - * |
|
| 2260 | - */ |
|
| 2255 | + * Gets the aircraft info based on the aircraft modes |
|
| 2256 | + * |
|
| 2257 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
| 2258 | + * @return String aircraft type |
|
| 2259 | + * |
|
| 2260 | + */ |
|
| 2261 | 2261 | public function getAllAircraftType($aircraft_modes) |
| 2262 | 2262 | { |
| 2263 | 2263 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2277,12 +2277,12 @@ discard block |
||
| 2277 | 2277 | } |
| 2278 | 2278 | |
| 2279 | 2279 | /** |
| 2280 | - * Gets the aircraft info based on the aircraft registration |
|
| 2281 | - * |
|
| 2282 | - * @param String $registration the aircraft registration |
|
| 2283 | - * @return String aircraft type |
|
| 2284 | - * |
|
| 2285 | - */ |
|
| 2280 | + * Gets the aircraft info based on the aircraft registration |
|
| 2281 | + * |
|
| 2282 | + * @param String $registration the aircraft registration |
|
| 2283 | + * @return String aircraft type |
|
| 2284 | + * |
|
| 2285 | + */ |
|
| 2286 | 2286 | public function getAllAircraftTypeByRegistration($registration) |
| 2287 | 2287 | { |
| 2288 | 2288 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2300,12 +2300,12 @@ discard block |
||
| 2300 | 2300 | } |
| 2301 | 2301 | |
| 2302 | 2302 | /** |
| 2303 | - * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
| 2304 | - * |
|
| 2305 | - * @param String $registration the aircraft registration |
|
| 2306 | - * @return Array spotter_id and flightaware_id |
|
| 2307 | - * |
|
| 2308 | - */ |
|
| 2303 | + * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
| 2304 | + * |
|
| 2305 | + * @param String $registration the aircraft registration |
|
| 2306 | + * @return Array spotter_id and flightaware_id |
|
| 2307 | + * |
|
| 2308 | + */ |
|
| 2309 | 2309 | public function getAllIDByRegistration($registration) |
| 2310 | 2310 | { |
| 2311 | 2311 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2324,12 +2324,12 @@ discard block |
||
| 2324 | 2324 | } |
| 2325 | 2325 | |
| 2326 | 2326 | /** |
| 2327 | - * Gets correct aircraft operator code |
|
| 2328 | - * |
|
| 2329 | - * @param String $operator the aircraft operator code (callsign) |
|
| 2330 | - * @return String aircraft operator code |
|
| 2331 | - * |
|
| 2332 | - */ |
|
| 2327 | + * Gets correct aircraft operator code |
|
| 2328 | + * |
|
| 2329 | + * @param String $operator the aircraft operator code (callsign) |
|
| 2330 | + * @return String aircraft operator code |
|
| 2331 | + * |
|
| 2332 | + */ |
|
| 2333 | 2333 | public function getOperator($operator) |
| 2334 | 2334 | { |
| 2335 | 2335 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2346,16 +2346,16 @@ discard block |
||
| 2346 | 2346 | } |
| 2347 | 2347 | |
| 2348 | 2348 | /** |
| 2349 | - * Gets the aircraft route based on the aircraft callsign |
|
| 2350 | - * |
|
| 2351 | - * @param String $callsign the aircraft callsign |
|
| 2352 | - * @return Array aircraft type |
|
| 2353 | - * |
|
| 2354 | - */ |
|
| 2349 | + * Gets the aircraft route based on the aircraft callsign |
|
| 2350 | + * |
|
| 2351 | + * @param String $callsign the aircraft callsign |
|
| 2352 | + * @return Array aircraft type |
|
| 2353 | + * |
|
| 2354 | + */ |
|
| 2355 | 2355 | public function getRouteInfo($callsign) |
| 2356 | 2356 | { |
| 2357 | 2357 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
| 2358 | - if ($callsign == '') return array(); |
|
| 2358 | + if ($callsign == '') return array(); |
|
| 2359 | 2359 | $query = "SELECT routes.Operator_ICAO, routes.FromAirport_ICAO, routes.ToAirport_ICAO, routes.RouteStop, routes.FromAirport_Time, routes.ToAirport_Time FROM routes WHERE CallSign = :callsign LIMIT 1"; |
| 2360 | 2360 | |
| 2361 | 2361 | $sth = $this->db->prepare($query); |
@@ -2369,12 +2369,12 @@ discard block |
||
| 2369 | 2369 | } |
| 2370 | 2370 | |
| 2371 | 2371 | /** |
| 2372 | - * Gets the aircraft info based on the aircraft registration |
|
| 2373 | - * |
|
| 2374 | - * @param String $registration the aircraft registration |
|
| 2375 | - * @return Array aircraft information |
|
| 2376 | - * |
|
| 2377 | - */ |
|
| 2372 | + * Gets the aircraft info based on the aircraft registration |
|
| 2373 | + * |
|
| 2374 | + * @param String $registration the aircraft registration |
|
| 2375 | + * @return Array aircraft information |
|
| 2376 | + * |
|
| 2377 | + */ |
|
| 2378 | 2378 | public function getAircraftInfoByRegistration($registration) |
| 2379 | 2379 | { |
| 2380 | 2380 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2401,12 +2401,12 @@ discard block |
||
| 2401 | 2401 | } |
| 2402 | 2402 | |
| 2403 | 2403 | /** |
| 2404 | - * Gets the aircraft owner & base based on the aircraft registration |
|
| 2405 | - * |
|
| 2406 | - * @param String $registration the aircraft registration |
|
| 2407 | - * @return Array aircraft information |
|
| 2408 | - * |
|
| 2409 | - */ |
|
| 2404 | + * Gets the aircraft owner & base based on the aircraft registration |
|
| 2405 | + * |
|
| 2406 | + * @param String $registration the aircraft registration |
|
| 2407 | + * @return Array aircraft information |
|
| 2408 | + * |
|
| 2409 | + */ |
|
| 2410 | 2410 | public function getAircraftOwnerByRegistration($registration) |
| 2411 | 2411 | { |
| 2412 | 2412 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2423,11 +2423,11 @@ discard block |
||
| 2423 | 2423 | |
| 2424 | 2424 | |
| 2425 | 2425 | /** |
| 2426 | - * Gets all flights (but with only little info) |
|
| 2427 | - * |
|
| 2428 | - * @return Array basic flight information |
|
| 2429 | - * |
|
| 2430 | - */ |
|
| 2426 | + * Gets all flights (but with only little info) |
|
| 2427 | + * |
|
| 2428 | + * @return Array basic flight information |
|
| 2429 | + * |
|
| 2430 | + */ |
|
| 2431 | 2431 | public function getAllFlightsforSitemap() |
| 2432 | 2432 | { |
| 2433 | 2433 | //$query = "SELECT spotter_output.spotter_id, spotter_output.ident, spotter_output.airline_name, spotter_output.aircraft_name, spotter_output.aircraft_icao FROM spotter_output ORDER BY LIMIT "; |
@@ -2435,7 +2435,7 @@ discard block |
||
| 2435 | 2435 | |
| 2436 | 2436 | $sth = $this->db->prepare($query); |
| 2437 | 2437 | $sth->execute(); |
| 2438 | - /* |
|
| 2438 | + /* |
|
| 2439 | 2439 | $flight_array = array(); |
| 2440 | 2440 | $temp_array = array(); |
| 2441 | 2441 | |
@@ -2457,11 +2457,11 @@ discard block |
||
| 2457 | 2457 | } |
| 2458 | 2458 | |
| 2459 | 2459 | /** |
| 2460 | - * Gets a list of all aircraft manufacturers |
|
| 2461 | - * |
|
| 2462 | - * @return Array list of aircraft types |
|
| 2463 | - * |
|
| 2464 | - */ |
|
| 2460 | + * Gets a list of all aircraft manufacturers |
|
| 2461 | + * |
|
| 2462 | + * @return Array list of aircraft types |
|
| 2463 | + * |
|
| 2464 | + */ |
|
| 2465 | 2465 | public function getAllManufacturers() |
| 2466 | 2466 | { |
| 2467 | 2467 | /* |
@@ -2490,11 +2490,11 @@ discard block |
||
| 2490 | 2490 | |
| 2491 | 2491 | |
| 2492 | 2492 | /** |
| 2493 | - * Gets a list of all aircraft types |
|
| 2494 | - * |
|
| 2495 | - * @return Array list of aircraft types |
|
| 2496 | - * |
|
| 2497 | - */ |
|
| 2493 | + * Gets a list of all aircraft types |
|
| 2494 | + * |
|
| 2495 | + * @return Array list of aircraft types |
|
| 2496 | + * |
|
| 2497 | + */ |
|
| 2498 | 2498 | public function getAllAircraftTypes($filters = array()) |
| 2499 | 2499 | { |
| 2500 | 2500 | /* |
@@ -2529,11 +2529,11 @@ discard block |
||
| 2529 | 2529 | |
| 2530 | 2530 | |
| 2531 | 2531 | /** |
| 2532 | - * Gets a list of all aircraft registrations |
|
| 2533 | - * |
|
| 2534 | - * @return Array list of aircraft registrations |
|
| 2535 | - * |
|
| 2536 | - */ |
|
| 2532 | + * Gets a list of all aircraft registrations |
|
| 2533 | + * |
|
| 2534 | + * @return Array list of aircraft registrations |
|
| 2535 | + * |
|
| 2536 | + */ |
|
| 2537 | 2537 | public function getAllAircraftRegistrations($filters = array()) |
| 2538 | 2538 | { |
| 2539 | 2539 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2558,12 +2558,12 @@ discard block |
||
| 2558 | 2558 | } |
| 2559 | 2559 | |
| 2560 | 2560 | /** |
| 2561 | - * Gets all source name |
|
| 2562 | - * |
|
| 2563 | - * @param String type format of source |
|
| 2564 | - * @return Array list of source name |
|
| 2565 | - * |
|
| 2566 | - */ |
|
| 2561 | + * Gets all source name |
|
| 2562 | + * |
|
| 2563 | + * @param String type format of source |
|
| 2564 | + * @return Array list of source name |
|
| 2565 | + * |
|
| 2566 | + */ |
|
| 2567 | 2567 | public function getAllSourceName($type = '',$filters = array()) |
| 2568 | 2568 | { |
| 2569 | 2569 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2594,11 +2594,11 @@ discard block |
||
| 2594 | 2594 | |
| 2595 | 2595 | |
| 2596 | 2596 | /** |
| 2597 | - * Gets a list of all airline names |
|
| 2598 | - * |
|
| 2599 | - * @return Array list of airline names |
|
| 2600 | - * |
|
| 2601 | - */ |
|
| 2597 | + * Gets a list of all airline names |
|
| 2598 | + * |
|
| 2599 | + * @return Array list of airline names |
|
| 2600 | + * |
|
| 2601 | + */ |
|
| 2602 | 2602 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
| 2603 | 2603 | { |
| 2604 | 2604 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2647,11 +2647,11 @@ discard block |
||
| 2647 | 2647 | } |
| 2648 | 2648 | |
| 2649 | 2649 | /** |
| 2650 | - * Gets a list of all alliance names |
|
| 2651 | - * |
|
| 2652 | - * @return Array list of alliance names |
|
| 2653 | - * |
|
| 2654 | - */ |
|
| 2650 | + * Gets a list of all alliance names |
|
| 2651 | + * |
|
| 2652 | + * @return Array list of alliance names |
|
| 2653 | + * |
|
| 2654 | + */ |
|
| 2655 | 2655 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
| 2656 | 2656 | { |
| 2657 | 2657 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2676,11 +2676,11 @@ discard block |
||
| 2676 | 2676 | } |
| 2677 | 2677 | |
| 2678 | 2678 | /** |
| 2679 | - * Gets a list of all airline countries |
|
| 2680 | - * |
|
| 2681 | - * @return Array list of airline countries |
|
| 2682 | - * |
|
| 2683 | - */ |
|
| 2679 | + * Gets a list of all airline countries |
|
| 2680 | + * |
|
| 2681 | + * @return Array list of airline countries |
|
| 2682 | + * |
|
| 2683 | + */ |
|
| 2684 | 2684 | public function getAllAirlineCountries($filters = array()) |
| 2685 | 2685 | { |
| 2686 | 2686 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2708,11 +2708,11 @@ discard block |
||
| 2708 | 2708 | |
| 2709 | 2709 | |
| 2710 | 2710 | /** |
| 2711 | - * Gets a list of all departure & arrival names |
|
| 2712 | - * |
|
| 2713 | - * @return Array list of airport names |
|
| 2714 | - * |
|
| 2715 | - */ |
|
| 2711 | + * Gets a list of all departure & arrival names |
|
| 2712 | + * |
|
| 2713 | + * @return Array list of airport names |
|
| 2714 | + * |
|
| 2715 | + */ |
|
| 2716 | 2716 | public function getAllAirportNames($filters = array()) |
| 2717 | 2717 | { |
| 2718 | 2718 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2761,11 +2761,11 @@ discard block |
||
| 2761 | 2761 | |
| 2762 | 2762 | |
| 2763 | 2763 | /** |
| 2764 | - * Gets a list of all departure & arrival airport countries |
|
| 2765 | - * |
|
| 2766 | - * @return Array list of airport countries |
|
| 2767 | - * |
|
| 2768 | - */ |
|
| 2764 | + * Gets a list of all departure & arrival airport countries |
|
| 2765 | + * |
|
| 2766 | + * @return Array list of airport countries |
|
| 2767 | + * |
|
| 2768 | + */ |
|
| 2769 | 2769 | public function getAllAirportCountries($filters = array()) |
| 2770 | 2770 | { |
| 2771 | 2771 | $airport_array = array(); |
@@ -2813,11 +2813,11 @@ discard block |
||
| 2813 | 2813 | |
| 2814 | 2814 | |
| 2815 | 2815 | /** |
| 2816 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2817 | - * |
|
| 2818 | - * @return Array list of countries |
|
| 2819 | - * |
|
| 2820 | - */ |
|
| 2816 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
| 2817 | + * |
|
| 2818 | + * @return Array list of countries |
|
| 2819 | + * |
|
| 2820 | + */ |
|
| 2821 | 2821 | public function getAllCountries($filters = array()) |
| 2822 | 2822 | { |
| 2823 | 2823 | $Connection= new Connection($this->db); |
@@ -2894,11 +2894,11 @@ discard block |
||
| 2894 | 2894 | |
| 2895 | 2895 | |
| 2896 | 2896 | /** |
| 2897 | - * Gets a list of all idents/callsigns |
|
| 2898 | - * |
|
| 2899 | - * @return Array list of ident/callsign names |
|
| 2900 | - * |
|
| 2901 | - */ |
|
| 2897 | + * Gets a list of all idents/callsigns |
|
| 2898 | + * |
|
| 2899 | + * @return Array list of ident/callsign names |
|
| 2900 | + * |
|
| 2901 | + */ |
|
| 2902 | 2902 | public function getAllIdents($filters = array()) |
| 2903 | 2903 | { |
| 2904 | 2904 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2922,9 +2922,9 @@ discard block |
||
| 2922 | 2922 | } |
| 2923 | 2923 | |
| 2924 | 2924 | /** |
| 2925 | - * Get a list of flights from airport since 7 days |
|
| 2926 | - * @return Array number, icao, name and city of airports |
|
| 2927 | - */ |
|
| 2925 | + * Get a list of flights from airport since 7 days |
|
| 2926 | + * @return Array number, icao, name and city of airports |
|
| 2927 | + */ |
|
| 2928 | 2928 | |
| 2929 | 2929 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
| 2930 | 2930 | global $globalTimezone, $globalDBdriver; |
@@ -2955,9 +2955,9 @@ discard block |
||
| 2955 | 2955 | } |
| 2956 | 2956 | |
| 2957 | 2957 | /** |
| 2958 | - * Get a list of flights from airport since 7 days |
|
| 2959 | - * @return Array number, icao, name and city of airports |
|
| 2960 | - */ |
|
| 2958 | + * Get a list of flights from airport since 7 days |
|
| 2959 | + * @return Array number, icao, name and city of airports |
|
| 2960 | + */ |
|
| 2961 | 2961 | |
| 2962 | 2962 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
| 2963 | 2963 | global $globalTimezone, $globalDBdriver; |
@@ -2987,9 +2987,9 @@ discard block |
||
| 2987 | 2987 | } |
| 2988 | 2988 | |
| 2989 | 2989 | /** |
| 2990 | - * Get a list of flights from detected airport since 7 days |
|
| 2991 | - * @return Array number, icao, name and city of airports |
|
| 2992 | - */ |
|
| 2990 | + * Get a list of flights from detected airport since 7 days |
|
| 2991 | + * @return Array number, icao, name and city of airports |
|
| 2992 | + */ |
|
| 2993 | 2993 | |
| 2994 | 2994 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
| 2995 | 2995 | global $globalTimezone, $globalDBdriver; |
@@ -3027,9 +3027,9 @@ discard block |
||
| 3027 | 3027 | } |
| 3028 | 3028 | |
| 3029 | 3029 | /** |
| 3030 | - * Get a list of flights from detected airport since 7 days |
|
| 3031 | - * @return Array number, icao, name and city of airports |
|
| 3032 | - */ |
|
| 3030 | + * Get a list of flights from detected airport since 7 days |
|
| 3031 | + * @return Array number, icao, name and city of airports |
|
| 3032 | + */ |
|
| 3033 | 3033 | |
| 3034 | 3034 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
| 3035 | 3035 | global $globalTimezone, $globalDBdriver; |
@@ -3071,9 +3071,9 @@ discard block |
||
| 3071 | 3071 | |
| 3072 | 3072 | |
| 3073 | 3073 | /** |
| 3074 | - * Get a list of flights to airport since 7 days |
|
| 3075 | - * @return Array number, icao, name and city of airports |
|
| 3076 | - */ |
|
| 3074 | + * Get a list of flights to airport since 7 days |
|
| 3075 | + * @return Array number, icao, name and city of airports |
|
| 3076 | + */ |
|
| 3077 | 3077 | |
| 3078 | 3078 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
| 3079 | 3079 | global $globalTimezone, $globalDBdriver; |
@@ -3106,9 +3106,9 @@ discard block |
||
| 3106 | 3106 | |
| 3107 | 3107 | |
| 3108 | 3108 | /** |
| 3109 | - * Get a list of flights detected to airport since 7 days |
|
| 3110 | - * @return Array number, icao, name and city of airports |
|
| 3111 | - */ |
|
| 3109 | + * Get a list of flights detected to airport since 7 days |
|
| 3110 | + * @return Array number, icao, name and city of airports |
|
| 3111 | + */ |
|
| 3112 | 3112 | |
| 3113 | 3113 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
| 3114 | 3114 | global $globalTimezone, $globalDBdriver; |
@@ -3149,9 +3149,9 @@ discard block |
||
| 3149 | 3149 | |
| 3150 | 3150 | |
| 3151 | 3151 | /** |
| 3152 | - * Get a list of flights to airport since 7 days |
|
| 3153 | - * @return Array number, icao, name and city of airports |
|
| 3154 | - */ |
|
| 3152 | + * Get a list of flights to airport since 7 days |
|
| 3153 | + * @return Array number, icao, name and city of airports |
|
| 3154 | + */ |
|
| 3155 | 3155 | |
| 3156 | 3156 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
| 3157 | 3157 | global $globalTimezone, $globalDBdriver; |
@@ -3183,9 +3183,9 @@ discard block |
||
| 3183 | 3183 | |
| 3184 | 3184 | |
| 3185 | 3185 | /** |
| 3186 | - * Get a list of flights detected to airport since 7 days |
|
| 3187 | - * @return Array number, icao, name and city of airports |
|
| 3188 | - */ |
|
| 3186 | + * Get a list of flights detected to airport since 7 days |
|
| 3187 | + * @return Array number, icao, name and city of airports |
|
| 3188 | + */ |
|
| 3189 | 3189 | |
| 3190 | 3190 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
| 3191 | 3191 | global $globalTimezone, $globalDBdriver; |
@@ -3229,11 +3229,11 @@ discard block |
||
| 3229 | 3229 | |
| 3230 | 3230 | |
| 3231 | 3231 | /** |
| 3232 | - * Gets a list of all dates |
|
| 3233 | - * |
|
| 3234 | - * @return Array list of date names |
|
| 3235 | - * |
|
| 3236 | - */ |
|
| 3232 | + * Gets a list of all dates |
|
| 3233 | + * |
|
| 3234 | + * @return Array list of date names |
|
| 3235 | + * |
|
| 3236 | + */ |
|
| 3237 | 3237 | public function getAllDates() |
| 3238 | 3238 | { |
| 3239 | 3239 | global $globalTimezone, $globalDBdriver; |
@@ -3274,11 +3274,11 @@ discard block |
||
| 3274 | 3274 | |
| 3275 | 3275 | |
| 3276 | 3276 | /** |
| 3277 | - * Gets all route combinations |
|
| 3278 | - * |
|
| 3279 | - * @return Array the route list |
|
| 3280 | - * |
|
| 3281 | - */ |
|
| 3277 | + * Gets all route combinations |
|
| 3278 | + * |
|
| 3279 | + * @return Array the route list |
|
| 3280 | + * |
|
| 3281 | + */ |
|
| 3282 | 3282 | public function getAllRoutes() |
| 3283 | 3283 | { |
| 3284 | 3284 | $query = "SELECT DISTINCT concat(spotter_output.departure_airport_icao, ' - ', spotter_output.arrival_airport_icao) AS route, spotter_output.departure_airport_icao, spotter_output.arrival_airport_icao |
@@ -3304,13 +3304,13 @@ discard block |
||
| 3304 | 3304 | } |
| 3305 | 3305 | |
| 3306 | 3306 | /** |
| 3307 | - * Update ident spotter data |
|
| 3308 | - * |
|
| 3309 | - * @param String $flightaware_id the ID from flightaware |
|
| 3310 | - * @param String $ident the flight ident |
|
| 3311 | - * @return String success or false |
|
| 3312 | - * |
|
| 3313 | - */ |
|
| 3307 | + * Update ident spotter data |
|
| 3308 | + * |
|
| 3309 | + * @param String $flightaware_id the ID from flightaware |
|
| 3310 | + * @param String $ident the flight ident |
|
| 3311 | + * @return String success or false |
|
| 3312 | + * |
|
| 3313 | + */ |
|
| 3314 | 3314 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
| 3315 | 3315 | { |
| 3316 | 3316 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3331,14 +3331,14 @@ discard block |
||
| 3331 | 3331 | } else { |
| 3332 | 3332 | $airline_array = $this->getAllAirlineInfo("NA"); |
| 3333 | 3333 | } |
| 3334 | - $airline_name = $airline_array[0]['name']; |
|
| 3335 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3336 | - $airline_country = $airline_array[0]['country']; |
|
| 3337 | - $airline_type = $airline_array[0]['type']; |
|
| 3334 | + $airline_name = $airline_array[0]['name']; |
|
| 3335 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3336 | + $airline_country = $airline_array[0]['country']; |
|
| 3337 | + $airline_type = $airline_array[0]['type']; |
|
| 3338 | 3338 | |
| 3339 | 3339 | |
| 3340 | 3340 | $query = 'UPDATE spotter_output SET ident = :ident, airline_name = :airline_name, airline_icao = :airline_icao, airline_country = :airline_country, airline_type = :airline_type WHERE flightaware_id = :flightaware_id'; |
| 3341 | - $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type); |
|
| 3341 | + $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type); |
|
| 3342 | 3342 | |
| 3343 | 3343 | try { |
| 3344 | 3344 | $sth = $this->db->prepare($query); |
@@ -3351,19 +3351,19 @@ discard block |
||
| 3351 | 3351 | |
| 3352 | 3352 | } |
| 3353 | 3353 | /** |
| 3354 | - * Update latest spotter data |
|
| 3355 | - * |
|
| 3356 | - * @param String $flightaware_id the ID from flightaware |
|
| 3357 | - * @param String $ident the flight ident |
|
| 3358 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3359 | - * @return String success or false |
|
| 3360 | - * |
|
| 3361 | - */ |
|
| 3354 | + * Update latest spotter data |
|
| 3355 | + * |
|
| 3356 | + * @param String $flightaware_id the ID from flightaware |
|
| 3357 | + * @param String $ident the flight ident |
|
| 3358 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3359 | + * @return String success or false |
|
| 3360 | + * |
|
| 3361 | + */ |
|
| 3362 | 3362 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
| 3363 | 3363 | { |
| 3364 | 3364 | if ($groundspeed == '') $groundspeed = NULL; |
| 3365 | 3365 | $query = 'UPDATE spotter_output SET ident = :ident, last_latitude = :last_latitude, last_longitude = :last_longitude, last_altitude = :last_altitude, last_ground = :last_ground, last_seen = :last_seen, real_arrival_airport_icao = :real_arrival_airport_icao, real_arrival_airport_time = :real_arrival_airport_time, last_ground_speed = :last_ground_speed WHERE flightaware_id = :flightaware_id'; |
| 3366 | - $query_values = array(':flightaware_id' => $flightaware_id,':real_arrival_airport_icao' => $arrival_airport_icao,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':real_arrival_airport_time' => $arrival_airport_time, ':last_ground' => $ground, ':ident' => $ident); |
|
| 3366 | + $query_values = array(':flightaware_id' => $flightaware_id,':real_arrival_airport_icao' => $arrival_airport_icao,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':real_arrival_airport_time' => $arrival_airport_time, ':last_ground' => $ground, ':ident' => $ident); |
|
| 3367 | 3367 | |
| 3368 | 3368 | try { |
| 3369 | 3369 | $sth = $this->db->prepare($query); |
@@ -3377,32 +3377,32 @@ discard block |
||
| 3377 | 3377 | } |
| 3378 | 3378 | |
| 3379 | 3379 | /** |
| 3380 | - * Adds a new spotter data |
|
| 3381 | - * |
|
| 3382 | - * @param String $flightaware_id the ID from flightaware |
|
| 3383 | - * @param String $ident the flight ident |
|
| 3384 | - * @param String $aircraft_icao the aircraft type |
|
| 3385 | - * @param String $departure_airport_icao the departure airport |
|
| 3386 | - * @param String $arrival_airport_icao the arrival airport |
|
| 3387 | - * @param String $latitude latitude of flight |
|
| 3388 | - * @param String $longitude latitude of flight |
|
| 3389 | - * @param String $waypoints waypoints of flight |
|
| 3390 | - * @param String $altitude altitude of flight |
|
| 3391 | - * @param String $heading heading of flight |
|
| 3392 | - * @param String $groundspeed speed of flight |
|
| 3393 | - * @param String $date date of flight |
|
| 3394 | - * @param String $departure_airport_time departure time of flight |
|
| 3395 | - * @param String $arrival_airport_time arrival time of flight |
|
| 3396 | - * @param String $squawk squawk code of flight |
|
| 3397 | - * @param String $route_stop route stop of flight |
|
| 3398 | - * @param String $highlight highlight or not |
|
| 3399 | - * @param String $ModeS ModesS code of flight |
|
| 3400 | - * @param String $registration registration code of flight |
|
| 3401 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3402 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3403 | - * @param String $verticalrate vertival rate of flight |
|
| 3404 | - * @return String success or false |
|
| 3405 | - */ |
|
| 3380 | + * Adds a new spotter data |
|
| 3381 | + * |
|
| 3382 | + * @param String $flightaware_id the ID from flightaware |
|
| 3383 | + * @param String $ident the flight ident |
|
| 3384 | + * @param String $aircraft_icao the aircraft type |
|
| 3385 | + * @param String $departure_airport_icao the departure airport |
|
| 3386 | + * @param String $arrival_airport_icao the arrival airport |
|
| 3387 | + * @param String $latitude latitude of flight |
|
| 3388 | + * @param String $longitude latitude of flight |
|
| 3389 | + * @param String $waypoints waypoints of flight |
|
| 3390 | + * @param String $altitude altitude of flight |
|
| 3391 | + * @param String $heading heading of flight |
|
| 3392 | + * @param String $groundspeed speed of flight |
|
| 3393 | + * @param String $date date of flight |
|
| 3394 | + * @param String $departure_airport_time departure time of flight |
|
| 3395 | + * @param String $arrival_airport_time arrival time of flight |
|
| 3396 | + * @param String $squawk squawk code of flight |
|
| 3397 | + * @param String $route_stop route stop of flight |
|
| 3398 | + * @param String $highlight highlight or not |
|
| 3399 | + * @param String $ModeS ModesS code of flight |
|
| 3400 | + * @param String $registration registration code of flight |
|
| 3401 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 3402 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 3403 | + * @param String $verticalrate vertival rate of flight |
|
| 3404 | + * @return String success or false |
|
| 3405 | + */ |
|
| 3406 | 3406 | public function addSpotterData($flightaware_id = '', $ident = '', $aircraft_icao = '', $departure_airport_icao = '', $arrival_airport_icao = '', $latitude = '', $longitude = '', $waypoints = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $departure_airport_time = '', $arrival_airport_time = '',$squawk = '', $route_stop = '', $highlight = '', $ModeS = '', $registration = '',$pilot_id = '', $pilot_name = '', $verticalrate = '', $ground = false,$format_source = '', $source_name = '') |
| 3407 | 3407 | { |
| 3408 | 3408 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3617,8 +3617,8 @@ discard block |
||
| 3617 | 3617 | |
| 3618 | 3618 | if ($globalIVAO && $aircraft_icao != '') |
| 3619 | 3619 | { |
| 3620 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3621 | - else $airline_icao = ''; |
|
| 3620 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
| 3621 | + else $airline_icao = ''; |
|
| 3622 | 3622 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
| 3623 | 3623 | if (!isset($image_array[0]['registration'])) |
| 3624 | 3624 | { |
@@ -3649,53 +3649,53 @@ discard block |
||
| 3649 | 3649 | |
| 3650 | 3650 | if (count($airline_array) == 0) |
| 3651 | 3651 | { |
| 3652 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3653 | - } |
|
| 3654 | - if (count($aircraft_array) == 0) |
|
| 3655 | - { |
|
| 3656 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3657 | - } |
|
| 3658 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3659 | - { |
|
| 3660 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3661 | - } |
|
| 3662 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3663 | - { |
|
| 3664 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3665 | - } |
|
| 3666 | - if ($registration == '') $registration = 'NA'; |
|
| 3667 | - if ($latitude == '' && $longitude == '') { |
|
| 3668 | - $latitude = 0; |
|
| 3669 | - $longitude = 0; |
|
| 3670 | - } |
|
| 3671 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3672 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3673 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3674 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3675 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3676 | - $query = "INSERT INTO spotter_output (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, latitude, longitude, waypoints, altitude, heading, ground_speed, date, departure_airport_time, arrival_airport_time, squawk, route_stop,highlight,ModeS, pilot_id, pilot_name, verticalrate, owner_name, ground, format_source, source_name) |
|
| 3652 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
| 3653 | + } |
|
| 3654 | + if (count($aircraft_array) == 0) |
|
| 3655 | + { |
|
| 3656 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
| 3657 | + } |
|
| 3658 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
| 3659 | + { |
|
| 3660 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3661 | + } |
|
| 3662 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
| 3663 | + { |
|
| 3664 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
| 3665 | + } |
|
| 3666 | + if ($registration == '') $registration = 'NA'; |
|
| 3667 | + if ($latitude == '' && $longitude == '') { |
|
| 3668 | + $latitude = 0; |
|
| 3669 | + $longitude = 0; |
|
| 3670 | + } |
|
| 3671 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
| 3672 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
| 3673 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 3674 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 3675 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
| 3676 | + $query = "INSERT INTO spotter_output (flightaware_id, ident, registration, airline_name, airline_icao, airline_country, airline_type, aircraft_icao, aircraft_name, aircraft_manufacturer, departure_airport_icao, departure_airport_name, departure_airport_city, departure_airport_country, arrival_airport_icao, arrival_airport_name, arrival_airport_city, arrival_airport_country, latitude, longitude, waypoints, altitude, heading, ground_speed, date, departure_airport_time, arrival_airport_time, squawk, route_stop,highlight,ModeS, pilot_id, pilot_name, verticalrate, owner_name, ground, format_source, source_name) |
|
| 3677 | 3677 | VALUES (:flightaware_id,:ident,:registration,:airline_name,:airline_icao,:airline_country,:airline_type,:aircraft_icao,:aircraft_type,:aircraft_manufacturer,:departure_airport_icao,:departure_airport_name,:departure_airport_city,:departure_airport_country, :arrival_airport_icao, :arrival_airport_name, :arrival_airport_city, :arrival_airport_country, :latitude,:longitude,:waypoints,:altitude,:heading,:groundspeed,:date, :departure_airport_time, :arrival_airport_time, :squawk, :route_stop, :highlight, :ModeS, :pilot_id, :pilot_name, :verticalrate, :owner_name,:ground, :format_source, :source_name)"; |
| 3678 | 3678 | |
| 3679 | - $airline_name = $airline_array[0]['name']; |
|
| 3680 | - $airline_icao = $airline_array[0]['icao']; |
|
| 3681 | - $airline_country = $airline_array[0]['country']; |
|
| 3682 | - $airline_type = $airline_array[0]['type']; |
|
| 3679 | + $airline_name = $airline_array[0]['name']; |
|
| 3680 | + $airline_icao = $airline_array[0]['icao']; |
|
| 3681 | + $airline_country = $airline_array[0]['country']; |
|
| 3682 | + $airline_type = $airline_array[0]['type']; |
|
| 3683 | 3683 | if ($airline_type == '') { |
| 3684 | 3684 | $timeelapsed = microtime(true); |
| 3685 | 3685 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
| 3686 | 3686 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
| 3687 | 3687 | } |
| 3688 | 3688 | if ($airline_type == null) $airline_type = ''; |
| 3689 | - $aircraft_type = $aircraft_array[0]['type']; |
|
| 3690 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3691 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3692 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3693 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3689 | + $aircraft_type = $aircraft_array[0]['type']; |
|
| 3690 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
| 3691 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
| 3692 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
| 3693 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
| 3694 | 3694 | |
| 3695 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3696 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3697 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3698 | - $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident, ':registration' => $registration,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type,':aircraft_icao' => $aircraft_icao,':aircraft_type' => $aircraft_type,':aircraft_manufacturer' => $aircraft_manufacturer,':departure_airport_icao' => $departure_airport_icao,':departure_airport_name' => $departure_airport_name,':departure_airport_city' => $departure_airport_city,':departure_airport_country' => $departure_airport_country,':arrival_airport_icao' => $arrival_airport_icao,':arrival_airport_name' => $arrival_airport_name,':arrival_airport_city' => $arrival_airport_city,':arrival_airport_country' => $arrival_airport_country,':latitude' => $latitude,':longitude' => $longitude, ':waypoints' => $waypoints,':altitude' => $altitude,':heading' => $heading,':groundspeed' => $groundspeed,':date' => $date,':departure_airport_time' => $departure_airport_time,':arrival_airport_time' => $arrival_airport_time, ':squawk' => $squawk, ':route_stop' => $route_stop, ':highlight' => $highlight, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':owner_name' => $aircraft_owner, ':format_source' => $format_source, ':ground' => $ground, ':source_name' => $source_name); |
|
| 3695 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
| 3696 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
| 3697 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
| 3698 | + $query_values = array(':flightaware_id' => $flightaware_id,':ident' => $ident, ':registration' => $registration,':airline_name' => $airline_name,':airline_icao' => $airline_icao,':airline_country' => $airline_country,':airline_type' => $airline_type,':aircraft_icao' => $aircraft_icao,':aircraft_type' => $aircraft_type,':aircraft_manufacturer' => $aircraft_manufacturer,':departure_airport_icao' => $departure_airport_icao,':departure_airport_name' => $departure_airport_name,':departure_airport_city' => $departure_airport_city,':departure_airport_country' => $departure_airport_country,':arrival_airport_icao' => $arrival_airport_icao,':arrival_airport_name' => $arrival_airport_name,':arrival_airport_city' => $arrival_airport_city,':arrival_airport_country' => $arrival_airport_country,':latitude' => $latitude,':longitude' => $longitude, ':waypoints' => $waypoints,':altitude' => $altitude,':heading' => $heading,':groundspeed' => $groundspeed,':date' => $date,':departure_airport_time' => $departure_airport_time,':arrival_airport_time' => $arrival_airport_time, ':squawk' => $squawk, ':route_stop' => $route_stop, ':highlight' => $highlight, ':ModeS' => $ModeS, ':pilot_id' => $pilot_id, ':pilot_name' => $pilot_name, ':verticalrate' => $verticalrate, ':owner_name' => $aircraft_owner, ':format_source' => $format_source, ':ground' => $ground, ':source_name' => $source_name); |
|
| 3699 | 3699 | |
| 3700 | 3700 | try { |
| 3701 | 3701 | |
@@ -3703,7 +3703,7 @@ discard block |
||
| 3703 | 3703 | $sth->execute($query_values); |
| 3704 | 3704 | $this->db = null; |
| 3705 | 3705 | } catch (PDOException $e) { |
| 3706 | - return "error : ".$e->getMessage(); |
|
| 3706 | + return "error : ".$e->getMessage(); |
|
| 3707 | 3707 | } |
| 3708 | 3708 | |
| 3709 | 3709 | return "success"; |
@@ -3712,11 +3712,11 @@ discard block |
||
| 3712 | 3712 | |
| 3713 | 3713 | |
| 3714 | 3714 | /** |
| 3715 | - * Gets the aircraft ident within the last hour |
|
| 3716 | - * |
|
| 3717 | - * @return String the ident |
|
| 3718 | - * |
|
| 3719 | - */ |
|
| 3715 | + * Gets the aircraft ident within the last hour |
|
| 3716 | + * |
|
| 3717 | + * @return String the ident |
|
| 3718 | + * |
|
| 3719 | + */ |
|
| 3720 | 3720 | public function getIdentFromLastHour($ident) |
| 3721 | 3721 | { |
| 3722 | 3722 | global $globalDBdriver, $globalTimezone; |
@@ -3732,11 +3732,11 @@ discard block |
||
| 3732 | 3732 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
| 3733 | 3733 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
| 3734 | 3734 | $query_data = array(':ident' => $ident); |
| 3735 | - } |
|
| 3735 | + } |
|
| 3736 | 3736 | |
| 3737 | 3737 | $sth = $this->db->prepare($query); |
| 3738 | 3738 | $sth->execute($query_data); |
| 3739 | - $ident_result=''; |
|
| 3739 | + $ident_result=''; |
|
| 3740 | 3740 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 3741 | 3741 | { |
| 3742 | 3742 | $ident_result = $row['ident']; |
@@ -3747,11 +3747,11 @@ discard block |
||
| 3747 | 3747 | |
| 3748 | 3748 | |
| 3749 | 3749 | /** |
| 3750 | - * Gets the aircraft data from the last 20 seconds |
|
| 3751 | - * |
|
| 3752 | - * @return Array the spotter data |
|
| 3753 | - * |
|
| 3754 | - */ |
|
| 3750 | + * Gets the aircraft data from the last 20 seconds |
|
| 3751 | + * |
|
| 3752 | + * @return Array the spotter data |
|
| 3753 | + * |
|
| 3754 | + */ |
|
| 3755 | 3755 | public function getRealTimeData($q = '') |
| 3756 | 3756 | { |
| 3757 | 3757 | global $globalDBdriver; |
@@ -3795,11 +3795,11 @@ discard block |
||
| 3795 | 3795 | |
| 3796 | 3796 | |
| 3797 | 3797 | /** |
| 3798 | - * Gets all airlines that have flown over |
|
| 3799 | - * |
|
| 3800 | - * @return Array the airline list |
|
| 3801 | - * |
|
| 3802 | - */ |
|
| 3798 | + * Gets all airlines that have flown over |
|
| 3799 | + * |
|
| 3800 | + * @return Array the airline list |
|
| 3801 | + * |
|
| 3802 | + */ |
|
| 3803 | 3803 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(), $year = '', $month = '', $day = '') |
| 3804 | 3804 | { |
| 3805 | 3805 | global $globalDBdriver; |
@@ -3813,7 +3813,7 @@ discard block |
||
| 3813 | 3813 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 3814 | 3814 | } |
| 3815 | 3815 | } |
| 3816 | - if ($sincedate != '') { |
|
| 3816 | + if ($sincedate != '') { |
|
| 3817 | 3817 | if ($globalDBdriver == 'mysql') { |
| 3818 | 3818 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 3819 | 3819 | } else { |
@@ -3867,26 +3867,26 @@ discard block |
||
| 3867 | 3867 | } |
| 3868 | 3868 | |
| 3869 | 3869 | /** |
| 3870 | - * Gets all pilots that have flown over |
|
| 3871 | - * |
|
| 3872 | - * @return Array the pilots list |
|
| 3873 | - * |
|
| 3874 | - */ |
|
| 3870 | + * Gets all pilots that have flown over |
|
| 3871 | + * |
|
| 3872 | + * @return Array the pilots list |
|
| 3873 | + * |
|
| 3874 | + */ |
|
| 3875 | 3875 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '',$day = '') |
| 3876 | 3876 | { |
| 3877 | 3877 | global $globalDBdriver; |
| 3878 | 3878 | $filter_query = $this->getFilter($filters,true,true); |
| 3879 | 3879 | $query = "SELECT DISTINCT spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
| 3880 | 3880 | FROM spotter_output".$filter_query." spotter_output.pilot_id <> '' "; |
| 3881 | - if ($olderthanmonths > 0) { |
|
| 3882 | - if ($globalDBdriver == 'mysql') { |
|
| 3881 | + if ($olderthanmonths > 0) { |
|
| 3882 | + if ($globalDBdriver == 'mysql') { |
|
| 3883 | 3883 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3884 | 3884 | } else { |
| 3885 | 3885 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3886 | 3886 | } |
| 3887 | 3887 | } |
| 3888 | - if ($sincedate != '') { |
|
| 3889 | - if ($globalDBdriver == 'mysql') { |
|
| 3888 | + if ($sincedate != '') { |
|
| 3889 | + if ($globalDBdriver == 'mysql') { |
|
| 3890 | 3890 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3891 | 3891 | } else { |
| 3892 | 3892 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3941,25 +3941,25 @@ discard block |
||
| 3941 | 3941 | } |
| 3942 | 3942 | |
| 3943 | 3943 | /** |
| 3944 | - * Gets all pilots that have flown over |
|
| 3945 | - * |
|
| 3946 | - * @return Array the pilots list |
|
| 3947 | - * |
|
| 3948 | - */ |
|
| 3944 | + * Gets all pilots that have flown over |
|
| 3945 | + * |
|
| 3946 | + * @return Array the pilots list |
|
| 3947 | + * |
|
| 3948 | + */ |
|
| 3949 | 3949 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
| 3950 | 3950 | { |
| 3951 | 3951 | global $globalDBdriver; |
| 3952 | 3952 | $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 |
| 3953 | 3953 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
| 3954 | - if ($olderthanmonths > 0) { |
|
| 3955 | - if ($globalDBdriver == 'mysql') { |
|
| 3954 | + if ($olderthanmonths > 0) { |
|
| 3955 | + if ($globalDBdriver == 'mysql') { |
|
| 3956 | 3956 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 3957 | 3957 | } else { |
| 3958 | 3958 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 3959 | 3959 | } |
| 3960 | 3960 | } |
| 3961 | - if ($sincedate != '') { |
|
| 3962 | - if ($globalDBdriver == 'mysql') { |
|
| 3961 | + if ($sincedate != '') { |
|
| 3962 | + if ($globalDBdriver == 'mysql') { |
|
| 3963 | 3963 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 3964 | 3964 | } else { |
| 3965 | 3965 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3988,26 +3988,26 @@ discard block |
||
| 3988 | 3988 | } |
| 3989 | 3989 | |
| 3990 | 3990 | /** |
| 3991 | - * Gets all owner that have flown over |
|
| 3992 | - * |
|
| 3993 | - * @return Array the pilots list |
|
| 3994 | - * |
|
| 3995 | - */ |
|
| 3991 | + * Gets all owner that have flown over |
|
| 3992 | + * |
|
| 3993 | + * @return Array the pilots list |
|
| 3994 | + * |
|
| 3995 | + */ |
|
| 3996 | 3996 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
| 3997 | 3997 | { |
| 3998 | 3998 | global $globalDBdriver; |
| 3999 | 3999 | $filter_query = $this->getFilter($filters,true,true); |
| 4000 | 4000 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 4001 | 4001 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL"; |
| 4002 | - if ($olderthanmonths > 0) { |
|
| 4003 | - if ($globalDBdriver == 'mysql') { |
|
| 4002 | + if ($olderthanmonths > 0) { |
|
| 4003 | + if ($globalDBdriver == 'mysql') { |
|
| 4004 | 4004 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 4005 | 4005 | } else { |
| 4006 | 4006 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 4007 | 4007 | } |
| 4008 | 4008 | } |
| 4009 | - if ($sincedate != '') { |
|
| 4010 | - if ($globalDBdriver == 'mysql') { |
|
| 4009 | + if ($sincedate != '') { |
|
| 4010 | + if ($globalDBdriver == 'mysql') { |
|
| 4011 | 4011 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 4012 | 4012 | } else { |
| 4013 | 4013 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4058,26 +4058,26 @@ discard block |
||
| 4058 | 4058 | } |
| 4059 | 4059 | |
| 4060 | 4060 | /** |
| 4061 | - * Gets all owner that have flown over |
|
| 4062 | - * |
|
| 4063 | - * @return Array the pilots list |
|
| 4064 | - * |
|
| 4065 | - */ |
|
| 4061 | + * Gets all owner that have flown over |
|
| 4062 | + * |
|
| 4063 | + * @return Array the pilots list |
|
| 4064 | + * |
|
| 4065 | + */ |
|
| 4066 | 4066 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 4067 | 4067 | { |
| 4068 | 4068 | global $globalDBdriver; |
| 4069 | 4069 | $filter_query = $this->getFilter($filters,true,true); |
| 4070 | 4070 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
| 4071 | 4071 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
| 4072 | - if ($olderthanmonths > 0) { |
|
| 4073 | - if ($globalDBdriver == 'mysql') { |
|
| 4072 | + if ($olderthanmonths > 0) { |
|
| 4073 | + if ($globalDBdriver == 'mysql') { |
|
| 4074 | 4074 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 4075 | 4075 | } else { |
| 4076 | 4076 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 4077 | 4077 | } |
| 4078 | 4078 | } |
| 4079 | - if ($sincedate != '') { |
|
| 4080 | - if ($globalDBdriver == 'mysql') { |
|
| 4079 | + if ($sincedate != '') { |
|
| 4080 | + if ($globalDBdriver == 'mysql') { |
|
| 4081 | 4081 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 4082 | 4082 | } else { |
| 4083 | 4083 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4104,11 +4104,11 @@ discard block |
||
| 4104 | 4104 | } |
| 4105 | 4105 | |
| 4106 | 4106 | /** |
| 4107 | - * Gets all airlines that have flown over by aircraft |
|
| 4108 | - * |
|
| 4109 | - * @return Array the airline list |
|
| 4110 | - * |
|
| 4111 | - */ |
|
| 4107 | + * Gets all airlines that have flown over by aircraft |
|
| 4108 | + * |
|
| 4109 | + * @return Array the airline list |
|
| 4110 | + * |
|
| 4111 | + */ |
|
| 4112 | 4112 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
| 4113 | 4113 | { |
| 4114 | 4114 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4140,11 +4140,11 @@ discard block |
||
| 4140 | 4140 | |
| 4141 | 4141 | |
| 4142 | 4142 | /** |
| 4143 | - * Gets all airline countries that have flown over by aircraft |
|
| 4144 | - * |
|
| 4145 | - * @return Array the airline country list |
|
| 4146 | - * |
|
| 4147 | - */ |
|
| 4143 | + * Gets all airline countries that have flown over by aircraft |
|
| 4144 | + * |
|
| 4145 | + * @return Array the airline country list |
|
| 4146 | + * |
|
| 4147 | + */ |
|
| 4148 | 4148 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
| 4149 | 4149 | { |
| 4150 | 4150 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4176,11 +4176,11 @@ discard block |
||
| 4176 | 4176 | |
| 4177 | 4177 | |
| 4178 | 4178 | /** |
| 4179 | - * Gets all airlines that have flown over by airport |
|
| 4180 | - * |
|
| 4181 | - * @return Array the airline list |
|
| 4182 | - * |
|
| 4183 | - */ |
|
| 4179 | + * Gets all airlines that have flown over by airport |
|
| 4180 | + * |
|
| 4181 | + * @return Array the airline list |
|
| 4182 | + * |
|
| 4183 | + */ |
|
| 4184 | 4184 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
| 4185 | 4185 | { |
| 4186 | 4186 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4211,11 +4211,11 @@ discard block |
||
| 4211 | 4211 | |
| 4212 | 4212 | |
| 4213 | 4213 | /** |
| 4214 | - * Gets all airline countries that have flown over by airport icao |
|
| 4215 | - * |
|
| 4216 | - * @return Array the airline country list |
|
| 4217 | - * |
|
| 4218 | - */ |
|
| 4214 | + * Gets all airline countries that have flown over by airport icao |
|
| 4215 | + * |
|
| 4216 | + * @return Array the airline country list |
|
| 4217 | + * |
|
| 4218 | + */ |
|
| 4219 | 4219 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
| 4220 | 4220 | { |
| 4221 | 4221 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4245,11 +4245,11 @@ discard block |
||
| 4245 | 4245 | |
| 4246 | 4246 | |
| 4247 | 4247 | /** |
| 4248 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4249 | - * |
|
| 4250 | - * @return Array the airline list |
|
| 4251 | - * |
|
| 4252 | - */ |
|
| 4248 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
| 4249 | + * |
|
| 4250 | + * @return Array the airline list |
|
| 4251 | + * |
|
| 4252 | + */ |
|
| 4253 | 4253 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4254 | 4254 | { |
| 4255 | 4255 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4280,11 +4280,11 @@ discard block |
||
| 4280 | 4280 | |
| 4281 | 4281 | |
| 4282 | 4282 | /** |
| 4283 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4284 | - * |
|
| 4285 | - * @return Array the airline country list |
|
| 4286 | - * |
|
| 4287 | - */ |
|
| 4283 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
| 4284 | + * |
|
| 4285 | + * @return Array the airline country list |
|
| 4286 | + * |
|
| 4287 | + */ |
|
| 4288 | 4288 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 4289 | 4289 | { |
| 4290 | 4290 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4313,11 +4313,11 @@ discard block |
||
| 4313 | 4313 | |
| 4314 | 4314 | |
| 4315 | 4315 | /** |
| 4316 | - * Gets all airlines that have flown over by date |
|
| 4317 | - * |
|
| 4318 | - * @return Array the airline list |
|
| 4319 | - * |
|
| 4320 | - */ |
|
| 4316 | + * Gets all airlines that have flown over by date |
|
| 4317 | + * |
|
| 4318 | + * @return Array the airline list |
|
| 4319 | + * |
|
| 4320 | + */ |
|
| 4321 | 4321 | public function countAllAirlinesByDate($date,$filters = array()) |
| 4322 | 4322 | { |
| 4323 | 4323 | global $globalTimezone, $globalDBdriver; |
@@ -4361,11 +4361,11 @@ discard block |
||
| 4361 | 4361 | |
| 4362 | 4362 | |
| 4363 | 4363 | /** |
| 4364 | - * Gets all airline countries that have flown over by date |
|
| 4365 | - * |
|
| 4366 | - * @return Array the airline country list |
|
| 4367 | - * |
|
| 4368 | - */ |
|
| 4364 | + * Gets all airline countries that have flown over by date |
|
| 4365 | + * |
|
| 4366 | + * @return Array the airline country list |
|
| 4367 | + * |
|
| 4368 | + */ |
|
| 4369 | 4369 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
| 4370 | 4370 | { |
| 4371 | 4371 | global $globalTimezone, $globalDBdriver; |
@@ -4408,11 +4408,11 @@ discard block |
||
| 4408 | 4408 | |
| 4409 | 4409 | |
| 4410 | 4410 | /** |
| 4411 | - * Gets all airlines that have flown over by ident/callsign |
|
| 4412 | - * |
|
| 4413 | - * @return Array the airline list |
|
| 4414 | - * |
|
| 4415 | - */ |
|
| 4411 | + * Gets all airlines that have flown over by ident/callsign |
|
| 4412 | + * |
|
| 4413 | + * @return Array the airline list |
|
| 4414 | + * |
|
| 4415 | + */ |
|
| 4416 | 4416 | public function countAllAirlinesByIdent($ident,$filters = array()) |
| 4417 | 4417 | { |
| 4418 | 4418 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4442,11 +4442,11 @@ discard block |
||
| 4442 | 4442 | } |
| 4443 | 4443 | |
| 4444 | 4444 | /** |
| 4445 | - * Gets all airlines that have flown over by route |
|
| 4446 | - * |
|
| 4447 | - * @return Array the airline list |
|
| 4448 | - * |
|
| 4449 | - */ |
|
| 4445 | + * Gets all airlines that have flown over by route |
|
| 4446 | + * |
|
| 4447 | + * @return Array the airline list |
|
| 4448 | + * |
|
| 4449 | + */ |
|
| 4450 | 4450 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 4451 | 4451 | { |
| 4452 | 4452 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4478,11 +4478,11 @@ discard block |
||
| 4478 | 4478 | } |
| 4479 | 4479 | |
| 4480 | 4480 | /** |
| 4481 | - * Gets all airline countries that have flown over by route |
|
| 4482 | - * |
|
| 4483 | - * @return Array the airline country list |
|
| 4484 | - * |
|
| 4485 | - */ |
|
| 4481 | + * Gets all airline countries that have flown over by route |
|
| 4482 | + * |
|
| 4483 | + * @return Array the airline country list |
|
| 4484 | + * |
|
| 4485 | + */ |
|
| 4486 | 4486 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
| 4487 | 4487 | { |
| 4488 | 4488 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4514,11 +4514,11 @@ discard block |
||
| 4514 | 4514 | |
| 4515 | 4515 | |
| 4516 | 4516 | /** |
| 4517 | - * Gets all airlines that have flown over by country |
|
| 4518 | - * |
|
| 4519 | - * @return Array the airline list |
|
| 4520 | - * |
|
| 4521 | - */ |
|
| 4517 | + * Gets all airlines that have flown over by country |
|
| 4518 | + * |
|
| 4519 | + * @return Array the airline list |
|
| 4520 | + * |
|
| 4521 | + */ |
|
| 4522 | 4522 | public function countAllAirlinesByCountry($country,$filters = array()) |
| 4523 | 4523 | { |
| 4524 | 4524 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4548,11 +4548,11 @@ discard block |
||
| 4548 | 4548 | |
| 4549 | 4549 | |
| 4550 | 4550 | /** |
| 4551 | - * Gets all airline countries that have flown over by country |
|
| 4552 | - * |
|
| 4553 | - * @return Array the airline country list |
|
| 4554 | - * |
|
| 4555 | - */ |
|
| 4551 | + * Gets all airline countries that have flown over by country |
|
| 4552 | + * |
|
| 4553 | + * @return Array the airline country list |
|
| 4554 | + * |
|
| 4555 | + */ |
|
| 4556 | 4556 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
| 4557 | 4557 | { |
| 4558 | 4558 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4581,11 +4581,11 @@ discard block |
||
| 4581 | 4581 | |
| 4582 | 4582 | |
| 4583 | 4583 | /** |
| 4584 | - * Gets all airlines countries |
|
| 4585 | - * |
|
| 4586 | - * @return Array the airline country list |
|
| 4587 | - * |
|
| 4588 | - */ |
|
| 4584 | + * Gets all airlines countries |
|
| 4585 | + * |
|
| 4586 | + * @return Array the airline country list |
|
| 4587 | + * |
|
| 4588 | + */ |
|
| 4589 | 4589 | public function countAllAirlineCountries($limit = true, $filters = array(), $year = '', $month = '', $day = '') |
| 4590 | 4590 | { |
| 4591 | 4591 | global $globalDBdriver; |
@@ -4640,11 +4640,11 @@ discard block |
||
| 4640 | 4640 | } |
| 4641 | 4641 | |
| 4642 | 4642 | /** |
| 4643 | - * Gets all number of flight over countries |
|
| 4644 | - * |
|
| 4645 | - * @return Array the airline country list |
|
| 4646 | - * |
|
| 4647 | - */ |
|
| 4643 | + * Gets all number of flight over countries |
|
| 4644 | + * |
|
| 4645 | + * @return Array the airline country list |
|
| 4646 | + * |
|
| 4647 | + */ |
|
| 4648 | 4648 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4649 | 4649 | { |
| 4650 | 4650 | global $globalDBdriver; |
@@ -4666,15 +4666,15 @@ discard block |
||
| 4666 | 4666 | $SpotterLive = new SpotterLive(); |
| 4667 | 4667 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
| 4668 | 4668 | $filter_query .= ' over_country IS NOT NULL'; |
| 4669 | - if ($olderthanmonths > 0) { |
|
| 4669 | + if ($olderthanmonths > 0) { |
|
| 4670 | 4670 | if ($globalDBdriver == 'mysql') { |
| 4671 | 4671 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 4672 | 4672 | } else { |
| 4673 | 4673 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 4674 | 4674 | } |
| 4675 | 4675 | } |
| 4676 | - if ($sincedate != '') { |
|
| 4677 | - if ($globalDBdriver == 'mysql') { |
|
| 4676 | + if ($sincedate != '') { |
|
| 4677 | + if ($globalDBdriver == 'mysql') { |
|
| 4678 | 4678 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
| 4679 | 4679 | } else { |
| 4680 | 4680 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4704,11 +4704,11 @@ discard block |
||
| 4704 | 4704 | |
| 4705 | 4705 | |
| 4706 | 4706 | /** |
| 4707 | - * Gets all aircraft types that have flown over |
|
| 4708 | - * |
|
| 4709 | - * @return Array the aircraft list |
|
| 4710 | - * |
|
| 4711 | - */ |
|
| 4707 | + * Gets all aircraft types that have flown over |
|
| 4708 | + * |
|
| 4709 | + * @return Array the aircraft list |
|
| 4710 | + * |
|
| 4711 | + */ |
|
| 4712 | 4712 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
| 4713 | 4713 | { |
| 4714 | 4714 | global $globalDBdriver; |
@@ -4778,11 +4778,11 @@ discard block |
||
| 4778 | 4778 | } |
| 4779 | 4779 | |
| 4780 | 4780 | /** |
| 4781 | - * Gets all aircraft types that have flown over by airline |
|
| 4782 | - * |
|
| 4783 | - * @return Array the aircraft list |
|
| 4784 | - * |
|
| 4785 | - */ |
|
| 4781 | + * Gets all aircraft types that have flown over by airline |
|
| 4782 | + * |
|
| 4783 | + * @return Array the aircraft list |
|
| 4784 | + * |
|
| 4785 | + */ |
|
| 4786 | 4786 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '', $day = '') |
| 4787 | 4787 | { |
| 4788 | 4788 | global $globalDBdriver; |
@@ -4853,11 +4853,11 @@ discard block |
||
| 4853 | 4853 | } |
| 4854 | 4854 | |
| 4855 | 4855 | /** |
| 4856 | - * Gets all aircraft types that have flown over by months |
|
| 4857 | - * |
|
| 4858 | - * @return Array the aircraft list |
|
| 4859 | - * |
|
| 4860 | - */ |
|
| 4856 | + * Gets all aircraft types that have flown over by months |
|
| 4857 | + * |
|
| 4858 | + * @return Array the aircraft list |
|
| 4859 | + * |
|
| 4860 | + */ |
|
| 4861 | 4861 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 4862 | 4862 | { |
| 4863 | 4863 | global $globalDBdriver; |
@@ -4901,11 +4901,11 @@ discard block |
||
| 4901 | 4901 | |
| 4902 | 4902 | |
| 4903 | 4903 | /** |
| 4904 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4905 | - * |
|
| 4906 | - * @return Array the aircraft list |
|
| 4907 | - * |
|
| 4908 | - */ |
|
| 4904 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
| 4905 | + * |
|
| 4906 | + * @return Array the aircraft list |
|
| 4907 | + * |
|
| 4908 | + */ |
|
| 4909 | 4909 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
| 4910 | 4910 | { |
| 4911 | 4911 | $Image = new Image($this->db); |
@@ -4944,11 +4944,11 @@ discard block |
||
| 4944 | 4944 | |
| 4945 | 4945 | |
| 4946 | 4946 | /** |
| 4947 | - * Gets all aircraft types that have flown over by airline icao |
|
| 4948 | - * |
|
| 4949 | - * @return Array the aircraft list |
|
| 4950 | - * |
|
| 4951 | - */ |
|
| 4947 | + * Gets all aircraft types that have flown over by airline icao |
|
| 4948 | + * |
|
| 4949 | + * @return Array the aircraft list |
|
| 4950 | + * |
|
| 4951 | + */ |
|
| 4952 | 4952 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
| 4953 | 4953 | { |
| 4954 | 4954 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4977,11 +4977,11 @@ discard block |
||
| 4977 | 4977 | |
| 4978 | 4978 | |
| 4979 | 4979 | /** |
| 4980 | - * Gets all aircraft registration that have flown over by airline icao |
|
| 4981 | - * |
|
| 4982 | - * @return Array the aircraft list |
|
| 4983 | - * |
|
| 4984 | - */ |
|
| 4980 | + * Gets all aircraft registration that have flown over by airline icao |
|
| 4981 | + * |
|
| 4982 | + * @return Array the aircraft list |
|
| 4983 | + * |
|
| 4984 | + */ |
|
| 4985 | 4985 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
| 4986 | 4986 | { |
| 4987 | 4987 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5019,11 +5019,11 @@ discard block |
||
| 5019 | 5019 | |
| 5020 | 5020 | |
| 5021 | 5021 | /** |
| 5022 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 5023 | - * |
|
| 5024 | - * @return Array the aircraft list |
|
| 5025 | - * |
|
| 5026 | - */ |
|
| 5022 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
| 5023 | + * |
|
| 5024 | + * @return Array the aircraft list |
|
| 5025 | + * |
|
| 5026 | + */ |
|
| 5027 | 5027 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
| 5028 | 5028 | { |
| 5029 | 5029 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5051,11 +5051,11 @@ discard block |
||
| 5051 | 5051 | |
| 5052 | 5052 | |
| 5053 | 5053 | /** |
| 5054 | - * Gets all aircraft types that have flown over by airline icao |
|
| 5055 | - * |
|
| 5056 | - * @return Array the aircraft list |
|
| 5057 | - * |
|
| 5058 | - */ |
|
| 5054 | + * Gets all aircraft types that have flown over by airline icao |
|
| 5055 | + * |
|
| 5056 | + * @return Array the aircraft list |
|
| 5057 | + * |
|
| 5058 | + */ |
|
| 5059 | 5059 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
| 5060 | 5060 | { |
| 5061 | 5061 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5084,11 +5084,11 @@ discard block |
||
| 5084 | 5084 | |
| 5085 | 5085 | |
| 5086 | 5086 | /** |
| 5087 | - * Gets all aircraft registration that have flown over by airport icao |
|
| 5088 | - * |
|
| 5089 | - * @return Array the aircraft list |
|
| 5090 | - * |
|
| 5091 | - */ |
|
| 5087 | + * Gets all aircraft registration that have flown over by airport icao |
|
| 5088 | + * |
|
| 5089 | + * @return Array the aircraft list |
|
| 5090 | + * |
|
| 5091 | + */ |
|
| 5092 | 5092 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
| 5093 | 5093 | { |
| 5094 | 5094 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5125,11 +5125,11 @@ discard block |
||
| 5125 | 5125 | |
| 5126 | 5126 | |
| 5127 | 5127 | /** |
| 5128 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 5129 | - * |
|
| 5130 | - * @return Array the aircraft list |
|
| 5131 | - * |
|
| 5132 | - */ |
|
| 5128 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
| 5129 | + * |
|
| 5130 | + * @return Array the aircraft list |
|
| 5131 | + * |
|
| 5132 | + */ |
|
| 5133 | 5133 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
| 5134 | 5134 | { |
| 5135 | 5135 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5155,11 +5155,11 @@ discard block |
||
| 5155 | 5155 | } |
| 5156 | 5156 | |
| 5157 | 5157 | /** |
| 5158 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 5159 | - * |
|
| 5160 | - * @return Array the aircraft list |
|
| 5161 | - * |
|
| 5162 | - */ |
|
| 5158 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
| 5159 | + * |
|
| 5160 | + * @return Array the aircraft list |
|
| 5161 | + * |
|
| 5162 | + */ |
|
| 5163 | 5163 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 5164 | 5164 | { |
| 5165 | 5165 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5186,11 +5186,11 @@ discard block |
||
| 5186 | 5186 | |
| 5187 | 5187 | |
| 5188 | 5188 | /** |
| 5189 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 5190 | - * |
|
| 5191 | - * @return Array the aircraft list |
|
| 5192 | - * |
|
| 5193 | - */ |
|
| 5189 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
| 5190 | + * |
|
| 5191 | + * @return Array the aircraft list |
|
| 5192 | + * |
|
| 5193 | + */ |
|
| 5194 | 5194 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
| 5195 | 5195 | { |
| 5196 | 5196 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5226,11 +5226,11 @@ discard block |
||
| 5226 | 5226 | } |
| 5227 | 5227 | |
| 5228 | 5228 | /** |
| 5229 | - * Gets all aircraft types that have flown over by date |
|
| 5230 | - * |
|
| 5231 | - * @return Array the aircraft list |
|
| 5232 | - * |
|
| 5233 | - */ |
|
| 5229 | + * Gets all aircraft types that have flown over by date |
|
| 5230 | + * |
|
| 5231 | + * @return Array the aircraft list |
|
| 5232 | + * |
|
| 5233 | + */ |
|
| 5234 | 5234 | public function countAllAircraftTypesByDate($date,$filters = array()) |
| 5235 | 5235 | { |
| 5236 | 5236 | global $globalTimezone, $globalDBdriver; |
@@ -5272,11 +5272,11 @@ discard block |
||
| 5272 | 5272 | |
| 5273 | 5273 | |
| 5274 | 5274 | /** |
| 5275 | - * Gets all aircraft registration that have flown over by date |
|
| 5276 | - * |
|
| 5277 | - * @return Array the aircraft list |
|
| 5278 | - * |
|
| 5279 | - */ |
|
| 5275 | + * Gets all aircraft registration that have flown over by date |
|
| 5276 | + * |
|
| 5277 | + * @return Array the aircraft list |
|
| 5278 | + * |
|
| 5279 | + */ |
|
| 5280 | 5280 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
| 5281 | 5281 | { |
| 5282 | 5282 | global $globalTimezone, $globalDBdriver; |
@@ -5327,11 +5327,11 @@ discard block |
||
| 5327 | 5327 | |
| 5328 | 5328 | |
| 5329 | 5329 | /** |
| 5330 | - * Gets all aircraft manufacturer that have flown over by date |
|
| 5331 | - * |
|
| 5332 | - * @return Array the aircraft manufacturer list |
|
| 5333 | - * |
|
| 5334 | - */ |
|
| 5330 | + * Gets all aircraft manufacturer that have flown over by date |
|
| 5331 | + * |
|
| 5332 | + * @return Array the aircraft manufacturer list |
|
| 5333 | + * |
|
| 5334 | + */ |
|
| 5335 | 5335 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
| 5336 | 5336 | { |
| 5337 | 5337 | global $globalTimezone, $globalDBdriver; |
@@ -5373,11 +5373,11 @@ discard block |
||
| 5373 | 5373 | |
| 5374 | 5374 | |
| 5375 | 5375 | /** |
| 5376 | - * Gets all aircraft types that have flown over by ident/callsign |
|
| 5377 | - * |
|
| 5378 | - * @return Array the aircraft list |
|
| 5379 | - * |
|
| 5380 | - */ |
|
| 5376 | + * Gets all aircraft types that have flown over by ident/callsign |
|
| 5377 | + * |
|
| 5378 | + * @return Array the aircraft list |
|
| 5379 | + * |
|
| 5380 | + */ |
|
| 5381 | 5381 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
| 5382 | 5382 | { |
| 5383 | 5383 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5406,11 +5406,11 @@ discard block |
||
| 5406 | 5406 | |
| 5407 | 5407 | |
| 5408 | 5408 | /** |
| 5409 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5410 | - * |
|
| 5411 | - * @return Array the aircraft list |
|
| 5412 | - * |
|
| 5413 | - */ |
|
| 5409 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
| 5410 | + * |
|
| 5411 | + * @return Array the aircraft list |
|
| 5412 | + * |
|
| 5413 | + */ |
|
| 5414 | 5414 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
| 5415 | 5415 | { |
| 5416 | 5416 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5450,11 +5450,11 @@ discard block |
||
| 5450 | 5450 | |
| 5451 | 5451 | |
| 5452 | 5452 | /** |
| 5453 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5454 | - * |
|
| 5455 | - * @return Array the aircraft manufacturer list |
|
| 5456 | - * |
|
| 5457 | - */ |
|
| 5453 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
| 5454 | + * |
|
| 5455 | + * @return Array the aircraft manufacturer list |
|
| 5456 | + * |
|
| 5457 | + */ |
|
| 5458 | 5458 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
| 5459 | 5459 | { |
| 5460 | 5460 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5480,11 +5480,11 @@ discard block |
||
| 5480 | 5480 | |
| 5481 | 5481 | |
| 5482 | 5482 | /** |
| 5483 | - * Gets all aircraft types that have flown over by route |
|
| 5484 | - * |
|
| 5485 | - * @return Array the aircraft list |
|
| 5486 | - * |
|
| 5487 | - */ |
|
| 5483 | + * Gets all aircraft types that have flown over by route |
|
| 5484 | + * |
|
| 5485 | + * @return Array the aircraft list |
|
| 5486 | + * |
|
| 5487 | + */ |
|
| 5488 | 5488 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5489 | 5489 | { |
| 5490 | 5490 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5513,11 +5513,11 @@ discard block |
||
| 5513 | 5513 | } |
| 5514 | 5514 | |
| 5515 | 5515 | /** |
| 5516 | - * Gets all aircraft registration that have flown over by route |
|
| 5517 | - * |
|
| 5518 | - * @return Array the aircraft list |
|
| 5519 | - * |
|
| 5520 | - */ |
|
| 5516 | + * Gets all aircraft registration that have flown over by route |
|
| 5517 | + * |
|
| 5518 | + * @return Array the aircraft list |
|
| 5519 | + * |
|
| 5520 | + */ |
|
| 5521 | 5521 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5522 | 5522 | { |
| 5523 | 5523 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5559,11 +5559,11 @@ discard block |
||
| 5559 | 5559 | |
| 5560 | 5560 | |
| 5561 | 5561 | /** |
| 5562 | - * Gets all aircraft manufacturer that have flown over by route |
|
| 5563 | - * |
|
| 5564 | - * @return Array the aircraft manufacturer list |
|
| 5565 | - * |
|
| 5566 | - */ |
|
| 5562 | + * Gets all aircraft manufacturer that have flown over by route |
|
| 5563 | + * |
|
| 5564 | + * @return Array the aircraft manufacturer list |
|
| 5565 | + * |
|
| 5566 | + */ |
|
| 5567 | 5567 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
| 5568 | 5568 | { |
| 5569 | 5569 | $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 country |
|
| 5601 | - * |
|
| 5602 | - * @return Array the aircraft list |
|
| 5603 | - * |
|
| 5604 | - */ |
|
| 5600 | + * Gets all aircraft types that have flown over by country |
|
| 5601 | + * |
|
| 5602 | + * @return Array the aircraft list |
|
| 5603 | + * |
|
| 5604 | + */ |
|
| 5605 | 5605 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
| 5606 | 5606 | { |
| 5607 | 5607 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5632,11 +5632,11 @@ discard block |
||
| 5632 | 5632 | |
| 5633 | 5633 | |
| 5634 | 5634 | /** |
| 5635 | - * Gets all aircraft registration that have flown over by country |
|
| 5636 | - * |
|
| 5637 | - * @return Array the aircraft list |
|
| 5638 | - * |
|
| 5639 | - */ |
|
| 5635 | + * Gets all aircraft registration that have flown over by country |
|
| 5636 | + * |
|
| 5637 | + * @return Array the aircraft list |
|
| 5638 | + * |
|
| 5639 | + */ |
|
| 5640 | 5640 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
| 5641 | 5641 | { |
| 5642 | 5642 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5676,11 +5676,11 @@ discard block |
||
| 5676 | 5676 | |
| 5677 | 5677 | |
| 5678 | 5678 | /** |
| 5679 | - * Gets all aircraft manufacturer that have flown over by country |
|
| 5680 | - * |
|
| 5681 | - * @return Array the aircraft manufacturer list |
|
| 5682 | - * |
|
| 5683 | - */ |
|
| 5679 | + * Gets all aircraft manufacturer that have flown over by country |
|
| 5680 | + * |
|
| 5681 | + * @return Array the aircraft manufacturer list |
|
| 5682 | + * |
|
| 5683 | + */ |
|
| 5684 | 5684 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
| 5685 | 5685 | { |
| 5686 | 5686 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5711,18 +5711,18 @@ discard block |
||
| 5711 | 5711 | |
| 5712 | 5712 | |
| 5713 | 5713 | /** |
| 5714 | - * Gets all aircraft manufacturers that have flown over |
|
| 5715 | - * |
|
| 5716 | - * @return Array the aircraft list |
|
| 5717 | - * |
|
| 5718 | - */ |
|
| 5714 | + * Gets all aircraft manufacturers that have flown over |
|
| 5715 | + * |
|
| 5716 | + * @return Array the aircraft list |
|
| 5717 | + * |
|
| 5718 | + */ |
|
| 5719 | 5719 | public function countAllAircraftManufacturers($filters = array(),$year = '',$month = '',$day = '') |
| 5720 | 5720 | { |
| 5721 | 5721 | global $globalDBdriver; |
| 5722 | 5722 | $filter_query = $this->getFilter($filters,true,true); |
| 5723 | 5723 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
| 5724 | 5724 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
| 5725 | - $query_values = array(); |
|
| 5725 | + $query_values = array(); |
|
| 5726 | 5726 | if ($year != '') { |
| 5727 | 5727 | if ($globalDBdriver == 'mysql') { |
| 5728 | 5728 | $query .= " AND YEAR(spotter_output.date) = :year"; |
@@ -5775,11 +5775,11 @@ discard block |
||
| 5775 | 5775 | |
| 5776 | 5776 | |
| 5777 | 5777 | /** |
| 5778 | - * Gets all aircraft registrations that have flown over |
|
| 5779 | - * |
|
| 5780 | - * @return Array the aircraft list |
|
| 5781 | - * |
|
| 5782 | - */ |
|
| 5778 | + * Gets all aircraft registrations that have flown over |
|
| 5779 | + * |
|
| 5780 | + * @return Array the aircraft list |
|
| 5781 | + * |
|
| 5782 | + */ |
|
| 5783 | 5783 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
| 5784 | 5784 | { |
| 5785 | 5785 | global $globalDBdriver; |
@@ -5787,15 +5787,15 @@ discard block |
||
| 5787 | 5787 | $filter_query = $this->getFilter($filters,true,true); |
| 5788 | 5788 | $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 |
| 5789 | 5789 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
| 5790 | - if ($olderthanmonths > 0) { |
|
| 5791 | - if ($globalDBdriver == 'mysql') { |
|
| 5790 | + if ($olderthanmonths > 0) { |
|
| 5791 | + if ($globalDBdriver == 'mysql') { |
|
| 5792 | 5792 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5793 | 5793 | } else { |
| 5794 | 5794 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5795 | 5795 | } |
| 5796 | 5796 | } |
| 5797 | - if ($sincedate != '') { |
|
| 5798 | - if ($globalDBdriver == 'mysql') { |
|
| 5797 | + if ($sincedate != '') { |
|
| 5798 | + if ($globalDBdriver == 'mysql') { |
|
| 5799 | 5799 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5800 | 5800 | } else { |
| 5801 | 5801 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5860,11 +5860,11 @@ discard block |
||
| 5860 | 5860 | |
| 5861 | 5861 | |
| 5862 | 5862 | /** |
| 5863 | - * Gets all aircraft registrations that have flown over |
|
| 5864 | - * |
|
| 5865 | - * @return Array the aircraft list |
|
| 5866 | - * |
|
| 5867 | - */ |
|
| 5863 | + * Gets all aircraft registrations that have flown over |
|
| 5864 | + * |
|
| 5865 | + * @return Array the aircraft list |
|
| 5866 | + * |
|
| 5867 | + */ |
|
| 5868 | 5868 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 5869 | 5869 | { |
| 5870 | 5870 | global $globalDBdriver; |
@@ -5872,15 +5872,15 @@ discard block |
||
| 5872 | 5872 | $Image = new Image($this->db); |
| 5873 | 5873 | $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 |
| 5874 | 5874 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
| 5875 | - if ($olderthanmonths > 0) { |
|
| 5876 | - if ($globalDBdriver == 'mysql') { |
|
| 5875 | + if ($olderthanmonths > 0) { |
|
| 5876 | + if ($globalDBdriver == 'mysql') { |
|
| 5877 | 5877 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5878 | 5878 | } else { |
| 5879 | 5879 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 5880 | 5880 | } |
| 5881 | 5881 | } |
| 5882 | - if ($sincedate != '') { |
|
| 5883 | - if ($globalDBdriver == 'mysql') { |
|
| 5882 | + if ($sincedate != '') { |
|
| 5883 | + if ($globalDBdriver == 'mysql') { |
|
| 5884 | 5884 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 5885 | 5885 | } else { |
| 5886 | 5886 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5889,7 +5889,7 @@ discard block |
||
| 5889 | 5889 | |
| 5890 | 5890 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
| 5891 | 5891 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
| 5892 | - $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"; |
|
| 5892 | + $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"; |
|
| 5893 | 5893 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5894 | 5894 | |
| 5895 | 5895 | $sth = $this->db->prepare($query); |
@@ -5921,26 +5921,26 @@ discard block |
||
| 5921 | 5921 | |
| 5922 | 5922 | |
| 5923 | 5923 | /** |
| 5924 | - * Gets all departure airports of the airplanes that have flown over |
|
| 5925 | - * |
|
| 5926 | - * @return Array the airport list |
|
| 5927 | - * |
|
| 5928 | - */ |
|
| 5924 | + * Gets all departure airports of the airplanes that have flown over |
|
| 5925 | + * |
|
| 5926 | + * @return Array the airport list |
|
| 5927 | + * |
|
| 5928 | + */ |
|
| 5929 | 5929 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
| 5930 | 5930 | { |
| 5931 | 5931 | global $globalDBdriver; |
| 5932 | 5932 | $filter_query = $this->getFilter($filters,true,true); |
| 5933 | 5933 | $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 |
| 5934 | 5934 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
| 5935 | - if ($olderthanmonths > 0) { |
|
| 5936 | - if ($globalDBdriver == 'mysql') { |
|
| 5935 | + if ($olderthanmonths > 0) { |
|
| 5936 | + if ($globalDBdriver == 'mysql') { |
|
| 5937 | 5937 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 5938 | 5938 | } else { |
| 5939 | 5939 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 5940 | 5940 | } |
| 5941 | - } |
|
| 5942 | - if ($sincedate != '') { |
|
| 5943 | - if ($globalDBdriver == 'mysql') { |
|
| 5941 | + } |
|
| 5942 | + if ($sincedate != '') { |
|
| 5943 | + if ($globalDBdriver == 'mysql') { |
|
| 5944 | 5944 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 5945 | 5945 | } else { |
| 5946 | 5946 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5974,7 +5974,7 @@ discard block |
||
| 5974 | 5974 | $query_values = array_merge($query_values,array(':day' => $day)); |
| 5975 | 5975 | } |
| 5976 | 5976 | } |
| 5977 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5977 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
| 5978 | 5978 | ORDER BY airport_departure_icao_count DESC"; |
| 5979 | 5979 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 5980 | 5980 | |
@@ -5997,35 +5997,35 @@ discard block |
||
| 5997 | 5997 | } |
| 5998 | 5998 | |
| 5999 | 5999 | /** |
| 6000 | - * Gets all departure airports of the airplanes that have flown over |
|
| 6001 | - * |
|
| 6002 | - * @return Array the airport list |
|
| 6003 | - * |
|
| 6004 | - */ |
|
| 6000 | + * Gets all departure airports of the airplanes that have flown over |
|
| 6001 | + * |
|
| 6002 | + * @return Array the airport list |
|
| 6003 | + * |
|
| 6004 | + */ |
|
| 6005 | 6005 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 6006 | 6006 | { |
| 6007 | 6007 | global $globalDBdriver; |
| 6008 | 6008 | $filter_query = $this->getFilter($filters,true,true); |
| 6009 | 6009 | $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 |
| 6010 | 6010 | 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 <> '' "; |
| 6011 | - if ($olderthanmonths > 0) { |
|
| 6012 | - if ($globalDBdriver == 'mysql') { |
|
| 6011 | + if ($olderthanmonths > 0) { |
|
| 6012 | + if ($globalDBdriver == 'mysql') { |
|
| 6013 | 6013 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6014 | 6014 | } else { |
| 6015 | 6015 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6016 | 6016 | } |
| 6017 | - } |
|
| 6018 | - if ($sincedate != '') { |
|
| 6019 | - if ($globalDBdriver == 'mysql') { |
|
| 6017 | + } |
|
| 6018 | + if ($sincedate != '') { |
|
| 6019 | + if ($globalDBdriver == 'mysql') { |
|
| 6020 | 6020 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6021 | 6021 | } else { |
| 6022 | 6022 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6023 | 6023 | } |
| 6024 | 6024 | } |
| 6025 | 6025 | |
| 6026 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6027 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6028 | - $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 |
|
| 6026 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6027 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6028 | + $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 |
|
| 6029 | 6029 | ORDER BY airport_departure_icao_count DESC"; |
| 6030 | 6030 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 6031 | 6031 | |
@@ -6050,26 +6050,26 @@ discard block |
||
| 6050 | 6050 | } |
| 6051 | 6051 | |
| 6052 | 6052 | /** |
| 6053 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 6054 | - * |
|
| 6055 | - * @return Array the airport list |
|
| 6056 | - * |
|
| 6057 | - */ |
|
| 6053 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 6054 | + * |
|
| 6055 | + * @return Array the airport list |
|
| 6056 | + * |
|
| 6057 | + */ |
|
| 6058 | 6058 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
| 6059 | 6059 | { |
| 6060 | 6060 | global $globalDBdriver; |
| 6061 | 6061 | $filter_query = $this->getFilter($filters,true,true); |
| 6062 | 6062 | $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 |
| 6063 | 6063 | 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"; |
| 6064 | - if ($olderthanmonths > 0) { |
|
| 6065 | - if ($globalDBdriver == 'mysql') { |
|
| 6064 | + if ($olderthanmonths > 0) { |
|
| 6065 | + if ($globalDBdriver == 'mysql') { |
|
| 6066 | 6066 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6067 | 6067 | } else { |
| 6068 | 6068 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6069 | 6069 | } |
| 6070 | - } |
|
| 6071 | - if ($sincedate != '') { |
|
| 6072 | - if ($globalDBdriver == 'mysql') { |
|
| 6070 | + } |
|
| 6071 | + if ($sincedate != '') { |
|
| 6072 | + if ($globalDBdriver == 'mysql') { |
|
| 6073 | 6073 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6074 | 6074 | } else { |
| 6075 | 6075 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6103,10 +6103,10 @@ discard block |
||
| 6103 | 6103 | $query_values = array_merge($query_values,array(':day' => $day)); |
| 6104 | 6104 | } |
| 6105 | 6105 | } |
| 6106 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 6106 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 6107 | 6107 | ORDER BY airport_departure_icao_count DESC"; |
| 6108 | 6108 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 6109 | - //echo $query; |
|
| 6109 | + //echo $query; |
|
| 6110 | 6110 | $sth = $this->db->prepare($query); |
| 6111 | 6111 | $sth->execute($query_values); |
| 6112 | 6112 | |
@@ -6127,35 +6127,35 @@ discard block |
||
| 6127 | 6127 | } |
| 6128 | 6128 | |
| 6129 | 6129 | /** |
| 6130 | - * Gets all detected departure airports of the airplanes that have flown over |
|
| 6131 | - * |
|
| 6132 | - * @return Array the airport list |
|
| 6133 | - * |
|
| 6134 | - */ |
|
| 6130 | + * Gets all detected departure airports of the airplanes that have flown over |
|
| 6131 | + * |
|
| 6132 | + * @return Array the airport list |
|
| 6133 | + * |
|
| 6134 | + */ |
|
| 6135 | 6135 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
| 6136 | 6136 | { |
| 6137 | 6137 | global $globalDBdriver; |
| 6138 | 6138 | $filter_query = $this->getFilter($filters,true,true); |
| 6139 | 6139 | $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 |
| 6140 | 6140 | 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 "; |
| 6141 | - if ($olderthanmonths > 0) { |
|
| 6142 | - if ($globalDBdriver == 'mysql') { |
|
| 6141 | + if ($olderthanmonths > 0) { |
|
| 6142 | + if ($globalDBdriver == 'mysql') { |
|
| 6143 | 6143 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6144 | 6144 | } else { |
| 6145 | 6145 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6146 | 6146 | } |
| 6147 | - } |
|
| 6148 | - if ($sincedate != '') { |
|
| 6149 | - if ($globalDBdriver == 'mysql') { |
|
| 6147 | + } |
|
| 6148 | + if ($sincedate != '') { |
|
| 6149 | + if ($globalDBdriver == 'mysql') { |
|
| 6150 | 6150 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6151 | 6151 | } else { |
| 6152 | 6152 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
| 6153 | 6153 | } |
| 6154 | 6154 | } |
| 6155 | 6155 | |
| 6156 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6157 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6158 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 6156 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6157 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6158 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
| 6159 | 6159 | ORDER BY airport_departure_icao_count DESC"; |
| 6160 | 6160 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
| 6161 | 6161 | |
@@ -6180,11 +6180,11 @@ discard block |
||
| 6180 | 6180 | } |
| 6181 | 6181 | |
| 6182 | 6182 | /** |
| 6183 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 6184 | - * |
|
| 6185 | - * @return Array the airport list |
|
| 6186 | - * |
|
| 6187 | - */ |
|
| 6183 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
| 6184 | + * |
|
| 6185 | + * @return Array the airport list |
|
| 6186 | + * |
|
| 6187 | + */ |
|
| 6188 | 6188 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
| 6189 | 6189 | { |
| 6190 | 6190 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6218,11 +6218,11 @@ discard block |
||
| 6218 | 6218 | |
| 6219 | 6219 | |
| 6220 | 6220 | /** |
| 6221 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 6222 | - * |
|
| 6223 | - * @return Array the airport list |
|
| 6224 | - * |
|
| 6225 | - */ |
|
| 6221 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
| 6222 | + * |
|
| 6223 | + * @return Array the airport list |
|
| 6224 | + * |
|
| 6225 | + */ |
|
| 6226 | 6226 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
| 6227 | 6227 | { |
| 6228 | 6228 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6253,11 +6253,11 @@ discard block |
||
| 6253 | 6253 | |
| 6254 | 6254 | |
| 6255 | 6255 | /** |
| 6256 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 6257 | - * |
|
| 6258 | - * @return Array the airport list |
|
| 6259 | - * |
|
| 6260 | - */ |
|
| 6256 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
| 6257 | + * |
|
| 6258 | + * @return Array the airport list |
|
| 6259 | + * |
|
| 6260 | + */ |
|
| 6261 | 6261 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
| 6262 | 6262 | { |
| 6263 | 6263 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6290,11 +6290,11 @@ discard block |
||
| 6290 | 6290 | |
| 6291 | 6291 | |
| 6292 | 6292 | /** |
| 6293 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6294 | - * |
|
| 6295 | - * @return Array the airport list |
|
| 6296 | - * |
|
| 6297 | - */ |
|
| 6293 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6294 | + * |
|
| 6295 | + * @return Array the airport list |
|
| 6296 | + * |
|
| 6297 | + */ |
|
| 6298 | 6298 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 6299 | 6299 | { |
| 6300 | 6300 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6324,11 +6324,11 @@ discard block |
||
| 6324 | 6324 | |
| 6325 | 6325 | |
| 6326 | 6326 | /** |
| 6327 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 6328 | - * |
|
| 6329 | - * @return Array the airport list |
|
| 6330 | - * |
|
| 6331 | - */ |
|
| 6327 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
| 6328 | + * |
|
| 6329 | + * @return Array the airport list |
|
| 6330 | + * |
|
| 6331 | + */ |
|
| 6332 | 6332 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
| 6333 | 6333 | { |
| 6334 | 6334 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6361,11 +6361,11 @@ discard block |
||
| 6361 | 6361 | |
| 6362 | 6362 | |
| 6363 | 6363 | /** |
| 6364 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6365 | - * |
|
| 6366 | - * @return Array the airport list |
|
| 6367 | - * |
|
| 6368 | - */ |
|
| 6364 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 6365 | + * |
|
| 6366 | + * @return Array the airport list |
|
| 6367 | + * |
|
| 6368 | + */ |
|
| 6369 | 6369 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
| 6370 | 6370 | { |
| 6371 | 6371 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6395,11 +6395,11 @@ discard block |
||
| 6395 | 6395 | |
| 6396 | 6396 | |
| 6397 | 6397 | /** |
| 6398 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6399 | - * |
|
| 6400 | - * @return Array the airport list |
|
| 6401 | - * |
|
| 6402 | - */ |
|
| 6398 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
| 6399 | + * |
|
| 6400 | + * @return Array the airport list |
|
| 6401 | + * |
|
| 6402 | + */ |
|
| 6403 | 6403 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
| 6404 | 6404 | { |
| 6405 | 6405 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6432,11 +6432,11 @@ discard block |
||
| 6432 | 6432 | |
| 6433 | 6433 | |
| 6434 | 6434 | /** |
| 6435 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6436 | - * |
|
| 6437 | - * @return Array the airport list |
|
| 6438 | - * |
|
| 6439 | - */ |
|
| 6435 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
| 6436 | + * |
|
| 6437 | + * @return Array the airport list |
|
| 6438 | + * |
|
| 6439 | + */ |
|
| 6440 | 6440 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
| 6441 | 6441 | { |
| 6442 | 6442 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6467,11 +6467,11 @@ discard block |
||
| 6467 | 6467 | |
| 6468 | 6468 | |
| 6469 | 6469 | /** |
| 6470 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6471 | - * |
|
| 6472 | - * @return Array the airport list |
|
| 6473 | - * |
|
| 6474 | - */ |
|
| 6470 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6471 | + * |
|
| 6472 | + * @return Array the airport list |
|
| 6473 | + * |
|
| 6474 | + */ |
|
| 6475 | 6475 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6476 | 6476 | { |
| 6477 | 6477 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6504,11 +6504,11 @@ discard block |
||
| 6504 | 6504 | |
| 6505 | 6505 | |
| 6506 | 6506 | /** |
| 6507 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6508 | - * |
|
| 6509 | - * @return Array the airport list |
|
| 6510 | - * |
|
| 6511 | - */ |
|
| 6507 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
| 6508 | + * |
|
| 6509 | + * @return Array the airport list |
|
| 6510 | + * |
|
| 6511 | + */ |
|
| 6512 | 6512 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 6513 | 6513 | { |
| 6514 | 6514 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6538,11 +6538,11 @@ discard block |
||
| 6538 | 6538 | |
| 6539 | 6539 | |
| 6540 | 6540 | /** |
| 6541 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6542 | - * |
|
| 6543 | - * @return Array the airport list |
|
| 6544 | - * |
|
| 6545 | - */ |
|
| 6541 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
| 6542 | + * |
|
| 6543 | + * @return Array the airport list |
|
| 6544 | + * |
|
| 6545 | + */ |
|
| 6546 | 6546 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
| 6547 | 6547 | { |
| 6548 | 6548 | global $globalTimezone, $globalDBdriver; |
@@ -6588,11 +6588,11 @@ discard block |
||
| 6588 | 6588 | |
| 6589 | 6589 | |
| 6590 | 6590 | /** |
| 6591 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6592 | - * |
|
| 6593 | - * @return Array the airport list |
|
| 6594 | - * |
|
| 6595 | - */ |
|
| 6591 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
| 6592 | + * |
|
| 6593 | + * @return Array the airport list |
|
| 6594 | + * |
|
| 6595 | + */ |
|
| 6596 | 6596 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
| 6597 | 6597 | { |
| 6598 | 6598 | global $globalTimezone, $globalDBdriver; |
@@ -6635,11 +6635,11 @@ discard block |
||
| 6635 | 6635 | |
| 6636 | 6636 | |
| 6637 | 6637 | /** |
| 6638 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6639 | - * |
|
| 6640 | - * @return Array the airport list |
|
| 6641 | - * |
|
| 6642 | - */ |
|
| 6638 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
| 6639 | + * |
|
| 6640 | + * @return Array the airport list |
|
| 6641 | + * |
|
| 6642 | + */ |
|
| 6643 | 6643 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
| 6644 | 6644 | { |
| 6645 | 6645 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6673,11 +6673,11 @@ discard block |
||
| 6673 | 6673 | |
| 6674 | 6674 | |
| 6675 | 6675 | /** |
| 6676 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6677 | - * |
|
| 6678 | - * @return Array the airport list |
|
| 6679 | - * |
|
| 6680 | - */ |
|
| 6676 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 6677 | + * |
|
| 6678 | + * @return Array the airport list |
|
| 6679 | + * |
|
| 6680 | + */ |
|
| 6681 | 6681 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
| 6682 | 6682 | { |
| 6683 | 6683 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6708,11 +6708,11 @@ discard block |
||
| 6708 | 6708 | |
| 6709 | 6709 | |
| 6710 | 6710 | /** |
| 6711 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6712 | - * |
|
| 6713 | - * @return Array the airport list |
|
| 6714 | - * |
|
| 6715 | - */ |
|
| 6711 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
| 6712 | + * |
|
| 6713 | + * @return Array the airport list |
|
| 6714 | + * |
|
| 6715 | + */ |
|
| 6716 | 6716 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
| 6717 | 6717 | { |
| 6718 | 6718 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6746,11 +6746,11 @@ discard block |
||
| 6746 | 6746 | |
| 6747 | 6747 | |
| 6748 | 6748 | /** |
| 6749 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6750 | - * |
|
| 6751 | - * @return Array the airport list |
|
| 6752 | - * |
|
| 6753 | - */ |
|
| 6749 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 6750 | + * |
|
| 6751 | + * @return Array the airport list |
|
| 6752 | + * |
|
| 6753 | + */ |
|
| 6754 | 6754 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
| 6755 | 6755 | { |
| 6756 | 6756 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6780,31 +6780,31 @@ discard block |
||
| 6780 | 6780 | |
| 6781 | 6781 | |
| 6782 | 6782 | /** |
| 6783 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6784 | - * |
|
| 6785 | - * @param Boolean $limit Limit result to 10 or not |
|
| 6786 | - * @param Integer $olderthanmonths Only show result older than x months |
|
| 6787 | - * @param String $sincedate Only show result since x date |
|
| 6788 | - * @param Boolean $icaoaskey Show result by ICAO |
|
| 6789 | - * @param Array $filters Filter used here |
|
| 6790 | - * @return Array the airport list |
|
| 6791 | - * |
|
| 6792 | - */ |
|
| 6783 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6784 | + * |
|
| 6785 | + * @param Boolean $limit Limit result to 10 or not |
|
| 6786 | + * @param Integer $olderthanmonths Only show result older than x months |
|
| 6787 | + * @param String $sincedate Only show result since x date |
|
| 6788 | + * @param Boolean $icaoaskey Show result by ICAO |
|
| 6789 | + * @param Array $filters Filter used here |
|
| 6790 | + * @return Array the airport list |
|
| 6791 | + * |
|
| 6792 | + */ |
|
| 6793 | 6793 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
| 6794 | 6794 | { |
| 6795 | 6795 | global $globalDBdriver; |
| 6796 | 6796 | $filter_query = $this->getFilter($filters,true,true); |
| 6797 | 6797 | $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 |
| 6798 | 6798 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
| 6799 | - if ($olderthanmonths > 0) { |
|
| 6800 | - if ($globalDBdriver == 'mysql') { |
|
| 6799 | + if ($olderthanmonths > 0) { |
|
| 6800 | + if ($globalDBdriver == 'mysql') { |
|
| 6801 | 6801 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6802 | 6802 | } else { |
| 6803 | 6803 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6804 | 6804 | } |
| 6805 | 6805 | } |
| 6806 | - if ($sincedate != '') { |
|
| 6807 | - if ($globalDBdriver == 'mysql') { |
|
| 6806 | + if ($sincedate != '') { |
|
| 6807 | + if ($globalDBdriver == 'mysql') { |
|
| 6808 | 6808 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6809 | 6809 | } else { |
| 6810 | 6810 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6838,7 +6838,7 @@ discard block |
||
| 6838 | 6838 | $query_values = array_merge($query_values,array(':day' => $day)); |
| 6839 | 6839 | } |
| 6840 | 6840 | } |
| 6841 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6841 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
| 6842 | 6842 | ORDER BY airport_arrival_icao_count DESC"; |
| 6843 | 6843 | if ($limit) $query .= " LIMIT 10"; |
| 6844 | 6844 | |
@@ -6867,35 +6867,35 @@ discard block |
||
| 6867 | 6867 | } |
| 6868 | 6868 | |
| 6869 | 6869 | /** |
| 6870 | - * Gets all arrival airports of the airplanes that have flown over |
|
| 6871 | - * |
|
| 6872 | - * @return Array the airport list |
|
| 6873 | - * |
|
| 6874 | - */ |
|
| 6870 | + * Gets all arrival airports of the airplanes that have flown over |
|
| 6871 | + * |
|
| 6872 | + * @return Array the airport list |
|
| 6873 | + * |
|
| 6874 | + */ |
|
| 6875 | 6875 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
| 6876 | 6876 | { |
| 6877 | 6877 | global $globalDBdriver; |
| 6878 | 6878 | $filter_query = $this->getFilter($filters,true,true); |
| 6879 | 6879 | $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 |
| 6880 | 6880 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> '' "; |
| 6881 | - if ($olderthanmonths > 0) { |
|
| 6882 | - if ($globalDBdriver == 'mysql') { |
|
| 6881 | + if ($olderthanmonths > 0) { |
|
| 6882 | + if ($globalDBdriver == 'mysql') { |
|
| 6883 | 6883 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 6884 | 6884 | } else { |
| 6885 | 6885 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 6886 | 6886 | } |
| 6887 | 6887 | } |
| 6888 | - if ($sincedate != '') { |
|
| 6889 | - if ($globalDBdriver == 'mysql') { |
|
| 6888 | + if ($sincedate != '') { |
|
| 6889 | + if ($globalDBdriver == 'mysql') { |
|
| 6890 | 6890 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 6891 | 6891 | } else { |
| 6892 | 6892 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 6893 | 6893 | } |
| 6894 | 6894 | } |
| 6895 | 6895 | |
| 6896 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6897 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6898 | - $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 |
|
| 6896 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 6897 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 6898 | + $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 |
|
| 6899 | 6899 | ORDER BY airport_arrival_icao_count DESC"; |
| 6900 | 6900 | if ($limit) $query .= " LIMIT 10"; |
| 6901 | 6901 | |
@@ -6926,26 +6926,26 @@ discard block |
||
| 6926 | 6926 | |
| 6927 | 6927 | |
| 6928 | 6928 | /** |
| 6929 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6930 | - * |
|
| 6931 | - * @return Array the airport list |
|
| 6932 | - * |
|
| 6933 | - */ |
|
| 6929 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 6930 | + * |
|
| 6931 | + * @return Array the airport list |
|
| 6932 | + * |
|
| 6933 | + */ |
|
| 6934 | 6934 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
| 6935 | 6935 | { |
| 6936 | 6936 | global $globalDBdriver; |
| 6937 | 6937 | $filter_query = $this->getFilter($filters,true,true); |
| 6938 | 6938 | $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 |
| 6939 | 6939 | 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"; |
| 6940 | - if ($olderthanmonths > 0) { |
|
| 6941 | - if ($globalDBdriver == 'mysql') { |
|
| 6940 | + if ($olderthanmonths > 0) { |
|
| 6941 | + if ($globalDBdriver == 'mysql') { |
|
| 6942 | 6942 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
| 6943 | 6943 | } else { |
| 6944 | 6944 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
| 6945 | 6945 | } |
| 6946 | 6946 | } |
| 6947 | - if ($sincedate != '') { |
|
| 6948 | - if ($globalDBdriver == 'mysql') { |
|
| 6947 | + if ($sincedate != '') { |
|
| 6948 | + if ($globalDBdriver == 'mysql') { |
|
| 6949 | 6949 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
| 6950 | 6950 | } else { |
| 6951 | 6951 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6979,7 +6979,7 @@ discard block |
||
| 6979 | 6979 | $query_values = array_merge($query_values,array(':day' => $day)); |
| 6980 | 6980 | } |
| 6981 | 6981 | } |
| 6982 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6982 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 6983 | 6983 | ORDER BY airport_arrival_icao_count DESC"; |
| 6984 | 6984 | if ($limit) $query .= " LIMIT 10"; |
| 6985 | 6985 | |
@@ -7007,35 +7007,35 @@ discard block |
||
| 7007 | 7007 | } |
| 7008 | 7008 | |
| 7009 | 7009 | /** |
| 7010 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
| 7011 | - * |
|
| 7012 | - * @return Array the airport list |
|
| 7013 | - * |
|
| 7014 | - */ |
|
| 7010 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
| 7011 | + * |
|
| 7012 | + * @return Array the airport list |
|
| 7013 | + * |
|
| 7014 | + */ |
|
| 7015 | 7015 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
| 7016 | 7016 | { |
| 7017 | 7017 | global $globalDBdriver; |
| 7018 | 7018 | $filter_query = $this->getFilter($filters,true,true); |
| 7019 | 7019 | $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 |
| 7020 | 7020 | 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 "; |
| 7021 | - if ($olderthanmonths > 0) { |
|
| 7022 | - if ($globalDBdriver == 'mysql') { |
|
| 7021 | + if ($olderthanmonths > 0) { |
|
| 7022 | + if ($globalDBdriver == 'mysql') { |
|
| 7023 | 7023 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
| 7024 | 7024 | } else { |
| 7025 | 7025 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
| 7026 | 7026 | } |
| 7027 | 7027 | } |
| 7028 | - if ($sincedate != '') { |
|
| 7029 | - if ($globalDBdriver == 'mysql') { |
|
| 7028 | + if ($sincedate != '') { |
|
| 7029 | + if ($globalDBdriver == 'mysql') { |
|
| 7030 | 7030 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
| 7031 | 7031 | } else { |
| 7032 | 7032 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
| 7033 | 7033 | } |
| 7034 | 7034 | } |
| 7035 | 7035 | |
| 7036 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 7037 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 7038 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 7036 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
| 7037 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
| 7038 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
| 7039 | 7039 | ORDER BY airport_arrival_icao_count DESC"; |
| 7040 | 7040 | if ($limit) $query .= " LIMIT 10"; |
| 7041 | 7041 | |
@@ -7065,11 +7065,11 @@ discard block |
||
| 7065 | 7065 | } |
| 7066 | 7066 | |
| 7067 | 7067 | /** |
| 7068 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 7069 | - * |
|
| 7070 | - * @return Array the airport list |
|
| 7071 | - * |
|
| 7072 | - */ |
|
| 7068 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
| 7069 | + * |
|
| 7070 | + * @return Array the airport list |
|
| 7071 | + * |
|
| 7072 | + */ |
|
| 7073 | 7073 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
| 7074 | 7074 | { |
| 7075 | 7075 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7101,11 +7101,11 @@ discard block |
||
| 7101 | 7101 | |
| 7102 | 7102 | |
| 7103 | 7103 | /** |
| 7104 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 7105 | - * |
|
| 7106 | - * @return Array the airport list |
|
| 7107 | - * |
|
| 7108 | - */ |
|
| 7104 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
| 7105 | + * |
|
| 7106 | + * @return Array the airport list |
|
| 7107 | + * |
|
| 7108 | + */ |
|
| 7109 | 7109 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
| 7110 | 7110 | { |
| 7111 | 7111 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7136,11 +7136,11 @@ discard block |
||
| 7136 | 7136 | |
| 7137 | 7137 | |
| 7138 | 7138 | /** |
| 7139 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 7140 | - * |
|
| 7141 | - * @return Array the airport list |
|
| 7142 | - * |
|
| 7143 | - */ |
|
| 7139 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
| 7140 | + * |
|
| 7141 | + * @return Array the airport list |
|
| 7142 | + * |
|
| 7143 | + */ |
|
| 7144 | 7144 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
| 7145 | 7145 | { |
| 7146 | 7146 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7174,11 +7174,11 @@ discard block |
||
| 7174 | 7174 | |
| 7175 | 7175 | |
| 7176 | 7176 | /** |
| 7177 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 7178 | - * |
|
| 7179 | - * @return Array the airport list |
|
| 7180 | - * |
|
| 7181 | - */ |
|
| 7177 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
| 7178 | + * |
|
| 7179 | + * @return Array the airport list |
|
| 7180 | + * |
|
| 7181 | + */ |
|
| 7182 | 7182 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
| 7183 | 7183 | { |
| 7184 | 7184 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7208,11 +7208,11 @@ discard block |
||
| 7208 | 7208 | |
| 7209 | 7209 | |
| 7210 | 7210 | /** |
| 7211 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 7212 | - * |
|
| 7213 | - * @return Array the airport list |
|
| 7214 | - * |
|
| 7215 | - */ |
|
| 7211 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
| 7212 | + * |
|
| 7213 | + * @return Array the airport list |
|
| 7214 | + * |
|
| 7215 | + */ |
|
| 7216 | 7216 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
| 7217 | 7217 | { |
| 7218 | 7218 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7246,11 +7246,11 @@ discard block |
||
| 7246 | 7246 | |
| 7247 | 7247 | |
| 7248 | 7248 | /** |
| 7249 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 7250 | - * |
|
| 7251 | - * @return Array the airport list |
|
| 7252 | - * |
|
| 7253 | - */ |
|
| 7249 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
| 7250 | + * |
|
| 7251 | + * @return Array the airport list |
|
| 7252 | + * |
|
| 7253 | + */ |
|
| 7254 | 7254 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
| 7255 | 7255 | { |
| 7256 | 7256 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7281,11 +7281,11 @@ discard block |
||
| 7281 | 7281 | |
| 7282 | 7282 | |
| 7283 | 7283 | /** |
| 7284 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 7285 | - * |
|
| 7286 | - * @return Array the airport list |
|
| 7287 | - * |
|
| 7288 | - */ |
|
| 7284 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
| 7285 | + * |
|
| 7286 | + * @return Array the airport list |
|
| 7287 | + * |
|
| 7288 | + */ |
|
| 7289 | 7289 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
| 7290 | 7290 | { |
| 7291 | 7291 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7318,11 +7318,11 @@ discard block |
||
| 7318 | 7318 | |
| 7319 | 7319 | |
| 7320 | 7320 | /** |
| 7321 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 7322 | - * |
|
| 7323 | - * @return Array the airport list |
|
| 7324 | - * |
|
| 7325 | - */ |
|
| 7321 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
| 7322 | + * |
|
| 7323 | + * @return Array the airport list |
|
| 7324 | + * |
|
| 7325 | + */ |
|
| 7326 | 7326 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
| 7327 | 7327 | { |
| 7328 | 7328 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7352,11 +7352,11 @@ discard block |
||
| 7352 | 7352 | |
| 7353 | 7353 | |
| 7354 | 7354 | /** |
| 7355 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7356 | - * |
|
| 7357 | - * @return Array the airport list |
|
| 7358 | - * |
|
| 7359 | - */ |
|
| 7355 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7356 | + * |
|
| 7357 | + * @return Array the airport list |
|
| 7358 | + * |
|
| 7359 | + */ |
|
| 7360 | 7360 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
| 7361 | 7361 | { |
| 7362 | 7362 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7390,11 +7390,11 @@ discard block |
||
| 7390 | 7390 | |
| 7391 | 7391 | |
| 7392 | 7392 | /** |
| 7393 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7394 | - * |
|
| 7395 | - * @return Array the airport list |
|
| 7396 | - * |
|
| 7397 | - */ |
|
| 7393 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
| 7394 | + * |
|
| 7395 | + * @return Array the airport list |
|
| 7396 | + * |
|
| 7397 | + */ |
|
| 7398 | 7398 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
| 7399 | 7399 | { |
| 7400 | 7400 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7425,11 +7425,11 @@ discard block |
||
| 7425 | 7425 | |
| 7426 | 7426 | |
| 7427 | 7427 | /** |
| 7428 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7429 | - * |
|
| 7430 | - * @return Array the airport list |
|
| 7431 | - * |
|
| 7432 | - */ |
|
| 7428 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
| 7429 | + * |
|
| 7430 | + * @return Array the airport list |
|
| 7431 | + * |
|
| 7432 | + */ |
|
| 7433 | 7433 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
| 7434 | 7434 | { |
| 7435 | 7435 | global $globalTimezone, $globalDBdriver; |
@@ -7475,11 +7475,11 @@ discard block |
||
| 7475 | 7475 | |
| 7476 | 7476 | |
| 7477 | 7477 | /** |
| 7478 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7479 | - * |
|
| 7480 | - * @return Array the airport list |
|
| 7481 | - * |
|
| 7482 | - */ |
|
| 7478 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
| 7479 | + * |
|
| 7480 | + * @return Array the airport list |
|
| 7481 | + * |
|
| 7482 | + */ |
|
| 7483 | 7483 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
| 7484 | 7484 | { |
| 7485 | 7485 | global $globalTimezone, $globalDBdriver; |
@@ -7522,11 +7522,11 @@ discard block |
||
| 7522 | 7522 | |
| 7523 | 7523 | |
| 7524 | 7524 | /** |
| 7525 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7526 | - * |
|
| 7527 | - * @return Array the airport list |
|
| 7528 | - * |
|
| 7529 | - */ |
|
| 7525 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
| 7526 | + * |
|
| 7527 | + * @return Array the airport list |
|
| 7528 | + * |
|
| 7529 | + */ |
|
| 7530 | 7530 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
| 7531 | 7531 | { |
| 7532 | 7532 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7559,11 +7559,11 @@ discard block |
||
| 7559 | 7559 | |
| 7560 | 7560 | |
| 7561 | 7561 | /** |
| 7562 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7563 | - * |
|
| 7564 | - * @return Array the airport list |
|
| 7565 | - * |
|
| 7566 | - */ |
|
| 7562 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
| 7563 | + * |
|
| 7564 | + * @return Array the airport list |
|
| 7565 | + * |
|
| 7566 | + */ |
|
| 7567 | 7567 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
| 7568 | 7568 | { |
| 7569 | 7569 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7594,11 +7594,11 @@ discard block |
||
| 7594 | 7594 | |
| 7595 | 7595 | |
| 7596 | 7596 | /** |
| 7597 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7598 | - * |
|
| 7599 | - * @return Array the airport list |
|
| 7600 | - * |
|
| 7601 | - */ |
|
| 7597 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
| 7598 | + * |
|
| 7599 | + * @return Array the airport list |
|
| 7600 | + * |
|
| 7601 | + */ |
|
| 7602 | 7602 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
| 7603 | 7603 | { |
| 7604 | 7604 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7631,11 +7631,11 @@ discard block |
||
| 7631 | 7631 | |
| 7632 | 7632 | |
| 7633 | 7633 | /** |
| 7634 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7635 | - * |
|
| 7636 | - * @return Array the airport list |
|
| 7637 | - * |
|
| 7638 | - */ |
|
| 7634 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
| 7635 | + * |
|
| 7636 | + * @return Array the airport list |
|
| 7637 | + * |
|
| 7638 | + */ |
|
| 7639 | 7639 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
| 7640 | 7640 | { |
| 7641 | 7641 | global $globalDBdriver; |
@@ -7667,11 +7667,11 @@ discard block |
||
| 7667 | 7667 | |
| 7668 | 7668 | |
| 7669 | 7669 | /** |
| 7670 | - * Counts all airport departure countries |
|
| 7671 | - * |
|
| 7672 | - * @return Array the airport departure list |
|
| 7673 | - * |
|
| 7674 | - */ |
|
| 7670 | + * Counts all airport departure countries |
|
| 7671 | + * |
|
| 7672 | + * @return Array the airport departure list |
|
| 7673 | + * |
|
| 7674 | + */ |
|
| 7675 | 7675 | public function countAllDepartureCountries($filters = array(),$year = '',$month = '', $day = '') |
| 7676 | 7676 | { |
| 7677 | 7677 | global $globalDBdriver; |
@@ -7730,11 +7730,11 @@ discard block |
||
| 7730 | 7730 | |
| 7731 | 7731 | |
| 7732 | 7732 | /** |
| 7733 | - * Counts all airport arrival countries |
|
| 7734 | - * |
|
| 7735 | - * @return Array the airport arrival list |
|
| 7736 | - * |
|
| 7737 | - */ |
|
| 7733 | + * Counts all airport arrival countries |
|
| 7734 | + * |
|
| 7735 | + * @return Array the airport arrival list |
|
| 7736 | + * |
|
| 7737 | + */ |
|
| 7738 | 7738 | public function countAllArrivalCountries($limit = true,$filters = array(),$year = '',$month = '',$day = '') |
| 7739 | 7739 | { |
| 7740 | 7740 | global $globalDBdriver; |
@@ -7796,11 +7796,11 @@ discard block |
||
| 7796 | 7796 | |
| 7797 | 7797 | |
| 7798 | 7798 | /** |
| 7799 | - * Gets all route combinations |
|
| 7800 | - * |
|
| 7801 | - * @return Array the route list |
|
| 7802 | - * |
|
| 7803 | - */ |
|
| 7799 | + * Gets all route combinations |
|
| 7800 | + * |
|
| 7801 | + * @return Array the route list |
|
| 7802 | + * |
|
| 7803 | + */ |
|
| 7804 | 7804 | public function countAllRoutes($filters = array()) |
| 7805 | 7805 | { |
| 7806 | 7806 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7839,11 +7839,11 @@ discard block |
||
| 7839 | 7839 | |
| 7840 | 7840 | |
| 7841 | 7841 | /** |
| 7842 | - * Gets all route combinations based on an aircraft |
|
| 7843 | - * |
|
| 7844 | - * @return Array the route list |
|
| 7845 | - * |
|
| 7846 | - */ |
|
| 7842 | + * Gets all route combinations based on an aircraft |
|
| 7843 | + * |
|
| 7844 | + * @return Array the route list |
|
| 7845 | + * |
|
| 7846 | + */ |
|
| 7847 | 7847 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
| 7848 | 7848 | { |
| 7849 | 7849 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7879,11 +7879,11 @@ discard block |
||
| 7879 | 7879 | |
| 7880 | 7880 | |
| 7881 | 7881 | /** |
| 7882 | - * Gets all route combinations based on an aircraft registration |
|
| 7883 | - * |
|
| 7884 | - * @return Array the route list |
|
| 7885 | - * |
|
| 7886 | - */ |
|
| 7882 | + * Gets all route combinations based on an aircraft registration |
|
| 7883 | + * |
|
| 7884 | + * @return Array the route list |
|
| 7885 | + * |
|
| 7886 | + */ |
|
| 7887 | 7887 | public function countAllRoutesByRegistration($registration, $filters = array()) |
| 7888 | 7888 | { |
| 7889 | 7889 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7921,11 +7921,11 @@ discard block |
||
| 7921 | 7921 | |
| 7922 | 7922 | |
| 7923 | 7923 | /** |
| 7924 | - * Gets all route combinations based on an airline |
|
| 7925 | - * |
|
| 7926 | - * @return Array the route list |
|
| 7927 | - * |
|
| 7928 | - */ |
|
| 7924 | + * Gets all route combinations based on an airline |
|
| 7925 | + * |
|
| 7926 | + * @return Array the route list |
|
| 7927 | + * |
|
| 7928 | + */ |
|
| 7929 | 7929 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
| 7930 | 7930 | { |
| 7931 | 7931 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7963,11 +7963,11 @@ discard block |
||
| 7963 | 7963 | |
| 7964 | 7964 | |
| 7965 | 7965 | /** |
| 7966 | - * Gets all route combinations based on an airport |
|
| 7967 | - * |
|
| 7968 | - * @return Array the route list |
|
| 7969 | - * |
|
| 7970 | - */ |
|
| 7966 | + * Gets all route combinations based on an airport |
|
| 7967 | + * |
|
| 7968 | + * @return Array the route list |
|
| 7969 | + * |
|
| 7970 | + */ |
|
| 7971 | 7971 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
| 7972 | 7972 | { |
| 7973 | 7973 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8004,11 +8004,11 @@ discard block |
||
| 8004 | 8004 | |
| 8005 | 8005 | |
| 8006 | 8006 | /** |
| 8007 | - * Gets all route combinations based on an country |
|
| 8008 | - * |
|
| 8009 | - * @return Array the route list |
|
| 8010 | - * |
|
| 8011 | - */ |
|
| 8007 | + * Gets all route combinations based on an country |
|
| 8008 | + * |
|
| 8009 | + * @return Array the route list |
|
| 8010 | + * |
|
| 8011 | + */ |
|
| 8012 | 8012 | public function countAllRoutesByCountry($country, $filters = array()) |
| 8013 | 8013 | { |
| 8014 | 8014 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8044,11 +8044,11 @@ discard block |
||
| 8044 | 8044 | |
| 8045 | 8045 | |
| 8046 | 8046 | /** |
| 8047 | - * Gets all route combinations based on an date |
|
| 8048 | - * |
|
| 8049 | - * @return Array the route list |
|
| 8050 | - * |
|
| 8051 | - */ |
|
| 8047 | + * Gets all route combinations based on an date |
|
| 8048 | + * |
|
| 8049 | + * @return Array the route list |
|
| 8050 | + * |
|
| 8051 | + */ |
|
| 8052 | 8052 | public function countAllRoutesByDate($date, $filters = array()) |
| 8053 | 8053 | { |
| 8054 | 8054 | global $globalTimezone, $globalDBdriver; |
@@ -8098,11 +8098,11 @@ discard block |
||
| 8098 | 8098 | |
| 8099 | 8099 | |
| 8100 | 8100 | /** |
| 8101 | - * Gets all route combinations based on an ident/callsign |
|
| 8102 | - * |
|
| 8103 | - * @return Array the route list |
|
| 8104 | - * |
|
| 8105 | - */ |
|
| 8101 | + * Gets all route combinations based on an ident/callsign |
|
| 8102 | + * |
|
| 8103 | + * @return Array the route list |
|
| 8104 | + * |
|
| 8105 | + */ |
|
| 8106 | 8106 | public function countAllRoutesByIdent($ident, $filters = array()) |
| 8107 | 8107 | { |
| 8108 | 8108 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8139,11 +8139,11 @@ discard block |
||
| 8139 | 8139 | |
| 8140 | 8140 | |
| 8141 | 8141 | /** |
| 8142 | - * Gets all route combinations based on an manufacturer |
|
| 8143 | - * |
|
| 8144 | - * @return Array the route list |
|
| 8145 | - * |
|
| 8146 | - */ |
|
| 8142 | + * Gets all route combinations based on an manufacturer |
|
| 8143 | + * |
|
| 8144 | + * @return Array the route list |
|
| 8145 | + * |
|
| 8146 | + */ |
|
| 8147 | 8147 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
| 8148 | 8148 | { |
| 8149 | 8149 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8181,11 +8181,11 @@ discard block |
||
| 8181 | 8181 | |
| 8182 | 8182 | |
| 8183 | 8183 | /** |
| 8184 | - * Gets all route combinations with waypoints |
|
| 8185 | - * |
|
| 8186 | - * @return Array the route list |
|
| 8187 | - * |
|
| 8188 | - */ |
|
| 8184 | + * Gets all route combinations with waypoints |
|
| 8185 | + * |
|
| 8186 | + * @return Array the route list |
|
| 8187 | + * |
|
| 8188 | + */ |
|
| 8189 | 8189 | public function countAllRoutesWithWaypoints($filters = array()) |
| 8190 | 8190 | { |
| 8191 | 8191 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8222,11 +8222,11 @@ discard block |
||
| 8222 | 8222 | } |
| 8223 | 8223 | |
| 8224 | 8224 | /** |
| 8225 | - * Gets all callsigns that have flown over |
|
| 8226 | - * |
|
| 8227 | - * @return Array the callsign list |
|
| 8228 | - * |
|
| 8229 | - */ |
|
| 8225 | + * Gets all callsigns that have flown over |
|
| 8226 | + * |
|
| 8227 | + * @return Array the callsign list |
|
| 8228 | + * |
|
| 8229 | + */ |
|
| 8230 | 8230 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
| 8231 | 8231 | { |
| 8232 | 8232 | global $globalDBdriver; |
@@ -8292,11 +8292,11 @@ discard block |
||
| 8292 | 8292 | } |
| 8293 | 8293 | |
| 8294 | 8294 | /** |
| 8295 | - * Gets all callsigns that have flown over |
|
| 8296 | - * |
|
| 8297 | - * @return Array the callsign list |
|
| 8298 | - * |
|
| 8299 | - */ |
|
| 8295 | + * Gets all callsigns that have flown over |
|
| 8296 | + * |
|
| 8297 | + * @return Array the callsign list |
|
| 8298 | + * |
|
| 8299 | + */ |
|
| 8300 | 8300 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
| 8301 | 8301 | { |
| 8302 | 8302 | global $globalDBdriver; |
@@ -8337,11 +8337,11 @@ discard block |
||
| 8337 | 8337 | |
| 8338 | 8338 | |
| 8339 | 8339 | /** |
| 8340 | - * Counts all dates |
|
| 8341 | - * |
|
| 8342 | - * @return Array the date list |
|
| 8343 | - * |
|
| 8344 | - */ |
|
| 8340 | + * Counts all dates |
|
| 8341 | + * |
|
| 8342 | + * @return Array the date list |
|
| 8343 | + * |
|
| 8344 | + */ |
|
| 8345 | 8345 | public function countAllDates($filters = array()) |
| 8346 | 8346 | { |
| 8347 | 8347 | global $globalTimezone, $globalDBdriver; |
@@ -8386,11 +8386,11 @@ discard block |
||
| 8386 | 8386 | } |
| 8387 | 8387 | |
| 8388 | 8388 | /** |
| 8389 | - * Counts all dates |
|
| 8390 | - * |
|
| 8391 | - * @return Array the date list |
|
| 8392 | - * |
|
| 8393 | - */ |
|
| 8389 | + * Counts all dates |
|
| 8390 | + * |
|
| 8391 | + * @return Array the date list |
|
| 8392 | + * |
|
| 8393 | + */ |
|
| 8394 | 8394 | public function countAllDatesByAirlines($filters = array()) |
| 8395 | 8395 | { |
| 8396 | 8396 | global $globalTimezone, $globalDBdriver; |
@@ -8435,11 +8435,11 @@ discard block |
||
| 8435 | 8435 | } |
| 8436 | 8436 | |
| 8437 | 8437 | /** |
| 8438 | - * Counts all dates during the last 7 days |
|
| 8439 | - * |
|
| 8440 | - * @return Array the date list |
|
| 8441 | - * |
|
| 8442 | - */ |
|
| 8438 | + * Counts all dates during the last 7 days |
|
| 8439 | + * |
|
| 8440 | + * @return Array the date list |
|
| 8441 | + * |
|
| 8442 | + */ |
|
| 8443 | 8443 | public function countAllDatesLast7Days($filters = array()) |
| 8444 | 8444 | { |
| 8445 | 8445 | global $globalTimezone, $globalDBdriver; |
@@ -8461,7 +8461,7 @@ discard block |
||
| 8461 | 8461 | $query .= " GROUP BY date_name |
| 8462 | 8462 | ORDER BY date_name ASC"; |
| 8463 | 8463 | $query_data = array(':offset' => $offset); |
| 8464 | - } |
|
| 8464 | + } |
|
| 8465 | 8465 | |
| 8466 | 8466 | $sth = $this->db->prepare($query); |
| 8467 | 8467 | $sth->execute($query_data); |
@@ -8481,11 +8481,11 @@ discard block |
||
| 8481 | 8481 | } |
| 8482 | 8482 | |
| 8483 | 8483 | /** |
| 8484 | - * Counts all dates during the last month |
|
| 8485 | - * |
|
| 8486 | - * @return Array the date list |
|
| 8487 | - * |
|
| 8488 | - */ |
|
| 8484 | + * Counts all dates during the last month |
|
| 8485 | + * |
|
| 8486 | + * @return Array the date list |
|
| 8487 | + * |
|
| 8488 | + */ |
|
| 8489 | 8489 | public function countAllDatesLastMonth($filters = array()) |
| 8490 | 8490 | { |
| 8491 | 8491 | global $globalTimezone, $globalDBdriver; |
@@ -8507,7 +8507,7 @@ discard block |
||
| 8507 | 8507 | $query .= " GROUP BY date_name |
| 8508 | 8508 | ORDER BY date_name ASC"; |
| 8509 | 8509 | $query_data = array(':offset' => $offset); |
| 8510 | - } |
|
| 8510 | + } |
|
| 8511 | 8511 | |
| 8512 | 8512 | $sth = $this->db->prepare($query); |
| 8513 | 8513 | $sth->execute($query_data); |
@@ -8528,11 +8528,11 @@ discard block |
||
| 8528 | 8528 | |
| 8529 | 8529 | |
| 8530 | 8530 | /** |
| 8531 | - * Counts all dates during the last month |
|
| 8532 | - * |
|
| 8533 | - * @return Array the date list |
|
| 8534 | - * |
|
| 8535 | - */ |
|
| 8531 | + * Counts all dates during the last month |
|
| 8532 | + * |
|
| 8533 | + * @return Array the date list |
|
| 8534 | + * |
|
| 8535 | + */ |
|
| 8536 | 8536 | public function countAllDatesLastMonthByAirlines($filters = array()) |
| 8537 | 8537 | { |
| 8538 | 8538 | global $globalTimezone, $globalDBdriver; |
@@ -8555,7 +8555,7 @@ discard block |
||
| 8555 | 8555 | GROUP BY spotter_output.airline_icao, date_name |
| 8556 | 8556 | ORDER BY date_name ASC"; |
| 8557 | 8557 | $query_data = array(':offset' => $offset); |
| 8558 | - } |
|
| 8558 | + } |
|
| 8559 | 8559 | |
| 8560 | 8560 | $sth = $this->db->prepare($query); |
| 8561 | 8561 | $sth->execute($query_data); |
@@ -8577,11 +8577,11 @@ discard block |
||
| 8577 | 8577 | |
| 8578 | 8578 | |
| 8579 | 8579 | /** |
| 8580 | - * Counts all month |
|
| 8581 | - * |
|
| 8582 | - * @return Array the month list |
|
| 8583 | - * |
|
| 8584 | - */ |
|
| 8580 | + * Counts all month |
|
| 8581 | + * |
|
| 8582 | + * @return Array the month list |
|
| 8583 | + * |
|
| 8584 | + */ |
|
| 8585 | 8585 | public function countAllMonths($filters = array()) |
| 8586 | 8586 | { |
| 8587 | 8587 | global $globalTimezone, $globalDBdriver; |
@@ -8623,11 +8623,11 @@ discard block |
||
| 8623 | 8623 | } |
| 8624 | 8624 | |
| 8625 | 8625 | /** |
| 8626 | - * Counts all month |
|
| 8627 | - * |
|
| 8628 | - * @return Array the month list |
|
| 8629 | - * |
|
| 8630 | - */ |
|
| 8626 | + * Counts all month |
|
| 8627 | + * |
|
| 8628 | + * @return Array the month list |
|
| 8629 | + * |
|
| 8630 | + */ |
|
| 8631 | 8631 | public function countAllMonthsByAirlines($filters = array()) |
| 8632 | 8632 | { |
| 8633 | 8633 | global $globalTimezone, $globalDBdriver; |
@@ -8672,11 +8672,11 @@ discard block |
||
| 8672 | 8672 | } |
| 8673 | 8673 | |
| 8674 | 8674 | /** |
| 8675 | - * Counts all military month |
|
| 8676 | - * |
|
| 8677 | - * @return Array the month list |
|
| 8678 | - * |
|
| 8679 | - */ |
|
| 8675 | + * Counts all military month |
|
| 8676 | + * |
|
| 8677 | + * @return Array the month list |
|
| 8678 | + * |
|
| 8679 | + */ |
|
| 8680 | 8680 | public function countAllMilitaryMonths($filters = array()) |
| 8681 | 8681 | { |
| 8682 | 8682 | global $globalTimezone, $globalDBdriver; |
@@ -8717,11 +8717,11 @@ discard block |
||
| 8717 | 8717 | } |
| 8718 | 8718 | |
| 8719 | 8719 | /** |
| 8720 | - * Counts all month owners |
|
| 8721 | - * |
|
| 8722 | - * @return Array the month list |
|
| 8723 | - * |
|
| 8724 | - */ |
|
| 8720 | + * Counts all month owners |
|
| 8721 | + * |
|
| 8722 | + * @return Array the month list |
|
| 8723 | + * |
|
| 8724 | + */ |
|
| 8725 | 8725 | public function countAllMonthsOwners($filters = array()) |
| 8726 | 8726 | { |
| 8727 | 8727 | global $globalTimezone, $globalDBdriver; |
@@ -8763,11 +8763,11 @@ discard block |
||
| 8763 | 8763 | } |
| 8764 | 8764 | |
| 8765 | 8765 | /** |
| 8766 | - * Counts all month owners |
|
| 8767 | - * |
|
| 8768 | - * @return Array the month list |
|
| 8769 | - * |
|
| 8770 | - */ |
|
| 8766 | + * Counts all month owners |
|
| 8767 | + * |
|
| 8768 | + * @return Array the month list |
|
| 8769 | + * |
|
| 8770 | + */ |
|
| 8771 | 8771 | public function countAllMonthsOwnersByAirlines($filters = array()) |
| 8772 | 8772 | { |
| 8773 | 8773 | global $globalTimezone, $globalDBdriver; |
@@ -8810,11 +8810,11 @@ discard block |
||
| 8810 | 8810 | } |
| 8811 | 8811 | |
| 8812 | 8812 | /** |
| 8813 | - * Counts all month pilot |
|
| 8814 | - * |
|
| 8815 | - * @return Array the month list |
|
| 8816 | - * |
|
| 8817 | - */ |
|
| 8813 | + * Counts all month pilot |
|
| 8814 | + * |
|
| 8815 | + * @return Array the month list |
|
| 8816 | + * |
|
| 8817 | + */ |
|
| 8818 | 8818 | public function countAllMonthsPilots($filters = array()) |
| 8819 | 8819 | { |
| 8820 | 8820 | global $globalTimezone, $globalDBdriver; |
@@ -8856,11 +8856,11 @@ discard block |
||
| 8856 | 8856 | } |
| 8857 | 8857 | |
| 8858 | 8858 | /** |
| 8859 | - * Counts all month pilot |
|
| 8860 | - * |
|
| 8861 | - * @return Array the month list |
|
| 8862 | - * |
|
| 8863 | - */ |
|
| 8859 | + * Counts all month pilot |
|
| 8860 | + * |
|
| 8861 | + * @return Array the month list |
|
| 8862 | + * |
|
| 8863 | + */ |
|
| 8864 | 8864 | public function countAllMonthsPilotsByAirlines($filters = array()) |
| 8865 | 8865 | { |
| 8866 | 8866 | global $globalTimezone, $globalDBdriver; |
@@ -8903,11 +8903,11 @@ discard block |
||
| 8903 | 8903 | } |
| 8904 | 8904 | |
| 8905 | 8905 | /** |
| 8906 | - * Counts all month airline |
|
| 8907 | - * |
|
| 8908 | - * @return Array the month list |
|
| 8909 | - * |
|
| 8910 | - */ |
|
| 8906 | + * Counts all month airline |
|
| 8907 | + * |
|
| 8908 | + * @return Array the month list |
|
| 8909 | + * |
|
| 8910 | + */ |
|
| 8911 | 8911 | public function countAllMonthsAirlines($filters = array()) |
| 8912 | 8912 | { |
| 8913 | 8913 | global $globalTimezone, $globalDBdriver; |
@@ -8949,11 +8949,11 @@ discard block |
||
| 8949 | 8949 | } |
| 8950 | 8950 | |
| 8951 | 8951 | /** |
| 8952 | - * Counts all month aircraft |
|
| 8953 | - * |
|
| 8954 | - * @return Array the month list |
|
| 8955 | - * |
|
| 8956 | - */ |
|
| 8952 | + * Counts all month aircraft |
|
| 8953 | + * |
|
| 8954 | + * @return Array the month list |
|
| 8955 | + * |
|
| 8956 | + */ |
|
| 8957 | 8957 | public function countAllMonthsAircrafts($filters = array()) |
| 8958 | 8958 | { |
| 8959 | 8959 | global $globalTimezone, $globalDBdriver; |
@@ -8996,11 +8996,11 @@ discard block |
||
| 8996 | 8996 | |
| 8997 | 8997 | |
| 8998 | 8998 | /** |
| 8999 | - * Counts all month aircraft |
|
| 9000 | - * |
|
| 9001 | - * @return Array the month list |
|
| 9002 | - * |
|
| 9003 | - */ |
|
| 8999 | + * Counts all month aircraft |
|
| 9000 | + * |
|
| 9001 | + * @return Array the month list |
|
| 9002 | + * |
|
| 9003 | + */ |
|
| 9004 | 9004 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
| 9005 | 9005 | { |
| 9006 | 9006 | global $globalTimezone, $globalDBdriver; |
@@ -9043,11 +9043,11 @@ discard block |
||
| 9043 | 9043 | } |
| 9044 | 9044 | |
| 9045 | 9045 | /** |
| 9046 | - * Counts all month real arrival |
|
| 9047 | - * |
|
| 9048 | - * @return Array the month list |
|
| 9049 | - * |
|
| 9050 | - */ |
|
| 9046 | + * Counts all month real arrival |
|
| 9047 | + * |
|
| 9048 | + * @return Array the month list |
|
| 9049 | + * |
|
| 9050 | + */ |
|
| 9051 | 9051 | public function countAllMonthsRealArrivals($filters = array()) |
| 9052 | 9052 | { |
| 9053 | 9053 | global $globalTimezone, $globalDBdriver; |
@@ -9090,11 +9090,11 @@ discard block |
||
| 9090 | 9090 | |
| 9091 | 9091 | |
| 9092 | 9092 | /** |
| 9093 | - * Counts all month real arrival |
|
| 9094 | - * |
|
| 9095 | - * @return Array the month list |
|
| 9096 | - * |
|
| 9097 | - */ |
|
| 9093 | + * Counts all month real arrival |
|
| 9094 | + * |
|
| 9095 | + * @return Array the month list |
|
| 9096 | + * |
|
| 9097 | + */ |
|
| 9098 | 9098 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
| 9099 | 9099 | { |
| 9100 | 9100 | global $globalTimezone, $globalDBdriver; |
@@ -9138,11 +9138,11 @@ discard block |
||
| 9138 | 9138 | |
| 9139 | 9139 | |
| 9140 | 9140 | /** |
| 9141 | - * Counts all dates during the last year |
|
| 9142 | - * |
|
| 9143 | - * @return Array the date list |
|
| 9144 | - * |
|
| 9145 | - */ |
|
| 9141 | + * Counts all dates during the last year |
|
| 9142 | + * |
|
| 9143 | + * @return Array the date list |
|
| 9144 | + * |
|
| 9145 | + */ |
|
| 9146 | 9146 | public function countAllMonthsLastYear($filters) |
| 9147 | 9147 | { |
| 9148 | 9148 | global $globalTimezone, $globalDBdriver; |
@@ -9164,7 +9164,7 @@ discard block |
||
| 9164 | 9164 | $query .= " GROUP BY year_name, month_name |
| 9165 | 9165 | ORDER BY year_name, month_name ASC"; |
| 9166 | 9166 | $query_data = array(':offset' => $offset); |
| 9167 | - } |
|
| 9167 | + } |
|
| 9168 | 9168 | |
| 9169 | 9169 | $sth = $this->db->prepare($query); |
| 9170 | 9170 | $sth->execute($query_data); |
@@ -9187,11 +9187,11 @@ discard block |
||
| 9187 | 9187 | |
| 9188 | 9188 | |
| 9189 | 9189 | /** |
| 9190 | - * Counts all hours |
|
| 9191 | - * |
|
| 9192 | - * @return Array the hour list |
|
| 9193 | - * |
|
| 9194 | - */ |
|
| 9190 | + * Counts all hours |
|
| 9191 | + * |
|
| 9192 | + * @return Array the hour list |
|
| 9193 | + * |
|
| 9194 | + */ |
|
| 9195 | 9195 | public function countAllHours($orderby,$filters = array()) |
| 9196 | 9196 | { |
| 9197 | 9197 | global $globalTimezone, $globalDBdriver; |
@@ -9252,11 +9252,11 @@ discard block |
||
| 9252 | 9252 | } |
| 9253 | 9253 | |
| 9254 | 9254 | /** |
| 9255 | - * Counts all hours |
|
| 9256 | - * |
|
| 9257 | - * @return Array the hour list |
|
| 9258 | - * |
|
| 9259 | - */ |
|
| 9255 | + * Counts all hours |
|
| 9256 | + * |
|
| 9257 | + * @return Array the hour list |
|
| 9258 | + * |
|
| 9259 | + */ |
|
| 9260 | 9260 | public function countAllHoursByAirlines($orderby, $filters = array()) |
| 9261 | 9261 | { |
| 9262 | 9262 | global $globalTimezone, $globalDBdriver; |
@@ -9319,11 +9319,11 @@ discard block |
||
| 9319 | 9319 | |
| 9320 | 9320 | |
| 9321 | 9321 | /** |
| 9322 | - * Counts all hours by airline |
|
| 9323 | - * |
|
| 9324 | - * @return Array the hour list |
|
| 9325 | - * |
|
| 9326 | - */ |
|
| 9322 | + * Counts all hours by airline |
|
| 9323 | + * |
|
| 9324 | + * @return Array the hour list |
|
| 9325 | + * |
|
| 9326 | + */ |
|
| 9327 | 9327 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
| 9328 | 9328 | { |
| 9329 | 9329 | global $globalTimezone, $globalDBdriver; |
@@ -9369,11 +9369,11 @@ discard block |
||
| 9369 | 9369 | |
| 9370 | 9370 | |
| 9371 | 9371 | /** |
| 9372 | - * Counts all hours by aircraft |
|
| 9373 | - * |
|
| 9374 | - * @return Array the hour list |
|
| 9375 | - * |
|
| 9376 | - */ |
|
| 9372 | + * Counts all hours by aircraft |
|
| 9373 | + * |
|
| 9374 | + * @return Array the hour list |
|
| 9375 | + * |
|
| 9376 | + */ |
|
| 9377 | 9377 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
| 9378 | 9378 | { |
| 9379 | 9379 | global $globalTimezone, $globalDBdriver; |
@@ -9416,11 +9416,11 @@ discard block |
||
| 9416 | 9416 | |
| 9417 | 9417 | |
| 9418 | 9418 | /** |
| 9419 | - * Counts all hours by aircraft registration |
|
| 9420 | - * |
|
| 9421 | - * @return Array the hour list |
|
| 9422 | - * |
|
| 9423 | - */ |
|
| 9419 | + * Counts all hours by aircraft registration |
|
| 9420 | + * |
|
| 9421 | + * @return Array the hour list |
|
| 9422 | + * |
|
| 9423 | + */ |
|
| 9424 | 9424 | public function countAllHoursByRegistration($registration, $filters = array()) |
| 9425 | 9425 | { |
| 9426 | 9426 | global $globalTimezone, $globalDBdriver; |
@@ -9463,11 +9463,11 @@ discard block |
||
| 9463 | 9463 | |
| 9464 | 9464 | |
| 9465 | 9465 | /** |
| 9466 | - * Counts all hours by airport |
|
| 9467 | - * |
|
| 9468 | - * @return Array the hour list |
|
| 9469 | - * |
|
| 9470 | - */ |
|
| 9466 | + * Counts all hours by airport |
|
| 9467 | + * |
|
| 9468 | + * @return Array the hour list |
|
| 9469 | + * |
|
| 9470 | + */ |
|
| 9471 | 9471 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
| 9472 | 9472 | { |
| 9473 | 9473 | global $globalTimezone, $globalDBdriver; |
@@ -9511,11 +9511,11 @@ discard block |
||
| 9511 | 9511 | |
| 9512 | 9512 | |
| 9513 | 9513 | /** |
| 9514 | - * Counts all hours by manufacturer |
|
| 9515 | - * |
|
| 9516 | - * @return Array the hour list |
|
| 9517 | - * |
|
| 9518 | - */ |
|
| 9514 | + * Counts all hours by manufacturer |
|
| 9515 | + * |
|
| 9516 | + * @return Array the hour list |
|
| 9517 | + * |
|
| 9518 | + */ |
|
| 9519 | 9519 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
| 9520 | 9520 | { |
| 9521 | 9521 | global $globalTimezone, $globalDBdriver; |
@@ -9559,11 +9559,11 @@ discard block |
||
| 9559 | 9559 | |
| 9560 | 9560 | |
| 9561 | 9561 | /** |
| 9562 | - * Counts all hours by date |
|
| 9563 | - * |
|
| 9564 | - * @return Array the hour list |
|
| 9565 | - * |
|
| 9566 | - */ |
|
| 9562 | + * Counts all hours by date |
|
| 9563 | + * |
|
| 9564 | + * @return Array the hour list |
|
| 9565 | + * |
|
| 9566 | + */ |
|
| 9567 | 9567 | public function countAllHoursByDate($date, $filters = array()) |
| 9568 | 9568 | { |
| 9569 | 9569 | global $globalTimezone, $globalDBdriver; |
@@ -9607,11 +9607,11 @@ discard block |
||
| 9607 | 9607 | |
| 9608 | 9608 | |
| 9609 | 9609 | /** |
| 9610 | - * Counts all hours by a ident/callsign |
|
| 9611 | - * |
|
| 9612 | - * @return Array the hour list |
|
| 9613 | - * |
|
| 9614 | - */ |
|
| 9610 | + * Counts all hours by a ident/callsign |
|
| 9611 | + * |
|
| 9612 | + * @return Array the hour list |
|
| 9613 | + * |
|
| 9614 | + */ |
|
| 9615 | 9615 | public function countAllHoursByIdent($ident, $filters = array()) |
| 9616 | 9616 | { |
| 9617 | 9617 | global $globalTimezone, $globalDBdriver; |
@@ -9656,11 +9656,11 @@ discard block |
||
| 9656 | 9656 | |
| 9657 | 9657 | |
| 9658 | 9658 | /** |
| 9659 | - * Counts all hours by route |
|
| 9660 | - * |
|
| 9661 | - * @return Array the hour list |
|
| 9662 | - * |
|
| 9663 | - */ |
|
| 9659 | + * Counts all hours by route |
|
| 9660 | + * |
|
| 9661 | + * @return Array the hour list |
|
| 9662 | + * |
|
| 9663 | + */ |
|
| 9664 | 9664 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
| 9665 | 9665 | { |
| 9666 | 9666 | global $globalTimezone, $globalDBdriver; |
@@ -9704,11 +9704,11 @@ discard block |
||
| 9704 | 9704 | |
| 9705 | 9705 | |
| 9706 | 9706 | /** |
| 9707 | - * Counts all hours by country |
|
| 9708 | - * |
|
| 9709 | - * @return Array the hour list |
|
| 9710 | - * |
|
| 9711 | - */ |
|
| 9707 | + * Counts all hours by country |
|
| 9708 | + * |
|
| 9709 | + * @return Array the hour list |
|
| 9710 | + * |
|
| 9711 | + */ |
|
| 9712 | 9712 | public function countAllHoursByCountry($country, $filters = array()) |
| 9713 | 9713 | { |
| 9714 | 9714 | global $globalTimezone, $globalDBdriver; |
@@ -9753,11 +9753,11 @@ discard block |
||
| 9753 | 9753 | |
| 9754 | 9754 | |
| 9755 | 9755 | /** |
| 9756 | - * Counts all aircraft that have flown over |
|
| 9757 | - * |
|
| 9758 | - * @return Integer the number of aircrafts |
|
| 9759 | - * |
|
| 9760 | - */ |
|
| 9756 | + * Counts all aircraft that have flown over |
|
| 9757 | + * |
|
| 9758 | + * @return Integer the number of aircrafts |
|
| 9759 | + * |
|
| 9760 | + */ |
|
| 9761 | 9761 | public function countOverallAircrafts($filters = array(),$year = '',$month = '') |
| 9762 | 9762 | { |
| 9763 | 9763 | global $globalDBdriver; |
@@ -9790,11 +9790,11 @@ discard block |
||
| 9790 | 9790 | } |
| 9791 | 9791 | |
| 9792 | 9792 | /** |
| 9793 | - * Counts all flight that really arrival |
|
| 9794 | - * |
|
| 9795 | - * @return Integer the number of aircrafts |
|
| 9796 | - * |
|
| 9797 | - */ |
|
| 9793 | + * Counts all flight that really arrival |
|
| 9794 | + * |
|
| 9795 | + * @return Integer the number of aircrafts |
|
| 9796 | + * |
|
| 9797 | + */ |
|
| 9798 | 9798 | public function countOverallArrival($filters = array(),$year = '',$month = '') |
| 9799 | 9799 | { |
| 9800 | 9800 | global $globalDBdriver; |
@@ -9827,11 +9827,11 @@ discard block |
||
| 9827 | 9827 | } |
| 9828 | 9828 | |
| 9829 | 9829 | /** |
| 9830 | - * Counts all pilots that have flown over |
|
| 9831 | - * |
|
| 9832 | - * @return Integer the number of pilots |
|
| 9833 | - * |
|
| 9834 | - */ |
|
| 9830 | + * Counts all pilots that have flown over |
|
| 9831 | + * |
|
| 9832 | + * @return Integer the number of pilots |
|
| 9833 | + * |
|
| 9834 | + */ |
|
| 9835 | 9835 | public function countOverallPilots($filters = array(),$year = '',$month = '') |
| 9836 | 9836 | { |
| 9837 | 9837 | global $globalDBdriver; |
@@ -9863,11 +9863,11 @@ discard block |
||
| 9863 | 9863 | } |
| 9864 | 9864 | |
| 9865 | 9865 | /** |
| 9866 | - * Counts all owners that have flown over |
|
| 9867 | - * |
|
| 9868 | - * @return Integer the number of owners |
|
| 9869 | - * |
|
| 9870 | - */ |
|
| 9866 | + * Counts all owners that have flown over |
|
| 9867 | + * |
|
| 9868 | + * @return Integer the number of owners |
|
| 9869 | + * |
|
| 9870 | + */ |
|
| 9871 | 9871 | public function countOverallOwners($filters = array(),$year = '',$month = '') |
| 9872 | 9872 | { |
| 9873 | 9873 | global $globalDBdriver; |
@@ -9900,11 +9900,11 @@ discard block |
||
| 9900 | 9900 | |
| 9901 | 9901 | |
| 9902 | 9902 | /** |
| 9903 | - * Counts all flights that have flown over |
|
| 9904 | - * |
|
| 9905 | - * @return Integer the number of flights |
|
| 9906 | - * |
|
| 9907 | - */ |
|
| 9903 | + * Counts all flights that have flown over |
|
| 9904 | + * |
|
| 9905 | + * @return Integer the number of flights |
|
| 9906 | + * |
|
| 9907 | + */ |
|
| 9908 | 9908 | public function countOverallFlights($filters = array(),$year = '',$month = '') |
| 9909 | 9909 | { |
| 9910 | 9910 | global $globalDBdriver; |
@@ -9939,11 +9939,11 @@ discard block |
||
| 9939 | 9939 | } |
| 9940 | 9940 | |
| 9941 | 9941 | /** |
| 9942 | - * Counts all military flights that have flown over |
|
| 9943 | - * |
|
| 9944 | - * @return Integer the number of flights |
|
| 9945 | - * |
|
| 9946 | - */ |
|
| 9942 | + * Counts all military flights that have flown over |
|
| 9943 | + * |
|
| 9944 | + * @return Integer the number of flights |
|
| 9945 | + * |
|
| 9946 | + */ |
|
| 9947 | 9947 | public function countOverallMilitaryFlights($filters = array(),$year = '',$month = '') |
| 9948 | 9948 | { |
| 9949 | 9949 | global $globalDBdriver; |
@@ -9978,11 +9978,11 @@ discard block |
||
| 9978 | 9978 | |
| 9979 | 9979 | |
| 9980 | 9980 | /** |
| 9981 | - * Counts all airlines that have flown over |
|
| 9982 | - * |
|
| 9983 | - * @return Integer the number of airlines |
|
| 9984 | - * |
|
| 9985 | - */ |
|
| 9981 | + * Counts all airlines that have flown over |
|
| 9982 | + * |
|
| 9983 | + * @return Integer the number of airlines |
|
| 9984 | + * |
|
| 9985 | + */ |
|
| 9986 | 9986 | public function countOverallAirlines($filters = array(),$year = '',$month = '') |
| 9987 | 9987 | { |
| 9988 | 9988 | global $globalDBdriver; |
@@ -10009,8 +10009,8 @@ discard block |
||
| 10009 | 10009 | $query_values = array_merge($query_values,array(':month' => $month)); |
| 10010 | 10010 | } |
| 10011 | 10011 | } |
| 10012 | - if ($query == '') $queryi .= $this->getFilter($filters); |
|
| 10013 | - else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
| 10012 | + if ($query == '') $queryi .= $this->getFilter($filters); |
|
| 10013 | + else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
| 10014 | 10014 | |
| 10015 | 10015 | |
| 10016 | 10016 | $sth = $this->db->prepare($queryi); |
@@ -10020,11 +10020,11 @@ discard block |
||
| 10020 | 10020 | |
| 10021 | 10021 | |
| 10022 | 10022 | /** |
| 10023 | - * Counts all hours of today |
|
| 10024 | - * |
|
| 10025 | - * @return Array the hour list |
|
| 10026 | - * |
|
| 10027 | - */ |
|
| 10023 | + * Counts all hours of today |
|
| 10024 | + * |
|
| 10025 | + * @return Array the hour list |
|
| 10026 | + * |
|
| 10027 | + */ |
|
| 10028 | 10028 | public function countAllHoursFromToday($filters = array()) |
| 10029 | 10029 | { |
| 10030 | 10030 | global $globalTimezone, $globalDBdriver; |
@@ -10064,11 +10064,11 @@ discard block |
||
| 10064 | 10064 | } |
| 10065 | 10065 | |
| 10066 | 10066 | /** |
| 10067 | - * Gets all the spotter information based on calculated upcoming flights |
|
| 10068 | - * |
|
| 10069 | - * @return Array the spotter information |
|
| 10070 | - * |
|
| 10071 | - */ |
|
| 10067 | + * Gets all the spotter information based on calculated upcoming flights |
|
| 10068 | + * |
|
| 10069 | + * @return Array the spotter information |
|
| 10070 | + * |
|
| 10071 | + */ |
|
| 10072 | 10072 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
| 10073 | 10073 | { |
| 10074 | 10074 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -10143,12 +10143,12 @@ discard block |
||
| 10143 | 10143 | } |
| 10144 | 10144 | |
| 10145 | 10145 | |
| 10146 | - /** |
|
| 10147 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 10148 | - * |
|
| 10149 | - * @return Integer the Barrie Spotter ID |
|
| 10146 | + /** |
|
| 10147 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 10148 | + * |
|
| 10149 | + * @return Integer the Barrie Spotter ID |
|
| 10150 | 10150 | q * |
| 10151 | - */ |
|
| 10151 | + */ |
|
| 10152 | 10152 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
| 10153 | 10153 | { |
| 10154 | 10154 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -10169,13 +10169,13 @@ discard block |
||
| 10169 | 10169 | |
| 10170 | 10170 | |
| 10171 | 10171 | /** |
| 10172 | - * Parses a date string |
|
| 10173 | - * |
|
| 10174 | - * @param String $dateString the date string |
|
| 10175 | - * @param String $timezone the timezone of a user |
|
| 10176 | - * @return Array the time information |
|
| 10177 | - * |
|
| 10178 | - */ |
|
| 10172 | + * Parses a date string |
|
| 10173 | + * |
|
| 10174 | + * @param String $dateString the date string |
|
| 10175 | + * @param String $timezone the timezone of a user |
|
| 10176 | + * @return Array the time information |
|
| 10177 | + * |
|
| 10178 | + */ |
|
| 10179 | 10179 | public function parseDateString($dateString, $timezone = '') |
| 10180 | 10180 | { |
| 10181 | 10181 | $time_array = array(); |
@@ -10211,12 +10211,12 @@ discard block |
||
| 10211 | 10211 | |
| 10212 | 10212 | |
| 10213 | 10213 | /** |
| 10214 | - * Parses the direction degrees to working |
|
| 10215 | - * |
|
| 10216 | - * @param Float $direction the direction in degrees |
|
| 10217 | - * @return Array the direction information |
|
| 10218 | - * |
|
| 10219 | - */ |
|
| 10214 | + * Parses the direction degrees to working |
|
| 10215 | + * |
|
| 10216 | + * @param Float $direction the direction in degrees |
|
| 10217 | + * @return Array the direction information |
|
| 10218 | + * |
|
| 10219 | + */ |
|
| 10220 | 10220 | public function parseDirection($direction = 0) |
| 10221 | 10221 | { |
| 10222 | 10222 | if ($direction == '') $direction = 0; |
@@ -10295,12 +10295,12 @@ discard block |
||
| 10295 | 10295 | |
| 10296 | 10296 | |
| 10297 | 10297 | /** |
| 10298 | - * Gets the aircraft registration |
|
| 10299 | - * |
|
| 10300 | - * @param String $flightaware_id the flight aware id |
|
| 10301 | - * @return String the aircraft registration |
|
| 10302 | - * |
|
| 10303 | - */ |
|
| 10298 | + * Gets the aircraft registration |
|
| 10299 | + * |
|
| 10300 | + * @param String $flightaware_id the flight aware id |
|
| 10301 | + * @return String the aircraft registration |
|
| 10302 | + * |
|
| 10303 | + */ |
|
| 10304 | 10304 | |
| 10305 | 10305 | public function getAircraftRegistration($flightaware_id) |
| 10306 | 10306 | { |
@@ -10329,12 +10329,12 @@ discard block |
||
| 10329 | 10329 | |
| 10330 | 10330 | |
| 10331 | 10331 | /** |
| 10332 | - * Gets the aircraft registration from ModeS |
|
| 10333 | - * |
|
| 10334 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 10335 | - * @return String the aircraft registration |
|
| 10336 | - * |
|
| 10337 | - */ |
|
| 10332 | + * Gets the aircraft registration from ModeS |
|
| 10333 | + * |
|
| 10334 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 10335 | + * @return String the aircraft registration |
|
| 10336 | + * |
|
| 10337 | + */ |
|
| 10338 | 10338 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
| 10339 | 10339 | { |
| 10340 | 10340 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -10347,19 +10347,19 @@ discard block |
||
| 10347 | 10347 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 10348 | 10348 | $sth->closeCursor(); |
| 10349 | 10349 | if (count($row) > 0) { |
| 10350 | - //return $row['Registration']; |
|
| 10351 | - return $row['registration']; |
|
| 10350 | + //return $row['Registration']; |
|
| 10351 | + return $row['registration']; |
|
| 10352 | 10352 | } else return ''; |
| 10353 | 10353 | |
| 10354 | 10354 | } |
| 10355 | 10355 | |
| 10356 | 10356 | /** |
| 10357 | - * Gets the aircraft type from ModeS |
|
| 10358 | - * |
|
| 10359 | - * @param String $aircraft_modes the flight ModeS in hex |
|
| 10360 | - * @return String the aircraft type |
|
| 10361 | - * |
|
| 10362 | - */ |
|
| 10357 | + * Gets the aircraft type from ModeS |
|
| 10358 | + * |
|
| 10359 | + * @param String $aircraft_modes the flight ModeS in hex |
|
| 10360 | + * @return String the aircraft type |
|
| 10361 | + * |
|
| 10362 | + */ |
|
| 10363 | 10363 | public function getAircraftTypeBymodeS($aircraft_modes) |
| 10364 | 10364 | { |
| 10365 | 10365 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -10372,19 +10372,19 @@ discard block |
||
| 10372 | 10372 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
| 10373 | 10373 | $sth->closeCursor(); |
| 10374 | 10374 | if (count($row) > 0) { |
| 10375 | - if ($row['type_flight'] == null) return ''; |
|
| 10376 | - else return $row['type_flight']; |
|
| 10375 | + if ($row['type_flight'] == null) return ''; |
|
| 10376 | + else return $row['type_flight']; |
|
| 10377 | 10377 | } else return ''; |
| 10378 | 10378 | |
| 10379 | 10379 | } |
| 10380 | 10380 | |
| 10381 | 10381 | /** |
| 10382 | - * Gets Country from latitude/longitude |
|
| 10383 | - * |
|
| 10384 | - * @param Float $latitude latitute of the flight |
|
| 10385 | - * @param Float $longitude longitute of the flight |
|
| 10386 | - * @return String the countrie |
|
| 10387 | - */ |
|
| 10382 | + * Gets Country from latitude/longitude |
|
| 10383 | + * |
|
| 10384 | + * @param Float $latitude latitute of the flight |
|
| 10385 | + * @param Float $longitude longitute of the flight |
|
| 10386 | + * @return String the countrie |
|
| 10387 | + */ |
|
| 10388 | 10388 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
| 10389 | 10389 | { |
| 10390 | 10390 | global $globalDBdriver, $globalDebug; |
@@ -10421,11 +10421,11 @@ discard block |
||
| 10421 | 10421 | } |
| 10422 | 10422 | |
| 10423 | 10423 | /** |
| 10424 | - * Gets Country from iso2 |
|
| 10425 | - * |
|
| 10426 | - * @param String $iso2 ISO2 country code |
|
| 10427 | - * @return String the countrie |
|
| 10428 | - */ |
|
| 10424 | + * Gets Country from iso2 |
|
| 10425 | + * |
|
| 10426 | + * @param String $iso2 ISO2 country code |
|
| 10427 | + * @return String the countrie |
|
| 10428 | + */ |
|
| 10429 | 10429 | public function getCountryFromISO2($iso2) |
| 10430 | 10430 | { |
| 10431 | 10431 | global $globalDBdriver, $globalDebug; |
@@ -10453,12 +10453,12 @@ discard block |
||
| 10453 | 10453 | } |
| 10454 | 10454 | |
| 10455 | 10455 | /** |
| 10456 | - * converts the registration code using the country prefix |
|
| 10457 | - * |
|
| 10458 | - * @param String $registration the aircraft registration |
|
| 10459 | - * @return String the aircraft registration |
|
| 10460 | - * |
|
| 10461 | - */ |
|
| 10456 | + * converts the registration code using the country prefix |
|
| 10457 | + * |
|
| 10458 | + * @param String $registration the aircraft registration |
|
| 10459 | + * @return String the aircraft registration |
|
| 10460 | + * |
|
| 10461 | + */ |
|
| 10462 | 10462 | public function convertAircraftRegistration($registration) |
| 10463 | 10463 | { |
| 10464 | 10464 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10510,12 +10510,12 @@ discard block |
||
| 10510 | 10510 | } |
| 10511 | 10511 | |
| 10512 | 10512 | /** |
| 10513 | - * Country from the registration code |
|
| 10514 | - * |
|
| 10515 | - * @param String $registration the aircraft registration |
|
| 10516 | - * @return String the country |
|
| 10517 | - * |
|
| 10518 | - */ |
|
| 10513 | + * Country from the registration code |
|
| 10514 | + * |
|
| 10515 | + * @param String $registration the aircraft registration |
|
| 10516 | + * @return String the country |
|
| 10517 | + * |
|
| 10518 | + */ |
|
| 10519 | 10519 | public function countryFromAircraftRegistration($registration) |
| 10520 | 10520 | { |
| 10521 | 10521 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10534,8 +10534,8 @@ discard block |
||
| 10534 | 10534 | $country = $row['country']; |
| 10535 | 10535 | } |
| 10536 | 10536 | } else { |
| 10537 | - $registration_1 = substr($registration, 0, 1); |
|
| 10538 | - $registration_2 = substr($registration, 0, 2); |
|
| 10537 | + $registration_1 = substr($registration, 0, 1); |
|
| 10538 | + $registration_2 = substr($registration, 0, 2); |
|
| 10539 | 10539 | |
| 10540 | 10540 | $country = ''; |
| 10541 | 10541 | //first get the prefix based on two characters |
@@ -10571,12 +10571,12 @@ discard block |
||
| 10571 | 10571 | } |
| 10572 | 10572 | |
| 10573 | 10573 | /** |
| 10574 | - * Registration prefix from the registration code |
|
| 10575 | - * |
|
| 10576 | - * @param String $registration the aircraft registration |
|
| 10577 | - * @return String the registration prefix |
|
| 10578 | - * |
|
| 10579 | - */ |
|
| 10574 | + * Registration prefix from the registration code |
|
| 10575 | + * |
|
| 10576 | + * @param String $registration the aircraft registration |
|
| 10577 | + * @return String the registration prefix |
|
| 10578 | + * |
|
| 10579 | + */ |
|
| 10580 | 10580 | public function registrationPrefixFromAircraftRegistration($registration) |
| 10581 | 10581 | { |
| 10582 | 10582 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10595,8 +10595,8 @@ discard block |
||
| 10595 | 10595 | //$country = $row['country']; |
| 10596 | 10596 | } |
| 10597 | 10597 | } else { |
| 10598 | - $registration_1 = substr($registration, 0, 1); |
|
| 10599 | - $registration_2 = substr($registration, 0, 2); |
|
| 10598 | + $registration_1 = substr($registration, 0, 1); |
|
| 10599 | + $registration_2 = substr($registration, 0, 2); |
|
| 10600 | 10600 | |
| 10601 | 10601 | //first get the prefix based on two characters |
| 10602 | 10602 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -10632,12 +10632,12 @@ discard block |
||
| 10632 | 10632 | |
| 10633 | 10633 | |
| 10634 | 10634 | /** |
| 10635 | - * Country from the registration code |
|
| 10636 | - * |
|
| 10637 | - * @param String $registration the aircraft registration |
|
| 10638 | - * @return String the country |
|
| 10639 | - * |
|
| 10640 | - */ |
|
| 10635 | + * Country from the registration code |
|
| 10636 | + * |
|
| 10637 | + * @param String $registration the aircraft registration |
|
| 10638 | + * @return String the country |
|
| 10639 | + * |
|
| 10640 | + */ |
|
| 10641 | 10641 | public function countryFromAircraftRegistrationCode($registration) |
| 10642 | 10642 | { |
| 10643 | 10643 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -10654,11 +10654,11 @@ discard block |
||
| 10654 | 10654 | } |
| 10655 | 10655 | |
| 10656 | 10656 | /** |
| 10657 | - * Set a new highlight value for a flight |
|
| 10658 | - * |
|
| 10659 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10660 | - * @param String $highlight New highlight value |
|
| 10661 | - */ |
|
| 10657 | + * Set a new highlight value for a flight |
|
| 10658 | + * |
|
| 10659 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
| 10660 | + * @param String $highlight New highlight value |
|
| 10661 | + */ |
|
| 10662 | 10662 | public function setHighlightFlight($flightaware_id,$highlight) { |
| 10663 | 10663 | |
| 10664 | 10664 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -10667,12 +10667,12 @@ discard block |
||
| 10667 | 10667 | } |
| 10668 | 10668 | |
| 10669 | 10669 | /** |
| 10670 | - * Set a new highlight value for a flight by Registration |
|
| 10671 | - * |
|
| 10672 | - * @param String $registration Registration of the aircraft |
|
| 10673 | - * @param String $date Date of spotted aircraft |
|
| 10674 | - * @param String $highlight New highlight value |
|
| 10675 | - */ |
|
| 10670 | + * Set a new highlight value for a flight by Registration |
|
| 10671 | + * |
|
| 10672 | + * @param String $registration Registration of the aircraft |
|
| 10673 | + * @param String $date Date of spotted aircraft |
|
| 10674 | + * @param String $highlight New highlight value |
|
| 10675 | + */ |
|
| 10676 | 10676 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
| 10677 | 10677 | if ($date == '') { |
| 10678 | 10678 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -10686,12 +10686,12 @@ discard block |
||
| 10686 | 10686 | } |
| 10687 | 10687 | |
| 10688 | 10688 | /** |
| 10689 | - * Gets the short url from bit.ly |
|
| 10690 | - * |
|
| 10691 | - * @param String $url the full url |
|
| 10692 | - * @return String the bit.ly url |
|
| 10693 | - * |
|
| 10694 | - */ |
|
| 10689 | + * Gets the short url from bit.ly |
|
| 10690 | + * |
|
| 10691 | + * @param String $url the full url |
|
| 10692 | + * @return String the bit.ly url |
|
| 10693 | + * |
|
| 10694 | + */ |
|
| 10695 | 10695 | public function getBitlyURL($url) |
| 10696 | 10696 | { |
| 10697 | 10697 | global $globalBitlyAccessToken; |
@@ -10980,11 +10980,11 @@ discard block |
||
| 10980 | 10980 | $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 |
| 10981 | 10981 | 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)) |
| 10982 | 10982 | 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;"; |
| 10983 | - } else { |
|
| 10983 | + } else { |
|
| 10984 | 10984 | $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 |
| 10985 | 10985 | 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)) |
| 10986 | 10986 | 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;"; |
| 10987 | - } |
|
| 10987 | + } |
|
| 10988 | 10988 | $sth = $this->db->prepare($query); |
| 10989 | 10989 | $sth->execute(); |
| 10990 | 10990 | return $sth->fetchAll(PDO::FETCH_ASSOC); |