@@ -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 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
173 | 173 | $coord = explode(',',$_GET['coord']); |
174 | 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 | - && $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)) { |
|
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 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
183 | 183 | $coord = explode(',',$_GET['coord']); |
184 | 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 | - && $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)) { |
|
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 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
193 | 193 | $coord = explode(',',$_GET['coord']); |
194 | 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 | - && $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)) { |
|
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 | } |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | $image = "images/placeholder_thumb.png"; |
302 | 302 | } |
303 | 303 | |
304 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
305 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
306 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
307 | - if ($prev_flightaware_id != $id) { |
|
304 | + if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
305 | + elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
306 | + elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
307 | + if ($prev_flightaware_id != $id) { |
|
308 | 308 | if ($prev_flightaware_id != '') { |
309 | 309 | /* |
310 | 310 | if ($nblatlong == 1) { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
385 | 385 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
386 | 386 | } else $aircraft_shadow = ''; |
387 | - $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
387 | + $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
388 | 388 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
389 | 389 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
390 | 390 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
416 | 416 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
417 | 417 | } |
418 | - $output .= '},'; |
|
418 | + $output .= '},'; |
|
419 | 419 | } elseif (isset($modelsdb[$aircraft_icao]) && $aircraft_icao != '') { |
420 | 420 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_icao].'","scale" : '.$scale.',"minimumPixelSize": '.$minimumpixelsize.''; |
421 | 421 | $output .= ',"heightReference": "'.$heightrelative.'"'; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
424 | 424 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
425 | 425 | } |
426 | - $output .= '},'; |
|
426 | + $output .= '},'; |
|
427 | 427 | } elseif ($aircraft_icao != '') { |
428 | 428 | $aircraft_info = $Spotter->getAllAircraftInfo($aircraft_icao); |
429 | 429 | if (isset($aircraft_info[0]['engine_type'])) { |
@@ -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 | <li><?php echo _("Set scaling factor for rendering resolution:"); ?> |
495 | 495 | <div class="range"> |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | </li> |
528 | 528 | <?php |
529 | 529 | } |
530 | - } |
|
530 | + } |
|
531 | 531 | ?> |
532 | 532 | <li><?php echo _("Distance unit:"); ?> |
533 | 533 | <select class="selectpicker" onchange="unitdistance(this);"> |
@@ -560,19 +560,19 @@ discard block |
||
560 | 560 | <ul> |
561 | 561 | <?php |
562 | 562 | if (!isset($globalAircraft) || $globalAircraft) { |
563 | - ?> |
|
563 | + ?> |
|
564 | 564 | <?php |
565 | 565 | if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) { |
566 | - ?> |
|
566 | + ?> |
|
567 | 567 | <?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 } ?> |
568 | 568 | <?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 } ?> |
569 | 569 | <?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 } ?> |
570 | 570 | <?php |
571 | 571 | } |
572 | - ?> |
|
572 | + ?> |
|
573 | 573 | <?php |
574 | 574 | if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) { |
575 | - ?> |
|
575 | + ?> |
|
576 | 576 | <?php if (isset($globalSBS1) && $globalSBS1) { ?> |
577 | 577 | <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> |
578 | 578 | <?php } ?> |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | <?php } ?> |
582 | 582 | <?php |
583 | 583 | } |
584 | - ?> |
|
584 | + ?> |
|
585 | 585 | <li><?php echo _("Display airlines:"); ?> |
586 | 586 | <br/> |
587 | 587 | <select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines"> |
@@ -601,14 +601,14 @@ discard block |
||
601 | 601 | echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>'; |
602 | 602 | } |
603 | 603 | } |
604 | - ?> |
|
604 | + ?> |
|
605 | 605 | </select> |
606 | 606 | </li> |
607 | 607 | <?php |
608 | 608 | $Spotter = new Spotter(); |
609 | 609 | $allalliancenames = $Spotter->getAllAllianceNames(); |
610 | 610 | if (!empty($allalliancenames)) { |
611 | - ?> |
|
611 | + ?> |
|
612 | 612 | <li><?php echo _("Display alliance:"); ?> |
613 | 613 | <br/> |
614 | 614 | <select class="selectpicker" onchange="alliance(this);" id="display_alliance"> |
@@ -622,18 +622,18 @@ discard block |
||
622 | 622 | echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>'; |
623 | 623 | } |
624 | 624 | } |
625 | - ?> |
|
625 | + ?> |
|
626 | 626 | </select> |
627 | 627 | </li> |
628 | 628 | <?php |
629 | 629 | } |
630 | - ?> |
|
630 | + ?> |
|
631 | 631 | <?php |
632 | 632 | } |
633 | - ?> |
|
633 | + ?> |
|
634 | 634 | <?php |
635 | 635 | if (isset($globalAPRS) && $globalAPRS) { |
636 | - ?> |
|
636 | + ?> |
|
637 | 637 | <li><?php echo _("Display APRS sources name:"); ?> |
638 | 638 | <select class="selectpicker" multiple onchange="sources(this);"> |
639 | 639 | <?php |
@@ -657,18 +657,18 @@ discard block |
||
657 | 657 | echo '<option value="'.$src['name'].'">'.$src['name'].'</option>'; |
658 | 658 | } |
659 | 659 | } |
660 | - ?> |
|
660 | + ?> |
|
661 | 661 | </select> |
662 | 662 | </li> |
663 | 663 | <?php |
664 | 664 | } |
665 | - ?> |
|
665 | + ?> |
|
666 | 666 | <?php |
667 | 667 | if (!isset($globalAircraft) || $globalAircraft) { |
668 | - ?> |
|
668 | + ?> |
|
669 | 669 | <?php |
670 | - if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
671 | - ?> |
|
670 | + if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) { |
|
671 | + ?> |
|
672 | 672 | <li><?php echo _("Display airlines of type:"); ?><br/> |
673 | 673 | <select class="selectpicker" onchange="airlinestype(this);"> |
674 | 674 | <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option> |
@@ -678,21 +678,21 @@ discard block |
||
678 | 678 | </select> |
679 | 679 | </li> |
680 | 680 | <?php |
681 | - } |
|
682 | - ?> |
|
681 | + } |
|
682 | + ?> |
|
683 | 683 | <?php |
684 | 684 | } |
685 | - ?> |
|
685 | + ?> |
|
686 | 686 | <?php |
687 | 687 | if (isset($globalMarine) && $globalMarine) { |
688 | - ?> |
|
688 | + ?> |
|
689 | 689 | <li> |
690 | 690 | <?php echo _("Display vessels with MMSI:"); ?> |
691 | 691 | <input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" /> |
692 | 692 | </li> |
693 | 693 | <?php |
694 | 694 | } |
695 | - ?> |
|
695 | + ?> |
|
696 | 696 | <li> |
697 | 697 | <?php echo _("Display with ident:"); ?> |
698 | 698 | <input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" /> |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | </form> |
706 | 706 | </div> |
707 | 707 | <?php |
708 | - if (isset($globalSatellite) && $globalSatellite) { |
|
708 | + if (isset($globalSatellite) && $globalSatellite) { |
|
709 | 709 | ?> |
710 | 710 | <div class="sidebar-pane" id="satellites"> |
711 | 711 | <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1> |
@@ -745,14 +745,14 @@ discard block |
||
745 | 745 | print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>'; |
746 | 746 | } |
747 | 747 | } |
748 | - ?> |
|
748 | + ?> |
|
749 | 749 | </select> |
750 | 750 | </li> |
751 | 751 | </ul> |
752 | 752 | </form> |
753 | 753 | </div> |
754 | 754 | <?php |
755 | - } |
|
755 | + } |
|
756 | 756 | ?> |
757 | 757 | </div> |
758 | 758 | </div> |