@@ -14,23 +14,23 @@ discard block |
||
14 | 14 | $usecoord = false; |
15 | 15 | if (isset($_GET['test'])) exit(); |
16 | 16 | if (isset($_GET['tracker'])) { |
17 | - $tracker = true; |
|
17 | + $tracker = true; |
|
18 | 18 | } |
19 | 19 | if (isset($_GET['marine'])) { |
20 | - $marine = true; |
|
20 | + $marine = true; |
|
21 | 21 | } |
22 | 22 | if ($tracker) { |
23 | - require_once('require/class.Tracker.php'); |
|
24 | - require_once('require/class.TrackerLive.php'); |
|
25 | - require_once('require/class.TrackerArchive.php'); |
|
23 | + require_once('require/class.Tracker.php'); |
|
24 | + require_once('require/class.TrackerLive.php'); |
|
25 | + require_once('require/class.TrackerArchive.php'); |
|
26 | 26 | } elseif ($marine) { |
27 | - require_once('require/class.Marine.php'); |
|
28 | - require_once('require/class.MarineLive.php'); |
|
29 | - require_once('require/class.MarineArchive.php'); |
|
27 | + require_once('require/class.Marine.php'); |
|
28 | + require_once('require/class.MarineLive.php'); |
|
29 | + require_once('require/class.MarineArchive.php'); |
|
30 | 30 | } else { |
31 | - require_once('require/class.Spotter.php'); |
|
32 | - require_once('require/class.SpotterLive.php'); |
|
33 | - require_once('require/class.SpotterArchive.php'); |
|
31 | + require_once('require/class.Spotter.php'); |
|
32 | + require_once('require/class.SpotterLive.php'); |
|
33 | + require_once('require/class.SpotterArchive.php'); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $begintime = microtime(true); |
@@ -50,10 +50,10 @@ discard block |
||
50 | 50 | $Common = new Common(); |
51 | 51 | |
52 | 52 | if (isset($_GET['download'])) { |
53 | - if ($_GET['download'] == "true") |
|
54 | - { |
|
53 | + if ($_GET['download'] == "true") |
|
54 | + { |
|
55 | 55 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
56 | - } |
|
56 | + } |
|
57 | 57 | } |
58 | 58 | header('Content-Type: text/javascript'); |
59 | 59 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $usecoord = true; |
132 | 132 | $coord = explode(',',$_GET['coord']); |
133 | 133 | if (filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
134 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0) { |
|
134 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0) { |
|
135 | 135 | if ($tracker) { |
136 | 136 | $spotter_array = $TrackerLive->getMinLiveTrackerDatabyCoord($coord,$filter); |
137 | 137 | } elseif ($marine) { |
@@ -635,17 +635,17 @@ discard block |
||
635 | 635 | if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history']; |
636 | 636 | |
637 | 637 | if ( |
638 | - (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') |
|
639 | - || ((isset($globalMapHistory) && $globalMapHistory) || $allhistory) |
|
638 | + (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') |
|
639 | + || ((isset($globalMapHistory) && $globalMapHistory) || $allhistory) |
|
640 | 640 | // || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id'])) |
641 | 641 | // || (isset($history) && $history != '' && $history != 'NA' && $history == $spotter_item['ident']) |
642 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
643 | - || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']) |
|
644 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id'])) |
|
645 | - || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id']) |
|
646 | - || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid'])) |
|
647 | - || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid']) |
|
648 | - ) { |
|
642 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
|
643 | + || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']) |
|
644 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id'])) |
|
645 | + || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id']) |
|
646 | + || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid'])) |
|
647 | + || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid']) |
|
648 | + ) { |
|
649 | 649 | if ($tracker) { |
650 | 650 | if ($from_archive || $globalArchive) { |
651 | 651 | $spotter_history_array = $TrackerArchive->getAllArchiveTrackerDataById($spotter_item['famtrackid']); |
@@ -653,9 +653,9 @@ discard block |
||
653 | 653 | $spotter_history_array = $TrackerLive->getAllLiveTrackerDataById($spotter_item['famtrackid']); |
654 | 654 | } |
655 | 655 | if (((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || |
656 | - (!isset($_COOKIE['mapmatching']) && $globalMapMatching === TRUE)) && |
|
657 | - isset($_GET['zoom']) && $_GET['zoom'] > 12 && |
|
658 | - isset($spotter_item['type']) && ( |
|
656 | + (!isset($_COOKIE['mapmatching']) && $globalMapMatching === TRUE)) && |
|
657 | + isset($_GET['zoom']) && $_GET['zoom'] > 12 && |
|
658 | + isset($spotter_item['type']) && ( |
|
659 | 659 | $spotter_item['type'] == 'Firetruck' || |
660 | 660 | $spotter_item['type'] == 'Ambulance' || |
661 | 661 | $spotter_item['type'] == 'Truck (18 Wheeler)' || |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | $spotter_item['type'] == 'Jeep' || |
668 | 668 | $spotter_item['type'] == 'Motorcycle' || |
669 | 669 | $spotter_item['type'] == 'Car' |
670 | - ) |
|
670 | + ) |
|
671 | 671 | ) { |
672 | 672 | require(dirname(__FILE__).'/require/class.MapMatching.php'); |
673 | 673 | $MapMatching = new MapMatching(); |
@@ -770,75 +770,75 @@ discard block |
||
770 | 770 | } |
771 | 771 | |
772 | 772 | if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
773 | - || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
774 | - && (isset($spotter_item['departure_airport']) |
|
775 | - && $spotter_item['departure_airport'] != 'NA' |
|
776 | - && isset($spotter_item['arrival_airport']) |
|
777 | - && $spotter_item['arrival_airport'] != 'NA' |
|
778 | - && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") |
|
779 | - || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)))) { |
|
780 | - if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
781 | - else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
782 | - if (isset($spotter_item['departure_airport_latitude'])) { |
|
773 | + || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
774 | + && (isset($spotter_item['departure_airport']) |
|
775 | + && $spotter_item['departure_airport'] != 'NA' |
|
776 | + && isset($spotter_item['arrival_airport']) |
|
777 | + && $spotter_item['arrival_airport'] != 'NA' |
|
778 | + && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") |
|
779 | + || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)))) { |
|
780 | + if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
781 | + else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": ['; |
|
782 | + if (isset($spotter_item['departure_airport_latitude'])) { |
|
783 | 783 | $output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],'; |
784 | - } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
|
784 | + } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') { |
|
785 | 785 | $dairport = $Spotter->getAllAirportInfo($spotter_item['departure_airport']); |
786 | 786 | if (isset($dairport[0]['latitude'])) { |
787 | - $output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],'; |
|
787 | + $output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],'; |
|
788 | 788 | } |
789 | - } |
|
790 | - if (isset($spotter_item['arrival_airport_latitude'])) { |
|
789 | + } |
|
790 | + if (isset($spotter_item['arrival_airport_latitude'])) { |
|
791 | 791 | $output_air .= '['.$spotter_item['arrival_airport_longitude'].','.$spotter_item['arrival_airport_latitude'].'],'; |
792 | - } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
792 | + } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
793 | 793 | $aairport = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
794 | 794 | if (isset($aairport[0]['latitude'])) { |
795 | - $output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].'],'; |
|
795 | + $output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].'],'; |
|
796 | 796 | } |
797 | - } |
|
798 | - $output_air = substr($output_air, 0, -1); |
|
799 | - $output_air .= ']}},'; |
|
800 | - $output .= $output_air; |
|
801 | - unset($output_air); |
|
797 | + } |
|
798 | + $output_air = substr($output_air, 0, -1); |
|
799 | + $output_air .= ']}},'; |
|
800 | + $output .= $output_air; |
|
801 | + unset($output_air); |
|
802 | 802 | } |
803 | 803 | |
804 | 804 | //if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA' && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
805 | 805 | //if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) { |
806 | 806 | if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id'])) |
807 | - || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
808 | - && (isset($spotter_item['arrival_airport']) |
|
809 | - && $spotter_item['arrival_airport'] != 'NA' |
|
810 | - && ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == "true") |
|
811 | - || (!isset($_COOKIE['MapRemainingRoute']) && (!isset($globalMapRemainingRoute) |
|
812 | - || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) { |
|
813 | - $havedata = false; |
|
814 | - if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
815 | - else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
807 | + || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])) |
|
808 | + && (isset($spotter_item['arrival_airport']) |
|
809 | + && $spotter_item['arrival_airport'] != 'NA' |
|
810 | + && ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == "true") |
|
811 | + || (!isset($_COOKIE['MapRemainingRoute']) && (!isset($globalMapRemainingRoute) |
|
812 | + || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) { |
|
813 | + $havedata = false; |
|
814 | + if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
815 | + else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": ['; |
|
816 | 816 | |
817 | - //$output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],'; |
|
818 | - if (isset($spotter_item['arrival_airport_latitude'])) { |
|
817 | + //$output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],'; |
|
818 | + if (isset($spotter_item['arrival_airport_latitude'])) { |
|
819 | 819 | //$output_dest .= '['.$spotter_item['arrival_airport_longitude'].','.$spotter_item['arrival_airport_latitude'].']'; |
820 | 820 | $end_lon = $spotter_item['arrival_airport_longitude']; |
821 | 821 | $end_lat = $spotter_item['arrival_airport_latitude']; |
822 | 822 | $havedata = true; |
823 | - } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
823 | + } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
|
824 | 824 | $aairport = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']); |
825 | 825 | if (isset($aairport[0]['latitude'])) { |
826 | - //$output_dest .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']'; |
|
827 | - $end_lon = $aairport[0]['longitude']; |
|
828 | - $end_lat = $aairport[0]['latitude']; |
|
829 | - $havedata = true; |
|
826 | + //$output_dest .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']'; |
|
827 | + $end_lon = $aairport[0]['longitude']; |
|
828 | + $end_lat = $aairport[0]['latitude']; |
|
829 | + $havedata = true; |
|
830 | 830 | } |
831 | - } |
|
832 | - if ($havedata) { |
|
831 | + } |
|
832 | + if ($havedata) { |
|
833 | 833 | $line = $Common->greatCircle($spotter_item['latitude'],$spotter_item['longitude'],$end_lat,$end_lon); |
834 | 834 | foreach ($line[0] as $coord) { |
835 | 835 | $output_dest .= '['.$coord[0].','.$coord[1].'],'; |
836 | 836 | } |
837 | 837 | $output_dest = substr($output_dest, 0, -1); |
838 | - } |
|
839 | - $output_dest .= ']}},'; |
|
840 | - if ($havedata) $output .= $output_dest; |
|
841 | - unset($output_dest); |
|
838 | + } |
|
839 | + $output_dest .= ']}},'; |
|
840 | + if ($havedata) $output .= $output_dest; |
|
841 | + unset($output_dest); |
|
842 | 842 | } |
843 | 843 | } |
844 | 844 | $output = substr($output, 0, -1); |
@@ -7,13 +7,13 @@ discard block |
||
7 | 7 | //protected $cookies = array(); |
8 | 8 | |
9 | 9 | /** |
10 | - * Get data from form result |
|
11 | - * @param String $url form URL |
|
12 | - * @param String $type type of submit form method (get or post) |
|
13 | - * @param String|Array $data values form post method |
|
14 | - * @param Array $headers header to submit with the form |
|
15 | - * @return String the result |
|
16 | - */ |
|
10 | + * Get data from form result |
|
11 | + * @param String $url form URL |
|
12 | + * @param String $type type of submit form method (get or post) |
|
13 | + * @param String|Array $data values form post method |
|
14 | + * @param Array $headers header to submit with the form |
|
15 | + * @return String the result |
|
16 | + */ |
|
17 | 17 | public function getData($url, $type = 'get', $data = '', $headers = '',$cookie = '',$referer = '',$timeout = '',$useragent = '', $sizelimit = false, $async = false) { |
18 | 18 | global $globalProxy, $globalForceIPv4; |
19 | 19 | $ch = curl_init(); |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * Convert a HTML table to an array |
|
170 | - * @param String $data HTML page |
|
171 | - * @return Array array of the tables in HTML page |
|
172 | - */ |
|
169 | + * Convert a HTML table to an array |
|
170 | + * @param String $data HTML page |
|
171 | + * @return Array array of the tables in HTML page |
|
172 | + */ |
|
173 | 173 | public function table2array($data) { |
174 | 174 | if (!is_string($data)) return array(); |
175 | 175 | if ($data == '') return array(); |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | } |
204 | 204 | |
205 | 205 | /** |
206 | - * Convert <p> part of a HTML page to an array |
|
207 | - * @param String $data HTML page |
|
208 | - * @return Array array of the <p> in HTML page |
|
209 | - */ |
|
206 | + * Convert <p> part of a HTML page to an array |
|
207 | + * @param String $data HTML page |
|
208 | + * @return Array array of the <p> in HTML page |
|
209 | + */ |
|
210 | 210 | public function text2array($data) { |
211 | 211 | $html = str_get_html($data); |
212 | 212 | if ($html === false) return array(); |
@@ -221,14 +221,14 @@ discard block |
||
221 | 221 | } |
222 | 222 | |
223 | 223 | /** |
224 | - * Give distance between 2 coordonnates |
|
225 | - * @param Float $lat latitude of first point |
|
226 | - * @param Float $lon longitude of first point |
|
227 | - * @param Float $latc latitude of second point |
|
228 | - * @param Float $lonc longitude of second point |
|
229 | - * @param String $unit km else no unit used |
|
230 | - * @return Float Distance in $unit |
|
231 | - */ |
|
224 | + * Give distance between 2 coordonnates |
|
225 | + * @param Float $lat latitude of first point |
|
226 | + * @param Float $lon longitude of first point |
|
227 | + * @param Float $latc latitude of second point |
|
228 | + * @param Float $lonc longitude of second point |
|
229 | + * @param String $unit km else no unit used |
|
230 | + * @return Float Distance in $unit |
|
231 | + */ |
|
232 | 232 | public function distance($lat, $lon, $latc, $lonc, $unit = 'km') { |
233 | 233 | if ($lat == $latc && $lon == $lonc) return 0; |
234 | 234 | $dist = rad2deg(acos(sin(deg2rad(floatval($lat)))*sin(deg2rad(floatval($latc)))+ cos(deg2rad(floatval($lat)))*cos(deg2rad(floatval($latc)))*cos(deg2rad(floatval($lon)-floatval($lonc)))))*60*1.1515; |
@@ -246,12 +246,12 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | - * Give plunge between 2 altitudes and distance |
|
250 | - * @param Float $initial_altitude altitude of first point in m |
|
251 | - * @param Float $final_altitude altitude of second point in m |
|
252 | - * @param String $distance distance between two points in m |
|
253 | - * @return Float plunge |
|
254 | - */ |
|
249 | + * Give plunge between 2 altitudes and distance |
|
250 | + * @param Float $initial_altitude altitude of first point in m |
|
251 | + * @param Float $final_altitude altitude of second point in m |
|
252 | + * @param String $distance distance between two points in m |
|
253 | + * @return Float plunge |
|
254 | + */ |
|
255 | 255 | public function plunge($initial_altitude,$final_altitude,$distance) { |
256 | 256 | $plunge = rad2deg(asin(($final_altitude-$initial_altitude)/$distance)); |
257 | 257 | /* |
@@ -265,13 +265,13 @@ discard block |
||
265 | 265 | } |
266 | 266 | |
267 | 267 | /** |
268 | - * Give azimuth between 2 coordonnates |
|
269 | - * @param Float $lat latitude of first point |
|
270 | - * @param Float $lon longitude of first point |
|
271 | - * @param Float $latc latitude of second point |
|
272 | - * @param Float $lonc longitude of second point |
|
273 | - * @return Float Azimuth |
|
274 | - */ |
|
268 | + * Give azimuth between 2 coordonnates |
|
269 | + * @param Float $lat latitude of first point |
|
270 | + * @param Float $lon longitude of first point |
|
271 | + * @param Float $latc latitude of second point |
|
272 | + * @param Float $lonc longitude of second point |
|
273 | + * @return Float Azimuth |
|
274 | + */ |
|
275 | 275 | public function azimuth($lat, $lon, $latc, $lonc) { |
276 | 276 | $dX = $latc - $lat; |
277 | 277 | $dY = $lonc - $lon; |
@@ -282,11 +282,11 @@ discard block |
||
282 | 282 | |
283 | 283 | |
284 | 284 | /** |
285 | - * Check is distance realistic |
|
286 | - * @param int $timeDifference the time between the reception of both messages |
|
287 | - * @param float $distance distance covered |
|
288 | - * @return whether distance is realistic |
|
289 | - */ |
|
285 | + * Check is distance realistic |
|
286 | + * @param int $timeDifference the time between the reception of both messages |
|
287 | + * @param float $distance distance covered |
|
288 | + * @return whether distance is realistic |
|
289 | + */ |
|
290 | 290 | public function withinThreshold ($timeDifference, $distance) { |
291 | 291 | $x = abs($timeDifference); |
292 | 292 | $d = abs($distance); |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | } |
337 | 337 | |
338 | 338 | /** |
339 | - * Copy folder contents |
|
340 | - * @param string $source Source path |
|
341 | - * @param string $dest Destination path |
|
342 | - * @return bool Returns true on success, false on failure |
|
343 | - */ |
|
339 | + * Copy folder contents |
|
340 | + * @param string $source Source path |
|
341 | + * @param string $dest Destination path |
|
342 | + * @return bool Returns true on success, false on failure |
|
343 | + */ |
|
344 | 344 | public function xcopy($source, $dest) |
345 | 345 | { |
346 | 346 | $files = glob($source.'*.*'); |
@@ -352,20 +352,20 @@ discard block |
||
352 | 352 | } |
353 | 353 | |
354 | 354 | /** |
355 | - * Check if an url exist |
|
356 | - * @param String $url url to check |
|
357 | - * @return bool Return true on succes false on failure |
|
358 | - */ |
|
355 | + * Check if an url exist |
|
356 | + * @param String $url url to check |
|
357 | + * @return bool Return true on succes false on failure |
|
358 | + */ |
|
359 | 359 | public function urlexist($url){ |
360 | 360 | $headers=get_headers($url); |
361 | 361 | return stripos($headers[0],"200 OK")?true:false; |
362 | 362 | } |
363 | 363 | |
364 | 364 | /** |
365 | - * Convert hexa to string |
|
366 | - * @param String $hex data in hexa |
|
367 | - * @return String Return result |
|
368 | - */ |
|
365 | + * Convert hexa to string |
|
366 | + * @param String $hex data in hexa |
|
367 | + * @return String Return result |
|
368 | + */ |
|
369 | 369 | public function hex2str($hex) { |
370 | 370 | $str = ''; |
371 | 371 | $hexln = strlen($hex); |
@@ -374,10 +374,10 @@ discard block |
||
374 | 374 | } |
375 | 375 | |
376 | 376 | /** |
377 | - * Convert hexa color to rgb |
|
378 | - * @param String $hex data in hexa |
|
379 | - * @return String Return result |
|
380 | - */ |
|
377 | + * Convert hexa color to rgb |
|
378 | + * @param String $hex data in hexa |
|
379 | + * @return String Return result |
|
380 | + */ |
|
381 | 381 | public function hex2rgb($hex) { |
382 | 382 | $hex = str_replace('#','',$hex); |
383 | 383 | return sscanf($hex, "%02x%02x%02x"); |
@@ -455,9 +455,9 @@ discard block |
||
455 | 455 | } |
456 | 456 | |
457 | 457 | /** |
458 | - * Returns list of available locales |
|
459 | - * |
|
460 | - * @return array |
|
458 | + * Returns list of available locales |
|
459 | + * |
|
460 | + * @return array |
|
461 | 461 | */ |
462 | 462 | public function listLocaleDir() |
463 | 463 | { |
@@ -556,100 +556,100 @@ discard block |
||
556 | 556 | public function remove_accents($string) { |
557 | 557 | if ( !preg_match('/[\x80-\xff]/', $string) ) return $string; |
558 | 558 | $chars = array( |
559 | - // Decompositions for Latin-1 Supplement |
|
560 | - chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', |
|
561 | - chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', |
|
562 | - chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', |
|
563 | - chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', |
|
564 | - chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', |
|
565 | - chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', |
|
566 | - chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', |
|
567 | - chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', |
|
568 | - chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', |
|
569 | - chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', |
|
570 | - chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', |
|
571 | - chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', |
|
572 | - chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', |
|
573 | - chr(195).chr(159) => 's', chr(195).chr(160) => 'a', |
|
574 | - chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', |
|
575 | - chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', |
|
576 | - chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', |
|
577 | - chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', |
|
578 | - chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', |
|
579 | - chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', |
|
580 | - chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', |
|
581 | - chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', |
|
582 | - chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', |
|
583 | - chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', |
|
584 | - chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', |
|
585 | - chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', |
|
586 | - chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', |
|
587 | - chr(195).chr(191) => 'y', |
|
588 | - // Decompositions for Latin Extended-A |
|
589 | - chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', |
|
590 | - chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', |
|
591 | - chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', |
|
592 | - chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', |
|
593 | - chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', |
|
594 | - chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', |
|
595 | - chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', |
|
596 | - chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', |
|
597 | - chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', |
|
598 | - chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', |
|
599 | - chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', |
|
600 | - chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', |
|
601 | - chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', |
|
602 | - chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', |
|
603 | - chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', |
|
604 | - chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', |
|
605 | - chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', |
|
606 | - chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', |
|
607 | - chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', |
|
608 | - chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', |
|
609 | - chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', |
|
610 | - chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', |
|
611 | - chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', |
|
612 | - chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', |
|
613 | - chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', |
|
614 | - chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', |
|
615 | - chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', |
|
616 | - chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', |
|
617 | - chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', |
|
618 | - chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', |
|
619 | - chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', |
|
620 | - chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', |
|
621 | - chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', |
|
622 | - chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', |
|
623 | - chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', |
|
624 | - chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', |
|
625 | - chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', |
|
626 | - chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', |
|
627 | - chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', |
|
628 | - chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', |
|
629 | - chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', |
|
630 | - chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', |
|
631 | - chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', |
|
632 | - chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', |
|
633 | - chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', |
|
634 | - chr(197).chr(154) => 'S',chr(197).chr(155) => 's', |
|
635 | - chr(197).chr(156) => 'S',chr(197).chr(157) => 's', |
|
636 | - chr(197).chr(158) => 'S',chr(197).chr(159) => 's', |
|
637 | - chr(197).chr(160) => 'S', chr(197).chr(161) => 's', |
|
638 | - chr(197).chr(162) => 'T', chr(197).chr(163) => 't', |
|
639 | - chr(197).chr(164) => 'T', chr(197).chr(165) => 't', |
|
640 | - chr(197).chr(166) => 'T', chr(197).chr(167) => 't', |
|
641 | - chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', |
|
642 | - chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', |
|
643 | - chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', |
|
644 | - chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', |
|
645 | - chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', |
|
646 | - chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', |
|
647 | - chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', |
|
648 | - chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', |
|
649 | - chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', |
|
650 | - chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', |
|
651 | - chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', |
|
652 | - chr(197).chr(190) => 'z', chr(197).chr(191) => 's' |
|
559 | + // Decompositions for Latin-1 Supplement |
|
560 | + chr(195).chr(128) => 'A', chr(195).chr(129) => 'A', |
|
561 | + chr(195).chr(130) => 'A', chr(195).chr(131) => 'A', |
|
562 | + chr(195).chr(132) => 'A', chr(195).chr(133) => 'A', |
|
563 | + chr(195).chr(135) => 'C', chr(195).chr(136) => 'E', |
|
564 | + chr(195).chr(137) => 'E', chr(195).chr(138) => 'E', |
|
565 | + chr(195).chr(139) => 'E', chr(195).chr(140) => 'I', |
|
566 | + chr(195).chr(141) => 'I', chr(195).chr(142) => 'I', |
|
567 | + chr(195).chr(143) => 'I', chr(195).chr(145) => 'N', |
|
568 | + chr(195).chr(146) => 'O', chr(195).chr(147) => 'O', |
|
569 | + chr(195).chr(148) => 'O', chr(195).chr(149) => 'O', |
|
570 | + chr(195).chr(150) => 'O', chr(195).chr(153) => 'U', |
|
571 | + chr(195).chr(154) => 'U', chr(195).chr(155) => 'U', |
|
572 | + chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y', |
|
573 | + chr(195).chr(159) => 's', chr(195).chr(160) => 'a', |
|
574 | + chr(195).chr(161) => 'a', chr(195).chr(162) => 'a', |
|
575 | + chr(195).chr(163) => 'a', chr(195).chr(164) => 'a', |
|
576 | + chr(195).chr(165) => 'a', chr(195).chr(167) => 'c', |
|
577 | + chr(195).chr(168) => 'e', chr(195).chr(169) => 'e', |
|
578 | + chr(195).chr(170) => 'e', chr(195).chr(171) => 'e', |
|
579 | + chr(195).chr(172) => 'i', chr(195).chr(173) => 'i', |
|
580 | + chr(195).chr(174) => 'i', chr(195).chr(175) => 'i', |
|
581 | + chr(195).chr(177) => 'n', chr(195).chr(178) => 'o', |
|
582 | + chr(195).chr(179) => 'o', chr(195).chr(180) => 'o', |
|
583 | + chr(195).chr(181) => 'o', chr(195).chr(182) => 'o', |
|
584 | + chr(195).chr(182) => 'o', chr(195).chr(185) => 'u', |
|
585 | + chr(195).chr(186) => 'u', chr(195).chr(187) => 'u', |
|
586 | + chr(195).chr(188) => 'u', chr(195).chr(189) => 'y', |
|
587 | + chr(195).chr(191) => 'y', |
|
588 | + // Decompositions for Latin Extended-A |
|
589 | + chr(196).chr(128) => 'A', chr(196).chr(129) => 'a', |
|
590 | + chr(196).chr(130) => 'A', chr(196).chr(131) => 'a', |
|
591 | + chr(196).chr(132) => 'A', chr(196).chr(133) => 'a', |
|
592 | + chr(196).chr(134) => 'C', chr(196).chr(135) => 'c', |
|
593 | + chr(196).chr(136) => 'C', chr(196).chr(137) => 'c', |
|
594 | + chr(196).chr(138) => 'C', chr(196).chr(139) => 'c', |
|
595 | + chr(196).chr(140) => 'C', chr(196).chr(141) => 'c', |
|
596 | + chr(196).chr(142) => 'D', chr(196).chr(143) => 'd', |
|
597 | + chr(196).chr(144) => 'D', chr(196).chr(145) => 'd', |
|
598 | + chr(196).chr(146) => 'E', chr(196).chr(147) => 'e', |
|
599 | + chr(196).chr(148) => 'E', chr(196).chr(149) => 'e', |
|
600 | + chr(196).chr(150) => 'E', chr(196).chr(151) => 'e', |
|
601 | + chr(196).chr(152) => 'E', chr(196).chr(153) => 'e', |
|
602 | + chr(196).chr(154) => 'E', chr(196).chr(155) => 'e', |
|
603 | + chr(196).chr(156) => 'G', chr(196).chr(157) => 'g', |
|
604 | + chr(196).chr(158) => 'G', chr(196).chr(159) => 'g', |
|
605 | + chr(196).chr(160) => 'G', chr(196).chr(161) => 'g', |
|
606 | + chr(196).chr(162) => 'G', chr(196).chr(163) => 'g', |
|
607 | + chr(196).chr(164) => 'H', chr(196).chr(165) => 'h', |
|
608 | + chr(196).chr(166) => 'H', chr(196).chr(167) => 'h', |
|
609 | + chr(196).chr(168) => 'I', chr(196).chr(169) => 'i', |
|
610 | + chr(196).chr(170) => 'I', chr(196).chr(171) => 'i', |
|
611 | + chr(196).chr(172) => 'I', chr(196).chr(173) => 'i', |
|
612 | + chr(196).chr(174) => 'I', chr(196).chr(175) => 'i', |
|
613 | + chr(196).chr(176) => 'I', chr(196).chr(177) => 'i', |
|
614 | + chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij', |
|
615 | + chr(196).chr(180) => 'J', chr(196).chr(181) => 'j', |
|
616 | + chr(196).chr(182) => 'K', chr(196).chr(183) => 'k', |
|
617 | + chr(196).chr(184) => 'k', chr(196).chr(185) => 'L', |
|
618 | + chr(196).chr(186) => 'l', chr(196).chr(187) => 'L', |
|
619 | + chr(196).chr(188) => 'l', chr(196).chr(189) => 'L', |
|
620 | + chr(196).chr(190) => 'l', chr(196).chr(191) => 'L', |
|
621 | + chr(197).chr(128) => 'l', chr(197).chr(129) => 'L', |
|
622 | + chr(197).chr(130) => 'l', chr(197).chr(131) => 'N', |
|
623 | + chr(197).chr(132) => 'n', chr(197).chr(133) => 'N', |
|
624 | + chr(197).chr(134) => 'n', chr(197).chr(135) => 'N', |
|
625 | + chr(197).chr(136) => 'n', chr(197).chr(137) => 'N', |
|
626 | + chr(197).chr(138) => 'n', chr(197).chr(139) => 'N', |
|
627 | + chr(197).chr(140) => 'O', chr(197).chr(141) => 'o', |
|
628 | + chr(197).chr(142) => 'O', chr(197).chr(143) => 'o', |
|
629 | + chr(197).chr(144) => 'O', chr(197).chr(145) => 'o', |
|
630 | + chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe', |
|
631 | + chr(197).chr(148) => 'R',chr(197).chr(149) => 'r', |
|
632 | + chr(197).chr(150) => 'R',chr(197).chr(151) => 'r', |
|
633 | + chr(197).chr(152) => 'R',chr(197).chr(153) => 'r', |
|
634 | + chr(197).chr(154) => 'S',chr(197).chr(155) => 's', |
|
635 | + chr(197).chr(156) => 'S',chr(197).chr(157) => 's', |
|
636 | + chr(197).chr(158) => 'S',chr(197).chr(159) => 's', |
|
637 | + chr(197).chr(160) => 'S', chr(197).chr(161) => 's', |
|
638 | + chr(197).chr(162) => 'T', chr(197).chr(163) => 't', |
|
639 | + chr(197).chr(164) => 'T', chr(197).chr(165) => 't', |
|
640 | + chr(197).chr(166) => 'T', chr(197).chr(167) => 't', |
|
641 | + chr(197).chr(168) => 'U', chr(197).chr(169) => 'u', |
|
642 | + chr(197).chr(170) => 'U', chr(197).chr(171) => 'u', |
|
643 | + chr(197).chr(172) => 'U', chr(197).chr(173) => 'u', |
|
644 | + chr(197).chr(174) => 'U', chr(197).chr(175) => 'u', |
|
645 | + chr(197).chr(176) => 'U', chr(197).chr(177) => 'u', |
|
646 | + chr(197).chr(178) => 'U', chr(197).chr(179) => 'u', |
|
647 | + chr(197).chr(180) => 'W', chr(197).chr(181) => 'w', |
|
648 | + chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y', |
|
649 | + chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z', |
|
650 | + chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z', |
|
651 | + chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z', |
|
652 | + chr(197).chr(190) => 'z', chr(197).chr(191) => 's' |
|
653 | 653 | ); |
654 | 654 | $string = strtr($string, $chars); |
655 | 655 | return $string; |
@@ -790,7 +790,7 @@ discard block |
||
790 | 790 | $dfX = $first_pass[$j][0]; |
791 | 791 | $dfDiffLong = abs($dfX - $dfPrevX); |
792 | 792 | if ($dfDiffLong > $dfDiffSpace && |
793 | - (($dfX > $dfLeftBorderX && $dfPrevX < $dfRightBorderX) || ($dfPrevX > $dfLeftBorderX && $dfX < $dfRightBorderX))) |
|
793 | + (($dfX > $dfLeftBorderX && $dfPrevX < $dfRightBorderX) || ($dfPrevX > $dfLeftBorderX && $dfX < $dfRightBorderX))) |
|
794 | 794 | { |
795 | 795 | $bHasBigDiff = true; |
796 | 796 | } else if ($dfDiffLong > $dfMaxSmallDiffLong) { |
@@ -810,8 +810,8 @@ discard block |
||
810 | 810 | $dfX2 = floatval($first_pass[$k][0]); |
811 | 811 | $dfY2 = floatval($first_pass[$k][1]); |
812 | 812 | if ($dfX1 > -180 && $dfX1 < $dfRightBorderX && $dfX2 == 180 && |
813 | - $k+1 < count($first_pass) && |
|
814 | - $first_pass[$k-1][0] > -180 && $first_pass[$k-1][0] < $dfRightBorderX) |
|
813 | + $k+1 < count($first_pass) && |
|
814 | + $first_pass[$k-1][0] > -180 && $first_pass[$k-1][0] < $dfRightBorderX) |
|
815 | 815 | { |
816 | 816 | $poNewLS[] = array(-180, $first_pass[$k][1]); |
817 | 817 | $k++; |
@@ -819,8 +819,8 @@ discard block |
||
819 | 819 | $poNewLS[] = array($first_pass[$k][0], $first_pass[$k][1]); |
820 | 820 | continue; |
821 | 821 | } else if ($dfX1 > $dfLeftBorderX && $dfX1 < 180 && $dfX2 == -180 && |
822 | - $k+1 < $first_pass_ln && |
|
823 | - $first_pass[$k-1][0] > $dfLeftBorderX && $first_pass[$k-1][0] < 180) |
|
822 | + $k+1 < $first_pass_ln && |
|
823 | + $first_pass[$k-1][0] > $dfLeftBorderX && $first_pass[$k-1][0] < 180) |
|
824 | 824 | { |
825 | 825 | $poNewLS[] = array(180, $first_pass[$k][1]); |
826 | 826 | $k++; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | <?php }; if (isset($globalSatellite) && $globalSatellite) { ?><td><div id="ibxsatellite"><h4><?php echo _("Satellites Displayed"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?> |
48 | 48 | </tr></table></div> |
49 | 49 | <?php |
50 | - if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
50 | + if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
51 | 51 | ?> |
52 | 52 | <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
53 | 53 | <?php |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script> |
72 | 72 | <?php |
73 | 73 | } |
74 | - } |
|
74 | + } |
|
75 | 75 | ?> |
76 | 76 | |
77 | 77 | <div id="sidebar" class="sidebar collapsed"> |
@@ -82,34 +82,34 @@ discard block |
||
82 | 82 | <li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
83 | 83 | <li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
84 | 84 | <?php |
85 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
85 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
86 | 86 | if (isset($globalArchive) && $globalArchive == TRUE) { |
87 | 87 | ?> |
88 | 88 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
89 | 89 | <?php |
90 | 90 | } |
91 | - } |
|
91 | + } |
|
92 | 92 | ?> |
93 | 93 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
94 | 94 | <li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li> |
95 | 95 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
96 | 96 | <?php |
97 | - if (isset($globalMap3D) && $globalMap3D) { |
|
97 | + if (isset($globalMap3D) && $globalMap3D) { |
|
98 | 98 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
99 | 99 | ?> |
100 | 100 | <li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li> |
101 | 101 | <?php |
102 | 102 | } else { |
103 | - if (isset($globalSatellite) && $globalSatellite) { |
|
103 | + if (isset($globalSatellite) && $globalSatellite) { |
|
104 | 104 | ?> |
105 | 105 | <li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li> |
106 | 106 | <?php |
107 | - } |
|
107 | + } |
|
108 | 108 | ?> |
109 | 109 | <li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li> |
110 | 110 | <?php |
111 | 111 | } |
112 | - } |
|
112 | + } |
|
113 | 113 | ?> |
114 | 114 | </ul> |
115 | 115 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | ?> |
185 | 185 | </div> |
186 | 186 | <?php |
187 | - if (isset($globalArchive) && $globalArchive == TRUE) { |
|
187 | + if (isset($globalArchive) && $globalArchive == TRUE) { |
|
188 | 188 | ?> |
189 | 189 | <div class="sidebar-pane" id="archive"> |
190 | 190 | <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | </form> |
244 | 244 | </div> |
245 | 245 | <?php |
246 | - } |
|
246 | + } |
|
247 | 247 | ?> |
248 | 248 | <div class="sidebar-pane" id="settings"> |
249 | 249 | <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -254,72 +254,72 @@ discard block |
||
254 | 254 | <?php |
255 | 255 | if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
256 | 256 | else $MapType = $_COOKIE['MapType']; |
257 | - ?> |
|
257 | + ?> |
|
258 | 258 | <?php |
259 | 259 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
260 | - ?> |
|
260 | + ?> |
|
261 | 261 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
262 | 262 | <?php |
263 | 263 | } else { |
264 | - if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
265 | - ?> |
|
264 | + if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
265 | + ?> |
|
266 | 266 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
267 | 267 | <?php |
268 | - } |
|
269 | - ?> |
|
268 | + } |
|
269 | + ?> |
|
270 | 270 | <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
271 | 271 | <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
272 | 272 | <?php |
273 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
274 | - ?> |
|
273 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
274 | + ?> |
|
275 | 275 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
276 | 276 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
277 | 277 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
278 | 278 | <?php |
279 | - } |
|
280 | - ?> |
|
279 | + } |
|
280 | + ?> |
|
281 | 281 | <?php |
282 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
283 | - ?> |
|
282 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
283 | + ?> |
|
284 | 284 | <?php |
285 | 285 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
286 | - ?> |
|
286 | + ?> |
|
287 | 287 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
288 | 288 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
289 | 289 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
290 | 290 | <?php |
291 | 291 | } |
292 | - ?> |
|
292 | + ?> |
|
293 | 293 | <?php |
294 | 294 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
295 | - ?> |
|
295 | + ?> |
|
296 | 296 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
297 | 297 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
298 | 298 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
299 | 299 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
300 | 300 | <?php |
301 | 301 | } |
302 | - ?> |
|
302 | + ?> |
|
303 | 303 | <?php |
304 | 304 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
305 | - ?> |
|
305 | + ?> |
|
306 | 306 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
307 | 307 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
308 | 308 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
309 | 309 | <?php |
310 | 310 | } |
311 | - ?> |
|
311 | + ?> |
|
312 | 312 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
313 | 313 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
314 | 314 | <?php |
315 | - } |
|
316 | - ?> |
|
315 | + } |
|
316 | + ?> |
|
317 | 317 | <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
318 | 318 | <?php |
319 | - if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
319 | + if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
320 | 320 | if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
321 | 321 | else $MapBoxId = $_COOKIE['MapTypeId']; |
322 | - ?> |
|
322 | + ?> |
|
323 | 323 | <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
324 | 324 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
325 | 325 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
@@ -334,16 +334,16 @@ discard block |
||
334 | 334 | <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
335 | 335 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
336 | 336 | <?php |
337 | - } |
|
338 | - ?> |
|
337 | + } |
|
338 | + ?> |
|
339 | 339 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
340 | 340 | <?php |
341 | 341 | } |
342 | - ?> |
|
342 | + ?> |
|
343 | 343 | </select> |
344 | 344 | </li> |
345 | 345 | <?php |
346 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
346 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
347 | 347 | ?> |
348 | 348 | <li><?php echo _("Type of Terrain:"); ?> |
349 | 349 | <select class="selectpicker" onchange="terrainType(this);"> |
@@ -354,10 +354,10 @@ discard block |
||
354 | 354 | </select> |
355 | 355 | </li> |
356 | 356 | <?php |
357 | - } |
|
357 | + } |
|
358 | 358 | ?> |
359 | 359 | <?php |
360 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
360 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
361 | 361 | ?> |
362 | 362 | <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
363 | 363 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
381 | 381 | <?php |
382 | 382 | } |
383 | - } |
|
383 | + } |
|
384 | 384 | ?> |
385 | 385 | <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li> |
386 | 386 | <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
@@ -392,82 +392,82 @@ discard block |
||
392 | 392 | <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li> |
393 | 393 | <?php |
394 | 394 | } |
395 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
395 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
396 | 396 | ?> |
397 | 397 | <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> |
398 | 398 | <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
399 | 399 | <?php |
400 | - } |
|
401 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
400 | + } |
|
401 | + if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
402 | 402 | ?> |
403 | 403 | <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li> |
404 | 404 | <?php |
405 | - } |
|
405 | + } |
|
406 | 406 | ?> |
407 | 407 | <?php |
408 | 408 | if (function_exists('array_column')) { |
409 | - if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
410 | - ?> |
|
409 | + if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
410 | + ?> |
|
411 | 411 | <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> |
412 | 412 | <?php |
413 | - } |
|
413 | + } |
|
414 | 414 | } elseif (isset($globalSources)) { |
415 | - $dispolar = false; |
|
416 | - foreach ($globalSources as $testsource) { |
|
417 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
418 | - } |
|
419 | - if ($dispolar) { |
|
420 | - ?> |
|
415 | + $dispolar = false; |
|
416 | + foreach ($globalSources as $testsource) { |
|
417 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
418 | + } |
|
419 | + if ($dispolar) { |
|
420 | + ?> |
|
421 | 421 | <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> |
422 | 422 | <?php |
423 | - } |
|
424 | - } |
|
425 | - ?> |
|
423 | + } |
|
424 | + } |
|
425 | + ?> |
|
426 | 426 | <?php |
427 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
427 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
428 | 428 | ?> |
429 | 429 | |
430 | 430 | <?php |
431 | 431 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
432 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
433 | - ?> |
|
432 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
433 | + ?> |
|
434 | 434 | <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> |
435 | 435 | <?php |
436 | 436 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
437 | - ?> |
|
437 | + ?> |
|
438 | 438 | <li><?php echo _("Aircraft icon color:"); ?> |
439 | 439 | <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'; ?>"> |
440 | 440 | </li> |
441 | 441 | <?php |
442 | 442 | } |
443 | - } |
|
444 | - } |
|
445 | - ?> |
|
443 | + } |
|
444 | + } |
|
445 | + ?> |
|
446 | 446 | <?php |
447 | 447 | if (isset($globalMarine) && $globalMarine === TRUE) { |
448 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
449 | - ?> |
|
448 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
449 | + ?> |
|
450 | 450 | <li><?php echo _("Marine icon color:"); ?> |
451 | 451 | <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>"> |
452 | 452 | </li> |
453 | 453 | <?php |
454 | - } |
|
455 | - } |
|
456 | - ?> |
|
454 | + } |
|
455 | + } |
|
456 | + ?> |
|
457 | 457 | <?php |
458 | 458 | if (isset($globalTracker) && $globalTracker === TRUE) { |
459 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
460 | - ?> |
|
459 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
460 | + ?> |
|
461 | 461 | <li><?php echo _("Tracker icon color:"); ?> |
462 | 462 | <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>"> |
463 | 463 | </li> |
464 | 464 | <?php |
465 | - } |
|
466 | - } |
|
467 | - ?> |
|
465 | + } |
|
466 | + } |
|
467 | + ?> |
|
468 | 468 | <?php |
469 | 469 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
470 | - ?> |
|
470 | + ?> |
|
471 | 471 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
472 | 472 | <div class="range"> |
473 | 473 | <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'; ?>"> |
@@ -476,9 +476,9 @@ discard block |
||
476 | 476 | </li> |
477 | 477 | <?php |
478 | 478 | } |
479 | - ?> |
|
479 | + ?> |
|
480 | 480 | <?php |
481 | - } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
481 | + } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
482 | 482 | ?> |
483 | 483 | <?php |
484 | 484 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | </li> |
511 | 511 | <?php |
512 | 512 | } |
513 | - } |
|
513 | + } |
|
514 | 514 | ?> |
515 | 515 | <li><?php echo _("Distance unit:"); ?> |
516 | 516 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -543,19 +543,19 @@ discard block |
||
543 | 543 | <ul> |
544 | 544 | <?php |
545 | 545 | if (!isset($globalAircraft) || $globalAircraft) { |
546 | - ?> |
|
546 | + ?> |
|
547 | 547 | <?php |
548 | 548 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
549 | - ?> |
|
549 | + ?> |
|
550 | 550 | <?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 } ?> |
551 | 551 | <?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 } ?> |
552 | 552 | <?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 } ?> |
553 | 553 | <?php |
554 | 554 | } |
555 | - ?> |
|
555 | + ?> |
|
556 | 556 | <?php |
557 | 557 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
558 | - ?> |
|
558 | + ?> |
|
559 | 559 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
560 | 560 | <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> |
561 | 561 | <?php } ?> |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | <?php } ?> |
565 | 565 | <?php |
566 | 566 | } |
567 | - ?> |
|
567 | + ?> |
|
568 | 568 | <li><?php echo _("Display airlines:"); ?> |
569 | 569 | <br/> |
570 | 570 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -584,14 +584,14 @@ discard block |
||
584 | 584 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
585 | 585 | } |
586 | 586 | } |
587 | - ?> |
|
587 | + ?> |
|
588 | 588 | </select> |
589 | 589 | </li> |
590 | 590 | <?php |
591 | 591 | $Spotter = new Spotter(); |
592 | 592 | $allalliancenames = $Spotter->getAllAllianceNames(); |
593 | 593 | if (!empty($allalliancenames)) { |
594 | - ?> |
|
594 | + ?> |
|
595 | 595 | <li><?php echo _("Display alliance:"); ?> |
596 | 596 | <br/> |
597 | 597 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -605,18 +605,18 @@ discard block |
||
605 | 605 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
606 | 606 | } |
607 | 607 | } |
608 | - ?> |
|
608 | + ?> |
|
609 | 609 | </select> |
610 | 610 | </li> |
611 | 611 | <?php |
612 | 612 | } |
613 | - ?> |
|
613 | + ?> |
|
614 | 614 | <?php |
615 | 615 | } |
616 | - ?> |
|
616 | + ?> |
|
617 | 617 | <?php |
618 | 618 | if (isset($globalAPRS) && $globalAPRS) { |
619 | - ?> |
|
619 | + ?> |
|
620 | 620 | <li><?php echo _("Display APRS sources name:"); ?> |
621 | 621 | <select class="selectpicker" multiple onchange="sources(this);"> |
622 | 622 | <?php |
@@ -640,18 +640,18 @@ discard block |
||
640 | 640 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
641 | 641 | } |
642 | 642 | } |
643 | - ?> |
|
643 | + ?> |
|
644 | 644 | </select> |
645 | 645 | </li> |
646 | 646 | <?php |
647 | 647 | } |
648 | - ?> |
|
648 | + ?> |
|
649 | 649 | <?php |
650 | 650 | if (!isset($globalAircraft) || $globalAircraft) { |
651 | - ?> |
|
651 | + ?> |
|
652 | 652 | <?php |
653 | - if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
654 | - ?> |
|
653 | + if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
654 | + ?> |
|
655 | 655 | <li><?php echo _("Display airlines of type:"); ?><br/> |
656 | 656 | <select class="selectpicker" onchange="airlinestype(this);"> |
657 | 657 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -661,21 +661,21 @@ discard block |
||
661 | 661 | </select> |
662 | 662 | </li> |
663 | 663 | <?php |
664 | - } |
|
665 | - ?> |
|
664 | + } |
|
665 | + ?> |
|
666 | 666 | <?php |
667 | 667 | } |
668 | - ?> |
|
668 | + ?> |
|
669 | 669 | <?php |
670 | 670 | if (isset($globalMarine) && $globalMarine) { |
671 | - ?> |
|
671 | + ?> |
|
672 | 672 | <li> |
673 | 673 | <?php echo _("Display vessels with MMSI:"); ?> |
674 | 674 | <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
675 | 675 | </li> |
676 | 676 | <?php |
677 | 677 | } |
678 | - ?> |
|
678 | + ?> |
|
679 | 679 | <li> |
680 | 680 | <?php echo _("Display with ident:"); ?> |
681 | 681 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | </form> |
689 | 689 | </div> |
690 | 690 | <?php |
691 | - if (isset($globalSatellite) && $globalSatellite) { |
|
691 | + if (isset($globalSatellite) && $globalSatellite) { |
|
692 | 692 | ?> |
693 | 693 | <div class="sidebar-pane" id="satellites"> |
694 | 694 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -728,14 +728,14 @@ discard block |
||
728 | 728 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
729 | 729 | } |
730 | 730 | } |
731 | - ?> |
|
731 | + ?> |
|
732 | 732 | </select> |
733 | 733 | </li> |
734 | 734 | </ul> |
735 | 735 | </form> |
736 | 736 | </div> |
737 | 737 | <?php |
738 | - } |
|
738 | + } |
|
739 | 739 | ?> |
740 | 740 | </div> |
741 | 741 | </div> |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | }; |
396 | 396 | |
397 | 397 | <?php |
398 | - if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
398 | + if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
399 | 399 | ?> |
400 | 400 | function tskPopup (feature, layer) { |
401 | 401 | var output = ''; |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | }; |
431 | 431 | update_tsk(); |
432 | 432 | <?php |
433 | - } |
|
433 | + } |
|
434 | 434 | ?> |
435 | 435 | map.on('moveend', function() { |
436 | 436 | //if (map.getZoom() > 7) { |
@@ -446,10 +446,10 @@ discard block |
||
446 | 446 | setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
447 | 447 | |
448 | 448 | <?php |
449 | - // Add support for custom json via $globalMapJson |
|
450 | - if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
449 | + // Add support for custom json via $globalMapJson |
|
450 | + if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
451 | 451 | foreach ($globalMapJson as $json) { |
452 | - if (isset($json['url'])) { |
|
452 | + if (isset($json['url'])) { |
|
453 | 453 | ?> |
454 | 454 | update_genLayer('<?php print $json['url']; ?>'); |
455 | 455 | <?php |
@@ -458,9 +458,9 @@ discard block |
||
458 | 458 | setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>); |
459 | 459 | <?php |
460 | 460 | } |
461 | - } |
|
461 | + } |
|
462 | + } |
|
462 | 463 | } |
463 | - } |
|
464 | 464 | |
465 | 465 | ?> |
466 | 466 | //adds the bootstrap tooltip to the map icons |