@@ -9,7 +9,7 @@ |
||
9 | 9 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
10 | 10 | exec("ps ux", $output, $result); |
11 | 11 | $j = 0; |
12 | - foreach ($output as $line) if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
12 | + foreach ($output as $line) if (strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
13 | 13 | if ($j > 1) { |
14 | 14 | echo "Script is already runnning..."; |
15 | 15 | die(); |
@@ -9,7 +9,9 @@ discard block |
||
9 | 9 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
10 | 10 | exec("ps ux", $output, $result); |
11 | 11 | $j = 0; |
12 | - foreach ($output as $line) if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
12 | + foreach ($output as $line) { |
|
13 | + if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ") && !strpos($line, "sudo ")) $j++; |
|
14 | + } |
|
13 | 15 | if ($j > 1) { |
14 | 16 | echo "Script is already runnning..."; |
15 | 17 | die(); |
@@ -29,14 +31,18 @@ discard block |
||
29 | 31 | $update_db->update_notam(); |
30 | 32 | } |
31 | 33 | $update_db->insert_last_notam_update(); |
32 | - } elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) echo "NOTAM are only updated once a day.\n"; |
|
34 | + } elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) { |
|
35 | + echo "NOTAM are only updated once a day.\n"; |
|
36 | + } |
|
33 | 37 | if ($update_db->check_last_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
34 | 38 | $update_db->update_all(); |
35 | 39 | // require_once(dirname(__FILE__).'/../require/class.Spotter.php'); |
36 | 40 | // $Spotter = new Spotter(); |
37 | 41 | // $Spotter->updateFieldsFromOtherTables(); |
38 | 42 | $update_db->insert_last_update(); |
39 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n"; |
|
43 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) { |
|
44 | + echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n"; |
|
45 | + } |
|
40 | 46 | if (isset($globalWaypoints) && $globalWaypoints && $update_db->check_last_airspace_update()) { |
41 | 47 | echo "Check if new airspace version exist..."; |
42 | 48 | echo $update_db->update_airspace_fam(); |
@@ -45,8 +51,11 @@ discard block |
||
45 | 51 | if (isset($globalGeoid) && $globalGeoid && $update_db->check_last_geoid_update()) { |
46 | 52 | echo "Check if new geoid version exist..."; |
47 | 53 | $error = $update_db->update_geoid_fam(); |
48 | - if ($error == '') $update_db->insert_last_geoid_update(); |
|
49 | - else echo $error; |
|
54 | + if ($error == '') { |
|
55 | + $update_db->insert_last_geoid_update(); |
|
56 | + } else { |
|
57 | + echo $error; |
|
58 | + } |
|
50 | 59 | } |
51 | 60 | if (isset($globalMarine) && $globalMarine && $update_db->check_last_marine_identity_update()) { |
52 | 61 | echo "Check if new marine identity version exist..."; |
@@ -64,13 +73,17 @@ discard block |
||
64 | 73 | //echo "Done"; |
65 | 74 | } |
66 | 75 | $update_db->insert_last_owner_update(); |
67 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Owner are only updated every 15 days.\n"; |
|
76 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
77 | + echo "Owner are only updated every 15 days.\n"; |
|
78 | + } |
|
68 | 79 | |
69 | 80 | if ($update_db->check_last_airlines_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
70 | 81 | echo "Updating airlines...\n"; |
71 | 82 | echo $update_db->update_airlines_fam(); |
72 | 83 | $update_db->insert_last_airlines_update(); |
73 | - } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Airlines are only updated every 15 days.\n"; |
|
84 | + } elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
85 | + echo "Airlines are only updated every 15 days.\n"; |
|
86 | + } |
|
74 | 87 | |
75 | 88 | if (isset($globalAccidents) && $globalAccidents && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
76 | 89 | require_once(dirname(__FILE__).'/../require/class.Accident.php'); |
@@ -79,7 +92,9 @@ discard block |
||
79 | 92 | if ($Accident->check_last_accidents_update()) { |
80 | 93 | $Accident->download_update(); |
81 | 94 | $Accident->insert_last_accidents_update(); |
82 | - } else echo "Accidents are updated once a day.\n"; |
|
95 | + } else { |
|
96 | + echo "Accidents are updated once a day.\n"; |
|
97 | + } |
|
83 | 98 | } |
84 | 99 | |
85 | 100 | } |
@@ -92,7 +107,9 @@ discard block |
||
92 | 107 | if ($METAR->check_last_update()) { |
93 | 108 | $METAR->addMETARCycle(); |
94 | 109 | $METAR->insert_last_update(); |
95 | - } else echo "METAR are only updated every 30 minutes.\n"; |
|
110 | + } else { |
|
111 | + echo "METAR are only updated every 30 minutes.\n"; |
|
112 | + } |
|
96 | 113 | } |
97 | 114 | |
98 | 115 | if (isset($globalSchedules) && $globalSchedules && $update_db->check_last_schedules_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
@@ -100,8 +117,10 @@ discard block |
||
100 | 117 | //$update_db->update_oneworld(); |
101 | 118 | $update_db->update_skyteam(); |
102 | 119 | $update_db->insert_last_schedules_update(); |
103 | - } elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Schedules are only updated every 15 days.\n"; |
|
104 | -} |
|
120 | + } elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) { |
|
121 | + echo "Schedules are only updated every 15 days.\n"; |
|
122 | + } |
|
123 | + } |
|
105 | 124 | |
106 | 125 | if (isset($globalArchiveMonths) && $globalArchiveMonths > 0) { |
107 | 126 | echo "Updating statistics and archive old data...\n"; |
@@ -11,14 +11,14 @@ discard block |
||
11 | 11 | |
12 | 12 | $from_archive = false; |
13 | 13 | if (isset($_GET['ident'])) { |
14 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
14 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
15 | 15 | if (isset($_GET['currenttime'])) { |
16 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
16 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
17 | 17 | $currenttime = round($currenttime/1000); |
18 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident,$currenttime); |
|
18 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataByIdent($ident, $currenttime); |
|
19 | 19 | if (empty($spotter_array)) { |
20 | 20 | $from_archive = true; |
21 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident,$currenttime); |
|
21 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataByIdent($ident, $currenttime); |
|
22 | 22 | } |
23 | 23 | } else { |
24 | 24 | $spotter_array = $SpotterLive->getLastLiveSpotterDataByIdent($ident); |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | } |
30 | 30 | } |
31 | 31 | if (isset($_GET['flightaware_id'])) { |
32 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
32 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
33 | 33 | if (isset($_GET['currenttime'])) { |
34 | - $currenttime = filter_input(INPUT_GET,'currenttime',FILTER_SANITIZE_NUMBER_INT); |
|
34 | + $currenttime = filter_input(INPUT_GET, 'currenttime', FILTER_SANITIZE_NUMBER_INT); |
|
35 | 35 | $currenttime = round($currenttime/1000); |
36 | - $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id,$currenttime); |
|
36 | + $spotter_array = $SpotterLive->getDateLiveSpotterDataById($flightaware_id, $currenttime); |
|
37 | 37 | if (empty($spotter_array)) { |
38 | 38 | $from_archive = true; |
39 | 39 | // $spotter_array = $SpotterArchive->getLastArchiveSpotterDataById($flightaware_id); |
40 | - $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id,$currenttime); |
|
40 | + $spotter_array = $SpotterArchive->getDateArchiveSpotterDataById($flightaware_id, $currenttime); |
|
41 | 41 | } |
42 | 42 | } else { |
43 | 43 | $spotter_array = $SpotterLive->getLastLiveSpotterDataById($flightaware_id); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if (isset($spotter_item['image_thumbnail']) && $spotter_item['image_thumbnail'] != "") |
58 | 58 | { |
59 | 59 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
60 | - $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
60 | + $image = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
61 | 61 | } else $image = $spotter_item['image_thumbnail']; |
62 | 62 | } |
63 | 63 | /* else { |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
81 | 81 | if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
82 | 82 | if ($spotter_item['departure_airport_time'] > 2460) { |
83 | - print '<br /><span class="time">'.date('H:m',$spotter_item['departure_airport_time']).'</span>'; |
|
83 | + print '<br /><span class="time">'.date('H:m', $spotter_item['departure_airport_time']).'</span>'; |
|
84 | 84 | } else { |
85 | 85 | print '<br /><span class="time">'.$spotter_item['departure_airport_time'].'</span>'; |
86 | 86 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | print '<span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'" target="_blank">'.$spotter_item['arrival_airport'].'</a></span>'.$spotter_item['arrival_airport_city'].' '.$spotter_item['arrival_airport_country']; |
90 | 90 | if (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
91 | 91 | if ($spotter_item['arrival_airport_time'] > 2460) { |
92 | - print '<br /><span class="time">'.date('H:m',$spotter_item['arrival_airport_time']).'</span>'; |
|
92 | + print '<br /><span class="time">'.date('H:m', $spotter_item['arrival_airport_time']).'</span>'; |
|
93 | 93 | } else { |
94 | 94 | print '<br /><span class="time">'.$spotter_item['arrival_airport_time'].'</span>'; |
95 | 95 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | print '<span>'._("Aircraft").'</span>'; |
109 | 109 | if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
110 | 110 | if (isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_manufacturer']) && $spotter_item['aircraft_manufacturer'] != 'N/A' && isset($spotter_item['aircraft_name']) && $spotter_item['aircraft_name'] != 'N/A') { |
111 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
111 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
112 | 112 | if (count($aircraft_names) == 1) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
113 | 113 | else print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
114 | 114 | } elseif (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | print '<div id ="altitude"><span>'._("Altitude").'</span>'; |
119 | 119 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
120 | 120 | try { |
121 | - $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
|
122 | - } catch(Exception $e) { |
|
121 | + $groundAltitude = $Elevation->getElevation($spotter_item['latitude'], $spotter_item['longitude']); |
|
122 | + } catch (Exception $e) { |
|
123 | 123 | // If catched not exist |
124 | 124 | } |
125 | 125 | } |
@@ -158,9 +158,9 @@ discard block |
||
158 | 158 | if (isset($globalCam) && $globalCam) { |
159 | 159 | require_once(dirname(__FILE__).'/require/class.Common.php'); |
160 | 160 | $Common = new Common(); |
161 | - $azimuth = round($Common->azimuth($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'])); |
|
162 | - $distance = $Common->distance($globalCenterLatitude,$globalCenterLongitude,$spotter_item['latitude'],$spotter_item['longitude'],'m'); |
|
163 | - $plunge = round($Common->plunge($globalCenterAltitude,$spotter_item['real_altitude'],$distance)); |
|
161 | + $azimuth = round($Common->azimuth($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'])); |
|
162 | + $distance = $Common->distance($globalCenterLatitude, $globalCenterLongitude, $spotter_item['latitude'], $spotter_item['longitude'], 'm'); |
|
163 | + $plunge = round($Common->plunge($globalCenterAltitude, $spotter_item['real_altitude'], $distance)); |
|
164 | 164 | print '<div id="camcoordinates"><span>'._("Cam Coordinates").'</span>'; |
165 | 165 | print 'azimuth: '.$azimuth; |
166 | 166 | print ' / '; |
@@ -170,16 +170,16 @@ discard block |
||
170 | 170 | print '</div>'; |
171 | 171 | //echo $Common->getData('http://127.0.0.1/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
172 | 172 | //echo $Common->getData('file://'.dirname(__FILE__).'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
173 | - echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge,'get','','','','','','',false,true); |
|
173 | + echo $Common->getData('http://'.$_SERVER['SERVER_NAME'].'/camera.php?azimuth='.$azimuth.'&plunge='.$plunge, 'get', '', '', '', '', '', '', false, true); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | print '<div id="heading"><span>'._("Heading").'</span>'.$spotter_item['heading'].'°</div>'; |
177 | 177 | if (isset($spotter_item['verticalrate']) && $spotter_item['verticalrate'] != '') { |
178 | 178 | print '<div id="verticalrate"><span>'._("Vertical rate").'</span>'; |
179 | 179 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
180 | - print $spotter_item['verticalrate']. ' ft/min'; |
|
180 | + print $spotter_item['verticalrate'].' ft/min'; |
|
181 | 181 | } else { |
182 | - print round($spotter_item['verticalrate']*0.3048). ' m/min'; |
|
182 | + print round($spotter_item['verticalrate']*0.3048).' m/min'; |
|
183 | 183 | } |
184 | 184 | print '</div>'; |
185 | 185 | } |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | print '</div>'; |
215 | 215 | if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
216 | 216 | if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
217 | - if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
217 | + if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n", "\r", "\n", "\\r", "\\n", "\\r\\n"), '<br/>', $spotter_item['acars']['message'])).'</div>'; |
|
218 | 218 | if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
219 | 219 | print '</div>'; |
220 | 220 | } |
@@ -58,7 +58,9 @@ discard block |
||
58 | 58 | { |
59 | 59 | if ($spotter_item['image_source'] == 'flickr' || $spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart') { |
60 | 60 | $image = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
61 | - } else $image = $spotter_item['image_thumbnail']; |
|
61 | + } else { |
|
62 | + $image = $spotter_item['image_thumbnail']; |
|
63 | + } |
|
62 | 64 | } |
63 | 65 | /* else { |
64 | 66 | $image = "images/placeholder_thumb.png"; |
@@ -75,10 +77,14 @@ discard block |
||
75 | 77 | print '<div class="callsign-details">'; |
76 | 78 | if ($spotter_item['ident'] != 'Not Available') { |
77 | 79 | print '<div class="callsign"><a href="'.$globalURL.'/redirect/'.$spotter_item['flightaware_id'].'" target="_blank">'.$spotter_item['ident'].'</a>'; |
78 | - if (isset($spotter_item['blocked']) && $spotter_item['blocked'] === true) print '<img src="'.$globalURL.'/images/forbidden.png" title="'._("Callsign is in blocked FAA list").'" class="blocked" />'; |
|
80 | + if (isset($spotter_item['blocked']) && $spotter_item['blocked'] === true) { |
|
81 | + print '<img src="'.$globalURL.'/images/forbidden.png" title="'._("Callsign is in blocked FAA list").'" class="blocked" />'; |
|
82 | + } |
|
79 | 83 | print '</div>'; |
80 | 84 | } |
81 | - if (isset($spotter_item['airline_name']) && $spotter_item['airline_name'] != 'Not Available') print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
85 | + if (isset($spotter_item['airline_name']) && $spotter_item['airline_name'] != 'Not Available') { |
|
86 | + print '<div class="airline">'.$spotter_item['airline_name'].'</div>'; |
|
87 | + } |
|
82 | 88 | print '</div>'; |
83 | 89 | if ($spotter_item['departure_airport'] != 'NA' && $spotter_item['arrival_airport'] != 'NA') { |
84 | 90 | print '<div class="nomobile airports"><div class="airport"><span class="code"><a href="'.$globalURL.'/airport/'.$spotter_item['departure_airport'].'" target="_blank">'.$spotter_item['departure_airport'].'</a></span>'.$spotter_item['departure_airport_city'].' '.$spotter_item['departure_airport_country']; |
@@ -110,13 +116,21 @@ discard block |
||
110 | 116 | print '</div>'; |
111 | 117 | print '<div id="aircraft">'; |
112 | 118 | print '<span>'._("Aircraft").'</span>'; |
113 | - if (isset($spotter_item['aircraft_wiki'])) print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
119 | + if (isset($spotter_item['aircraft_wiki'])) { |
|
120 | + print '<a href="'.$spotter_item['aircraft_wiki'].'">'.$spotter_item['aircraft_name'].'</a>'; |
|
121 | + } |
|
114 | 122 | if (isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_manufacturer']) && $spotter_item['aircraft_manufacturer'] != 'N/A' && isset($spotter_item['aircraft_name']) && $spotter_item['aircraft_name'] != 'N/A') { |
115 | 123 | $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
116 | - if (count($aircraft_names) == 1) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
117 | - else print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
118 | - } elseif (isset($spotter_item['aircraft_type'])) print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
|
119 | - else print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
124 | + if (count($aircraft_names) == 1) { |
|
125 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
126 | + } else { |
|
127 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].' ('.$spotter_item['aircraft_type'].')</a>'; |
|
128 | + } |
|
129 | + } elseif (isset($spotter_item['aircraft_type'])) { |
|
130 | + print '<a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a>'; |
|
131 | + } else { |
|
132 | + print $spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name']; |
|
133 | + } |
|
120 | 134 | |
121 | 135 | print '</div>'; |
122 | 136 | print '<div id ="altitude"><span>'._("Altitude").'</span>'; |
@@ -129,11 +143,17 @@ discard block |
||
129 | 143 | } |
130 | 144 | |
131 | 145 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
132 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') print $spotter_item['real_altitude'].' feet (FL'.$spotter_item['altitude'].')'; |
|
133 | - else print $spotter_item['altitude'].'00 feet (FL'.$spotter_item['altitude'].')'; |
|
146 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
147 | + print $spotter_item['real_altitude'].' feet (FL'.$spotter_item['altitude'].')'; |
|
148 | + } else { |
|
149 | + print $spotter_item['altitude'].'00 feet (FL'.$spotter_item['altitude'].')'; |
|
150 | + } |
|
134 | 151 | } else { |
135 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') print round($spotter_item['real_altitude']*0.3048).' m (FL'.$spotter_item['altitude'].')'; |
|
136 | - else print round($spotter_item['altitude']*30.48).' m (FL'.$spotter_item['altitude'].')'; |
|
152 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
153 | + print round($spotter_item['real_altitude']*0.3048).' m (FL'.$spotter_item['altitude'].')'; |
|
154 | + } else { |
|
155 | + print round($spotter_item['altitude']*30.48).' m (FL'.$spotter_item['altitude'].')'; |
|
156 | + } |
|
137 | 157 | } |
138 | 158 | |
139 | 159 | if (isset($groundAltitude) && $groundAltitude < $spotter_item['altitude']*30.48) { |
@@ -147,7 +167,9 @@ discard block |
||
147 | 167 | print '</i>'; |
148 | 168 | } |
149 | 169 | print '</div>'; |
150 | - if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
170 | + if (isset($spotter_item['registration']) && $spotter_item['registration'] != '') { |
|
171 | + print '<div><span>'._("Registration").'</span><a href="'.$globalURL.'/registration/'.$spotter_item['registration'].'" target="_blank">'.$spotter_item['registration'].'</a></div>'; |
|
172 | + } |
|
151 | 173 | print '<div id="speed"><span>'._("Speed").'</span>'; |
152 | 174 | if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
153 | 175 | print round($spotter_item['ground_speed']*1.15078).' mph'; |
@@ -189,8 +211,11 @@ discard block |
||
189 | 211 | } |
190 | 212 | if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != '') { |
191 | 213 | print '<div id="pilot"><span>'._("Pilot").'</span>'; |
192 | - if (isset($spotter_item['pilot_id'])) print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
193 | - else print $spotter_item['pilot_name']; |
|
214 | + if (isset($spotter_item['pilot_id'])) { |
|
215 | + print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')'; |
|
216 | + } else { |
|
217 | + print $spotter_item['pilot_name']; |
|
218 | + } |
|
194 | 219 | print '</div>'; |
195 | 220 | } |
196 | 221 | if (isset($spotter_item['aircraft_owner']) && $spotter_item['aircraft_owner'] != '') { |
@@ -216,10 +241,18 @@ discard block |
||
216 | 241 | } |
217 | 242 | print '</div>'; |
218 | 243 | print '</div>'; |
219 | - if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
220 | - if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
221 | - if (isset($spotter_item['acars']['message'])) print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
222 | - if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
244 | + if (isset($globalVA) && $globalVA && isset($globalphpVMS) && $globalphpVMS && isset($globalVATSIM) && $globalVATSIM && isset($globalIVAO) && $globalIVAO && isset($spotter_item['format_source']) && $spotter_item['format_source'] != '' && $spotter_item['format_source'] != 'pireps') { |
|
245 | + print '<div class="waypoints"><span>'._("Source").'</span>'.$spotter_item['format_source'].'</div>'; |
|
246 | + } |
|
247 | + if (isset($spotter_item['waypoints']) && $spotter_item['waypoints'] != '') { |
|
248 | + print '<div class="waypoints"><span>'._("Route").'</span>'.$spotter_item['waypoints'].'</div>'; |
|
249 | + } |
|
250 | + if (isset($spotter_item['acars']['message'])) { |
|
251 | + print '<div class="acars"><span>'._("Latest ACARS message").'</span>'.trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'<br/>',$spotter_item['acars']['message'])).'</div>'; |
|
252 | + } |
|
253 | + if (isset($spotter_item['squawk']) && $spotter_item['squawk'] != '' && $spotter_item['squawk'] != 0) { |
|
254 | + print '<div class="bottom">'._("Squawk:").' '.$spotter_item['squawk'].' - '.$spotter_item['squawk_usage'].'</div>'; |
|
255 | + } |
|
223 | 256 | print '</div>'; |
224 | 257 | } |
225 | 258 | ?> |
@@ -265,22 +265,22 @@ discard block |
||
265 | 265 | var entityid = entity.id; |
266 | 266 | var lastupdateentity = entity.properties.lastupdate; |
267 | 267 | <?php |
268 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
269 | - // Remove flights not in latest CZML |
|
268 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
269 | + // Remove flights not in latest CZML |
|
270 | 270 | ?> |
271 | 271 | if (lastupdateentity != lastupdate) { |
272 | 272 | viewer.dataSources.get(dsn).entities.remove(entity); |
273 | 273 | czmlds.entities.removeById(entityid); |
274 | 274 | } |
275 | 275 | <?php |
276 | - } else { |
|
276 | + } else { |
|
277 | 277 | ?> |
278 | 278 | if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
279 | 279 | viewer.dataSources.get(dsn).entities.remove(entity); |
280 | 280 | czmlds.entities.removeById(entityid); |
281 | 281 | } |
282 | 282 | <?php |
283 | - } |
|
283 | + } |
|
284 | 284 | ?> |
285 | 285 | } |
286 | 286 | } |
@@ -718,12 +718,12 @@ discard block |
||
718 | 718 | } |
719 | 719 | |
720 | 720 | <?php |
721 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
721 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
722 | 722 | ?> |
723 | 723 | update_atcLayer(); |
724 | 724 | setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
725 | 725 | <?php |
726 | - } |
|
726 | + } |
|
727 | 727 | ?> |
728 | 728 | |
729 | 729 | function iconColor(color) { |
@@ -275,7 +275,12 @@ discard block |
||
275 | 275 | <?php |
276 | 276 | } else { |
277 | 277 | ?> |
278 | - if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
|
278 | + if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) { |
|
279 | + print $globalMapRefresh*2000; |
|
280 | +} else { |
|
281 | + print '60000'; |
|
282 | +} |
|
283 | +?>)) { |
|
279 | 284 | viewer.dataSources.get(dsn).entities.remove(entity); |
280 | 285 | czmlds.entities.removeById(entityid); |
281 | 286 | } |
@@ -564,7 +569,12 @@ discard block |
||
564 | 569 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
565 | 570 | ?> |
566 | 571 | update_polarLayer(); |
567 | -setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
572 | +setInterval(function(){update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
573 | + print $globalMapRefresh*1000*2; |
|
574 | +} else { |
|
575 | + print '60000'; |
|
576 | +} |
|
577 | +?>); |
|
568 | 578 | <?php |
569 | 579 | } |
570 | 580 | ?> |
@@ -695,7 +705,12 @@ discard block |
||
695 | 705 | } |
696 | 706 | } |
697 | 707 | } |
698 | - ,<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
708 | + ,<?php if (isset($globalMapRefresh)) { |
|
709 | + print $globalMapRefresh*1000; |
|
710 | +} else { |
|
711 | + print '30000'; |
|
712 | +} |
|
713 | +?>); |
|
699 | 714 | } else { |
700 | 715 | var clockViewModel = new Cesium.ClockViewModel(viewer.clock); |
701 | 716 | var animationViewModel = new Cesium.AnimationViewModel(clockViewModel); |
@@ -724,7 +739,12 @@ discard block |
||
724 | 739 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
725 | 740 | ?> |
726 | 741 | update_atcLayer(); |
727 | -setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
742 | +setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
743 | + print $globalMapRefresh*1000*2; |
|
744 | +} else { |
|
745 | + print '60000'; |
|
746 | +} |
|
747 | +?>); |
|
728 | 748 | <?php |
729 | 749 | } |
730 | 750 | ?> |
@@ -50,30 +50,30 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | function quaternionrotate($heading, $attitude = 0, $bank = 0) { |
53 | - // Assuming the angles are in radians. |
|
54 | - $c1 = cos($heading/2); |
|
55 | - $s1 = sin($heading/2); |
|
56 | - $c2 = cos($attitude/2); |
|
57 | - $s2 = sin($attitude/2); |
|
58 | - $c3 = cos($bank/2); |
|
59 | - $s3 = sin($bank/2); |
|
60 | - $c1c2 = $c1*$c2; |
|
61 | - $s1s2 = $s1*$s2; |
|
62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
53 | + // Assuming the angles are in radians. |
|
54 | + $c1 = cos($heading/2); |
|
55 | + $s1 = sin($heading/2); |
|
56 | + $c2 = cos($attitude/2); |
|
57 | + $s2 = sin($attitude/2); |
|
58 | + $c3 = cos($bank/2); |
|
59 | + $s3 = sin($bank/2); |
|
60 | + $c1c2 = $c1*$c2; |
|
61 | + $s1s2 = $s1*$s2; |
|
62 | + $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | + $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | + $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | + $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | + return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
68 | 68 | |
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | 72 | if (isset($_GET['download'])) { |
73 | - if ($_GET['download'] == "true") |
|
74 | - { |
|
73 | + if ($_GET['download'] == "true") |
|
74 | + { |
|
75 | 75 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
76 | - } |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | header('Content-Type: text/javascript'); |
79 | 79 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
167 | 167 | $coord = explode(',',$_GET['coord']); |
168 | 168 | 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) |
169 | - && $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)) { |
|
169 | + && $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)) { |
|
170 | 170 | $coord = array(); |
171 | 171 | } |
172 | 172 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
177 | 177 | $coord = explode(',',$_GET['coord']); |
178 | 178 | 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) |
179 | - && $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)) { |
|
179 | + && $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)) { |
|
180 | 180 | $coord = array(); |
181 | 181 | } |
182 | 182 | } |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
187 | 187 | $coord = explode(',',$_GET['coord']); |
188 | 188 | 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) |
189 | - && $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)) { |
|
189 | + && $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)) { |
|
190 | 190 | $coord = array(); |
191 | 191 | } |
192 | 192 | } |
@@ -287,10 +287,10 @@ discard block |
||
287 | 287 | $image = "images/placeholder_thumb.png"; |
288 | 288 | } |
289 | 289 | |
290 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
291 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
292 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
293 | - if ($prev_flightaware_id != $id) { |
|
290 | + if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
291 | + elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
292 | + elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
293 | + if ($prev_flightaware_id != $id) { |
|
294 | 294 | if ($prev_flightaware_id != '') { |
295 | 295 | /* |
296 | 296 | if ($nblatlong == 1) { |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
371 | 371 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
372 | 372 | } else $aircraft_shadow = ''; |
373 | - $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
373 | + $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
374 | 374 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
375 | 375 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
376 | 376 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
402 | 402 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
403 | 403 | } |
404 | - $output .= '},'; |
|
404 | + $output .= '},'; |
|
405 | 405 | } elseif (isset($modelsdb[$aircraft_icao]) && $aircraft_icao != '') { |
406 | 406 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_icao].'","scale" : 1.0,"minimumPixelSize": 20'; |
407 | 407 | $output .= ',"heightReference": "'.$heightrelative.'"'; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
410 | 410 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
411 | 411 | } |
412 | - $output .= '},'; |
|
412 | + $output .= '},'; |
|
413 | 413 | } elseif ($aircraft_icao != '') { |
414 | 414 | $aircraft_info = $Spotter->getAllAircraftInfo($aircraft_icao); |
415 | 415 | if (isset($aircraft_info[0]['engine_type'])) { |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $s3 = sin($bank/2); |
60 | 60 | $c1c2 = $c1*$c2; |
61 | 61 | $s1s2 = $s1*$s2; |
62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
62 | + $w = $c1c2*$c3 - $s1s2*$s3; |
|
63 | + $x = $c1c2*$s3 + $s1s2*$c3; |
|
64 | + $y = $s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | + $z = $c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | + return array('x' => $x, 'y' => $y, 'z' => $z, 'w' => $w); |
|
67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
68 | 68 | |
69 | 69 | } |
@@ -84,17 +84,17 @@ discard block |
||
84 | 84 | $min = false; |
85 | 85 | $allhistory = false; |
86 | 86 | $filter['source'] = array(); |
87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
87 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'], array('vatsimtxt')); |
|
88 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'], array('whazzup')); |
|
89 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'], array('phpvmacars')); |
|
90 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'], array('sbs', 'famaprs')); |
|
91 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'], array('aprs')); |
|
92 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'], FILTER_SANITIZE_STRING); |
|
93 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'], FILTER_SANITIZE_STRING); |
|
94 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',', $_COOKIE['filter_Airlines']), FILTER_SANITIZE_STRING); |
|
95 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',', $_COOKIE['filter_Sources']), FILTER_SANITIZE_STRING); |
|
96 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'], FILTER_SANITIZE_STRING); |
|
97 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'], FILTER_SANITIZE_STRING); |
|
98 | 98 | /* |
99 | 99 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
100 | 100 | $min = true; |
@@ -141,12 +141,12 @@ discard block |
||
141 | 141 | $from_archive = true; |
142 | 142 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
143 | 143 | // $enddate = filter_input(INPUT_GET,'enddate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
144 | - $begindate = filter_input(INPUT_GET,'begindate',FILTER_SANITIZE_NUMBER_INT); |
|
145 | - $enddate = filter_input(INPUT_GET,'enddate',FILTER_SANITIZE_NUMBER_INT); |
|
146 | - $archivespeed = filter_input(INPUT_GET,'speed',FILTER_SANITIZE_NUMBER_INT); |
|
147 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
148 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
149 | - $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate,$enddate,$filter); |
|
144 | + $begindate = filter_input(INPUT_GET, 'begindate', FILTER_SANITIZE_NUMBER_INT); |
|
145 | + $enddate = filter_input(INPUT_GET, 'enddate', FILTER_SANITIZE_NUMBER_INT); |
|
146 | + $archivespeed = filter_input(INPUT_GET, 'speed', FILTER_SANITIZE_NUMBER_INT); |
|
147 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
148 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
149 | + $spotter_array = $SpotterArchive->getMinLiveSpotterDataPlayback($begindate, $enddate, $filter); |
|
150 | 150 | } elseif (isset($_COOKIE['archive']) && isset($_COOKIE['archive_begin']) && isset($_COOKIE['archive_end']) && isset($_COOKIE['archive_speed'])) { |
151 | 151 | $from_archive = true; |
152 | 152 | // $begindate = filter_input(INPUT_GET,'begindate',FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>'~^\d{4}/\d{2}/\d{2}$~'))); |
@@ -162,55 +162,55 @@ discard block |
||
162 | 162 | } |
163 | 163 | $enddate = $_COOKIE['archive_end']; |
164 | 164 | $enddateinitial = $_COOKIE['archive_end']; |
165 | - $archivespeed = filter_var($_COOKIE['archive_speed'],FILTER_SANITIZE_NUMBER_INT); |
|
166 | - $begindate = date('Y-m-d H:i:s',$begindate); |
|
167 | - $enddate = date('Y-m-d H:i:s',$enddate); |
|
165 | + $archivespeed = filter_var($_COOKIE['archive_speed'], FILTER_SANITIZE_NUMBER_INT); |
|
166 | + $begindate = date('Y-m-d H:i:s', $begindate); |
|
167 | + $enddate = date('Y-m-d H:i:s', $enddate); |
|
168 | 168 | //echo 'Begin : '.$begindate.' - End : '.$enddate."\n"; |
169 | - $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate,$enddate,$filter); |
|
169 | + $spotter_array = $SpotterArchive->getMinLiveSpotterData($begindate, $enddate, $filter); |
|
170 | 170 | } elseif ($tracker) { |
171 | 171 | $coord = array(); |
172 | 172 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
173 | - $coord = explode(',',$_GET['coord']); |
|
174 | - 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) |
|
173 | + $coord = explode(',', $_GET['coord']); |
|
174 | + 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) |
|
175 | 175 | && $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)) { |
176 | 176 | $coord = array(); |
177 | 177 | } |
178 | 178 | } |
179 | - $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord,$filter,true); |
|
179 | + $spotter_array = $TrackerLive->getMinLastLiveTrackerData($coord, $filter, true); |
|
180 | 180 | } elseif ($marine) { |
181 | 181 | $coord = array(); |
182 | 182 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
183 | - $coord = explode(',',$_GET['coord']); |
|
184 | - 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) |
|
183 | + $coord = explode(',', $_GET['coord']); |
|
184 | + 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) |
|
185 | 185 | && $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)) { |
186 | 186 | $coord = array(); |
187 | 187 | } |
188 | 188 | } |
189 | - $spotter_array = $MarineLive->getMinLastLiveMarineData($coord,$filter,true); |
|
189 | + $spotter_array = $MarineLive->getMinLastLiveMarineData($coord, $filter, true); |
|
190 | 190 | } else { |
191 | 191 | $coord = array(); |
192 | 192 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
193 | - $coord = explode(',',$_GET['coord']); |
|
194 | - 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) |
|
193 | + $coord = explode(',', $_GET['coord']); |
|
194 | + 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) |
|
195 | 195 | && $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)) { |
196 | 196 | $coord = array(); |
197 | 197 | } |
198 | 198 | } |
199 | 199 | $previous_filter = $filter; |
200 | 200 | if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) { |
201 | - $filter = array_merge($filter,array('id' => $_COOKIE['MapTrack'])); |
|
202 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
201 | + $filter = array_merge($filter, array('id' => $_COOKIE['MapTrack'])); |
|
202 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
203 | 203 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && !empty($coord)) { |
204 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true,$_COOKIE['MapTrack']); |
|
204 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true, $_COOKIE['MapTrack']); |
|
205 | 205 | } else { |
206 | - $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord,$filter,true); |
|
206 | + $spotter_array = $SpotterLive->getMinLastLiveSpotterData($coord, $filter, true); |
|
207 | 207 | } |
208 | 208 | $filter = $previous_filter; |
209 | 209 | } |
210 | 210 | //print_r($spotter_array); |
211 | 211 | if (!empty($spotter_array) && isset($coord)) { |
212 | 212 | if (isset($_GET['archive'])) { |
213 | - $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate,$enddate,$filter); |
|
213 | + $flightcnt = $SpotterArchive->getLiveSpotterCount($begindate, $enddate, $filter); |
|
214 | 214 | } elseif ($tracker) { |
215 | 215 | $flightcnt = $TrackerLive->getLiveTrackerCount($filter); |
216 | 216 | } elseif ($marine) { |
@@ -221,17 +221,17 @@ discard block |
||
221 | 221 | if ($flightcnt == '') $flightcnt = 0; |
222 | 222 | } else $flightcnt = 0; |
223 | 223 | |
224 | -$sqltime = round(microtime(true)-$begintime,2); |
|
224 | +$sqltime = round(microtime(true) - $begintime, 2); |
|
225 | 225 | $minitime = time(); |
226 | 226 | $minitracktime_begin = time(); |
227 | 227 | $minitracktime = $minitracktime_begin; |
228 | 228 | $maxitime = 0; |
229 | -$lastupdate = filter_input(INPUT_GET,'update',FILTER_SANITIZE_NUMBER_INT); |
|
229 | +$lastupdate = filter_input(INPUT_GET, 'update', FILTER_SANITIZE_NUMBER_INT); |
|
230 | 230 | $modelsdb = array(); |
231 | 231 | if (file_exists(dirname(__FILE__).'/models/modelsdb')) { |
232 | - if (($handle = fopen(dirname(__FILE__).'/models/modelsdb','r')) !== FALSE) { |
|
233 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
234 | - if (isset($row[1]) ){ |
|
232 | + if (($handle = fopen(dirname(__FILE__).'/models/modelsdb', 'r')) !== FALSE) { |
|
233 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
234 | + if (isset($row[1])) { |
|
235 | 235 | $model = $row[0]; |
236 | 236 | $modelsdb[$model] = $row[1]; |
237 | 237 | } |
@@ -241,9 +241,9 @@ discard block |
||
241 | 241 | } |
242 | 242 | $modelsdb2 = array(); |
243 | 243 | if (file_exists(dirname(__FILE__).'/models/gltf2/modelsdb')) { |
244 | - if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb','r')) !== FALSE) { |
|
245 | - while (($row = fgetcsv($handle,1000)) !== FALSE) { |
|
246 | - if (isset($row[1]) ){ |
|
244 | + if (($handle = fopen(dirname(__FILE__).'/models/gltf2/modelsdb', 'r')) !== FALSE) { |
|
245 | + while (($row = fgetcsv($handle, 1000)) !== FALSE) { |
|
246 | + if (isset($row[1])) { |
|
247 | 247 | $model = $row[0]; |
248 | 248 | $glb = $row[1]; |
249 | 249 | if (isset($row[2])) { |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | if (!empty($spotter_array) && is_array($spotter_array)) |
288 | 288 | { |
289 | 289 | $nblatlong = 0; |
290 | - foreach($spotter_array as $spotter_item) |
|
290 | + foreach ($spotter_array as $spotter_item) |
|
291 | 291 | { |
292 | 292 | $j++; |
293 | 293 | //if (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'airwhere') $heightrelative = 'RELATIVE_TO_GROUND'; |
@@ -329,9 +329,9 @@ discard block |
||
329 | 329 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
330 | 330 | if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
331 | 331 | if ($tracker) { |
332 | - $output.= '"type": "tracker"'; |
|
332 | + $output .= '"type": "tracker"'; |
|
333 | 333 | } elseif ($marine) { |
334 | - $output.= '"type": "marine"'; |
|
334 | + $output .= '"type": "marine"'; |
|
335 | 335 | } else { |
336 | 336 | if ($one3dmodel === false && isset($globalMap3DLiveries) && $globalMap3DLiveries) { |
337 | 337 | $aircraft_icao = $spotter_item['aircraft_icao']; |
@@ -345,14 +345,14 @@ discard block |
||
345 | 345 | if (isset($airline_icao)) { |
346 | 346 | $imagefile = $aircraft_icao.'-'.$airline_icao.'.png'; |
347 | 347 | if (file_exists(dirname(__FILE__).'/models/gltf2/liveries/'.$imagefile)) { |
348 | - $output.= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
348 | + $output .= '"liveries": "'.$globalURL.'/models/gltf2/liveries/'.$imagefile.'",'; |
|
349 | 349 | } |
350 | 350 | } |
351 | 351 | } |
352 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
352 | + if ($ident != '') $output .= '"ident": "'.$ident.'",'; |
|
353 | 353 | } |
354 | - $output.= '"gltf2": %gltf2%,'; |
|
355 | - $output.= '"type": "flight"'; |
|
354 | + $output .= '"gltf2": %gltf2%,'; |
|
355 | + $output .= '"type": "flight"'; |
|
356 | 356 | } |
357 | 357 | $output .= '},'; |
358 | 358 | |
@@ -723,8 +723,8 @@ discard block |
||
723 | 723 | $output .= '},'; |
724 | 724 | } |
725 | 725 | } |
726 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
727 | - else $output = str_replace('%onground%','false',$output); |
|
726 | + if (isset($onground) && $onground) $output = str_replace('%onground%', 'true', $output); |
|
727 | + else $output = str_replace('%onground%', 'false', $output); |
|
728 | 728 | |
729 | 729 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
730 | 730 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
741 | 741 | if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
742 | 742 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
743 | - $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
743 | + $output .= '"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
744 | 744 | $output .= $spotter_item['longitude'].', '; |
745 | 745 | $output .= $spotter_item['latitude']; |
746 | 746 | $prevlong = $spotter_item['longitude']; |
@@ -768,8 +768,8 @@ discard block |
||
768 | 768 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
769 | 769 | //$orientation .= '"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
770 | 770 | } else { |
771 | - $nblatlong = $nblatlong+1; |
|
772 | - $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
|
771 | + $nblatlong = $nblatlong + 1; |
|
772 | + $output .= ',"'.date("c", strtotime($spotter_item['date'])).'", '; |
|
773 | 773 | if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
774 | 774 | if ($spotter_item['ground_speed'] == 0) { |
775 | 775 | $output .= $prevlong.', '; |
@@ -810,26 +810,26 @@ discard block |
||
810 | 810 | $output .= ']'; |
811 | 811 | if (isset($globalArchive) && $globalArchive === TRUE) { |
812 | 812 | if (isset($begindateinitial)) { |
813 | - $output = str_replace('%minitime%',date("c",$begindateinitial),$output); |
|
814 | - } elseif ((time()-$globalLiveInterval) > $minitime) { |
|
815 | - if (time()-$globalLiveInterval > $maxitime) { |
|
816 | - $output = str_replace('%minitime%',date("c",$maxitime),$output); |
|
813 | + $output = str_replace('%minitime%', date("c", $begindateinitial), $output); |
|
814 | + } elseif ((time() - $globalLiveInterval) > $minitime) { |
|
815 | + if (time() - $globalLiveInterval > $maxitime) { |
|
816 | + $output = str_replace('%minitime%', date("c", $maxitime), $output); |
|
817 | 817 | } else { |
818 | - $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
|
818 | + $output = str_replace('%minitime%', date("c", time() - $globalLiveInterval), $output); |
|
819 | 819 | } |
820 | 820 | } |
821 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
821 | + else $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
822 | 822 | } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
823 | - $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
|
823 | + $output = str_replace('%minitime%', date("c", $minitracktime), $output); |
|
824 | 824 | } else { |
825 | - $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
825 | + $output = str_replace('%minitime%', date("c", $minitime), $output); |
|
826 | 826 | } |
827 | 827 | if (isset($enddateinitial)) { |
828 | - $output = str_replace('%maxitime%',date("c",$enddateinitial),$output); |
|
828 | + $output = str_replace('%maxitime%', date("c", $enddateinitial), $output); |
|
829 | 829 | } else { |
830 | - $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
|
830 | + $output = str_replace('%maxitime%', date("c", $maxitime), $output); |
|
831 | 831 | } |
832 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
833 | -else $output = str_replace('%gltf2%','false',$output); |
|
832 | +if ($gltf2) $output = str_replace('%gltf2%', 'true', $output); |
|
833 | +else $output = str_replace('%gltf2%', 'false', $output); |
|
834 | 834 | print $output; |
835 | 835 | ?> |
@@ -19,8 +19,12 @@ discard block |
||
19 | 19 | } |
20 | 20 | $tracker = false; |
21 | 21 | $marine = false; |
22 | -if (isset($_GET['tracker'])) $tracker = true; |
|
23 | -if (isset($_GET['marine'])) $marine = true; |
|
22 | +if (isset($_GET['tracker'])) { |
|
23 | + $tracker = true; |
|
24 | +} |
|
25 | +if (isset($_GET['marine'])) { |
|
26 | + $marine = true; |
|
27 | +} |
|
24 | 28 | if ($tracker) { |
25 | 29 | require_once('require/class.Tracker.php'); |
26 | 30 | require_once('require/class.TrackerLive.php'); |
@@ -77,24 +81,49 @@ discard block |
||
77 | 81 | } |
78 | 82 | header('Content-Type: text/javascript'); |
79 | 83 | |
80 | -if (!isset($globalJsonCompress)) $compress = true; |
|
81 | -else $compress = $globalJsonCompress; |
|
84 | +if (!isset($globalJsonCompress)) { |
|
85 | + $compress = true; |
|
86 | +} else { |
|
87 | + $compress = $globalJsonCompress; |
|
88 | +} |
|
82 | 89 | |
83 | 90 | $from_archive = false; |
84 | 91 | $min = false; |
85 | 92 | $allhistory = false; |
86 | 93 | $filter['source'] = array(); |
87 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
88 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
89 | -if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
90 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
91 | -if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
92 | -if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
93 | -if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
94 | -if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
95 | -if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
96 | -if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
97 | -if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
94 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') { |
|
95 | + $filter['source'] = array_merge($filter['source'],array('vatsimtxt')); |
|
96 | +} |
|
97 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') { |
|
98 | + $filter['source'] = array_merge($filter['source'],array('whazzup')); |
|
99 | +} |
|
100 | +if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') { |
|
101 | + $filter['source'] = array_merge($filter['source'],array('phpvmacars')); |
|
102 | +} |
|
103 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') { |
|
104 | + $filter['source'] = array_merge($filter['source'],array('sbs','famaprs')); |
|
105 | +} |
|
106 | +if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') { |
|
107 | + $filter['source'] = array_merge($filter['source'],array('aprs')); |
|
108 | +} |
|
109 | +if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') { |
|
110 | + $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING); |
|
111 | +} |
|
112 | +if (isset($_COOKIE['filter_mmsi']) && $_COOKIE['filter_mmsi'] != '') { |
|
113 | + $filter['mmsi'] = filter_var($_COOKIE['filter_mmsi'],FILTER_SANITIZE_STRING); |
|
114 | +} |
|
115 | +if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') { |
|
116 | + $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING); |
|
117 | +} |
|
118 | +if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') { |
|
119 | + $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING); |
|
120 | +} |
|
121 | +if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') { |
|
122 | + $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING); |
|
123 | +} |
|
124 | +if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') { |
|
125 | + $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING); |
|
126 | +} |
|
98 | 127 | /* |
99 | 128 | if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) { |
100 | 129 | $min = true; |
@@ -218,8 +247,12 @@ discard block |
||
218 | 247 | } else { |
219 | 248 | $flightcnt = $SpotterLive->getLiveSpotterCount($filter); |
220 | 249 | } |
221 | - if ($flightcnt == '') $flightcnt = 0; |
|
222 | -} else $flightcnt = 0; |
|
250 | + if ($flightcnt == '') { |
|
251 | + $flightcnt = 0; |
|
252 | + } |
|
253 | + } else { |
|
254 | + $flightcnt = 0; |
|
255 | +} |
|
223 | 256 | |
224 | 257 | $sqltime = round(microtime(true)-$begintime,2); |
225 | 258 | $minitime = time(); |
@@ -263,7 +296,9 @@ discard block |
||
263 | 296 | $prev_flightaware_id = ''; |
264 | 297 | $speed = 1; |
265 | 298 | $gltf2 = false; |
266 | -if (isset($archivespeed)) $speed = $archivespeed; |
|
299 | +if (isset($archivespeed)) { |
|
300 | + $speed = $archivespeed; |
|
301 | +} |
|
267 | 302 | $output = '['; |
268 | 303 | if ($tracker) { |
269 | 304 | $output .= '{"id" : "document", "name" : "tracker","version" : "1.0"'; |
@@ -299,9 +334,13 @@ discard block |
||
299 | 334 | $image = "images/placeholder_thumb.png"; |
300 | 335 | } |
301 | 336 | |
302 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
303 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
304 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
337 | + if (isset($spotter_item['flightaware_id'])) { |
|
338 | + $id = $spotter_item['flightaware_id']; |
|
339 | + } elseif (isset($spotter_item['famtrackid'])) { |
|
340 | + $id = $spotter_item['famtrackid']; |
|
341 | + } elseif (isset($spotter_item['fammarine_id'])) { |
|
342 | + $id = $spotter_item['fammarine_id']; |
|
343 | + } |
|
305 | 344 | if ($prev_flightaware_id != $id) { |
306 | 345 | if ($prev_flightaware_id != '') { |
307 | 346 | /* |
@@ -327,7 +366,9 @@ discard block |
||
327 | 366 | $output .= '"flightcnt": "'.$flightcnt.'",'; |
328 | 367 | $output .= '"onground": %onground%,'; |
329 | 368 | $output .= '"lastupdate": "'.$lastupdate.'",'; |
330 | - if (isset($spotter_item['format_source'])) $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
369 | + if (isset($spotter_item['format_source'])) { |
|
370 | + $output .= '"format": "'.$spotter_item['format_source'].'",'; |
|
371 | + } |
|
331 | 372 | if ($tracker) { |
332 | 373 | $output.= '"type": "tracker"'; |
333 | 374 | } elseif ($marine) { |
@@ -349,7 +390,9 @@ discard block |
||
349 | 390 | } |
350 | 391 | } |
351 | 392 | } |
352 | - if ($ident != '') $output.= '"ident": "'.$ident.'",'; |
|
393 | + if ($ident != '') { |
|
394 | + $output.= '"ident": "'.$ident.'",'; |
|
395 | + } |
|
353 | 396 | } |
354 | 397 | $output.= '"gltf2": %gltf2%,'; |
355 | 398 | $output.= '"type": "flight"'; |
@@ -381,7 +424,9 @@ discard block |
||
381 | 424 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
382 | 425 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
383 | 426 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
384 | - } else $aircraft_shadow = ''; |
|
427 | + } else { |
|
428 | + $aircraft_shadow = ''; |
|
429 | + } |
|
385 | 430 | $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
386 | 431 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
387 | 432 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
@@ -389,7 +434,9 @@ discard block |
||
389 | 434 | } |
390 | 435 | $output .= '},'; |
391 | 436 | } |
392 | - } else $output .= ' "billboard" : {"image" : "data:image/png;base64,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","scale" : 0.5},'; |
|
437 | + } else { |
|
438 | + $output .= ' "billboard" : {"image" : "data:image/png;base64,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","scale" : 0.5},'; |
|
439 | + } |
|
393 | 440 | } elseif ($one3dmodel) { |
394 | 441 | if (isset($globalMap3DForceModel) && $globalMap3DForceModel != '') { |
395 | 442 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$globalMap3DForceModel.'","scale" : 1.0,"minimumPixelSize": 20'; |
@@ -429,7 +476,9 @@ discard block |
||
429 | 476 | $spotter_item['engine_type'] = $aircraft_info[0]['engine_type']; |
430 | 477 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
431 | 478 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
432 | - } else $aircraft_shadow = ''; |
|
479 | + } else { |
|
480 | + $aircraft_shadow = ''; |
|
481 | + } |
|
433 | 482 | if ($aircraft_shadow != '') { |
434 | 483 | if (isset($modelsdb2[$aircraft_shadow])) { |
435 | 484 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/gltf2/'.$modelsdb2[$aircraft_shadow]['glb'].'","scale" : 1.0,"minimumPixelSize": '.$modelsdb2[$aircraft_shadow]['size']; |
@@ -584,7 +633,9 @@ discard block |
||
584 | 633 | } |
585 | 634 | $output .= '},'; |
586 | 635 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
587 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
636 | + if ($spotter_item['aircraft_icao'] != '') { |
|
637 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
638 | + } |
|
588 | 639 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
589 | 640 | } |
590 | 641 | } elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') { |
@@ -606,7 +657,9 @@ discard block |
||
606 | 657 | } |
607 | 658 | $output .= '},'; |
608 | 659 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
609 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
660 | + if ($spotter_item['aircraft_icao'] != '') { |
|
661 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
662 | + } |
|
610 | 663 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
611 | 664 | } |
612 | 665 | } else { |
@@ -619,7 +672,9 @@ discard block |
||
619 | 672 | } |
620 | 673 | $output .= '},'; |
621 | 674 | //if ($spotter_item['aircraft_shadow'] != '') $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",'; |
622 | - if ($spotter_item['aircraft_icao'] != '') $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
675 | + if ($spotter_item['aircraft_icao'] != '') { |
|
676 | + $output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",'; |
|
677 | + } |
|
623 | 678 | $modelsdb[$aircraft_icao] = 'Cesium_Air.glb'; |
624 | 679 | } |
625 | 680 | } elseif ($tracker && isset($spotter_item['type'])) { |
@@ -723,8 +778,11 @@ discard block |
||
723 | 778 | $output .= '},'; |
724 | 779 | } |
725 | 780 | } |
726 | - if (isset($onground) && $onground) $output = str_replace('%onground%','true',$output); |
|
727 | - else $output = str_replace('%onground%','false',$output); |
|
781 | + if (isset($onground) && $onground) { |
|
782 | + $output = str_replace('%onground%','true',$output); |
|
783 | + } else { |
|
784 | + $output = str_replace('%onground%','false',$output); |
|
785 | + } |
|
728 | 786 | |
729 | 787 | // $output .= '"heightReference": "CLAMP_TO_GROUND",'; |
730 | 788 | //$output .= '"heightReference": "'.$heightrelative.'",'; |
@@ -737,9 +795,15 @@ discard block |
||
737 | 795 | // $output .= '"interpolationDegree" : 5,'; |
738 | 796 | // $output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", '; |
739 | 797 | $output .= '"cartographicDegrees": ['; |
740 | - if ($minitime > strtotime($spotter_item['date'])) $minitime = strtotime($spotter_item['date']); |
|
741 | - if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) $minitracktime = strtotime($spotter_item['date']); |
|
742 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
798 | + if ($minitime > strtotime($spotter_item['date'])) { |
|
799 | + $minitime = strtotime($spotter_item['date']); |
|
800 | + } |
|
801 | + if (isset($_COOKIE['MapTrack']) && $id == $_COOKIE['MapTrack'] && $minitracktime > strtotime($spotter_item['date'])) { |
|
802 | + $minitracktime = strtotime($spotter_item['date']); |
|
803 | + } |
|
804 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
805 | + $maxitime = strtotime($spotter_item['date']); |
|
806 | + } |
|
743 | 807 | $output .= '"'.date("c",strtotime($spotter_item['date'])).'", '; |
744 | 808 | $output .= $spotter_item['longitude'].', '; |
745 | 809 | $output .= $spotter_item['latitude']; |
@@ -762,7 +826,9 @@ discard block |
||
762 | 826 | $output .= ', '.round($spotter_item['altitude']*30.48); |
763 | 827 | $prevalt = round($spotter_item['altitude']*30.48); |
764 | 828 | } |
765 | - } else $output .= ', 0'; |
|
829 | + } else { |
|
830 | + $output .= ', 0'; |
|
831 | + } |
|
766 | 832 | //$orientation = '"orientation" : { '; |
767 | 833 | //$orientation .= '"unitQuaternion": ['; |
768 | 834 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
@@ -770,13 +836,18 @@ discard block |
||
770 | 836 | } else { |
771 | 837 | $nblatlong = $nblatlong+1; |
772 | 838 | $output .= ',"'.date("c",strtotime($spotter_item['date'])).'", '; |
773 | - if ($maxitime < strtotime($spotter_item['date'])) $maxitime = strtotime($spotter_item['date']); |
|
839 | + if ($maxitime < strtotime($spotter_item['date'])) { |
|
840 | + $maxitime = strtotime($spotter_item['date']); |
|
841 | + } |
|
774 | 842 | if ($spotter_item['ground_speed'] == 0) { |
775 | 843 | $output .= $prevlong.', '; |
776 | 844 | $output .= $prevlat; |
777 | 845 | //if (!$marine && (!isset($onground) || !$onground)) $output .= ', '.$prevalt; |
778 | - if (!$marine) $output .= ', '.$prevalt; |
|
779 | - else $output .= ', 0'; |
|
846 | + if (!$marine) { |
|
847 | + $output .= ', '.$prevalt; |
|
848 | + } else { |
|
849 | + $output .= ', 0'; |
|
850 | + } |
|
780 | 851 | } else { |
781 | 852 | $output .= $spotter_item['longitude'].', '; |
782 | 853 | $output .= $spotter_item['latitude']; |
@@ -789,14 +860,17 @@ discard block |
||
789 | 860 | $output .= ', 0'; |
790 | 861 | } |
791 | 862 | } else { |
792 | - if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
793 | - elseif ($tracker) { |
|
863 | + if (isset($spotter_item['real_altitude']) && $spotter_item['real_altitude'] != '') { |
|
864 | + $output .= ', '.round($spotter_item['real_altitude']*0.3048); |
|
865 | + } elseif ($tracker) { |
|
794 | 866 | $output .= ', '.round($spotter_item['altitude']*0.3048); |
795 | 867 | } else { |
796 | 868 | $output .= ', '.round($spotter_item['altitude']*30.48); |
797 | 869 | } |
798 | 870 | } |
799 | - } else $output .= ', 0'; |
|
871 | + } else { |
|
872 | + $output .= ', 0'; |
|
873 | + } |
|
800 | 874 | } |
801 | 875 | //$quat = quaternionrotate(deg2rad($spotter_item['heading']),deg2rad(0),deg2rad(0)); |
802 | 876 | //$orientation .= ',"'.date("c",strtotime($spotter_item['date'])).'",'.$quat['x'].','.$quat['y'].','.$quat['z'].','.$quat['w']; |
@@ -817,9 +891,10 @@ discard block |
||
817 | 891 | } else { |
818 | 892 | $output = str_replace('%minitime%',date("c",time()-$globalLiveInterval),$output); |
819 | 893 | } |
894 | + } else { |
|
895 | + $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
820 | 896 | } |
821 | - else $output = str_replace('%minitime%',date("c",$minitime),$output); |
|
822 | -} elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
897 | + } elseif (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '' && $minitracktime != $minitracktime_begin) { |
|
823 | 898 | $output = str_replace('%minitime%',date("c",$minitracktime),$output); |
824 | 899 | } else { |
825 | 900 | $output = str_replace('%minitime%',date("c",$minitime),$output); |
@@ -829,7 +904,10 @@ discard block |
||
829 | 904 | } else { |
830 | 905 | $output = str_replace('%maxitime%',date("c",$maxitime),$output); |
831 | 906 | } |
832 | -if ($gltf2) $output = str_replace('%gltf2%','true',$output); |
|
833 | -else $output = str_replace('%gltf2%','false',$output); |
|
907 | +if ($gltf2) { |
|
908 | + $output = str_replace('%gltf2%','true',$output); |
|
909 | +} else { |
|
910 | + $output = str_replace('%gltf2%','false',$output); |
|
911 | +} |
|
834 | 912 | print $output; |
835 | 913 | ?> |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | break; |
315 | 315 | } |
316 | 316 | } |
317 | - var tsk_geojson = Cesium.loadJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>"); |
|
317 | + var tsk_geojson = Cesium.loadJson("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php print filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>"); |
|
318 | 318 | tsk_geojson.then(function(geojsondata) { |
319 | 319 | tsk = new Cesium.CustomDataSource('tsk'); |
320 | 320 | for (var i =0;i < geojsondata.features.length; i++) { |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | <?php |
390 | 390 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
391 | 391 | if (isset($_COOKIE['lastcentercoord'])) { |
392 | - $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
|
392 | + $lastcentercoord = explode(',', $_COOKIE['lastcentercoord']); |
|
393 | 393 | if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
394 | 394 | else $zoom = $lastcentercoord[3]; |
395 | 395 | $viewcenterlatitude = $lastcentercoord[0]; |
@@ -5,21 +5,30 @@ discard block |
||
5 | 5 | |
6 | 6 | document.cookie = 'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/' |
7 | 7 | <?php |
8 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
9 | - else $MapType = $globalMapProvider; |
|
10 | -// unset($_COOKIE['MapType']); |
|
8 | + if (isset($_COOKIE['MapType'])) { |
|
9 | + $MapType = $_COOKIE['MapType']; |
|
10 | + } else { |
|
11 | + $MapType = $globalMapProvider; |
|
12 | + } |
|
13 | + // unset($_COOKIE['MapType']); |
|
11 | 14 | |
12 | 15 | if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') { |
13 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial'; |
|
14 | - else $MapType = 'OpenStreetMap'; |
|
16 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
17 | + $MapType = 'Bing-Aerial'; |
|
18 | + } else { |
|
19 | + $MapType = 'OpenStreetMap'; |
|
20 | + } |
|
15 | 21 | } |
16 | 22 | if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) { |
17 | 23 | $MapType = 'OpenStreetMap'; |
18 | 24 | } |
19 | 25 | if ($MapType == 'Mapbox') { |
20 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
21 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
22 | -?> |
|
26 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
27 | + $MapBoxId = $globalMapboxId; |
|
28 | + } else { |
|
29 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
30 | + } |
|
31 | + ?> |
|
23 | 32 | var imProv = Cesium.MapboxImageryProvider({ |
24 | 33 | credit: 'Map data © OpenStreetMap contributors, ' + |
25 | 34 | 'CC-BY-SA, ' + |
@@ -86,13 +95,23 @@ discard block |
||
86 | 95 | credit : 'Imagery courtesy Natural Earth' |
87 | 96 | }); |
88 | 97 | <?php |
89 | - } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
98 | + } elseif (isset($globalMapCustomLayer[$MapType])) { |
|
90 | 99 | $customid = $MapType; |
91 | 100 | ?> |
92 | 101 | var imProv = Cesium.createOpenStreetMapImageryProvider({ |
93 | 102 | url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>', |
94 | - maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>, |
|
95 | - minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
103 | + maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
104 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
105 | +} else { |
|
106 | + print '99'; |
|
107 | +} |
|
108 | +?>, |
|
109 | + minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
110 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
111 | +} else { |
|
112 | + print '0'; |
|
113 | +} |
|
114 | +?>, |
|
96 | 115 | credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
97 | 116 | }); |
98 | 117 | <?php |
@@ -376,7 +395,12 @@ discard block |
||
376 | 395 | imageryProvider : imProv, |
377 | 396 | timeline : archive, |
378 | 397 | animation : false, |
379 | - shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) print 'false'; else print 'true'; ?>, |
|
398 | + shadows : <?php if ((isset($globalMap3DShadows) && $globalMap3DShadows === FALSE) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'true')) { |
|
399 | + print 'false'; |
|
400 | +} else { |
|
401 | + print 'true'; |
|
402 | +} |
|
403 | +?>, |
|
380 | 404 | infoBox : false, |
381 | 405 | navigationHelpButton : false, |
382 | 406 | geocoder : false, |
@@ -390,8 +414,11 @@ discard block |
||
390 | 414 | if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) { |
391 | 415 | if (isset($_COOKIE['lastcentercoord'])) { |
392 | 416 | $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
393 | - if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0; |
|
394 | - else $zoom = $lastcentercoord[3]; |
|
417 | + if (!isset($lastcentercoord[3])) { |
|
418 | + $zoom = $lastcentercoord[2]*1000000.0; |
|
419 | + } else { |
|
420 | + $zoom = $lastcentercoord[3]; |
|
421 | + } |
|
395 | 422 | $viewcenterlatitude = $lastcentercoord[0]; |
396 | 423 | $viewcenterlongitude = $lastcentercoord[1]; |
397 | 424 | } else { |
@@ -473,7 +500,12 @@ discard block |
||
473 | 500 | ?> |
474 | 501 | |
475 | 502 | update_locationsLayer(); |
476 | -setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
503 | +setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) { |
|
504 | + print $globalMapRefresh*1000*2; |
|
505 | +} else { |
|
506 | + print '60000'; |
|
507 | +} |
|
508 | +?>); |
|
477 | 509 | viewer.camera.moveEnd.addEventListener(function() { |
478 | 510 | <?php |
479 | 511 | if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
@@ -11,13 +11,13 @@ discard block |
||
11 | 11 | $Connection = new Connection(); |
12 | 12 | |
13 | 13 | if (!$Connection->tableExists('airspace')) { |
14 | - die; |
|
14 | + die; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (isset($_GET['coord'])) |
18 | 18 | { |
19 | 19 | $coords = explode(',',$_GET['coord']); |
20 | - if ($globalDBdriver == 'mysql') { |
|
20 | + if ($globalDBdriver == 'mysql') { |
|
21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
22 | 22 | try { |
23 | 23 | $sth = $Connection->db->prepare($query); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | } else { |
40 | - if ($globalDBdriver == 'mysql') { |
|
40 | + if ($globalDBdriver == 'mysql') { |
|
41 | 41 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace"; |
42 | 42 | } else { |
43 | 43 | $query = "SELECT *, ST_AsBinary(wkb_geometry,'NDR') AS wkb FROM airspace"; |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | $geojson = array( |
54 | - 'type' => 'FeatureCollection', |
|
55 | - 'features' => array() |
|
54 | + 'type' => 'FeatureCollection', |
|
55 | + 'features' => array() |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | } |
116 | 116 | if (isset($properties['type']) && $properties['type'] != '') { |
117 | 117 | $feature = array( |
118 | - 'type' => 'Feature', |
|
119 | - 'geometry' => json_decode($geom->out('json')), |
|
120 | - 'properties' => $properties |
|
118 | + 'type' => 'Feature', |
|
119 | + 'geometry' => json_decode($geom->out('json')), |
|
120 | + 'properties' => $properties |
|
121 | 121 | ); |
122 | 122 | array_push($geojson['features'], $feature); |
123 | 123 | } |
@@ -16,14 +16,14 @@ discard block |
||
16 | 16 | |
17 | 17 | if (isset($_GET['coord'])) |
18 | 18 | { |
19 | - $coords = explode(',',$_GET['coord']); |
|
19 | + $coords = explode(',', $_GET['coord']); |
|
20 | 20 | if ($globalDBdriver == 'mysql') { |
21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
22 | 22 | try { |
23 | 23 | $sth = $Connection->db->prepare($query); |
24 | - $sth->execute(array(':minlon' => $coords[0],':minlat' => $coords[1],':maxlon' => $coords[2],':maxlat' => $coords[3])); |
|
24 | + $sth->execute(array(':minlon' => $coords[0], ':minlat' => $coords[1], ':maxlon' => $coords[2], ':maxlat' => $coords[3])); |
|
25 | 25 | //$sth->execute(); |
26 | - } catch(PDOException $e) { |
|
26 | + } catch (PDOException $e) { |
|
27 | 27 | echo "error"; |
28 | 28 | } |
29 | 29 | } else { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $sth = $Connection->db->prepare($query); |
33 | 33 | //$sth->execute(array(':minlon' => $coords[0],':minlat' => $coords[1],':maxlon' => $coords[2],':maxlat' => $coords[3])); |
34 | 34 | $sth->execute(); |
35 | - } catch(PDOException $e) { |
|
35 | + } catch (PDOException $e) { |
|
36 | 36 | echo "error"; |
37 | 37 | } |
38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | try { |
46 | 46 | $sth = $Connection->db->prepare($query); |
47 | 47 | $sth->execute(); |
48 | - } catch(PDOException $e) { |
|
48 | + } catch (PDOException $e) { |
|
49 | 49 | echo "error"; |
50 | 50 | } |
51 | 51 | } |
@@ -75,22 +75,22 @@ discard block |
||
75 | 75 | if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling']; |
76 | 76 | if (isset($properties['floor'])) $properties['base'] = $properties['floor']; |
77 | 77 | if (isset($properties['tops'])) { |
78 | - if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) { |
|
78 | + if (preg_match('/^FL(\s)*(?<alt>\d+)/', strtoupper($properties['tops']), $matches)) { |
|
79 | 79 | $properties['upper_limit'] = round($matches['alt']*100*0.38048); |
80 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['tops']),$matches)) { |
|
80 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/', strtoupper($properties['tops']), $matches)) { |
|
81 | 81 | $properties['upper_limit'] = round($matches['alt']*0.38048); |
82 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*M/',strtoupper($properties['tops']),$matches)) { |
|
82 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*M/', strtoupper($properties['tops']), $matches)) { |
|
83 | 83 | $properties['upper_limit'] = $matches['alt']; |
84 | 84 | } |
85 | 85 | } |
86 | 86 | if (isset($properties['base'])) { |
87 | 87 | if ($properties['base'] == 'SFC' || $properties['base'] == 'MSL' || $properties['base'] == 'GROUND' || $properties['base'] == 'GND') { |
88 | 88 | $properties['lower_limit'] = 0; |
89 | - } elseif (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['base']),$matches)) { |
|
89 | + } elseif (preg_match('/^FL(\s)*(?<alt>\d+)/', strtoupper($properties['base']), $matches)) { |
|
90 | 90 | $properties['lower_limit'] = round($matches['alt']*100*0.38048); |
91 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['base']),$matches)) { |
|
91 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/', strtoupper($properties['base']), $matches)) { |
|
92 | 92 | $properties['lower_limit'] = round($matches['alt']*0.38048); |
93 | - } elseif (preg_match('/^(?<alt>\d+)(\s)*M/',strtoupper($properties['base']),$matches)) { |
|
93 | + } elseif (preg_match('/^(?<alt>\d+)(\s)*M/', strtoupper($properties['base']), $matches)) { |
|
94 | 94 | $properties['lower_limit'] = $matches['alt']; |
95 | 95 | } |
96 | 96 | } |
@@ -68,12 +68,22 @@ |
||
68 | 68 | } else { |
69 | 69 | $geom = geoPHP::load(stream_get_contents($row['wkb'])); |
70 | 70 | } |
71 | - if (isset($properties['type'])) $properties['type'] = trim($properties['type']); |
|
72 | - elseif (isset($properties['class'])) $properties['type'] = trim($properties['class']); |
|
73 | - if (isset($properties['ogr_fid'])) $properties['id'] = $properties['ogr_fid']; |
|
74 | - elseif (isset($properties['ogc_fid'])) $properties['id'] = $properties['ogc_fid']; |
|
75 | - if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling']; |
|
76 | - if (isset($properties['floor'])) $properties['base'] = $properties['floor']; |
|
71 | + if (isset($properties['type'])) { |
|
72 | + $properties['type'] = trim($properties['type']); |
|
73 | + } elseif (isset($properties['class'])) { |
|
74 | + $properties['type'] = trim($properties['class']); |
|
75 | + } |
|
76 | + if (isset($properties['ogr_fid'])) { |
|
77 | + $properties['id'] = $properties['ogr_fid']; |
|
78 | + } elseif (isset($properties['ogc_fid'])) { |
|
79 | + $properties['id'] = $properties['ogc_fid']; |
|
80 | + } |
|
81 | + if (isset($properties['ceiling'])) { |
|
82 | + $properties['tops'] = $properties['ceiling']; |
|
83 | + } |
|
84 | + if (isset($properties['floor'])) { |
|
85 | + $properties['base'] = $properties['floor']; |
|
86 | + } |
|
77 | 87 | if (isset($properties['tops'])) { |
78 | 88 | if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) { |
79 | 89 | $properties['upper_limit'] = round($matches['alt']*100*0.38048); |
@@ -396,7 +396,7 @@ discard block |
||
396 | 396 | }; |
397 | 397 | |
398 | 398 | <?php |
399 | - if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
399 | + if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
400 | 400 | ?> |
401 | 401 | function tskPopup (feature, layer) { |
402 | 402 | var output = ''; |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | }; |
432 | 432 | update_tsk(); |
433 | 433 | <?php |
434 | - } |
|
434 | + } |
|
435 | 435 | ?> |
436 | 436 | map.on('moveend', function() { |
437 | 437 | if (map.hasLayer(locationsLayer) == true) { |
@@ -449,10 +449,10 @@ discard block |
||
449 | 449 | } |
450 | 450 | ?> |
451 | 451 | <?php |
452 | - // Add support for custom json via $globalMapJson |
|
453 | - if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
452 | + // Add support for custom json via $globalMapJson |
|
453 | + if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
454 | 454 | foreach ($globalMapJson as $json) { |
455 | - if (isset($json['url'])) { |
|
455 | + if (isset($json['url'])) { |
|
456 | 456 | ?> |
457 | 457 | update_genLayer('<?php print $json['url']; ?>'); |
458 | 458 | <?php |
@@ -461,9 +461,9 @@ discard block |
||
461 | 461 | setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>); |
462 | 462 | <?php |
463 | 463 | } |
464 | - } |
|
464 | + } |
|
465 | + } |
|
465 | 466 | } |
466 | - } |
|
467 | 467 | |
468 | 468 | ?> |
469 | 469 | //adds the bootstrap tooltip to the map icons |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | require_once('../require/settings.php'); |
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | -setcookie("MapFormat",'2d'); |
|
5 | +setcookie("MapFormat", '2d'); |
|
6 | 6 | |
7 | 7 | if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = ''; |
8 | 8 | // Compressed GeoJson is used if true |
@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | <?php |
57 | 57 | } |
58 | 58 | if (isset($_GET['ident'])) { |
59 | - $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
59 | + $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
60 | 60 | } |
61 | 61 | if (isset($_GET['flightaware_id'])) { |
62 | - $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
62 | + $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
63 | 63 | } |
64 | 64 | if (isset($_GET['latitude'])) { |
65 | - $latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING); |
|
65 | + $latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING); |
|
66 | 66 | } |
67 | 67 | if (isset($_GET['longitude'])) { |
68 | - $longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING); |
|
68 | + $longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING); |
|
69 | 69 | } |
70 | 70 | ?> |
71 | 71 | |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | } else { |
94 | 94 | if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) { |
95 | 95 | if (isset($_COOKIE['lastcentercoord'])) { |
96 | - $lastcentercoord = explode(',',$_COOKIE['lastcentercoord']); |
|
96 | + $lastcentercoord = explode(',', $_COOKIE['lastcentercoord']); |
|
97 | 97 | $viewcenterlatitude = $lastcentercoord[0]; |
98 | 98 | $viewcenterlongitude = $lastcentercoord[1]; |
99 | 99 | $viewzoom = $lastcentercoord[2]; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | || navigator.userAgent.match(/BlackBerry/i) |
115 | 115 | || navigator.userAgent.match(/Windows Phone/i)) |
116 | 116 | { |
117 | - var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
117 | + var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom - 1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
118 | 118 | } else { |
119 | 119 | var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>; |
120 | 120 | } |
@@ -240,19 +240,19 @@ discard block |
||
240 | 240 | map.addLayer(yandexLayer); |
241 | 241 | <?php |
242 | 242 | } elseif ($MapType == 'Bing-Aerial') { |
243 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
243 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
244 | 244 | ?> |
245 | 245 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
246 | 246 | map.addLayer(bingLayer); |
247 | 247 | <?php |
248 | 248 | } elseif ($MapType == 'Bing-Hybrid') { |
249 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
249 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
250 | 250 | ?> |
251 | 251 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
252 | 252 | map.addLayer(bingLayer); |
253 | 253 | <?php |
254 | 254 | } elseif ($MapType == 'Bing-Road') { |
255 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
255 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap'); |
|
256 | 256 | ?> |
257 | 257 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
258 | 258 | map.addLayer(bingLayer); |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | |
391 | 391 | function update_tsk() { |
392 | 392 | var bbox = map.getBounds().toBBoxString(); |
393 | - var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>",function (data) { |
|
393 | + var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>",function (data) { |
|
394 | 394 | tskLayer = L.geoJson(data,{ |
395 | 395 | onEachFeature: function (feature, layer) { |
396 | 396 | tskPopup(feature, layer); |
@@ -4,10 +4,15 @@ discard block |
||
4 | 4 | |
5 | 5 | setcookie("MapFormat",'2d'); |
6 | 6 | |
7 | -if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = ''; |
|
7 | +if (!isset($globalOpenWeatherMapKey)) { |
|
8 | + $globalOpenWeatherMapKey = ''; |
|
9 | +} |
|
8 | 10 | // Compressed GeoJson is used if true |
9 | -if (!isset($globalJsonCompress)) $compress = true; |
|
10 | -else $compress = $globalJsonCompress; |
|
11 | +if (!isset($globalJsonCompress)) { |
|
12 | + $compress = true; |
|
13 | +} else { |
|
14 | + $compress = $globalJsonCompress; |
|
15 | +} |
|
11 | 16 | |
12 | 17 | if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
13 | 18 | echo "console.log('Archive mode');"; |
@@ -88,7 +93,17 @@ discard block |
||
88 | 93 | } |
89 | 94 | |
90 | 95 | //create the map |
91 | - map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom); |
|
96 | + map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) { |
|
97 | + print $latitude; |
|
98 | +} else { |
|
99 | + print $globalCenterLatitude; |
|
100 | +} |
|
101 | +?>,<?php if (isset($longitude)) { |
|
102 | + print $longitude; |
|
103 | +} else { |
|
104 | + print $globalCenterLongitude; |
|
105 | +} |
|
106 | +?>], zoom); |
|
92 | 107 | <?php |
93 | 108 | } else { |
94 | 109 | if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) { |
@@ -114,9 +129,21 @@ discard block |
||
114 | 129 | || navigator.userAgent.match(/BlackBerry/i) |
115 | 130 | || navigator.userAgent.match(/Windows Phone/i)) |
116 | 131 | { |
117 | - var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>; |
|
132 | + var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) { |
|
133 | + print $viewzoom-1; |
|
134 | +} elseif (isset($viewzoom)) { |
|
135 | + print $viewzoom; |
|
136 | +} else { |
|
137 | + print '8'; |
|
138 | +} |
|
139 | +?>; |
|
118 | 140 | } else { |
119 | - var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>; |
|
141 | + var zoom = <?php if (isset($viewzoom)) { |
|
142 | + print $viewzoom; |
|
143 | +} else { |
|
144 | + print '9'; |
|
145 | +} |
|
146 | +?>; |
|
120 | 147 | } |
121 | 148 | |
122 | 149 | //create the map |
@@ -142,16 +169,27 @@ discard block |
||
142 | 169 | bounds = L.latLngBounds(southWest,northEast); |
143 | 170 | //a few title layers |
144 | 171 | <?php |
145 | - if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType']; |
|
146 | - else $MapType = $globalMapProvider; |
|
172 | + if (isset($_COOKIE['MapType'])) { |
|
173 | + $MapType = $_COOKIE['MapType']; |
|
174 | + } else { |
|
175 | + $MapType = $globalMapProvider; |
|
176 | + } |
|
147 | 177 | |
148 | 178 | if ($MapType == 'Mapbox') { |
149 | - if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId; |
|
150 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
151 | -?> |
|
179 | + if ($_COOKIE['MapTypeId'] == 'default') { |
|
180 | + $MapBoxId = $globalMapboxId; |
|
181 | + } else { |
|
182 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
183 | + } |
|
184 | + ?> |
|
152 | 185 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
153 | 186 | maxZoom: 18, |
154 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
187 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
188 | + print 'false'; |
|
189 | +} else { |
|
190 | + print 'true'; |
|
191 | +} |
|
192 | +?>, |
|
155 | 193 | attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>', |
156 | 194 | id: '<?php print $MapBoxId; ?>', |
157 | 195 | token: '<?php print $globalMapboxToken; ?>' |
@@ -170,7 +208,12 @@ discard block |
||
170 | 208 | ?> |
171 | 209 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
172 | 210 | maxZoom: 18, |
173 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
211 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
212 | + print 'false'; |
|
213 | +} else { |
|
214 | + print 'true'; |
|
215 | +} |
|
216 | +?>, |
|
174 | 217 | attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' + |
175 | 218 | '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>' |
176 | 219 | }).addTo(map); |
@@ -179,7 +222,12 @@ discard block |
||
179 | 222 | ?> |
180 | 223 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', { |
181 | 224 | maxZoom: 18, |
182 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
225 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
226 | + print 'false'; |
|
227 | +} else { |
|
228 | + print 'true'; |
|
229 | +} |
|
230 | +?>, |
|
183 | 231 | attribution: 'Tiles © Esri — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' |
184 | 232 | }).addTo(map); |
185 | 233 | <?php |
@@ -187,7 +235,12 @@ discard block |
||
187 | 235 | ?> |
188 | 236 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', { |
189 | 237 | maxZoom: 18, |
190 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
238 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
239 | + print 'false'; |
|
240 | +} else { |
|
241 | + print 'true'; |
|
242 | +} |
|
243 | +?>, |
|
191 | 244 | attribution: 'Tiles © Esri — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community' |
192 | 245 | }).addTo(map); |
193 | 246 | <?php |
@@ -195,7 +248,12 @@ discard block |
||
195 | 248 | ?> |
196 | 249 | L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', { |
197 | 250 | maxZoom: 18, |
198 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
251 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
252 | + print 'false'; |
|
253 | +} else { |
|
254 | + print 'true'; |
|
255 | +} |
|
256 | +?>, |
|
199 | 257 | attribution: 'Tiles © Esri — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC' |
200 | 258 | }).addTo(map); |
201 | 259 | <?php |
@@ -240,20 +298,26 @@ discard block |
||
240 | 298 | map.addLayer(yandexLayer); |
241 | 299 | <?php |
242 | 300 | } elseif ($MapType == 'Bing-Aerial') { |
243 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
244 | -?> |
|
301 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
302 | + setcookie('MapType','OpenStreetMap'); |
|
303 | + } |
|
304 | + ?> |
|
245 | 305 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'}); |
246 | 306 | map.addLayer(bingLayer); |
247 | 307 | <?php |
248 | 308 | } elseif ($MapType == 'Bing-Hybrid') { |
249 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
250 | -?> |
|
309 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
310 | + setcookie('MapType','OpenStreetMap'); |
|
311 | + } |
|
312 | + ?> |
|
251 | 313 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'}); |
252 | 314 | map.addLayer(bingLayer); |
253 | 315 | <?php |
254 | 316 | } elseif ($MapType == 'Bing-Road') { |
255 | - if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap'); |
|
256 | -?> |
|
317 | + if (!isset($globalBingMapKey) || $globalBingMapKey == '') { |
|
318 | + setcookie('MapType','OpenStreetMap'); |
|
319 | + } |
|
320 | + ?> |
|
257 | 321 | var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'}); |
258 | 322 | map.addLayer(bingLayer); |
259 | 323 | <?php |
@@ -282,7 +346,12 @@ discard block |
||
282 | 346 | maxZoom: 5, |
283 | 347 | tms : true, |
284 | 348 | zindex : 3, |
285 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
349 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
350 | + print 'false'; |
|
351 | +} else { |
|
352 | + print 'true'; |
|
353 | +} |
|
354 | +?>, |
|
286 | 355 | attribution: 'Natural Earth' |
287 | 356 | }).addTo(map); |
288 | 357 | <?php |
@@ -290,9 +359,24 @@ discard block |
||
290 | 359 | $customid = $MapType; |
291 | 360 | ?> |
292 | 361 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
293 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
294 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
295 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
362 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
363 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
364 | +} else { |
|
365 | + print '18'; |
|
366 | +} |
|
367 | +?>, |
|
368 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
369 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
370 | +} else { |
|
371 | + print '0'; |
|
372 | +} |
|
373 | +?>, |
|
374 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
375 | + print 'false'; |
|
376 | +} else { |
|
377 | + print 'true'; |
|
378 | +} |
|
379 | +?>, |
|
296 | 380 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
297 | 381 | }).addTo(map); |
298 | 382 | |
@@ -332,7 +416,12 @@ discard block |
||
332 | 416 | } |
333 | 417 | } elseif ($globalBounding == 'circle') { |
334 | 418 | ?> |
335 | - var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{ |
|
419 | + var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) { |
|
420 | + print $globalBoundingCircleSize; |
|
421 | +} else { |
|
422 | + print '70000'; |
|
423 | +} |
|
424 | +?>,{ |
|
336 | 425 | color: '#92C7D1', |
337 | 426 | fillColor: '#92C7D1', |
338 | 427 | fillOpacity: 0.3, |
@@ -424,7 +513,12 @@ discard block |
||
424 | 513 | if (!isset($archive) || $archive === false) { |
425 | 514 | ?> |
426 | 515 | update_locationsLayer(); |
427 | -setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
516 | +setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) { |
|
517 | + print $globalMapRefresh*1000*2; |
|
518 | +} else { |
|
519 | + print '60000'; |
|
520 | +} |
|
521 | +?>); |
|
428 | 522 | <?php |
429 | 523 | } |
430 | 524 | ?> |
@@ -3,18 +3,31 @@ discard block |
||
3 | 3 | require_once('../require/class.Language.php'); |
4 | 4 | |
5 | 5 | // Compressed GeoJson is used if true |
6 | -if (!isset($globalJsonCompress)) $compress = true; |
|
7 | -else $compress = $globalJsonCompress; |
|
6 | +if (!isset($globalJsonCompress)) { |
|
7 | + $compress = true; |
|
8 | +} else { |
|
9 | + $compress = $globalJsonCompress; |
|
10 | +} |
|
8 | 11 | |
9 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
12 | +if (isset($_GET['ident'])) { |
|
13 | + $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
14 | +} |
|
15 | +if (isset($_GET['flightaware_id'])) { |
|
16 | + $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
17 | +} |
|
11 | 18 | $archive = false; |
12 | -if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true; |
|
19 | +if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
20 | + $archive = true; |
|
21 | +} |
|
13 | 22 | ?> |
14 | 23 | <?php |
15 | -if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor']; |
|
16 | -elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor; |
|
17 | -else $IconColor = '1a3151'; |
|
24 | +if (isset($_COOKIE['IconColor'])) { |
|
25 | + $IconColor = $_COOKIE['IconColor']; |
|
26 | +} elseif (isset($globalAircraftIconColor)) { |
|
27 | + $IconColor = $globalAircraftIconColor; |
|
28 | +} else { |
|
29 | + $IconColor = '1a3151'; |
|
30 | +} |
|
18 | 31 | ?> |
19 | 32 | |
20 | 33 | |
@@ -81,9 +94,12 @@ discard block |
||
81 | 94 | |
82 | 95 | function update_airportsLayer() { |
83 | 96 | <?php |
84 | - if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom']; |
|
85 | - else $getZoom = '7'; |
|
86 | -?> |
|
97 | + if (isset($_COOKIE['AirportZoom'])) { |
|
98 | + $getZoom = $_COOKIE['AirportZoom']; |
|
99 | + } else { |
|
100 | + $getZoom = '7'; |
|
101 | + } |
|
102 | + ?> |
|
87 | 103 | if (typeof airportsLayer != 'undefined') { |
88 | 104 | if (map.hasLayer(airportsLayer) == true) { |
89 | 105 | map.removeLayer(airportsLayer); |
@@ -366,7 +382,12 @@ discard block |
||
366 | 382 | <?php |
367 | 383 | } else { |
368 | 384 | ?> |
369 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
385 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
386 | + print $archiveupdatetime*1000; |
|
387 | +} else { |
|
388 | + print $globalMapRefresh*1000+20000; |
|
389 | +} |
|
390 | +?>+feature.properties.sqt*1000); |
|
370 | 391 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
371 | 392 | <?php |
372 | 393 | } |
@@ -416,7 +437,12 @@ discard block |
||
416 | 437 | <?php |
417 | 438 | } else { |
418 | 439 | ?> |
419 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
440 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
441 | + print $archiveupdatetime*1000; |
|
442 | +} else { |
|
443 | + print $globalMapRefresh*1000+20000; |
|
444 | +} |
|
445 | +?>+feature.properties.sqt*1000); |
|
420 | 446 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
421 | 447 | <?php |
422 | 448 | } |
@@ -463,7 +489,12 @@ discard block |
||
463 | 489 | <?php |
464 | 490 | } else { |
465 | 491 | ?> |
466 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
492 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) { |
|
493 | + print $archiveupdatetime*1000; |
|
494 | +} else { |
|
495 | + print $globalMapRefresh*1000+20000; |
|
496 | +} |
|
497 | +?>+feature.properties.sqt*1000); |
|
467 | 498 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
468 | 499 | <?php |
469 | 500 | } |
@@ -916,7 +947,12 @@ discard block |
||
916 | 947 | } else { |
917 | 948 | ?> |
918 | 949 | //then load it again every 30 seconds |
919 | - reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>); |
|
950 | + reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) { |
|
951 | + print $globalMapRefresh*1000; |
|
952 | +} else { |
|
953 | + print '30000'; |
|
954 | +} |
|
955 | +?>); |
|
920 | 956 | var currentdate = new Date(); |
921 | 957 | var currentyear = new Date().getFullYear(); |
922 | 958 | var begindate = new Date(Date.UTC(currentyear,11,24,2,0,0,0)); |
@@ -928,7 +964,12 @@ discard block |
||
928 | 964 | if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
929 | 965 | ?> |
930 | 966 | update_polarLayer(); |
931 | - setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
967 | + setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) { |
|
968 | + print $globalMapRefresh*1000*2; |
|
969 | +} else { |
|
970 | + print '60000'; |
|
971 | +} |
|
972 | +?>); |
|
932 | 973 | <?php |
933 | 974 | } |
934 | 975 | ?> |
@@ -943,7 +984,12 @@ discard block |
||
943 | 984 | if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
944 | 985 | ?> |
945 | 986 | update_atcLayer(); |
946 | - setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
|
987 | + setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) { |
|
988 | + print $globalMapRefresh*1000*2; |
|
989 | +} else { |
|
990 | + print '60000'; |
|
991 | +} |
|
992 | +?>); |
|
947 | 993 | <?php |
948 | 994 | } |
949 | 995 | ?> |
@@ -6,8 +6,8 @@ discard block |
||
6 | 6 | if (!isset($globalJsonCompress)) $compress = true; |
7 | 7 | else $compress = $globalJsonCompress; |
8 | 8 | |
9 | -if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING); |
|
10 | -if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING); |
|
9 | +if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING); |
|
10 | +if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING); |
|
11 | 11 | $archive = false; |
12 | 12 | if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true; |
13 | 13 | ?> |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | if (typeof props != 'undefined') { |
216 | 216 | var thedate = new Date(props); |
217 | 217 | $("#thedate").html(thedate.toUTCString()); |
218 | - // $("#archivebox").html('<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'); |
|
218 | + // $("#archivebox").html('<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' + '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>'); |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | <?php |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | <?php |
367 | 367 | } else { |
368 | 368 | ?> |
369 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
369 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
370 | 370 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
371 | 371 | <?php |
372 | 372 | } |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | /* |
384 | 384 | shadowUrl: iconURLShadowpath, |
385 | 385 | shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>], |
386 | - shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>] |
|
386 | + shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>] |
|
387 | 387 | */ |
388 | 388 | }) |
389 | 389 | }) |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | <?php |
417 | 417 | } else { |
418 | 418 | ?> |
419 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
419 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
420 | 420 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
421 | 421 | <?php |
422 | 422 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | <?php |
464 | 464 | } else { |
465 | 465 | ?> |
466 | - var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000); |
|
466 | + var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000); |
|
467 | 467 | return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{ |
468 | 468 | <?php |
469 | 469 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | <?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 } ?> |
50 | 50 | </tr></table></div> |
51 | 51 | <?php |
52 | - if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
52 | + if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
|
53 | 53 | ?> |
54 | 54 | <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
55 | 55 | <?php |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script> |
74 | 74 | <?php |
75 | 75 | } |
76 | - } |
|
76 | + } |
|
77 | 77 | ?> |
78 | 78 | |
79 | 79 | <div id="sidebar" class="sidebar collapsed"> |
@@ -84,34 +84,34 @@ discard block |
||
84 | 84 | <li><a href="" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li> |
85 | 85 | <li><a href="" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li> |
86 | 86 | <?php |
87 | - //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) { |
|
87 | + //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) { |
|
88 | 88 | if (isset($globalArchive) && $globalArchive == TRUE) { |
89 | 89 | ?> |
90 | 90 | <li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li> |
91 | 91 | <?php |
92 | 92 | } |
93 | - //} |
|
93 | + //} |
|
94 | 94 | ?> |
95 | 95 | <li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li> |
96 | 96 | <li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li> |
97 | 97 | <li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li> |
98 | 98 | <?php |
99 | - if (isset($globalMap3D) && $globalMap3D) { |
|
99 | + if (isset($globalMap3D) && $globalMap3D) { |
|
100 | 100 | if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
101 | 101 | ?> |
102 | 102 | <li><a href="" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li> |
103 | 103 | <?php |
104 | 104 | } else { |
105 | - if (isset($globalSatellite) && $globalSatellite) { |
|
105 | + if (isset($globalSatellite) && $globalSatellite) { |
|
106 | 106 | ?> |
107 | 107 | <li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li> |
108 | 108 | <?php |
109 | - } |
|
109 | + } |
|
110 | 110 | ?> |
111 | 111 | <li><a href="" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li> |
112 | 112 | <?php |
113 | 113 | } |
114 | - } |
|
114 | + } |
|
115 | 115 | ?> |
116 | 116 | </ul> |
117 | 117 | |
@@ -260,72 +260,72 @@ discard block |
||
260 | 260 | <?php |
261 | 261 | if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
262 | 262 | else $MapType = $_COOKIE['MapType']; |
263 | - ?> |
|
263 | + ?> |
|
264 | 264 | <?php |
265 | 265 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
266 | - ?> |
|
266 | + ?> |
|
267 | 267 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
268 | 268 | <?php |
269 | 269 | } else { |
270 | - if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
271 | - ?> |
|
270 | + if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
|
271 | + ?> |
|
272 | 272 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
273 | 273 | <?php |
274 | - } |
|
275 | - ?> |
|
274 | + } |
|
275 | + ?> |
|
276 | 276 | <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
277 | 277 | <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
278 | 278 | <?php |
279 | - if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
280 | - ?> |
|
279 | + if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
|
280 | + ?> |
|
281 | 281 | <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
282 | 282 | <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
283 | 283 | <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
284 | 284 | <?php |
285 | - } |
|
286 | - ?> |
|
285 | + } |
|
286 | + ?> |
|
287 | 287 | <?php |
288 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
289 | - ?> |
|
288 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
289 | + ?> |
|
290 | 290 | <?php |
291 | 291 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
292 | - ?> |
|
292 | + ?> |
|
293 | 293 | <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
294 | 294 | <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
295 | 295 | <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
296 | 296 | <?php |
297 | 297 | } |
298 | - ?> |
|
298 | + ?> |
|
299 | 299 | <?php |
300 | 300 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
301 | - ?> |
|
301 | + ?> |
|
302 | 302 | <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
303 | 303 | <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
304 | 304 | <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
305 | 305 | <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
306 | 306 | <?php |
307 | 307 | } |
308 | - ?> |
|
308 | + ?> |
|
309 | 309 | <?php |
310 | 310 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
311 | - ?> |
|
311 | + ?> |
|
312 | 312 | <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
313 | 313 | <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
314 | 314 | <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
315 | 315 | <?php |
316 | 316 | } |
317 | - ?> |
|
317 | + ?> |
|
318 | 318 | <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
319 | 319 | <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
320 | 320 | <?php |
321 | - } |
|
322 | - ?> |
|
321 | + } |
|
322 | + ?> |
|
323 | 323 | <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
324 | 324 | <?php |
325 | - if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
325 | + if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
|
326 | 326 | if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
327 | 327 | else $MapBoxId = $_COOKIE['MapTypeId']; |
328 | - ?> |
|
328 | + ?> |
|
329 | 329 | <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
330 | 330 | <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
331 | 331 | <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
@@ -340,16 +340,16 @@ discard block |
||
340 | 340 | <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
341 | 341 | <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
342 | 342 | <?php |
343 | - } |
|
344 | - ?> |
|
343 | + } |
|
344 | + ?> |
|
345 | 345 | <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
346 | 346 | <?php |
347 | 347 | } |
348 | - ?> |
|
348 | + ?> |
|
349 | 349 | </select> |
350 | 350 | </li> |
351 | 351 | <?php |
352 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
352 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) { |
|
353 | 353 | ?> |
354 | 354 | <li><?php echo _("Type of Terrain:"); ?> |
355 | 355 | <select class="selectpicker" onchange="terrainType(this);"> |
@@ -360,10 +360,10 @@ discard block |
||
360 | 360 | </select> |
361 | 361 | </li> |
362 | 362 | <?php |
363 | - } |
|
363 | + } |
|
364 | 364 | ?> |
365 | 365 | <?php |
366 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
366 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
367 | 367 | ?> |
368 | 368 | <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> |
369 | 369 | |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | <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> |
387 | 387 | <?php |
388 | 388 | } |
389 | - } |
|
389 | + } |
|
390 | 390 | ?> |
391 | 391 | <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> |
392 | 392 | <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> |
@@ -405,80 +405,80 @@ discard block |
||
405 | 405 | } |
406 | 406 | ?> |
407 | 407 | <?php |
408 | - if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
408 | + if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
|
409 | 409 | ?> |
410 | 410 | <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> |
411 | 411 | <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> |
412 | 412 | <?php |
413 | - } |
|
414 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
413 | + } |
|
414 | + if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
415 | 415 | ?> |
416 | 416 | <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> |
417 | 417 | <?php |
418 | - } |
|
418 | + } |
|
419 | 419 | ?> |
420 | 420 | <?php |
421 | 421 | if (function_exists('array_column')) { |
422 | - if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
423 | - ?> |
|
422 | + if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
|
423 | + ?> |
|
424 | 424 | <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> |
425 | 425 | <?php |
426 | - } |
|
426 | + } |
|
427 | 427 | } elseif (isset($globalSources)) { |
428 | - $dispolar = false; |
|
429 | - foreach ($globalSources as $testsource) { |
|
430 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
431 | - } |
|
432 | - if ($dispolar) { |
|
433 | - ?> |
|
428 | + $dispolar = false; |
|
429 | + foreach ($globalSources as $testsource) { |
|
430 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
431 | + } |
|
432 | + if ($dispolar) { |
|
433 | + ?> |
|
434 | 434 | <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> |
435 | 435 | <?php |
436 | - } |
|
437 | - } |
|
438 | - ?> |
|
436 | + } |
|
437 | + } |
|
438 | + ?> |
|
439 | 439 | <?php |
440 | - if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
440 | + if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
|
441 | 441 | ?> |
442 | 442 | |
443 | 443 | <?php |
444 | 444 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
445 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
446 | - ?> |
|
445 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
446 | + ?> |
|
447 | 447 | <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> |
448 | 448 | <?php |
449 | 449 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
450 | - ?> |
|
450 | + ?> |
|
451 | 451 | <li><?php echo _("Aircraft icon color:"); ?><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'; ?>"></li> |
452 | 452 | <?php |
453 | 453 | } |
454 | - } |
|
455 | - } |
|
456 | - ?> |
|
454 | + } |
|
455 | + } |
|
456 | + ?> |
|
457 | 457 | <?php |
458 | 458 | if (isset($globalMarine) && $globalMarine === 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 _("Marine icon color:"); ?> |
462 | 462 | <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'; ?>"> |
463 | 463 | </li> |
464 | 464 | <?php |
465 | - } |
|
466 | - } |
|
467 | - ?> |
|
465 | + } |
|
466 | + } |
|
467 | + ?> |
|
468 | 468 | <?php |
469 | 469 | if (isset($globalTracker) && $globalTracker === TRUE) { |
470 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
471 | - ?> |
|
470 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
471 | + ?> |
|
472 | 472 | <li><?php echo _("Tracker icon color:"); ?> |
473 | 473 | <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'; ?>"> |
474 | 474 | </li> |
475 | 475 | <?php |
476 | - } |
|
477 | - } |
|
478 | - ?> |
|
476 | + } |
|
477 | + } |
|
478 | + ?> |
|
479 | 479 | <?php |
480 | 480 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
481 | - ?> |
|
481 | + ?> |
|
482 | 482 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
483 | 483 | <div class="range"> |
484 | 484 | <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'; ?>"> |
@@ -487,9 +487,9 @@ discard block |
||
487 | 487 | </li> |
488 | 488 | <?php |
489 | 489 | } |
490 | - ?> |
|
490 | + ?> |
|
491 | 491 | <?php |
492 | - } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
492 | + } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') { |
|
493 | 493 | ?> |
494 | 494 | <?php |
495 | 495 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | </li> |
522 | 522 | <?php |
523 | 523 | } |
524 | - } |
|
524 | + } |
|
525 | 525 | ?> |
526 | 526 | <li><?php echo _("Distance unit:"); ?> |
527 | 527 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -554,19 +554,19 @@ discard block |
||
554 | 554 | <ul> |
555 | 555 | <?php |
556 | 556 | if (!isset($globalAircraft) || $globalAircraft) { |
557 | - ?> |
|
557 | + ?> |
|
558 | 558 | <?php |
559 | 559 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
560 | - ?> |
|
560 | + ?> |
|
561 | 561 | <?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 } ?> |
562 | 562 | <?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 } ?> |
563 | 563 | <?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 } ?> |
564 | 564 | <?php |
565 | 565 | } |
566 | - ?> |
|
566 | + ?> |
|
567 | 567 | <?php |
568 | 568 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
569 | - ?> |
|
569 | + ?> |
|
570 | 570 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
571 | 571 | <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> |
572 | 572 | <?php } ?> |
@@ -575,7 +575,7 @@ discard block |
||
575 | 575 | <?php } ?> |
576 | 576 | <?php |
577 | 577 | } |
578 | - ?> |
|
578 | + ?> |
|
579 | 579 | <li><?php echo _("Display airlines:"); ?> |
580 | 580 | <br/> |
581 | 581 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -595,14 +595,14 @@ discard block |
||
595 | 595 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
596 | 596 | } |
597 | 597 | } |
598 | - ?> |
|
598 | + ?> |
|
599 | 599 | </select> |
600 | 600 | </li> |
601 | 601 | <?php |
602 | 602 | $Spotter = new Spotter(); |
603 | 603 | $allalliancenames = $Spotter->getAllAllianceNames(); |
604 | 604 | if (!empty($allalliancenames)) { |
605 | - ?> |
|
605 | + ?> |
|
606 | 606 | <li><?php echo _("Display alliance:"); ?> |
607 | 607 | <br/> |
608 | 608 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -616,18 +616,18 @@ discard block |
||
616 | 616 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
617 | 617 | } |
618 | 618 | } |
619 | - ?> |
|
619 | + ?> |
|
620 | 620 | </select> |
621 | 621 | </li> |
622 | 622 | <?php |
623 | 623 | } |
624 | - ?> |
|
624 | + ?> |
|
625 | 625 | <?php |
626 | 626 | } |
627 | - ?> |
|
627 | + ?> |
|
628 | 628 | <?php |
629 | 629 | if (isset($globalAPRS) && $globalAPRS) { |
630 | - ?> |
|
630 | + ?> |
|
631 | 631 | <li><?php echo _("Display APRS sources name:"); ?> |
632 | 632 | <select class="selectpicker" multiple onchange="sources(this);"> |
633 | 633 | <?php |
@@ -651,18 +651,18 @@ discard block |
||
651 | 651 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
652 | 652 | } |
653 | 653 | } |
654 | - ?> |
|
654 | + ?> |
|
655 | 655 | </select> |
656 | 656 | </li> |
657 | 657 | <?php |
658 | 658 | } |
659 | - ?> |
|
659 | + ?> |
|
660 | 660 | <?php |
661 | 661 | if (!isset($globalAircraft) || $globalAircraft) { |
662 | - ?> |
|
662 | + ?> |
|
663 | 663 | <?php |
664 | - if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
665 | - ?> |
|
664 | + if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
665 | + ?> |
|
666 | 666 | <li><?php echo _("Display airlines of type:"); ?><br/> |
667 | 667 | <select class="selectpicker" onchange="airlinestype(this);"> |
668 | 668 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -672,21 +672,21 @@ discard block |
||
672 | 672 | </select> |
673 | 673 | </li> |
674 | 674 | <?php |
675 | - } |
|
676 | - ?> |
|
675 | + } |
|
676 | + ?> |
|
677 | 677 | <?php |
678 | 678 | } |
679 | - ?> |
|
679 | + ?> |
|
680 | 680 | <?php |
681 | 681 | if (isset($globalMarine) && $globalMarine) { |
682 | - ?> |
|
682 | + ?> |
|
683 | 683 | <li> |
684 | 684 | <?php echo _("Display vessels with MMSI:"); ?> |
685 | 685 | <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
686 | 686 | </li> |
687 | 687 | <?php |
688 | 688 | } |
689 | - ?> |
|
689 | + ?> |
|
690 | 690 | <li> |
691 | 691 | <?php echo _("Display with ident:"); ?> |
692 | 692 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | </form> |
700 | 700 | </div> |
701 | 701 | <?php |
702 | - if (isset($globalSatellite) && $globalSatellite) { |
|
702 | + if (isset($globalSatellite) && $globalSatellite) { |
|
703 | 703 | ?> |
704 | 704 | <div class="sidebar-pane" id="satellites"> |
705 | 705 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -739,14 +739,14 @@ discard block |
||
739 | 739 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
740 | 740 | } |
741 | 741 | } |
742 | - ?> |
|
742 | + ?> |
|
743 | 743 | </select> |
744 | 744 | </li> |
745 | 745 | </ul> |
746 | 746 | </form> |
747 | 747 | </div> |
748 | 748 | <?php |
749 | - } |
|
749 | + } |
|
750 | 750 | ?> |
751 | 751 | </div> |
752 | 752 | </div> |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | require_once('require/class.Language.php'); |
5 | 5 | require_once('require/class.Satellite.php'); |
6 | 6 | |
7 | -$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING); |
|
7 | +$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING); |
|
8 | 8 | if ($trackident != '') { |
9 | 9 | require_once('require/class.SpotterLive.php'); |
10 | 10 | $SpotterLive = new SpotterLive(); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident); |
15 | 15 | header('Location: '.$globalURL.'/flightid/'.$spotterid); |
16 | 16 | } else { |
17 | - setcookie('MapTrack',$resulttrackident[0]['flightaware_id']); |
|
17 | + setcookie('MapTrack', $resulttrackident[0]['flightaware_id']); |
|
18 | 18 | } |
19 | 19 | /* |
20 | 20 | } else { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | <div class="form-group"> |
198 | 198 | <label><?php echo _("From:"); ?></label> |
199 | 199 | <div class='input-group date' id='datetimepicker1'> |
200 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
200 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i", $_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
201 | 201 | <span class="input-group-addon"> |
202 | 202 | <span class="glyphicon glyphicon-calendar"></span> |
203 | 203 | </span> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | <div class="form-group"> |
207 | 207 | <label><?php echo _("To:"); ?></label> |
208 | 208 | <div class='input-group date' id='datetimepicker2'> |
209 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
209 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i", $_COOKIE['archive_end']).' UTC'; ?>" /> |
|
210 | 210 | <span class="input-group-addon"> |
211 | 211 | <span class="glyphicon glyphicon-calendar"></span> |
212 | 212 | </span> |
@@ -354,9 +354,9 @@ discard block |
||
354 | 354 | <li><?php echo _("Type of Terrain:"); ?> |
355 | 355 | <select class="selectpicker" onchange="terrainType(this);"> |
356 | 356 | <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
357 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option> |
|
358 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option> |
|
359 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected'; ?>>ArticDEM</option> |
|
360 | 360 | </select> |
361 | 361 | </li> |
362 | 362 | <?php |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | <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> |
412 | 412 | <?php |
413 | 413 | } |
414 | - if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
|
414 | + if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) { |
|
415 | 415 | ?> |
416 | 416 | <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> |
417 | 417 | <?php |
@@ -586,10 +586,10 @@ discard block |
||
586 | 586 | $Spotter = new Spotter(); |
587 | 587 | $allairlinenames = $Spotter->getAllAirlineNames(); |
588 | 588 | } |
589 | - foreach($allairlinenames as $airline) { |
|
589 | + foreach ($allairlinenames as $airline) { |
|
590 | 590 | $airline_name = $airline['airline_name']; |
591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
592 | - if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
|
591 | + if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...'; |
|
592 | + if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) { |
|
593 | 593 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
594 | 594 | } else { |
595 | 595 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
609 | 609 | <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
610 | 610 | <?php |
611 | - foreach($allalliancenames as $alliance) { |
|
611 | + foreach ($allalliancenames as $alliance) { |
|
612 | 612 | $alliance_name = $alliance['alliance']; |
613 | 613 | if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) { |
614 | 614 | echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>'; |
@@ -644,8 +644,8 @@ discard block |
||
644 | 644 | */ |
645 | 645 | $Source = new Source(); |
646 | 646 | $datasource = $Source->getLocationInfoByType('gs'); |
647 | - foreach($datasource as $src) { |
|
648 | - if (isset($_COOKIE['filter_Sources']) && in_array($src['name'],explode(',',$_COOKIE['filter_Sources']))) { |
|
647 | + foreach ($datasource as $src) { |
|
648 | + if (isset($_COOKIE['filter_Sources']) && in_array($src['name'], explode(',', $_COOKIE['filter_Sources']))) { |
|
649 | 649 | echo '<option value="'.$src['name'].'" selected>'.$src['name'].'</option>'; |
650 | 650 | } else { |
651 | 651 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
734 | 734 | else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
735 | 735 | |
736 | - if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
|
736 | + if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) { |
|
737 | 737 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |
738 | 738 | } else { |
739 | 739 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
@@ -51,7 +51,10 @@ discard block |
||
51 | 51 | <?php |
52 | 52 | if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) { |
53 | 53 | ?> |
54 | -<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script> |
|
54 | +<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) { |
|
55 | + print '?tsk='.$tsk; |
|
56 | +} |
|
57 | +?>"></script> |
|
55 | 58 | <?php |
56 | 59 | if (!isset($globalAircraft) || $globalAircraft) { |
57 | 60 | ?> |
@@ -141,8 +144,14 @@ discard block |
||
141 | 144 | ?> |
142 | 145 | <form> |
143 | 146 | <ul> |
144 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
145 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
147 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
148 | + print 'checked'; |
|
149 | +} |
|
150 | +?> /><?php echo _("Display waypoints"); ?></label></div></li> |
|
151 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
152 | + print 'checked'; |
|
153 | +} |
|
154 | +?> /><?php echo _("Display airspace"); ?></label></div></li> |
|
146 | 155 | </ul> |
147 | 156 | </form> |
148 | 157 | <?php |
@@ -150,8 +159,14 @@ discard block |
||
150 | 159 | ?> |
151 | 160 | <form> |
152 | 161 | <ul> |
153 | - <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
154 | - <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
162 | + <li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') { |
|
163 | + print 'checked'; |
|
164 | +} |
|
165 | +?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li> |
|
166 | + <li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') { |
|
167 | + print 'checked'; |
|
168 | +} |
|
169 | +?> /><?php echo _("Display airspace"); ?> Beta</label></div></li> |
|
155 | 170 | </ul> |
156 | 171 | <p>This layers are in Beta, this can and will crash.</p> |
157 | 172 | </form> |
@@ -162,14 +177,32 @@ discard block |
||
162 | 177 | <h1>NOTAM</h1> |
163 | 178 | <form> |
164 | 179 | <ul> |
165 | - <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
180 | + <li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') { |
|
181 | + print 'checked'; |
|
182 | +} |
|
183 | +?> /><?php echo _("Display NOTAM"); ?></label></div></li> |
|
166 | 184 | <li><?php echo _("NOTAM scope:"); ?> |
167 | 185 | <select class="selectpicker" onchange="notamscope(this);"> |
168 | - <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option> |
|
169 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option> |
|
170 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option> |
|
171 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option> |
|
172 | - <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option> |
|
186 | + <option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') { |
|
187 | + print ' selected'; |
|
188 | +} |
|
189 | +?>>All</option> |
|
190 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') { |
|
191 | + print ' selected'; |
|
192 | +} |
|
193 | +?>>Airport/Enroute warning</option> |
|
194 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') { |
|
195 | + print ' selected'; |
|
196 | +} |
|
197 | +?>>Airport warning</option> |
|
198 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') { |
|
199 | + print ' selected'; |
|
200 | +} |
|
201 | +?>>Navigation warning</option> |
|
202 | + <option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') { |
|
203 | + print ' selected'; |
|
204 | +} |
|
205 | +?>>Enroute warning</option> |
|
173 | 206 | </select |
174 | 207 | </li> |
175 | 208 | </ul> |
@@ -197,7 +230,10 @@ discard block |
||
197 | 230 | <div class="form-group"> |
198 | 231 | <label><?php echo _("From:"); ?></label> |
199 | 232 | <div class='input-group date' id='datetimepicker1'> |
200 | - <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required /> |
|
233 | + <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') { |
|
234 | + print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; |
|
235 | +} |
|
236 | +?>" required /> |
|
201 | 237 | <span class="input-group-addon"> |
202 | 238 | <span class="glyphicon glyphicon-calendar"></span> |
203 | 239 | </span> |
@@ -206,7 +242,10 @@ discard block |
||
206 | 242 | <div class="form-group"> |
207 | 243 | <label><?php echo _("To:"); ?></label> |
208 | 244 | <div class='input-group date' id='datetimepicker2'> |
209 | - <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" /> |
|
245 | + <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') { |
|
246 | + print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; |
|
247 | +} |
|
248 | +?>" /> |
|
210 | 249 | <span class="input-group-addon"> |
211 | 250 | <span class="glyphicon glyphicon-calendar"></span> |
212 | 251 | </span> |
@@ -238,8 +277,20 @@ discard block |
||
238 | 277 | </script> |
239 | 278 | <li><?php echo _("Playback speed:"); ?> |
240 | 279 | <div class="range"> |
241 | - <input type="range" min="0" max="50" step="1" id="archivespeed" 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'; ?>"> |
|
242 | - <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output> |
|
280 | + <input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php if (isset($_POST['archivespeed'])) { |
|
281 | + print $_POST['archivespeed']; |
|
282 | +} elseif (isset($_COOKIE['archive_speed'])) { |
|
283 | + print $_COOKIE['archive_speed']; |
|
284 | +} else { |
|
285 | + print '1'; |
|
286 | +} |
|
287 | +?>"> |
|
288 | + <output id="archivespeedrange"><?php if (isset($_COOKIE['archive_speed'])) { |
|
289 | + print $_COOKIE['archive_speed']; |
|
290 | +} else { |
|
291 | + print '1'; |
|
292 | +} |
|
293 | +?></output> |
|
243 | 294 | </div> |
244 | 295 | </li> |
245 | 296 | <li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li> |
@@ -258,29 +309,53 @@ discard block |
||
258 | 309 | <li><?php echo _("Type of Map:"); ?> |
259 | 310 | <select class="selectpicker" onchange="mapType(this);"> |
260 | 311 | <?php |
261 | - if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider; |
|
262 | - else $MapType = $_COOKIE['MapType']; |
|
312 | + if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') { |
|
313 | + $MapType = $globalMapProvider; |
|
314 | + } else { |
|
315 | + $MapType = $_COOKIE['MapType']; |
|
316 | + } |
|
263 | 317 | ?> |
264 | 318 | <?php |
265 | 319 | if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
266 | 320 | ?> |
267 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
321 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
322 | + print ' selected'; |
|
323 | +} |
|
324 | +?>>Natural Earth (local)</option> |
|
268 | 325 | <?php |
269 | 326 | } else { |
270 | 327 | if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) { |
271 | 328 | ?> |
272 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option> |
|
329 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
330 | + print ' selected'; |
|
331 | +} |
|
332 | +?>>Natural Earth (local)</option> |
|
273 | 333 | <?php |
274 | 334 | } |
275 | 335 | ?> |
276 | - <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option> |
|
277 | - <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option> |
|
336 | + <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') { |
|
337 | + print ' selected'; |
|
338 | +} |
|
339 | +?>>ArcGIS Streetmap</option> |
|
340 | + <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') { |
|
341 | + print ' selected'; |
|
342 | +} |
|
343 | +?>>ArcGIS Satellite</option> |
|
278 | 344 | <?php |
279 | 345 | if (isset($globalBingMapKey) && $globalBingMapKey != '') { |
280 | 346 | ?> |
281 | - <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option> |
|
282 | - <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option> |
|
283 | - <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option> |
|
347 | + <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') { |
|
348 | + print ' selected'; |
|
349 | +} |
|
350 | +?>>Bing-Aerial</option> |
|
351 | + <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') { |
|
352 | + print ' selected'; |
|
353 | +} |
|
354 | +?>>Bing-Hybrid</option> |
|
355 | + <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') { |
|
356 | + print ' selected'; |
|
357 | +} |
|
358 | +?>>Bing-Road</option> |
|
284 | 359 | <?php |
285 | 360 | } |
286 | 361 | ?> |
@@ -290,59 +365,143 @@ discard block |
||
290 | 365 | <?php |
291 | 366 | if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') { |
292 | 367 | ?> |
293 | - <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option> |
|
294 | - <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option> |
|
295 | - <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option> |
|
368 | + <option value="Here-Aerial"<?php if ($MapType == 'Here') { |
|
369 | + print ' selected'; |
|
370 | +} |
|
371 | +?>>Here-Aerial</option> |
|
372 | + <option value="Here-Hybrid"<?php if ($MapType == 'Here') { |
|
373 | + print ' selected'; |
|
374 | +} |
|
375 | +?>>Here-Hybrid</option> |
|
376 | + <option value="Here-Road"<?php if ($MapType == 'Here') { |
|
377 | + print ' selected'; |
|
378 | +} |
|
379 | +?>>Here-Road</option> |
|
296 | 380 | <?php |
297 | 381 | } |
298 | 382 | ?> |
299 | 383 | <?php |
300 | 384 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') { |
301 | 385 | ?> |
302 | - <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option> |
|
303 | - <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option> |
|
304 | - <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option> |
|
305 | - <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option> |
|
386 | + <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') { |
|
387 | + print ' selected'; |
|
388 | +} |
|
389 | +?>>Google Roadmap</option> |
|
390 | + <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') { |
|
391 | + print ' selected'; |
|
392 | +} |
|
393 | +?>>Google Satellite</option> |
|
394 | + <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') { |
|
395 | + print ' selected'; |
|
396 | +} |
|
397 | +?>>Google Hybrid</option> |
|
398 | + <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') { |
|
399 | + print ' selected'; |
|
400 | +} |
|
401 | +?>>Google Terrain</option> |
|
306 | 402 | <?php |
307 | 403 | } |
308 | 404 | ?> |
309 | 405 | <?php |
310 | 406 | if (isset($globalMapQuestKey) && $globalMapQuestKey != '') { |
311 | 407 | ?> |
312 | - <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option> |
|
313 | - <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option> |
|
314 | - <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option> |
|
408 | + <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') { |
|
409 | + print ' selected'; |
|
410 | +} |
|
411 | +?>>MapQuest-OSM</option> |
|
412 | + <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') { |
|
413 | + print ' selected'; |
|
414 | +} |
|
415 | +?>>MapQuest-Aerial</option> |
|
416 | + <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') { |
|
417 | + print ' selected'; |
|
418 | +} |
|
419 | +?>>MapQuest-Hybrid</option> |
|
315 | 420 | <?php |
316 | 421 | } |
317 | 422 | ?> |
318 | - <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option> |
|
319 | - <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option> |
|
423 | + <option value="Yandex"<?php if ($MapType == 'Yandex') { |
|
424 | + print ' selected'; |
|
425 | +} |
|
426 | +?>>Yandex</option> |
|
427 | + <option value="offline"<?php if ($MapType == 'offline') { |
|
428 | + print ' selected'; |
|
429 | +} |
|
430 | +?>>Natural Earth</option> |
|
320 | 431 | <?php |
321 | 432 | } |
322 | 433 | ?> |
323 | - <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option> |
|
434 | + <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') { |
|
435 | + print ' selected'; |
|
436 | +} |
|
437 | +?>>National Geographic Street</option> |
|
324 | 438 | <?php |
325 | 439 | if (isset($globalMapboxToken) && $globalMapboxToken != '') { |
326 | - if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default'; |
|
327 | - else $MapBoxId = $_COOKIE['MapTypeId']; |
|
440 | + if (!isset($_COOKIE['MapTypeId'])) { |
|
441 | + $MapBoxId = 'default'; |
|
442 | + } else { |
|
443 | + $MapBoxId = $_COOKIE['MapTypeId']; |
|
444 | + } |
|
328 | 445 | ?> |
329 | - <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> |
|
330 | - <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option> |
|
331 | - <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option> |
|
332 | - <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option> |
|
333 | - <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option> |
|
334 | - <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option> |
|
335 | - <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option> |
|
336 | - <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option> |
|
337 | - <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option> |
|
338 | - <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option> |
|
339 | - <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option> |
|
340 | - <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option> |
|
341 | - <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option> |
|
446 | + <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') { |
|
447 | + print ' selected'; |
|
448 | +} |
|
449 | +?>>Mapbox GL</option> |
|
450 | + <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') { |
|
451 | + print ' selected'; |
|
452 | +} |
|
453 | +?>>Mapbox default</option> |
|
454 | + <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') { |
|
455 | + print ' selected'; |
|
456 | +} |
|
457 | +?>>Mapbox streets</option> |
|
458 | + <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') { |
|
459 | + print ' selected'; |
|
460 | +} |
|
461 | +?>>Mapbox light</option> |
|
462 | + <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') { |
|
463 | + print ' selected'; |
|
464 | +} |
|
465 | +?>>Mapbox dark</option> |
|
466 | + <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') { |
|
467 | + print ' selected'; |
|
468 | +} |
|
469 | +?>>Mapbox satellite</option> |
|
470 | + <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') { |
|
471 | + print ' selected'; |
|
472 | +} |
|
473 | +?>>Mapbox streets-satellite</option> |
|
474 | + <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') { |
|
475 | + print ' selected'; |
|
476 | +} |
|
477 | +?>>Mapbox streets-basic</option> |
|
478 | + <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') { |
|
479 | + print ' selected'; |
|
480 | +} |
|
481 | +?>>Mapbox comic</option> |
|
482 | + <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') { |
|
483 | + print ' selected'; |
|
484 | +} |
|
485 | +?>>Mapbox outdoors</option> |
|
486 | + <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') { |
|
487 | + print ' selected'; |
|
488 | +} |
|
489 | +?>>Mapbox pencil</option> |
|
490 | + <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') { |
|
491 | + print ' selected'; |
|
492 | +} |
|
493 | +?>>Mapbox pirates</option> |
|
494 | + <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') { |
|
495 | + print ' selected'; |
|
496 | +} |
|
497 | +?>>Mapbox emerald</option> |
|
342 | 498 | <?php |
343 | 499 | } |
344 | 500 | ?> |
345 | - <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option> |
|
501 | + <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') { |
|
502 | + print ' selected'; |
|
503 | +} |
|
504 | +?>>OpenStreetMap</option> |
|
346 | 505 | <?php |
347 | 506 | } |
348 | 507 | ?> |
@@ -353,10 +512,22 @@ discard block |
||
353 | 512 | ?> |
354 | 513 | <li><?php echo _("Type of Terrain:"); ?> |
355 | 514 | <select class="selectpicker" onchange="terrainType(this);"> |
356 | - <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option> |
|
357 | - <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option> |
|
358 | - <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option> |
|
359 | - <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option> |
|
515 | + <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
|
516 | + print ' selected'; |
|
517 | +} |
|
518 | +?>>stk terrain</option> |
|
519 | + <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') { |
|
520 | + print ' selected'; |
|
521 | +} |
|
522 | +?>>ellipsoid</option> |
|
523 | + <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') { |
|
524 | + print ' selected'; |
|
525 | +} |
|
526 | +?>>vr terrain</option> |
|
527 | + <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') { |
|
528 | + print ' selected'; |
|
529 | +} |
|
530 | +?>>ArticDEM</option> |
|
360 | 531 | </select> |
361 | 532 | </li> |
362 | 533 | <?php |
@@ -365,50 +536,98 @@ discard block |
||
365 | 536 | <?php |
366 | 537 | if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') { |
367 | 538 | ?> |
368 | - <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> |
|
539 | + <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') { |
|
540 | + print 'checked'; |
|
541 | +} |
|
542 | +?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li> |
|
369 | 543 | |
370 | 544 | <?php |
371 | 545 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
372 | 546 | ?> |
373 | - <!--<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>--> |
|
374 | - <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
375 | - <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']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
376 | - <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
377 | - <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> |
|
547 | + <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') { |
|
548 | + print 'checked'; |
|
549 | +} |
|
550 | +?> ><?php echo _("Display flight info as popup"); ?></label></div></li>--> |
|
551 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) { |
|
552 | + print 'checked'; |
|
553 | +} |
|
554 | +?> ><?php echo _("Display flight path"); ?></label></div></li> |
|
555 | + <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']) && isset($globalMapRoute) && $globalMapRoute)) { |
|
556 | + print 'checked'; |
|
557 | +} |
|
558 | +?> ><?php echo _("Display flight route on click"); ?></label></div></li> |
|
559 | + <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) { |
|
560 | + print 'checked'; |
|
561 | +} |
|
562 | +?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li> |
|
563 | + <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)) { |
|
564 | + print 'checked'; |
|
565 | +} |
|
566 | +?> ><?php echo _("Planes animate between updates"); ?></label></div></li> |
|
378 | 567 | <?php |
379 | 568 | } elseif (!isset($globalTracker) || $globalTracker === TRUE) { |
380 | 569 | ?> |
381 | - <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
570 | + <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) { |
|
571 | + print 'checked'; |
|
572 | +} |
|
573 | +?> ><?php echo _("Enable map matching"); ?></label></div></li> |
|
382 | 574 | <?php |
383 | 575 | } |
384 | 576 | if (isset($globalSatellite) && $globalSatellite === TRUE) { |
385 | 577 | ?> |
386 | - <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> |
|
578 | + <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)) { |
|
579 | + print 'checked'; |
|
580 | +} |
|
581 | +?> ><?php echo _("Satellites animate between updates"); ?></label></div></li> |
|
387 | 582 | <?php |
388 | 583 | } |
389 | 584 | } |
390 | 585 | ?> |
391 | - <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> |
|
392 | - <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> |
|
393 | - <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
394 | - <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
586 | + <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'])) { |
|
587 | + print 'checked'; |
|
588 | +} |
|
589 | +?> ><?php echo _("Display airports on map"); ?></label></div></li> |
|
590 | + <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))) { |
|
591 | + print 'checked'; |
|
592 | +} |
|
593 | +?> ><?php echo _("Display ground station on map"); ?></label></div></li> |
|
594 | + <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) { |
|
595 | + print 'checked'; |
|
596 | +} |
|
597 | +?> ><?php echo _("Display weather station on map"); ?></label></div></li> |
|
598 | + <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) { |
|
599 | + print 'checked'; |
|
600 | +} |
|
601 | +?> ><?php echo _("Display lightning on map"); ?></label></div></li> |
|
395 | 602 | <?php |
396 | 603 | if (isset($globalFires)) { |
397 | 604 | ?> |
398 | - <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> |
|
605 | + <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))) { |
|
606 | + print 'checked'; |
|
607 | +} |
|
608 | +?> ><?php echo _("Display fires on map"); ?></label></div></li> |
|
399 | 609 | <?php |
400 | 610 | } |
401 | 611 | if (isset($globalMap3D) && $globalMap3D) { |
402 | 612 | ?> |
403 | - <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
613 | + <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') { |
|
614 | + print 'checked'; |
|
615 | +} |
|
616 | +?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li> |
|
404 | 617 | <?php |
405 | 618 | } |
406 | 619 | ?> |
407 | 620 | <?php |
408 | 621 | if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') { |
409 | 622 | ?> |
410 | - <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> |
|
411 | - <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> |
|
623 | + <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')) { |
|
624 | + print 'checked'; |
|
625 | +} |
|
626 | +?> ><?php echo _("Show mini-map"); ?></label></div></li> |
|
627 | + <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)) { |
|
628 | + print 'checked'; |
|
629 | +} |
|
630 | +?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li> |
|
412 | 631 | <?php |
413 | 632 | } |
414 | 633 | if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) { |
@@ -421,17 +640,25 @@ discard block |
||
421 | 640 | if (function_exists('array_column')) { |
422 | 641 | if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) { |
423 | 642 | ?> |
424 | - <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> |
|
643 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
644 | + print 'checked'; |
|
645 | +} |
|
646 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
425 | 647 | <?php |
426 | 648 | } |
427 | 649 | } elseif (isset($globalSources)) { |
428 | 650 | $dispolar = false; |
429 | 651 | foreach ($globalSources as $testsource) { |
430 | - if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true; |
|
652 | + if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) { |
|
653 | + $dispolar = true; |
|
654 | + } |
|
431 | 655 | } |
432 | 656 | if ($dispolar) { |
433 | 657 | ?> |
434 | - <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> |
|
658 | + <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) { |
|
659 | + print 'checked'; |
|
660 | +} |
|
661 | +?> ><?php echo _("Display polar on map"); ?></label></div></li> |
|
435 | 662 | <?php |
436 | 663 | } |
437 | 664 | } |
@@ -444,11 +671,21 @@ discard block |
||
444 | 671 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
445 | 672 | if (extension_loaded('gd') && function_exists('gd_info')) { |
446 | 673 | ?> |
447 | - <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> |
|
674 | + <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') { |
|
675 | + print 'checked'; |
|
676 | +} |
|
677 | +?> ><?php echo _("Aircraft icon color based on altitude"); ?></li> |
|
448 | 678 | <?php |
449 | 679 | if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') { |
450 | 680 | ?> |
451 | - <li><?php echo _("Aircraft icon color:"); ?><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'; ?>"></li> |
|
681 | + <li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
682 | + print $_COOKIE['IconColor']; |
|
683 | +} elseif (isset($globalAircraftIconColor)) { |
|
684 | + print $globalAircraftIconColor; |
|
685 | +} else { |
|
686 | + print '1a3151'; |
|
687 | +} |
|
688 | +?>"></li> |
|
452 | 689 | <?php |
453 | 690 | } |
454 | 691 | } |
@@ -459,7 +696,14 @@ discard block |
||
459 | 696 | if (extension_loaded('gd') && function_exists('gd_info')) { |
460 | 697 | ?> |
461 | 698 | <li><?php echo _("Marine icon color:"); ?> |
462 | - <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'; ?>"> |
|
699 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
700 | + print $_COOKIE['MarineIconColor']; |
|
701 | +} elseif (isset($globalMarineIconColor)) { |
|
702 | + print $globalMarineIconColor; |
|
703 | +} else { |
|
704 | + print '1a3151'; |
|
705 | +} |
|
706 | +?>"> |
|
463 | 707 | </li> |
464 | 708 | <?php |
465 | 709 | } |
@@ -470,7 +714,14 @@ discard block |
||
470 | 714 | if (extension_loaded('gd') && function_exists('gd_info')) { |
471 | 715 | ?> |
472 | 716 | <li><?php echo _("Tracker icon color:"); ?> |
473 | - <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'; ?>"> |
|
717 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
718 | + print $_COOKIE['TrackerIconColor']; |
|
719 | +} elseif (isset($globalTrackerIconColor)) { |
|
720 | + print $globalTrackerIconColor; |
|
721 | +} else { |
|
722 | + print '1a3151'; |
|
723 | +} |
|
724 | +?>"> |
|
474 | 725 | </li> |
475 | 726 | <?php |
476 | 727 | } |
@@ -481,8 +732,22 @@ discard block |
||
481 | 732 | ?> |
482 | 733 | <li><?php echo _("Show airport icon at zoom level:"); ?> |
483 | 734 | <div class="range"> |
484 | - <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'; ?>"> |
|
485 | - <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output> |
|
735 | + <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) { |
|
736 | + print $_COOKIE['AirportZoom']; |
|
737 | +} elseif (isset($globalAirportZoom)) { |
|
738 | + print $globalAirportZoom; |
|
739 | +} else { |
|
740 | + print '7'; |
|
741 | +} |
|
742 | +?>"> |
|
743 | + <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) { |
|
744 | + print $_COOKIE['AirportZoom']; |
|
745 | +} elseif (isset($globalAirportZoom)) { |
|
746 | + print $globalAirportZoom; |
|
747 | +} else { |
|
748 | + print '7'; |
|
749 | +} |
|
750 | +?></output> |
|
486 | 751 | </div> |
487 | 752 | </li> |
488 | 753 | <?php |
@@ -494,10 +759,23 @@ discard block |
||
494 | 759 | <?php |
495 | 760 | if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
496 | 761 | ?> |
497 | - <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> ><?php echo _("Use airlines liveries"); ?></li> |
|
498 | - <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?> |
|
762 | + <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') { |
|
763 | + print 'checked'; |
|
764 | +} |
|
765 | +?> ><?php echo _("Use airlines liveries"); ?></li> |
|
766 | + <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') { |
|
767 | + print 'checked'; |
|
768 | +} |
|
769 | +?> ><?php echo _("Force Aircraft color"); ?> |
|
499 | 770 | <!--<li><?php echo _("Aircraft icon color:"); ?>--> |
500 | - <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 'ff0000'; ?>"> |
|
771 | + <input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) { |
|
772 | + print $_COOKIE['IconColor']; |
|
773 | +} elseif (isset($globalAircraftIconColor)) { |
|
774 | + print $globalAircraftIconColor; |
|
775 | +} else { |
|
776 | + print 'ff0000'; |
|
777 | +} |
|
778 | +?>"> |
|
501 | 779 | </li> |
502 | 780 | <?php |
503 | 781 | } |
@@ -505,9 +783,19 @@ discard block |
||
505 | 783 | <?php |
506 | 784 | if (isset($globalMarine) && $globalMarine === TRUE) { |
507 | 785 | ?> |
508 | - <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?> |
|
786 | + <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') { |
|
787 | + print 'checked'; |
|
788 | +} |
|
789 | +?> ><?php echo _("Force Marine color"); ?> |
|
509 | 790 | <!--<li><?php echo _("Marine icon color:"); ?>--> |
510 | - <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 'ff0000'; ?>"> |
|
791 | + <input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) { |
|
792 | + print $_COOKIE['MarineIconColor']; |
|
793 | +} elseif (isset($globalMarineIconColor)) { |
|
794 | + print $globalMarineIconColor; |
|
795 | +} else { |
|
796 | + print 'ff0000'; |
|
797 | +} |
|
798 | +?>"> |
|
511 | 799 | </li> |
512 | 800 | <?php |
513 | 801 | } |
@@ -515,9 +803,19 @@ discard block |
||
515 | 803 | <?php |
516 | 804 | if (isset($globalTracker) && $globalTracker === TRUE) { |
517 | 805 | ?> |
518 | - <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?> |
|
806 | + <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') { |
|
807 | + print 'checked'; |
|
808 | +} |
|
809 | +?> ><?php echo _("Force Tracker color"); ?> |
|
519 | 810 | <!--<li><?php echo _("Tracker icon color:"); ?>--> |
520 | - <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 'ff0000'; ?>"> |
|
811 | + <input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) { |
|
812 | + print $_COOKIE['TrackerIconColor']; |
|
813 | +} elseif (isset($globalTrackerIconColor)) { |
|
814 | + print $globalTrackerIconColor; |
|
815 | +} else { |
|
816 | + print 'ff0000'; |
|
817 | +} |
|
818 | +?>"> |
|
521 | 819 | </li> |
522 | 820 | <?php |
523 | 821 | } |
@@ -525,22 +823,46 @@ discard block |
||
525 | 823 | ?> |
526 | 824 | <li><?php echo _("Distance unit:"); ?> |
527 | 825 | <select class="selectpicker" onchange="unitdistance(this);"> |
528 | - <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option> |
|
529 | - <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option> |
|
530 | - <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option> |
|
826 | + <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
|
827 | + echo ' selected'; |
|
828 | +} |
|
829 | +?>>km</option> |
|
830 | + <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
|
831 | + echo ' selected'; |
|
832 | +} |
|
833 | +?>>nm</option> |
|
834 | + <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
|
835 | + echo ' selected'; |
|
836 | +} |
|
837 | +?>>mi</option> |
|
531 | 838 | </select> |
532 | 839 | </li> |
533 | 840 | <li><?php echo _("Altitude unit:"); ?> |
534 | 841 | <select class="selectpicker" onchange="unitaltitude(this);"> |
535 | - <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option> |
|
536 | - <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option> |
|
842 | + <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) { |
|
843 | + echo ' selected'; |
|
844 | +} |
|
845 | +?>>m</option> |
|
846 | + <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
847 | + echo ' selected'; |
|
848 | +} |
|
849 | +?>>feet</option> |
|
537 | 850 | </select> |
538 | 851 | </li> |
539 | 852 | <li><?php echo _("Speed unit:"); ?> |
540 | 853 | <select class="selectpicker" onchange="unitspeed(this);"> |
541 | - <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> |
|
542 | - <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option> |
|
543 | - <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option> |
|
854 | + <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) { |
|
855 | + echo ' selected'; |
|
856 | +} |
|
857 | +?>>km/h</option> |
|
858 | + <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) { |
|
859 | + echo ' selected'; |
|
860 | +} |
|
861 | +?>>mph</option> |
|
862 | + <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) { |
|
863 | + echo ' selected'; |
|
864 | +} |
|
865 | +?>>knots</option> |
|
544 | 866 | </select> |
545 | 867 | </li> |
546 | 868 | |
@@ -558,9 +880,18 @@ discard block |
||
558 | 880 | <?php |
559 | 881 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
560 | 882 | ?> |
561 | - <?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 } ?> |
|
562 | - <?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 } ?> |
|
563 | - <?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 } ?> |
|
883 | + <?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'])) { |
|
884 | + print 'checked'; |
|
885 | +} |
|
886 | +?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?> |
|
887 | + <?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'])) { |
|
888 | + print 'checked'; |
|
889 | +} |
|
890 | +?> ><?php echo _("Display IVAO data"); ?></li><?php } ?> |
|
891 | + <?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'])) { |
|
892 | + print 'checked'; |
|
893 | +} |
|
894 | +?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?> |
|
564 | 895 | <?php |
565 | 896 | } |
566 | 897 | ?> |
@@ -568,10 +899,16 @@ discard block |
||
568 | 899 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
569 | 900 | ?> |
570 | 901 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
571 | - <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> |
|
902 | + <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'])) { |
|
903 | + print 'checked'; |
|
904 | +} |
|
905 | +?> ><?php echo _("Display ADS-B data"); ?></label></div></li> |
|
572 | 906 | <?php } ?> |
573 | 907 | <?php if (isset($globalAPRS) && $globalAPRS) { ?> |
574 | - <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> |
|
908 | + <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'])) { |
|
909 | + print 'checked'; |
|
910 | +} |
|
911 | +?> ><?php echo _("Display APRS data"); ?></label></div></li> |
|
575 | 912 | <?php } ?> |
576 | 913 | <?php |
577 | 914 | } |
@@ -588,7 +925,9 @@ discard block |
||
588 | 925 | } |
589 | 926 | foreach($allairlinenames as $airline) { |
590 | 927 | $airline_name = $airline['airline_name']; |
591 | - if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...'; |
|
928 | + if (strlen($airline_name) > 30) { |
|
929 | + $airline_name = substr($airline_name,0,30).'...'; |
|
930 | + } |
|
592 | 931 | if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) { |
593 | 932 | echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>'; |
594 | 933 | } else { |
@@ -606,7 +945,10 @@ discard block |
||
606 | 945 | <li><?php echo _("Display alliance:"); ?> |
607 | 946 | <br/> |
608 | 947 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
609 | - <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
948 | + <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') { |
|
949 | + echo ' selected'; |
|
950 | +} |
|
951 | +?>><?php echo _("All"); ?></option> |
|
610 | 952 | <?php |
611 | 953 | foreach($allalliancenames as $alliance) { |
612 | 954 | $alliance_name = $alliance['alliance']; |
@@ -665,10 +1007,22 @@ discard block |
||
665 | 1007 | ?> |
666 | 1008 | <li><?php echo _("Display airlines of type:"); ?><br/> |
667 | 1009 | <select class="selectpicker" onchange="airlinestype(this);"> |
668 | - <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
|
669 | - <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option> |
|
670 | - <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option> |
|
671 | - <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option> |
|
1010 | + <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') { |
|
1011 | + echo ' selected'; |
|
1012 | +} |
|
1013 | +?>><?php echo _("All"); ?></option> |
|
1014 | + <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') { |
|
1015 | + echo ' selected'; |
|
1016 | +} |
|
1017 | +?>><?php echo _("Passenger"); ?></option> |
|
1018 | + <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') { |
|
1019 | + echo ' selected'; |
|
1020 | +} |
|
1021 | +?>><?php echo _("Cargo"); ?></option> |
|
1022 | + <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') { |
|
1023 | + echo ' selected'; |
|
1024 | +} |
|
1025 | +?>><?php echo _("Military"); ?></option> |
|
672 | 1026 | </select> |
673 | 1027 | </li> |
674 | 1028 | <?php |
@@ -682,14 +1036,20 @@ discard block |
||
682 | 1036 | ?> |
683 | 1037 | <li> |
684 | 1038 | <?php echo _("Display vessels with MMSI:"); ?> |
685 | - <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
|
1039 | + <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) { |
|
1040 | + print $_COOKIE['filter_mmsi']; |
|
1041 | +} |
|
1042 | +?>" /> |
|
686 | 1043 | </li> |
687 | 1044 | <?php |
688 | 1045 | } |
689 | 1046 | ?> |
690 | 1047 | <li> |
691 | 1048 | <?php echo _("Display with ident:"); ?> |
692 | - <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
|
1049 | + <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) { |
|
1050 | + print $_COOKIE['filter_ident']; |
|
1051 | +} |
|
1052 | +?>" /> |
|
693 | 1053 | </li> |
694 | 1054 | </ul> |
695 | 1055 | </form> |
@@ -705,7 +1065,10 @@ discard block |
||
705 | 1065 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
706 | 1066 | <form> |
707 | 1067 | <ul> |
708 | - <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
1068 | + <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) { |
|
1069 | + print 'checked'; |
|
1070 | +} |
|
1071 | +?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li> |
|
709 | 1072 | <li><?php echo _("Type:"); ?> |
710 | 1073 | <select class="selectpicker" multiple onchange="sattypes(this);"> |
711 | 1074 | <?php |
@@ -713,25 +1076,45 @@ discard block |
||
713 | 1076 | $types = $Satellite->get_tle_types(); |
714 | 1077 | foreach ($types as $type) { |
715 | 1078 | $type_name = $type['tle_type']; |
716 | - if ($type_name == 'musson') $type_name = 'Russian LEO Navigation'; |
|
717 | - else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System'; |
|
718 | - else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System'; |
|
719 | - else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational'; |
|
720 | - else if ($type_name == 'gps-ops') $type_name = 'GPS Operational'; |
|
721 | - else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System'; |
|
722 | - else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System'; |
|
723 | - else if ($type_name == 'sarsat') $type_name = 'Search & Rescue'; |
|
724 | - else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring'; |
|
725 | - else if ($type_name == 'resource') $type_name = 'Earth Resources'; |
|
726 | - else if ($type_name == 'stations') $type_name = 'Space Stations'; |
|
727 | - else if ($type_name == 'geo') $type_name = 'Geostationary'; |
|
728 | - else if ($type_name == 'amateur') $type_name = 'Amateur Radio'; |
|
729 | - else if ($type_name == 'x-comm') $type_name = 'Experimental'; |
|
730 | - else if ($type_name == 'other-comm') $type_name = 'Other Comm'; |
|
731 | - else if ($type_name == 'science') $type_name = 'Space & Earth Science'; |
|
732 | - else if ($type_name == 'military') $type_name = 'Miscellaneous Military'; |
|
733 | - else if ($type_name == 'radar') $type_name = 'Radar Calibration'; |
|
734 | - else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches'; |
|
1079 | + if ($type_name == 'musson') { |
|
1080 | + $type_name = 'Russian LEO Navigation'; |
|
1081 | + } else if ($type_name == 'nnss') { |
|
1082 | + $type_name = 'Navi Navigation Satellite System'; |
|
1083 | + } else if ($type_name == 'sbas') { |
|
1084 | + $type_name = 'Satellite-Based Augmentation System'; |
|
1085 | + } else if ($type_name == 'glo-ops') { |
|
1086 | + $type_name = 'Glonass Operational'; |
|
1087 | + } else if ($type_name == 'gps-ops') { |
|
1088 | + $type_name = 'GPS Operational'; |
|
1089 | + } else if ($type_name == 'argos') { |
|
1090 | + $type_name = 'ARGOS Data Collection System'; |
|
1091 | + } else if ($type_name == 'tdrss') { |
|
1092 | + $type_name = 'Tracking and Data Relay Satellite System'; |
|
1093 | + } else if ($type_name == 'sarsat') { |
|
1094 | + $type_name = 'Search & Rescue'; |
|
1095 | + } else if ($type_name == 'dmc') { |
|
1096 | + $type_name = 'Disaster Monitoring'; |
|
1097 | + } else if ($type_name == 'resource') { |
|
1098 | + $type_name = 'Earth Resources'; |
|
1099 | + } else if ($type_name == 'stations') { |
|
1100 | + $type_name = 'Space Stations'; |
|
1101 | + } else if ($type_name == 'geo') { |
|
1102 | + $type_name = 'Geostationary'; |
|
1103 | + } else if ($type_name == 'amateur') { |
|
1104 | + $type_name = 'Amateur Radio'; |
|
1105 | + } else if ($type_name == 'x-comm') { |
|
1106 | + $type_name = 'Experimental'; |
|
1107 | + } else if ($type_name == 'other-comm') { |
|
1108 | + $type_name = 'Other Comm'; |
|
1109 | + } else if ($type_name == 'science') { |
|
1110 | + $type_name = 'Space & Earth Science'; |
|
1111 | + } else if ($type_name == 'military') { |
|
1112 | + $type_name = 'Miscellaneous Military'; |
|
1113 | + } else if ($type_name == 'radar') { |
|
1114 | + $type_name = 'Radar Calibration'; |
|
1115 | + } else if ($type_name == 'tle-new') { |
|
1116 | + $type_name = 'Last 30 days launches'; |
|
1117 | + } |
|
735 | 1118 | |
736 | 1119 | if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) { |
737 | 1120 | print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>'; |