@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | } |
14 | 14 | |
15 | 15 | /** |
16 | - * Get SQL query part for filter used |
|
17 | - * @param Array $filter the filter |
|
18 | - * @return Array the SQL part |
|
19 | - */ |
|
16 | + * Get SQL query part for filter used |
|
17 | + * @param Array $filter the filter |
|
18 | + * @return Array the SQL part |
|
19 | + */ |
|
20 | 20 | public function getFilter($filter = array(),$where = false,$and = false) { |
21 | 21 | global $globalFilter, $globalStatsFilters, $globalFilterName; |
22 | 22 | if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) $filter = array_merge($globalStatsFilters[$globalFilterName],$filter); |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * Executes the SQL statements to get the spotter information |
|
59 | - * |
|
60 | - * @param String $query the SQL query |
|
61 | - * @param Array $params parameter of the query |
|
62 | - * @param String $limitQuery the limit query |
|
63 | - * @return Array the spotter information |
|
64 | - * |
|
65 | - */ |
|
58 | + * Executes the SQL statements to get the spotter information |
|
59 | + * |
|
60 | + * @param String $query the SQL query |
|
61 | + * @param Array $params parameter of the query |
|
62 | + * @param String $limitQuery the limit query |
|
63 | + * @return Array the spotter information |
|
64 | + * |
|
65 | + */ |
|
66 | 66 | public function getDataFromDB($query, $params = array(), $limitQuery = '') |
67 | 67 | { |
68 | 68 | global $globalSquawkCountry, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalAirlinesSource, $globalVAM; |
@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | if ($aircraft_array[0]['aircraft_shadow'] != NULL) { |
227 | 227 | $temp_array['aircraft_shadow'] = $aircraft_array[0]['aircraft_shadow']; |
228 | 228 | } else $temp_array['aircraft_shadow'] = 'default.png'; |
229 | - } else { |
|
230 | - $temp_array['aircraft_shadow'] = 'default.png'; |
|
229 | + } else { |
|
230 | + $temp_array['aircraft_shadow'] = 'default.png'; |
|
231 | 231 | $temp_array['aircraft_name'] = 'N/A'; |
232 | 232 | $temp_array['aircraft_manufacturer'] = 'N/A'; |
233 | - } |
|
233 | + } |
|
234 | 234 | } |
235 | 235 | $fromsource = NULL; |
236 | 236 | if (isset($globalAirlinesSource) && $globalAirlinesSource != '') $fromsource = $globalAirlinesSource; |
@@ -413,11 +413,11 @@ discard block |
||
413 | 413 | |
414 | 414 | |
415 | 415 | /** |
416 | - * Gets all the spotter information |
|
417 | - * |
|
418 | - * @return Array the spotter information |
|
419 | - * |
|
420 | - */ |
|
416 | + * Gets all the spotter information |
|
417 | + * |
|
418 | + * @return Array the spotter information |
|
419 | + * |
|
420 | + */ |
|
421 | 421 | 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 = '',$filter = array()) |
422 | 422 | { |
423 | 423 | global $globalTimezone, $globalDBdriver; |
@@ -764,11 +764,11 @@ discard block |
||
764 | 764 | |
765 | 765 | |
766 | 766 | /** |
767 | - * Gets all the spotter information based on the latest data entry |
|
768 | - * |
|
769 | - * @return Array the spotter information |
|
770 | - * |
|
771 | - */ |
|
767 | + * Gets all the spotter information based on the latest data entry |
|
768 | + * |
|
769 | + * @return Array the spotter information |
|
770 | + * |
|
771 | + */ |
|
772 | 772 | public function getLatestSpotterData($limit = '', $sort = '', $filter = array()) |
773 | 773 | { |
774 | 774 | global $global_query; |
@@ -807,12 +807,12 @@ discard block |
||
807 | 807 | } |
808 | 808 | |
809 | 809 | |
810 | - /** |
|
811 | - * Gets all the spotter information based on a user's latitude and longitude |
|
812 | - * |
|
813 | - * @return Array the spotter information |
|
814 | - * |
|
815 | - */ |
|
810 | + /** |
|
811 | + * Gets all the spotter information based on a user's latitude and longitude |
|
812 | + * |
|
813 | + * @return Array the spotter information |
|
814 | + * |
|
815 | + */ |
|
816 | 816 | public function getLatestSpotterForLayar($lat, $lng, $radius, $interval) |
817 | 817 | { |
818 | 818 | date_default_timezone_set('UTC'); |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | return false; |
841 | 841 | } |
842 | 842 | } |
843 | - $additional_query = ''; |
|
843 | + $additional_query = ''; |
|
844 | 844 | if ($interval != "") |
845 | 845 | { |
846 | 846 | if (!is_string($interval)) |
@@ -880,12 +880,12 @@ discard block |
||
880 | 880 | } |
881 | 881 | |
882 | 882 | |
883 | - /** |
|
884 | - * Gets all the spotter information sorted by the newest aircraft type |
|
885 | - * |
|
886 | - * @return Array the spotter information |
|
887 | - * |
|
888 | - */ |
|
883 | + /** |
|
884 | + * Gets all the spotter information sorted by the newest aircraft type |
|
885 | + * |
|
886 | + * @return Array the spotter information |
|
887 | + * |
|
888 | + */ |
|
889 | 889 | public function getNewestSpotterDataSortedByAircraftType($limit = '', $sort = '',$filter = array()) |
890 | 890 | { |
891 | 891 | global $global_query; |
@@ -926,11 +926,11 @@ discard block |
||
926 | 926 | |
927 | 927 | |
928 | 928 | /** |
929 | - * Gets all the spotter information sorted by the newest aircraft registration |
|
930 | - * |
|
931 | - * @return Array the spotter information |
|
932 | - * |
|
933 | - */ |
|
929 | + * Gets all the spotter information sorted by the newest aircraft registration |
|
930 | + * |
|
931 | + * @return Array the spotter information |
|
932 | + * |
|
933 | + */ |
|
934 | 934 | public function getNewestSpotterDataSortedByAircraftRegistration($limit = '', $sort = '', $filter = array()) |
935 | 935 | { |
936 | 936 | global $global_query; |
@@ -970,11 +970,11 @@ discard block |
||
970 | 970 | |
971 | 971 | |
972 | 972 | /** |
973 | - * Gets all the spotter information sorted by the newest airline |
|
974 | - * |
|
975 | - * @return Array the spotter information |
|
976 | - * |
|
977 | - */ |
|
973 | + * Gets all the spotter information sorted by the newest airline |
|
974 | + * |
|
975 | + * @return Array the spotter information |
|
976 | + * |
|
977 | + */ |
|
978 | 978 | public function getNewestSpotterDataSortedByAirline($limit = '', $sort = '',$filter = array()) |
979 | 979 | { |
980 | 980 | global $global_query; |
@@ -1013,12 +1013,12 @@ discard block |
||
1013 | 1013 | } |
1014 | 1014 | |
1015 | 1015 | |
1016 | - /** |
|
1017 | - * Gets all the spotter information sorted by the newest departure airport |
|
1018 | - * |
|
1019 | - * @return Array the spotter information |
|
1020 | - * |
|
1021 | - */ |
|
1016 | + /** |
|
1017 | + * Gets all the spotter information sorted by the newest departure airport |
|
1018 | + * |
|
1019 | + * @return Array the spotter information |
|
1020 | + * |
|
1021 | + */ |
|
1022 | 1022 | public function getNewestSpotterDataSortedByDepartureAirport($limit = '', $sort = '', $filter = array()) |
1023 | 1023 | { |
1024 | 1024 | global $global_query; |
@@ -1060,11 +1060,11 @@ discard block |
||
1060 | 1060 | |
1061 | 1061 | |
1062 | 1062 | /** |
1063 | - * Gets all the spotter information sorted by the newest arrival airport |
|
1064 | - * |
|
1065 | - * @return Array the spotter information |
|
1066 | - * |
|
1067 | - */ |
|
1063 | + * Gets all the spotter information sorted by the newest arrival airport |
|
1064 | + * |
|
1065 | + * @return Array the spotter information |
|
1066 | + * |
|
1067 | + */ |
|
1068 | 1068 | public function getNewestSpotterDataSortedByArrivalAirport($limit = '', $sort = '', $filter = array()) |
1069 | 1069 | { |
1070 | 1070 | global $global_query; |
@@ -1103,11 +1103,11 @@ discard block |
||
1103 | 1103 | |
1104 | 1104 | |
1105 | 1105 | /** |
1106 | - * Gets all the spotter information based on the spotter id |
|
1107 | - * |
|
1108 | - * @return Array the spotter information |
|
1109 | - * |
|
1110 | - */ |
|
1106 | + * Gets all the spotter information based on the spotter id |
|
1107 | + * |
|
1108 | + * @return Array the spotter information |
|
1109 | + * |
|
1110 | + */ |
|
1111 | 1111 | public function getSpotterDataByID($id = '') |
1112 | 1112 | { |
1113 | 1113 | global $global_query; |
@@ -1129,11 +1129,11 @@ discard block |
||
1129 | 1129 | |
1130 | 1130 | |
1131 | 1131 | /** |
1132 | - * Gets all the spotter information based on the callsign |
|
1133 | - * |
|
1134 | - * @return Array the spotter information |
|
1135 | - * |
|
1136 | - */ |
|
1132 | + * Gets all the spotter information based on the callsign |
|
1133 | + * |
|
1134 | + * @return Array the spotter information |
|
1135 | + * |
|
1136 | + */ |
|
1137 | 1137 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '') |
1138 | 1138 | { |
1139 | 1139 | global $global_query; |
@@ -1186,11 +1186,11 @@ discard block |
||
1186 | 1186 | |
1187 | 1187 | |
1188 | 1188 | /** |
1189 | - * Gets all the spotter information based on the aircraft type |
|
1190 | - * |
|
1191 | - * @return Array the spotter information |
|
1192 | - * |
|
1193 | - */ |
|
1189 | + * Gets all the spotter information based on the aircraft type |
|
1190 | + * |
|
1191 | + * @return Array the spotter information |
|
1192 | + * |
|
1193 | + */ |
|
1194 | 1194 | public function getSpotterDataByAircraft($aircraft_type = '', $limit = '', $sort = '', $filter = array()) |
1195 | 1195 | { |
1196 | 1196 | global $global_query; |
@@ -1244,11 +1244,11 @@ discard block |
||
1244 | 1244 | |
1245 | 1245 | |
1246 | 1246 | /** |
1247 | - * Gets all the spotter information based on the aircraft registration |
|
1248 | - * |
|
1249 | - * @return Array the spotter information |
|
1250 | - * |
|
1251 | - */ |
|
1247 | + * Gets all the spotter information based on the aircraft registration |
|
1248 | + * |
|
1249 | + * @return Array the spotter information |
|
1250 | + * |
|
1251 | + */ |
|
1252 | 1252 | public function getSpotterDataByRegistration($registration = '', $limit = '', $sort = '', $filter = array()) |
1253 | 1253 | { |
1254 | 1254 | global $global_query; |
@@ -1304,11 +1304,11 @@ discard block |
||
1304 | 1304 | |
1305 | 1305 | |
1306 | 1306 | /** |
1307 | - * Gets all the spotter information based on the airline |
|
1308 | - * |
|
1309 | - * @return Array the spotter information |
|
1310 | - * |
|
1311 | - */ |
|
1307 | + * Gets all the spotter information based on the airline |
|
1308 | + * |
|
1309 | + * @return Array the spotter information |
|
1310 | + * |
|
1311 | + */ |
|
1312 | 1312 | public function getSpotterDataByAirline($airline = '', $limit = '', $sort = '') |
1313 | 1313 | { |
1314 | 1314 | global $global_query; |
@@ -1360,11 +1360,11 @@ discard block |
||
1360 | 1360 | |
1361 | 1361 | |
1362 | 1362 | /** |
1363 | - * Gets all the spotter information based on the airport |
|
1364 | - * |
|
1365 | - * @return Array the spotter information |
|
1366 | - * |
|
1367 | - */ |
|
1363 | + * Gets all the spotter information based on the airport |
|
1364 | + * |
|
1365 | + * @return Array the spotter information |
|
1366 | + * |
|
1367 | + */ |
|
1368 | 1368 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '') |
1369 | 1369 | { |
1370 | 1370 | global $global_query; |
@@ -1417,11 +1417,11 @@ discard block |
||
1417 | 1417 | |
1418 | 1418 | |
1419 | 1419 | /** |
1420 | - * Gets all the spotter information based on the date |
|
1421 | - * |
|
1422 | - * @return Array the spotter information |
|
1423 | - * |
|
1424 | - */ |
|
1420 | + * Gets all the spotter information based on the date |
|
1421 | + * |
|
1422 | + * @return Array the spotter information |
|
1423 | + * |
|
1424 | + */ |
|
1425 | 1425 | public function getSpotterDataByDate($date = '', $limit = '', $sort = '',$filter = array()) |
1426 | 1426 | { |
1427 | 1427 | global $global_query, $globalTimezone, $globalDBdriver; |
@@ -1498,11 +1498,11 @@ discard block |
||
1498 | 1498 | |
1499 | 1499 | |
1500 | 1500 | /** |
1501 | - * Gets all the spotter information based on the country name |
|
1502 | - * |
|
1503 | - * @return Array the spotter information |
|
1504 | - * |
|
1505 | - */ |
|
1501 | + * Gets all the spotter information based on the country name |
|
1502 | + * |
|
1503 | + * @return Array the spotter information |
|
1504 | + * |
|
1505 | + */ |
|
1506 | 1506 | public function getSpotterDataByCountry($country = '', $limit = '', $sort = '') |
1507 | 1507 | { |
1508 | 1508 | global $global_query; |
@@ -1555,11 +1555,11 @@ discard block |
||
1555 | 1555 | |
1556 | 1556 | |
1557 | 1557 | /** |
1558 | - * Gets all the spotter information based on the manufacturer name |
|
1559 | - * |
|
1560 | - * @return Array the spotter information |
|
1561 | - * |
|
1562 | - */ |
|
1558 | + * Gets all the spotter information based on the manufacturer name |
|
1559 | + * |
|
1560 | + * @return Array the spotter information |
|
1561 | + * |
|
1562 | + */ |
|
1563 | 1563 | public function getSpotterDataByManufacturer($aircraft_manufacturer = '', $limit = '', $sort = '') |
1564 | 1564 | { |
1565 | 1565 | global $global_query; |
@@ -1614,13 +1614,13 @@ discard block |
||
1614 | 1614 | |
1615 | 1615 | |
1616 | 1616 | /** |
1617 | - * Gets a list of all aircraft that take a route |
|
1618 | - * |
|
1619 | - * @param String $departure_airport_icao ICAO code of departure airport |
|
1620 | - * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1621 | - * @return Array the spotter information |
|
1622 | - * |
|
1623 | - */ |
|
1617 | + * Gets a list of all aircraft that take a route |
|
1618 | + * |
|
1619 | + * @param String $departure_airport_icao ICAO code of departure airport |
|
1620 | + * @param String $arrival_airport_icao ICAO code of arrival airport |
|
1621 | + * @return Array the spotter information |
|
1622 | + * |
|
1623 | + */ |
|
1624 | 1624 | public function getSpotterDataByRoute($departure_airport_icao = '', $arrival_airport_icao = '', $limit = '', $sort = '') |
1625 | 1625 | { |
1626 | 1626 | global $global_query; |
@@ -1686,11 +1686,11 @@ discard block |
||
1686 | 1686 | |
1687 | 1687 | |
1688 | 1688 | /** |
1689 | - * Gets all the spotter information based on the special column in the table |
|
1690 | - * |
|
1691 | - * @return Array the spotter information |
|
1692 | - * |
|
1693 | - */ |
|
1689 | + * Gets all the spotter information based on the special column in the table |
|
1690 | + * |
|
1691 | + * @return Array the spotter information |
|
1692 | + * |
|
1693 | + */ |
|
1694 | 1694 | public function getSpotterDataByHighlight($limit = '', $sort = '', $filter = array()) |
1695 | 1695 | { |
1696 | 1696 | global $global_query; |
@@ -1729,11 +1729,11 @@ discard block |
||
1729 | 1729 | } |
1730 | 1730 | |
1731 | 1731 | /** |
1732 | - * Gets all the highlight based on a aircraft registration |
|
1733 | - * |
|
1734 | - * @return String the highlight text |
|
1735 | - * |
|
1736 | - */ |
|
1732 | + * Gets all the highlight based on a aircraft registration |
|
1733 | + * |
|
1734 | + * @return String the highlight text |
|
1735 | + * |
|
1736 | + */ |
|
1737 | 1737 | public function getHighlightByRegistration($registration,$filter = array()) |
1738 | 1738 | { |
1739 | 1739 | global $global_query; |
@@ -1755,13 +1755,13 @@ discard block |
||
1755 | 1755 | |
1756 | 1756 | |
1757 | 1757 | /** |
1758 | - * Gets the squawk usage from squawk code |
|
1759 | - * |
|
1760 | - * @param String $squawk squawk code |
|
1761 | - * @param String $country country |
|
1762 | - * @return String usage |
|
1763 | - * |
|
1764 | - */ |
|
1758 | + * Gets the squawk usage from squawk code |
|
1759 | + * |
|
1760 | + * @param String $squawk squawk code |
|
1761 | + * @param String $country country |
|
1762 | + * @return String usage |
|
1763 | + * |
|
1764 | + */ |
|
1765 | 1765 | public function getSquawkUsage($squawk = '',$country = 'FR') |
1766 | 1766 | { |
1767 | 1767 | |
@@ -1782,12 +1782,12 @@ discard block |
||
1782 | 1782 | } |
1783 | 1783 | |
1784 | 1784 | /** |
1785 | - * Gets the airport icao from the iata |
|
1786 | - * |
|
1787 | - * @param String $airport_iata the iata code of the airport |
|
1788 | - * @return String airport iata |
|
1789 | - * |
|
1790 | - */ |
|
1785 | + * Gets the airport icao from the iata |
|
1786 | + * |
|
1787 | + * @param String $airport_iata the iata code of the airport |
|
1788 | + * @return String airport iata |
|
1789 | + * |
|
1790 | + */ |
|
1791 | 1791 | public function getAirportIcao($airport_iata = '') |
1792 | 1792 | { |
1793 | 1793 | |
@@ -1807,14 +1807,14 @@ discard block |
||
1807 | 1807 | } |
1808 | 1808 | |
1809 | 1809 | /** |
1810 | - * Gets the airport distance |
|
1811 | - * |
|
1812 | - * @param String $airport_icao the icao code of the airport |
|
1813 | - * @param Float $latitude the latitude |
|
1814 | - * @param Float $longitude the longitude |
|
1815 | - * @return Float distance to the airport |
|
1816 | - * |
|
1817 | - */ |
|
1810 | + * Gets the airport distance |
|
1811 | + * |
|
1812 | + * @param String $airport_icao the icao code of the airport |
|
1813 | + * @param Float $latitude the latitude |
|
1814 | + * @param Float $longitude the longitude |
|
1815 | + * @return Float distance to the airport |
|
1816 | + * |
|
1817 | + */ |
|
1818 | 1818 | public function getAirportDistance($airport_icao,$latitude,$longitude) |
1819 | 1819 | { |
1820 | 1820 | |
@@ -1835,12 +1835,12 @@ discard block |
||
1835 | 1835 | } |
1836 | 1836 | |
1837 | 1837 | /** |
1838 | - * Gets the airport info based on the icao |
|
1839 | - * |
|
1840 | - * @param String $airport the icao code of the airport |
|
1841 | - * @return Array airport information |
|
1842 | - * |
|
1843 | - */ |
|
1838 | + * Gets the airport info based on the icao |
|
1839 | + * |
|
1840 | + * @param String $airport the icao code of the airport |
|
1841 | + * @return Array airport information |
|
1842 | + * |
|
1843 | + */ |
|
1844 | 1844 | public function getAllAirportInfo($airport = '') |
1845 | 1845 | { |
1846 | 1846 | |
@@ -1886,12 +1886,12 @@ discard block |
||
1886 | 1886 | } |
1887 | 1887 | |
1888 | 1888 | /** |
1889 | - * Gets the airport info based on the country |
|
1890 | - * |
|
1891 | - * @param Array $countries Airports countries |
|
1892 | - * @return Array airport information |
|
1893 | - * |
|
1894 | - */ |
|
1889 | + * Gets the airport info based on the country |
|
1890 | + * |
|
1891 | + * @param Array $countries Airports countries |
|
1892 | + * @return Array airport information |
|
1893 | + * |
|
1894 | + */ |
|
1895 | 1895 | public function getAllAirportInfobyCountry($countries) |
1896 | 1896 | { |
1897 | 1897 | $lst_countries = ''; |
@@ -1929,12 +1929,12 @@ discard block |
||
1929 | 1929 | } |
1930 | 1930 | |
1931 | 1931 | /** |
1932 | - * Gets airports info based on the coord |
|
1933 | - * |
|
1934 | - * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
1935 | - * @return Array airport information |
|
1936 | - * |
|
1937 | - */ |
|
1932 | + * Gets airports info based on the coord |
|
1933 | + * |
|
1934 | + * @param Array $coord Airports longitude min,latitude min, longitude max, latitude max |
|
1935 | + * @return Array airport information |
|
1936 | + * |
|
1937 | + */ |
|
1938 | 1938 | public function getAllAirportInfobyCoord($coord) |
1939 | 1939 | { |
1940 | 1940 | global $globalDBdriver; |
@@ -1965,12 +1965,12 @@ discard block |
||
1965 | 1965 | } |
1966 | 1966 | |
1967 | 1967 | /** |
1968 | - * Gets waypoints info based on the coord |
|
1969 | - * |
|
1970 | - * @param Array $coord waypoints coord |
|
1971 | - * @return Array airport information |
|
1972 | - * |
|
1973 | - */ |
|
1968 | + * Gets waypoints info based on the coord |
|
1969 | + * |
|
1970 | + * @param Array $coord waypoints coord |
|
1971 | + * @return Array airport information |
|
1972 | + * |
|
1973 | + */ |
|
1974 | 1974 | public function getAllWaypointsInfobyCoord($coord) |
1975 | 1975 | { |
1976 | 1976 | if (is_array($coord)) { |
@@ -2004,12 +2004,12 @@ discard block |
||
2004 | 2004 | |
2005 | 2005 | |
2006 | 2006 | /** |
2007 | - * Gets the airline info based on the icao code or iata code |
|
2008 | - * |
|
2009 | - * @param String $airline_icao the iata code of the airport |
|
2010 | - * @return Array airport information |
|
2011 | - * |
|
2012 | - */ |
|
2007 | + * Gets the airline info based on the icao code or iata code |
|
2008 | + * |
|
2009 | + * @param String $airline_icao the iata code of the airport |
|
2010 | + * @return Array airport information |
|
2011 | + * |
|
2012 | + */ |
|
2013 | 2013 | public function getAllAirlineInfo($airline_icao, $fromsource = NULL) |
2014 | 2014 | { |
2015 | 2015 | global $globalUseRealAirlines; |
@@ -2040,7 +2040,7 @@ discard block |
||
2040 | 2040 | } else { |
2041 | 2041 | $sth->execute(array(':airline_icao' => $airline_icao,':fromsource' => $fromsource)); |
2042 | 2042 | } |
2043 | - /* |
|
2043 | + /* |
|
2044 | 2044 | $airline_array = array(); |
2045 | 2045 | $temp_array = array(); |
2046 | 2046 | |
@@ -2072,12 +2072,12 @@ discard block |
||
2072 | 2072 | |
2073 | 2073 | |
2074 | 2074 | /** |
2075 | - * Gets the aircraft info based on the aircraft type |
|
2076 | - * |
|
2077 | - * @param String $aircraft_type the aircraft type |
|
2078 | - * @return Array aircraft information |
|
2079 | - * |
|
2080 | - */ |
|
2075 | + * Gets the aircraft info based on the aircraft type |
|
2076 | + * |
|
2077 | + * @param String $aircraft_type the aircraft type |
|
2078 | + * @return Array aircraft information |
|
2079 | + * |
|
2080 | + */ |
|
2081 | 2081 | public function getAllAircraftInfo($aircraft_type) |
2082 | 2082 | { |
2083 | 2083 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2109,12 +2109,12 @@ discard block |
||
2109 | 2109 | } |
2110 | 2110 | |
2111 | 2111 | /** |
2112 | - * Gets the aircraft icao based on the aircraft name/type |
|
2113 | - * |
|
2114 | - * @param String $aircraft_type the aircraft type |
|
2115 | - * @return String aircraft information |
|
2116 | - * |
|
2117 | - */ |
|
2112 | + * Gets the aircraft icao based on the aircraft name/type |
|
2113 | + * |
|
2114 | + * @param String $aircraft_type the aircraft type |
|
2115 | + * @return String aircraft information |
|
2116 | + * |
|
2117 | + */ |
|
2118 | 2118 | public function getAircraftIcao($aircraft_type) |
2119 | 2119 | { |
2120 | 2120 | $aircraft_type = filter_var($aircraft_type,FILTER_SANITIZE_STRING); |
@@ -2139,12 +2139,12 @@ discard block |
||
2139 | 2139 | } |
2140 | 2140 | |
2141 | 2141 | /** |
2142 | - * Gets the aircraft info based on the aircraft ident |
|
2143 | - * |
|
2144 | - * @param String $aircraft_modes the aircraft ident (hex) |
|
2145 | - * @return String aircraft type |
|
2146 | - * |
|
2147 | - */ |
|
2142 | + * Gets the aircraft info based on the aircraft ident |
|
2143 | + * |
|
2144 | + * @param String $aircraft_modes the aircraft ident (hex) |
|
2145 | + * @return String aircraft type |
|
2146 | + * |
|
2147 | + */ |
|
2148 | 2148 | public function getAllAircraftType($aircraft_modes) |
2149 | 2149 | { |
2150 | 2150 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -2162,12 +2162,12 @@ discard block |
||
2162 | 2162 | } |
2163 | 2163 | |
2164 | 2164 | /** |
2165 | - * Gets correct aircraft operator corde |
|
2166 | - * |
|
2167 | - * @param String $operator the aircraft operator code (callsign) |
|
2168 | - * @return String aircraft operator code |
|
2169 | - * |
|
2170 | - */ |
|
2165 | + * Gets correct aircraft operator corde |
|
2166 | + * |
|
2167 | + * @param String $operator the aircraft operator code (callsign) |
|
2168 | + * @return String aircraft operator code |
|
2169 | + * |
|
2170 | + */ |
|
2171 | 2171 | public function getOperator($operator) |
2172 | 2172 | { |
2173 | 2173 | $operator = filter_var($operator,FILTER_SANITIZE_STRING); |
@@ -2184,16 +2184,16 @@ discard block |
||
2184 | 2184 | } |
2185 | 2185 | |
2186 | 2186 | /** |
2187 | - * Gets the aircraft route based on the aircraft callsign |
|
2188 | - * |
|
2189 | - * @param String $callsign the aircraft callsign |
|
2190 | - * @return Array aircraft type |
|
2191 | - * |
|
2192 | - */ |
|
2187 | + * Gets the aircraft route based on the aircraft callsign |
|
2188 | + * |
|
2189 | + * @param String $callsign the aircraft callsign |
|
2190 | + * @return Array aircraft type |
|
2191 | + * |
|
2192 | + */ |
|
2193 | 2193 | public function getRouteInfo($callsign) |
2194 | 2194 | { |
2195 | 2195 | $callsign = filter_var($callsign,FILTER_SANITIZE_STRING); |
2196 | - if ($callsign == '') return array(); |
|
2196 | + if ($callsign == '') return array(); |
|
2197 | 2197 | $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"; |
2198 | 2198 | |
2199 | 2199 | $sth = $this->db->prepare($query); |
@@ -2207,12 +2207,12 @@ discard block |
||
2207 | 2207 | } |
2208 | 2208 | |
2209 | 2209 | /** |
2210 | - * Gets the aircraft info based on the aircraft registration |
|
2211 | - * |
|
2212 | - * @param String $registration the aircraft registration |
|
2213 | - * @return Array aircraft information |
|
2214 | - * |
|
2215 | - */ |
|
2210 | + * Gets the aircraft info based on the aircraft registration |
|
2211 | + * |
|
2212 | + * @param String $registration the aircraft registration |
|
2213 | + * @return Array aircraft information |
|
2214 | + * |
|
2215 | + */ |
|
2216 | 2216 | public function getAircraftInfoByRegistration($registration) |
2217 | 2217 | { |
2218 | 2218 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2239,12 +2239,12 @@ discard block |
||
2239 | 2239 | } |
2240 | 2240 | |
2241 | 2241 | /** |
2242 | - * Gets the aircraft owner & base based on the aircraft registration |
|
2243 | - * |
|
2244 | - * @param String $registration the aircraft registration |
|
2245 | - * @return Array aircraft information |
|
2246 | - * |
|
2247 | - */ |
|
2242 | + * Gets the aircraft owner & base based on the aircraft registration |
|
2243 | + * |
|
2244 | + * @param String $registration the aircraft registration |
|
2245 | + * @return Array aircraft information |
|
2246 | + * |
|
2247 | + */ |
|
2248 | 2248 | public function getAircraftOwnerByRegistration($registration) |
2249 | 2249 | { |
2250 | 2250 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -2261,11 +2261,11 @@ discard block |
||
2261 | 2261 | |
2262 | 2262 | |
2263 | 2263 | /** |
2264 | - * Gets all flights (but with only little info) |
|
2265 | - * |
|
2266 | - * @return Array basic flight information |
|
2267 | - * |
|
2268 | - */ |
|
2264 | + * Gets all flights (but with only little info) |
|
2265 | + * |
|
2266 | + * @return Array basic flight information |
|
2267 | + * |
|
2268 | + */ |
|
2269 | 2269 | public function getAllFlightsforSitemap() |
2270 | 2270 | { |
2271 | 2271 | //$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 "; |
@@ -2273,7 +2273,7 @@ discard block |
||
2273 | 2273 | |
2274 | 2274 | $sth = $this->db->prepare($query); |
2275 | 2275 | $sth->execute(); |
2276 | - /* |
|
2276 | + /* |
|
2277 | 2277 | $flight_array = array(); |
2278 | 2278 | $temp_array = array(); |
2279 | 2279 | |
@@ -2295,11 +2295,11 @@ discard block |
||
2295 | 2295 | } |
2296 | 2296 | |
2297 | 2297 | /** |
2298 | - * Gets a list of all aircraft manufacturers |
|
2299 | - * |
|
2300 | - * @return Array list of aircraft types |
|
2301 | - * |
|
2302 | - */ |
|
2298 | + * Gets a list of all aircraft manufacturers |
|
2299 | + * |
|
2300 | + * @return Array list of aircraft types |
|
2301 | + * |
|
2302 | + */ |
|
2303 | 2303 | public function getAllManufacturers() |
2304 | 2304 | { |
2305 | 2305 | /* |
@@ -2328,11 +2328,11 @@ discard block |
||
2328 | 2328 | |
2329 | 2329 | |
2330 | 2330 | /** |
2331 | - * Gets a list of all aircraft types |
|
2332 | - * |
|
2333 | - * @return Array list of aircraft types |
|
2334 | - * |
|
2335 | - */ |
|
2331 | + * Gets a list of all aircraft types |
|
2332 | + * |
|
2333 | + * @return Array list of aircraft types |
|
2334 | + * |
|
2335 | + */ |
|
2336 | 2336 | public function getAllAircraftTypes($filters = array()) |
2337 | 2337 | { |
2338 | 2338 | /* |
@@ -2365,11 +2365,11 @@ discard block |
||
2365 | 2365 | |
2366 | 2366 | |
2367 | 2367 | /** |
2368 | - * Gets a list of all aircraft registrations |
|
2369 | - * |
|
2370 | - * @return Array list of aircraft registrations |
|
2371 | - * |
|
2372 | - */ |
|
2368 | + * Gets a list of all aircraft registrations |
|
2369 | + * |
|
2370 | + * @return Array list of aircraft registrations |
|
2371 | + * |
|
2372 | + */ |
|
2373 | 2373 | public function getAllAircraftRegistrations($filters = array()) |
2374 | 2374 | { |
2375 | 2375 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2394,12 +2394,12 @@ discard block |
||
2394 | 2394 | } |
2395 | 2395 | |
2396 | 2396 | /** |
2397 | - * Gets all source name |
|
2398 | - * |
|
2399 | - * @param String type format of source |
|
2400 | - * @return Array list of source name |
|
2401 | - * |
|
2402 | - */ |
|
2397 | + * Gets all source name |
|
2398 | + * |
|
2399 | + * @param String type format of source |
|
2400 | + * @return Array list of source name |
|
2401 | + * |
|
2402 | + */ |
|
2403 | 2403 | public function getAllSourceName($type = '',$filters = array()) |
2404 | 2404 | { |
2405 | 2405 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2430,11 +2430,11 @@ discard block |
||
2430 | 2430 | |
2431 | 2431 | |
2432 | 2432 | /** |
2433 | - * Gets a list of all airline names |
|
2434 | - * |
|
2435 | - * @return Array list of airline names |
|
2436 | - * |
|
2437 | - */ |
|
2433 | + * Gets a list of all airline names |
|
2434 | + * |
|
2435 | + * @return Array list of airline names |
|
2436 | + * |
|
2437 | + */ |
|
2438 | 2438 | public function getAllAirlineNames($airline_type = '',$forsource = NULL,$filters = array()) |
2439 | 2439 | { |
2440 | 2440 | global $globalAirlinesSource,$globalVATSIM, $globalIVAO; |
@@ -2484,11 +2484,11 @@ discard block |
||
2484 | 2484 | |
2485 | 2485 | |
2486 | 2486 | /** |
2487 | - * Gets a list of all airline countries |
|
2488 | - * |
|
2489 | - * @return Array list of airline countries |
|
2490 | - * |
|
2491 | - */ |
|
2487 | + * Gets a list of all airline countries |
|
2488 | + * |
|
2489 | + * @return Array list of airline countries |
|
2490 | + * |
|
2491 | + */ |
|
2492 | 2492 | public function getAllAirlineCountries($filters = array()) |
2493 | 2493 | { |
2494 | 2494 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2516,11 +2516,11 @@ discard block |
||
2516 | 2516 | |
2517 | 2517 | |
2518 | 2518 | /** |
2519 | - * Gets a list of all departure & arrival names |
|
2520 | - * |
|
2521 | - * @return Array list of airport names |
|
2522 | - * |
|
2523 | - */ |
|
2519 | + * Gets a list of all departure & arrival names |
|
2520 | + * |
|
2521 | + * @return Array list of airport names |
|
2522 | + * |
|
2523 | + */ |
|
2524 | 2524 | public function getAllAirportNames($filters = array()) |
2525 | 2525 | { |
2526 | 2526 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2569,11 +2569,11 @@ discard block |
||
2569 | 2569 | |
2570 | 2570 | |
2571 | 2571 | /** |
2572 | - * Gets a list of all departure & arrival airport countries |
|
2573 | - * |
|
2574 | - * @return Array list of airport countries |
|
2575 | - * |
|
2576 | - */ |
|
2572 | + * Gets a list of all departure & arrival airport countries |
|
2573 | + * |
|
2574 | + * @return Array list of airport countries |
|
2575 | + * |
|
2576 | + */ |
|
2577 | 2577 | public function getAllAirportCountries($filters = array()) |
2578 | 2578 | { |
2579 | 2579 | $airport_array = array(); |
@@ -2621,11 +2621,11 @@ discard block |
||
2621 | 2621 | |
2622 | 2622 | |
2623 | 2623 | /** |
2624 | - * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2625 | - * |
|
2626 | - * @return Array list of countries |
|
2627 | - * |
|
2628 | - */ |
|
2624 | + * Gets a list of all countries (airline, departure airport & arrival airport) |
|
2625 | + * |
|
2626 | + * @return Array list of countries |
|
2627 | + * |
|
2628 | + */ |
|
2629 | 2629 | public function getAllCountries($filters = array()) |
2630 | 2630 | { |
2631 | 2631 | $Connection= new Connection($this->db); |
@@ -2702,11 +2702,11 @@ discard block |
||
2702 | 2702 | |
2703 | 2703 | |
2704 | 2704 | /** |
2705 | - * Gets a list of all idents/callsigns |
|
2706 | - * |
|
2707 | - * @return Array list of ident/callsign names |
|
2708 | - * |
|
2709 | - */ |
|
2705 | + * Gets a list of all idents/callsigns |
|
2706 | + * |
|
2707 | + * @return Array list of ident/callsign names |
|
2708 | + * |
|
2709 | + */ |
|
2710 | 2710 | public function getAllIdents($filters = array()) |
2711 | 2711 | { |
2712 | 2712 | $filter_query = $this->getFilter($filters,true,true); |
@@ -2730,9 +2730,9 @@ discard block |
||
2730 | 2730 | } |
2731 | 2731 | |
2732 | 2732 | /** |
2733 | - * Get a list of flights from airport since 7 days |
|
2734 | - * @return Array number, icao, name and city of airports |
|
2735 | - */ |
|
2733 | + * Get a list of flights from airport since 7 days |
|
2734 | + * @return Array number, icao, name and city of airports |
|
2735 | + */ |
|
2736 | 2736 | |
2737 | 2737 | public function getLast7DaysAirportsDeparture($airport_icao = '',$filters = array()) { |
2738 | 2738 | global $globalTimezone, $globalDBdriver; |
@@ -2763,9 +2763,9 @@ discard block |
||
2763 | 2763 | } |
2764 | 2764 | |
2765 | 2765 | /** |
2766 | - * Get a list of flights from airport since 7 days |
|
2767 | - * @return Array number, icao, name and city of airports |
|
2768 | - */ |
|
2766 | + * Get a list of flights from airport since 7 days |
|
2767 | + * @return Array number, icao, name and city of airports |
|
2768 | + */ |
|
2769 | 2769 | |
2770 | 2770 | public function getLast7DaysAirportsDepartureByAirlines($airport_icao = '') { |
2771 | 2771 | global $globalTimezone, $globalDBdriver; |
@@ -2795,9 +2795,9 @@ discard block |
||
2795 | 2795 | } |
2796 | 2796 | |
2797 | 2797 | /** |
2798 | - * Get a list of flights from detected airport since 7 days |
|
2799 | - * @return Array number, icao, name and city of airports |
|
2800 | - */ |
|
2798 | + * Get a list of flights from detected airport since 7 days |
|
2799 | + * @return Array number, icao, name and city of airports |
|
2800 | + */ |
|
2801 | 2801 | |
2802 | 2802 | public function getLast7DaysDetectedAirportsDeparture($airport_icao = '') { |
2803 | 2803 | global $globalTimezone, $globalDBdriver; |
@@ -2838,9 +2838,9 @@ discard block |
||
2838 | 2838 | } |
2839 | 2839 | |
2840 | 2840 | /** |
2841 | - * Get a list of flights from detected airport since 7 days |
|
2842 | - * @return Array number, icao, name and city of airports |
|
2843 | - */ |
|
2841 | + * Get a list of flights from detected airport since 7 days |
|
2842 | + * @return Array number, icao, name and city of airports |
|
2843 | + */ |
|
2844 | 2844 | |
2845 | 2845 | public function getLast7DaysDetectedAirportsDepartureByAirlines($airport_icao = '') { |
2846 | 2846 | global $globalTimezone, $globalDBdriver; |
@@ -2882,9 +2882,9 @@ discard block |
||
2882 | 2882 | |
2883 | 2883 | |
2884 | 2884 | /** |
2885 | - * Get a list of flights to airport since 7 days |
|
2886 | - * @return Array number, icao, name and city of airports |
|
2887 | - */ |
|
2885 | + * Get a list of flights to airport since 7 days |
|
2886 | + * @return Array number, icao, name and city of airports |
|
2887 | + */ |
|
2888 | 2888 | |
2889 | 2889 | public function getLast7DaysAirportsArrival($airport_icao = '') { |
2890 | 2890 | global $globalTimezone, $globalDBdriver; |
@@ -2916,9 +2916,9 @@ discard block |
||
2916 | 2916 | |
2917 | 2917 | |
2918 | 2918 | /** |
2919 | - * Get a list of flights detected to airport since 7 days |
|
2920 | - * @return Array number, icao, name and city of airports |
|
2921 | - */ |
|
2919 | + * Get a list of flights detected to airport since 7 days |
|
2920 | + * @return Array number, icao, name and city of airports |
|
2921 | + */ |
|
2922 | 2922 | |
2923 | 2923 | public function getLast7DaysDetectedAirportsArrival($airport_icao = '') { |
2924 | 2924 | global $globalTimezone, $globalDBdriver; |
@@ -2962,9 +2962,9 @@ discard block |
||
2962 | 2962 | |
2963 | 2963 | |
2964 | 2964 | /** |
2965 | - * Get a list of flights to airport since 7 days |
|
2966 | - * @return Array number, icao, name and city of airports |
|
2967 | - */ |
|
2965 | + * Get a list of flights to airport since 7 days |
|
2966 | + * @return Array number, icao, name and city of airports |
|
2967 | + */ |
|
2968 | 2968 | |
2969 | 2969 | public function getLast7DaysAirportsArrivalByAirlines($airport_icao = '') { |
2970 | 2970 | global $globalTimezone, $globalDBdriver; |
@@ -2996,9 +2996,9 @@ discard block |
||
2996 | 2996 | |
2997 | 2997 | |
2998 | 2998 | /** |
2999 | - * Get a list of flights detected to airport since 7 days |
|
3000 | - * @return Array number, icao, name and city of airports |
|
3001 | - */ |
|
2999 | + * Get a list of flights detected to airport since 7 days |
|
3000 | + * @return Array number, icao, name and city of airports |
|
3001 | + */ |
|
3002 | 3002 | |
3003 | 3003 | public function getLast7DaysDetectedAirportsArrivalByAirlines($airport_icao = '') { |
3004 | 3004 | global $globalTimezone, $globalDBdriver; |
@@ -3042,11 +3042,11 @@ discard block |
||
3042 | 3042 | |
3043 | 3043 | |
3044 | 3044 | /** |
3045 | - * Gets a list of all dates |
|
3046 | - * |
|
3047 | - * @return Array list of date names |
|
3048 | - * |
|
3049 | - */ |
|
3045 | + * Gets a list of all dates |
|
3046 | + * |
|
3047 | + * @return Array list of date names |
|
3048 | + * |
|
3049 | + */ |
|
3050 | 3050 | public function getAllDates() |
3051 | 3051 | { |
3052 | 3052 | global $globalTimezone, $globalDBdriver; |
@@ -3087,11 +3087,11 @@ discard block |
||
3087 | 3087 | |
3088 | 3088 | |
3089 | 3089 | /** |
3090 | - * Gets all route combinations |
|
3091 | - * |
|
3092 | - * @return Array the route list |
|
3093 | - * |
|
3094 | - */ |
|
3090 | + * Gets all route combinations |
|
3091 | + * |
|
3092 | + * @return Array the route list |
|
3093 | + * |
|
3094 | + */ |
|
3095 | 3095 | public function getAllRoutes() |
3096 | 3096 | { |
3097 | 3097 | $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 |
@@ -3117,13 +3117,13 @@ discard block |
||
3117 | 3117 | } |
3118 | 3118 | |
3119 | 3119 | /** |
3120 | - * Update ident spotter data |
|
3121 | - * |
|
3122 | - * @param String $flightaware_id the ID from flightaware |
|
3123 | - * @param String $ident the flight ident |
|
3124 | - * @return String success or false |
|
3125 | - * |
|
3126 | - */ |
|
3120 | + * Update ident spotter data |
|
3121 | + * |
|
3122 | + * @param String $flightaware_id the ID from flightaware |
|
3123 | + * @param String $ident the flight ident |
|
3124 | + * @return String success or false |
|
3125 | + * |
|
3126 | + */ |
|
3127 | 3127 | public function updateIdentSpotterData($flightaware_id = '', $ident = '',$fromsource = NULL) |
3128 | 3128 | { |
3129 | 3129 | if (!is_numeric(substr($ident, 0, 3))) |
@@ -3144,14 +3144,14 @@ discard block |
||
3144 | 3144 | } else { |
3145 | 3145 | $airline_array = $this->getAllAirlineInfo("NA"); |
3146 | 3146 | } |
3147 | - $airline_name = $airline_array[0]['name']; |
|
3148 | - $airline_icao = $airline_array[0]['icao']; |
|
3149 | - $airline_country = $airline_array[0]['country']; |
|
3150 | - $airline_type = $airline_array[0]['type']; |
|
3147 | + $airline_name = $airline_array[0]['name']; |
|
3148 | + $airline_icao = $airline_array[0]['icao']; |
|
3149 | + $airline_country = $airline_array[0]['country']; |
|
3150 | + $airline_type = $airline_array[0]['type']; |
|
3151 | 3151 | |
3152 | 3152 | |
3153 | 3153 | $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'; |
3154 | - $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); |
|
3154 | + $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); |
|
3155 | 3155 | |
3156 | 3156 | try { |
3157 | 3157 | $sth = $this->db->prepare($query); |
@@ -3164,19 +3164,19 @@ discard block |
||
3164 | 3164 | |
3165 | 3165 | } |
3166 | 3166 | /** |
3167 | - * Update latest spotter data |
|
3168 | - * |
|
3169 | - * @param String $flightaware_id the ID from flightaware |
|
3170 | - * @param String $ident the flight ident |
|
3171 | - * @param String $arrival_airport_icao the arrival airport |
|
3172 | - * @return String success or false |
|
3173 | - * |
|
3174 | - */ |
|
3167 | + * Update latest spotter data |
|
3168 | + * |
|
3169 | + * @param String $flightaware_id the ID from flightaware |
|
3170 | + * @param String $ident the flight ident |
|
3171 | + * @param String $arrival_airport_icao the arrival airport |
|
3172 | + * @return String success or false |
|
3173 | + * |
|
3174 | + */ |
|
3175 | 3175 | public function updateLatestSpotterData($flightaware_id = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $ground = false, $groundspeed = NULL, $date = '', $arrival_airport_icao = '',$arrival_airport_time = '') |
3176 | 3176 | { |
3177 | 3177 | if ($groundspeed == '') $groundspeed = NULL; |
3178 | 3178 | $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'; |
3179 | - $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); |
|
3179 | + $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); |
|
3180 | 3180 | |
3181 | 3181 | try { |
3182 | 3182 | $sth = $this->db->prepare($query); |
@@ -3190,32 +3190,32 @@ discard block |
||
3190 | 3190 | } |
3191 | 3191 | |
3192 | 3192 | /** |
3193 | - * Adds a new spotter data |
|
3194 | - * |
|
3195 | - * @param String $flightaware_id the ID from flightaware |
|
3196 | - * @param String $ident the flight ident |
|
3197 | - * @param String $aircraft_icao the aircraft type |
|
3198 | - * @param String $departure_airport_icao the departure airport |
|
3199 | - * @param String $arrival_airport_icao the arrival airport |
|
3200 | - * @param String $latitude latitude of flight |
|
3201 | - * @param String $longitude latitude of flight |
|
3202 | - * @param String $waypoints waypoints of flight |
|
3203 | - * @param String $altitude altitude of flight |
|
3204 | - * @param String $heading heading of flight |
|
3205 | - * @param String $groundspeed speed of flight |
|
3206 | - * @param String $date date of flight |
|
3207 | - * @param String $departure_airport_time departure time of flight |
|
3208 | - * @param String $arrival_airport_time arrival time of flight |
|
3209 | - * @param String $squawk squawk code of flight |
|
3210 | - * @param String $route_stop route stop of flight |
|
3211 | - * @param String $highlight highlight or not |
|
3212 | - * @param String $ModeS ModesS code of flight |
|
3213 | - * @param String $registration registration code of flight |
|
3214 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3215 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3216 | - * @param String $verticalrate vertival rate of flight |
|
3217 | - * @return String success or false |
|
3218 | - */ |
|
3193 | + * Adds a new spotter data |
|
3194 | + * |
|
3195 | + * @param String $flightaware_id the ID from flightaware |
|
3196 | + * @param String $ident the flight ident |
|
3197 | + * @param String $aircraft_icao the aircraft type |
|
3198 | + * @param String $departure_airport_icao the departure airport |
|
3199 | + * @param String $arrival_airport_icao the arrival airport |
|
3200 | + * @param String $latitude latitude of flight |
|
3201 | + * @param String $longitude latitude of flight |
|
3202 | + * @param String $waypoints waypoints of flight |
|
3203 | + * @param String $altitude altitude of flight |
|
3204 | + * @param String $heading heading of flight |
|
3205 | + * @param String $groundspeed speed of flight |
|
3206 | + * @param String $date date of flight |
|
3207 | + * @param String $departure_airport_time departure time of flight |
|
3208 | + * @param String $arrival_airport_time arrival time of flight |
|
3209 | + * @param String $squawk squawk code of flight |
|
3210 | + * @param String $route_stop route stop of flight |
|
3211 | + * @param String $highlight highlight or not |
|
3212 | + * @param String $ModeS ModesS code of flight |
|
3213 | + * @param String $registration registration code of flight |
|
3214 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
3215 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
3216 | + * @param String $verticalrate vertival rate of flight |
|
3217 | + * @return String success or false |
|
3218 | + */ |
|
3219 | 3219 | 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 = '') |
3220 | 3220 | { |
3221 | 3221 | global $globalURL, $globalIVAO, $globalVATSIM, $globalphpVMS, $globalDebugTimeElapsed, $globalAirlinesSource, $globalVAM; |
@@ -3429,8 +3429,8 @@ discard block |
||
3429 | 3429 | |
3430 | 3430 | if ($globalIVAO && $aircraft_icao != '') |
3431 | 3431 | { |
3432 | - if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3433 | - else $airline_icao = ''; |
|
3432 | + if (isset($airline_array[0]['icao'])) $airline_icao = $airline_array[0]['icao']; |
|
3433 | + else $airline_icao = ''; |
|
3434 | 3434 | $image_array = $Image->getSpotterImage('',$aircraft_icao,$airline_icao); |
3435 | 3435 | if (!isset($image_array[0]['registration'])) |
3436 | 3436 | { |
@@ -3461,48 +3461,48 @@ discard block |
||
3461 | 3461 | |
3462 | 3462 | if (count($airline_array) == 0) |
3463 | 3463 | { |
3464 | - $airline_array = $this->getAllAirlineInfo('NA'); |
|
3465 | - } |
|
3466 | - if (count($aircraft_array) == 0) |
|
3467 | - { |
|
3468 | - $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3469 | - } |
|
3470 | - if (count($departure_airport_array) == 0) |
|
3471 | - { |
|
3472 | - $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3473 | - } |
|
3474 | - if (count($arrival_airport_array) == 0) |
|
3475 | - { |
|
3476 | - $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3477 | - } |
|
3478 | - if ($registration == '') $registration = 'NA'; |
|
3479 | - if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3480 | - if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3481 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3482 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3483 | - if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3484 | - $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) |
|
3464 | + $airline_array = $this->getAllAirlineInfo('NA'); |
|
3465 | + } |
|
3466 | + if (count($aircraft_array) == 0) |
|
3467 | + { |
|
3468 | + $aircraft_array = $this->getAllAircraftInfo('NA'); |
|
3469 | + } |
|
3470 | + if (count($departure_airport_array) == 0) |
|
3471 | + { |
|
3472 | + $departure_airport_array = $this->getAllAirportInfo('NA'); |
|
3473 | + } |
|
3474 | + if (count($arrival_airport_array) == 0) |
|
3475 | + { |
|
3476 | + $arrival_airport_array = $this->getAllAirportInfo('NA'); |
|
3477 | + } |
|
3478 | + if ($registration == '') $registration = 'NA'; |
|
3479 | + if ($squawk == '' || $Common->isInteger($squawk) === false) $squawk = NULL; |
|
3480 | + if ($verticalrate == '' || $Common->isInteger($verticalrate) === false) $verticalrate = NULL; |
|
3481 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
3482 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
3483 | + if (!isset($aircraft_owner)) $aircraft_owner = NULL; |
|
3484 | + $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) |
|
3485 | 3485 | 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)"; |
3486 | 3486 | |
3487 | - $airline_name = $airline_array[0]['name']; |
|
3488 | - $airline_icao = $airline_array[0]['icao']; |
|
3489 | - $airline_country = $airline_array[0]['country']; |
|
3490 | - $airline_type = $airline_array[0]['type']; |
|
3487 | + $airline_name = $airline_array[0]['name']; |
|
3488 | + $airline_icao = $airline_array[0]['icao']; |
|
3489 | + $airline_country = $airline_array[0]['country']; |
|
3490 | + $airline_type = $airline_array[0]['type']; |
|
3491 | 3491 | if ($airline_type == '') { |
3492 | 3492 | $timeelapsed = microtime(true); |
3493 | 3493 | $airline_type = $this->getAircraftTypeBymodeS($ModeS); |
3494 | 3494 | if ($globalDebugTimeElapsed) echo 'ADD SPOTTER DATA : Time elapsed for getAircraftTypeBymodes : '.round(microtime(true)-$timeelapsed,2).'s'."\n"; |
3495 | 3495 | } |
3496 | 3496 | if ($airline_type == null) $airline_type = ''; |
3497 | - $aircraft_type = $aircraft_array[0]['type']; |
|
3498 | - $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3499 | - $departure_airport_name = $departure_airport_array[0]['name']; |
|
3500 | - $departure_airport_city = $departure_airport_array[0]['city']; |
|
3501 | - $departure_airport_country = $departure_airport_array[0]['country']; |
|
3502 | - $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3503 | - $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3504 | - $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3505 | - $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); |
|
3497 | + $aircraft_type = $aircraft_array[0]['type']; |
|
3498 | + $aircraft_manufacturer = $aircraft_array[0]['manufacturer']; |
|
3499 | + $departure_airport_name = $departure_airport_array[0]['name']; |
|
3500 | + $departure_airport_city = $departure_airport_array[0]['city']; |
|
3501 | + $departure_airport_country = $departure_airport_array[0]['country']; |
|
3502 | + $arrival_airport_name = $arrival_airport_array[0]['name']; |
|
3503 | + $arrival_airport_city = $arrival_airport_array[0]['city']; |
|
3504 | + $arrival_airport_country = $arrival_airport_array[0]['country']; |
|
3505 | + $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); |
|
3506 | 3506 | |
3507 | 3507 | try { |
3508 | 3508 | |
@@ -3510,7 +3510,7 @@ discard block |
||
3510 | 3510 | $sth->execute($query_values); |
3511 | 3511 | $this->db = null; |
3512 | 3512 | } catch (PDOException $e) { |
3513 | - return "error : ".$e->getMessage(); |
|
3513 | + return "error : ".$e->getMessage(); |
|
3514 | 3514 | } |
3515 | 3515 | |
3516 | 3516 | return "success"; |
@@ -3519,11 +3519,11 @@ discard block |
||
3519 | 3519 | |
3520 | 3520 | |
3521 | 3521 | /** |
3522 | - * Gets the aircraft ident within the last hour |
|
3523 | - * |
|
3524 | - * @return String the ident |
|
3525 | - * |
|
3526 | - */ |
|
3522 | + * Gets the aircraft ident within the last hour |
|
3523 | + * |
|
3524 | + * @return String the ident |
|
3525 | + * |
|
3526 | + */ |
|
3527 | 3527 | public function getIdentFromLastHour($ident) |
3528 | 3528 | { |
3529 | 3529 | global $globalDBdriver, $globalTimezone; |
@@ -3539,11 +3539,11 @@ discard block |
||
3539 | 3539 | AND spotter_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
3540 | 3540 | AND spotter_output.date < now() AT TIME ZONE 'UTC'"; |
3541 | 3541 | $query_data = array(':ident' => $ident); |
3542 | - } |
|
3542 | + } |
|
3543 | 3543 | |
3544 | 3544 | $sth = $this->db->prepare($query); |
3545 | 3545 | $sth->execute($query_data); |
3546 | - $ident_result=''; |
|
3546 | + $ident_result=''; |
|
3547 | 3547 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
3548 | 3548 | { |
3549 | 3549 | $ident_result = $row['ident']; |
@@ -3554,11 +3554,11 @@ discard block |
||
3554 | 3554 | |
3555 | 3555 | |
3556 | 3556 | /** |
3557 | - * Gets the aircraft data from the last 20 seconds |
|
3558 | - * |
|
3559 | - * @return Array the spotter data |
|
3560 | - * |
|
3561 | - */ |
|
3557 | + * Gets the aircraft data from the last 20 seconds |
|
3558 | + * |
|
3559 | + * @return Array the spotter data |
|
3560 | + * |
|
3561 | + */ |
|
3562 | 3562 | public function getRealTimeData($q = '') |
3563 | 3563 | { |
3564 | 3564 | global $globalDBdriver; |
@@ -3602,11 +3602,11 @@ discard block |
||
3602 | 3602 | |
3603 | 3603 | |
3604 | 3604 | /** |
3605 | - * Gets all airlines that have flown over |
|
3606 | - * |
|
3607 | - * @return Array the airline list |
|
3608 | - * |
|
3609 | - */ |
|
3605 | + * Gets all airlines that have flown over |
|
3606 | + * |
|
3607 | + * @return Array the airline list |
|
3608 | + * |
|
3609 | + */ |
|
3610 | 3610 | public function countAllAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
3611 | 3611 | { |
3612 | 3612 | global $globalDBdriver; |
@@ -3620,7 +3620,7 @@ discard block |
||
3620 | 3620 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3621 | 3621 | } |
3622 | 3622 | } |
3623 | - if ($sincedate != '') { |
|
3623 | + if ($sincedate != '') { |
|
3624 | 3624 | if ($globalDBdriver == 'mysql') { |
3625 | 3625 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3626 | 3626 | } else { |
@@ -3647,26 +3647,26 @@ discard block |
||
3647 | 3647 | } |
3648 | 3648 | |
3649 | 3649 | /** |
3650 | - * Gets all pilots that have flown over |
|
3651 | - * |
|
3652 | - * @return Array the pilots list |
|
3653 | - * |
|
3654 | - */ |
|
3650 | + * Gets all pilots that have flown over |
|
3651 | + * |
|
3652 | + * @return Array the pilots list |
|
3653 | + * |
|
3654 | + */ |
|
3655 | 3655 | public function countAllPilots($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
3656 | 3656 | { |
3657 | 3657 | global $globalDBdriver; |
3658 | 3658 | $filter_query = $this->getFilter($filters,true,true); |
3659 | 3659 | $query = "SELECT DISTINCT spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count |
3660 | 3660 | FROM spotter_output".$filter_query." spotter_output.pilot_id <> '' "; |
3661 | - if ($olderthanmonths > 0) { |
|
3662 | - if ($globalDBdriver == 'mysql') { |
|
3661 | + if ($olderthanmonths > 0) { |
|
3662 | + if ($globalDBdriver == 'mysql') { |
|
3663 | 3663 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
3664 | 3664 | } else { |
3665 | 3665 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3666 | 3666 | } |
3667 | 3667 | } |
3668 | - if ($sincedate != '') { |
|
3669 | - if ($globalDBdriver == 'mysql') { |
|
3668 | + if ($sincedate != '') { |
|
3669 | + if ($globalDBdriver == 'mysql') { |
|
3670 | 3670 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3671 | 3671 | } else { |
3672 | 3672 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3693,25 +3693,25 @@ discard block |
||
3693 | 3693 | } |
3694 | 3694 | |
3695 | 3695 | /** |
3696 | - * Gets all pilots that have flown over |
|
3697 | - * |
|
3698 | - * @return Array the pilots list |
|
3699 | - * |
|
3700 | - */ |
|
3696 | + * Gets all pilots that have flown over |
|
3697 | + * |
|
3698 | + * @return Array the pilots list |
|
3699 | + * |
|
3700 | + */ |
|
3701 | 3701 | public function countAllPilotsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '') |
3702 | 3702 | { |
3703 | 3703 | global $globalDBdriver; |
3704 | 3704 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.pilot_id, spotter_output.pilot_name, COUNT(spotter_output.pilot_id) AS pilot_count |
3705 | 3705 | FROM spotter_output WHERE spotter_output.pilot_id <> '' "; |
3706 | - if ($olderthanmonths > 0) { |
|
3707 | - if ($globalDBdriver == 'mysql') { |
|
3706 | + if ($olderthanmonths > 0) { |
|
3707 | + if ($globalDBdriver == 'mysql') { |
|
3708 | 3708 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
3709 | 3709 | } else { |
3710 | 3710 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3711 | 3711 | } |
3712 | 3712 | } |
3713 | - if ($sincedate != '') { |
|
3714 | - if ($globalDBdriver == 'mysql') { |
|
3713 | + if ($sincedate != '') { |
|
3714 | + if ($globalDBdriver == 'mysql') { |
|
3715 | 3715 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3716 | 3716 | } else { |
3717 | 3717 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3739,26 +3739,26 @@ discard block |
||
3739 | 3739 | } |
3740 | 3740 | |
3741 | 3741 | /** |
3742 | - * Gets all owner that have flown over |
|
3743 | - * |
|
3744 | - * @return Array the pilots list |
|
3745 | - * |
|
3746 | - */ |
|
3742 | + * Gets all owner that have flown over |
|
3743 | + * |
|
3744 | + * @return Array the pilots list |
|
3745 | + * |
|
3746 | + */ |
|
3747 | 3747 | public function countAllOwners($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
3748 | 3748 | { |
3749 | 3749 | global $globalDBdriver; |
3750 | 3750 | $filter_query = $this->getFilter($filters,true,true); |
3751 | 3751 | $query = "SELECT DISTINCT spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
3752 | 3752 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
3753 | - if ($olderthanmonths > 0) { |
|
3754 | - if ($globalDBdriver == 'mysql') { |
|
3753 | + if ($olderthanmonths > 0) { |
|
3754 | + if ($globalDBdriver == 'mysql') { |
|
3755 | 3755 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
3756 | 3756 | } else { |
3757 | 3757 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3758 | 3758 | } |
3759 | 3759 | } |
3760 | - if ($sincedate != '') { |
|
3761 | - if ($globalDBdriver == 'mysql') { |
|
3760 | + if ($sincedate != '') { |
|
3761 | + if ($globalDBdriver == 'mysql') { |
|
3762 | 3762 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3763 | 3763 | } else { |
3764 | 3764 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3784,26 +3784,26 @@ discard block |
||
3784 | 3784 | } |
3785 | 3785 | |
3786 | 3786 | /** |
3787 | - * Gets all owner that have flown over |
|
3788 | - * |
|
3789 | - * @return Array the pilots list |
|
3790 | - * |
|
3791 | - */ |
|
3787 | + * Gets all owner that have flown over |
|
3788 | + * |
|
3789 | + * @return Array the pilots list |
|
3790 | + * |
|
3791 | + */ |
|
3792 | 3792 | public function countAllOwnersByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
3793 | 3793 | { |
3794 | 3794 | global $globalDBdriver; |
3795 | 3795 | $filter_query = $this->getFilter($filters,true,true); |
3796 | 3796 | $query = "SELECT DISTINCT spotter_output.airline_icao, spotter_output.owner_name, COUNT(spotter_output.owner_name) AS owner_count |
3797 | 3797 | FROM spotter_output".$filter_query." spotter_output.owner_name <> '' AND spotter_output.owner_name IS NOT NULL "; |
3798 | - if ($olderthanmonths > 0) { |
|
3799 | - if ($globalDBdriver == 'mysql') { |
|
3798 | + if ($olderthanmonths > 0) { |
|
3799 | + if ($globalDBdriver == 'mysql') { |
|
3800 | 3800 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
3801 | 3801 | } else { |
3802 | 3802 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
3803 | 3803 | } |
3804 | 3804 | } |
3805 | - if ($sincedate != '') { |
|
3806 | - if ($globalDBdriver == 'mysql') { |
|
3805 | + if ($sincedate != '') { |
|
3806 | + if ($globalDBdriver == 'mysql') { |
|
3807 | 3807 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
3808 | 3808 | } else { |
3809 | 3809 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -3830,11 +3830,11 @@ discard block |
||
3830 | 3830 | } |
3831 | 3831 | |
3832 | 3832 | /** |
3833 | - * Gets all airlines that have flown over by aircraft |
|
3834 | - * |
|
3835 | - * @return Array the airline list |
|
3836 | - * |
|
3837 | - */ |
|
3833 | + * Gets all airlines that have flown over by aircraft |
|
3834 | + * |
|
3835 | + * @return Array the airline list |
|
3836 | + * |
|
3837 | + */ |
|
3838 | 3838 | public function countAllAirlinesByAircraft($aircraft_icao,$filters = array()) |
3839 | 3839 | { |
3840 | 3840 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -3866,11 +3866,11 @@ discard block |
||
3866 | 3866 | |
3867 | 3867 | |
3868 | 3868 | /** |
3869 | - * Gets all airline countries that have flown over by aircraft |
|
3870 | - * |
|
3871 | - * @return Array the airline country list |
|
3872 | - * |
|
3873 | - */ |
|
3869 | + * Gets all airline countries that have flown over by aircraft |
|
3870 | + * |
|
3871 | + * @return Array the airline country list |
|
3872 | + * |
|
3873 | + */ |
|
3874 | 3874 | public function countAllAirlineCountriesByAircraft($aircraft_icao,$filters = array()) |
3875 | 3875 | { |
3876 | 3876 | $aircraft_icao = filter_var($aircraft_icao,FILTER_SANITIZE_STRING); |
@@ -3902,11 +3902,11 @@ discard block |
||
3902 | 3902 | |
3903 | 3903 | |
3904 | 3904 | /** |
3905 | - * Gets all airlines that have flown over by airport |
|
3906 | - * |
|
3907 | - * @return Array the airline list |
|
3908 | - * |
|
3909 | - */ |
|
3905 | + * Gets all airlines that have flown over by airport |
|
3906 | + * |
|
3907 | + * @return Array the airline list |
|
3908 | + * |
|
3909 | + */ |
|
3910 | 3910 | public function countAllAirlinesByAirport($airport_icao,$filters = array()) |
3911 | 3911 | { |
3912 | 3912 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -3937,11 +3937,11 @@ discard block |
||
3937 | 3937 | |
3938 | 3938 | |
3939 | 3939 | /** |
3940 | - * Gets all airline countries that have flown over by airport icao |
|
3941 | - * |
|
3942 | - * @return Array the airline country list |
|
3943 | - * |
|
3944 | - */ |
|
3940 | + * Gets all airline countries that have flown over by airport icao |
|
3941 | + * |
|
3942 | + * @return Array the airline country list |
|
3943 | + * |
|
3944 | + */ |
|
3945 | 3945 | public function countAllAirlineCountriesByAirport($airport_icao,$filters = array()) |
3946 | 3946 | { |
3947 | 3947 | $airport_icao = filter_var($airport_icao,FILTER_SANITIZE_STRING); |
@@ -3971,11 +3971,11 @@ discard block |
||
3971 | 3971 | |
3972 | 3972 | |
3973 | 3973 | /** |
3974 | - * Gets all airlines that have flown over by aircraft manufacturer |
|
3975 | - * |
|
3976 | - * @return Array the airline list |
|
3977 | - * |
|
3978 | - */ |
|
3974 | + * Gets all airlines that have flown over by aircraft manufacturer |
|
3975 | + * |
|
3976 | + * @return Array the airline list |
|
3977 | + * |
|
3978 | + */ |
|
3979 | 3979 | public function countAllAirlinesByManufacturer($aircraft_manufacturer,$filters = array()) |
3980 | 3980 | { |
3981 | 3981 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4006,11 +4006,11 @@ discard block |
||
4006 | 4006 | |
4007 | 4007 | |
4008 | 4008 | /** |
4009 | - * Gets all airline countries that have flown over by aircraft manufacturer |
|
4010 | - * |
|
4011 | - * @return Array the airline country list |
|
4012 | - * |
|
4013 | - */ |
|
4009 | + * Gets all airline countries that have flown over by aircraft manufacturer |
|
4010 | + * |
|
4011 | + * @return Array the airline country list |
|
4012 | + * |
|
4013 | + */ |
|
4014 | 4014 | public function countAllAirlineCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
4015 | 4015 | { |
4016 | 4016 | $aircraft_manufacturer = filter_var($aircraft_manufacturer,FILTER_SANITIZE_STRING); |
@@ -4039,11 +4039,11 @@ discard block |
||
4039 | 4039 | |
4040 | 4040 | |
4041 | 4041 | /** |
4042 | - * Gets all airlines that have flown over by date |
|
4043 | - * |
|
4044 | - * @return Array the airline list |
|
4045 | - * |
|
4046 | - */ |
|
4042 | + * Gets all airlines that have flown over by date |
|
4043 | + * |
|
4044 | + * @return Array the airline list |
|
4045 | + * |
|
4046 | + */ |
|
4047 | 4047 | public function countAllAirlinesByDate($date,$filters = array()) |
4048 | 4048 | { |
4049 | 4049 | global $globalTimezone, $globalDBdriver; |
@@ -4087,11 +4087,11 @@ discard block |
||
4087 | 4087 | |
4088 | 4088 | |
4089 | 4089 | /** |
4090 | - * Gets all airline countries that have flown over by date |
|
4091 | - * |
|
4092 | - * @return Array the airline country list |
|
4093 | - * |
|
4094 | - */ |
|
4090 | + * Gets all airline countries that have flown over by date |
|
4091 | + * |
|
4092 | + * @return Array the airline country list |
|
4093 | + * |
|
4094 | + */ |
|
4095 | 4095 | public function countAllAirlineCountriesByDate($date,$filters = array()) |
4096 | 4096 | { |
4097 | 4097 | global $globalTimezone, $globalDBdriver; |
@@ -4134,11 +4134,11 @@ discard block |
||
4134 | 4134 | |
4135 | 4135 | |
4136 | 4136 | /** |
4137 | - * Gets all airlines that have flown over by ident/callsign |
|
4138 | - * |
|
4139 | - * @return Array the airline list |
|
4140 | - * |
|
4141 | - */ |
|
4137 | + * Gets all airlines that have flown over by ident/callsign |
|
4138 | + * |
|
4139 | + * @return Array the airline list |
|
4140 | + * |
|
4141 | + */ |
|
4142 | 4142 | public function countAllAirlinesByIdent($ident,$filters = array()) |
4143 | 4143 | { |
4144 | 4144 | $ident = filter_var($ident,FILTER_SANITIZE_STRING); |
@@ -4168,11 +4168,11 @@ discard block |
||
4168 | 4168 | } |
4169 | 4169 | |
4170 | 4170 | /** |
4171 | - * Gets all airlines that have flown over by route |
|
4172 | - * |
|
4173 | - * @return Array the airline list |
|
4174 | - * |
|
4175 | - */ |
|
4171 | + * Gets all airlines that have flown over by route |
|
4172 | + * |
|
4173 | + * @return Array the airline list |
|
4174 | + * |
|
4175 | + */ |
|
4176 | 4176 | public function countAllAirlinesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
4177 | 4177 | { |
4178 | 4178 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4204,11 +4204,11 @@ discard block |
||
4204 | 4204 | } |
4205 | 4205 | |
4206 | 4206 | /** |
4207 | - * Gets all airline countries that have flown over by route |
|
4208 | - * |
|
4209 | - * @return Array the airline country list |
|
4210 | - * |
|
4211 | - */ |
|
4207 | + * Gets all airline countries that have flown over by route |
|
4208 | + * |
|
4209 | + * @return Array the airline country list |
|
4210 | + * |
|
4211 | + */ |
|
4212 | 4212 | public function countAllAirlineCountriesByRoute($departure_airport_icao, $arrival_airport_icao,$filters= array()) |
4213 | 4213 | { |
4214 | 4214 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4240,11 +4240,11 @@ discard block |
||
4240 | 4240 | |
4241 | 4241 | |
4242 | 4242 | /** |
4243 | - * Gets all airlines that have flown over by country |
|
4244 | - * |
|
4245 | - * @return Array the airline list |
|
4246 | - * |
|
4247 | - */ |
|
4243 | + * Gets all airlines that have flown over by country |
|
4244 | + * |
|
4245 | + * @return Array the airline list |
|
4246 | + * |
|
4247 | + */ |
|
4248 | 4248 | public function countAllAirlinesByCountry($country,$filters = array()) |
4249 | 4249 | { |
4250 | 4250 | $country = filter_var($country,FILTER_SANITIZE_STRING); |
@@ -4274,11 +4274,11 @@ discard block |
||
4274 | 4274 | |
4275 | 4275 | |
4276 | 4276 | /** |
4277 | - * Gets all airline countries that have flown over by country |
|
4278 | - * |
|
4279 | - * @return Array the airline country list |
|
4280 | - * |
|
4281 | - */ |
|
4277 | + * Gets all airline countries that have flown over by country |
|
4278 | + * |
|
4279 | + * @return Array the airline country list |
|
4280 | + * |
|
4281 | + */ |
|
4282 | 4282 | public function countAllAirlineCountriesByCountry($country,$filters = array()) |
4283 | 4283 | { |
4284 | 4284 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4307,11 +4307,11 @@ discard block |
||
4307 | 4307 | |
4308 | 4308 | |
4309 | 4309 | /** |
4310 | - * Gets all airlines countries |
|
4311 | - * |
|
4312 | - * @return Array the airline country list |
|
4313 | - * |
|
4314 | - */ |
|
4310 | + * Gets all airlines countries |
|
4311 | + * |
|
4312 | + * @return Array the airline country list |
|
4313 | + * |
|
4314 | + */ |
|
4315 | 4315 | public function countAllAirlineCountries($limit = true, $filters = array()) |
4316 | 4316 | { |
4317 | 4317 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4337,11 +4337,11 @@ discard block |
||
4337 | 4337 | } |
4338 | 4338 | |
4339 | 4339 | /** |
4340 | - * Gets all number of flight over countries |
|
4341 | - * |
|
4342 | - * @return Array the airline country list |
|
4343 | - * |
|
4344 | - */ |
|
4340 | + * Gets all number of flight over countries |
|
4341 | + * |
|
4342 | + * @return Array the airline country list |
|
4343 | + * |
|
4344 | + */ |
|
4345 | 4345 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '') |
4346 | 4346 | { |
4347 | 4347 | global $globalDBdriver; |
@@ -4356,15 +4356,15 @@ discard block |
||
4356 | 4356 | $query = "SELECT c.name, c.iso3, c.iso2, count(c.name) as nb |
4357 | 4357 | FROM countries c, spotter_live s |
4358 | 4358 | WHERE c.iso2 = s.over_country "; |
4359 | - if ($olderthanmonths > 0) { |
|
4359 | + if ($olderthanmonths > 0) { |
|
4360 | 4360 | if ($globalDBdriver == 'mysql') { |
4361 | 4361 | $query .= 'AND spotter_live.date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
4362 | 4362 | } else { |
4363 | 4363 | $query .= "AND spotter_live.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
4364 | 4364 | } |
4365 | 4365 | } |
4366 | - if ($sincedate != '') { |
|
4367 | - if ($globalDBdriver == 'mysql') { |
|
4366 | + if ($sincedate != '') { |
|
4367 | + if ($globalDBdriver == 'mysql') { |
|
4368 | 4368 | $query .= "AND spotter_live.date > '".$sincedate."' "; |
4369 | 4369 | } else { |
4370 | 4370 | $query .= "AND spotter_live.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -4394,11 +4394,11 @@ discard block |
||
4394 | 4394 | |
4395 | 4395 | |
4396 | 4396 | /** |
4397 | - * Gets all aircraft types that have flown over |
|
4398 | - * |
|
4399 | - * @return Array the aircraft list |
|
4400 | - * |
|
4401 | - */ |
|
4397 | + * Gets all aircraft types that have flown over |
|
4398 | + * |
|
4399 | + * @return Array the aircraft list |
|
4400 | + * |
|
4401 | + */ |
|
4402 | 4402 | public function countAllAircraftTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
4403 | 4403 | { |
4404 | 4404 | global $globalDBdriver; |
@@ -4441,11 +4441,11 @@ discard block |
||
4441 | 4441 | } |
4442 | 4442 | |
4443 | 4443 | /** |
4444 | - * Gets all aircraft types that have flown over by airline |
|
4445 | - * |
|
4446 | - * @return Array the aircraft list |
|
4447 | - * |
|
4448 | - */ |
|
4444 | + * Gets all aircraft types that have flown over by airline |
|
4445 | + * |
|
4446 | + * @return Array the aircraft list |
|
4447 | + * |
|
4448 | + */ |
|
4449 | 4449 | public function countAllAircraftTypesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
4450 | 4450 | { |
4451 | 4451 | global $globalDBdriver; |
@@ -4489,11 +4489,11 @@ discard block |
||
4489 | 4489 | |
4490 | 4490 | |
4491 | 4491 | /** |
4492 | - * Gets all aircraft registration that have flown over by aircaft icao |
|
4493 | - * |
|
4494 | - * @return Array the aircraft list |
|
4495 | - * |
|
4496 | - */ |
|
4492 | + * Gets all aircraft registration that have flown over by aircaft icao |
|
4493 | + * |
|
4494 | + * @return Array the aircraft list |
|
4495 | + * |
|
4496 | + */ |
|
4497 | 4497 | public function countAllAircraftRegistrationByAircraft($aircraft_icao,$filters = array()) |
4498 | 4498 | { |
4499 | 4499 | $Image = new Image($this->db); |
@@ -4532,11 +4532,11 @@ discard block |
||
4532 | 4532 | |
4533 | 4533 | |
4534 | 4534 | /** |
4535 | - * Gets all aircraft types that have flown over by airline icao |
|
4536 | - * |
|
4537 | - * @return Array the aircraft list |
|
4538 | - * |
|
4539 | - */ |
|
4535 | + * Gets all aircraft types that have flown over by airline icao |
|
4536 | + * |
|
4537 | + * @return Array the aircraft list |
|
4538 | + * |
|
4539 | + */ |
|
4540 | 4540 | public function countAllAircraftTypesByAirline($airline_icao,$filters = array()) |
4541 | 4541 | { |
4542 | 4542 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4565,11 +4565,11 @@ discard block |
||
4565 | 4565 | |
4566 | 4566 | |
4567 | 4567 | /** |
4568 | - * Gets all aircraft registration that have flown over by airline icao |
|
4569 | - * |
|
4570 | - * @return Array the aircraft list |
|
4571 | - * |
|
4572 | - */ |
|
4568 | + * Gets all aircraft registration that have flown over by airline icao |
|
4569 | + * |
|
4570 | + * @return Array the aircraft list |
|
4571 | + * |
|
4572 | + */ |
|
4573 | 4573 | public function countAllAircraftRegistrationByAirline($airline_icao,$filters = array()) |
4574 | 4574 | { |
4575 | 4575 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4607,11 +4607,11 @@ discard block |
||
4607 | 4607 | |
4608 | 4608 | |
4609 | 4609 | /** |
4610 | - * Gets all aircraft manufacturer that have flown over by airline icao |
|
4611 | - * |
|
4612 | - * @return Array the aircraft list |
|
4613 | - * |
|
4614 | - */ |
|
4610 | + * Gets all aircraft manufacturer that have flown over by airline icao |
|
4611 | + * |
|
4612 | + * @return Array the aircraft list |
|
4613 | + * |
|
4614 | + */ |
|
4615 | 4615 | public function countAllAircraftManufacturerByAirline($airline_icao,$filters = array()) |
4616 | 4616 | { |
4617 | 4617 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4639,11 +4639,11 @@ discard block |
||
4639 | 4639 | |
4640 | 4640 | |
4641 | 4641 | /** |
4642 | - * Gets all aircraft types that have flown over by airline icao |
|
4643 | - * |
|
4644 | - * @return Array the aircraft list |
|
4645 | - * |
|
4646 | - */ |
|
4642 | + * Gets all aircraft types that have flown over by airline icao |
|
4643 | + * |
|
4644 | + * @return Array the aircraft list |
|
4645 | + * |
|
4646 | + */ |
|
4647 | 4647 | public function countAllAircraftTypesByAirport($airport_icao,$filters = array()) |
4648 | 4648 | { |
4649 | 4649 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4672,11 +4672,11 @@ discard block |
||
4672 | 4672 | |
4673 | 4673 | |
4674 | 4674 | /** |
4675 | - * Gets all aircraft registration that have flown over by airport icao |
|
4676 | - * |
|
4677 | - * @return Array the aircraft list |
|
4678 | - * |
|
4679 | - */ |
|
4675 | + * Gets all aircraft registration that have flown over by airport icao |
|
4676 | + * |
|
4677 | + * @return Array the aircraft list |
|
4678 | + * |
|
4679 | + */ |
|
4680 | 4680 | public function countAllAircraftRegistrationByAirport($airport_icao,$filters = array()) |
4681 | 4681 | { |
4682 | 4682 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4714,11 +4714,11 @@ discard block |
||
4714 | 4714 | |
4715 | 4715 | |
4716 | 4716 | /** |
4717 | - * Gets all aircraft manufacturer that have flown over by airport icao |
|
4718 | - * |
|
4719 | - * @return Array the aircraft list |
|
4720 | - * |
|
4721 | - */ |
|
4717 | + * Gets all aircraft manufacturer that have flown over by airport icao |
|
4718 | + * |
|
4719 | + * @return Array the aircraft list |
|
4720 | + * |
|
4721 | + */ |
|
4722 | 4722 | public function countAllAircraftManufacturerByAirport($airport_icao,$filters = array()) |
4723 | 4723 | { |
4724 | 4724 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4744,11 +4744,11 @@ discard block |
||
4744 | 4744 | } |
4745 | 4745 | |
4746 | 4746 | /** |
4747 | - * Gets all aircraft types that have flown over by aircraft manufacturer |
|
4748 | - * |
|
4749 | - * @return Array the aircraft list |
|
4750 | - * |
|
4751 | - */ |
|
4747 | + * Gets all aircraft types that have flown over by aircraft manufacturer |
|
4748 | + * |
|
4749 | + * @return Array the aircraft list |
|
4750 | + * |
|
4751 | + */ |
|
4752 | 4752 | public function countAllAircraftTypesByManufacturer($aircraft_manufacturer,$filters = array()) |
4753 | 4753 | { |
4754 | 4754 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4775,11 +4775,11 @@ discard block |
||
4775 | 4775 | |
4776 | 4776 | |
4777 | 4777 | /** |
4778 | - * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
4779 | - * |
|
4780 | - * @return Array the aircraft list |
|
4781 | - * |
|
4782 | - */ |
|
4778 | + * Gets all aircraft registration that have flown over by aircaft manufacturer |
|
4779 | + * |
|
4780 | + * @return Array the aircraft list |
|
4781 | + * |
|
4782 | + */ |
|
4783 | 4783 | public function countAllAircraftRegistrationByManufacturer($aircraft_manufacturer, $filters = array()) |
4784 | 4784 | { |
4785 | 4785 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4815,11 +4815,11 @@ discard block |
||
4815 | 4815 | } |
4816 | 4816 | |
4817 | 4817 | /** |
4818 | - * Gets all aircraft types that have flown over by date |
|
4819 | - * |
|
4820 | - * @return Array the aircraft list |
|
4821 | - * |
|
4822 | - */ |
|
4818 | + * Gets all aircraft types that have flown over by date |
|
4819 | + * |
|
4820 | + * @return Array the aircraft list |
|
4821 | + * |
|
4822 | + */ |
|
4823 | 4823 | public function countAllAircraftTypesByDate($date,$filters = array()) |
4824 | 4824 | { |
4825 | 4825 | global $globalTimezone, $globalDBdriver; |
@@ -4861,11 +4861,11 @@ discard block |
||
4861 | 4861 | |
4862 | 4862 | |
4863 | 4863 | /** |
4864 | - * Gets all aircraft registration that have flown over by date |
|
4865 | - * |
|
4866 | - * @return Array the aircraft list |
|
4867 | - * |
|
4868 | - */ |
|
4864 | + * Gets all aircraft registration that have flown over by date |
|
4865 | + * |
|
4866 | + * @return Array the aircraft list |
|
4867 | + * |
|
4868 | + */ |
|
4869 | 4869 | public function countAllAircraftRegistrationByDate($date,$filters = array()) |
4870 | 4870 | { |
4871 | 4871 | global $globalTimezone, $globalDBdriver; |
@@ -4916,11 +4916,11 @@ discard block |
||
4916 | 4916 | |
4917 | 4917 | |
4918 | 4918 | /** |
4919 | - * Gets all aircraft manufacturer that have flown over by date |
|
4920 | - * |
|
4921 | - * @return Array the aircraft manufacturer list |
|
4922 | - * |
|
4923 | - */ |
|
4919 | + * Gets all aircraft manufacturer that have flown over by date |
|
4920 | + * |
|
4921 | + * @return Array the aircraft manufacturer list |
|
4922 | + * |
|
4923 | + */ |
|
4924 | 4924 | public function countAllAircraftManufacturerByDate($date,$filters = array()) |
4925 | 4925 | { |
4926 | 4926 | global $globalTimezone, $globalDBdriver; |
@@ -4962,11 +4962,11 @@ discard block |
||
4962 | 4962 | |
4963 | 4963 | |
4964 | 4964 | /** |
4965 | - * Gets all aircraft types that have flown over by ident/callsign |
|
4966 | - * |
|
4967 | - * @return Array the aircraft list |
|
4968 | - * |
|
4969 | - */ |
|
4965 | + * Gets all aircraft types that have flown over by ident/callsign |
|
4966 | + * |
|
4967 | + * @return Array the aircraft list |
|
4968 | + * |
|
4969 | + */ |
|
4970 | 4970 | public function countAllAircraftTypesByIdent($ident,$filters = array()) |
4971 | 4971 | { |
4972 | 4972 | $filter_query = $this->getFilter($filters,true,true); |
@@ -4995,11 +4995,11 @@ discard block |
||
4995 | 4995 | |
4996 | 4996 | |
4997 | 4997 | /** |
4998 | - * Gets all aircraft registration that have flown over by ident/callsign |
|
4999 | - * |
|
5000 | - * @return Array the aircraft list |
|
5001 | - * |
|
5002 | - */ |
|
4998 | + * Gets all aircraft registration that have flown over by ident/callsign |
|
4999 | + * |
|
5000 | + * @return Array the aircraft list |
|
5001 | + * |
|
5002 | + */ |
|
5003 | 5003 | public function countAllAircraftRegistrationByIdent($ident,$filters = array()) |
5004 | 5004 | { |
5005 | 5005 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5039,11 +5039,11 @@ discard block |
||
5039 | 5039 | |
5040 | 5040 | |
5041 | 5041 | /** |
5042 | - * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
5043 | - * |
|
5044 | - * @return Array the aircraft manufacturer list |
|
5045 | - * |
|
5046 | - */ |
|
5042 | + * Gets all aircraft manufacturer that have flown over by ident/callsign |
|
5043 | + * |
|
5044 | + * @return Array the aircraft manufacturer list |
|
5045 | + * |
|
5046 | + */ |
|
5047 | 5047 | public function countAllAircraftManufacturerByIdent($ident,$filters = array()) |
5048 | 5048 | { |
5049 | 5049 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5069,11 +5069,11 @@ discard block |
||
5069 | 5069 | |
5070 | 5070 | |
5071 | 5071 | /** |
5072 | - * Gets all aircraft types that have flown over by route |
|
5073 | - * |
|
5074 | - * @return Array the aircraft list |
|
5075 | - * |
|
5076 | - */ |
|
5072 | + * Gets all aircraft types that have flown over by route |
|
5073 | + * |
|
5074 | + * @return Array the aircraft list |
|
5075 | + * |
|
5076 | + */ |
|
5077 | 5077 | public function countAllAircraftTypesByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5078 | 5078 | { |
5079 | 5079 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5102,11 +5102,11 @@ discard block |
||
5102 | 5102 | } |
5103 | 5103 | |
5104 | 5104 | /** |
5105 | - * Gets all aircraft registration that have flown over by route |
|
5106 | - * |
|
5107 | - * @return Array the aircraft list |
|
5108 | - * |
|
5109 | - */ |
|
5105 | + * Gets all aircraft registration that have flown over by route |
|
5106 | + * |
|
5107 | + * @return Array the aircraft list |
|
5108 | + * |
|
5109 | + */ |
|
5110 | 5110 | public function countAllAircraftRegistrationByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5111 | 5111 | { |
5112 | 5112 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5148,11 +5148,11 @@ discard block |
||
5148 | 5148 | |
5149 | 5149 | |
5150 | 5150 | /** |
5151 | - * Gets all aircraft manufacturer that have flown over by route |
|
5152 | - * |
|
5153 | - * @return Array the aircraft manufacturer list |
|
5154 | - * |
|
5155 | - */ |
|
5151 | + * Gets all aircraft manufacturer that have flown over by route |
|
5152 | + * |
|
5153 | + * @return Array the aircraft manufacturer list |
|
5154 | + * |
|
5155 | + */ |
|
5156 | 5156 | public function countAllAircraftManufacturerByRoute($departure_airport_icao, $arrival_airport_icao,$filters = array()) |
5157 | 5157 | { |
5158 | 5158 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5186,11 +5186,11 @@ discard block |
||
5186 | 5186 | |
5187 | 5187 | |
5188 | 5188 | /** |
5189 | - * Gets all aircraft types that have flown over by country |
|
5190 | - * |
|
5191 | - * @return Array the aircraft list |
|
5192 | - * |
|
5193 | - */ |
|
5189 | + * Gets all aircraft types that have flown over by country |
|
5190 | + * |
|
5191 | + * @return Array the aircraft list |
|
5192 | + * |
|
5193 | + */ |
|
5194 | 5194 | public function countAllAircraftTypesByCountry($country,$filters = array()) |
5195 | 5195 | { |
5196 | 5196 | $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 country |
|
5225 | - * |
|
5226 | - * @return Array the aircraft list |
|
5227 | - * |
|
5228 | - */ |
|
5224 | + * Gets all aircraft registration that have flown over by country |
|
5225 | + * |
|
5226 | + * @return Array the aircraft list |
|
5227 | + * |
|
5228 | + */ |
|
5229 | 5229 | public function countAllAircraftRegistrationByCountry($country,$filters = array()) |
5230 | 5230 | { |
5231 | 5231 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5265,11 +5265,11 @@ discard block |
||
5265 | 5265 | |
5266 | 5266 | |
5267 | 5267 | /** |
5268 | - * Gets all aircraft manufacturer that have flown over by country |
|
5269 | - * |
|
5270 | - * @return Array the aircraft manufacturer list |
|
5271 | - * |
|
5272 | - */ |
|
5268 | + * Gets all aircraft manufacturer that have flown over by country |
|
5269 | + * |
|
5270 | + * @return Array the aircraft manufacturer list |
|
5271 | + * |
|
5272 | + */ |
|
5273 | 5273 | public function countAllAircraftManufacturerByCountry($country,$filters = array()) |
5274 | 5274 | { |
5275 | 5275 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5300,17 +5300,17 @@ discard block |
||
5300 | 5300 | |
5301 | 5301 | |
5302 | 5302 | /** |
5303 | - * Gets all aircraft manufacturers that have flown over |
|
5304 | - * |
|
5305 | - * @return Array the aircraft list |
|
5306 | - * |
|
5307 | - */ |
|
5303 | + * Gets all aircraft manufacturers that have flown over |
|
5304 | + * |
|
5305 | + * @return Array the aircraft list |
|
5306 | + * |
|
5307 | + */ |
|
5308 | 5308 | public function countAllAircraftManufacturers($filters = array()) |
5309 | 5309 | { |
5310 | 5310 | $filter_query = $this->getFilter($filters,true,true); |
5311 | 5311 | $query = "SELECT DISTINCT spotter_output.aircraft_manufacturer, COUNT(spotter_output.aircraft_manufacturer) AS aircraft_manufacturer_count |
5312 | 5312 | FROM spotter_output ".$filter_query." spotter_output.aircraft_manufacturer <> '' AND spotter_output.aircraft_manufacturer <> 'Not Available'"; |
5313 | - $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
5313 | + $query .= " GROUP BY spotter_output.aircraft_manufacturer |
|
5314 | 5314 | ORDER BY aircraft_manufacturer_count DESC |
5315 | 5315 | LIMIT 10"; |
5316 | 5316 | |
@@ -5335,11 +5335,11 @@ discard block |
||
5335 | 5335 | |
5336 | 5336 | |
5337 | 5337 | /** |
5338 | - * Gets all aircraft registrations that have flown over |
|
5339 | - * |
|
5340 | - * @return Array the aircraft list |
|
5341 | - * |
|
5342 | - */ |
|
5338 | + * Gets all aircraft registrations that have flown over |
|
5339 | + * |
|
5340 | + * @return Array the aircraft list |
|
5341 | + * |
|
5342 | + */ |
|
5343 | 5343 | public function countAllAircraftRegistrations($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
5344 | 5344 | { |
5345 | 5345 | global $globalDBdriver; |
@@ -5347,15 +5347,15 @@ discard block |
||
5347 | 5347 | $filter_query = $this->getFilter($filters,true,true); |
5348 | 5348 | $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 |
5349 | 5349 | FROM spotter_output ".$filter_query." spotter_output.registration <> '' AND spotter_output.registration <> 'NA'"; |
5350 | - if ($olderthanmonths > 0) { |
|
5351 | - if ($globalDBdriver == 'mysql') { |
|
5350 | + if ($olderthanmonths > 0) { |
|
5351 | + if ($globalDBdriver == 'mysql') { |
|
5352 | 5352 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
5353 | 5353 | } else { |
5354 | 5354 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
5355 | 5355 | } |
5356 | 5356 | } |
5357 | - if ($sincedate != '') { |
|
5358 | - if ($globalDBdriver == 'mysql') { |
|
5357 | + if ($sincedate != '') { |
|
5358 | + if ($globalDBdriver == 'mysql') { |
|
5359 | 5359 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
5360 | 5360 | } else { |
5361 | 5361 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5364,7 +5364,7 @@ discard block |
||
5364 | 5364 | |
5365 | 5365 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
5366 | 5366 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
5367 | - $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
5367 | + $query .= " GROUP BY spotter_output.registration, spotter_output.aircraft_icao, spotter_output.aircraft_name, spotter_output.airline_name ORDER BY aircraft_registration_count DESC"; |
|
5368 | 5368 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5369 | 5369 | |
5370 | 5370 | $sth = $this->db->prepare($query); |
@@ -5395,11 +5395,11 @@ discard block |
||
5395 | 5395 | |
5396 | 5396 | |
5397 | 5397 | /** |
5398 | - * Gets all aircraft registrations that have flown over |
|
5399 | - * |
|
5400 | - * @return Array the aircraft list |
|
5401 | - * |
|
5402 | - */ |
|
5398 | + * Gets all aircraft registrations that have flown over |
|
5399 | + * |
|
5400 | + * @return Array the aircraft list |
|
5401 | + * |
|
5402 | + */ |
|
5403 | 5403 | public function countAllAircraftRegistrationsByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
5404 | 5404 | { |
5405 | 5405 | global $globalDBdriver; |
@@ -5407,15 +5407,15 @@ discard block |
||
5407 | 5407 | $Image = new Image($this->db); |
5408 | 5408 | $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 |
5409 | 5409 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.registration <> '' AND spotter_output.registration <> 'NA' "; |
5410 | - if ($olderthanmonths > 0) { |
|
5411 | - if ($globalDBdriver == 'mysql') { |
|
5410 | + if ($olderthanmonths > 0) { |
|
5411 | + if ($globalDBdriver == 'mysql') { |
|
5412 | 5412 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
5413 | 5413 | } else { |
5414 | 5414 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
5415 | 5415 | } |
5416 | 5416 | } |
5417 | - if ($sincedate != '') { |
|
5418 | - if ($globalDBdriver == 'mysql') { |
|
5417 | + if ($sincedate != '') { |
|
5418 | + if ($globalDBdriver == 'mysql') { |
|
5419 | 5419 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
5420 | 5420 | } else { |
5421 | 5421 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
@@ -5424,7 +5424,7 @@ discard block |
||
5424 | 5424 | |
5425 | 5425 | // if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
5426 | 5426 | //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
5427 | - $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"; |
|
5427 | + $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"; |
|
5428 | 5428 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5429 | 5429 | |
5430 | 5430 | $sth = $this->db->prepare($query); |
@@ -5456,35 +5456,35 @@ discard block |
||
5456 | 5456 | |
5457 | 5457 | |
5458 | 5458 | /** |
5459 | - * Gets all departure airports of the airplanes that have flown over |
|
5460 | - * |
|
5461 | - * @return Array the airport list |
|
5462 | - * |
|
5463 | - */ |
|
5459 | + * Gets all departure airports of the airplanes that have flown over |
|
5460 | + * |
|
5461 | + * @return Array the airport list |
|
5462 | + * |
|
5463 | + */ |
|
5464 | 5464 | public function countAllDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
5465 | 5465 | { |
5466 | 5466 | global $globalDBdriver; |
5467 | 5467 | $filter_query = $this->getFilter($filters,true,true); |
5468 | 5468 | $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 |
5469 | 5469 | FROM spotter_output".$filter_query." spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA'"; |
5470 | - if ($olderthanmonths > 0) { |
|
5471 | - if ($globalDBdriver == 'mysql') { |
|
5470 | + if ($olderthanmonths > 0) { |
|
5471 | + if ($globalDBdriver == 'mysql') { |
|
5472 | 5472 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
5473 | 5473 | } else { |
5474 | 5474 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
5475 | 5475 | } |
5476 | - } |
|
5477 | - if ($sincedate != '') { |
|
5478 | - if ($globalDBdriver == 'mysql') { |
|
5476 | + } |
|
5477 | + if ($sincedate != '') { |
|
5478 | + if ($globalDBdriver == 'mysql') { |
|
5479 | 5479 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
5480 | 5480 | } else { |
5481 | 5481 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
5482 | 5482 | } |
5483 | 5483 | } |
5484 | 5484 | |
5485 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5486 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5487 | - $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
5485 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5486 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5487 | + $query .= " GROUP BY spotter_output.departure_airport_icao, spotter_output.departure_airport_name, spotter_output.departure_airport_city, spotter_output.departure_airport_country |
|
5488 | 5488 | ORDER BY airport_departure_icao_count DESC"; |
5489 | 5489 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5490 | 5490 | |
@@ -5508,35 +5508,35 @@ discard block |
||
5508 | 5508 | } |
5509 | 5509 | |
5510 | 5510 | /** |
5511 | - * Gets all departure airports of the airplanes that have flown over |
|
5512 | - * |
|
5513 | - * @return Array the airport list |
|
5514 | - * |
|
5515 | - */ |
|
5511 | + * Gets all departure airports of the airplanes that have flown over |
|
5512 | + * |
|
5513 | + * @return Array the airport list |
|
5514 | + * |
|
5515 | + */ |
|
5516 | 5516 | public function countAllDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
5517 | 5517 | { |
5518 | 5518 | global $globalDBdriver; |
5519 | 5519 | $filter_query = $this->getFilter($filters,true,true); |
5520 | 5520 | $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 |
5521 | 5521 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.departure_airport_name <> '' AND spotter_output.departure_airport_icao <> 'NA' "; |
5522 | - if ($olderthanmonths > 0) { |
|
5523 | - if ($globalDBdriver == 'mysql') { |
|
5522 | + if ($olderthanmonths > 0) { |
|
5523 | + if ($globalDBdriver == 'mysql') { |
|
5524 | 5524 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
5525 | 5525 | } else { |
5526 | 5526 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
5527 | 5527 | } |
5528 | - } |
|
5529 | - if ($sincedate != '') { |
|
5530 | - if ($globalDBdriver == 'mysql') { |
|
5528 | + } |
|
5529 | + if ($sincedate != '') { |
|
5530 | + if ($globalDBdriver == 'mysql') { |
|
5531 | 5531 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
5532 | 5532 | } else { |
5533 | 5533 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
5534 | 5534 | } |
5535 | 5535 | } |
5536 | 5536 | |
5537 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5538 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5539 | - $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 |
|
5537 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5538 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5539 | + $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 |
|
5540 | 5540 | ORDER BY airport_departure_icao_count DESC"; |
5541 | 5541 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5542 | 5542 | |
@@ -5561,37 +5561,37 @@ discard block |
||
5561 | 5561 | } |
5562 | 5562 | |
5563 | 5563 | /** |
5564 | - * Gets all detected departure airports of the airplanes that have flown over |
|
5565 | - * |
|
5566 | - * @return Array the airport list |
|
5567 | - * |
|
5568 | - */ |
|
5564 | + * Gets all detected departure airports of the airplanes that have flown over |
|
5565 | + * |
|
5566 | + * @return Array the airport list |
|
5567 | + * |
|
5568 | + */ |
|
5569 | 5569 | public function countAllDetectedDepartureAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
5570 | 5570 | { |
5571 | 5571 | global $globalDBdriver; |
5572 | 5572 | $filter_query = $this->getFilter($filters,true,true); |
5573 | 5573 | $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 |
5574 | 5574 | 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"; |
5575 | - if ($olderthanmonths > 0) { |
|
5576 | - if ($globalDBdriver == 'mysql') { |
|
5575 | + if ($olderthanmonths > 0) { |
|
5576 | + if ($globalDBdriver == 'mysql') { |
|
5577 | 5577 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
5578 | 5578 | } else { |
5579 | 5579 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
5580 | 5580 | } |
5581 | - } |
|
5582 | - if ($sincedate != '') { |
|
5583 | - if ($globalDBdriver == 'mysql') { |
|
5581 | + } |
|
5582 | + if ($sincedate != '') { |
|
5583 | + if ($globalDBdriver == 'mysql') { |
|
5584 | 5584 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
5585 | 5585 | } else { |
5586 | 5586 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
5587 | 5587 | } |
5588 | 5588 | } |
5589 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5590 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5591 | - $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
5589 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5590 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5591 | + $query .= " GROUP BY spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
5592 | 5592 | ORDER BY airport_departure_icao_count DESC"; |
5593 | 5593 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5594 | - echo $query; |
|
5594 | + echo $query; |
|
5595 | 5595 | $sth = $this->db->prepare($query); |
5596 | 5596 | $sth->execute(); |
5597 | 5597 | |
@@ -5612,35 +5612,35 @@ discard block |
||
5612 | 5612 | } |
5613 | 5613 | |
5614 | 5614 | /** |
5615 | - * Gets all detected departure airports of the airplanes that have flown over |
|
5616 | - * |
|
5617 | - * @return Array the airport list |
|
5618 | - * |
|
5619 | - */ |
|
5615 | + * Gets all detected departure airports of the airplanes that have flown over |
|
5616 | + * |
|
5617 | + * @return Array the airport list |
|
5618 | + * |
|
5619 | + */ |
|
5620 | 5620 | public function countAllDetectedDepartureAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
5621 | 5621 | { |
5622 | 5622 | global $globalDBdriver; |
5623 | 5623 | $filter_query = $this->getFilter($filters,true,true); |
5624 | 5624 | $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 |
5625 | 5625 | 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 "; |
5626 | - if ($olderthanmonths > 0) { |
|
5627 | - if ($globalDBdriver == 'mysql') { |
|
5626 | + if ($olderthanmonths > 0) { |
|
5627 | + if ($globalDBdriver == 'mysql') { |
|
5628 | 5628 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
5629 | 5629 | } else { |
5630 | 5630 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
5631 | 5631 | } |
5632 | - } |
|
5633 | - if ($sincedate != '') { |
|
5634 | - if ($globalDBdriver == 'mysql') { |
|
5632 | + } |
|
5633 | + if ($sincedate != '') { |
|
5634 | + if ($globalDBdriver == 'mysql') { |
|
5635 | 5635 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
5636 | 5636 | } else { |
5637 | 5637 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP) "; |
5638 | 5638 | } |
5639 | 5639 | } |
5640 | 5640 | |
5641 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5642 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5643 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
5641 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
5642 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
5643 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_departure_airport_icao, airport.name, airport.city, airport.country |
|
5644 | 5644 | ORDER BY airport_departure_icao_count DESC"; |
5645 | 5645 | if ($limit) $query .= " LIMIT 10 OFFSET 0"; |
5646 | 5646 | |
@@ -5665,11 +5665,11 @@ discard block |
||
5665 | 5665 | } |
5666 | 5666 | |
5667 | 5667 | /** |
5668 | - * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
5669 | - * |
|
5670 | - * @return Array the airport list |
|
5671 | - * |
|
5672 | - */ |
|
5668 | + * Gets all departure airports of the airplanes that have flown over based on an airline icao |
|
5669 | + * |
|
5670 | + * @return Array the airport list |
|
5671 | + * |
|
5672 | + */ |
|
5673 | 5673 | public function countAllDepartureAirportsByAirline($airline_icao,$filters = array()) |
5674 | 5674 | { |
5675 | 5675 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5703,11 +5703,11 @@ discard block |
||
5703 | 5703 | |
5704 | 5704 | |
5705 | 5705 | /** |
5706 | - * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
5707 | - * |
|
5708 | - * @return Array the airport list |
|
5709 | - * |
|
5710 | - */ |
|
5706 | + * Gets all departure airports by country of the airplanes that have flown over based on an airline icao |
|
5707 | + * |
|
5708 | + * @return Array the airport list |
|
5709 | + * |
|
5710 | + */ |
|
5711 | 5711 | public function countAllDepartureAirportCountriesByAirline($airline_icao,$filters = array()) |
5712 | 5712 | { |
5713 | 5713 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5738,11 +5738,11 @@ discard block |
||
5738 | 5738 | |
5739 | 5739 | |
5740 | 5740 | /** |
5741 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
5742 | - * |
|
5743 | - * @return Array the airport list |
|
5744 | - * |
|
5745 | - */ |
|
5741 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft icao |
|
5742 | + * |
|
5743 | + * @return Array the airport list |
|
5744 | + * |
|
5745 | + */ |
|
5746 | 5746 | public function countAllDepartureAirportsByAircraft($aircraft_icao,$filters = array()) |
5747 | 5747 | { |
5748 | 5748 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5775,11 +5775,11 @@ discard block |
||
5775 | 5775 | |
5776 | 5776 | |
5777 | 5777 | /** |
5778 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
5779 | - * |
|
5780 | - * @return Array the airport list |
|
5781 | - * |
|
5782 | - */ |
|
5778 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
5779 | + * |
|
5780 | + * @return Array the airport list |
|
5781 | + * |
|
5782 | + */ |
|
5783 | 5783 | public function countAllDepartureAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
5784 | 5784 | { |
5785 | 5785 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5809,11 +5809,11 @@ discard block |
||
5809 | 5809 | |
5810 | 5810 | |
5811 | 5811 | /** |
5812 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
5813 | - * |
|
5814 | - * @return Array the airport list |
|
5815 | - * |
|
5816 | - */ |
|
5812 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft registration |
|
5813 | + * |
|
5814 | + * @return Array the airport list |
|
5815 | + * |
|
5816 | + */ |
|
5817 | 5817 | public function countAllDepartureAirportsByRegistration($registration,$filters = array()) |
5818 | 5818 | { |
5819 | 5819 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5846,11 +5846,11 @@ discard block |
||
5846 | 5846 | |
5847 | 5847 | |
5848 | 5848 | /** |
5849 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
5850 | - * |
|
5851 | - * @return Array the airport list |
|
5852 | - * |
|
5853 | - */ |
|
5849 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft registration |
|
5850 | + * |
|
5851 | + * @return Array the airport list |
|
5852 | + * |
|
5853 | + */ |
|
5854 | 5854 | public function countAllDepartureAirportCountriesByRegistration($registration,$filters = array()) |
5855 | 5855 | { |
5856 | 5856 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5880,11 +5880,11 @@ discard block |
||
5880 | 5880 | |
5881 | 5881 | |
5882 | 5882 | /** |
5883 | - * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
5884 | - * |
|
5885 | - * @return Array the airport list |
|
5886 | - * |
|
5887 | - */ |
|
5883 | + * Gets all departure airports of the airplanes that have flown over based on an arrivl airport icao |
|
5884 | + * |
|
5885 | + * @return Array the airport list |
|
5886 | + * |
|
5887 | + */ |
|
5888 | 5888 | public function countAllDepartureAirportsByAirport($airport_icao,$filters = array()) |
5889 | 5889 | { |
5890 | 5890 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5917,11 +5917,11 @@ discard block |
||
5917 | 5917 | |
5918 | 5918 | |
5919 | 5919 | /** |
5920 | - * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
5921 | - * |
|
5922 | - * @return Array the airport list |
|
5923 | - * |
|
5924 | - */ |
|
5920 | + * Gets all departure airports by country of the airplanes that have flown over based on an airport icao |
|
5921 | + * |
|
5922 | + * @return Array the airport list |
|
5923 | + * |
|
5924 | + */ |
|
5925 | 5925 | public function countAllDepartureAirportCountriesByAirport($airport_icao,$filters = array()) |
5926 | 5926 | { |
5927 | 5927 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5952,11 +5952,11 @@ discard block |
||
5952 | 5952 | |
5953 | 5953 | |
5954 | 5954 | /** |
5955 | - * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
5956 | - * |
|
5957 | - * @return Array the airport list |
|
5958 | - * |
|
5959 | - */ |
|
5955 | + * Gets all departure airports of the airplanes that have flown over based on an aircraft manufacturer |
|
5956 | + * |
|
5957 | + * @return Array the airport list |
|
5958 | + * |
|
5959 | + */ |
|
5960 | 5960 | public function countAllDepartureAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
5961 | 5961 | { |
5962 | 5962 | $filter_query = $this->getFilter($filters,true,true); |
@@ -5989,11 +5989,11 @@ discard block |
||
5989 | 5989 | |
5990 | 5990 | |
5991 | 5991 | /** |
5992 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
5993 | - * |
|
5994 | - * @return Array the airport list |
|
5995 | - * |
|
5996 | - */ |
|
5992 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft manufacturer |
|
5993 | + * |
|
5994 | + * @return Array the airport list |
|
5995 | + * |
|
5996 | + */ |
|
5997 | 5997 | public function countAllDepartureAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
5998 | 5998 | { |
5999 | 5999 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6023,11 +6023,11 @@ discard block |
||
6023 | 6023 | |
6024 | 6024 | |
6025 | 6025 | /** |
6026 | - * Gets all departure airports of the airplanes that have flown over based on a date |
|
6027 | - * |
|
6028 | - * @return Array the airport list |
|
6029 | - * |
|
6030 | - */ |
|
6026 | + * Gets all departure airports of the airplanes that have flown over based on a date |
|
6027 | + * |
|
6028 | + * @return Array the airport list |
|
6029 | + * |
|
6030 | + */ |
|
6031 | 6031 | public function countAllDepartureAirportsByDate($date,$filters = array()) |
6032 | 6032 | { |
6033 | 6033 | global $globalTimezone, $globalDBdriver; |
@@ -6073,11 +6073,11 @@ discard block |
||
6073 | 6073 | |
6074 | 6074 | |
6075 | 6075 | /** |
6076 | - * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
6077 | - * |
|
6078 | - * @return Array the airport list |
|
6079 | - * |
|
6080 | - */ |
|
6076 | + * Gets all departure airports by country of the airplanes that have flown over based on a date |
|
6077 | + * |
|
6078 | + * @return Array the airport list |
|
6079 | + * |
|
6080 | + */ |
|
6081 | 6081 | public function countAllDepartureAirportCountriesByDate($date,$filters = array()) |
6082 | 6082 | { |
6083 | 6083 | global $globalTimezone, $globalDBdriver; |
@@ -6120,11 +6120,11 @@ discard block |
||
6120 | 6120 | |
6121 | 6121 | |
6122 | 6122 | /** |
6123 | - * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
6124 | - * |
|
6125 | - * @return Array the airport list |
|
6126 | - * |
|
6127 | - */ |
|
6123 | + * Gets all departure airports of the airplanes that have flown over based on a ident/callsign |
|
6124 | + * |
|
6125 | + * @return Array the airport list |
|
6126 | + * |
|
6127 | + */ |
|
6128 | 6128 | public function countAllDepartureAirportsByIdent($ident,$filters = array()) |
6129 | 6129 | { |
6130 | 6130 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6158,11 +6158,11 @@ discard block |
||
6158 | 6158 | |
6159 | 6159 | |
6160 | 6160 | /** |
6161 | - * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
6162 | - * |
|
6163 | - * @return Array the airport list |
|
6164 | - * |
|
6165 | - */ |
|
6161 | + * Gets all departure airports by country of the airplanes that have flown over based on a callsign/ident |
|
6162 | + * |
|
6163 | + * @return Array the airport list |
|
6164 | + * |
|
6165 | + */ |
|
6166 | 6166 | public function countAllDepartureAirportCountriesByIdent($ident,$filters = array()) |
6167 | 6167 | { |
6168 | 6168 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6193,11 +6193,11 @@ discard block |
||
6193 | 6193 | |
6194 | 6194 | |
6195 | 6195 | /** |
6196 | - * Gets all departure airports of the airplanes that have flown over based on a country |
|
6197 | - * |
|
6198 | - * @return Array the airport list |
|
6199 | - * |
|
6200 | - */ |
|
6196 | + * Gets all departure airports of the airplanes that have flown over based on a country |
|
6197 | + * |
|
6198 | + * @return Array the airport list |
|
6199 | + * |
|
6200 | + */ |
|
6201 | 6201 | public function countAllDepartureAirportsByCountry($country,$filters = array()) |
6202 | 6202 | { |
6203 | 6203 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6231,11 +6231,11 @@ discard block |
||
6231 | 6231 | |
6232 | 6232 | |
6233 | 6233 | /** |
6234 | - * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6235 | - * |
|
6236 | - * @return Array the airport list |
|
6237 | - * |
|
6238 | - */ |
|
6234 | + * Gets all departure airports by country of the airplanes that have flown over based on an aircraft icao |
|
6235 | + * |
|
6236 | + * @return Array the airport list |
|
6237 | + * |
|
6238 | + */ |
|
6239 | 6239 | public function countAllDepartureAirportCountriesByCountry($country,$filters = array()) |
6240 | 6240 | { |
6241 | 6241 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6265,40 +6265,40 @@ discard block |
||
6265 | 6265 | |
6266 | 6266 | |
6267 | 6267 | /** |
6268 | - * Gets all arrival airports of the airplanes that have flown over |
|
6269 | - * |
|
6270 | - * @return Array the airport list |
|
6271 | - * |
|
6272 | - */ |
|
6268 | + * Gets all arrival airports of the airplanes that have flown over |
|
6269 | + * |
|
6270 | + * @return Array the airport list |
|
6271 | + * |
|
6272 | + */ |
|
6273 | 6273 | public function countAllArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
6274 | 6274 | { |
6275 | 6275 | global $globalDBdriver; |
6276 | 6276 | $filter_query = $this->getFilter($filters,true,true); |
6277 | 6277 | $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 |
6278 | 6278 | FROM spotter_output".$filter_query." spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA'"; |
6279 | - if ($olderthanmonths > 0) { |
|
6280 | - if ($globalDBdriver == 'mysql') { |
|
6279 | + if ($olderthanmonths > 0) { |
|
6280 | + if ($globalDBdriver == 'mysql') { |
|
6281 | 6281 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6282 | 6282 | } else { |
6283 | 6283 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6284 | 6284 | } |
6285 | - if ($sincedate != '') { |
|
6286 | - if ($globalDBdriver == 'mysql') { |
|
6285 | + if ($sincedate != '') { |
|
6286 | + if ($globalDBdriver == 'mysql') { |
|
6287 | 6287 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6288 | 6288 | } else { |
6289 | 6289 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6290 | 6290 | } |
6291 | 6291 | } |
6292 | - if ($globalDBdriver == 'mysql') { |
|
6292 | + if ($globalDBdriver == 'mysql') { |
|
6293 | 6293 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6294 | 6294 | } else { |
6295 | 6295 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6296 | 6296 | } |
6297 | 6297 | } |
6298 | 6298 | |
6299 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6300 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6301 | - $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
6299 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6300 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6301 | + $query .= " GROUP BY spotter_output.arrival_airport_icao, spotter_output.arrival_airport_name, spotter_output.arrival_airport_city, spotter_output.arrival_airport_country |
|
6302 | 6302 | ORDER BY airport_arrival_icao_count DESC"; |
6303 | 6303 | if ($limit) $query .= " LIMIT 10"; |
6304 | 6304 | |
@@ -6327,40 +6327,40 @@ discard block |
||
6327 | 6327 | } |
6328 | 6328 | |
6329 | 6329 | /** |
6330 | - * Gets all arrival airports of the airplanes that have flown over |
|
6331 | - * |
|
6332 | - * @return Array the airport list |
|
6333 | - * |
|
6334 | - */ |
|
6330 | + * Gets all arrival airports of the airplanes that have flown over |
|
6331 | + * |
|
6332 | + * @return Array the airport list |
|
6333 | + * |
|
6334 | + */ |
|
6335 | 6335 | public function countAllArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $icaoaskey = false,$filters = array()) |
6336 | 6336 | { |
6337 | 6337 | global $globalDBdriver; |
6338 | 6338 | $filter_query = $this->getFilter($filters,true,true); |
6339 | 6339 | $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 |
6340 | 6340 | FROM spotter_output".$filter_query." spotter_output.airline_icao <> '' AND spotter_output.arrival_airport_name <> '' AND spotter_output.arrival_airport_icao <> 'NA' "; |
6341 | - if ($olderthanmonths > 0) { |
|
6342 | - if ($globalDBdriver == 'mysql') { |
|
6341 | + if ($olderthanmonths > 0) { |
|
6342 | + if ($globalDBdriver == 'mysql') { |
|
6343 | 6343 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6344 | 6344 | } else { |
6345 | 6345 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6346 | 6346 | } |
6347 | - if ($sincedate != '') { |
|
6348 | - if ($globalDBdriver == 'mysql') { |
|
6347 | + if ($sincedate != '') { |
|
6348 | + if ($globalDBdriver == 'mysql') { |
|
6349 | 6349 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6350 | 6350 | } else { |
6351 | 6351 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6352 | 6352 | } |
6353 | 6353 | } |
6354 | - if ($globalDBdriver == 'mysql') { |
|
6354 | + if ($globalDBdriver == 'mysql') { |
|
6355 | 6355 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6356 | 6356 | } else { |
6357 | 6357 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6358 | 6358 | } |
6359 | 6359 | } |
6360 | 6360 | |
6361 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6362 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6363 | - $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 |
|
6361 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6362 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6363 | + $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 |
|
6364 | 6364 | ORDER BY airport_arrival_icao_count DESC"; |
6365 | 6365 | if ($limit) $query .= " LIMIT 10"; |
6366 | 6366 | |
@@ -6391,39 +6391,39 @@ discard block |
||
6391 | 6391 | |
6392 | 6392 | |
6393 | 6393 | /** |
6394 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
6395 | - * |
|
6396 | - * @return Array the airport list |
|
6397 | - * |
|
6398 | - */ |
|
6394 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
6395 | + * |
|
6396 | + * @return Array the airport list |
|
6397 | + * |
|
6398 | + */ |
|
6399 | 6399 | public function countAllDetectedArrivalAirports($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
6400 | 6400 | { |
6401 | 6401 | global $globalDBdriver; |
6402 | 6402 | $filter_query = $this->getFilter($filters,true,true); |
6403 | 6403 | $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 |
6404 | 6404 | FROM spotter_output, airport".$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"; |
6405 | - if ($olderthanmonths > 0) { |
|
6406 | - if ($globalDBdriver == 'mysql') { |
|
6405 | + if ($olderthanmonths > 0) { |
|
6406 | + if ($globalDBdriver == 'mysql') { |
|
6407 | 6407 | $query .= ' AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH)'; |
6408 | 6408 | } else { |
6409 | 6409 | $query .= " AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
6410 | 6410 | } |
6411 | - if ($sincedate != '') { |
|
6412 | - if ($globalDBdriver == 'mysql') { |
|
6411 | + if ($sincedate != '') { |
|
6412 | + if ($globalDBdriver == 'mysql') { |
|
6413 | 6413 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6414 | 6414 | } else { |
6415 | 6415 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6416 | 6416 | } |
6417 | 6417 | } |
6418 | - if ($globalDBdriver == 'mysql') { |
|
6418 | + if ($globalDBdriver == 'mysql') { |
|
6419 | 6419 | $query .= " AND spotter_output.date > '".$sincedate."'"; |
6420 | 6420 | } else { |
6421 | 6421 | $query .= " AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6422 | 6422 | } |
6423 | 6423 | } |
6424 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6425 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6426 | - $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
6424 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6425 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6426 | + $query .= " GROUP BY spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
6427 | 6427 | ORDER BY airport_arrival_icao_count DESC"; |
6428 | 6428 | if ($limit) $query .= " LIMIT 10"; |
6429 | 6429 | |
@@ -6452,40 +6452,40 @@ discard block |
||
6452 | 6452 | } |
6453 | 6453 | |
6454 | 6454 | /** |
6455 | - * Gets all detected arrival airports of the airplanes that have flown over |
|
6456 | - * |
|
6457 | - * @return Array the airport list |
|
6458 | - * |
|
6459 | - */ |
|
6455 | + * Gets all detected arrival airports of the airplanes that have flown over |
|
6456 | + * |
|
6457 | + * @return Array the airport list |
|
6458 | + * |
|
6459 | + */ |
|
6460 | 6460 | public function countAllDetectedArrivalAirportsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '',$icaoaskey = false,$filters = array()) |
6461 | 6461 | { |
6462 | 6462 | global $globalDBdriver; |
6463 | 6463 | $filter_query = $this->getFilter($filters,true,true); |
6464 | 6464 | $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 |
6465 | 6465 | FROM spotter_output, airport".$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 "; |
6466 | - if ($olderthanmonths > 0) { |
|
6467 | - if ($globalDBdriver == 'mysql') { |
|
6466 | + if ($olderthanmonths > 0) { |
|
6467 | + if ($globalDBdriver == 'mysql') { |
|
6468 | 6468 | $query .= 'AND spotter_output.date < DATE_SUB(UTC_TIMESTAMP(), INTERVAL '.$olderthanmonths.' MONTH) '; |
6469 | 6469 | } else { |
6470 | 6470 | $query .= "AND spotter_output.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS' "; |
6471 | 6471 | } |
6472 | - if ($sincedate != '') { |
|
6473 | - if ($globalDBdriver == 'mysql') { |
|
6472 | + if ($sincedate != '') { |
|
6473 | + if ($globalDBdriver == 'mysql') { |
|
6474 | 6474 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6475 | 6475 | } else { |
6476 | 6476 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6477 | 6477 | } |
6478 | 6478 | } |
6479 | - if ($globalDBdriver == 'mysql') { |
|
6479 | + if ($globalDBdriver == 'mysql') { |
|
6480 | 6480 | $query .= "AND spotter_output.date > '".$sincedate."' "; |
6481 | 6481 | } else { |
6482 | 6482 | $query .= "AND spotter_output.date > CAST('".$sincedate."' AS TIMESTAMP)"; |
6483 | 6483 | } |
6484 | 6484 | } |
6485 | 6485 | |
6486 | - //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6487 | - //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6488 | - $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
6486 | + //if ($olderthanmonths > 0) $query .= 'AND date < DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$olderthanmonths.' MONTH) '; |
|
6487 | + //if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
6488 | + $query .= "GROUP BY spotter_output.airline_icao, spotter_output.real_arrival_airport_icao, airport.name, airport.city, airport.country |
|
6489 | 6489 | ORDER BY airport_arrival_icao_count DESC"; |
6490 | 6490 | if ($limit) $query .= " LIMIT 10"; |
6491 | 6491 | |
@@ -6515,11 +6515,11 @@ discard block |
||
6515 | 6515 | } |
6516 | 6516 | |
6517 | 6517 | /** |
6518 | - * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
6519 | - * |
|
6520 | - * @return Array the airport list |
|
6521 | - * |
|
6522 | - */ |
|
6518 | + * Gets all arrival airports of the airplanes that have flown over based on an airline icao |
|
6519 | + * |
|
6520 | + * @return Array the airport list |
|
6521 | + * |
|
6522 | + */ |
|
6523 | 6523 | public function countAllArrivalAirportsByAirline($airline_icao, $filters = array()) |
6524 | 6524 | { |
6525 | 6525 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6551,11 +6551,11 @@ discard block |
||
6551 | 6551 | |
6552 | 6552 | |
6553 | 6553 | /** |
6554 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
6555 | - * |
|
6556 | - * @return Array the airport list |
|
6557 | - * |
|
6558 | - */ |
|
6554 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airline icao |
|
6555 | + * |
|
6556 | + * @return Array the airport list |
|
6557 | + * |
|
6558 | + */ |
|
6559 | 6559 | public function countAllArrivalAirportCountriesByAirline($airline_icao,$filters = array()) |
6560 | 6560 | { |
6561 | 6561 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6586,11 +6586,11 @@ discard block |
||
6586 | 6586 | |
6587 | 6587 | |
6588 | 6588 | /** |
6589 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
6590 | - * |
|
6591 | - * @return Array the airport list |
|
6592 | - * |
|
6593 | - */ |
|
6589 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft icao |
|
6590 | + * |
|
6591 | + * @return Array the airport list |
|
6592 | + * |
|
6593 | + */ |
|
6594 | 6594 | public function countAllArrivalAirportsByAircraft($aircraft_icao,$filters = array()) |
6595 | 6595 | { |
6596 | 6596 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6624,11 +6624,11 @@ discard block |
||
6624 | 6624 | |
6625 | 6625 | |
6626 | 6626 | /** |
6627 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
6628 | - * |
|
6629 | - * @return Array the airport list |
|
6630 | - * |
|
6631 | - */ |
|
6627 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft icao |
|
6628 | + * |
|
6629 | + * @return Array the airport list |
|
6630 | + * |
|
6631 | + */ |
|
6632 | 6632 | public function countAllArrivalAirportCountriesByAircraft($aircraft_icao,$filters = array()) |
6633 | 6633 | { |
6634 | 6634 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6658,11 +6658,11 @@ discard block |
||
6658 | 6658 | |
6659 | 6659 | |
6660 | 6660 | /** |
6661 | - * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
6662 | - * |
|
6663 | - * @return Array the airport list |
|
6664 | - * |
|
6665 | - */ |
|
6661 | + * Gets all arrival airports of the airplanes that have flown over based on an aircraft registration |
|
6662 | + * |
|
6663 | + * @return Array the airport list |
|
6664 | + * |
|
6665 | + */ |
|
6666 | 6666 | public function countAllArrivalAirportsByRegistration($registration,$filters = array()) |
6667 | 6667 | { |
6668 | 6668 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6696,11 +6696,11 @@ discard block |
||
6696 | 6696 | |
6697 | 6697 | |
6698 | 6698 | /** |
6699 | - * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
6700 | - * |
|
6701 | - * @return Array the airport list |
|
6702 | - * |
|
6703 | - */ |
|
6699 | + * Gets all arrival airports by country of the airplanes that have flown over based on an aircraft registration |
|
6700 | + * |
|
6701 | + * @return Array the airport list |
|
6702 | + * |
|
6703 | + */ |
|
6704 | 6704 | public function countAllArrivalAirportCountriesByRegistration($registration,$filters = array()) |
6705 | 6705 | { |
6706 | 6706 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6731,11 +6731,11 @@ discard block |
||
6731 | 6731 | |
6732 | 6732 | |
6733 | 6733 | /** |
6734 | - * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
6735 | - * |
|
6736 | - * @return Array the airport list |
|
6737 | - * |
|
6738 | - */ |
|
6734 | + * Gets all arrival airports of the airplanes that have flown over based on an departure airport |
|
6735 | + * |
|
6736 | + * @return Array the airport list |
|
6737 | + * |
|
6738 | + */ |
|
6739 | 6739 | public function countAllArrivalAirportsByAirport($airport_icao,$filters = array()) |
6740 | 6740 | { |
6741 | 6741 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6768,11 +6768,11 @@ discard block |
||
6768 | 6768 | |
6769 | 6769 | |
6770 | 6770 | /** |
6771 | - * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
6772 | - * |
|
6773 | - * @return Array the airport list |
|
6774 | - * |
|
6775 | - */ |
|
6771 | + * Gets all arrival airports by country of the airplanes that have flown over based on an airport icao |
|
6772 | + * |
|
6773 | + * @return Array the airport list |
|
6774 | + * |
|
6775 | + */ |
|
6776 | 6776 | public function countAllArrivalAirportCountriesByAirport($airport_icao,$filters = array()) |
6777 | 6777 | { |
6778 | 6778 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6802,11 +6802,11 @@ discard block |
||
6802 | 6802 | |
6803 | 6803 | |
6804 | 6804 | /** |
6805 | - * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
6806 | - * |
|
6807 | - * @return Array the airport list |
|
6808 | - * |
|
6809 | - */ |
|
6805 | + * Gets all arrival airports of the airplanes that have flown over based on a aircraft manufacturer |
|
6806 | + * |
|
6807 | + * @return Array the airport list |
|
6808 | + * |
|
6809 | + */ |
|
6810 | 6810 | public function countAllArrivalAirportsByManufacturer($aircraft_manufacturer,$filters = array()) |
6811 | 6811 | { |
6812 | 6812 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6840,11 +6840,11 @@ discard block |
||
6840 | 6840 | |
6841 | 6841 | |
6842 | 6842 | /** |
6843 | - * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
6844 | - * |
|
6845 | - * @return Array the airport list |
|
6846 | - * |
|
6847 | - */ |
|
6843 | + * Gets all arrival airports by country of the airplanes that have flown over based on a aircraft manufacturer |
|
6844 | + * |
|
6845 | + * @return Array the airport list |
|
6846 | + * |
|
6847 | + */ |
|
6848 | 6848 | public function countAllArrivalAirportCountriesByManufacturer($aircraft_manufacturer,$filters = array()) |
6849 | 6849 | { |
6850 | 6850 | $filter_query = $this->getFilter($filters,true,true); |
@@ -6875,11 +6875,11 @@ discard block |
||
6875 | 6875 | |
6876 | 6876 | |
6877 | 6877 | /** |
6878 | - * Gets all arrival airports of the airplanes that have flown over based on a date |
|
6879 | - * |
|
6880 | - * @return Array the airport list |
|
6881 | - * |
|
6882 | - */ |
|
6878 | + * Gets all arrival airports of the airplanes that have flown over based on a date |
|
6879 | + * |
|
6880 | + * @return Array the airport list |
|
6881 | + * |
|
6882 | + */ |
|
6883 | 6883 | public function countAllArrivalAirportsByDate($date,$filters = array()) |
6884 | 6884 | { |
6885 | 6885 | global $globalTimezone, $globalDBdriver; |
@@ -6925,11 +6925,11 @@ discard block |
||
6925 | 6925 | |
6926 | 6926 | |
6927 | 6927 | /** |
6928 | - * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
6929 | - * |
|
6930 | - * @return Array the airport list |
|
6931 | - * |
|
6932 | - */ |
|
6928 | + * Gets all arrival airports by country of the airplanes that have flown over based on a date |
|
6929 | + * |
|
6930 | + * @return Array the airport list |
|
6931 | + * |
|
6932 | + */ |
|
6933 | 6933 | public function countAllArrivalAirportCountriesByDate($date, $filters = array()) |
6934 | 6934 | { |
6935 | 6935 | global $globalTimezone, $globalDBdriver; |
@@ -6972,11 +6972,11 @@ discard block |
||
6972 | 6972 | |
6973 | 6973 | |
6974 | 6974 | /** |
6975 | - * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
6976 | - * |
|
6977 | - * @return Array the airport list |
|
6978 | - * |
|
6979 | - */ |
|
6975 | + * Gets all arrival airports of the airplanes that have flown over based on a ident/callsign |
|
6976 | + * |
|
6977 | + * @return Array the airport list |
|
6978 | + * |
|
6979 | + */ |
|
6980 | 6980 | public function countAllArrivalAirportsByIdent($ident,$filters = array()) |
6981 | 6981 | { |
6982 | 6982 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7009,11 +7009,11 @@ discard block |
||
7009 | 7009 | |
7010 | 7010 | |
7011 | 7011 | /** |
7012 | - * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
7013 | - * |
|
7014 | - * @return Array the airport list |
|
7015 | - * |
|
7016 | - */ |
|
7012 | + * Gets all arrival airports by country of the airplanes that have flown over based on a callsign/ident |
|
7013 | + * |
|
7014 | + * @return Array the airport list |
|
7015 | + * |
|
7016 | + */ |
|
7017 | 7017 | public function countAllArrivalAirportCountriesByIdent($ident, $filters = array()) |
7018 | 7018 | { |
7019 | 7019 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7044,11 +7044,11 @@ discard block |
||
7044 | 7044 | |
7045 | 7045 | |
7046 | 7046 | /** |
7047 | - * Gets all arrival airports of the airplanes that have flown over based on a country |
|
7048 | - * |
|
7049 | - * @return Array the airport list |
|
7050 | - * |
|
7051 | - */ |
|
7047 | + * Gets all arrival airports of the airplanes that have flown over based on a country |
|
7048 | + * |
|
7049 | + * @return Array the airport list |
|
7050 | + * |
|
7051 | + */ |
|
7052 | 7052 | public function countAllArrivalAirportsByCountry($country,$filters = array()) |
7053 | 7053 | { |
7054 | 7054 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7081,11 +7081,11 @@ discard block |
||
7081 | 7081 | |
7082 | 7082 | |
7083 | 7083 | /** |
7084 | - * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
7085 | - * |
|
7086 | - * @return Array the airport list |
|
7087 | - * |
|
7088 | - */ |
|
7084 | + * Gets all arrival airports by country of the airplanes that have flown over based on a country |
|
7085 | + * |
|
7086 | + * @return Array the airport list |
|
7087 | + * |
|
7088 | + */ |
|
7089 | 7089 | public function countAllArrivalAirportCountriesByCountry($country,$filters = array()) |
7090 | 7090 | { |
7091 | 7091 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7116,11 +7116,11 @@ discard block |
||
7116 | 7116 | |
7117 | 7117 | |
7118 | 7118 | /** |
7119 | - * Counts all airport departure countries |
|
7120 | - * |
|
7121 | - * @return Array the airport departure list |
|
7122 | - * |
|
7123 | - */ |
|
7119 | + * Counts all airport departure countries |
|
7120 | + * |
|
7121 | + * @return Array the airport departure list |
|
7122 | + * |
|
7123 | + */ |
|
7124 | 7124 | public function countAllDepartureCountries($filters = array()) |
7125 | 7125 | { |
7126 | 7126 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7150,11 +7150,11 @@ discard block |
||
7150 | 7150 | |
7151 | 7151 | |
7152 | 7152 | /** |
7153 | - * Counts all airport arrival countries |
|
7154 | - * |
|
7155 | - * @return Array the airport arrival list |
|
7156 | - * |
|
7157 | - */ |
|
7153 | + * Counts all airport arrival countries |
|
7154 | + * |
|
7155 | + * @return Array the airport arrival list |
|
7156 | + * |
|
7157 | + */ |
|
7158 | 7158 | public function countAllArrivalCountries($limit = true,$filters = array()) |
7159 | 7159 | { |
7160 | 7160 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7187,11 +7187,11 @@ discard block |
||
7187 | 7187 | |
7188 | 7188 | |
7189 | 7189 | /** |
7190 | - * Gets all route combinations |
|
7191 | - * |
|
7192 | - * @return Array the route list |
|
7193 | - * |
|
7194 | - */ |
|
7190 | + * Gets all route combinations |
|
7191 | + * |
|
7192 | + * @return Array the route list |
|
7193 | + * |
|
7194 | + */ |
|
7195 | 7195 | public function countAllRoutes($filters = array()) |
7196 | 7196 | { |
7197 | 7197 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7230,11 +7230,11 @@ discard block |
||
7230 | 7230 | |
7231 | 7231 | |
7232 | 7232 | /** |
7233 | - * Gets all route combinations based on an aircraft |
|
7234 | - * |
|
7235 | - * @return Array the route list |
|
7236 | - * |
|
7237 | - */ |
|
7233 | + * Gets all route combinations based on an aircraft |
|
7234 | + * |
|
7235 | + * @return Array the route list |
|
7236 | + * |
|
7237 | + */ |
|
7238 | 7238 | public function countAllRoutesByAircraft($aircraft_icao,$filters = array()) |
7239 | 7239 | { |
7240 | 7240 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7270,11 +7270,11 @@ discard block |
||
7270 | 7270 | |
7271 | 7271 | |
7272 | 7272 | /** |
7273 | - * Gets all route combinations based on an aircraft registration |
|
7274 | - * |
|
7275 | - * @return Array the route list |
|
7276 | - * |
|
7277 | - */ |
|
7273 | + * Gets all route combinations based on an aircraft registration |
|
7274 | + * |
|
7275 | + * @return Array the route list |
|
7276 | + * |
|
7277 | + */ |
|
7278 | 7278 | public function countAllRoutesByRegistration($registration, $filters = array()) |
7279 | 7279 | { |
7280 | 7280 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7312,11 +7312,11 @@ discard block |
||
7312 | 7312 | |
7313 | 7313 | |
7314 | 7314 | /** |
7315 | - * Gets all route combinations based on an airline |
|
7316 | - * |
|
7317 | - * @return Array the route list |
|
7318 | - * |
|
7319 | - */ |
|
7315 | + * Gets all route combinations based on an airline |
|
7316 | + * |
|
7317 | + * @return Array the route list |
|
7318 | + * |
|
7319 | + */ |
|
7320 | 7320 | public function countAllRoutesByAirline($airline_icao, $filters = array()) |
7321 | 7321 | { |
7322 | 7322 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7354,11 +7354,11 @@ discard block |
||
7354 | 7354 | |
7355 | 7355 | |
7356 | 7356 | /** |
7357 | - * Gets all route combinations based on an airport |
|
7358 | - * |
|
7359 | - * @return Array the route list |
|
7360 | - * |
|
7361 | - */ |
|
7357 | + * Gets all route combinations based on an airport |
|
7358 | + * |
|
7359 | + * @return Array the route list |
|
7360 | + * |
|
7361 | + */ |
|
7362 | 7362 | public function countAllRoutesByAirport($airport_icao, $filters = array()) |
7363 | 7363 | { |
7364 | 7364 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7395,11 +7395,11 @@ discard block |
||
7395 | 7395 | |
7396 | 7396 | |
7397 | 7397 | /** |
7398 | - * Gets all route combinations based on an country |
|
7399 | - * |
|
7400 | - * @return Array the route list |
|
7401 | - * |
|
7402 | - */ |
|
7398 | + * Gets all route combinations based on an country |
|
7399 | + * |
|
7400 | + * @return Array the route list |
|
7401 | + * |
|
7402 | + */ |
|
7403 | 7403 | public function countAllRoutesByCountry($country, $filters = array()) |
7404 | 7404 | { |
7405 | 7405 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7435,11 +7435,11 @@ discard block |
||
7435 | 7435 | |
7436 | 7436 | |
7437 | 7437 | /** |
7438 | - * Gets all route combinations based on an date |
|
7439 | - * |
|
7440 | - * @return Array the route list |
|
7441 | - * |
|
7442 | - */ |
|
7438 | + * Gets all route combinations based on an date |
|
7439 | + * |
|
7440 | + * @return Array the route list |
|
7441 | + * |
|
7442 | + */ |
|
7443 | 7443 | public function countAllRoutesByDate($date, $filters = array()) |
7444 | 7444 | { |
7445 | 7445 | global $globalTimezone, $globalDBdriver; |
@@ -7489,11 +7489,11 @@ discard block |
||
7489 | 7489 | |
7490 | 7490 | |
7491 | 7491 | /** |
7492 | - * Gets all route combinations based on an ident/callsign |
|
7493 | - * |
|
7494 | - * @return Array the route list |
|
7495 | - * |
|
7496 | - */ |
|
7492 | + * Gets all route combinations based on an ident/callsign |
|
7493 | + * |
|
7494 | + * @return Array the route list |
|
7495 | + * |
|
7496 | + */ |
|
7497 | 7497 | public function countAllRoutesByIdent($ident, $filters = array()) |
7498 | 7498 | { |
7499 | 7499 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7530,11 +7530,11 @@ discard block |
||
7530 | 7530 | |
7531 | 7531 | |
7532 | 7532 | /** |
7533 | - * Gets all route combinations based on an manufacturer |
|
7534 | - * |
|
7535 | - * @return Array the route list |
|
7536 | - * |
|
7537 | - */ |
|
7533 | + * Gets all route combinations based on an manufacturer |
|
7534 | + * |
|
7535 | + * @return Array the route list |
|
7536 | + * |
|
7537 | + */ |
|
7538 | 7538 | public function countAllRoutesByManufacturer($aircraft_manufacturer, $filters = array()) |
7539 | 7539 | { |
7540 | 7540 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7572,11 +7572,11 @@ discard block |
||
7572 | 7572 | |
7573 | 7573 | |
7574 | 7574 | /** |
7575 | - * Gets all route combinations with waypoints |
|
7576 | - * |
|
7577 | - * @return Array the route list |
|
7578 | - * |
|
7579 | - */ |
|
7575 | + * Gets all route combinations with waypoints |
|
7576 | + * |
|
7577 | + * @return Array the route list |
|
7578 | + * |
|
7579 | + */ |
|
7580 | 7580 | public function countAllRoutesWithWaypoints($filters = array()) |
7581 | 7581 | { |
7582 | 7582 | $filter_query = $this->getFilter($filters,true,true); |
@@ -7613,11 +7613,11 @@ discard block |
||
7613 | 7613 | } |
7614 | 7614 | |
7615 | 7615 | /** |
7616 | - * Gets all callsigns that have flown over |
|
7617 | - * |
|
7618 | - * @return Array the callsign list |
|
7619 | - * |
|
7620 | - */ |
|
7616 | + * Gets all callsigns that have flown over |
|
7617 | + * |
|
7618 | + * @return Array the callsign list |
|
7619 | + * |
|
7620 | + */ |
|
7621 | 7621 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array()) |
7622 | 7622 | { |
7623 | 7623 | global $globalDBdriver; |
@@ -7655,11 +7655,11 @@ discard block |
||
7655 | 7655 | } |
7656 | 7656 | |
7657 | 7657 | /** |
7658 | - * Gets all callsigns that have flown over |
|
7659 | - * |
|
7660 | - * @return Array the callsign list |
|
7661 | - * |
|
7662 | - */ |
|
7658 | + * Gets all callsigns that have flown over |
|
7659 | + * |
|
7660 | + * @return Array the callsign list |
|
7661 | + * |
|
7662 | + */ |
|
7663 | 7663 | public function countAllCallsignsByAirlines($limit = true, $olderthanmonths = 0, $sincedate = '', $filters = array()) |
7664 | 7664 | { |
7665 | 7665 | global $globalDBdriver; |
@@ -7700,11 +7700,11 @@ discard block |
||
7700 | 7700 | |
7701 | 7701 | |
7702 | 7702 | /** |
7703 | - * Counts all dates |
|
7704 | - * |
|
7705 | - * @return Array the date list |
|
7706 | - * |
|
7707 | - */ |
|
7703 | + * Counts all dates |
|
7704 | + * |
|
7705 | + * @return Array the date list |
|
7706 | + * |
|
7707 | + */ |
|
7708 | 7708 | public function countAllDates($filters = array()) |
7709 | 7709 | { |
7710 | 7710 | global $globalTimezone, $globalDBdriver; |
@@ -7749,11 +7749,11 @@ discard block |
||
7749 | 7749 | } |
7750 | 7750 | |
7751 | 7751 | /** |
7752 | - * Counts all dates |
|
7753 | - * |
|
7754 | - * @return Array the date list |
|
7755 | - * |
|
7756 | - */ |
|
7752 | + * Counts all dates |
|
7753 | + * |
|
7754 | + * @return Array the date list |
|
7755 | + * |
|
7756 | + */ |
|
7757 | 7757 | public function countAllDatesByAirlines($filters = array()) |
7758 | 7758 | { |
7759 | 7759 | global $globalTimezone, $globalDBdriver; |
@@ -7798,11 +7798,11 @@ discard block |
||
7798 | 7798 | } |
7799 | 7799 | |
7800 | 7800 | /** |
7801 | - * Counts all dates during the last 7 days |
|
7802 | - * |
|
7803 | - * @return Array the date list |
|
7804 | - * |
|
7805 | - */ |
|
7801 | + * Counts all dates during the last 7 days |
|
7802 | + * |
|
7803 | + * @return Array the date list |
|
7804 | + * |
|
7805 | + */ |
|
7806 | 7806 | public function countAllDatesLast7Days($filters = array()) |
7807 | 7807 | { |
7808 | 7808 | global $globalTimezone, $globalDBdriver; |
@@ -7824,7 +7824,7 @@ discard block |
||
7824 | 7824 | $query .= " GROUP BY date_name |
7825 | 7825 | ORDER BY date_name ASC"; |
7826 | 7826 | $query_data = array(':offset' => $offset); |
7827 | - } |
|
7827 | + } |
|
7828 | 7828 | |
7829 | 7829 | $sth = $this->db->prepare($query); |
7830 | 7830 | $sth->execute($query_data); |
@@ -7844,11 +7844,11 @@ discard block |
||
7844 | 7844 | } |
7845 | 7845 | |
7846 | 7846 | /** |
7847 | - * Counts all dates during the last month |
|
7848 | - * |
|
7849 | - * @return Array the date list |
|
7850 | - * |
|
7851 | - */ |
|
7847 | + * Counts all dates during the last month |
|
7848 | + * |
|
7849 | + * @return Array the date list |
|
7850 | + * |
|
7851 | + */ |
|
7852 | 7852 | public function countAllDatesLastMonth($filters = array()) |
7853 | 7853 | { |
7854 | 7854 | global $globalTimezone, $globalDBdriver; |
@@ -7870,7 +7870,7 @@ discard block |
||
7870 | 7870 | $query .= " GROUP BY date_name |
7871 | 7871 | ORDER BY date_name ASC"; |
7872 | 7872 | $query_data = array(':offset' => $offset); |
7873 | - } |
|
7873 | + } |
|
7874 | 7874 | |
7875 | 7875 | $sth = $this->db->prepare($query); |
7876 | 7876 | $sth->execute($query_data); |
@@ -7891,11 +7891,11 @@ discard block |
||
7891 | 7891 | |
7892 | 7892 | |
7893 | 7893 | /** |
7894 | - * Counts all dates during the last month |
|
7895 | - * |
|
7896 | - * @return Array the date list |
|
7897 | - * |
|
7898 | - */ |
|
7894 | + * Counts all dates during the last month |
|
7895 | + * |
|
7896 | + * @return Array the date list |
|
7897 | + * |
|
7898 | + */ |
|
7899 | 7899 | public function countAllDatesLastMonthByAirlines($filters = array()) |
7900 | 7900 | { |
7901 | 7901 | global $globalTimezone, $globalDBdriver; |
@@ -7918,7 +7918,7 @@ discard block |
||
7918 | 7918 | GROUP BY spotter_output.airline_icao, date_name |
7919 | 7919 | ORDER BY date_name ASC"; |
7920 | 7920 | $query_data = array(':offset' => $offset); |
7921 | - } |
|
7921 | + } |
|
7922 | 7922 | |
7923 | 7923 | $sth = $this->db->prepare($query); |
7924 | 7924 | $sth->execute($query_data); |
@@ -7940,11 +7940,11 @@ discard block |
||
7940 | 7940 | |
7941 | 7941 | |
7942 | 7942 | /** |
7943 | - * Counts all month |
|
7944 | - * |
|
7945 | - * @return Array the month list |
|
7946 | - * |
|
7947 | - */ |
|
7943 | + * Counts all month |
|
7944 | + * |
|
7945 | + * @return Array the month list |
|
7946 | + * |
|
7947 | + */ |
|
7948 | 7948 | public function countAllMonths($filters = array()) |
7949 | 7949 | { |
7950 | 7950 | global $globalTimezone, $globalDBdriver; |
@@ -7986,11 +7986,11 @@ discard block |
||
7986 | 7986 | } |
7987 | 7987 | |
7988 | 7988 | /** |
7989 | - * Counts all month |
|
7990 | - * |
|
7991 | - * @return Array the month list |
|
7992 | - * |
|
7993 | - */ |
|
7989 | + * Counts all month |
|
7990 | + * |
|
7991 | + * @return Array the month list |
|
7992 | + * |
|
7993 | + */ |
|
7994 | 7994 | public function countAllMonthsByAirlines($filters = array()) |
7995 | 7995 | { |
7996 | 7996 | global $globalTimezone, $globalDBdriver; |
@@ -8035,11 +8035,11 @@ discard block |
||
8035 | 8035 | } |
8036 | 8036 | |
8037 | 8037 | /** |
8038 | - * Counts all military month |
|
8039 | - * |
|
8040 | - * @return Array the month list |
|
8041 | - * |
|
8042 | - */ |
|
8038 | + * Counts all military month |
|
8039 | + * |
|
8040 | + * @return Array the month list |
|
8041 | + * |
|
8042 | + */ |
|
8043 | 8043 | public function countAllMilitaryMonths($filters = array()) |
8044 | 8044 | { |
8045 | 8045 | global $globalTimezone, $globalDBdriver; |
@@ -8080,11 +8080,11 @@ discard block |
||
8080 | 8080 | } |
8081 | 8081 | |
8082 | 8082 | /** |
8083 | - * Counts all month owners |
|
8084 | - * |
|
8085 | - * @return Array the month list |
|
8086 | - * |
|
8087 | - */ |
|
8083 | + * Counts all month owners |
|
8084 | + * |
|
8085 | + * @return Array the month list |
|
8086 | + * |
|
8087 | + */ |
|
8088 | 8088 | public function countAllMonthsOwners($filters = array()) |
8089 | 8089 | { |
8090 | 8090 | global $globalTimezone, $globalDBdriver; |
@@ -8126,11 +8126,11 @@ discard block |
||
8126 | 8126 | } |
8127 | 8127 | |
8128 | 8128 | /** |
8129 | - * Counts all month owners |
|
8130 | - * |
|
8131 | - * @return Array the month list |
|
8132 | - * |
|
8133 | - */ |
|
8129 | + * Counts all month owners |
|
8130 | + * |
|
8131 | + * @return Array the month list |
|
8132 | + * |
|
8133 | + */ |
|
8134 | 8134 | public function countAllMonthsOwnersByAirlines($filters = array()) |
8135 | 8135 | { |
8136 | 8136 | global $globalTimezone, $globalDBdriver; |
@@ -8173,11 +8173,11 @@ discard block |
||
8173 | 8173 | } |
8174 | 8174 | |
8175 | 8175 | /** |
8176 | - * Counts all month pilot |
|
8177 | - * |
|
8178 | - * @return Array the month list |
|
8179 | - * |
|
8180 | - */ |
|
8176 | + * Counts all month pilot |
|
8177 | + * |
|
8178 | + * @return Array the month list |
|
8179 | + * |
|
8180 | + */ |
|
8181 | 8181 | public function countAllMonthsPilots($filters = array()) |
8182 | 8182 | { |
8183 | 8183 | global $globalTimezone, $globalDBdriver; |
@@ -8219,11 +8219,11 @@ discard block |
||
8219 | 8219 | } |
8220 | 8220 | |
8221 | 8221 | /** |
8222 | - * Counts all month pilot |
|
8223 | - * |
|
8224 | - * @return Array the month list |
|
8225 | - * |
|
8226 | - */ |
|
8222 | + * Counts all month pilot |
|
8223 | + * |
|
8224 | + * @return Array the month list |
|
8225 | + * |
|
8226 | + */ |
|
8227 | 8227 | public function countAllMonthsPilotsByAirlines($filters = array()) |
8228 | 8228 | { |
8229 | 8229 | global $globalTimezone, $globalDBdriver; |
@@ -8266,11 +8266,11 @@ discard block |
||
8266 | 8266 | } |
8267 | 8267 | |
8268 | 8268 | /** |
8269 | - * Counts all month airline |
|
8270 | - * |
|
8271 | - * @return Array the month list |
|
8272 | - * |
|
8273 | - */ |
|
8269 | + * Counts all month airline |
|
8270 | + * |
|
8271 | + * @return Array the month list |
|
8272 | + * |
|
8273 | + */ |
|
8274 | 8274 | public function countAllMonthsAirlines($filters = array()) |
8275 | 8275 | { |
8276 | 8276 | global $globalTimezone, $globalDBdriver; |
@@ -8312,11 +8312,11 @@ discard block |
||
8312 | 8312 | } |
8313 | 8313 | |
8314 | 8314 | /** |
8315 | - * Counts all month aircraft |
|
8316 | - * |
|
8317 | - * @return Array the month list |
|
8318 | - * |
|
8319 | - */ |
|
8315 | + * Counts all month aircraft |
|
8316 | + * |
|
8317 | + * @return Array the month list |
|
8318 | + * |
|
8319 | + */ |
|
8320 | 8320 | public function countAllMonthsAircrafts($filters = array()) |
8321 | 8321 | { |
8322 | 8322 | global $globalTimezone, $globalDBdriver; |
@@ -8359,11 +8359,11 @@ discard block |
||
8359 | 8359 | |
8360 | 8360 | |
8361 | 8361 | /** |
8362 | - * Counts all month aircraft |
|
8363 | - * |
|
8364 | - * @return Array the month list |
|
8365 | - * |
|
8366 | - */ |
|
8362 | + * Counts all month aircraft |
|
8363 | + * |
|
8364 | + * @return Array the month list |
|
8365 | + * |
|
8366 | + */ |
|
8367 | 8367 | public function countAllMonthsAircraftsByAirlines($filters = array()) |
8368 | 8368 | { |
8369 | 8369 | global $globalTimezone, $globalDBdriver; |
@@ -8406,11 +8406,11 @@ discard block |
||
8406 | 8406 | } |
8407 | 8407 | |
8408 | 8408 | /** |
8409 | - * Counts all month real arrival |
|
8410 | - * |
|
8411 | - * @return Array the month list |
|
8412 | - * |
|
8413 | - */ |
|
8409 | + * Counts all month real arrival |
|
8410 | + * |
|
8411 | + * @return Array the month list |
|
8412 | + * |
|
8413 | + */ |
|
8414 | 8414 | public function countAllMonthsRealArrivals($filters = array()) |
8415 | 8415 | { |
8416 | 8416 | global $globalTimezone, $globalDBdriver; |
@@ -8453,11 +8453,11 @@ discard block |
||
8453 | 8453 | |
8454 | 8454 | |
8455 | 8455 | /** |
8456 | - * Counts all month real arrival |
|
8457 | - * |
|
8458 | - * @return Array the month list |
|
8459 | - * |
|
8460 | - */ |
|
8456 | + * Counts all month real arrival |
|
8457 | + * |
|
8458 | + * @return Array the month list |
|
8459 | + * |
|
8460 | + */ |
|
8461 | 8461 | public function countAllMonthsRealArrivalsByAirlines($filters = array()) |
8462 | 8462 | { |
8463 | 8463 | global $globalTimezone, $globalDBdriver; |
@@ -8501,11 +8501,11 @@ discard block |
||
8501 | 8501 | |
8502 | 8502 | |
8503 | 8503 | /** |
8504 | - * Counts all dates during the last year |
|
8505 | - * |
|
8506 | - * @return Array the date list |
|
8507 | - * |
|
8508 | - */ |
|
8504 | + * Counts all dates during the last year |
|
8505 | + * |
|
8506 | + * @return Array the date list |
|
8507 | + * |
|
8508 | + */ |
|
8509 | 8509 | public function countAllMonthsLastYear($filters) |
8510 | 8510 | { |
8511 | 8511 | global $globalTimezone, $globalDBdriver; |
@@ -8527,7 +8527,7 @@ discard block |
||
8527 | 8527 | $query .= " GROUP BY year_name, month_name |
8528 | 8528 | ORDER BY year_name, month_name ASC"; |
8529 | 8529 | $query_data = array(':offset' => $offset); |
8530 | - } |
|
8530 | + } |
|
8531 | 8531 | |
8532 | 8532 | $sth = $this->db->prepare($query); |
8533 | 8533 | $sth->execute($query_data); |
@@ -8550,11 +8550,11 @@ discard block |
||
8550 | 8550 | |
8551 | 8551 | |
8552 | 8552 | /** |
8553 | - * Counts all hours |
|
8554 | - * |
|
8555 | - * @return Array the hour list |
|
8556 | - * |
|
8557 | - */ |
|
8553 | + * Counts all hours |
|
8554 | + * |
|
8555 | + * @return Array the hour list |
|
8556 | + * |
|
8557 | + */ |
|
8558 | 8558 | public function countAllHours($orderby,$filters = array()) |
8559 | 8559 | { |
8560 | 8560 | global $globalTimezone, $globalDBdriver; |
@@ -8615,11 +8615,11 @@ discard block |
||
8615 | 8615 | } |
8616 | 8616 | |
8617 | 8617 | /** |
8618 | - * Counts all hours |
|
8619 | - * |
|
8620 | - * @return Array the hour list |
|
8621 | - * |
|
8622 | - */ |
|
8618 | + * Counts all hours |
|
8619 | + * |
|
8620 | + * @return Array the hour list |
|
8621 | + * |
|
8622 | + */ |
|
8623 | 8623 | public function countAllHoursByAirlines($orderby, $filters = array()) |
8624 | 8624 | { |
8625 | 8625 | global $globalTimezone, $globalDBdriver; |
@@ -8682,11 +8682,11 @@ discard block |
||
8682 | 8682 | |
8683 | 8683 | |
8684 | 8684 | /** |
8685 | - * Counts all hours by airline |
|
8686 | - * |
|
8687 | - * @return Array the hour list |
|
8688 | - * |
|
8689 | - */ |
|
8685 | + * Counts all hours by airline |
|
8686 | + * |
|
8687 | + * @return Array the hour list |
|
8688 | + * |
|
8689 | + */ |
|
8690 | 8690 | public function countAllHoursByAirline($airline_icao, $filters = array()) |
8691 | 8691 | { |
8692 | 8692 | global $globalTimezone, $globalDBdriver; |
@@ -8732,11 +8732,11 @@ discard block |
||
8732 | 8732 | |
8733 | 8733 | |
8734 | 8734 | /** |
8735 | - * Counts all hours by aircraft |
|
8736 | - * |
|
8737 | - * @return Array the hour list |
|
8738 | - * |
|
8739 | - */ |
|
8735 | + * Counts all hours by aircraft |
|
8736 | + * |
|
8737 | + * @return Array the hour list |
|
8738 | + * |
|
8739 | + */ |
|
8740 | 8740 | public function countAllHoursByAircraft($aircraft_icao, $filters = array()) |
8741 | 8741 | { |
8742 | 8742 | global $globalTimezone, $globalDBdriver; |
@@ -8779,11 +8779,11 @@ discard block |
||
8779 | 8779 | |
8780 | 8780 | |
8781 | 8781 | /** |
8782 | - * Counts all hours by aircraft registration |
|
8783 | - * |
|
8784 | - * @return Array the hour list |
|
8785 | - * |
|
8786 | - */ |
|
8782 | + * Counts all hours by aircraft registration |
|
8783 | + * |
|
8784 | + * @return Array the hour list |
|
8785 | + * |
|
8786 | + */ |
|
8787 | 8787 | public function countAllHoursByRegistration($registration, $filters = array()) |
8788 | 8788 | { |
8789 | 8789 | global $globalTimezone, $globalDBdriver; |
@@ -8826,11 +8826,11 @@ discard block |
||
8826 | 8826 | |
8827 | 8827 | |
8828 | 8828 | /** |
8829 | - * Counts all hours by airport |
|
8830 | - * |
|
8831 | - * @return Array the hour list |
|
8832 | - * |
|
8833 | - */ |
|
8829 | + * Counts all hours by airport |
|
8830 | + * |
|
8831 | + * @return Array the hour list |
|
8832 | + * |
|
8833 | + */ |
|
8834 | 8834 | public function countAllHoursByAirport($airport_icao, $filters = array()) |
8835 | 8835 | { |
8836 | 8836 | global $globalTimezone, $globalDBdriver; |
@@ -8874,11 +8874,11 @@ discard block |
||
8874 | 8874 | |
8875 | 8875 | |
8876 | 8876 | /** |
8877 | - * Counts all hours by manufacturer |
|
8878 | - * |
|
8879 | - * @return Array the hour list |
|
8880 | - * |
|
8881 | - */ |
|
8877 | + * Counts all hours by manufacturer |
|
8878 | + * |
|
8879 | + * @return Array the hour list |
|
8880 | + * |
|
8881 | + */ |
|
8882 | 8882 | public function countAllHoursByManufacturer($aircraft_manufacturer,$filters =array()) |
8883 | 8883 | { |
8884 | 8884 | global $globalTimezone, $globalDBdriver; |
@@ -8922,11 +8922,11 @@ discard block |
||
8922 | 8922 | |
8923 | 8923 | |
8924 | 8924 | /** |
8925 | - * Counts all hours by date |
|
8926 | - * |
|
8927 | - * @return Array the hour list |
|
8928 | - * |
|
8929 | - */ |
|
8925 | + * Counts all hours by date |
|
8926 | + * |
|
8927 | + * @return Array the hour list |
|
8928 | + * |
|
8929 | + */ |
|
8930 | 8930 | public function countAllHoursByDate($date, $filters = array()) |
8931 | 8931 | { |
8932 | 8932 | global $globalTimezone, $globalDBdriver; |
@@ -8970,11 +8970,11 @@ discard block |
||
8970 | 8970 | |
8971 | 8971 | |
8972 | 8972 | /** |
8973 | - * Counts all hours by a ident/callsign |
|
8974 | - * |
|
8975 | - * @return Array the hour list |
|
8976 | - * |
|
8977 | - */ |
|
8973 | + * Counts all hours by a ident/callsign |
|
8974 | + * |
|
8975 | + * @return Array the hour list |
|
8976 | + * |
|
8977 | + */ |
|
8978 | 8978 | public function countAllHoursByIdent($ident, $filters = array()) |
8979 | 8979 | { |
8980 | 8980 | global $globalTimezone, $globalDBdriver; |
@@ -9019,11 +9019,11 @@ discard block |
||
9019 | 9019 | |
9020 | 9020 | |
9021 | 9021 | /** |
9022 | - * Counts all hours by route |
|
9023 | - * |
|
9024 | - * @return Array the hour list |
|
9025 | - * |
|
9026 | - */ |
|
9022 | + * Counts all hours by route |
|
9023 | + * |
|
9024 | + * @return Array the hour list |
|
9025 | + * |
|
9026 | + */ |
|
9027 | 9027 | public function countAllHoursByRoute($departure_airport_icao, $arrival_airport_icao, $filters =array()) |
9028 | 9028 | { |
9029 | 9029 | global $globalTimezone, $globalDBdriver; |
@@ -9067,11 +9067,11 @@ discard block |
||
9067 | 9067 | |
9068 | 9068 | |
9069 | 9069 | /** |
9070 | - * Counts all hours by country |
|
9071 | - * |
|
9072 | - * @return Array the hour list |
|
9073 | - * |
|
9074 | - */ |
|
9070 | + * Counts all hours by country |
|
9071 | + * |
|
9072 | + * @return Array the hour list |
|
9073 | + * |
|
9074 | + */ |
|
9075 | 9075 | public function countAllHoursByCountry($country, $filters = array()) |
9076 | 9076 | { |
9077 | 9077 | global $globalTimezone, $globalDBdriver; |
@@ -9116,11 +9116,11 @@ discard block |
||
9116 | 9116 | |
9117 | 9117 | |
9118 | 9118 | /** |
9119 | - * Counts all aircraft that have flown over |
|
9120 | - * |
|
9121 | - * @return Integer the number of aircrafts |
|
9122 | - * |
|
9123 | - */ |
|
9119 | + * Counts all aircraft that have flown over |
|
9120 | + * |
|
9121 | + * @return Integer the number of aircrafts |
|
9122 | + * |
|
9123 | + */ |
|
9124 | 9124 | public function countOverallAircrafts($filters = array()) |
9125 | 9125 | { |
9126 | 9126 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9132,11 +9132,11 @@ discard block |
||
9132 | 9132 | } |
9133 | 9133 | |
9134 | 9134 | /** |
9135 | - * Counts all flight that really arrival |
|
9136 | - * |
|
9137 | - * @return Integer the number of aircrafts |
|
9138 | - * |
|
9139 | - */ |
|
9135 | + * Counts all flight that really arrival |
|
9136 | + * |
|
9137 | + * @return Integer the number of aircrafts |
|
9138 | + * |
|
9139 | + */ |
|
9140 | 9140 | public function countOverallArrival($filters = array()) |
9141 | 9141 | { |
9142 | 9142 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9149,11 +9149,11 @@ discard block |
||
9149 | 9149 | } |
9150 | 9150 | |
9151 | 9151 | /** |
9152 | - * Counts all pilots that have flown over |
|
9153 | - * |
|
9154 | - * @return Integer the number of pilots |
|
9155 | - * |
|
9156 | - */ |
|
9152 | + * Counts all pilots that have flown over |
|
9153 | + * |
|
9154 | + * @return Integer the number of pilots |
|
9155 | + * |
|
9156 | + */ |
|
9157 | 9157 | public function countOverallPilots($filters = array()) |
9158 | 9158 | { |
9159 | 9159 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9165,11 +9165,11 @@ discard block |
||
9165 | 9165 | } |
9166 | 9166 | |
9167 | 9167 | /** |
9168 | - * Counts all owners that have flown over |
|
9169 | - * |
|
9170 | - * @return Integer the number of owners |
|
9171 | - * |
|
9172 | - */ |
|
9168 | + * Counts all owners that have flown over |
|
9169 | + * |
|
9170 | + * @return Integer the number of owners |
|
9171 | + * |
|
9172 | + */ |
|
9173 | 9173 | public function countOverallOwners($filters = array()) |
9174 | 9174 | { |
9175 | 9175 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9182,11 +9182,11 @@ discard block |
||
9182 | 9182 | |
9183 | 9183 | |
9184 | 9184 | /** |
9185 | - * Counts all flights that have flown over |
|
9186 | - * |
|
9187 | - * @return Integer the number of flights |
|
9188 | - * |
|
9189 | - */ |
|
9185 | + * Counts all flights that have flown over |
|
9186 | + * |
|
9187 | + * @return Integer the number of flights |
|
9188 | + * |
|
9189 | + */ |
|
9190 | 9190 | public function countOverallFlights($filters = array()) |
9191 | 9191 | { |
9192 | 9192 | $query = "SELECT COUNT(spotter_output.spotter_id) AS flight_count |
@@ -9199,11 +9199,11 @@ discard block |
||
9199 | 9199 | } |
9200 | 9200 | |
9201 | 9201 | /** |
9202 | - * Counts all military flights that have flown over |
|
9203 | - * |
|
9204 | - * @return Integer the number of flights |
|
9205 | - * |
|
9206 | - */ |
|
9202 | + * Counts all military flights that have flown over |
|
9203 | + * |
|
9204 | + * @return Integer the number of flights |
|
9205 | + * |
|
9206 | + */ |
|
9207 | 9207 | public function countOverallMilitaryFlights($filters = array()) |
9208 | 9208 | { |
9209 | 9209 | $filter_query = $this->getFilter($filters,true,true); |
@@ -9218,11 +9218,11 @@ discard block |
||
9218 | 9218 | |
9219 | 9219 | |
9220 | 9220 | /** |
9221 | - * Counts all airlines that have flown over |
|
9222 | - * |
|
9223 | - * @return Integer the number of airlines |
|
9224 | - * |
|
9225 | - */ |
|
9221 | + * Counts all airlines that have flown over |
|
9222 | + * |
|
9223 | + * @return Integer the number of airlines |
|
9224 | + * |
|
9225 | + */ |
|
9226 | 9226 | public function countOverallAirlines($filters = array()) |
9227 | 9227 | { |
9228 | 9228 | $query = "SELECT COUNT(DISTINCT spotter_output.airline_name) AS airline_count |
@@ -9236,11 +9236,11 @@ discard block |
||
9236 | 9236 | |
9237 | 9237 | |
9238 | 9238 | /** |
9239 | - * Counts all hours of today |
|
9240 | - * |
|
9241 | - * @return Array the hour list |
|
9242 | - * |
|
9243 | - */ |
|
9239 | + * Counts all hours of today |
|
9240 | + * |
|
9241 | + * @return Array the hour list |
|
9242 | + * |
|
9243 | + */ |
|
9244 | 9244 | public function countAllHoursFromToday($filters = array()) |
9245 | 9245 | { |
9246 | 9246 | global $globalTimezone, $globalDBdriver; |
@@ -9280,11 +9280,11 @@ discard block |
||
9280 | 9280 | } |
9281 | 9281 | |
9282 | 9282 | /** |
9283 | - * Gets all the spotter information based on calculated upcoming flights |
|
9284 | - * |
|
9285 | - * @return Array the spotter information |
|
9286 | - * |
|
9287 | - */ |
|
9283 | + * Gets all the spotter information based on calculated upcoming flights |
|
9284 | + * |
|
9285 | + * @return Array the spotter information |
|
9286 | + * |
|
9287 | + */ |
|
9288 | 9288 | public function getUpcomingFlights($limit = '', $sort = '', $filters = array()) |
9289 | 9289 | { |
9290 | 9290 | global $global_query, $globalDBdriver, $globalTimezone; |
@@ -9359,12 +9359,12 @@ discard block |
||
9359 | 9359 | } |
9360 | 9360 | |
9361 | 9361 | |
9362 | - /** |
|
9363 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
9364 | - * |
|
9365 | - * @return Integer the Barrie Spotter ID |
|
9362 | + /** |
|
9363 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
9364 | + * |
|
9365 | + * @return Integer the Barrie Spotter ID |
|
9366 | 9366 | q * |
9367 | - */ |
|
9367 | + */ |
|
9368 | 9368 | public function getSpotterIDBasedOnFlightAwareID($flightaware_id) |
9369 | 9369 | { |
9370 | 9370 | $flightaware_id = filter_var($flightaware_id,FILTER_SANITIZE_STRING); |
@@ -9385,13 +9385,13 @@ discard block |
||
9385 | 9385 | |
9386 | 9386 | |
9387 | 9387 | /** |
9388 | - * Parses a date string |
|
9389 | - * |
|
9390 | - * @param String $dateString the date string |
|
9391 | - * @param String $timezone the timezone of a user |
|
9392 | - * @return Array the time information |
|
9393 | - * |
|
9394 | - */ |
|
9388 | + * Parses a date string |
|
9389 | + * |
|
9390 | + * @param String $dateString the date string |
|
9391 | + * @param String $timezone the timezone of a user |
|
9392 | + * @return Array the time information |
|
9393 | + * |
|
9394 | + */ |
|
9395 | 9395 | public function parseDateString($dateString, $timezone = '') |
9396 | 9396 | { |
9397 | 9397 | $time_array = array(); |
@@ -9427,12 +9427,12 @@ discard block |
||
9427 | 9427 | |
9428 | 9428 | |
9429 | 9429 | /** |
9430 | - * Parses the direction degrees to working |
|
9431 | - * |
|
9432 | - * @param Float $direction the direction in degrees |
|
9433 | - * @return Array the direction information |
|
9434 | - * |
|
9435 | - */ |
|
9430 | + * Parses the direction degrees to working |
|
9431 | + * |
|
9432 | + * @param Float $direction the direction in degrees |
|
9433 | + * @return Array the direction information |
|
9434 | + * |
|
9435 | + */ |
|
9436 | 9436 | public function parseDirection($direction = 0) |
9437 | 9437 | { |
9438 | 9438 | if ($direction == '') $direction = 0; |
@@ -9511,12 +9511,12 @@ discard block |
||
9511 | 9511 | |
9512 | 9512 | |
9513 | 9513 | /** |
9514 | - * Gets the aircraft registration |
|
9515 | - * |
|
9516 | - * @param String $flightaware_id the flight aware id |
|
9517 | - * @return String the aircraft registration |
|
9518 | - * |
|
9519 | - */ |
|
9514 | + * Gets the aircraft registration |
|
9515 | + * |
|
9516 | + * @param String $flightaware_id the flight aware id |
|
9517 | + * @return String the aircraft registration |
|
9518 | + * |
|
9519 | + */ |
|
9520 | 9520 | |
9521 | 9521 | public function getAircraftRegistration($flightaware_id) |
9522 | 9522 | { |
@@ -9545,12 +9545,12 @@ discard block |
||
9545 | 9545 | |
9546 | 9546 | |
9547 | 9547 | /** |
9548 | - * Gets the aircraft registration from ModeS |
|
9549 | - * |
|
9550 | - * @param String $aircraft_modes the flight ModeS in hex |
|
9551 | - * @return String the aircraft registration |
|
9552 | - * |
|
9553 | - */ |
|
9548 | + * Gets the aircraft registration from ModeS |
|
9549 | + * |
|
9550 | + * @param String $aircraft_modes the flight ModeS in hex |
|
9551 | + * @return String the aircraft registration |
|
9552 | + * |
|
9553 | + */ |
|
9554 | 9554 | public function getAircraftRegistrationBymodeS($aircraft_modes) |
9555 | 9555 | { |
9556 | 9556 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9563,19 +9563,19 @@ discard block |
||
9563 | 9563 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
9564 | 9564 | $sth->closeCursor(); |
9565 | 9565 | if (count($row) > 0) { |
9566 | - //return $row['Registration']; |
|
9567 | - return $row['registration']; |
|
9566 | + //return $row['Registration']; |
|
9567 | + return $row['registration']; |
|
9568 | 9568 | } else return ''; |
9569 | 9569 | |
9570 | 9570 | } |
9571 | 9571 | |
9572 | 9572 | /** |
9573 | - * Gets the aircraft type from ModeS |
|
9574 | - * |
|
9575 | - * @param String $aircraft_modes the flight ModeS in hex |
|
9576 | - * @return String the aircraft type |
|
9577 | - * |
|
9578 | - */ |
|
9573 | + * Gets the aircraft type from ModeS |
|
9574 | + * |
|
9575 | + * @param String $aircraft_modes the flight ModeS in hex |
|
9576 | + * @return String the aircraft type |
|
9577 | + * |
|
9578 | + */ |
|
9579 | 9579 | public function getAircraftTypeBymodeS($aircraft_modes) |
9580 | 9580 | { |
9581 | 9581 | $aircraft_modes = filter_var($aircraft_modes,FILTER_SANITIZE_STRING); |
@@ -9588,19 +9588,19 @@ discard block |
||
9588 | 9588 | $row = $sth->fetch(PDO::FETCH_ASSOC); |
9589 | 9589 | $sth->closeCursor(); |
9590 | 9590 | if (count($row) > 0) { |
9591 | - if ($row['type_flight'] == null) return ''; |
|
9592 | - else return $row['type_flight']; |
|
9591 | + if ($row['type_flight'] == null) return ''; |
|
9592 | + else return $row['type_flight']; |
|
9593 | 9593 | } else return ''; |
9594 | 9594 | |
9595 | 9595 | } |
9596 | 9596 | |
9597 | 9597 | /** |
9598 | - * Gets Countrie from latitude/longitude |
|
9599 | - * |
|
9600 | - * @param Float $latitude latitute of the flight |
|
9601 | - * @param Float $longitude longitute of the flight |
|
9602 | - * @return String the countrie |
|
9603 | - */ |
|
9598 | + * Gets Countrie from latitude/longitude |
|
9599 | + * |
|
9600 | + * @param Float $latitude latitute of the flight |
|
9601 | + * @param Float $longitude longitute of the flight |
|
9602 | + * @return String the countrie |
|
9603 | + */ |
|
9604 | 9604 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
9605 | 9605 | { |
9606 | 9606 | global $globalDBdriver, $globalDebug; |
@@ -9637,12 +9637,12 @@ discard block |
||
9637 | 9637 | } |
9638 | 9638 | |
9639 | 9639 | /** |
9640 | - * converts the registration code using the country prefix |
|
9641 | - * |
|
9642 | - * @param String $registration the aircraft registration |
|
9643 | - * @return String the aircraft registration |
|
9644 | - * |
|
9645 | - */ |
|
9640 | + * converts the registration code using the country prefix |
|
9641 | + * |
|
9642 | + * @param String $registration the aircraft registration |
|
9643 | + * @return String the aircraft registration |
|
9644 | + * |
|
9645 | + */ |
|
9646 | 9646 | public function convertAircraftRegistration($registration) |
9647 | 9647 | { |
9648 | 9648 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9694,12 +9694,12 @@ discard block |
||
9694 | 9694 | } |
9695 | 9695 | |
9696 | 9696 | /** |
9697 | - * Country from the registration code |
|
9698 | - * |
|
9699 | - * @param String $registration the aircraft registration |
|
9700 | - * @return String the country |
|
9701 | - * |
|
9702 | - */ |
|
9697 | + * Country from the registration code |
|
9698 | + * |
|
9699 | + * @param String $registration the aircraft registration |
|
9700 | + * @return String the country |
|
9701 | + * |
|
9702 | + */ |
|
9703 | 9703 | public function countryFromAircraftRegistration($registration) |
9704 | 9704 | { |
9705 | 9705 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -9718,8 +9718,8 @@ discard block |
||
9718 | 9718 | $country = $row['country']; |
9719 | 9719 | } |
9720 | 9720 | } else { |
9721 | - $registration_1 = substr($registration, 0, 1); |
|
9722 | - $registration_2 = substr($registration, 0, 2); |
|
9721 | + $registration_1 = substr($registration, 0, 1); |
|
9722 | + $registration_2 = substr($registration, 0, 2); |
|
9723 | 9723 | |
9724 | 9724 | $country = ''; |
9725 | 9725 | //first get the prefix based on two characters |
@@ -9755,11 +9755,11 @@ discard block |
||
9755 | 9755 | } |
9756 | 9756 | |
9757 | 9757 | /** |
9758 | - * Set a new highlight value for a flight |
|
9759 | - * |
|
9760 | - * @param String $flightaware_id flightaware_id from spotter_output table |
|
9761 | - * @param String $highlight New highlight value |
|
9762 | - */ |
|
9758 | + * Set a new highlight value for a flight |
|
9759 | + * |
|
9760 | + * @param String $flightaware_id flightaware_id from spotter_output table |
|
9761 | + * @param String $highlight New highlight value |
|
9762 | + */ |
|
9763 | 9763 | public function setHighlightFlight($flightaware_id,$highlight) { |
9764 | 9764 | |
9765 | 9765 | $query = "UPDATE spotter_output SET highlight = :highlight WHERE flightaware_id = :flightaware_id"; |
@@ -9768,12 +9768,12 @@ discard block |
||
9768 | 9768 | } |
9769 | 9769 | |
9770 | 9770 | /** |
9771 | - * Gets the short url from bit.ly |
|
9772 | - * |
|
9773 | - * @param String $url the full url |
|
9774 | - * @return String the bit.ly url |
|
9775 | - * |
|
9776 | - */ |
|
9771 | + * Gets the short url from bit.ly |
|
9772 | + * |
|
9773 | + * @param String $url the full url |
|
9774 | + * @return String the bit.ly url |
|
9775 | + * |
|
9776 | + */ |
|
9777 | 9777 | public function getBitlyURL($url) |
9778 | 9778 | { |
9779 | 9779 | global $globalBitlyAccessToken; |
@@ -10062,11 +10062,11 @@ discard block |
||
10062 | 10062 | $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 |
10063 | 10063 | 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)) |
10064 | 10064 | 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;"; |
10065 | - } else { |
|
10065 | + } else { |
|
10066 | 10066 | $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 |
10067 | 10067 | 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)) |
10068 | 10068 | 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;"; |
10069 | - } |
|
10069 | + } |
|
10070 | 10070 | $sth = $this->db->prepare($query); |
10071 | 10071 | $sth->execute(); |
10072 | 10072 | return $sth->fetchAll(PDO::FETCH_ASSOC); |
@@ -135,11 +135,26 @@ discard block |
||
135 | 135 | <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li> |
136 | 136 | <li><?php echo _("NOTAM scope:"); ?> |
137 | 137 | <select class="selectpicker" onchange="notamscope(this);"> |
138 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
139 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
140 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
141 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
142 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
138 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
139 | + print ' selected'; |
|
140 | +} |
|
141 | +?>>All</option> |
|
142 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
143 | + print ' selected'; |
|
144 | +} |
|
145 | +?>>Airport/Enroute warning</option> |
|
146 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
147 | + print ' selected'; |
|
148 | +} |
|
149 | +?>>Airport warning</option> |
|
150 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
151 | + print ' selected'; |
|
152 | +} |
|
153 | +?>>Navigation warning</option> |
|
154 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
155 | + print ' selected'; |
|
156 | +} |
|
157 | +?>>Enroute warning</option> |
|
143 | 158 | </select |
144 | 159 | </li> |
145 | 160 | </ul> |
@@ -167,7 +182,12 @@ discard block |
||
167 | 182 | <div class="form-group"> |
168 | 183 | <label>From (UTC):</label> |
169 | 184 | <div class='input-group date' id='datetimepicker1'> |
170 | - <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required /> |
|
185 | + <input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) { |
|
186 | + print $_POST['start_date']; |
|
187 | +} elseif (isset($_COOKIE['archive_begin'])) { |
|
188 | + print date("m/d/Y h:i a",$_COOKIE['archive_begin']); |
|
189 | +} |
|
190 | +?>" required /> |
|
171 | 191 | <span class="input-group-addon"> |
172 | 192 | <span class="glyphicon glyphicon-calendar"></span> |
173 | 193 | </span> |
@@ -176,7 +196,12 @@ discard block |
||
176 | 196 | <div class="form-group"> |
177 | 197 | <label>To (UTC):</label> |
178 | 198 | <div class='input-group date' id='datetimepicker2'> |
179 | - <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" /> |
|
199 | + <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) { |
|
200 | + print $_POST['end_date']; |
|
201 | +} elseif (isset($_COOKIE['archive_end'])) { |
|
202 | + print date("m/d/Y h:i a",$_COOKIE['archive_end']); |
|
203 | +} |
|
204 | +?>" /> |
|
180 | 205 | <span class="input-group-addon"> |
181 | 206 | <span class="glyphicon glyphicon-calendar"></span> |
182 | 207 | </span> |
@@ -202,8 +227,20 @@ discard block |
||
202 | 227 | |
203 | 228 | <li><?php echo _("Playback speed:"); ?> |
204 | 229 | <div class="range"> |
205 | - <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>"> |
|
206 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
230 | + <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
231 | + print $_POST['archivespeed']; |
|
232 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
233 | + print $_COOKIE['archive_speed']; |
|
234 | +} else { |
|
235 | + print '1'; |
|
236 | +} |
|
237 | +?>"> |
|
238 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
239 | + print $_COOKIE['archive_speed']; |
|
240 | +} else { |
|
241 | + print '1'; |
|
242 | +} |
|
243 | +?></output> |
|
207 | 244 | </div> |
208 | 245 | </li> |
209 | 246 | <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li> |
@@ -225,15 +262,27 @@ discard block |
||
225 | 262 | <li><?php echo _("Type of Map:"); ?> |
226 | 263 | <select class="selectpicker" onchange="mapType(this);"> |
227 | 264 | <?php |
228 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
229 | - else $MapType = $_COOKIE['MapType']; |
|
265 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
266 | + $MapType = $globalMapProvider; |
|
267 | + } else { |
|
268 | + $MapType = $_COOKIE['MapType']; |
|
269 | + } |
|
230 | 270 | ?> |
231 | 271 | <?php |
232 | 272 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
233 | 273 | ?> |
234 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
235 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
236 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
274 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
275 | + print ' selected'; |
|
276 | +} |
|
277 | +?>>Bing-Aerial</option> |
|
278 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
279 | + print ' selected'; |
|
280 | +} |
|
281 | +?>>Bing-Hybrid</option> |
|
282 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
283 | + print ' selected'; |
|
284 | +} |
|
285 | +?>>Bing-Road</option> |
|
237 | 286 | <?php |
238 | 287 | } |
239 | 288 | ?> |
@@ -243,56 +292,131 @@ discard block |
||
243 | 292 | <?php |
244 | 293 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
245 | 294 | ?> |
246 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
247 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
248 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
295 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
296 | + print ' selected'; |
|
297 | +} |
|
298 | +?>>Here-Aerial</option> |
|
299 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
300 | + print ' selected'; |
|
301 | +} |
|
302 | +?>>Here-Hybrid</option> |
|
303 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
304 | + print ' selected'; |
|
305 | +} |
|
306 | +?>>Here-Road</option> |
|
249 | 307 | <?php |
250 | 308 | } |
251 | 309 | ?> |
252 | 310 | <?php |
253 | 311 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
254 | 312 | ?> |
255 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
256 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
257 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
258 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
313 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
314 | + print ' selected'; |
|
315 | +} |
|
316 | +?>>Google Roadmap</option> |
|
317 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
318 | + print ' selected'; |
|
319 | +} |
|
320 | +?>>Google Satellite</option> |
|
321 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Google Hybrid</option> |
|
325 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
326 | + print ' selected'; |
|
327 | +} |
|
328 | +?>>Google Terrain</option> |
|
259 | 329 | <?php |
260 | 330 | } |
261 | 331 | ?> |
262 | 332 | <?php |
263 | 333 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
264 | 334 | ?> |
265 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
266 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
267 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
335 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
336 | + print ' selected'; |
|
337 | +} |
|
338 | +?>>MapQuest-OSM</option> |
|
339 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
340 | + print ' selected'; |
|
341 | +} |
|
342 | +?>>MapQuest-Aerial</option> |
|
343 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
344 | + print ' selected'; |
|
345 | +} |
|
346 | +?>>MapQuest-Hybrid</option> |
|
268 | 347 | <?php |
269 | 348 | } |
270 | 349 | ?> |
271 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
350 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
351 | + print ' selected'; |
|
352 | +} |
|
353 | +?>>Yandex</option> |
|
272 | 354 | <?php |
273 | 355 | } |
274 | 356 | ?> |
275 | 357 | <?php |
276 | 358 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
277 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
278 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
359 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
360 | + $MapBoxId = 'default'; |
|
361 | + } else { |
|
362 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
363 | + } |
|
279 | 364 | ?> |
280 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
281 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
282 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
283 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
284 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
285 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
286 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
287 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
288 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
289 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
290 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
291 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
365 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
366 | + print ' selected'; |
|
367 | +} |
|
368 | +?>>Mapbox default</option> |
|
369 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
370 | + print ' selected'; |
|
371 | +} |
|
372 | +?>>Mapbox streets</option> |
|
373 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
374 | + print ' selected'; |
|
375 | +} |
|
376 | +?>>Mapbox light</option> |
|
377 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
378 | + print ' selected'; |
|
379 | +} |
|
380 | +?>>Mapbox dark</option> |
|
381 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
382 | + print ' selected'; |
|
383 | +} |
|
384 | +?>>Mapbox satellite</option> |
|
385 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
386 | + print ' selected'; |
|
387 | +} |
|
388 | +?>>Mapbox streets-satellite</option> |
|
389 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
390 | + print ' selected'; |
|
391 | +} |
|
392 | +?>>Mapbox streets-basic</option> |
|
393 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
394 | + print ' selected'; |
|
395 | +} |
|
396 | +?>>Mapbox comic</option> |
|
397 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
398 | + print ' selected'; |
|
399 | +} |
|
400 | +?>>Mapbox outdoors</option> |
|
401 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
402 | + print ' selected'; |
|
403 | +} |
|
404 | +?>>Mapbox pencil</option> |
|
405 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
406 | + print ' selected'; |
|
407 | +} |
|
408 | +?>>Mapbox pirates</option> |
|
409 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
410 | + print ' selected'; |
|
411 | +} |
|
412 | +?>>Mapbox emerald</option> |
|
292 | 413 | <?php |
293 | 414 | } |
294 | 415 | ?> |
295 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
416 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>OpenStreetMap</option> |
|
296 | 420 | </select> |
297 | 421 | </li> |
298 | 422 | <?php |
@@ -300,9 +424,18 @@ discard block |
||
300 | 424 | ?> |
301 | 425 | <li><?php echo _("Type of Terrain:"); ?> |
302 | 426 | <select class="selectpicker" onchange="terrainType(this);"> |
303 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
304 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
305 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
427 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>stk terrain</option> |
|
431 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
432 | + print ' selected'; |
|
433 | +} |
|
434 | +?>>ellipsoid</option> |
|
435 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
436 | + print ' selected'; |
|
437 | +} |
|
438 | +?>>vr terrain</option> |
|
306 | 439 | </select> |
307 | 440 | </li> |
308 | 441 | <?php |
@@ -312,18 +445,36 @@ discard block |
||
312 | 445 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
313 | 446 | ?> |
314 | 447 | |
315 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
316 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
317 | - <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
318 | - <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
448 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
449 | + print 'checked'; |
|
450 | +} |
|
451 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li> |
|
452 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') || !isset($_COOKIE['flightpath'])) { |
|
453 | + print 'checked'; |
|
454 | +} |
|
455 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
456 | + <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) { |
|
457 | + print 'checked'; |
|
458 | +} |
|
459 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
460 | + <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) { |
|
461 | + print 'checked'; |
|
462 | +} |
|
463 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
319 | 464 | <?php |
320 | 465 | } |
321 | 466 | ?> |
322 | - <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
467 | + <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') { |
|
468 | + print 'checked'; |
|
469 | +} |
|
470 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
323 | 471 | <?php |
324 | 472 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
325 | 473 | ?> |
326 | - <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
474 | + <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) { |
|
475 | + print 'checked'; |
|
476 | +} |
|
477 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
327 | 478 | <?php |
328 | 479 | } |
329 | 480 | ?> |
@@ -332,17 +483,25 @@ discard block |
||
332 | 483 | if (function_exists('array_column')) { |
333 | 484 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
334 | 485 | ?> |
335 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
486 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
487 | + print 'checked'; |
|
488 | +} |
|
489 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
336 | 490 | <?php |
337 | 491 | } |
338 | 492 | } elseif (isset($globalSources)) { |
339 | 493 | $dispolar = false; |
340 | 494 | foreach ($globalSources as $testsource) { |
341 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
495 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
496 | + $dispolar = true; |
|
497 | + } |
|
342 | 498 | } |
343 | 499 | if ($dispolar) { |
344 | 500 | ?> |
345 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
501 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
502 | + print 'checked'; |
|
503 | +} |
|
504 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
346 | 505 | <?php |
347 | 506 | } |
348 | 507 | } |
@@ -354,12 +513,22 @@ discard block |
||
354 | 513 | <?php |
355 | 514 | if (extension_loaded('gd') && function_exists('gd_info')) { |
356 | 515 | ?> |
357 | - <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
516 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
517 | + print 'checked'; |
|
518 | +} |
|
519 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
358 | 520 | <?php |
359 | 521 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
360 | 522 | ?> |
361 | 523 | <li><?php echo _("Aircraft icon color:"); ?> |
362 | - <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"> |
|
524 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
525 | + print $_COOKIE['IconColor']; |
|
526 | +} elseif (isset($globalAircraftIconColor)) { |
|
527 | + print $globalAircraftIconColor; |
|
528 | +} else { |
|
529 | + print '1a3151'; |
|
530 | +} |
|
531 | +?>"> |
|
363 | 532 | </li> |
364 | 533 | <?php |
365 | 534 | } |
@@ -367,8 +536,22 @@ discard block |
||
367 | 536 | ?> |
368 | 537 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
369 | 538 | <div class="range"> |
370 | - <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>"> |
|
371 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
539 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
540 | + print $_COOKIE['AirportZoom']; |
|
541 | +} elseif (isset($globalAirportZoom)) { |
|
542 | + print $globalAirportZoom; |
|
543 | +} else { |
|
544 | + print '7'; |
|
545 | +} |
|
546 | +?>"> |
|
547 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
548 | + print $_COOKIE['AirportZoom']; |
|
549 | +} elseif (isset($globalAirportZoom)) { |
|
550 | + print $globalAirportZoom; |
|
551 | +} else { |
|
552 | + print '7'; |
|
553 | +} |
|
554 | +?></output> |
|
372 | 555 | </div> |
373 | 556 | </li> |
374 | 557 | <?php |
@@ -376,22 +559,46 @@ discard block |
||
376 | 559 | ?> |
377 | 560 | <li><?php echo _("Distance unit:"); ?> |
378 | 561 | <select class="selectpicker" onchange="unitdistance(this);"> |
379 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
380 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
381 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
562 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
563 | + echo ' selected'; |
|
564 | +} |
|
565 | +?>>km</option> |
|
566 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
567 | + echo ' selected'; |
|
568 | +} |
|
569 | +?>>nm</option> |
|
570 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
571 | + echo ' selected'; |
|
572 | +} |
|
573 | +?>>mi</option> |
|
382 | 574 | </select> |
383 | 575 | </li> |
384 | 576 | <li><?php echo _("Altitude unit:"); ?> |
385 | 577 | <select class="selectpicker" onchange="unitaltitude(this);"> |
386 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
387 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
578 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
579 | + echo ' selected'; |
|
580 | +} |
|
581 | +?>>m</option> |
|
582 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
583 | + echo ' selected'; |
|
584 | +} |
|
585 | +?>>feet</option> |
|
388 | 586 | </select> |
389 | 587 | </li> |
390 | 588 | <li><?php echo _("Speed unit:"); ?> |
391 | 589 | <select class="selectpicker" onchange="unitspeed(this);"> |
392 | - <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option> |
|
393 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
394 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
590 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
591 | + echo ' selected'; |
|
592 | +} |
|
593 | +?>>km/h</option> |
|
594 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
595 | + echo ' selected'; |
|
596 | +} |
|
597 | +?>>mph</option> |
|
598 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
599 | + echo ' selected'; |
|
600 | +} |
|
601 | +?>>knots</option> |
|
395 | 602 | </select> |
396 | 603 | </li> |
397 | 604 | |
@@ -406,9 +613,18 @@ discard block |
||
406 | 613 | <?php |
407 | 614 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
408 | 615 | ?> |
409 | - <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
410 | - <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
411 | - <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
616 | + <?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) { |
|
617 | + print 'checked'; |
|
618 | +} |
|
619 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
620 | + <?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) { |
|
621 | + print 'checked'; |
|
622 | +} |
|
623 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
624 | + <?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) { |
|
625 | + print 'checked'; |
|
626 | +} |
|
627 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
412 | 628 | <?php |
413 | 629 | } |
414 | 630 | ?> |
@@ -416,10 +632,16 @@ discard block |
||
416 | 632 | if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
417 | 633 | ?> |
418 | 634 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
419 | - <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
635 | + <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) { |
|
636 | + print 'checked'; |
|
637 | +} |
|
638 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
420 | 639 | <?php } ?> |
421 | 640 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
422 | - <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
641 | + <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) { |
|
642 | + print 'checked'; |
|
643 | +} |
|
644 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
423 | 645 | <?php } ?> |
424 | 646 | <?php |
425 | 647 | } |
@@ -431,7 +653,9 @@ discard block |
||
431 | 653 | $Spotter = new Spotter(); |
432 | 654 | foreach($Spotter->getAllAirlineNames() as $airline) { |
433 | 655 | $airline_name = $airline['airline_name']; |
434 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
656 | + if (strlen($airline_name) > 30) { |
|
657 | + $airline_name = substr($airline_name,0,30).'...'; |
|
658 | + } |
|
435 | 659 | if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) { |
436 | 660 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
437 | 661 | } else { |
@@ -466,10 +690,22 @@ discard block |
||
466 | 690 | ?> |
467 | 691 | <li><?php echo _("Display airlines of type:"); ?><br/> |
468 | 692 | <select class="selectpicker" onchange="airlinestype(this);"> |
469 | - <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
470 | - <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
471 | - <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
472 | - <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
693 | + <option value="all"<?php if (!isset($_COOKIE['airlinestype']) || $_COOKIE['airlinestype'] == 'all' || $_COOKIE['airlinestype'] == '') { |
|
694 | + echo ' selected'; |
|
695 | +} |
|
696 | +?>><?php echo _("All"); ?></option> |
|
697 | + <option value="passenger"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'passenger') { |
|
698 | + echo ' selected'; |
|
699 | +} |
|
700 | +?>><?php echo _("Passenger"); ?></option> |
|
701 | + <option value="cargo"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'cargo') { |
|
702 | + echo ' selected'; |
|
703 | +} |
|
704 | +?>><?php echo _("Cargo"); ?></option> |
|
705 | + <option value="military"<?php if (isset($_COOKIE['airlinestype']) && $_COOKIE['airlinestype'] == 'military') { |
|
706 | + echo ' selected'; |
|
707 | +} |
|
708 | +?>><?php echo _("Military"); ?></option> |
|
473 | 709 | </select> |
474 | 710 | </li> |
475 | 711 | <?php |
@@ -477,7 +713,10 @@ discard block |
||
477 | 713 | ?> |
478 | 714 | <li> |
479 | 715 | <?php echo _("Display flight with ident:"); ?> |
480 | - <input type="text" name="identfilter" id="identfilter" value="<?php if (isset($_COOKIE['identfilter'])) print $_COOKIE['identfilter']; ?>" /> |
|
716 | + <input type="text" name="identfilter" id="identfilter" value="<?php if (isset($_COOKIE['identfilter'])) { |
|
717 | + print $_COOKIE['identfilter']; |
|
718 | +} |
|
719 | +?>" /> |
|
481 | 720 | </li> |
482 | 721 | </ul> |
483 | 722 | </form> |
@@ -493,7 +732,10 @@ discard block |
||
493 | 732 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
494 | 733 | <form> |
495 | 734 | <ul> |
496 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
735 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') { |
|
736 | + print 'checked'; |
|
737 | +} |
|
738 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
497 | 739 | <li><?php echo _("Type:"); ?> |
498 | 740 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
499 | 741 | <?php |
@@ -501,25 +743,45 @@ discard block |
||
501 | 743 | $types = $Satellite->get_tle_types(); |
502 | 744 | foreach ($types as $type) { |
503 | 745 | $type_name = $type['tle_type']; |
504 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
505 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
506 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
507 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
508 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
509 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
510 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
511 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
512 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
513 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
514 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
515 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
516 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
517 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
518 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
519 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
520 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
521 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
522 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
746 | + if ($type_name == 'musson') { |
|
747 | + $type_name = 'Russian LEO Navigation'; |
|
748 | + } else if ($type_name == 'nnss') { |
|
749 | + $type_name = 'Navi Navigation Satellite System'; |
|
750 | + } else if ($type_name == 'sbas') { |
|
751 | + $type_name = 'Satellite-Based Augmentation System'; |
|
752 | + } else if ($type_name == 'glo-ops') { |
|
753 | + $type_name = 'Glonass Operational'; |
|
754 | + } else if ($type_name == 'gps-ops') { |
|
755 | + $type_name = 'GPS Operational'; |
|
756 | + } else if ($type_name == 'argos') { |
|
757 | + $type_name = 'ARGOS Data Collection System'; |
|
758 | + } else if ($type_name == 'tdrss') { |
|
759 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
760 | + } else if ($type_name == 'sarsat') { |
|
761 | + $type_name = 'Search & Rescue'; |
|
762 | + } else if ($type_name == 'dmc') { |
|
763 | + $type_name = 'Disaster Monitoring'; |
|
764 | + } else if ($type_name == 'resource') { |
|
765 | + $type_name = 'Earth Resources'; |
|
766 | + } else if ($type_name == 'stations') { |
|
767 | + $type_name = 'Space Stations'; |
|
768 | + } else if ($type_name == 'geo') { |
|
769 | + $type_name = 'Geostationary'; |
|
770 | + } else if ($type_name == 'amateur') { |
|
771 | + $type_name = 'Amateur Radio'; |
|
772 | + } else if ($type_name == 'x-comm') { |
|
773 | + $type_name = 'Experimental'; |
|
774 | + } else if ($type_name == 'other-comm') { |
|
775 | + $type_name = 'Other Comm'; |
|
776 | + } else if ($type_name == 'science') { |
|
777 | + $type_name = 'Space & Earth Science'; |
|
778 | + } else if ($type_name == 'military') { |
|
779 | + $type_name = 'Miscellaneous Military'; |
|
780 | + } else if ($type_name == 'radar') { |
|
781 | + $type_name = 'Radar Calibration'; |
|
782 | + } else if ($type_name == 'tle-new') { |
|
783 | + $type_name = 'Last 30 days launches'; |
|
784 | + } |
|
523 | 785 | |
524 | 786 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
525 | 787 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |