@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['owner'])) { |
6 | - header('Location: '.$globalURL.'/owner'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/owner'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['owner'])) { |
6 | - header('Location: '.$globalURL.'/owner'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/owner'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['pilot'])) { |
6 | - header('Location: '.$globalURL.'/pilot'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/pilot'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['pilot'])) { |
6 | - header('Location: '.$globalURL.'/pilot'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/pilot'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['owner'])) { |
6 | - header('Location: '.$globalURL.'/owner'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/owner'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['pilot'])) { |
6 | - header('Location: '.$globalURL.'/pilot'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/pilot'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['owner'])) { |
6 | - header('Location: '.$globalURL.'/owner'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/owner'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
@@ -3,8 +3,8 @@ |
||
3 | 3 | require_once('require/class.Spotter.php'); |
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | if (!isset($_GET['owner'])) { |
6 | - header('Location: '.$globalURL.'/owner'); |
|
7 | - die(); |
|
6 | + header('Location: '.$globalURL.'/owner'); |
|
7 | + die(); |
|
8 | 8 | } |
9 | 9 | $Spotter = new Spotter(); |
10 | 10 | $owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
@@ -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; |
@@ -1271,11 +1271,11 @@ discard block |
||
1271 | 1271 | } |
1272 | 1272 | |
1273 | 1273 | /** |
1274 | - * Gets all the spotter information based on the owner |
|
1275 | - * |
|
1276 | - * @return Array the spotter information |
|
1277 | - * |
|
1278 | - */ |
|
1274 | + * Gets all the spotter information based on the owner |
|
1275 | + * |
|
1276 | + * @return Array the spotter information |
|
1277 | + * |
|
1278 | + */ |
|
1279 | 1279 | public function getSpotterDataByOwner($owner = '', $limit = '', $sort = '') |
1280 | 1280 | { |
1281 | 1281 | global $global_query; |
@@ -1326,11 +1326,11 @@ discard block |
||
1326 | 1326 | } |
1327 | 1327 | |
1328 | 1328 | /** |
1329 | - * Gets all the spotter information based on the pilot |
|
1330 | - * |
|
1331 | - * @return Array the spotter information |
|
1332 | - * |
|
1333 | - */ |
|
1329 | + * Gets all the spotter information based on the pilot |
|
1330 | + * |
|
1331 | + * @return Array the spotter information |
|
1332 | + * |
|
1333 | + */ |
|
1334 | 1334 | public function getSpotterDataByPilot($pilot = '', $limit = '', $sort = '') |
1335 | 1335 | { |
1336 | 1336 | global $global_query; |
@@ -1378,11 +1378,11 @@ discard block |
||
1378 | 1378 | |
1379 | 1379 | |
1380 | 1380 | /** |
1381 | - * Gets all the spotter information based on the aircraft type |
|
1382 | - * |
|
1383 | - * @return Array the spotter information |
|
1384 | - * |
|
1385 | - */ |
|
1381 | + * Gets all the spotter information based on the aircraft type |
|
1382 | + * |
|
1383 | + * @return Array the spotter information |
|
1384 | + * |
|
1385 | + */ |
|
1386 | 1386 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
1387 | 1387 | { |
1388 | 1388 | global $global_query; |
@@ -1436,11 +1436,11 @@ discard block |
||
1436 | 1436 | |
1437 | 1437 | |
1438 | 1438 | /** |
1439 | - * Gets all the spotter information based on the aircraft registration |
|
1440 | - * |
|
1441 | - * @return Array the spotter information |
|
1442 | - * |
|
1443 | - */ |
|
1439 | + * Gets all the spotter information based on the aircraft registration |
|
1440 | + * |
|
1441 | + * @return Array the spotter information |
|
1442 | + * |
|
1443 | + */ |
|
1444 | 1444 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
1445 | 1445 | { |
1446 | 1446 | global $global_query; |
@@ -1497,11 +1497,11 @@ discard block |
||
1497 | 1497 | |
1498 | 1498 | |
1499 | 1499 | /** |
1500 | - * Gets all the spotter information based on the airline |
|
1501 | - * |
|
1502 | - * @return Array the spotter information |
|
1503 | - * |
|
1504 | - */ |
|
1500 | + * Gets all the spotter information based on the airline |
|
1501 | + * |
|
1502 | + * @return Array the spotter information |
|
1503 | + * |
|
1504 | + */ |
|
1505 | 1505 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '',$filters = array()) |
1506 | 1506 | { |
1507 | 1507 | global $global_query; |
@@ -1554,11 +1554,11 @@ discard block |
||
1554 | 1554 | |
1555 | 1555 | |
1556 | 1556 | /** |
1557 | - * Gets all the spotter information based on the airport |
|
1558 | - * |
|
1559 | - * @return Array the spotter information |
|
1560 | - * |
|
1561 | - */ |
|
1557 | + * Gets all the spotter information based on the airport |
|
1558 | + * |
|
1559 | + * @return Array the spotter information |
|
1560 | + * |
|
1561 | + */ |
|
1562 | 1562 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) |
1563 | 1563 | { |
1564 | 1564 | global $global_query; |
@@ -1612,11 +1612,11 @@ discard block |
||
1612 | 1612 | |
1613 | 1613 | |
1614 | 1614 | /** |
1615 | - * Gets all the spotter information based on the date |
|
1616 | - * |
|
1617 | - * @return Array the spotter information |
|
1618 | - * |
|
1619 | - */ |
|
1615 | + * Gets all the spotter information based on the date |
|
1616 | + * |
|
1617 | + * @return Array the spotter information |
|
1618 | + * |
|
1619 | + */ |
|
1620 | 1620 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
1621 | 1621 | { |
1622 | 1622 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1680,11 +1680,11 @@ discard block |
||
1680 | 1680 | |
1681 | 1681 | |
1682 | 1682 | /** |
1683 | - * Gets all the spotter information based on the country name |
|
1684 | - * |
|
1685 | - * @return Array the spotter information |
|
1686 | - * |
|
1687 | - */ |
|
1683 | + * Gets all the spotter information based on the country name |
|
1684 | + * |
|
1685 | + * @return Array the spotter information |
|
1686 | + * |
|
1687 | + */ |
|
1688 | 1688 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '',$filters = array()) |
1689 | 1689 | { |
1690 | 1690 | global $global_query; |
@@ -1738,11 +1738,11 @@ discard block |
||
1738 | 1738 | |
1739 | 1739 | |
1740 | 1740 | /** |
1741 | - * Gets all the spotter information based on the manufacturer name |
|
1742 | - * |
|
1743 | - * @return Array the spotter information |
|
1744 | - * |
|
1745 | - */ |
|
1741 | + * Gets all the spotter information based on the manufacturer name |
|
1742 | + * |
|
1743 | + * @return Array the spotter information |
|
1744 | + * |
|
1745 | + */ |
|
1746 | 1746 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '', $filters = array()) |
1747 | 1747 | { |
1748 | 1748 | global $global_query; |
@@ -1798,13 +1798,13 @@ discard block |
||
1798 | 1798 | |
1799 | 1799 | |
1800 | 1800 | /** |
1801 | - * Gets a list of all aircraft that take a route |
|
1802 | - * |
|
1803 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
1804 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1805 | - * @return Array the spotter information |
|
1806 | - * |
|
1807 | - */ |
|
1801 | + * Gets a list of all aircraft that take a route |
|
1802 | + * |
|
1803 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
1804 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1805 | + * @return Array the spotter information |
|
1806 | + * |
|
1807 | + */ |
|
1808 | 1808 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '', $filters = array()) |
1809 | 1809 | { |
1810 | 1810 | global $global_query; |
@@ -1873,11 +1873,11 @@ discard block |
||
1873 | 1873 | |
1874 | 1874 | |
1875 | 1875 | /** |
1876 | - * Gets all the spotter information based on the special column in the table |
|
1877 | - * |
|
1878 | - * @return Array the spotter information |
|
1879 | - * |
|
1880 | - */ |
|
1876 | + * Gets all the spotter information based on the special column in the table |
|
1877 | + * |
|
1878 | + * @return Array the spotter information |
|
1879 | + * |
|
1880 | + */ |
|
1881 | 1881 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
1882 | 1882 | { |
1883 | 1883 | global $global_query; |
@@ -1916,11 +1916,11 @@ discard block |
||
1916 | 1916 | } |
1917 | 1917 | |
1918 | 1918 | /** |
1919 | - * Gets all the highlight based on a aircraft registration |
|
1920 | - * |
|
1921 | - * @return String the highlight text |
|
1922 | - * |
|
1923 | - */ |
|
1919 | + * Gets all the highlight based on a aircraft registration |
|
1920 | + * |
|
1921 | + * @return String the highlight text |
|
1922 | + * |
|
1923 | + */ |
|
1924 | 1924 | public function getHighlightByRegistration($registration,$filter = array()) |
1925 | 1925 | { |
1926 | 1926 | global $global_query; |
@@ -1942,13 +1942,13 @@ discard block |
||
1942 | 1942 | |
1943 | 1943 | |
1944 | 1944 | /** |
1945 | - * Gets the squawk usage from squawk code |
|
1946 | - * |
|
1947 | - * @param String $squawk squawk code |
|
1948 | - * @param String $country country |
|
1949 | - * @return String usage |
|
1950 | - * |
|
1951 | - */ |
|
1945 | + * Gets the squawk usage from squawk code |
|
1946 | + * |
|
1947 | + * @param String $squawk squawk code |
|
1948 | + * @param String $country country |
|
1949 | + * @return String usage |
|
1950 | + * |
|
1951 | + */ |
|
1952 | 1952 | public function getSquawkUsage($squawk = '',$country = 'FR') |
1953 | 1953 | { |
1954 | 1954 | |
@@ -1969,12 +1969,12 @@ discard block |
||
1969 | 1969 | } |
1970 | 1970 | |
1971 | 1971 | /** |
1972 | - * Gets the airport icao from the iata |
|
1973 | - * |
|
1974 | - * @param String $airport_iata the iata code of the airport |
|
1975 | - * @return String airport iata |
|
1976 | - * |
|
1977 | - */ |
|
1972 | + * Gets the airport icao from the iata |
|
1973 | + * |
|
1974 | + * @param String $airport_iata the iata code of the airport |
|
1975 | + * @return String airport iata |
|
1976 | + * |
|
1977 | + */ |
|
1978 | 1978 | public function getAirportIcao($airport_iata = '') |
1979 | 1979 | { |
1980 | 1980 | |
@@ -1994,14 +1994,14 @@ discard block |
||
1994 | 1994 | } |
1995 | 1995 | |
1996 | 1996 | /** |
1997 | - * Gets the airport distance |
|
1998 | - * |
|
1999 | - * @param String $airport_icao the icao code of the airport |
|
2000 | - * @param Float $latitude the latitude |
|
2001 | - * @param Float $longitude the longitude |
|
2002 | - * @return Float distance to the airport |
|
2003 | - * |
|
2004 | - */ |
|
1997 | + * Gets the airport distance |
|
1998 | + * |
|
1999 | + * @param String $airport_icao the icao code of the airport |
|
2000 | + * @param Float $latitude the latitude |
|
2001 | + * @param Float $longitude the longitude |
|
2002 | + * @return Float distance to the airport |
|
2003 | + * |
|
2004 | + */ |
|
2005 | 2005 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
2006 | 2006 | { |
2007 | 2007 | |
@@ -2022,12 +2022,12 @@ discard block |
||
2022 | 2022 | } |
2023 | 2023 | |
2024 | 2024 | /** |
2025 | - * Gets the airport info based on the icao |
|
2026 | - * |
|
2027 | - * @param String $airport the icao code of the airport |
|
2028 | - * @return Array airport information |
|
2029 | - * |
|
2030 | - */ |
|
2025 | + * Gets the airport info based on the icao |
|
2026 | + * |
|
2027 | + * @param String $airport the icao code of the airport |
|
2028 | + * @return Array airport information |
|
2029 | + * |
|
2030 | + */ |
|
2031 | 2031 | public function getAllAirportInfo($airport = '') |
2032 | 2032 | { |
2033 | 2033 | |
@@ -2073,12 +2073,12 @@ discard block |
||
2073 | 2073 | } |
2074 | 2074 | |
2075 | 2075 | /** |
2076 | - * Gets the airport info based on the country |
|
2077 | - * |
|
2078 | - * @param Array $countries Airports countries |
|
2079 | - * @return Array airport information |
|
2080 | - * |
|
2081 | - */ |
|
2076 | + * Gets the airport info based on the country |
|
2077 | + * |
|
2078 | + * @param Array $countries Airports countries |
|
2079 | + * @return Array airport information |
|
2080 | + * |
|
2081 | + */ |
|
2082 | 2082 | public function getAllAirportInfobyCountry($countries) |
2083 | 2083 | { |
2084 | 2084 | $lst_countries = ''; |
@@ -2116,12 +2116,12 @@ discard block |
||
2116 | 2116 | } |
2117 | 2117 | |
2118 | 2118 | /** |
2119 | - * Gets airports info based on the coord |
|
2120 | - * |
|
2121 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2122 | - * @return Array airport information |
|
2123 | - * |
|
2124 | - */ |
|
2119 | + * Gets airports info based on the coord |
|
2120 | + * |
|
2121 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
2122 | + * @return Array airport information |
|
2123 | + * |
|
2124 | + */ |
|
2125 | 2125 | public function getAllAirportInfobyCoord($coord) |
2126 | 2126 | { |
2127 | 2127 | global $globalDBdriver; |
@@ -2152,12 +2152,12 @@ discard block |
||
2152 | 2152 | } |
2153 | 2153 | |
2154 | 2154 | /** |
2155 | - * Gets waypoints info based on the coord |
|
2156 | - * |
|
2157 | - * @param Array $coord waypoints coord |
|
2158 | - * @return Array airport information |
|
2159 | - * |
|
2160 | - */ |
|
2155 | + * Gets waypoints info based on the coord |
|
2156 | + * |
|
2157 | + * @param Array $coord waypoints coord |
|
2158 | + * @return Array airport information |
|
2159 | + * |
|
2160 | + */ |
|
2161 | 2161 | public function getAllWaypointsInfobyCoord($coord) |
2162 | 2162 | { |
2163 | 2163 | if (is_array($coord)) { |
@@ -2191,12 +2191,12 @@ discard block |
||
2191 | 2191 | |
2192 | 2192 | |
2193 | 2193 | /** |
2194 | - * Gets the airline info based on the icao code or iata code |
|
2195 | - * |
|
2196 | - * @param String $airline_icao the iata code of the airport |
|
2197 | - * @return Array airport information |
|
2198 | - * |
|
2199 | - */ |
|
2194 | + * Gets the airline info based on the icao code or iata code |
|
2195 | + * |
|
2196 | + * @param String $airline_icao the iata code of the airport |
|
2197 | + * @return Array airport information |
|
2198 | + * |
|
2199 | + */ |
|
2200 | 2200 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
2201 | 2201 | { |
2202 | 2202 | global $globalUseRealAirlines; |
@@ -2227,7 +2227,7 @@ discard block |
||
2227 | 2227 | } else { |
2228 | 2228 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
2229 | 2229 | } |
2230 | - /* |
|
2230 | + /* |
|
2231 | 2231 | $airline_array = array(); |
2232 | 2232 | $temp_array = array(); |
2233 | 2233 | |
@@ -2260,12 +2260,12 @@ discard block |
||
2260 | 2260 | } |
2261 | 2261 | |
2262 | 2262 | /** |
2263 | - * Gets the airline info based on the airline name |
|
2264 | - * |
|
2265 | - * @param String $airline_name the name of the airline |
|
2266 | - * @return Array airline information |
|
2267 | - * |
|
2268 | - */ |
|
2263 | + * Gets the airline info based on the airline name |
|
2264 | + * |
|
2265 | + * @param String $airline_name the name of the airline |
|
2266 | + * @return Array airline information |
|
2267 | + * |
|
2268 | + */ |
|
2269 | 2269 | public function getAllAirlineInfoByName($airline_name, $fromsource = NULL) |
2270 | 2270 | { |
2271 | 2271 | global $globalUseRealAirlines; |
@@ -2293,12 +2293,12 @@ discard block |
||
2293 | 2293 | |
2294 | 2294 | |
2295 | 2295 | /** |
2296 | - * Gets the aircraft info based on the aircraft type |
|
2297 | - * |
|
2298 | - * @param String $aircraft_type the aircraft type |
|
2299 | - * @return Array aircraft information |
|
2300 | - * |
|
2301 | - */ |
|
2296 | + * Gets the aircraft info based on the aircraft type |
|
2297 | + * |
|
2298 | + * @param String $aircraft_type the aircraft type |
|
2299 | + * @return Array aircraft information |
|
2300 | + * |
|
2301 | + */ |
|
2302 | 2302 | public function getAllAircraftInfo($aircraft_type) |
2303 | 2303 | { |
2304 | 2304 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2330,12 +2330,12 @@ discard block |
||
2330 | 2330 | } |
2331 | 2331 | |
2332 | 2332 | /** |
2333 | - * Gets the aircraft icao based on the aircraft name/type |
|
2334 | - * |
|
2335 | - * @param String $aircraft_type the aircraft type |
|
2336 | - * @return String aircraft information |
|
2337 | - * |
|
2338 | - */ |
|
2333 | + * Gets the aircraft icao based on the aircraft name/type |
|
2334 | + * |
|
2335 | + * @param String $aircraft_type the aircraft type |
|
2336 | + * @return String aircraft information |
|
2337 | + * |
|
2338 | + */ |
|
2339 | 2339 | public function getAircraftIcao($aircraft_type) |
2340 | 2340 | { |
2341 | 2341 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2360,12 +2360,12 @@ discard block |
||
2360 | 2360 | } |
2361 | 2361 | |
2362 | 2362 | /** |
2363 | - * Gets the aircraft info based on the aircraft modes |
|
2364 | - * |
|
2365 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
2366 | - * @return String aircraft type |
|
2367 | - * |
|
2368 | - */ |
|
2363 | + * Gets the aircraft info based on the aircraft modes |
|
2364 | + * |
|
2365 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
2366 | + * @return String aircraft type |
|
2367 | + * |
|
2368 | + */ |
|
2369 | 2369 | public function getAllAircraftType($aircraft_modes) |
2370 | 2370 | { |
2371 | 2371 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2385,12 +2385,12 @@ discard block |
||
2385 | 2385 | } |
2386 | 2386 | |
2387 | 2387 | /** |
2388 | - * Gets the aircraft info based on the aircraft registration |
|
2389 | - * |
|
2390 | - * @param String $registration the aircraft registration |
|
2391 | - * @return String aircraft type |
|
2392 | - * |
|
2393 | - */ |
|
2388 | + * Gets the aircraft info based on the aircraft registration |
|
2389 | + * |
|
2390 | + * @param String $registration the aircraft registration |
|
2391 | + * @return String aircraft type |
|
2392 | + * |
|
2393 | + */ |
|
2394 | 2394 | public function getAllAircraftTypeByRegistration($registration) |
2395 | 2395 | { |
2396 | 2396 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2408,12 +2408,12 @@ discard block |
||
2408 | 2408 | } |
2409 | 2409 | |
2410 | 2410 | /** |
2411 | - * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2412 | - * |
|
2413 | - * @param String $registration the aircraft registration |
|
2414 | - * @return Array spotter_id and flightaware_id |
|
2415 | - * |
|
2416 | - */ |
|
2411 | + * Gets the spotter_id and flightaware_id based on the aircraft registration |
|
2412 | + * |
|
2413 | + * @param String $registration the aircraft registration |
|
2414 | + * @return Array spotter_id and flightaware_id |
|
2415 | + * |
|
2416 | + */ |
|
2417 | 2417 | public function getAllIDByRegistration($registration) |
2418 | 2418 | { |
2419 | 2419 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2432,12 +2432,12 @@ discard block |
||
2432 | 2432 | } |
2433 | 2433 | |
2434 | 2434 | /** |
2435 | - * Gets correct aircraft operator code |
|
2436 | - * |
|
2437 | - * @param String $operator the aircraft operator code (callsign) |
|
2438 | - * @return String aircraft operator code |
|
2439 | - * |
|
2440 | - */ |
|
2435 | + * Gets correct aircraft operator code |
|
2436 | + * |
|
2437 | + * @param String $operator the aircraft operator code (callsign) |
|
2438 | + * @return String aircraft operator code |
|
2439 | + * |
|
2440 | + */ |
|
2441 | 2441 | public function getOperator($operator) |
2442 | 2442 | { |
2443 | 2443 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2454,16 +2454,16 @@ discard block |
||
2454 | 2454 | } |
2455 | 2455 | |
2456 | 2456 | /** |
2457 | - * Gets the aircraft route based on the aircraft callsign |
|
2458 | - * |
|
2459 | - * @param String $callsign the aircraft callsign |
|
2460 | - * @return Array aircraft type |
|
2461 | - * |
|
2462 | - */ |
|
2457 | + * Gets the aircraft route based on the aircraft callsign |
|
2458 | + * |
|
2459 | + * @param String $callsign the aircraft callsign |
|
2460 | + * @return Array aircraft type |
|
2461 | + * |
|
2462 | + */ |
|
2463 | 2463 | public function getRouteInfo($callsign) |
2464 | 2464 | { |
2465 | 2465 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
2466 | - if ($callsign == '') return array(); |
|
2466 | + if ($callsign == '') return array(); |
|
2467 | 2467 | $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"; |
2468 | 2468 | |
2469 | 2469 | $sth = $this->db->prepare($query); |
@@ -2477,12 +2477,12 @@ discard block |
||
2477 | 2477 | } |
2478 | 2478 | |
2479 | 2479 | /** |
2480 | - * Gets the aircraft info based on the aircraft registration |
|
2481 | - * |
|
2482 | - * @param String $registration the aircraft registration |
|
2483 | - * @return Array aircraft information |
|
2484 | - * |
|
2485 | - */ |
|
2480 | + * Gets the aircraft info based on the aircraft registration |
|
2481 | + * |
|
2482 | + * @param String $registration the aircraft registration |
|
2483 | + * @return Array aircraft information |
|
2484 | + * |
|
2485 | + */ |
|
2486 | 2486 | public function getAircraftInfoByRegistration($registration) |
2487 | 2487 | { |
2488 | 2488 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2509,12 +2509,12 @@ discard block |
||
2509 | 2509 | } |
2510 | 2510 | |
2511 | 2511 | /** |
2512 | - * Gets the aircraft owner & base based on the aircraft registration |
|
2513 | - * |
|
2514 | - * @param String $registration the aircraft registration |
|
2515 | - * @return Array aircraft information |
|
2516 | - * |
|
2517 | - */ |
|
2512 | + * Gets the aircraft owner & base based on the aircraft registration |
|
2513 | + * |
|
2514 | + * @param String $registration the aircraft registration |
|
2515 | + * @return Array aircraft information |
|
2516 | + * |
|
2517 | + */ |
|
2518 | 2518 | public function getAircraftOwnerByRegistration($registration) |
2519 | 2519 | { |
2520 | 2520 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2531,11 +2531,11 @@ discard block |
||
2531 | 2531 | |
2532 | 2532 | |
2533 | 2533 | /** |
2534 | - * Gets all flights (but with only little info) |
|
2535 | - * |
|
2536 | - * @return Array basic flight information |
|
2537 | - * |
|
2538 | - */ |
|
2534 | + * Gets all flights (but with only little info) |
|
2535 | + * |
|
2536 | + * @return Array basic flight information |
|
2537 | + * |
|
2538 | + */ |
|
2539 | 2539 | public function getAllFlightsforSitemap() |
2540 | 2540 | { |
2541 | 2541 | //$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 "; |
@@ -2543,7 +2543,7 @@ discard block |
||
2543 | 2543 | |
2544 | 2544 | $sth = $this->db->prepare($query); |
2545 | 2545 | $sth->execute(); |
2546 | - /* |
|
2546 | + /* |
|
2547 | 2547 | $flight_array = array(); |
2548 | 2548 | $temp_array = array(); |
2549 | 2549 | |
@@ -2565,11 +2565,11 @@ discard block |
||
2565 | 2565 | } |
2566 | 2566 | |
2567 | 2567 | /** |
2568 | - * Gets a list of all aircraft manufacturers |
|
2569 | - * |
|
2570 | - * @return Array list of aircraft types |
|
2571 | - * |
|
2572 | - */ |
|
2568 | + * Gets a list of all aircraft manufacturers |
|
2569 | + * |
|
2570 | + * @return Array list of aircraft types |
|
2571 | + * |
|
2572 | + */ |
|
2573 | 2573 | public function getAllManufacturers() |
2574 | 2574 | { |
2575 | 2575 | /* |
@@ -2598,11 +2598,11 @@ discard block |
||
2598 | 2598 | |
2599 | 2599 | |
2600 | 2600 | /** |
2601 | - * Gets a list of all aircraft types |
|
2602 | - * |
|
2603 | - * @return Array list of aircraft types |
|
2604 | - * |
|
2605 | - */ |
|
2601 | + * Gets a list of all aircraft types |
|
2602 | + * |
|
2603 | + * @return Array list of aircraft types |
|
2604 | + * |
|
2605 | + */ |
|
2606 | 2606 | public function getAllAircraftTypes($filters = array()) |
2607 | 2607 | { |
2608 | 2608 | /* |
@@ -2637,11 +2637,11 @@ discard block |
||
2637 | 2637 | |
2638 | 2638 | |
2639 | 2639 | /** |
2640 | - * Gets a list of all aircraft registrations |
|
2641 | - * |
|
2642 | - * @return Array list of aircraft registrations |
|
2643 | - * |
|
2644 | - */ |
|
2640 | + * Gets a list of all aircraft registrations |
|
2641 | + * |
|
2642 | + * @return Array list of aircraft registrations |
|
2643 | + * |
|
2644 | + */ |
|
2645 | 2645 | public function getAllAircraftRegistrations($filters = array()) |
2646 | 2646 | { |
2647 | 2647 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2666,12 +2666,12 @@ discard block |
||
2666 | 2666 | } |
2667 | 2667 | |
2668 | 2668 | /** |
2669 | - * Gets all source name |
|
2670 | - * |
|
2671 | - * @param String type format of source |
|
2672 | - * @return Array list of source name |
|
2673 | - * |
|
2674 | - */ |
|
2669 | + * Gets all source name |
|
2670 | + * |
|
2671 | + * @param String type format of source |
|
2672 | + * @return Array list of source name |
|
2673 | + * |
|
2674 | + */ |
|
2675 | 2675 | public function getAllSourceName($type = '',$filters = array()) |
2676 | 2676 | { |
2677 | 2677 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2702,11 +2702,11 @@ discard block |
||
2702 | 2702 | |
2703 | 2703 | |
2704 | 2704 | /** |
2705 | - * Gets a list of all airline names |
|
2706 | - * |
|
2707 | - * @return Array list of airline names |
|
2708 | - * |
|
2709 | - */ |
|
2705 | + * Gets a list of all airline names |
|
2706 | + * |
|
2707 | + * @return Array list of airline names |
|
2708 | + * |
|
2709 | + */ |
|
2710 | 2710 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
2711 | 2711 | { |
2712 | 2712 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2755,11 +2755,11 @@ discard block |
||
2755 | 2755 | } |
2756 | 2756 | |
2757 | 2757 | /** |
2758 | - * Gets a list of all alliance names |
|
2759 | - * |
|
2760 | - * @return Array list of alliance names |
|
2761 | - * |
|
2762 | - */ |
|
2758 | + * Gets a list of all alliance names |
|
2759 | + * |
|
2760 | + * @return Array list of alliance names |
|
2761 | + * |
|
2762 | + */ |
|
2763 | 2763 | public function getAllAllianceNames($forsource = NULL,$filters = array()) |
2764 | 2764 | { |
2765 | 2765 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2784,11 +2784,11 @@ discard block |
||
2784 | 2784 | } |
2785 | 2785 | |
2786 | 2786 | /** |
2787 | - * Gets a list of all airline countries |
|
2788 | - * |
|
2789 | - * @return Array list of airline countries |
|
2790 | - * |
|
2791 | - */ |
|
2787 | + * Gets a list of all airline countries |
|
2788 | + * |
|
2789 | + * @return Array list of airline countries |
|
2790 | + * |
|
2791 | + */ |
|
2792 | 2792 | public function getAllAirlineCountries($filters = array()) |
2793 | 2793 | { |
2794 | 2794 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2816,11 +2816,11 @@ discard block |
||
2816 | 2816 | |
2817 | 2817 | |
2818 | 2818 | /** |
2819 | - * Gets a list of all departure & arrival names |
|
2820 | - * |
|
2821 | - * @return Array list of airport names |
|
2822 | - * |
|
2823 | - */ |
|
2819 | + * Gets a list of all departure & arrival names |
|
2820 | + * |
|
2821 | + * @return Array list of airport names |
|
2822 | + * |
|
2823 | + */ |
|
2824 | 2824 | public function getAllAirportNames($filters = array()) |
2825 | 2825 | { |
2826 | 2826 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2869,11 +2869,11 @@ discard block |
||
2869 | 2869 | |
2870 | 2870 | |
2871 | 2871 | /** |
2872 | - * Gets a list of all departure & arrival airport countries |
|
2873 | - * |
|
2874 | - * @return Array list of airport countries |
|
2875 | - * |
|
2876 | - */ |
|
2872 | + * Gets a list of all departure & arrival airport countries |
|
2873 | + * |
|
2874 | + * @return Array list of airport countries |
|
2875 | + * |
|
2876 | + */ |
|
2877 | 2877 | public function getAllAirportCountries($filters = array()) |
2878 | 2878 | { |
2879 | 2879 | $airport_array = array(); |
@@ -2921,11 +2921,11 @@ discard block |
||
2921 | 2921 | |
2922 | 2922 | |
2923 | 2923 | /** |
2924 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2925 | - * |
|
2926 | - * @return Array list of countries |
|
2927 | - * |
|
2928 | - */ |
|
2924 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2925 | + * |
|
2926 | + * @return Array list of countries |
|
2927 | + * |
|
2928 | + */ |
|
2929 | 2929 | public function getAllCountries($filters = array()) |
2930 | 2930 | { |
2931 | 2931 | $Connection= new Connection($this->db); |
@@ -3002,11 +3002,11 @@ discard block |
||
3002 | 3002 | |
3003 | 3003 | |
3004 | 3004 | /** |
3005 | - * Gets a list of all idents/callsigns |
|
3006 | - * |
|
3007 | - * @return Array list of ident/callsign names |
|
3008 | - * |
|
3009 | - */ |
|
3005 | + * Gets a list of all idents/callsigns |
|
3006 | + * |
|
3007 | + * @return Array list of ident/callsign names |
|
3008 | + * |
|
3009 | + */ |
|
3010 | 3010 | public function getAllIdents($filters = array()) |
3011 | 3011 | { |
3012 | 3012 | $filter_query = $this->getFilter($filters,true,true); |
@@ -3030,9 +3030,9 @@ discard block |
||
3030 | 3030 | } |
3031 | 3031 | |
3032 | 3032 | /** |
3033 | - * Get a list of flights from airport since 7 days |
|
3034 | - * @return Array number, icao, name and city of airports |
|
3035 | - */ |
|
3033 | + * Get a list of flights from airport since 7 days |
|
3034 | + * @return Array number, icao, name and city of airports |
|
3035 | + */ |
|
3036 | 3036 | |
3037 | 3037 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
3038 | 3038 | global $globalTimezone, $globalDBdriver; |
@@ -3063,9 +3063,9 @@ discard block |
||
3063 | 3063 | } |
3064 | 3064 | |
3065 | 3065 | /** |
3066 | - * Get a list of flights from airport since 7 days |
|
3067 | - * @return Array number, icao, name and city of airports |
|
3068 | - */ |
|
3066 | + * Get a list of flights from airport since 7 days |
|
3067 | + * @return Array number, icao, name and city of airports |
|
3068 | + */ |
|
3069 | 3069 | |
3070 | 3070 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
3071 | 3071 | global $globalTimezone, $globalDBdriver; |
@@ -3095,9 +3095,9 @@ discard block |
||
3095 | 3095 | } |
3096 | 3096 | |
3097 | 3097 | /** |
3098 | - * Get a list of flights from detected airport since 7 days |
|
3099 | - * @return Array number, icao, name and city of airports |
|
3100 | - */ |
|
3098 | + * Get a list of flights from detected airport since 7 days |
|
3099 | + * @return Array number, icao, name and city of airports |
|
3100 | + */ |
|
3101 | 3101 | |
3102 | 3102 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '', $filters = array()) { |
3103 | 3103 | global $globalTimezone, $globalDBdriver; |
@@ -3135,9 +3135,9 @@ discard block |
||
3135 | 3135 | } |
3136 | 3136 | |
3137 | 3137 | /** |
3138 | - * Get a list of flights from detected airport since 7 days |
|
3139 | - * @return Array number, icao, name and city of airports |
|
3140 | - */ |
|
3138 | + * Get a list of flights from detected airport since 7 days |
|
3139 | + * @return Array number, icao, name and city of airports |
|
3140 | + */ |
|
3141 | 3141 | |
3142 | 3142 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
3143 | 3143 | global $globalTimezone, $globalDBdriver; |
@@ -3179,9 +3179,9 @@ discard block |
||
3179 | 3179 | |
3180 | 3180 | |
3181 | 3181 | /** |
3182 | - * Get a list of flights to airport since 7 days |
|
3183 | - * @return Array number, icao, name and city of airports |
|
3184 | - */ |
|
3182 | + * Get a list of flights to airport since 7 days |
|
3183 | + * @return Array number, icao, name and city of airports |
|
3184 | + */ |
|
3185 | 3185 | |
3186 | 3186 | public function getLast7DaysAirportsArrival($airport_icao = '', $filters = array()) { |
3187 | 3187 | global $globalTimezone, $globalDBdriver; |
@@ -3214,9 +3214,9 @@ discard block |
||
3214 | 3214 | |
3215 | 3215 | |
3216 | 3216 | /** |
3217 | - * Get a list of flights detected to airport since 7 days |
|
3218 | - * @return Array number, icao, name and city of airports |
|
3219 | - */ |
|
3217 | + * Get a list of flights detected to airport since 7 days |
|
3218 | + * @return Array number, icao, name and city of airports |
|
3219 | + */ |
|
3220 | 3220 | |
3221 | 3221 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '',$filters = array()) { |
3222 | 3222 | global $globalTimezone, $globalDBdriver; |
@@ -3257,9 +3257,9 @@ discard block |
||
3257 | 3257 | |
3258 | 3258 | |
3259 | 3259 | /** |
3260 | - * Get a list of flights to airport since 7 days |
|
3261 | - * @return Array number, icao, name and city of airports |
|
3262 | - */ |
|
3260 | + * Get a list of flights to airport since 7 days |
|
3261 | + * @return Array number, icao, name and city of airports |
|
3262 | + */ |
|
3263 | 3263 | |
3264 | 3264 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
3265 | 3265 | global $globalTimezone, $globalDBdriver; |
@@ -3291,9 +3291,9 @@ discard block |
||
3291 | 3291 | |
3292 | 3292 | |
3293 | 3293 | /** |
3294 | - * Get a list of flights detected to airport since 7 days |
|
3295 | - * @return Array number, icao, name and city of airports |
|
3296 | - */ |
|
3294 | + * Get a list of flights detected to airport since 7 days |
|
3295 | + * @return Array number, icao, name and city of airports |
|
3296 | + */ |
|
3297 | 3297 | |
3298 | 3298 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
3299 | 3299 | global $globalTimezone, $globalDBdriver; |
@@ -3337,11 +3337,11 @@ discard block |
||
3337 | 3337 | |
3338 | 3338 | |
3339 | 3339 | /** |
3340 | - * Gets a list of all dates |
|
3341 | - * |
|
3342 | - * @return Array list of date names |
|
3343 | - * |
|
3344 | - */ |
|
3340 | + * Gets a list of all dates |
|
3341 | + * |
|
3342 | + * @return Array list of date names |
|
3343 | + * |
|
3344 | + */ |
|
3345 | 3345 | public function getAllDates() |
3346 | 3346 | { |
3347 | 3347 | global $globalTimezone, $globalDBdriver; |
@@ -3382,11 +3382,11 @@ discard block |
||
3382 | 3382 | |
3383 | 3383 | |
3384 | 3384 | /** |
3385 | - * Gets all route combinations |
|
3386 | - * |
|
3387 | - * @return Array the route list |
|
3388 | - * |
|
3389 | - */ |
|
3385 | + * Gets all route combinations |
|
3386 | + * |
|
3387 | + * @return Array the route list |
|
3388 | + * |
|
3389 | + */ |
|
3390 | 3390 | public function getAllRoutes() |
3391 | 3391 | { |
3392 | 3392 | $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 |
@@ -3412,13 +3412,13 @@ discard block |
||
3412 | 3412 | } |
3413 | 3413 | |
3414 | 3414 | /** |
3415 | - * Update ident spotter data |
|
3416 | - * |
|
3417 | - * @param String $flightaware_id the ID from flightaware |
|
3418 | - * @param String $ident the flight ident |
|
3419 | - * @return String success or false |
|
3420 | - * |
|
3421 | - */ |
|
3415 | + * Update ident spotter data |
|
3416 | + * |
|
3417 | + * @param String $flightaware_id the ID from flightaware |
|
3418 | + * @param String $ident the flight ident |
|
3419 | + * @return String success or false |
|
3420 | + * |
|
3421 | + */ |
|
3422 | 3422 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
3423 | 3423 | { |
3424 | 3424 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3439,14 +3439,14 @@ discard block |
||
3439 | 3439 | } else { |
3440 | 3440 | $airline_array = $this->getAllAirlineInfo("NA"); |
3441 | 3441 | } |
3442 | - $airline_name = $airline_array[0]['name']; |
|
3443 | - $airline_icao = $airline_array[0]['icao']; |
|
3444 | - $airline_country = $airline_array[0]['country']; |
|
3445 | - $airline_type = $airline_array[0]['type']; |
|
3442 | + $airline_name = $airline_array[0]['name']; |
|
3443 | + $airline_icao = $airline_array[0]['icao']; |
|
3444 | + $airline_country = $airline_array[0]['country']; |
|
3445 | + $airline_type = $airline_array[0]['type']; |
|
3446 | 3446 | |
3447 | 3447 | |
3448 | 3448 | $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'; |
3449 | - $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); |
|
3449 | + $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); |
|
3450 | 3450 | |
3451 | 3451 | try { |
3452 | 3452 | $sth = $this->db->prepare($query); |
@@ -3459,19 +3459,19 @@ discard block |
||
3459 | 3459 | |
3460 | 3460 | } |
3461 | 3461 | /** |
3462 | - * Update latest spotter data |
|
3463 | - * |
|
3464 | - * @param String $flightaware_id the ID from flightaware |
|
3465 | - * @param String $ident the flight ident |
|
3466 | - * @param String $arrival_airport_icao the arrival airport |
|
3467 | - * @return String success or false |
|
3468 | - * |
|
3469 | - */ |
|
3462 | + * Update latest spotter data |
|
3463 | + * |
|
3464 | + * @param String $flightaware_id the ID from flightaware |
|
3465 | + * @param String $ident the flight ident |
|
3466 | + * @param String $arrival_airport_icao the arrival airport |
|
3467 | + * @return String success or false |
|
3468 | + * |
|
3469 | + */ |
|
3470 | 3470 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
3471 | 3471 | { |
3472 | 3472 | if ($groundspeed == '') $groundspeed = NULL; |
3473 | 3473 | $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'; |
3474 | - $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); |
|
3474 | + $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); |
|
3475 | 3475 | |
3476 | 3476 | try { |
3477 | 3477 | $sth = $this->db->prepare($query); |
@@ -3485,32 +3485,32 @@ discard block |
||
3485 | 3485 | } |
3486 | 3486 | |
3487 | 3487 | /** |
3488 | - * Adds a new spotter data |
|
3489 | - * |
|
3490 | - * @param String $flightaware_id the ID from flightaware |
|
3491 | - * @param String $ident the flight ident |
|
3492 | - * @param String $aircraft_icao the aircraft type |
|
3493 | - * @param String $departure_airport_icao the departure airport |
|
3494 | - * @param String $arrival_airport_icao the arrival airport |
|
3495 | - * @param String $latitude latitude of flight |
|
3496 | - * @param String $longitude latitude of flight |
|
3497 | - * @param String $waypoints waypoints of flight |
|
3498 | - * @param String $altitude altitude of flight |
|
3499 | - * @param String $heading heading of flight |
|
3500 | - * @param String $groundspeed speed of flight |
|
3501 | - * @param String $date date of flight |
|
3502 | - * @param String $departure_airport_time departure time of flight |
|
3503 | - * @param String $arrival_airport_time arrival time of flight |
|
3504 | - * @param String $squawk squawk code of flight |
|
3505 | - * @param String $route_stop route stop of flight |
|
3506 | - * @param String $highlight highlight or not |
|
3507 | - * @param String $ModeS ModesS code of flight |
|
3508 | - * @param String $registration registration code of flight |
|
3509 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3510 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3511 | - * @param String $verticalrate vertival rate of flight |
|
3512 | - * @return String success or false |
|
3513 | - */ |
|
3488 | + * Adds a new spotter data |
|
3489 | + * |
|
3490 | + * @param String $flightaware_id the ID from flightaware |
|
3491 | + * @param String $ident the flight ident |
|
3492 | + * @param String $aircraft_icao the aircraft type |
|
3493 | + * @param String $departure_airport_icao the departure airport |
|
3494 | + * @param String $arrival_airport_icao the arrival airport |
|
3495 | + * @param String $latitude latitude of flight |
|
3496 | + * @param String $longitude latitude of flight |
|
3497 | + * @param String $waypoints waypoints of flight |
|
3498 | + * @param String $altitude altitude of flight |
|
3499 | + * @param String $heading heading of flight |
|
3500 | + * @param String $groundspeed speed of flight |
|
3501 | + * @param String $date date of flight |
|
3502 | + * @param String $departure_airport_time departure time of flight |
|
3503 | + * @param String $arrival_airport_time arrival time of flight |
|
3504 | + * @param String $squawk squawk code of flight |
|
3505 | + * @param String $route_stop route stop of flight |
|
3506 | + * @param String $highlight highlight or not |
|
3507 | + * @param String $ModeS ModesS code of flight |
|
3508 | + * @param String $registration registration code of flight |
|
3509 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3510 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3511 | + * @param String $verticalrate vertival rate of flight |
|
3512 | + * @return String success or false |
|
3513 | + */ |
|
3514 | 3514 | 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 = '') |
3515 | 3515 | { |
3516 | 3516 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3725,8 +3725,8 @@ discard block |
||
3725 | 3725 | |
3726 | 3726 | if ($globalIVAO && $aircraft_icao != '') |
3727 | 3727 | { |
3728 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3729 | - else $airline_icao = ''; |
|
3728 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3729 | + else $airline_icao = ''; |
|
3730 | 3730 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
3731 | 3731 | if (!isset($image_array[0]['registration'])) |
3732 | 3732 | { |
@@ -3757,53 +3757,53 @@ discard block |
||
3757 | 3757 | |
3758 | 3758 | if (count($airline_array) == 0) |
3759 | 3759 | { |
3760 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
3761 | - } |
|
3762 | - if (count($aircraft_array) == 0) |
|
3763 | - { |
|
3764 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3765 | - } |
|
3766 | - if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3767 | - { |
|
3768 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3769 | - } |
|
3770 | - if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3771 | - { |
|
3772 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3773 | - } |
|
3774 | - if ($registration == '') $registration = 'NA'; |
|
3775 | - if ($latitude == '' && $longitude == '') { |
|
3776 | - $latitude = 0; |
|
3777 | - $longitude = 0; |
|
3778 | - } |
|
3779 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3780 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3781 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3782 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3783 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3784 | - $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) |
|
3760 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
3761 | + } |
|
3762 | + if (count($aircraft_array) == 0) |
|
3763 | + { |
|
3764 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3765 | + } |
|
3766 | + if (count($departure_airport_array) == 0 || $departure_airport_array[0]['icao'] == '' || $departure_airport_icao == '') |
|
3767 | + { |
|
3768 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3769 | + } |
|
3770 | + if (count($arrival_airport_array) == 0 || $arrival_airport_array[0]['icao'] == '' || $arrival_airport_icao == '') |
|
3771 | + { |
|
3772 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3773 | + } |
|
3774 | + if ($registration == '') $registration = 'NA'; |
|
3775 | + if ($latitude == '' && $longitude == '') { |
|
3776 | + $latitude = 0; |
|
3777 | + $longitude = 0; |
|
3778 | + } |
|
3779 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3780 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3781 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3782 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3783 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3784 | + $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) |
|
3785 | 3785 | 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)"; |
3786 | 3786 | |
3787 | - $airline_name = $airline_array[0]['name']; |
|
3788 | - $airline_icao = $airline_array[0]['icao']; |
|
3789 | - $airline_country = $airline_array[0]['country']; |
|
3790 | - $airline_type = $airline_array[0]['type']; |
|
3787 | + $airline_name = $airline_array[0]['name']; |
|
3788 | + $airline_icao = $airline_array[0]['icao']; |
|
3789 | + $airline_country = $airline_array[0]['country']; |
|
3790 | + $airline_type = $airline_array[0]['type']; |
|
3791 | 3791 | if ($airline_type == '') { |
3792 | 3792 | $timeelapsed = microtime(true); |
3793 | 3793 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
3794 | 3794 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
3795 | 3795 | } |
3796 | 3796 | if ($airline_type == null) $airline_type = ''; |
3797 | - $aircraft_type = $aircraft_array[0]['type']; |
|
3798 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3799 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
3800 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
3801 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
3797 | + $aircraft_type = $aircraft_array[0]['type']; |
|
3798 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3799 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
3800 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
3801 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
3802 | 3802 | |
3803 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3804 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3805 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3806 | - $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); |
|
3803 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3804 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3805 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3806 | + $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); |
|
3807 | 3807 | |
3808 | 3808 | try { |
3809 | 3809 | |
@@ -3811,7 +3811,7 @@ discard block |
||
3811 | 3811 | $sth->execute($query_values); |
3812 | 3812 | $this->db = null; |
3813 | 3813 | } catch (PDOException $e) { |
3814 | - return "error : ".$e->getMessage(); |
|
3814 | + return "error : ".$e->getMessage(); |
|
3815 | 3815 | } |
3816 | 3816 | |
3817 | 3817 | return "success"; |
@@ -3820,11 +3820,11 @@ discard block |
||
3820 | 3820 | |
3821 | 3821 | |
3822 | 3822 | /** |
3823 | - * Gets the aircraft ident within the last hour |
|
3824 | - * |
|
3825 | - * @return String the ident |
|
3826 | - * |
|
3827 | - */ |
|
3823 | + * Gets the aircraft ident within the last hour |
|
3824 | + * |
|
3825 | + * @return String the ident |
|
3826 | + * |
|
3827 | + */ |
|
3828 | 3828 | public function getIdentFromLastHour($ident) |
3829 | 3829 | { |
3830 | 3830 | global $globalDBdriver, $globalTimezone; |
@@ -3840,11 +3840,11 @@ discard block |
||
3840 | 3840 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
3841 | 3841 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
3842 | 3842 | $query_data = array(':ident' => $ident); |
3843 | - } |
|
3843 | + } |
|
3844 | 3844 | |
3845 | 3845 | $sth = $this->db->prepare($query); |
3846 | 3846 | $sth->execute($query_data); |
3847 | - $ident_result=''; |
|
3847 | + $ident_result=''; |
|
3848 | 3848 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
3849 | 3849 | { |
3850 | 3850 | $ident_result = $row['ident']; |
@@ -3855,11 +3855,11 @@ discard block |
||
3855 | 3855 | |
3856 | 3856 | |
3857 | 3857 | /** |
3858 | - * Gets the aircraft data from the last 20 seconds |
|
3859 | - * |
|
3860 | - * @return Array the spotter data |
|
3861 | - * |
|
3862 | - */ |
|
3858 | + * Gets the aircraft data from the last 20 seconds |
|
3859 | + * |
|
3860 | + * @return Array the spotter data |
|
3861 | + * |
|
3862 | + */ |
|
3863 | 3863 | public function getRealTimeData($q = '') |
3864 | 3864 | { |
3865 | 3865 | global $globalDBdriver; |
@@ -3903,11 +3903,11 @@ discard block |
||
3903 | 3903 | |
3904 | 3904 | |
3905 | 3905 | /** |
3906 | - * Gets all airlines that have flown over |
|
3907 | - * |
|
3908 | - * @return Array the airline list |
|
3909 | - * |
|
3910 | - */ |
|
3906 | + * Gets all airlines that have flown over |
|
3907 | + * |
|
3908 | + * @return Array the airline list |
|
3909 | + * |
|
3910 | + */ |
|
3911 | 3911 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(), $year = '', $month = '', $day = '') |
3912 | 3912 | { |
3913 | 3913 | global $globalDBdriver; |
@@ -3921,7 +3921,7 @@ discard block |
||
3921 | 3921 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
3922 | 3922 | } |
3923 | 3923 | } |
3924 | - if ($sincedate != '') { |
|
3924 | + if ($sincedate != '') { |
|
3925 | 3925 | if ($globalDBdriver == 'mysql') { |
3926 | 3926 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
3927 | 3927 | } else { |
@@ -3975,26 +3975,26 @@ discard block |
||
3975 | 3975 | } |
3976 | 3976 | |
3977 | 3977 | /** |
3978 | - * Gets all pilots that have flown over |
|
3979 | - * |
|
3980 | - * @return Array the pilots list |
|
3981 | - * |
|
3982 | - */ |
|
3978 | + * Gets all pilots that have flown over |
|
3979 | + * |
|
3980 | + * @return Array the pilots list |
|
3981 | + * |
|
3982 | + */ |
|
3983 | 3983 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '',$day = '') |
3984 | 3984 | { |
3985 | 3985 | global $globalDBdriver; |
3986 | 3986 | $filter_query = $this->getFilter($filters,true,true); |
3987 | 3987 | $query = "SELECT DISTINCT spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count, spotter_output.format_source |
3988 | 3988 | FROM spotter_output".$filter_query." spotter_output.pilot_id <> '' "; |
3989 | - if ($olderthanmonths > 0) { |
|
3990 | - if ($globalDBdriver == 'mysql') { |
|
3989 | + if ($olderthanmonths > 0) { |
|
3990 | + if ($globalDBdriver == 'mysql') { |
|
3991 | 3991 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
3992 | 3992 | } else { |
3993 | 3993 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3994 | 3994 | } |
3995 | 3995 | } |
3996 | - if ($sincedate != '') { |
|
3997 | - if ($globalDBdriver == 'mysql') { |
|
3996 | + if ($sincedate != '') { |
|
3997 | + if ($globalDBdriver == 'mysql') { |
|
3998 | 3998 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3999 | 3999 | } else { |
4000 | 4000 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4049,25 +4049,25 @@ discard block |
||
4049 | 4049 | } |
4050 | 4050 | |
4051 | 4051 | /** |
4052 | - * Gets all pilots that have flown over |
|
4053 | - * |
|
4054 | - * @return Array the pilots list |
|
4055 | - * |
|
4056 | - */ |
|
4052 | + * Gets all pilots that have flown over |
|
4053 | + * |
|
4054 | + * @return Array the pilots list |
|
4055 | + * |
|
4056 | + */ |
|
4057 | 4057 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
4058 | 4058 | { |
4059 | 4059 | global $globalDBdriver; |
4060 | 4060 | $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 |
4061 | 4061 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
4062 | - if ($olderthanmonths > 0) { |
|
4063 | - if ($globalDBdriver == 'mysql') { |
|
4062 | + if ($olderthanmonths > 0) { |
|
4063 | + if ($globalDBdriver == 'mysql') { |
|
4064 | 4064 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4065 | 4065 | } else { |
4066 | 4066 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4067 | 4067 | } |
4068 | 4068 | } |
4069 | - if ($sincedate != '') { |
|
4070 | - if ($globalDBdriver == 'mysql') { |
|
4069 | + if ($sincedate != '') { |
|
4070 | + if ($globalDBdriver == 'mysql') { |
|
4071 | 4071 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4072 | 4072 | } else { |
4073 | 4073 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4096,26 +4096,26 @@ discard block |
||
4096 | 4096 | } |
4097 | 4097 | |
4098 | 4098 | /** |
4099 | - * Gets all owner that have flown over |
|
4100 | - * |
|
4101 | - * @return Array the pilots list |
|
4102 | - * |
|
4103 | - */ |
|
4099 | + * Gets all owner that have flown over |
|
4100 | + * |
|
4101 | + * @return Array the pilots list |
|
4102 | + * |
|
4103 | + */ |
|
4104 | 4104 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
4105 | 4105 | { |
4106 | 4106 | global $globalDBdriver; |
4107 | 4107 | $filter_query = $this->getFilter($filters,true,true); |
4108 | 4108 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4109 | 4109 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL"; |
4110 | - if ($olderthanmonths > 0) { |
|
4111 | - if ($globalDBdriver == 'mysql') { |
|
4110 | + if ($olderthanmonths > 0) { |
|
4111 | + if ($globalDBdriver == 'mysql') { |
|
4112 | 4112 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
4113 | 4113 | } else { |
4114 | 4114 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4115 | 4115 | } |
4116 | 4116 | } |
4117 | - if ($sincedate != '') { |
|
4118 | - if ($globalDBdriver == 'mysql') { |
|
4117 | + if ($sincedate != '') { |
|
4118 | + if ($globalDBdriver == 'mysql') { |
|
4119 | 4119 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4120 | 4120 | } else { |
4121 | 4121 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4166,26 +4166,26 @@ discard block |
||
4166 | 4166 | } |
4167 | 4167 | |
4168 | 4168 | /** |
4169 | - * Gets all owner that have flown over |
|
4170 | - * |
|
4171 | - * @return Array the pilots list |
|
4172 | - * |
|
4173 | - */ |
|
4169 | + * Gets all owner that have flown over |
|
4170 | + * |
|
4171 | + * @return Array the pilots list |
|
4172 | + * |
|
4173 | + */ |
|
4174 | 4174 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
4175 | 4175 | { |
4176 | 4176 | global $globalDBdriver; |
4177 | 4177 | $filter_query = $this->getFilter($filters,true,true); |
4178 | 4178 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
4179 | 4179 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
4180 | - if ($olderthanmonths > 0) { |
|
4181 | - if ($globalDBdriver == 'mysql') { |
|
4180 | + if ($olderthanmonths > 0) { |
|
4181 | + if ($globalDBdriver == 'mysql') { |
|
4182 | 4182 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
4183 | 4183 | } else { |
4184 | 4184 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
4185 | 4185 | } |
4186 | 4186 | } |
4187 | - if ($sincedate != '') { |
|
4188 | - if ($globalDBdriver == 'mysql') { |
|
4187 | + if ($sincedate != '') { |
|
4188 | + if ($globalDBdriver == 'mysql') { |
|
4189 | 4189 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
4190 | 4190 | } else { |
4191 | 4191 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4212,11 +4212,11 @@ discard block |
||
4212 | 4212 | } |
4213 | 4213 | |
4214 | 4214 | /** |
4215 | - * Gets all airlines that have flown over by aircraft |
|
4216 | - * |
|
4217 | - * @return Array the airline list |
|
4218 | - * |
|
4219 | - */ |
|
4215 | + * Gets all airlines that have flown over by aircraft |
|
4216 | + * |
|
4217 | + * @return Array the airline list |
|
4218 | + * |
|
4219 | + */ |
|
4220 | 4220 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
4221 | 4221 | { |
4222 | 4222 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4248,11 +4248,11 @@ discard block |
||
4248 | 4248 | |
4249 | 4249 | |
4250 | 4250 | /** |
4251 | - * Gets all airline countries that have flown over by aircraft |
|
4252 | - * |
|
4253 | - * @return Array the airline country list |
|
4254 | - * |
|
4255 | - */ |
|
4251 | + * Gets all airline countries that have flown over by aircraft |
|
4252 | + * |
|
4253 | + * @return Array the airline country list |
|
4254 | + * |
|
4255 | + */ |
|
4256 | 4256 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
4257 | 4257 | { |
4258 | 4258 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -4284,11 +4284,11 @@ discard block |
||
4284 | 4284 | |
4285 | 4285 | |
4286 | 4286 | /** |
4287 | - * Gets all airlines that have flown over by airport |
|
4288 | - * |
|
4289 | - * @return Array the airline list |
|
4290 | - * |
|
4291 | - */ |
|
4287 | + * Gets all airlines that have flown over by airport |
|
4288 | + * |
|
4289 | + * @return Array the airline list |
|
4290 | + * |
|
4291 | + */ |
|
4292 | 4292 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
4293 | 4293 | { |
4294 | 4294 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4319,11 +4319,11 @@ discard block |
||
4319 | 4319 | |
4320 | 4320 | |
4321 | 4321 | /** |
4322 | - * Gets all airline countries that have flown over by airport icao |
|
4323 | - * |
|
4324 | - * @return Array the airline country list |
|
4325 | - * |
|
4326 | - */ |
|
4322 | + * Gets all airline countries that have flown over by airport icao |
|
4323 | + * |
|
4324 | + * @return Array the airline country list |
|
4325 | + * |
|
4326 | + */ |
|
4327 | 4327 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
4328 | 4328 | { |
4329 | 4329 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -4353,11 +4353,11 @@ discard block |
||
4353 | 4353 | |
4354 | 4354 | |
4355 | 4355 | /** |
4356 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
4357 | - * |
|
4358 | - * @return Array the airline list |
|
4359 | - * |
|
4360 | - */ |
|
4356 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
4357 | + * |
|
4358 | + * @return Array the airline list |
|
4359 | + * |
|
4360 | + */ |
|
4361 | 4361 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
4362 | 4362 | { |
4363 | 4363 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4388,11 +4388,11 @@ discard block |
||
4388 | 4388 | |
4389 | 4389 | |
4390 | 4390 | /** |
4391 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
4392 | - * |
|
4393 | - * @return Array the airline country list |
|
4394 | - * |
|
4395 | - */ |
|
4391 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
4392 | + * |
|
4393 | + * @return Array the airline country list |
|
4394 | + * |
|
4395 | + */ |
|
4396 | 4396 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
4397 | 4397 | { |
4398 | 4398 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4421,11 +4421,11 @@ discard block |
||
4421 | 4421 | |
4422 | 4422 | |
4423 | 4423 | /** |
4424 | - * Gets all airlines that have flown over by date |
|
4425 | - * |
|
4426 | - * @return Array the airline list |
|
4427 | - * |
|
4428 | - */ |
|
4424 | + * Gets all airlines that have flown over by date |
|
4425 | + * |
|
4426 | + * @return Array the airline list |
|
4427 | + * |
|
4428 | + */ |
|
4429 | 4429 | public function countAllAirlinesByDate($date,$filters = array()) |
4430 | 4430 | { |
4431 | 4431 | global $globalTimezone, $globalDBdriver; |
@@ -4469,11 +4469,11 @@ discard block |
||
4469 | 4469 | |
4470 | 4470 | |
4471 | 4471 | /** |
4472 | - * Gets all airline countries that have flown over by date |
|
4473 | - * |
|
4474 | - * @return Array the airline country list |
|
4475 | - * |
|
4476 | - */ |
|
4472 | + * Gets all airline countries that have flown over by date |
|
4473 | + * |
|
4474 | + * @return Array the airline country list |
|
4475 | + * |
|
4476 | + */ |
|
4477 | 4477 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
4478 | 4478 | { |
4479 | 4479 | global $globalTimezone, $globalDBdriver; |
@@ -4516,11 +4516,11 @@ discard block |
||
4516 | 4516 | |
4517 | 4517 | |
4518 | 4518 | /** |
4519 | - * Gets all airlines that have flown over by ident/callsign |
|
4520 | - * |
|
4521 | - * @return Array the airline list |
|
4522 | - * |
|
4523 | - */ |
|
4519 | + * Gets all airlines that have flown over by ident/callsign |
|
4520 | + * |
|
4521 | + * @return Array the airline list |
|
4522 | + * |
|
4523 | + */ |
|
4524 | 4524 | public function countAllAirlinesByIdent($ident,$filters = array()) |
4525 | 4525 | { |
4526 | 4526 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4537,11 +4537,11 @@ discard block |
||
4537 | 4537 | } |
4538 | 4538 | |
4539 | 4539 | /** |
4540 | - * Gets all airlines by owner |
|
4541 | - * |
|
4542 | - * @return Array the airline list |
|
4543 | - * |
|
4544 | - */ |
|
4540 | + * Gets all airlines by owner |
|
4541 | + * |
|
4542 | + * @return Array the airline list |
|
4543 | + * |
|
4544 | + */ |
|
4545 | 4545 | public function countAllAirlinesByOwner($owner,$filters = array()) |
4546 | 4546 | { |
4547 | 4547 | $owner = filter_var($owner,FILTER_SANITIZE_STRING); |
@@ -4558,11 +4558,11 @@ discard block |
||
4558 | 4558 | } |
4559 | 4559 | |
4560 | 4560 | /** |
4561 | - * Gets all airlines used by pilot |
|
4562 | - * |
|
4563 | - * @return Array the airline list |
|
4564 | - * |
|
4565 | - */ |
|
4561 | + * Gets all airlines used by pilot |
|
4562 | + * |
|
4563 | + * @return Array the airline list |
|
4564 | + * |
|
4565 | + */ |
|
4566 | 4566 | public function countAllAirlinesByPilot($pilot,$filters = array()) |
4567 | 4567 | { |
4568 | 4568 | $pilot = filter_var($pilot,FILTER_SANITIZE_STRING); |
@@ -4579,11 +4579,11 @@ discard block |
||
4579 | 4579 | } |
4580 | 4580 | |
4581 | 4581 | /** |
4582 | - * Gets all airlines that have flown over by route |
|
4583 | - * |
|
4584 | - * @return Array the airline list |
|
4585 | - * |
|
4586 | - */ |
|
4582 | + * Gets all airlines that have flown over by route |
|
4583 | + * |
|
4584 | + * @return Array the airline list |
|
4585 | + * |
|
4586 | + */ |
|
4587 | 4587 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
4588 | 4588 | { |
4589 | 4589 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4615,11 +4615,11 @@ discard block |
||
4615 | 4615 | } |
4616 | 4616 | |
4617 | 4617 | /** |
4618 | - * Gets all airline countries that have flown over by route |
|
4619 | - * |
|
4620 | - * @return Array the airline country list |
|
4621 | - * |
|
4622 | - */ |
|
4618 | + * Gets all airline countries that have flown over by route |
|
4619 | + * |
|
4620 | + * @return Array the airline country list |
|
4621 | + * |
|
4622 | + */ |
|
4623 | 4623 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
4624 | 4624 | { |
4625 | 4625 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4651,11 +4651,11 @@ discard block |
||
4651 | 4651 | |
4652 | 4652 | |
4653 | 4653 | /** |
4654 | - * Gets all airlines that have flown over by country |
|
4655 | - * |
|
4656 | - * @return Array the airline list |
|
4657 | - * |
|
4658 | - */ |
|
4654 | + * Gets all airlines that have flown over by country |
|
4655 | + * |
|
4656 | + * @return Array the airline list |
|
4657 | + * |
|
4658 | + */ |
|
4659 | 4659 | public function countAllAirlinesByCountry($country,$filters = array()) |
4660 | 4660 | { |
4661 | 4661 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4685,11 +4685,11 @@ discard block |
||
4685 | 4685 | |
4686 | 4686 | |
4687 | 4687 | /** |
4688 | - * Gets all airline countries that have flown over by country |
|
4689 | - * |
|
4690 | - * @return Array the airline country list |
|
4691 | - * |
|
4692 | - */ |
|
4688 | + * Gets all airline countries that have flown over by country |
|
4689 | + * |
|
4690 | + * @return Array the airline country list |
|
4691 | + * |
|
4692 | + */ |
|
4693 | 4693 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
4694 | 4694 | { |
4695 | 4695 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4718,11 +4718,11 @@ discard block |
||
4718 | 4718 | |
4719 | 4719 | |
4720 | 4720 | /** |
4721 | - * Gets all airlines countries |
|
4722 | - * |
|
4723 | - * @return Array the airline country list |
|
4724 | - * |
|
4725 | - */ |
|
4721 | + * Gets all airlines countries |
|
4722 | + * |
|
4723 | + * @return Array the airline country list |
|
4724 | + * |
|
4725 | + */ |
|
4726 | 4726 | public function countAllAirlineCountries($limit = true, $filters = array(), $year = '', $month = '', $day = '') |
4727 | 4727 | { |
4728 | 4728 | global $globalDBdriver; |
@@ -4777,11 +4777,11 @@ discard block |
||
4777 | 4777 | } |
4778 | 4778 | |
4779 | 4779 | /** |
4780 | - * Gets all number of flight over countries |
|
4781 | - * |
|
4782 | - * @return Array the airline country list |
|
4783 | - * |
|
4784 | - */ |
|
4780 | + * Gets all number of flight over countries |
|
4781 | + * |
|
4782 | + * @return Array the airline country list |
|
4783 | + * |
|
4784 | + */ |
|
4785 | 4785 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
4786 | 4786 | { |
4787 | 4787 | global $globalDBdriver; |
@@ -4803,15 +4803,15 @@ discard block |
||
4803 | 4803 | $SpotterLive = new SpotterLive(); |
4804 | 4804 | $filter_query = $SpotterLive->getFilter($filters,true,true); |
4805 | 4805 | $filter_query .= ' over_country IS NOT NULL'; |
4806 | - if ($olderthanmonths > 0) { |
|
4806 | + if ($olderthanmonths > 0) { |
|
4807 | 4807 | if ($globalDBdriver == 'mysql') { |
4808 | 4808 | $filter_query .= ' AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
4809 | 4809 | } else { |
4810 | 4810 | $filter_query .= " AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4811 | 4811 | } |
4812 | 4812 | } |
4813 | - if ($sincedate != '') { |
|
4814 | - if ($globalDBdriver == 'mysql') { |
|
4813 | + if ($sincedate != '') { |
|
4814 | + if ($globalDBdriver == 'mysql') { |
|
4815 | 4815 | $filter_query .= " AND spotter_live.date > '".$sincedate."' "; |
4816 | 4816 | } else { |
4817 | 4817 | $filter_query .= " AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4841,11 +4841,11 @@ discard block |
||
4841 | 4841 | |
4842 | 4842 | |
4843 | 4843 | /** |
4844 | - * Gets all aircraft types that have flown over |
|
4845 | - * |
|
4846 | - * @return Array the aircraft list |
|
4847 | - * |
|
4848 | - */ |
|
4844 | + * Gets all aircraft types that have flown over |
|
4845 | + * |
|
4846 | + * @return Array the aircraft list |
|
4847 | + * |
|
4848 | + */ |
|
4849 | 4849 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
4850 | 4850 | { |
4851 | 4851 | global $globalDBdriver; |
@@ -4915,11 +4915,11 @@ discard block |
||
4915 | 4915 | } |
4916 | 4916 | |
4917 | 4917 | /** |
4918 | - * Gets all aircraft types that have flown over by airline |
|
4919 | - * |
|
4920 | - * @return Array the aircraft list |
|
4921 | - * |
|
4922 | - */ |
|
4918 | + * Gets all aircraft types that have flown over by airline |
|
4919 | + * |
|
4920 | + * @return Array the aircraft list |
|
4921 | + * |
|
4922 | + */ |
|
4923 | 4923 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '', $day = '') |
4924 | 4924 | { |
4925 | 4925 | global $globalDBdriver; |
@@ -4990,11 +4990,11 @@ discard block |
||
4990 | 4990 | } |
4991 | 4991 | |
4992 | 4992 | /** |
4993 | - * Gets all aircraft types that have flown over by months |
|
4994 | - * |
|
4995 | - * @return Array the aircraft list |
|
4996 | - * |
|
4997 | - */ |
|
4993 | + * Gets all aircraft types that have flown over by months |
|
4994 | + * |
|
4995 | + * @return Array the aircraft list |
|
4996 | + * |
|
4997 | + */ |
|
4998 | 4998 | public function countAllAircraftTypesByMonths($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
4999 | 4999 | { |
5000 | 5000 | global $globalDBdriver; |
@@ -5038,11 +5038,11 @@ discard block |
||
5038 | 5038 | |
5039 | 5039 | |
5040 | 5040 | /** |
5041 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
5042 | - * |
|
5043 | - * @return Array the aircraft list |
|
5044 | - * |
|
5045 | - */ |
|
5041 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
5042 | + * |
|
5043 | + * @return Array the aircraft list |
|
5044 | + * |
|
5045 | + */ |
|
5046 | 5046 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
5047 | 5047 | { |
5048 | 5048 | $Image = new Image($this->db); |
@@ -5081,11 +5081,11 @@ discard block |
||
5081 | 5081 | |
5082 | 5082 | |
5083 | 5083 | /** |
5084 | - * Gets all aircraft types that have flown over by airline icao |
|
5085 | - * |
|
5086 | - * @return Array the aircraft list |
|
5087 | - * |
|
5088 | - */ |
|
5084 | + * Gets all aircraft types that have flown over by airline icao |
|
5085 | + * |
|
5086 | + * @return Array the aircraft list |
|
5087 | + * |
|
5088 | + */ |
|
5089 | 5089 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
5090 | 5090 | { |
5091 | 5091 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5114,11 +5114,11 @@ discard block |
||
5114 | 5114 | |
5115 | 5115 | |
5116 | 5116 | /** |
5117 | - * Gets all aircraft registration that have flown over by airline icao |
|
5118 | - * |
|
5119 | - * @return Array the aircraft list |
|
5120 | - * |
|
5121 | - */ |
|
5117 | + * Gets all aircraft registration that have flown over by airline icao |
|
5118 | + * |
|
5119 | + * @return Array the aircraft list |
|
5120 | + * |
|
5121 | + */ |
|
5122 | 5122 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
5123 | 5123 | { |
5124 | 5124 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5156,11 +5156,11 @@ discard block |
||
5156 | 5156 | |
5157 | 5157 | |
5158 | 5158 | /** |
5159 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
5160 | - * |
|
5161 | - * @return Array the aircraft list |
|
5162 | - * |
|
5163 | - */ |
|
5159 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
5160 | + * |
|
5161 | + * @return Array the aircraft list |
|
5162 | + * |
|
5163 | + */ |
|
5164 | 5164 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
5165 | 5165 | { |
5166 | 5166 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5188,11 +5188,11 @@ discard block |
||
5188 | 5188 | |
5189 | 5189 | |
5190 | 5190 | /** |
5191 | - * Gets all aircraft types that have flown over by airline icao |
|
5192 | - * |
|
5193 | - * @return Array the aircraft list |
|
5194 | - * |
|
5195 | - */ |
|
5191 | + * Gets all aircraft types that have flown over by airline icao |
|
5192 | + * |
|
5193 | + * @return Array the aircraft list |
|
5194 | + * |
|
5195 | + */ |
|
5196 | 5196 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
5197 | 5197 | { |
5198 | 5198 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5221,11 +5221,11 @@ discard block |
||
5221 | 5221 | |
5222 | 5222 | |
5223 | 5223 | /** |
5224 | - * Gets all aircraft registration that have flown over by airport icao |
|
5225 | - * |
|
5226 | - * @return Array the aircraft list |
|
5227 | - * |
|
5228 | - */ |
|
5224 | + * Gets all aircraft registration that have flown over by airport icao |
|
5225 | + * |
|
5226 | + * @return Array the aircraft list |
|
5227 | + * |
|
5228 | + */ |
|
5229 | 5229 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
5230 | 5230 | { |
5231 | 5231 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5262,11 +5262,11 @@ discard block |
||
5262 | 5262 | |
5263 | 5263 | |
5264 | 5264 | /** |
5265 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
5266 | - * |
|
5267 | - * @return Array the aircraft list |
|
5268 | - * |
|
5269 | - */ |
|
5265 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
5266 | + * |
|
5267 | + * @return Array the aircraft list |
|
5268 | + * |
|
5269 | + */ |
|
5270 | 5270 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
5271 | 5271 | { |
5272 | 5272 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5292,11 +5292,11 @@ discard block |
||
5292 | 5292 | } |
5293 | 5293 | |
5294 | 5294 | /** |
5295 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5296 | - * |
|
5297 | - * @return Array the aircraft list |
|
5298 | - * |
|
5299 | - */ |
|
5295 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
5296 | + * |
|
5297 | + * @return Array the aircraft list |
|
5298 | + * |
|
5299 | + */ |
|
5300 | 5300 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
5301 | 5301 | { |
5302 | 5302 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5323,11 +5323,11 @@ discard block |
||
5323 | 5323 | |
5324 | 5324 | |
5325 | 5325 | /** |
5326 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5327 | - * |
|
5328 | - * @return Array the aircraft list |
|
5329 | - * |
|
5330 | - */ |
|
5326 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
5327 | + * |
|
5328 | + * @return Array the aircraft list |
|
5329 | + * |
|
5330 | + */ |
|
5331 | 5331 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
5332 | 5332 | { |
5333 | 5333 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5363,11 +5363,11 @@ discard block |
||
5363 | 5363 | } |
5364 | 5364 | |
5365 | 5365 | /** |
5366 | - * Gets all aircraft types that have flown over by date |
|
5367 | - * |
|
5368 | - * @return Array the aircraft list |
|
5369 | - * |
|
5370 | - */ |
|
5366 | + * Gets all aircraft types that have flown over by date |
|
5367 | + * |
|
5368 | + * @return Array the aircraft list |
|
5369 | + * |
|
5370 | + */ |
|
5371 | 5371 | public function countAllAircraftTypesByDate($date,$filters = array()) |
5372 | 5372 | { |
5373 | 5373 | global $globalTimezone, $globalDBdriver; |
@@ -5409,11 +5409,11 @@ discard block |
||
5409 | 5409 | |
5410 | 5410 | |
5411 | 5411 | /** |
5412 | - * Gets all aircraft registration that have flown over by date |
|
5413 | - * |
|
5414 | - * @return Array the aircraft list |
|
5415 | - * |
|
5416 | - */ |
|
5412 | + * Gets all aircraft registration that have flown over by date |
|
5413 | + * |
|
5414 | + * @return Array the aircraft list |
|
5415 | + * |
|
5416 | + */ |
|
5417 | 5417 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
5418 | 5418 | { |
5419 | 5419 | global $globalTimezone, $globalDBdriver; |
@@ -5464,11 +5464,11 @@ discard block |
||
5464 | 5464 | |
5465 | 5465 | |
5466 | 5466 | /** |
5467 | - * Gets all aircraft manufacturer that have flown over by date |
|
5468 | - * |
|
5469 | - * @return Array the aircraft manufacturer list |
|
5470 | - * |
|
5471 | - */ |
|
5467 | + * Gets all aircraft manufacturer that have flown over by date |
|
5468 | + * |
|
5469 | + * @return Array the aircraft manufacturer list |
|
5470 | + * |
|
5471 | + */ |
|
5472 | 5472 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
5473 | 5473 | { |
5474 | 5474 | global $globalTimezone, $globalDBdriver; |
@@ -5510,11 +5510,11 @@ discard block |
||
5510 | 5510 | |
5511 | 5511 | |
5512 | 5512 | /** |
5513 | - * Gets all aircraft types that have flown over by ident/callsign |
|
5514 | - * |
|
5515 | - * @return Array the aircraft list |
|
5516 | - * |
|
5517 | - */ |
|
5513 | + * Gets all aircraft types that have flown over by ident/callsign |
|
5514 | + * |
|
5515 | + * @return Array the aircraft list |
|
5516 | + * |
|
5517 | + */ |
|
5518 | 5518 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
5519 | 5519 | { |
5520 | 5520 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5542,11 +5542,11 @@ discard block |
||
5542 | 5542 | } |
5543 | 5543 | |
5544 | 5544 | /** |
5545 | - * Gets all aircraft types that have flown over by pilot |
|
5546 | - * |
|
5547 | - * @return Array the aircraft list |
|
5548 | - * |
|
5549 | - */ |
|
5545 | + * Gets all aircraft types that have flown over by pilot |
|
5546 | + * |
|
5547 | + * @return Array the aircraft list |
|
5548 | + * |
|
5549 | + */ |
|
5550 | 5550 | public function countAllAircraftTypesByPilot($pilot,$filters = array()) |
5551 | 5551 | { |
5552 | 5552 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5562,11 +5562,11 @@ discard block |
||
5562 | 5562 | } |
5563 | 5563 | |
5564 | 5564 | /** |
5565 | - * Gets all aircraft types that have flown over by owner |
|
5566 | - * |
|
5567 | - * @return Array the aircraft list |
|
5568 | - * |
|
5569 | - */ |
|
5565 | + * Gets all aircraft types that have flown over by owner |
|
5566 | + * |
|
5567 | + * @return Array the aircraft list |
|
5568 | + * |
|
5569 | + */ |
|
5570 | 5570 | public function countAllAircraftTypesByOwner($owner,$filters = array()) |
5571 | 5571 | { |
5572 | 5572 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5583,11 +5583,11 @@ discard block |
||
5583 | 5583 | |
5584 | 5584 | |
5585 | 5585 | /** |
5586 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
5587 | - * |
|
5588 | - * @return Array the aircraft list |
|
5589 | - * |
|
5590 | - */ |
|
5586 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
5587 | + * |
|
5588 | + * @return Array the aircraft list |
|
5589 | + * |
|
5590 | + */ |
|
5591 | 5591 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
5592 | 5592 | { |
5593 | 5593 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5626,11 +5626,11 @@ discard block |
||
5626 | 5626 | } |
5627 | 5627 | |
5628 | 5628 | /** |
5629 | - * Gets all aircraft registration that have flown over by owner |
|
5630 | - * |
|
5631 | - * @return Array the aircraft list |
|
5632 | - * |
|
5633 | - */ |
|
5629 | + * Gets all aircraft registration that have flown over by owner |
|
5630 | + * |
|
5631 | + * @return Array the aircraft list |
|
5632 | + * |
|
5633 | + */ |
|
5634 | 5634 | public function countAllAircraftRegistrationByOwner($owner,$filters = array()) |
5635 | 5635 | { |
5636 | 5636 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5670,11 +5670,11 @@ discard block |
||
5670 | 5670 | } |
5671 | 5671 | |
5672 | 5672 | /** |
5673 | - * Gets all aircraft registration that have flown over by pilot |
|
5674 | - * |
|
5675 | - * @return Array the aircraft list |
|
5676 | - * |
|
5677 | - */ |
|
5673 | + * Gets all aircraft registration that have flown over by pilot |
|
5674 | + * |
|
5675 | + * @return Array the aircraft list |
|
5676 | + * |
|
5677 | + */ |
|
5678 | 5678 | public function countAllAircraftRegistrationByPilot($pilot,$filters = array()) |
5679 | 5679 | { |
5680 | 5680 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5715,11 +5715,11 @@ discard block |
||
5715 | 5715 | |
5716 | 5716 | |
5717 | 5717 | /** |
5718 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
5719 | - * |
|
5720 | - * @return Array the aircraft manufacturer list |
|
5721 | - * |
|
5722 | - */ |
|
5718 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
5719 | + * |
|
5720 | + * @return Array the aircraft manufacturer list |
|
5721 | + * |
|
5722 | + */ |
|
5723 | 5723 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
5724 | 5724 | { |
5725 | 5725 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5744,11 +5744,11 @@ discard block |
||
5744 | 5744 | } |
5745 | 5745 | |
5746 | 5746 | /** |
5747 | - * Gets all aircraft manufacturer that have flown over by owner |
|
5748 | - * |
|
5749 | - * @return Array the aircraft manufacturer list |
|
5750 | - * |
|
5751 | - */ |
|
5747 | + * Gets all aircraft manufacturer that have flown over by owner |
|
5748 | + * |
|
5749 | + * @return Array the aircraft manufacturer list |
|
5750 | + * |
|
5751 | + */ |
|
5752 | 5752 | public function countAllAircraftManufacturerByOwner($owner,$filters = array()) |
5753 | 5753 | { |
5754 | 5754 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5765,11 +5765,11 @@ discard block |
||
5765 | 5765 | } |
5766 | 5766 | |
5767 | 5767 | /** |
5768 | - * Gets all aircraft manufacturer that have flown over by pilot |
|
5769 | - * |
|
5770 | - * @return Array the aircraft manufacturer list |
|
5771 | - * |
|
5772 | - */ |
|
5768 | + * Gets all aircraft manufacturer that have flown over by pilot |
|
5769 | + * |
|
5770 | + * @return Array the aircraft manufacturer list |
|
5771 | + * |
|
5772 | + */ |
|
5773 | 5773 | public function countAllAircraftManufacturerByPilot($pilot,$filters = array()) |
5774 | 5774 | { |
5775 | 5775 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5787,11 +5787,11 @@ discard block |
||
5787 | 5787 | |
5788 | 5788 | |
5789 | 5789 | /** |
5790 | - * Gets all aircraft types that have flown over by route |
|
5791 | - * |
|
5792 | - * @return Array the aircraft list |
|
5793 | - * |
|
5794 | - */ |
|
5790 | + * Gets all aircraft types that have flown over by route |
|
5791 | + * |
|
5792 | + * @return Array the aircraft list |
|
5793 | + * |
|
5794 | + */ |
|
5795 | 5795 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5796 | 5796 | { |
5797 | 5797 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5820,11 +5820,11 @@ discard block |
||
5820 | 5820 | } |
5821 | 5821 | |
5822 | 5822 | /** |
5823 | - * Gets all aircraft registration that have flown over by route |
|
5824 | - * |
|
5825 | - * @return Array the aircraft list |
|
5826 | - * |
|
5827 | - */ |
|
5823 | + * Gets all aircraft registration that have flown over by route |
|
5824 | + * |
|
5825 | + * @return Array the aircraft list |
|
5826 | + * |
|
5827 | + */ |
|
5828 | 5828 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5829 | 5829 | { |
5830 | 5830 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5866,11 +5866,11 @@ discard block |
||
5866 | 5866 | |
5867 | 5867 | |
5868 | 5868 | /** |
5869 | - * Gets all aircraft manufacturer that have flown over by route |
|
5870 | - * |
|
5871 | - * @return Array the aircraft manufacturer list |
|
5872 | - * |
|
5873 | - */ |
|
5869 | + * Gets all aircraft manufacturer that have flown over by route |
|
5870 | + * |
|
5871 | + * @return Array the aircraft manufacturer list |
|
5872 | + * |
|
5873 | + */ |
|
5874 | 5874 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5875 | 5875 | { |
5876 | 5876 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5904,11 +5904,11 @@ discard block |
||
5904 | 5904 | |
5905 | 5905 | |
5906 | 5906 | /** |
5907 | - * Gets all aircraft types that have flown over by country |
|
5908 | - * |
|
5909 | - * @return Array the aircraft list |
|
5910 | - * |
|
5911 | - */ |
|
5907 | + * Gets all aircraft types that have flown over by country |
|
5908 | + * |
|
5909 | + * @return Array the aircraft list |
|
5910 | + * |
|
5911 | + */ |
|
5912 | 5912 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
5913 | 5913 | { |
5914 | 5914 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5939,11 +5939,11 @@ discard block |
||
5939 | 5939 | |
5940 | 5940 | |
5941 | 5941 | /** |
5942 | - * Gets all aircraft registration that have flown over by country |
|
5943 | - * |
|
5944 | - * @return Array the aircraft list |
|
5945 | - * |
|
5946 | - */ |
|
5942 | + * Gets all aircraft registration that have flown over by country |
|
5943 | + * |
|
5944 | + * @return Array the aircraft list |
|
5945 | + * |
|
5946 | + */ |
|
5947 | 5947 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
5948 | 5948 | { |
5949 | 5949 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5983,11 +5983,11 @@ discard block |
||
5983 | 5983 | |
5984 | 5984 | |
5985 | 5985 | /** |
5986 | - * Gets all aircraft manufacturer that have flown over by country |
|
5987 | - * |
|
5988 | - * @return Array the aircraft manufacturer list |
|
5989 | - * |
|
5990 | - */ |
|
5986 | + * Gets all aircraft manufacturer that have flown over by country |
|
5987 | + * |
|
5988 | + * @return Array the aircraft manufacturer list |
|
5989 | + * |
|
5990 | + */ |
|
5991 | 5991 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
5992 | 5992 | { |
5993 | 5993 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6018,18 +6018,18 @@ discard block |
||
6018 | 6018 | |
6019 | 6019 | |
6020 | 6020 | /** |
6021 | - * Gets all aircraft manufacturers that have flown over |
|
6022 | - * |
|
6023 | - * @return Array the aircraft list |
|
6024 | - * |
|
6025 | - */ |
|
6021 | + * Gets all aircraft manufacturers that have flown over |
|
6022 | + * |
|
6023 | + * @return Array the aircraft list |
|
6024 | + * |
|
6025 | + */ |
|
6026 | 6026 | public function countAllAircraftManufacturers($filters = array(),$year = '',$month = '',$day = '') |
6027 | 6027 | { |
6028 | 6028 | global $globalDBdriver; |
6029 | 6029 | $filter_query = $this->getFilter($filters,true,true); |
6030 | 6030 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
6031 | 6031 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
6032 | - $query_values = array(); |
|
6032 | + $query_values = array(); |
|
6033 | 6033 | if ($year != '') { |
6034 | 6034 | if ($globalDBdriver == 'mysql') { |
6035 | 6035 | $query .= " AND YEAR(spotter_output.date) = :year"; |
@@ -6082,11 +6082,11 @@ discard block |
||
6082 | 6082 | |
6083 | 6083 | |
6084 | 6084 | /** |
6085 | - * Gets all aircraft registrations that have flown over |
|
6086 | - * |
|
6087 | - * @return Array the aircraft list |
|
6088 | - * |
|
6089 | - */ |
|
6085 | + * Gets all aircraft registrations that have flown over |
|
6086 | + * |
|
6087 | + * @return Array the aircraft list |
|
6088 | + * |
|
6089 | + */ |
|
6090 | 6090 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
6091 | 6091 | { |
6092 | 6092 | global $globalDBdriver; |
@@ -6094,15 +6094,15 @@ discard block |
||
6094 | 6094 | $filter_query = $this->getFilter($filters,true,true); |
6095 | 6095 | $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 |
6096 | 6096 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
6097 | - if ($olderthanmonths > 0) { |
|
6098 | - if ($globalDBdriver == 'mysql') { |
|
6097 | + if ($olderthanmonths > 0) { |
|
6098 | + if ($globalDBdriver == 'mysql') { |
|
6099 | 6099 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6100 | 6100 | } else { |
6101 | 6101 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6102 | 6102 | } |
6103 | 6103 | } |
6104 | - if ($sincedate != '') { |
|
6105 | - if ($globalDBdriver == 'mysql') { |
|
6104 | + if ($sincedate != '') { |
|
6105 | + if ($globalDBdriver == 'mysql') { |
|
6106 | 6106 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6107 | 6107 | } else { |
6108 | 6108 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6167,11 +6167,11 @@ discard block |
||
6167 | 6167 | |
6168 | 6168 | |
6169 | 6169 | /** |
6170 | - * Gets all aircraft registrations that have flown over |
|
6171 | - * |
|
6172 | - * @return Array the aircraft list |
|
6173 | - * |
|
6174 | - */ |
|
6170 | + * Gets all aircraft registrations that have flown over |
|
6171 | + * |
|
6172 | + * @return Array the aircraft list |
|
6173 | + * |
|
6174 | + */ |
|
6175 | 6175 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
6176 | 6176 | { |
6177 | 6177 | global $globalDBdriver; |
@@ -6179,15 +6179,15 @@ discard block |
||
6179 | 6179 | $Image = new Image($this->db); |
6180 | 6180 | $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 |
6181 | 6181 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
6182 | - if ($olderthanmonths > 0) { |
|
6183 | - if ($globalDBdriver == 'mysql') { |
|
6182 | + if ($olderthanmonths > 0) { |
|
6183 | + if ($globalDBdriver == 'mysql') { |
|
6184 | 6184 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6185 | 6185 | } else { |
6186 | 6186 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6187 | 6187 | } |
6188 | 6188 | } |
6189 | - if ($sincedate != '') { |
|
6190 | - if ($globalDBdriver == 'mysql') { |
|
6189 | + if ($sincedate != '') { |
|
6190 | + if ($globalDBdriver == 'mysql') { |
|
6191 | 6191 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6192 | 6192 | } else { |
6193 | 6193 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6196,7 +6196,7 @@ discard block |
||
6196 | 6196 | |
6197 | 6197 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
6198 | 6198 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
6199 | - $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"; |
|
6199 | + $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"; |
|
6200 | 6200 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6201 | 6201 | |
6202 | 6202 | $sth = $this->db->prepare($query); |
@@ -6228,26 +6228,26 @@ discard block |
||
6228 | 6228 | |
6229 | 6229 | |
6230 | 6230 | /** |
6231 | - * Gets all departure airports of the airplanes that have flown over |
|
6232 | - * |
|
6233 | - * @return Array the airport list |
|
6234 | - * |
|
6235 | - */ |
|
6231 | + * Gets all departure airports of the airplanes that have flown over |
|
6232 | + * |
|
6233 | + * @return Array the airport list |
|
6234 | + * |
|
6235 | + */ |
|
6236 | 6236 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6237 | 6237 | { |
6238 | 6238 | global $globalDBdriver; |
6239 | 6239 | $filter_query = $this->getFilter($filters,true,true); |
6240 | 6240 | $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 |
6241 | 6241 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' AND spotter_output.departure_airport_icao <> ''"; |
6242 | - if ($olderthanmonths > 0) { |
|
6243 | - if ($globalDBdriver == 'mysql') { |
|
6242 | + if ($olderthanmonths > 0) { |
|
6243 | + if ($globalDBdriver == 'mysql') { |
|
6244 | 6244 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6245 | 6245 | } else { |
6246 | 6246 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6247 | 6247 | } |
6248 | - } |
|
6249 | - if ($sincedate != '') { |
|
6250 | - if ($globalDBdriver == 'mysql') { |
|
6248 | + } |
|
6249 | + if ($sincedate != '') { |
|
6250 | + if ($globalDBdriver == 'mysql') { |
|
6251 | 6251 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6252 | 6252 | } else { |
6253 | 6253 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6281,7 +6281,7 @@ discard block |
||
6281 | 6281 | $query_values = array_merge($query_values,array(':day' => $day)); |
6282 | 6282 | } |
6283 | 6283 | } |
6284 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
6284 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
6285 | 6285 | ORDER BY airport_departure_icao_count DESC"; |
6286 | 6286 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6287 | 6287 | |
@@ -6304,35 +6304,35 @@ discard block |
||
6304 | 6304 | } |
6305 | 6305 | |
6306 | 6306 | /** |
6307 | - * Gets all departure airports of the airplanes that have flown over |
|
6308 | - * |
|
6309 | - * @return Array the airport list |
|
6310 | - * |
|
6311 | - */ |
|
6307 | + * Gets all departure airports of the airplanes that have flown over |
|
6308 | + * |
|
6309 | + * @return Array the airport list |
|
6310 | + * |
|
6311 | + */ |
|
6312 | 6312 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6313 | 6313 | { |
6314 | 6314 | global $globalDBdriver; |
6315 | 6315 | $filter_query = $this->getFilter($filters,true,true); |
6316 | 6316 | $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 |
6317 | 6317 | 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 <> '' "; |
6318 | - if ($olderthanmonths > 0) { |
|
6319 | - if ($globalDBdriver == 'mysql') { |
|
6318 | + if ($olderthanmonths > 0) { |
|
6319 | + if ($globalDBdriver == 'mysql') { |
|
6320 | 6320 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6321 | 6321 | } else { |
6322 | 6322 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6323 | 6323 | } |
6324 | - } |
|
6325 | - if ($sincedate != '') { |
|
6326 | - if ($globalDBdriver == 'mysql') { |
|
6324 | + } |
|
6325 | + if ($sincedate != '') { |
|
6326 | + if ($globalDBdriver == 'mysql') { |
|
6327 | 6327 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6328 | 6328 | } else { |
6329 | 6329 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6330 | 6330 | } |
6331 | 6331 | } |
6332 | 6332 | |
6333 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6334 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6335 | - $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 |
|
6333 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6334 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6335 | + $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 |
|
6336 | 6336 | ORDER BY airport_departure_icao_count DESC"; |
6337 | 6337 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6338 | 6338 | |
@@ -6357,26 +6357,26 @@ discard block |
||
6357 | 6357 | } |
6358 | 6358 | |
6359 | 6359 | /** |
6360 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6361 | - * |
|
6362 | - * @return Array the airport list |
|
6363 | - * |
|
6364 | - */ |
|
6360 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6361 | + * |
|
6362 | + * @return Array the airport list |
|
6363 | + * |
|
6364 | + */ |
|
6365 | 6365 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
6366 | 6366 | { |
6367 | 6367 | global $globalDBdriver; |
6368 | 6368 | $filter_query = $this->getFilter($filters,true,true); |
6369 | 6369 | $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 |
6370 | 6370 | 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"; |
6371 | - if ($olderthanmonths > 0) { |
|
6372 | - if ($globalDBdriver == 'mysql') { |
|
6371 | + if ($olderthanmonths > 0) { |
|
6372 | + if ($globalDBdriver == 'mysql') { |
|
6373 | 6373 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6374 | 6374 | } else { |
6375 | 6375 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6376 | 6376 | } |
6377 | - } |
|
6378 | - if ($sincedate != '') { |
|
6379 | - if ($globalDBdriver == 'mysql') { |
|
6377 | + } |
|
6378 | + if ($sincedate != '') { |
|
6379 | + if ($globalDBdriver == 'mysql') { |
|
6380 | 6380 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6381 | 6381 | } else { |
6382 | 6382 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -6410,10 +6410,10 @@ discard block |
||
6410 | 6410 | $query_values = array_merge($query_values,array(':day' => $day)); |
6411 | 6411 | } |
6412 | 6412 | } |
6413 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6413 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6414 | 6414 | ORDER BY airport_departure_icao_count DESC"; |
6415 | 6415 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6416 | - //echo $query; |
|
6416 | + //echo $query; |
|
6417 | 6417 | $sth = $this->db->prepare($query); |
6418 | 6418 | $sth->execute($query_values); |
6419 | 6419 | |
@@ -6434,35 +6434,35 @@ discard block |
||
6434 | 6434 | } |
6435 | 6435 | |
6436 | 6436 | /** |
6437 | - * Gets all detected departure airports of the airplanes that have flown over |
|
6438 | - * |
|
6439 | - * @return Array the airport list |
|
6440 | - * |
|
6441 | - */ |
|
6437 | + * Gets all detected departure airports of the airplanes that have flown over |
|
6438 | + * |
|
6439 | + * @return Array the airport list |
|
6440 | + * |
|
6441 | + */ |
|
6442 | 6442 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
6443 | 6443 | { |
6444 | 6444 | global $globalDBdriver; |
6445 | 6445 | $filter_query = $this->getFilter($filters,true,true); |
6446 | 6446 | $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 |
6447 | 6447 | 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 "; |
6448 | - if ($olderthanmonths > 0) { |
|
6449 | - if ($globalDBdriver == 'mysql') { |
|
6448 | + if ($olderthanmonths > 0) { |
|
6449 | + if ($globalDBdriver == 'mysql') { |
|
6450 | 6450 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6451 | 6451 | } else { |
6452 | 6452 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6453 | 6453 | } |
6454 | - } |
|
6455 | - if ($sincedate != '') { |
|
6456 | - if ($globalDBdriver == 'mysql') { |
|
6454 | + } |
|
6455 | + if ($sincedate != '') { |
|
6456 | + if ($globalDBdriver == 'mysql') { |
|
6457 | 6457 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6458 | 6458 | } else { |
6459 | 6459 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
6460 | 6460 | } |
6461 | 6461 | } |
6462 | 6462 | |
6463 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6464 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6465 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6463 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6464 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6465 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
6466 | 6466 | ORDER BY airport_departure_icao_count DESC"; |
6467 | 6467 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
6468 | 6468 | |
@@ -6487,11 +6487,11 @@ discard block |
||
6487 | 6487 | } |
6488 | 6488 | |
6489 | 6489 | /** |
6490 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6491 | - * |
|
6492 | - * @return Array the airport list |
|
6493 | - * |
|
6494 | - */ |
|
6490 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
6491 | + * |
|
6492 | + * @return Array the airport list |
|
6493 | + * |
|
6494 | + */ |
|
6495 | 6495 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
6496 | 6496 | { |
6497 | 6497 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6525,11 +6525,11 @@ discard block |
||
6525 | 6525 | |
6526 | 6526 | |
6527 | 6527 | /** |
6528 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6529 | - * |
|
6530 | - * @return Array the airport list |
|
6531 | - * |
|
6532 | - */ |
|
6528 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
6529 | + * |
|
6530 | + * @return Array the airport list |
|
6531 | + * |
|
6532 | + */ |
|
6533 | 6533 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
6534 | 6534 | { |
6535 | 6535 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6560,11 +6560,11 @@ discard block |
||
6560 | 6560 | |
6561 | 6561 | |
6562 | 6562 | /** |
6563 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6564 | - * |
|
6565 | - * @return Array the airport list |
|
6566 | - * |
|
6567 | - */ |
|
6563 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
6564 | + * |
|
6565 | + * @return Array the airport list |
|
6566 | + * |
|
6567 | + */ |
|
6568 | 6568 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
6569 | 6569 | { |
6570 | 6570 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6597,11 +6597,11 @@ discard block |
||
6597 | 6597 | |
6598 | 6598 | |
6599 | 6599 | /** |
6600 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6601 | - * |
|
6602 | - * @return Array the airport list |
|
6603 | - * |
|
6604 | - */ |
|
6600 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6601 | + * |
|
6602 | + * @return Array the airport list |
|
6603 | + * |
|
6604 | + */ |
|
6605 | 6605 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
6606 | 6606 | { |
6607 | 6607 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6631,11 +6631,11 @@ discard block |
||
6631 | 6631 | |
6632 | 6632 | |
6633 | 6633 | /** |
6634 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
6635 | - * |
|
6636 | - * @return Array the airport list |
|
6637 | - * |
|
6638 | - */ |
|
6634 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
6635 | + * |
|
6636 | + * @return Array the airport list |
|
6637 | + * |
|
6638 | + */ |
|
6639 | 6639 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
6640 | 6640 | { |
6641 | 6641 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6668,11 +6668,11 @@ discard block |
||
6668 | 6668 | |
6669 | 6669 | |
6670 | 6670 | /** |
6671 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
6672 | - * |
|
6673 | - * @return Array the airport list |
|
6674 | - * |
|
6675 | - */ |
|
6671 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
6672 | + * |
|
6673 | + * @return Array the airport list |
|
6674 | + * |
|
6675 | + */ |
|
6676 | 6676 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
6677 | 6677 | { |
6678 | 6678 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6702,11 +6702,11 @@ discard block |
||
6702 | 6702 | |
6703 | 6703 | |
6704 | 6704 | /** |
6705 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
6706 | - * |
|
6707 | - * @return Array the airport list |
|
6708 | - * |
|
6709 | - */ |
|
6705 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
6706 | + * |
|
6707 | + * @return Array the airport list |
|
6708 | + * |
|
6709 | + */ |
|
6710 | 6710 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
6711 | 6711 | { |
6712 | 6712 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6739,11 +6739,11 @@ discard block |
||
6739 | 6739 | |
6740 | 6740 | |
6741 | 6741 | /** |
6742 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
6743 | - * |
|
6744 | - * @return Array the airport list |
|
6745 | - * |
|
6746 | - */ |
|
6742 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
6743 | + * |
|
6744 | + * @return Array the airport list |
|
6745 | + * |
|
6746 | + */ |
|
6747 | 6747 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
6748 | 6748 | { |
6749 | 6749 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6774,11 +6774,11 @@ discard block |
||
6774 | 6774 | |
6775 | 6775 | |
6776 | 6776 | /** |
6777 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
6778 | - * |
|
6779 | - * @return Array the airport list |
|
6780 | - * |
|
6781 | - */ |
|
6777 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
6778 | + * |
|
6779 | + * @return Array the airport list |
|
6780 | + * |
|
6781 | + */ |
|
6782 | 6782 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
6783 | 6783 | { |
6784 | 6784 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6811,11 +6811,11 @@ discard block |
||
6811 | 6811 | |
6812 | 6812 | |
6813 | 6813 | /** |
6814 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
6815 | - * |
|
6816 | - * @return Array the airport list |
|
6817 | - * |
|
6818 | - */ |
|
6814 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
6815 | + * |
|
6816 | + * @return Array the airport list |
|
6817 | + * |
|
6818 | + */ |
|
6819 | 6819 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
6820 | 6820 | { |
6821 | 6821 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6845,11 +6845,11 @@ discard block |
||
6845 | 6845 | |
6846 | 6846 | |
6847 | 6847 | /** |
6848 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
6849 | - * |
|
6850 | - * @return Array the airport list |
|
6851 | - * |
|
6852 | - */ |
|
6848 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
6849 | + * |
|
6850 | + * @return Array the airport list |
|
6851 | + * |
|
6852 | + */ |
|
6853 | 6853 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
6854 | 6854 | { |
6855 | 6855 | global $globalTimezone, $globalDBdriver; |
@@ -6895,11 +6895,11 @@ discard block |
||
6895 | 6895 | |
6896 | 6896 | |
6897 | 6897 | /** |
6898 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
6899 | - * |
|
6900 | - * @return Array the airport list |
|
6901 | - * |
|
6902 | - */ |
|
6898 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
6899 | + * |
|
6900 | + * @return Array the airport list |
|
6901 | + * |
|
6902 | + */ |
|
6903 | 6903 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
6904 | 6904 | { |
6905 | 6905 | global $globalTimezone, $globalDBdriver; |
@@ -6942,11 +6942,11 @@ discard block |
||
6942 | 6942 | |
6943 | 6943 | |
6944 | 6944 | /** |
6945 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
6946 | - * |
|
6947 | - * @return Array the airport list |
|
6948 | - * |
|
6949 | - */ |
|
6945 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
6946 | + * |
|
6947 | + * @return Array the airport list |
|
6948 | + * |
|
6949 | + */ |
|
6950 | 6950 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
6951 | 6951 | { |
6952 | 6952 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6978,11 +6978,11 @@ discard block |
||
6978 | 6978 | } |
6979 | 6979 | |
6980 | 6980 | /** |
6981 | - * Gets all departure airports of the airplanes that have flown over based on a owner |
|
6982 | - * |
|
6983 | - * @return Array the airport list |
|
6984 | - * |
|
6985 | - */ |
|
6981 | + * Gets all departure airports of the airplanes that have flown over based on a owner |
|
6982 | + * |
|
6983 | + * @return Array the airport list |
|
6984 | + * |
|
6985 | + */ |
|
6986 | 6986 | public function countAllDepartureAirportsByOwner($owner,$filters = array()) |
6987 | 6987 | { |
6988 | 6988 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7014,11 +7014,11 @@ discard block |
||
7014 | 7014 | } |
7015 | 7015 | |
7016 | 7016 | /** |
7017 | - * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7018 | - * |
|
7019 | - * @return Array the airport list |
|
7020 | - * |
|
7021 | - */ |
|
7017 | + * Gets all departure airports of the airplanes that have flown over based on a pilot |
|
7018 | + * |
|
7019 | + * @return Array the airport list |
|
7020 | + * |
|
7021 | + */ |
|
7022 | 7022 | public function countAllDepartureAirportsByPilot($pilot,$filters = array()) |
7023 | 7023 | { |
7024 | 7024 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7051,11 +7051,11 @@ discard block |
||
7051 | 7051 | |
7052 | 7052 | |
7053 | 7053 | /** |
7054 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7055 | - * |
|
7056 | - * @return Array the airport list |
|
7057 | - * |
|
7058 | - */ |
|
7054 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
7055 | + * |
|
7056 | + * @return Array the airport list |
|
7057 | + * |
|
7058 | + */ |
|
7059 | 7059 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
7060 | 7060 | { |
7061 | 7061 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7084,11 +7084,11 @@ discard block |
||
7084 | 7084 | } |
7085 | 7085 | |
7086 | 7086 | /** |
7087 | - * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7088 | - * |
|
7089 | - * @return Array the airport list |
|
7090 | - * |
|
7091 | - */ |
|
7087 | + * Gets all departure airports by country of the airplanes that have flown over based on owner |
|
7088 | + * |
|
7089 | + * @return Array the airport list |
|
7090 | + * |
|
7091 | + */ |
|
7092 | 7092 | public function countAllDepartureAirportCountriesByOwner($owner,$filters = array()) |
7093 | 7093 | { |
7094 | 7094 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7104,11 +7104,11 @@ discard block |
||
7104 | 7104 | } |
7105 | 7105 | |
7106 | 7106 | /** |
7107 | - * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7108 | - * |
|
7109 | - * @return Array the airport list |
|
7110 | - * |
|
7111 | - */ |
|
7107 | + * Gets all departure airports by country of the airplanes that have flown over based on pilot |
|
7108 | + * |
|
7109 | + * @return Array the airport list |
|
7110 | + * |
|
7111 | + */ |
|
7112 | 7112 | public function countAllDepartureAirportCountriesByPilot($pilot,$filters = array()) |
7113 | 7113 | { |
7114 | 7114 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7126,11 +7126,11 @@ discard block |
||
7126 | 7126 | |
7127 | 7127 | |
7128 | 7128 | /** |
7129 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
7130 | - * |
|
7131 | - * @return Array the airport list |
|
7132 | - * |
|
7133 | - */ |
|
7129 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
7130 | + * |
|
7131 | + * @return Array the airport list |
|
7132 | + * |
|
7133 | + */ |
|
7134 | 7134 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
7135 | 7135 | { |
7136 | 7136 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7164,11 +7164,11 @@ discard block |
||
7164 | 7164 | |
7165 | 7165 | |
7166 | 7166 | /** |
7167 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7168 | - * |
|
7169 | - * @return Array the airport list |
|
7170 | - * |
|
7171 | - */ |
|
7167 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
7168 | + * |
|
7169 | + * @return Array the airport list |
|
7170 | + * |
|
7171 | + */ |
|
7172 | 7172 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
7173 | 7173 | { |
7174 | 7174 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7198,31 +7198,31 @@ discard block |
||
7198 | 7198 | |
7199 | 7199 | |
7200 | 7200 | /** |
7201 | - * Gets all arrival airports of the airplanes that have flown over |
|
7202 | - * |
|
7203 | - * @param Boolean $limit Limit result to 10 or not |
|
7204 | - * @param Integer $olderthanmonths Only show result older than x months |
|
7205 | - * @param String $sincedate Only show result since x date |
|
7206 | - * @param Boolean $icaoaskey Show result by ICAO |
|
7207 | - * @param Array $filters Filter used here |
|
7208 | - * @return Array the airport list |
|
7209 | - * |
|
7210 | - */ |
|
7201 | + * Gets all arrival airports of the airplanes that have flown over |
|
7202 | + * |
|
7203 | + * @param Boolean $limit Limit result to 10 or not |
|
7204 | + * @param Integer $olderthanmonths Only show result older than x months |
|
7205 | + * @param String $sincedate Only show result since x date |
|
7206 | + * @param Boolean $icaoaskey Show result by ICAO |
|
7207 | + * @param Array $filters Filter used here |
|
7208 | + * @return Array the airport list |
|
7209 | + * |
|
7210 | + */ |
|
7211 | 7211 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7212 | 7212 | { |
7213 | 7213 | global $globalDBdriver; |
7214 | 7214 | $filter_query = $this->getFilter($filters,true,true); |
7215 | 7215 | $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 |
7216 | 7216 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' AND spotter_output.arrival_airport_icao <> ''"; |
7217 | - if ($olderthanmonths > 0) { |
|
7218 | - if ($globalDBdriver == 'mysql') { |
|
7217 | + if ($olderthanmonths > 0) { |
|
7218 | + if ($globalDBdriver == 'mysql') { |
|
7219 | 7219 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7220 | 7220 | } else { |
7221 | 7221 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7222 | 7222 | } |
7223 | 7223 | } |
7224 | - if ($sincedate != '') { |
|
7225 | - if ($globalDBdriver == 'mysql') { |
|
7224 | + if ($sincedate != '') { |
|
7225 | + if ($globalDBdriver == 'mysql') { |
|
7226 | 7226 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7227 | 7227 | } else { |
7228 | 7228 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7256,7 +7256,7 @@ discard block |
||
7256 | 7256 | $query_values = array_merge($query_values,array(':day' => $day)); |
7257 | 7257 | } |
7258 | 7258 | } |
7259 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
7259 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
7260 | 7260 | ORDER BY airport_arrival_icao_count DESC"; |
7261 | 7261 | if ($limit) $query .= " LIMIT 10"; |
7262 | 7262 | |
@@ -7285,35 +7285,35 @@ discard block |
||
7285 | 7285 | } |
7286 | 7286 | |
7287 | 7287 | /** |
7288 | - * Gets all arrival airports of the airplanes that have flown over |
|
7289 | - * |
|
7290 | - * @return Array the airport list |
|
7291 | - * |
|
7292 | - */ |
|
7288 | + * Gets all arrival airports of the airplanes that have flown over |
|
7289 | + * |
|
7290 | + * @return Array the airport list |
|
7291 | + * |
|
7292 | + */ |
|
7293 | 7293 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
7294 | 7294 | { |
7295 | 7295 | global $globalDBdriver; |
7296 | 7296 | $filter_query = $this->getFilter($filters,true,true); |
7297 | 7297 | $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 |
7298 | 7298 | 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 <> '' "; |
7299 | - if ($olderthanmonths > 0) { |
|
7300 | - if ($globalDBdriver == 'mysql') { |
|
7299 | + if ($olderthanmonths > 0) { |
|
7300 | + if ($globalDBdriver == 'mysql') { |
|
7301 | 7301 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7302 | 7302 | } else { |
7303 | 7303 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7304 | 7304 | } |
7305 | 7305 | } |
7306 | - if ($sincedate != '') { |
|
7307 | - if ($globalDBdriver == 'mysql') { |
|
7306 | + if ($sincedate != '') { |
|
7307 | + if ($globalDBdriver == 'mysql') { |
|
7308 | 7308 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7309 | 7309 | } else { |
7310 | 7310 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7311 | 7311 | } |
7312 | 7312 | } |
7313 | 7313 | |
7314 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7315 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7316 | - $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 |
|
7314 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7315 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7316 | + $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 |
|
7317 | 7317 | ORDER BY airport_arrival_icao_count DESC"; |
7318 | 7318 | if ($limit) $query .= " LIMIT 10"; |
7319 | 7319 | |
@@ -7344,26 +7344,26 @@ discard block |
||
7344 | 7344 | |
7345 | 7345 | |
7346 | 7346 | /** |
7347 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7348 | - * |
|
7349 | - * @return Array the airport list |
|
7350 | - * |
|
7351 | - */ |
|
7347 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7348 | + * |
|
7349 | + * @return Array the airport list |
|
7350 | + * |
|
7351 | + */ |
|
7352 | 7352 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array(),$year = '',$month = '',$day = '') |
7353 | 7353 | { |
7354 | 7354 | global $globalDBdriver; |
7355 | 7355 | $filter_query = $this->getFilter($filters,true,true); |
7356 | 7356 | $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 |
7357 | 7357 | 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"; |
7358 | - if ($olderthanmonths > 0) { |
|
7359 | - if ($globalDBdriver == 'mysql') { |
|
7358 | + if ($olderthanmonths > 0) { |
|
7359 | + if ($globalDBdriver == 'mysql') { |
|
7360 | 7360 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
7361 | 7361 | } else { |
7362 | 7362 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
7363 | 7363 | } |
7364 | 7364 | } |
7365 | - if ($sincedate != '') { |
|
7366 | - if ($globalDBdriver == 'mysql') { |
|
7365 | + if ($sincedate != '') { |
|
7366 | + if ($globalDBdriver == 'mysql') { |
|
7367 | 7367 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
7368 | 7368 | } else { |
7369 | 7369 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -7397,7 +7397,7 @@ discard block |
||
7397 | 7397 | $query_values = array_merge($query_values,array(':day' => $day)); |
7398 | 7398 | } |
7399 | 7399 | } |
7400 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7400 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7401 | 7401 | ORDER BY airport_arrival_icao_count DESC"; |
7402 | 7402 | if ($limit) $query .= " LIMIT 10"; |
7403 | 7403 | |
@@ -7425,35 +7425,35 @@ discard block |
||
7425 | 7425 | } |
7426 | 7426 | |
7427 | 7427 | /** |
7428 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
7429 | - * |
|
7430 | - * @return Array the airport list |
|
7431 | - * |
|
7432 | - */ |
|
7428 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
7429 | + * |
|
7430 | + * @return Array the airport list |
|
7431 | + * |
|
7432 | + */ |
|
7433 | 7433 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
7434 | 7434 | { |
7435 | 7435 | global $globalDBdriver; |
7436 | 7436 | $filter_query = $this->getFilter($filters,true,true); |
7437 | 7437 | $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 |
7438 | 7438 | 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 "; |
7439 | - if ($olderthanmonths > 0) { |
|
7440 | - if ($globalDBdriver == 'mysql') { |
|
7439 | + if ($olderthanmonths > 0) { |
|
7440 | + if ($globalDBdriver == 'mysql') { |
|
7441 | 7441 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
7442 | 7442 | } else { |
7443 | 7443 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
7444 | 7444 | } |
7445 | 7445 | } |
7446 | - if ($sincedate != '') { |
|
7447 | - if ($globalDBdriver == 'mysql') { |
|
7446 | + if ($sincedate != '') { |
|
7447 | + if ($globalDBdriver == 'mysql') { |
|
7448 | 7448 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
7449 | 7449 | } else { |
7450 | 7450 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
7451 | 7451 | } |
7452 | 7452 | } |
7453 | 7453 | |
7454 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7455 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7456 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7454 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
7455 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
7456 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
7457 | 7457 | ORDER BY airport_arrival_icao_count DESC"; |
7458 | 7458 | if ($limit) $query .= " LIMIT 10"; |
7459 | 7459 | |
@@ -7483,11 +7483,11 @@ discard block |
||
7483 | 7483 | } |
7484 | 7484 | |
7485 | 7485 | /** |
7486 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7487 | - * |
|
7488 | - * @return Array the airport list |
|
7489 | - * |
|
7490 | - */ |
|
7486 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
7487 | + * |
|
7488 | + * @return Array the airport list |
|
7489 | + * |
|
7490 | + */ |
|
7491 | 7491 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
7492 | 7492 | { |
7493 | 7493 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7519,11 +7519,11 @@ discard block |
||
7519 | 7519 | |
7520 | 7520 | |
7521 | 7521 | /** |
7522 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7523 | - * |
|
7524 | - * @return Array the airport list |
|
7525 | - * |
|
7526 | - */ |
|
7522 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
7523 | + * |
|
7524 | + * @return Array the airport list |
|
7525 | + * |
|
7526 | + */ |
|
7527 | 7527 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
7528 | 7528 | { |
7529 | 7529 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7554,11 +7554,11 @@ discard block |
||
7554 | 7554 | |
7555 | 7555 | |
7556 | 7556 | /** |
7557 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7558 | - * |
|
7559 | - * @return Array the airport list |
|
7560 | - * |
|
7561 | - */ |
|
7557 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
7558 | + * |
|
7559 | + * @return Array the airport list |
|
7560 | + * |
|
7561 | + */ |
|
7562 | 7562 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
7563 | 7563 | { |
7564 | 7564 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7592,11 +7592,11 @@ discard block |
||
7592 | 7592 | |
7593 | 7593 | |
7594 | 7594 | /** |
7595 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
7596 | - * |
|
7597 | - * @return Array the airport list |
|
7598 | - * |
|
7599 | - */ |
|
7595 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
7596 | + * |
|
7597 | + * @return Array the airport list |
|
7598 | + * |
|
7599 | + */ |
|
7600 | 7600 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
7601 | 7601 | { |
7602 | 7602 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7626,11 +7626,11 @@ discard block |
||
7626 | 7626 | |
7627 | 7627 | |
7628 | 7628 | /** |
7629 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
7630 | - * |
|
7631 | - * @return Array the airport list |
|
7632 | - * |
|
7633 | - */ |
|
7629 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
7630 | + * |
|
7631 | + * @return Array the airport list |
|
7632 | + * |
|
7633 | + */ |
|
7634 | 7634 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
7635 | 7635 | { |
7636 | 7636 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7664,11 +7664,11 @@ discard block |
||
7664 | 7664 | |
7665 | 7665 | |
7666 | 7666 | /** |
7667 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
7668 | - * |
|
7669 | - * @return Array the airport list |
|
7670 | - * |
|
7671 | - */ |
|
7667 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
7668 | + * |
|
7669 | + * @return Array the airport list |
|
7670 | + * |
|
7671 | + */ |
|
7672 | 7672 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
7673 | 7673 | { |
7674 | 7674 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7699,11 +7699,11 @@ discard block |
||
7699 | 7699 | |
7700 | 7700 | |
7701 | 7701 | /** |
7702 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
7703 | - * |
|
7704 | - * @return Array the airport list |
|
7705 | - * |
|
7706 | - */ |
|
7702 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
7703 | + * |
|
7704 | + * @return Array the airport list |
|
7705 | + * |
|
7706 | + */ |
|
7707 | 7707 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
7708 | 7708 | { |
7709 | 7709 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7736,11 +7736,11 @@ discard block |
||
7736 | 7736 | |
7737 | 7737 | |
7738 | 7738 | /** |
7739 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
7740 | - * |
|
7741 | - * @return Array the airport list |
|
7742 | - * |
|
7743 | - */ |
|
7739 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
7740 | + * |
|
7741 | + * @return Array the airport list |
|
7742 | + * |
|
7743 | + */ |
|
7744 | 7744 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
7745 | 7745 | { |
7746 | 7746 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7770,11 +7770,11 @@ discard block |
||
7770 | 7770 | |
7771 | 7771 | |
7772 | 7772 | /** |
7773 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
7774 | - * |
|
7775 | - * @return Array the airport list |
|
7776 | - * |
|
7777 | - */ |
|
7773 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
7774 | + * |
|
7775 | + * @return Array the airport list |
|
7776 | + * |
|
7777 | + */ |
|
7778 | 7778 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
7779 | 7779 | { |
7780 | 7780 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7808,11 +7808,11 @@ discard block |
||
7808 | 7808 | |
7809 | 7809 | |
7810 | 7810 | /** |
7811 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
7812 | - * |
|
7813 | - * @return Array the airport list |
|
7814 | - * |
|
7815 | - */ |
|
7811 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
7812 | + * |
|
7813 | + * @return Array the airport list |
|
7814 | + * |
|
7815 | + */ |
|
7816 | 7816 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
7817 | 7817 | { |
7818 | 7818 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7843,11 +7843,11 @@ discard block |
||
7843 | 7843 | |
7844 | 7844 | |
7845 | 7845 | /** |
7846 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
7847 | - * |
|
7848 | - * @return Array the airport list |
|
7849 | - * |
|
7850 | - */ |
|
7846 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
7847 | + * |
|
7848 | + * @return Array the airport list |
|
7849 | + * |
|
7850 | + */ |
|
7851 | 7851 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
7852 | 7852 | { |
7853 | 7853 | global $globalTimezone, $globalDBdriver; |
@@ -7893,11 +7893,11 @@ discard block |
||
7893 | 7893 | |
7894 | 7894 | |
7895 | 7895 | /** |
7896 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
7897 | - * |
|
7898 | - * @return Array the airport list |
|
7899 | - * |
|
7900 | - */ |
|
7896 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
7897 | + * |
|
7898 | + * @return Array the airport list |
|
7899 | + * |
|
7900 | + */ |
|
7901 | 7901 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
7902 | 7902 | { |
7903 | 7903 | global $globalTimezone, $globalDBdriver; |
@@ -7940,11 +7940,11 @@ discard block |
||
7940 | 7940 | |
7941 | 7941 | |
7942 | 7942 | /** |
7943 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
7944 | - * |
|
7945 | - * @return Array the airport list |
|
7946 | - * |
|
7947 | - */ |
|
7943 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
7944 | + * |
|
7945 | + * @return Array the airport list |
|
7946 | + * |
|
7947 | + */ |
|
7948 | 7948 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
7949 | 7949 | { |
7950 | 7950 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7976,11 +7976,11 @@ discard block |
||
7976 | 7976 | } |
7977 | 7977 | |
7978 | 7978 | /** |
7979 | - * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
7980 | - * |
|
7981 | - * @return Array the airport list |
|
7982 | - * |
|
7983 | - */ |
|
7979 | + * Gets all arrival airports of the airplanes that have flown over based on a owner |
|
7980 | + * |
|
7981 | + * @return Array the airport list |
|
7982 | + * |
|
7983 | + */ |
|
7984 | 7984 | public function countAllArrivalAirportsByOwner($owner,$filters = array()) |
7985 | 7985 | { |
7986 | 7986 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8011,11 +8011,11 @@ discard block |
||
8011 | 8011 | } |
8012 | 8012 | |
8013 | 8013 | /** |
8014 | - * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8015 | - * |
|
8016 | - * @return Array the airport list |
|
8017 | - * |
|
8018 | - */ |
|
8014 | + * Gets all arrival airports of the airplanes that have flown over based on a pilot |
|
8015 | + * |
|
8016 | + * @return Array the airport list |
|
8017 | + * |
|
8018 | + */ |
|
8019 | 8019 | public function countAllArrivalAirportsByPilot($pilot,$filters = array()) |
8020 | 8020 | { |
8021 | 8021 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8046,11 +8046,11 @@ discard block |
||
8046 | 8046 | } |
8047 | 8047 | |
8048 | 8048 | /** |
8049 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8050 | - * |
|
8051 | - * @return Array the airport list |
|
8052 | - * |
|
8053 | - */ |
|
8049 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
8050 | + * |
|
8051 | + * @return Array the airport list |
|
8052 | + * |
|
8053 | + */ |
|
8054 | 8054 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
8055 | 8055 | { |
8056 | 8056 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8079,11 +8079,11 @@ discard block |
||
8079 | 8079 | } |
8080 | 8080 | |
8081 | 8081 | /** |
8082 | - * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8083 | - * |
|
8084 | - * @return Array the airport list |
|
8085 | - * |
|
8086 | - */ |
|
8082 | + * Gets all arrival airports by country of the airplanes that have flown over based on a owner |
|
8083 | + * |
|
8084 | + * @return Array the airport list |
|
8085 | + * |
|
8086 | + */ |
|
8087 | 8087 | public function countAllArrivalAirportCountriesByOwner($owner, $filters = array()) |
8088 | 8088 | { |
8089 | 8089 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8101,11 +8101,11 @@ discard block |
||
8101 | 8101 | |
8102 | 8102 | |
8103 | 8103 | /** |
8104 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8105 | - * |
|
8106 | - * @return Array the airport list |
|
8107 | - * |
|
8108 | - */ |
|
8104 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
8105 | + * |
|
8106 | + * @return Array the airport list |
|
8107 | + * |
|
8108 | + */ |
|
8109 | 8109 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
8110 | 8110 | { |
8111 | 8111 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8138,11 +8138,11 @@ discard block |
||
8138 | 8138 | |
8139 | 8139 | |
8140 | 8140 | /** |
8141 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8142 | - * |
|
8143 | - * @return Array the airport list |
|
8144 | - * |
|
8145 | - */ |
|
8141 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
8142 | + * |
|
8143 | + * @return Array the airport list |
|
8144 | + * |
|
8145 | + */ |
|
8146 | 8146 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
8147 | 8147 | { |
8148 | 8148 | global $globalDBdriver; |
@@ -8174,11 +8174,11 @@ discard block |
||
8174 | 8174 | |
8175 | 8175 | |
8176 | 8176 | /** |
8177 | - * Counts all airport departure countries |
|
8178 | - * |
|
8179 | - * @return Array the airport departure list |
|
8180 | - * |
|
8181 | - */ |
|
8177 | + * Counts all airport departure countries |
|
8178 | + * |
|
8179 | + * @return Array the airport departure list |
|
8180 | + * |
|
8181 | + */ |
|
8182 | 8182 | public function countAllDepartureCountries($filters = array(),$year = '',$month = '', $day = '') |
8183 | 8183 | { |
8184 | 8184 | global $globalDBdriver; |
@@ -8237,11 +8237,11 @@ discard block |
||
8237 | 8237 | |
8238 | 8238 | |
8239 | 8239 | /** |
8240 | - * Counts all airport arrival countries |
|
8241 | - * |
|
8242 | - * @return Array the airport arrival list |
|
8243 | - * |
|
8244 | - */ |
|
8240 | + * Counts all airport arrival countries |
|
8241 | + * |
|
8242 | + * @return Array the airport arrival list |
|
8243 | + * |
|
8244 | + */ |
|
8245 | 8245 | public function countAllArrivalCountries($limit = true,$filters = array(),$year = '',$month = '',$day = '') |
8246 | 8246 | { |
8247 | 8247 | global $globalDBdriver; |
@@ -8303,11 +8303,11 @@ discard block |
||
8303 | 8303 | |
8304 | 8304 | |
8305 | 8305 | /** |
8306 | - * Gets all route combinations |
|
8307 | - * |
|
8308 | - * @return Array the route list |
|
8309 | - * |
|
8310 | - */ |
|
8306 | + * Gets all route combinations |
|
8307 | + * |
|
8308 | + * @return Array the route list |
|
8309 | + * |
|
8310 | + */ |
|
8311 | 8311 | public function countAllRoutes($filters = array()) |
8312 | 8312 | { |
8313 | 8313 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8346,11 +8346,11 @@ discard block |
||
8346 | 8346 | |
8347 | 8347 | |
8348 | 8348 | /** |
8349 | - * Gets all route combinations based on an aircraft |
|
8350 | - * |
|
8351 | - * @return Array the route list |
|
8352 | - * |
|
8353 | - */ |
|
8349 | + * Gets all route combinations based on an aircraft |
|
8350 | + * |
|
8351 | + * @return Array the route list |
|
8352 | + * |
|
8353 | + */ |
|
8354 | 8354 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
8355 | 8355 | { |
8356 | 8356 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8386,11 +8386,11 @@ discard block |
||
8386 | 8386 | |
8387 | 8387 | |
8388 | 8388 | /** |
8389 | - * Gets all route combinations based on an aircraft registration |
|
8390 | - * |
|
8391 | - * @return Array the route list |
|
8392 | - * |
|
8393 | - */ |
|
8389 | + * Gets all route combinations based on an aircraft registration |
|
8390 | + * |
|
8391 | + * @return Array the route list |
|
8392 | + * |
|
8393 | + */ |
|
8394 | 8394 | public function countAllRoutesByRegistration($registration, $filters = array()) |
8395 | 8395 | { |
8396 | 8396 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8428,11 +8428,11 @@ discard block |
||
8428 | 8428 | |
8429 | 8429 | |
8430 | 8430 | /** |
8431 | - * Gets all route combinations based on an airline |
|
8432 | - * |
|
8433 | - * @return Array the route list |
|
8434 | - * |
|
8435 | - */ |
|
8431 | + * Gets all route combinations based on an airline |
|
8432 | + * |
|
8433 | + * @return Array the route list |
|
8434 | + * |
|
8435 | + */ |
|
8436 | 8436 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
8437 | 8437 | { |
8438 | 8438 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8470,11 +8470,11 @@ discard block |
||
8470 | 8470 | |
8471 | 8471 | |
8472 | 8472 | /** |
8473 | - * Gets all route combinations based on an airport |
|
8474 | - * |
|
8475 | - * @return Array the route list |
|
8476 | - * |
|
8477 | - */ |
|
8473 | + * Gets all route combinations based on an airport |
|
8474 | + * |
|
8475 | + * @return Array the route list |
|
8476 | + * |
|
8477 | + */ |
|
8478 | 8478 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
8479 | 8479 | { |
8480 | 8480 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8511,11 +8511,11 @@ discard block |
||
8511 | 8511 | |
8512 | 8512 | |
8513 | 8513 | /** |
8514 | - * Gets all route combinations based on an country |
|
8515 | - * |
|
8516 | - * @return Array the route list |
|
8517 | - * |
|
8518 | - */ |
|
8514 | + * Gets all route combinations based on an country |
|
8515 | + * |
|
8516 | + * @return Array the route list |
|
8517 | + * |
|
8518 | + */ |
|
8519 | 8519 | public function countAllRoutesByCountry($country, $filters = array()) |
8520 | 8520 | { |
8521 | 8521 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8551,11 +8551,11 @@ discard block |
||
8551 | 8551 | |
8552 | 8552 | |
8553 | 8553 | /** |
8554 | - * Gets all route combinations based on an date |
|
8555 | - * |
|
8556 | - * @return Array the route list |
|
8557 | - * |
|
8558 | - */ |
|
8554 | + * Gets all route combinations based on an date |
|
8555 | + * |
|
8556 | + * @return Array the route list |
|
8557 | + * |
|
8558 | + */ |
|
8559 | 8559 | public function countAllRoutesByDate($date, $filters = array()) |
8560 | 8560 | { |
8561 | 8561 | global $globalTimezone, $globalDBdriver; |
@@ -8605,11 +8605,11 @@ discard block |
||
8605 | 8605 | |
8606 | 8606 | |
8607 | 8607 | /** |
8608 | - * Gets all route combinations based on an ident/callsign |
|
8609 | - * |
|
8610 | - * @return Array the route list |
|
8611 | - * |
|
8612 | - */ |
|
8608 | + * Gets all route combinations based on an ident/callsign |
|
8609 | + * |
|
8610 | + * @return Array the route list |
|
8611 | + * |
|
8612 | + */ |
|
8613 | 8613 | public function countAllRoutesByIdent($ident, $filters = array()) |
8614 | 8614 | { |
8615 | 8615 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8645,11 +8645,11 @@ discard block |
||
8645 | 8645 | } |
8646 | 8646 | |
8647 | 8647 | /** |
8648 | - * Gets all route combinations based on an owner |
|
8649 | - * |
|
8650 | - * @return Array the route list |
|
8651 | - * |
|
8652 | - */ |
|
8648 | + * Gets all route combinations based on an owner |
|
8649 | + * |
|
8650 | + * @return Array the route list |
|
8651 | + * |
|
8652 | + */ |
|
8653 | 8653 | public function countAllRoutesByOwner($owner,$filters = array()) |
8654 | 8654 | { |
8655 | 8655 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8685,11 +8685,11 @@ discard block |
||
8685 | 8685 | } |
8686 | 8686 | |
8687 | 8687 | /** |
8688 | - * Gets all route combinations based on a pilot |
|
8689 | - * |
|
8690 | - * @return Array the route list |
|
8691 | - * |
|
8692 | - */ |
|
8688 | + * Gets all route combinations based on a pilot |
|
8689 | + * |
|
8690 | + * @return Array the route list |
|
8691 | + * |
|
8692 | + */ |
|
8693 | 8693 | public function countAllRoutesByPilot($pilot,$filters = array()) |
8694 | 8694 | { |
8695 | 8695 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8726,11 +8726,11 @@ discard block |
||
8726 | 8726 | |
8727 | 8727 | |
8728 | 8728 | /** |
8729 | - * Gets all route combinations based on an manufacturer |
|
8730 | - * |
|
8731 | - * @return Array the route list |
|
8732 | - * |
|
8733 | - */ |
|
8729 | + * Gets all route combinations based on an manufacturer |
|
8730 | + * |
|
8731 | + * @return Array the route list |
|
8732 | + * |
|
8733 | + */ |
|
8734 | 8734 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
8735 | 8735 | { |
8736 | 8736 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8768,11 +8768,11 @@ discard block |
||
8768 | 8768 | |
8769 | 8769 | |
8770 | 8770 | /** |
8771 | - * Gets all route combinations with waypoints |
|
8772 | - * |
|
8773 | - * @return Array the route list |
|
8774 | - * |
|
8775 | - */ |
|
8771 | + * Gets all route combinations with waypoints |
|
8772 | + * |
|
8773 | + * @return Array the route list |
|
8774 | + * |
|
8775 | + */ |
|
8776 | 8776 | public function countAllRoutesWithWaypoints($filters = array()) |
8777 | 8777 | { |
8778 | 8778 | $filter_query = $this->getFilter($filters,true,true); |
@@ -8809,11 +8809,11 @@ discard block |
||
8809 | 8809 | } |
8810 | 8810 | |
8811 | 8811 | /** |
8812 | - * Gets all callsigns that have flown over |
|
8813 | - * |
|
8814 | - * @return Array the callsign list |
|
8815 | - * |
|
8816 | - */ |
|
8812 | + * Gets all callsigns that have flown over |
|
8813 | + * |
|
8814 | + * @return Array the callsign list |
|
8815 | + * |
|
8816 | + */ |
|
8817 | 8817 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
8818 | 8818 | { |
8819 | 8819 | global $globalDBdriver; |
@@ -8879,11 +8879,11 @@ discard block |
||
8879 | 8879 | } |
8880 | 8880 | |
8881 | 8881 | /** |
8882 | - * Gets all callsigns that have flown over |
|
8883 | - * |
|
8884 | - * @return Array the callsign list |
|
8885 | - * |
|
8886 | - */ |
|
8882 | + * Gets all callsigns that have flown over |
|
8883 | + * |
|
8884 | + * @return Array the callsign list |
|
8885 | + * |
|
8886 | + */ |
|
8887 | 8887 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
8888 | 8888 | { |
8889 | 8889 | global $globalDBdriver; |
@@ -8924,11 +8924,11 @@ discard block |
||
8924 | 8924 | |
8925 | 8925 | |
8926 | 8926 | /** |
8927 | - * Counts all dates |
|
8928 | - * |
|
8929 | - * @return Array the date list |
|
8930 | - * |
|
8931 | - */ |
|
8927 | + * Counts all dates |
|
8928 | + * |
|
8929 | + * @return Array the date list |
|
8930 | + * |
|
8931 | + */ |
|
8932 | 8932 | public function countAllDates($filters = array()) |
8933 | 8933 | { |
8934 | 8934 | global $globalTimezone, $globalDBdriver; |
@@ -8973,11 +8973,11 @@ discard block |
||
8973 | 8973 | } |
8974 | 8974 | |
8975 | 8975 | /** |
8976 | - * Counts all dates |
|
8977 | - * |
|
8978 | - * @return Array the date list |
|
8979 | - * |
|
8980 | - */ |
|
8976 | + * Counts all dates |
|
8977 | + * |
|
8978 | + * @return Array the date list |
|
8979 | + * |
|
8980 | + */ |
|
8981 | 8981 | public function countAllDatesByAirlines($filters = array()) |
8982 | 8982 | { |
8983 | 8983 | global $globalTimezone, $globalDBdriver; |
@@ -9022,11 +9022,11 @@ discard block |
||
9022 | 9022 | } |
9023 | 9023 | |
9024 | 9024 | /** |
9025 | - * Counts all dates during the last 7 days |
|
9026 | - * |
|
9027 | - * @return Array the date list |
|
9028 | - * |
|
9029 | - */ |
|
9025 | + * Counts all dates during the last 7 days |
|
9026 | + * |
|
9027 | + * @return Array the date list |
|
9028 | + * |
|
9029 | + */ |
|
9030 | 9030 | public function countAllDatesLast7Days($filters = array()) |
9031 | 9031 | { |
9032 | 9032 | global $globalTimezone, $globalDBdriver; |
@@ -9048,7 +9048,7 @@ discard block |
||
9048 | 9048 | $query .= " GROUP BY date_name |
9049 | 9049 | ORDER BY date_name ASC"; |
9050 | 9050 | $query_data = array(':offset' => $offset); |
9051 | - } |
|
9051 | + } |
|
9052 | 9052 | |
9053 | 9053 | $sth = $this->db->prepare($query); |
9054 | 9054 | $sth->execute($query_data); |
@@ -9068,11 +9068,11 @@ discard block |
||
9068 | 9068 | } |
9069 | 9069 | |
9070 | 9070 | /** |
9071 | - * Counts all dates during the last month |
|
9072 | - * |
|
9073 | - * @return Array the date list |
|
9074 | - * |
|
9075 | - */ |
|
9071 | + * Counts all dates during the last month |
|
9072 | + * |
|
9073 | + * @return Array the date list |
|
9074 | + * |
|
9075 | + */ |
|
9076 | 9076 | public function countAllDatesLastMonth($filters = array()) |
9077 | 9077 | { |
9078 | 9078 | global $globalTimezone, $globalDBdriver; |
@@ -9094,7 +9094,7 @@ discard block |
||
9094 | 9094 | $query .= " GROUP BY date_name |
9095 | 9095 | ORDER BY date_name ASC"; |
9096 | 9096 | $query_data = array(':offset' => $offset); |
9097 | - } |
|
9097 | + } |
|
9098 | 9098 | |
9099 | 9099 | $sth = $this->db->prepare($query); |
9100 | 9100 | $sth->execute($query_data); |
@@ -9115,11 +9115,11 @@ discard block |
||
9115 | 9115 | |
9116 | 9116 | |
9117 | 9117 | /** |
9118 | - * Counts all dates during the last month |
|
9119 | - * |
|
9120 | - * @return Array the date list |
|
9121 | - * |
|
9122 | - */ |
|
9118 | + * Counts all dates during the last month |
|
9119 | + * |
|
9120 | + * @return Array the date list |
|
9121 | + * |
|
9122 | + */ |
|
9123 | 9123 | public function countAllDatesLastMonthByAirlines($filters = array()) |
9124 | 9124 | { |
9125 | 9125 | global $globalTimezone, $globalDBdriver; |
@@ -9142,7 +9142,7 @@ discard block |
||
9142 | 9142 | GROUP BY spotter_output.airline_icao, date_name |
9143 | 9143 | ORDER BY date_name ASC"; |
9144 | 9144 | $query_data = array(':offset' => $offset); |
9145 | - } |
|
9145 | + } |
|
9146 | 9146 | |
9147 | 9147 | $sth = $this->db->prepare($query); |
9148 | 9148 | $sth->execute($query_data); |
@@ -9164,11 +9164,11 @@ discard block |
||
9164 | 9164 | |
9165 | 9165 | |
9166 | 9166 | /** |
9167 | - * Counts all month |
|
9168 | - * |
|
9169 | - * @return Array the month list |
|
9170 | - * |
|
9171 | - */ |
|
9167 | + * Counts all month |
|
9168 | + * |
|
9169 | + * @return Array the month list |
|
9170 | + * |
|
9171 | + */ |
|
9172 | 9172 | public function countAllMonths($filters = array()) |
9173 | 9173 | { |
9174 | 9174 | global $globalTimezone, $globalDBdriver; |
@@ -9210,11 +9210,11 @@ discard block |
||
9210 | 9210 | } |
9211 | 9211 | |
9212 | 9212 | /** |
9213 | - * Counts all month |
|
9214 | - * |
|
9215 | - * @return Array the month list |
|
9216 | - * |
|
9217 | - */ |
|
9213 | + * Counts all month |
|
9214 | + * |
|
9215 | + * @return Array the month list |
|
9216 | + * |
|
9217 | + */ |
|
9218 | 9218 | public function countAllMonthsByAirlines($filters = array()) |
9219 | 9219 | { |
9220 | 9220 | global $globalTimezone, $globalDBdriver; |
@@ -9259,11 +9259,11 @@ discard block |
||
9259 | 9259 | } |
9260 | 9260 | |
9261 | 9261 | /** |
9262 | - * Counts all military month |
|
9263 | - * |
|
9264 | - * @return Array the month list |
|
9265 | - * |
|
9266 | - */ |
|
9262 | + * Counts all military month |
|
9263 | + * |
|
9264 | + * @return Array the month list |
|
9265 | + * |
|
9266 | + */ |
|
9267 | 9267 | public function countAllMilitaryMonths($filters = array()) |
9268 | 9268 | { |
9269 | 9269 | global $globalTimezone, $globalDBdriver; |
@@ -9304,11 +9304,11 @@ discard block |
||
9304 | 9304 | } |
9305 | 9305 | |
9306 | 9306 | /** |
9307 | - * Counts all month owners |
|
9308 | - * |
|
9309 | - * @return Array the month list |
|
9310 | - * |
|
9311 | - */ |
|
9307 | + * Counts all month owners |
|
9308 | + * |
|
9309 | + * @return Array the month list |
|
9310 | + * |
|
9311 | + */ |
|
9312 | 9312 | public function countAllMonthsOwners($filters = array()) |
9313 | 9313 | { |
9314 | 9314 | global $globalTimezone, $globalDBdriver; |
@@ -9350,11 +9350,11 @@ discard block |
||
9350 | 9350 | } |
9351 | 9351 | |
9352 | 9352 | /** |
9353 | - * Counts all month owners |
|
9354 | - * |
|
9355 | - * @return Array the month list |
|
9356 | - * |
|
9357 | - */ |
|
9353 | + * Counts all month owners |
|
9354 | + * |
|
9355 | + * @return Array the month list |
|
9356 | + * |
|
9357 | + */ |
|
9358 | 9358 | public function countAllMonthsOwnersByAirlines($filters = array()) |
9359 | 9359 | { |
9360 | 9360 | global $globalTimezone, $globalDBdriver; |
@@ -9397,11 +9397,11 @@ discard block |
||
9397 | 9397 | } |
9398 | 9398 | |
9399 | 9399 | /** |
9400 | - * Counts all month pilot |
|
9401 | - * |
|
9402 | - * @return Array the month list |
|
9403 | - * |
|
9404 | - */ |
|
9400 | + * Counts all month pilot |
|
9401 | + * |
|
9402 | + * @return Array the month list |
|
9403 | + * |
|
9404 | + */ |
|
9405 | 9405 | public function countAllMonthsPilots($filters = array()) |
9406 | 9406 | { |
9407 | 9407 | global $globalTimezone, $globalDBdriver; |
@@ -9443,11 +9443,11 @@ discard block |
||
9443 | 9443 | } |
9444 | 9444 | |
9445 | 9445 | /** |
9446 | - * Counts all month pilot |
|
9447 | - * |
|
9448 | - * @return Array the month list |
|
9449 | - * |
|
9450 | - */ |
|
9446 | + * Counts all month pilot |
|
9447 | + * |
|
9448 | + * @return Array the month list |
|
9449 | + * |
|
9450 | + */ |
|
9451 | 9451 | public function countAllMonthsPilotsByAirlines($filters = array()) |
9452 | 9452 | { |
9453 | 9453 | global $globalTimezone, $globalDBdriver; |
@@ -9490,11 +9490,11 @@ discard block |
||
9490 | 9490 | } |
9491 | 9491 | |
9492 | 9492 | /** |
9493 | - * Counts all month airline |
|
9494 | - * |
|
9495 | - * @return Array the month list |
|
9496 | - * |
|
9497 | - */ |
|
9493 | + * Counts all month airline |
|
9494 | + * |
|
9495 | + * @return Array the month list |
|
9496 | + * |
|
9497 | + */ |
|
9498 | 9498 | public function countAllMonthsAirlines($filters = array()) |
9499 | 9499 | { |
9500 | 9500 | global $globalTimezone, $globalDBdriver; |
@@ -9536,11 +9536,11 @@ discard block |
||
9536 | 9536 | } |
9537 | 9537 | |
9538 | 9538 | /** |
9539 | - * Counts all month aircraft |
|
9540 | - * |
|
9541 | - * @return Array the month list |
|
9542 | - * |
|
9543 | - */ |
|
9539 | + * Counts all month aircraft |
|
9540 | + * |
|
9541 | + * @return Array the month list |
|
9542 | + * |
|
9543 | + */ |
|
9544 | 9544 | public function countAllMonthsAircrafts($filters = array()) |
9545 | 9545 | { |
9546 | 9546 | global $globalTimezone, $globalDBdriver; |
@@ -9583,11 +9583,11 @@ discard block |
||
9583 | 9583 | |
9584 | 9584 | |
9585 | 9585 | /** |
9586 | - * Counts all month aircraft |
|
9587 | - * |
|
9588 | - * @return Array the month list |
|
9589 | - * |
|
9590 | - */ |
|
9586 | + * Counts all month aircraft |
|
9587 | + * |
|
9588 | + * @return Array the month list |
|
9589 | + * |
|
9590 | + */ |
|
9591 | 9591 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
9592 | 9592 | { |
9593 | 9593 | global $globalTimezone, $globalDBdriver; |
@@ -9630,11 +9630,11 @@ discard block |
||
9630 | 9630 | } |
9631 | 9631 | |
9632 | 9632 | /** |
9633 | - * Counts all month real arrival |
|
9634 | - * |
|
9635 | - * @return Array the month list |
|
9636 | - * |
|
9637 | - */ |
|
9633 | + * Counts all month real arrival |
|
9634 | + * |
|
9635 | + * @return Array the month list |
|
9636 | + * |
|
9637 | + */ |
|
9638 | 9638 | public function countAllMonthsRealArrivals($filters = array()) |
9639 | 9639 | { |
9640 | 9640 | global $globalTimezone, $globalDBdriver; |
@@ -9677,11 +9677,11 @@ discard block |
||
9677 | 9677 | |
9678 | 9678 | |
9679 | 9679 | /** |
9680 | - * Counts all month real arrival |
|
9681 | - * |
|
9682 | - * @return Array the month list |
|
9683 | - * |
|
9684 | - */ |
|
9680 | + * Counts all month real arrival |
|
9681 | + * |
|
9682 | + * @return Array the month list |
|
9683 | + * |
|
9684 | + */ |
|
9685 | 9685 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
9686 | 9686 | { |
9687 | 9687 | global $globalTimezone, $globalDBdriver; |
@@ -9725,11 +9725,11 @@ discard block |
||
9725 | 9725 | |
9726 | 9726 | |
9727 | 9727 | /** |
9728 | - * Counts all dates during the last year |
|
9729 | - * |
|
9730 | - * @return Array the date list |
|
9731 | - * |
|
9732 | - */ |
|
9728 | + * Counts all dates during the last year |
|
9729 | + * |
|
9730 | + * @return Array the date list |
|
9731 | + * |
|
9732 | + */ |
|
9733 | 9733 | public function countAllMonthsLastYear($filters) |
9734 | 9734 | { |
9735 | 9735 | global $globalTimezone, $globalDBdriver; |
@@ -9751,7 +9751,7 @@ discard block |
||
9751 | 9751 | $query .= " GROUP BY year_name, month_name |
9752 | 9752 | ORDER BY year_name, month_name ASC"; |
9753 | 9753 | $query_data = array(':offset' => $offset); |
9754 | - } |
|
9754 | + } |
|
9755 | 9755 | |
9756 | 9756 | $sth = $this->db->prepare($query); |
9757 | 9757 | $sth->execute($query_data); |
@@ -9774,11 +9774,11 @@ discard block |
||
9774 | 9774 | |
9775 | 9775 | |
9776 | 9776 | /** |
9777 | - * Counts all hours |
|
9778 | - * |
|
9779 | - * @return Array the hour list |
|
9780 | - * |
|
9781 | - */ |
|
9777 | + * Counts all hours |
|
9778 | + * |
|
9779 | + * @return Array the hour list |
|
9780 | + * |
|
9781 | + */ |
|
9782 | 9782 | public function countAllHours($orderby,$filters = array()) |
9783 | 9783 | { |
9784 | 9784 | global $globalTimezone, $globalDBdriver; |
@@ -9839,11 +9839,11 @@ discard block |
||
9839 | 9839 | } |
9840 | 9840 | |
9841 | 9841 | /** |
9842 | - * Counts all hours |
|
9843 | - * |
|
9844 | - * @return Array the hour list |
|
9845 | - * |
|
9846 | - */ |
|
9842 | + * Counts all hours |
|
9843 | + * |
|
9844 | + * @return Array the hour list |
|
9845 | + * |
|
9846 | + */ |
|
9847 | 9847 | public function countAllHoursByAirlines($orderby, $filters = array()) |
9848 | 9848 | { |
9849 | 9849 | global $globalTimezone, $globalDBdriver; |
@@ -9906,11 +9906,11 @@ discard block |
||
9906 | 9906 | |
9907 | 9907 | |
9908 | 9908 | /** |
9909 | - * Counts all hours by airline |
|
9910 | - * |
|
9911 | - * @return Array the hour list |
|
9912 | - * |
|
9913 | - */ |
|
9909 | + * Counts all hours by airline |
|
9910 | + * |
|
9911 | + * @return Array the hour list |
|
9912 | + * |
|
9913 | + */ |
|
9914 | 9914 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
9915 | 9915 | { |
9916 | 9916 | global $globalTimezone, $globalDBdriver; |
@@ -9956,11 +9956,11 @@ discard block |
||
9956 | 9956 | |
9957 | 9957 | |
9958 | 9958 | /** |
9959 | - * Counts all hours by aircraft |
|
9960 | - * |
|
9961 | - * @return Array the hour list |
|
9962 | - * |
|
9963 | - */ |
|
9959 | + * Counts all hours by aircraft |
|
9960 | + * |
|
9961 | + * @return Array the hour list |
|
9962 | + * |
|
9963 | + */ |
|
9964 | 9964 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
9965 | 9965 | { |
9966 | 9966 | global $globalTimezone, $globalDBdriver; |
@@ -10003,11 +10003,11 @@ discard block |
||
10003 | 10003 | |
10004 | 10004 | |
10005 | 10005 | /** |
10006 | - * Counts all hours by aircraft registration |
|
10007 | - * |
|
10008 | - * @return Array the hour list |
|
10009 | - * |
|
10010 | - */ |
|
10006 | + * Counts all hours by aircraft registration |
|
10007 | + * |
|
10008 | + * @return Array the hour list |
|
10009 | + * |
|
10010 | + */ |
|
10011 | 10011 | public function countAllHoursByRegistration($registration, $filters = array()) |
10012 | 10012 | { |
10013 | 10013 | global $globalTimezone, $globalDBdriver; |
@@ -10050,11 +10050,11 @@ discard block |
||
10050 | 10050 | |
10051 | 10051 | |
10052 | 10052 | /** |
10053 | - * Counts all hours by airport |
|
10054 | - * |
|
10055 | - * @return Array the hour list |
|
10056 | - * |
|
10057 | - */ |
|
10053 | + * Counts all hours by airport |
|
10054 | + * |
|
10055 | + * @return Array the hour list |
|
10056 | + * |
|
10057 | + */ |
|
10058 | 10058 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
10059 | 10059 | { |
10060 | 10060 | global $globalTimezone, $globalDBdriver; |
@@ -10098,11 +10098,11 @@ discard block |
||
10098 | 10098 | |
10099 | 10099 | |
10100 | 10100 | /** |
10101 | - * Counts all hours by manufacturer |
|
10102 | - * |
|
10103 | - * @return Array the hour list |
|
10104 | - * |
|
10105 | - */ |
|
10101 | + * Counts all hours by manufacturer |
|
10102 | + * |
|
10103 | + * @return Array the hour list |
|
10104 | + * |
|
10105 | + */ |
|
10106 | 10106 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
10107 | 10107 | { |
10108 | 10108 | global $globalTimezone, $globalDBdriver; |
@@ -10146,11 +10146,11 @@ discard block |
||
10146 | 10146 | |
10147 | 10147 | |
10148 | 10148 | /** |
10149 | - * Counts all hours by date |
|
10150 | - * |
|
10151 | - * @return Array the hour list |
|
10152 | - * |
|
10153 | - */ |
|
10149 | + * Counts all hours by date |
|
10150 | + * |
|
10151 | + * @return Array the hour list |
|
10152 | + * |
|
10153 | + */ |
|
10154 | 10154 | public function countAllHoursByDate($date, $filters = array()) |
10155 | 10155 | { |
10156 | 10156 | global $globalTimezone, $globalDBdriver; |
@@ -10194,11 +10194,11 @@ discard block |
||
10194 | 10194 | |
10195 | 10195 | |
10196 | 10196 | /** |
10197 | - * Counts all hours by a ident/callsign |
|
10198 | - * |
|
10199 | - * @return Array the hour list |
|
10200 | - * |
|
10201 | - */ |
|
10197 | + * Counts all hours by a ident/callsign |
|
10198 | + * |
|
10199 | + * @return Array the hour list |
|
10200 | + * |
|
10201 | + */ |
|
10202 | 10202 | public function countAllHoursByIdent($ident, $filters = array()) |
10203 | 10203 | { |
10204 | 10204 | global $globalTimezone, $globalDBdriver; |
@@ -10241,11 +10241,11 @@ discard block |
||
10241 | 10241 | } |
10242 | 10242 | |
10243 | 10243 | /** |
10244 | - * Counts all hours by a owner |
|
10245 | - * |
|
10246 | - * @return Array the hour list |
|
10247 | - * |
|
10248 | - */ |
|
10244 | + * Counts all hours by a owner |
|
10245 | + * |
|
10246 | + * @return Array the hour list |
|
10247 | + * |
|
10248 | + */ |
|
10249 | 10249 | public function countAllHoursByOwner($owner, $filters = array()) |
10250 | 10250 | { |
10251 | 10251 | global $globalTimezone, $globalDBdriver; |
@@ -10288,11 +10288,11 @@ discard block |
||
10288 | 10288 | } |
10289 | 10289 | |
10290 | 10290 | /** |
10291 | - * Counts all hours by a pilot |
|
10292 | - * |
|
10293 | - * @return Array the hour list |
|
10294 | - * |
|
10295 | - */ |
|
10291 | + * Counts all hours by a pilot |
|
10292 | + * |
|
10293 | + * @return Array the hour list |
|
10294 | + * |
|
10295 | + */ |
|
10296 | 10296 | public function countAllHoursByPilot($pilot, $filters = array()) |
10297 | 10297 | { |
10298 | 10298 | global $globalTimezone, $globalDBdriver; |
@@ -10337,11 +10337,11 @@ discard block |
||
10337 | 10337 | |
10338 | 10338 | |
10339 | 10339 | /** |
10340 | - * Counts all hours by route |
|
10341 | - * |
|
10342 | - * @return Array the hour list |
|
10343 | - * |
|
10344 | - */ |
|
10340 | + * Counts all hours by route |
|
10341 | + * |
|
10342 | + * @return Array the hour list |
|
10343 | + * |
|
10344 | + */ |
|
10345 | 10345 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
10346 | 10346 | { |
10347 | 10347 | global $globalTimezone, $globalDBdriver; |
@@ -10385,11 +10385,11 @@ discard block |
||
10385 | 10385 | |
10386 | 10386 | |
10387 | 10387 | /** |
10388 | - * Counts all hours by country |
|
10389 | - * |
|
10390 | - * @return Array the hour list |
|
10391 | - * |
|
10392 | - */ |
|
10388 | + * Counts all hours by country |
|
10389 | + * |
|
10390 | + * @return Array the hour list |
|
10391 | + * |
|
10392 | + */ |
|
10393 | 10393 | public function countAllHoursByCountry($country, $filters = array()) |
10394 | 10394 | { |
10395 | 10395 | global $globalTimezone, $globalDBdriver; |
@@ -10434,11 +10434,11 @@ discard block |
||
10434 | 10434 | |
10435 | 10435 | |
10436 | 10436 | /** |
10437 | - * Counts all aircraft that have flown over |
|
10438 | - * |
|
10439 | - * @return Integer the number of aircrafts |
|
10440 | - * |
|
10441 | - */ |
|
10437 | + * Counts all aircraft that have flown over |
|
10438 | + * |
|
10439 | + * @return Integer the number of aircrafts |
|
10440 | + * |
|
10441 | + */ |
|
10442 | 10442 | public function countOverallAircrafts($filters = array(),$year = '',$month = '') |
10443 | 10443 | { |
10444 | 10444 | global $globalDBdriver; |
@@ -10471,11 +10471,11 @@ discard block |
||
10471 | 10471 | } |
10472 | 10472 | |
10473 | 10473 | /** |
10474 | - * Counts all flight that really arrival |
|
10475 | - * |
|
10476 | - * @return Integer the number of aircrafts |
|
10477 | - * |
|
10478 | - */ |
|
10474 | + * Counts all flight that really arrival |
|
10475 | + * |
|
10476 | + * @return Integer the number of aircrafts |
|
10477 | + * |
|
10478 | + */ |
|
10479 | 10479 | public function countOverallArrival($filters = array(),$year = '',$month = '') |
10480 | 10480 | { |
10481 | 10481 | global $globalDBdriver; |
@@ -10508,11 +10508,11 @@ discard block |
||
10508 | 10508 | } |
10509 | 10509 | |
10510 | 10510 | /** |
10511 | - * Counts all pilots that have flown over |
|
10512 | - * |
|
10513 | - * @return Integer the number of pilots |
|
10514 | - * |
|
10515 | - */ |
|
10511 | + * Counts all pilots that have flown over |
|
10512 | + * |
|
10513 | + * @return Integer the number of pilots |
|
10514 | + * |
|
10515 | + */ |
|
10516 | 10516 | public function countOverallPilots($filters = array(),$year = '',$month = '') |
10517 | 10517 | { |
10518 | 10518 | global $globalDBdriver; |
@@ -10544,11 +10544,11 @@ discard block |
||
10544 | 10544 | } |
10545 | 10545 | |
10546 | 10546 | /** |
10547 | - * Counts all owners that have flown over |
|
10548 | - * |
|
10549 | - * @return Integer the number of owners |
|
10550 | - * |
|
10551 | - */ |
|
10547 | + * Counts all owners that have flown over |
|
10548 | + * |
|
10549 | + * @return Integer the number of owners |
|
10550 | + * |
|
10551 | + */ |
|
10552 | 10552 | public function countOverallOwners($filters = array(),$year = '',$month = '') |
10553 | 10553 | { |
10554 | 10554 | global $globalDBdriver; |
@@ -10581,11 +10581,11 @@ discard block |
||
10581 | 10581 | |
10582 | 10582 | |
10583 | 10583 | /** |
10584 | - * Counts all flights that have flown over |
|
10585 | - * |
|
10586 | - * @return Integer the number of flights |
|
10587 | - * |
|
10588 | - */ |
|
10584 | + * Counts all flights that have flown over |
|
10585 | + * |
|
10586 | + * @return Integer the number of flights |
|
10587 | + * |
|
10588 | + */ |
|
10589 | 10589 | public function countOverallFlights($filters = array(),$year = '',$month = '') |
10590 | 10590 | { |
10591 | 10591 | global $globalDBdriver; |
@@ -10620,11 +10620,11 @@ discard block |
||
10620 | 10620 | } |
10621 | 10621 | |
10622 | 10622 | /** |
10623 | - * Counts all military flights that have flown over |
|
10624 | - * |
|
10625 | - * @return Integer the number of flights |
|
10626 | - * |
|
10627 | - */ |
|
10623 | + * Counts all military flights that have flown over |
|
10624 | + * |
|
10625 | + * @return Integer the number of flights |
|
10626 | + * |
|
10627 | + */ |
|
10628 | 10628 | public function countOverallMilitaryFlights($filters = array(),$year = '',$month = '') |
10629 | 10629 | { |
10630 | 10630 | global $globalDBdriver; |
@@ -10659,11 +10659,11 @@ discard block |
||
10659 | 10659 | |
10660 | 10660 | |
10661 | 10661 | /** |
10662 | - * Counts all airlines that have flown over |
|
10663 | - * |
|
10664 | - * @return Integer the number of airlines |
|
10665 | - * |
|
10666 | - */ |
|
10662 | + * Counts all airlines that have flown over |
|
10663 | + * |
|
10664 | + * @return Integer the number of airlines |
|
10665 | + * |
|
10666 | + */ |
|
10667 | 10667 | public function countOverallAirlines($filters = array(),$year = '',$month = '') |
10668 | 10668 | { |
10669 | 10669 | global $globalDBdriver; |
@@ -10690,8 +10690,8 @@ discard block |
||
10690 | 10690 | $query_values = array_merge($query_values,array(':month' => $month)); |
10691 | 10691 | } |
10692 | 10692 | } |
10693 | - if ($query == '') $queryi .= $this->getFilter($filters); |
|
10694 | - else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
10693 | + if ($query == '') $queryi .= $this->getFilter($filters); |
|
10694 | + else $queryi .= $this->getFilter($filters,true,true).substr($query,4); |
|
10695 | 10695 | |
10696 | 10696 | |
10697 | 10697 | $sth = $this->db->prepare($queryi); |
@@ -10701,11 +10701,11 @@ discard block |
||
10701 | 10701 | |
10702 | 10702 | |
10703 | 10703 | /** |
10704 | - * Counts all hours of today |
|
10705 | - * |
|
10706 | - * @return Array the hour list |
|
10707 | - * |
|
10708 | - */ |
|
10704 | + * Counts all hours of today |
|
10705 | + * |
|
10706 | + * @return Array the hour list |
|
10707 | + * |
|
10708 | + */ |
|
10709 | 10709 | public function countAllHoursFromToday($filters = array()) |
10710 | 10710 | { |
10711 | 10711 | global $globalTimezone, $globalDBdriver; |
@@ -10745,11 +10745,11 @@ discard block |
||
10745 | 10745 | } |
10746 | 10746 | |
10747 | 10747 | /** |
10748 | - * Gets all the spotter information based on calculated upcoming flights |
|
10749 | - * |
|
10750 | - * @return Array the spotter information |
|
10751 | - * |
|
10752 | - */ |
|
10748 | + * Gets all the spotter information based on calculated upcoming flights |
|
10749 | + * |
|
10750 | + * @return Array the spotter information |
|
10751 | + * |
|
10752 | + */ |
|
10753 | 10753 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
10754 | 10754 | { |
10755 | 10755 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -10824,12 +10824,12 @@ discard block |
||
10824 | 10824 | } |
10825 | 10825 | |
10826 | 10826 | |
10827 | - /** |
|
10828 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
10829 | - * |
|
10830 | - * @return Integer the Barrie Spotter ID |
|
10827 | + /** |
|
10828 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
10829 | + * |
|
10830 | + * @return Integer the Barrie Spotter ID |
|
10831 | 10831 | q * |
10832 | - */ |
|
10832 | + */ |
|
10833 | 10833 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
10834 | 10834 | { |
10835 | 10835 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -10850,13 +10850,13 @@ discard block |
||
10850 | 10850 | |
10851 | 10851 | |
10852 | 10852 | /** |
10853 | - * Parses a date string |
|
10854 | - * |
|
10855 | - * @param String $dateString the date string |
|
10856 | - * @param String $timezone the timezone of a user |
|
10857 | - * @return Array the time information |
|
10858 | - * |
|
10859 | - */ |
|
10853 | + * Parses a date string |
|
10854 | + * |
|
10855 | + * @param String $dateString the date string |
|
10856 | + * @param String $timezone the timezone of a user |
|
10857 | + * @return Array the time information |
|
10858 | + * |
|
10859 | + */ |
|
10860 | 10860 | public function parseDateString($dateString, $timezone = '') |
10861 | 10861 | { |
10862 | 10862 | $time_array = array(); |
@@ -10892,12 +10892,12 @@ discard block |
||
10892 | 10892 | |
10893 | 10893 | |
10894 | 10894 | /** |
10895 | - * Parses the direction degrees to working |
|
10896 | - * |
|
10897 | - * @param Float $direction the direction in degrees |
|
10898 | - * @return Array the direction information |
|
10899 | - * |
|
10900 | - */ |
|
10895 | + * Parses the direction degrees to working |
|
10896 | + * |
|
10897 | + * @param Float $direction the direction in degrees |
|
10898 | + * @return Array the direction information |
|
10899 | + * |
|
10900 | + */ |
|
10901 | 10901 | public function parseDirection($direction = 0) |
10902 | 10902 | { |
10903 | 10903 | if ($direction == '') $direction = 0; |
@@ -10976,12 +10976,12 @@ discard block |
||
10976 | 10976 | |
10977 | 10977 | |
10978 | 10978 | /** |
10979 | - * Gets the aircraft registration |
|
10980 | - * |
|
10981 | - * @param String $flightaware_id the flight aware id |
|
10982 | - * @return String the aircraft registration |
|
10983 | - * |
|
10984 | - */ |
|
10979 | + * Gets the aircraft registration |
|
10980 | + * |
|
10981 | + * @param String $flightaware_id the flight aware id |
|
10982 | + * @return String the aircraft registration |
|
10983 | + * |
|
10984 | + */ |
|
10985 | 10985 | |
10986 | 10986 | public function getAircraftRegistration($flightaware_id) |
10987 | 10987 | { |
@@ -11010,12 +11010,12 @@ discard block |
||
11010 | 11010 | |
11011 | 11011 | |
11012 | 11012 | /** |
11013 | - * Gets the aircraft registration from ModeS |
|
11014 | - * |
|
11015 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11016 | - * @return String the aircraft registration |
|
11017 | - * |
|
11018 | - */ |
|
11013 | + * Gets the aircraft registration from ModeS |
|
11014 | + * |
|
11015 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11016 | + * @return String the aircraft registration |
|
11017 | + * |
|
11018 | + */ |
|
11019 | 11019 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
11020 | 11020 | { |
11021 | 11021 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11028,19 +11028,19 @@ discard block |
||
11028 | 11028 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
11029 | 11029 | $sth->closeCursor(); |
11030 | 11030 | if (count($row) > 0) { |
11031 | - //return $row['Registration']; |
|
11032 | - return $row['registration']; |
|
11031 | + //return $row['Registration']; |
|
11032 | + return $row['registration']; |
|
11033 | 11033 | } else return ''; |
11034 | 11034 | |
11035 | 11035 | } |
11036 | 11036 | |
11037 | 11037 | /** |
11038 | - * Gets the aircraft type from ModeS |
|
11039 | - * |
|
11040 | - * @param String $aircraft_modes the flight ModeS in hex |
|
11041 | - * @return String the aircraft type |
|
11042 | - * |
|
11043 | - */ |
|
11038 | + * Gets the aircraft type from ModeS |
|
11039 | + * |
|
11040 | + * @param String $aircraft_modes the flight ModeS in hex |
|
11041 | + * @return String the aircraft type |
|
11042 | + * |
|
11043 | + */ |
|
11044 | 11044 | public function getAircraftTypeBymodeS($aircraft_modes) |
11045 | 11045 | { |
11046 | 11046 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -11053,19 +11053,19 @@ discard block |
||
11053 | 11053 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
11054 | 11054 | $sth->closeCursor(); |
11055 | 11055 | if (count($row) > 0) { |
11056 | - if ($row['type_flight'] == null) return ''; |
|
11057 | - else return $row['type_flight']; |
|
11056 | + if ($row['type_flight'] == null) return ''; |
|
11057 | + else return $row['type_flight']; |
|
11058 | 11058 | } else return ''; |
11059 | 11059 | |
11060 | 11060 | } |
11061 | 11061 | |
11062 | 11062 | /** |
11063 | - * Gets Country from latitude/longitude |
|
11064 | - * |
|
11065 | - * @param Float $latitude latitute of the flight |
|
11066 | - * @param Float $longitude longitute of the flight |
|
11067 | - * @return String the countrie |
|
11068 | - */ |
|
11063 | + * Gets Country from latitude/longitude |
|
11064 | + * |
|
11065 | + * @param Float $latitude latitute of the flight |
|
11066 | + * @param Float $longitude longitute of the flight |
|
11067 | + * @return String the countrie |
|
11068 | + */ |
|
11069 | 11069 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
11070 | 11070 | { |
11071 | 11071 | global $globalDBdriver, $globalDebug; |
@@ -11102,11 +11102,11 @@ discard block |
||
11102 | 11102 | } |
11103 | 11103 | |
11104 | 11104 | /** |
11105 | - * Gets Country from iso2 |
|
11106 | - * |
|
11107 | - * @param String $iso2 ISO2 country code |
|
11108 | - * @return String the countrie |
|
11109 | - */ |
|
11105 | + * Gets Country from iso2 |
|
11106 | + * |
|
11107 | + * @param String $iso2 ISO2 country code |
|
11108 | + * @return String the countrie |
|
11109 | + */ |
|
11110 | 11110 | public function getCountryFromISO2($iso2) |
11111 | 11111 | { |
11112 | 11112 | global $globalDBdriver, $globalDebug; |
@@ -11134,12 +11134,12 @@ discard block |
||
11134 | 11134 | } |
11135 | 11135 | |
11136 | 11136 | /** |
11137 | - * converts the registration code using the country prefix |
|
11138 | - * |
|
11139 | - * @param String $registration the aircraft registration |
|
11140 | - * @return String the aircraft registration |
|
11141 | - * |
|
11142 | - */ |
|
11137 | + * converts the registration code using the country prefix |
|
11138 | + * |
|
11139 | + * @param String $registration the aircraft registration |
|
11140 | + * @return String the aircraft registration |
|
11141 | + * |
|
11142 | + */ |
|
11143 | 11143 | public function convertAircraftRegistration($registration) |
11144 | 11144 | { |
11145 | 11145 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11191,12 +11191,12 @@ discard block |
||
11191 | 11191 | } |
11192 | 11192 | |
11193 | 11193 | /** |
11194 | - * Country from the registration code |
|
11195 | - * |
|
11196 | - * @param String $registration the aircraft registration |
|
11197 | - * @return String the country |
|
11198 | - * |
|
11199 | - */ |
|
11194 | + * Country from the registration code |
|
11195 | + * |
|
11196 | + * @param String $registration the aircraft registration |
|
11197 | + * @return String the country |
|
11198 | + * |
|
11199 | + */ |
|
11200 | 11200 | public function countryFromAircraftRegistration($registration) |
11201 | 11201 | { |
11202 | 11202 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11215,8 +11215,8 @@ discard block |
||
11215 | 11215 | $country = $row['country']; |
11216 | 11216 | } |
11217 | 11217 | } else { |
11218 | - $registration_1 = substr($registration, 0, 1); |
|
11219 | - $registration_2 = substr($registration, 0, 2); |
|
11218 | + $registration_1 = substr($registration, 0, 1); |
|
11219 | + $registration_2 = substr($registration, 0, 2); |
|
11220 | 11220 | |
11221 | 11221 | $country = ''; |
11222 | 11222 | //first get the prefix based on two characters |
@@ -11252,12 +11252,12 @@ discard block |
||
11252 | 11252 | } |
11253 | 11253 | |
11254 | 11254 | /** |
11255 | - * Registration prefix from the registration code |
|
11256 | - * |
|
11257 | - * @param String $registration the aircraft registration |
|
11258 | - * @return String the registration prefix |
|
11259 | - * |
|
11260 | - */ |
|
11255 | + * Registration prefix from the registration code |
|
11256 | + * |
|
11257 | + * @param String $registration the aircraft registration |
|
11258 | + * @return String the registration prefix |
|
11259 | + * |
|
11260 | + */ |
|
11261 | 11261 | public function registrationPrefixFromAircraftRegistration($registration) |
11262 | 11262 | { |
11263 | 11263 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11276,8 +11276,8 @@ discard block |
||
11276 | 11276 | //$country = $row['country']; |
11277 | 11277 | } |
11278 | 11278 | } else { |
11279 | - $registration_1 = substr($registration, 0, 1); |
|
11280 | - $registration_2 = substr($registration, 0, 2); |
|
11279 | + $registration_1 = substr($registration, 0, 1); |
|
11280 | + $registration_2 = substr($registration, 0, 2); |
|
11281 | 11281 | |
11282 | 11282 | //first get the prefix based on two characters |
11283 | 11283 | $query = "SELECT aircraft_registration.registration_prefix, aircraft_registration.country FROM aircraft_registration WHERE registration_prefix = :registration_2 LIMIT 1"; |
@@ -11313,12 +11313,12 @@ discard block |
||
11313 | 11313 | |
11314 | 11314 | |
11315 | 11315 | /** |
11316 | - * Country from the registration code |
|
11317 | - * |
|
11318 | - * @param String $registration the aircraft registration |
|
11319 | - * @return String the country |
|
11320 | - * |
|
11321 | - */ |
|
11316 | + * Country from the registration code |
|
11317 | + * |
|
11318 | + * @param String $registration the aircraft registration |
|
11319 | + * @return String the country |
|
11320 | + * |
|
11321 | + */ |
|
11322 | 11322 | public function countryFromAircraftRegistrationCode($registration) |
11323 | 11323 | { |
11324 | 11324 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -11335,11 +11335,11 @@ discard block |
||
11335 | 11335 | } |
11336 | 11336 | |
11337 | 11337 | /** |
11338 | - * Set a new highlight value for a flight |
|
11339 | - * |
|
11340 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
11341 | - * @param String $highlight New highlight value |
|
11342 | - */ |
|
11338 | + * Set a new highlight value for a flight |
|
11339 | + * |
|
11340 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
11341 | + * @param String $highlight New highlight value |
|
11342 | + */ |
|
11343 | 11343 | public function setHighlightFlight($flightaware_id,$highlight) { |
11344 | 11344 | |
11345 | 11345 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -11348,12 +11348,12 @@ discard block |
||
11348 | 11348 | } |
11349 | 11349 | |
11350 | 11350 | /** |
11351 | - * Set a new highlight value for a flight by Registration |
|
11352 | - * |
|
11353 | - * @param String $registration Registration of the aircraft |
|
11354 | - * @param String $date Date of spotted aircraft |
|
11355 | - * @param String $highlight New highlight value |
|
11356 | - */ |
|
11351 | + * Set a new highlight value for a flight by Registration |
|
11352 | + * |
|
11353 | + * @param String $registration Registration of the aircraft |
|
11354 | + * @param String $date Date of spotted aircraft |
|
11355 | + * @param String $highlight New highlight value |
|
11356 | + */ |
|
11357 | 11357 | public function setHighlightFlightByRegistration($registration,$highlight, $date = '') { |
11358 | 11358 | if ($date == '') { |
11359 | 11359 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE spotter_id IN (SELECT MAX(spotter_id) FROM spotter_output WHERE registration = :registration)"; |
@@ -11367,12 +11367,12 @@ discard block |
||
11367 | 11367 | } |
11368 | 11368 | |
11369 | 11369 | /** |
11370 | - * Gets the short url from bit.ly |
|
11371 | - * |
|
11372 | - * @param String $url the full url |
|
11373 | - * @return String the bit.ly url |
|
11374 | - * |
|
11375 | - */ |
|
11370 | + * Gets the short url from bit.ly |
|
11371 | + * |
|
11372 | + * @param String $url the full url |
|
11373 | + * @return String the bit.ly url |
|
11374 | + * |
|
11375 | + */ |
|
11376 | 11376 | public function getBitlyURL($url) |
11377 | 11377 | { |
11378 | 11378 | global $globalBitlyAccessToken; |
@@ -11661,11 +11661,11 @@ discard block |
||
11661 | 11661 | $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 |
11662 | 11662 | 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)) |
11663 | 11663 | 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;"; |
11664 | - } else { |
|
11664 | + } else { |
|
11665 | 11665 | $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 |
11666 | 11666 | 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)) |
11667 | 11667 | 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;"; |
11668 | - } |
|
11668 | + } |
|
11669 | 11669 | $sth = $this->db->prepare($query); |
11670 | 11670 | $sth->execute(); |
11671 | 11671 | return $sth->fetchAll(PDO::FETCH_ASSOC); |