Completed
Push — master ( 8d4415...1bf6ad )
by Yannick
72:06 queued 32:47
created
index.php 2 patches
Indentation   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     <?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 } ?>
51 51
 </tr></table></div>
52 52
 <?php
53
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
53
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
54 54
 ?>
55 55
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
56 56
 <?php
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
75 75
 <?php
76 76
 	}
77
-    }
77
+	}
78 78
 ?>
79 79
 
80 80
 <div id="sidebar" class="sidebar collapsed">
@@ -85,34 +85,34 @@  discard block
 block discarded – undo
85 85
 	<li><a href="" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
86 86
 	<li><a href="" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
87 87
 <?php
88
-    //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) {
88
+	//if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) {
89 89
 	if (isset($globalArchive) && $globalArchive == TRUE && (!isset($globalAircraft) || $globalAircraft === TRUE)) {
90 90
 ?>
91 91
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
92 92
 <?php
93 93
 	}
94
-    //}
94
+	//}
95 95
 ?>
96 96
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
97 97
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
98 98
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
99 99
 <?php
100
-    if (isset($globalMap3D) && $globalMap3D) {
100
+	if (isset($globalMap3D) && $globalMap3D) {
101 101
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
102 102
 ?>
103 103
 	<li><a href="" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
104 104
 <?php
105 105
 	} else {
106
-	    if (isset($globalSatellite) && $globalSatellite) {
106
+		if (isset($globalSatellite) && $globalSatellite) {
107 107
 ?>
108 108
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
109 109
 <?php
110
-	    }
110
+		}
111 111
 ?>
112 112
 	<li><a href="" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
113 113
 <?php
114 114
 	}
115
-    }
115
+	}
116 116
 ?>
117 117
     </ul>
118 118
 
@@ -244,15 +244,15 @@  discard block
 block discarded – undo
244 244
 		    </div>
245 245
 		</li>
246 246
 		<?php
247
-		    if (isset($globalDemo) && $globalDemo) {
247
+			if (isset($globalDemo) && $globalDemo) {
248 248
 		?>
249 249
 		<li><button type="button" class="btn btn-primary disabled"><?php echo _("Show archive"); ?></button> Disabled in Demo mode</li>
250 250
 		<?php
251
-		    } else {
251
+			} else {
252 252
 		?>
253 253
 		<li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li>
254 254
 		<?php
255
-		    }
255
+			}
256 256
 		?>
257 257
 	    </ul>
258 258
 	    <ul>
@@ -271,72 +271,72 @@  discard block
 block discarded – undo
271 271
 			    <?php
272 272
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
273 273
 				else $MapType = $_COOKIE['MapType'];
274
-			    ?>
274
+				?>
275 275
 			    <?php
276 276
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
277
-			    ?>
277
+				?>
278 278
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
279 279
 			    <?php
280 280
 				} else {
281
-				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
282
-			    ?>
281
+					if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
282
+				?>
283 283
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
284 284
 			    <?php
285
-				    }
286
-			    ?>
285
+					}
286
+				?>
287 287
 			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
288 288
 			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
289 289
 			    <?php
290
-				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
291
-			    ?>
290
+					if (isset($globalBingMapKey) && $globalBingMapKey != '') {
291
+				?>
292 292
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
293 293
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
294 294
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
295 295
 			    <?php
296
-				    }
297
-			    ?>
296
+					}
297
+				?>
298 298
 			    <?php
299
-				    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
300
-			    ?>
299
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
300
+				?>
301 301
 			    <?php
302 302
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
303
-			    ?>
303
+				?>
304 304
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
305 305
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
306 306
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
307 307
 			    <?php
308 308
 					}
309
-			    ?>
309
+				?>
310 310
 			    <?php
311 311
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
312
-			    ?>
312
+				?>
313 313
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
314 314
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
315 315
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
316 316
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
317 317
 			    <?php
318 318
 					}
319
-			    ?>
319
+				?>
320 320
 			    <?php
321 321
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
322
-			    ?>
322
+				?>
323 323
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
324 324
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
325 325
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
326 326
 			    <?php
327 327
 					}
328
-			    ?>
328
+				?>
329 329
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
330 330
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
331 331
 			    <?php
332
-				    }
333
-			    ?>
332
+					}
333
+				?>
334 334
 			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
335 335
 			    <?php
336
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
336
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
337 337
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
338 338
 					else $MapBoxId = $_COOKIE['MapTypeId'];
339
-			    ?>
339
+				?>
340 340
 			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
341 341
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
342 342
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
@@ -351,16 +351,16 @@  discard block
 block discarded – undo
351 351
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
352 352
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
353 353
 			    <?php
354
-				    }
355
-			    ?>
354
+					}
355
+				?>
356 356
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
357 357
 			    <?php
358 358
 				}
359
-			    ?>
359
+				?>
360 360
 			</select>
361 361
 		    </li>
362 362
 <?php
363
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
363
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
364 364
 ?>
365 365
 		    <li><?php echo _("Type of Terrain:"); ?>
366 366
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -371,10 +371,10 @@  discard block
 block discarded – undo
371 371
 			</select>
372 372
 		    </li>
373 373
 <?php
374
-    }
374
+	}
375 375
 ?>
376 376
 <?php
377
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
377
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
378 378
 ?>
379 379
 		    <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>
380 380
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 		    <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>
398 398
 <?php
399 399
 	}
400
-    }
400
+	}
401 401
 ?>
402 402
 		    <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>
403 403
 		    <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>
@@ -416,80 +416,80 @@  discard block
 block discarded – undo
416 416
 	}
417 417
 ?>
418 418
 <?php
419
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
419
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
420 420
 ?>
421 421
 		    <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>
422 422
 		    <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>
423 423
 <?php
424
-    }
425
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
424
+	}
425
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
426 426
 ?>
427 427
 		    <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>
428 428
 <?php
429
-    }
429
+	}
430 430
 ?>
431 431
 		    <?php
432 432
 			if (function_exists('array_column')) {
433
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
434
-		    ?>
433
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
434
+			?>
435 435
 		    <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>
436 436
 		    <?php
437
-			    }
437
+				}
438 438
 			} elseif (isset($globalSources)) {
439
-			    $dispolar = false;
440
-			    foreach ($globalSources as $testsource) {
441
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
442
-			    }
443
-			    if ($dispolar) {
444
-		    ?>
439
+				$dispolar = false;
440
+				foreach ($globalSources as $testsource) {
441
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
442
+				}
443
+				if ($dispolar) {
444
+			?>
445 445
 		    <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>
446 446
 		    <?php
447
-			    }
448
-		        }
449
-		    ?>
447
+				}
448
+				}
449
+			?>
450 450
 <?php
451
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
451
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
452 452
 ?>
453 453
 
454 454
 		    <?php
455 455
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
456
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
457
-		    ?>
456
+					if (extension_loaded('gd') && function_exists('gd_info')) {
457
+			?>
458 458
 		    <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>
459 459
 		    <?php 
460 460
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
461
-		    ?>
461
+			?>
462 462
 			<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>
463 463
 		    <?php
464 464
 				}
465
-			    }
466
-		        }
467
-		    ?>
465
+				}
466
+				}
467
+			?>
468 468
 		    <?php
469 469
 			if (isset($globalMarine) && $globalMarine === 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 _("Marine icon color:"); ?>
473 473
 			<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'; ?>">
474 474
 		    </li>
475 475
 		    <?php
476
-			    }
477
-		        }
478
-		    ?>
476
+				}
477
+				}
478
+			?>
479 479
 		    <?php
480 480
 			if (isset($globalTracker) && $globalTracker === TRUE) {
481
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
482
-		    ?>
481
+				if (extension_loaded('gd') && function_exists('gd_info')) {
482
+			?>
483 483
 		    <li><?php echo _("Tracker icon color:"); ?>
484 484
 			<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'; ?>">
485 485
 		    </li>
486 486
 		    <?php
487
-			    }
488
-		        }
489
-		    ?>
487
+				}
488
+				}
489
+			?>
490 490
 		    <?php
491 491
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
492
-		    ?>
492
+			?>
493 493
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
494 494
 			<div class="range">
495 495
 			    <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'; ?>">
@@ -498,9 +498,9 @@  discard block
 block discarded – undo
498 498
 		    </li>
499 499
 		    <?php
500 500
 			}
501
-		    ?>
501
+			?>
502 502
 <?php
503
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
503
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
504 504
 ?>
505 505
 		    <li><?php echo _("Set scaling factor for rendering resolution:"); ?>
506 506
 			<div class="range">
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
 		    </li>
539 539
 <?php
540 540
 	}
541
-    }
541
+	}
542 542
 ?>
543 543
 		    <li><?php echo _("Distance unit:"); ?>
544 544
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -571,19 +571,19 @@  discard block
 block discarded – undo
571 571
 		    <ul>
572 572
 		    <?php
573 573
 			if (!isset($globalAircraft) || $globalAircraft) {
574
-		    ?>
574
+			?>
575 575
 		    <?php
576 576
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
577
-		    ?>
577
+			?>
578 578
 			<?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 } ?>
579 579
 			<?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 } ?>
580 580
 			<?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 } ?>
581 581
 		    <?php
582 582
 			}
583
-		    ?>
583
+			?>
584 584
 		    <?php
585 585
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
586
-		    ?>
586
+			?>
587 587
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
588 588
 			    <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>
589 589
 			<?php } ?>
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
 			<?php } ?>
593 593
 		    <?php
594 594
 			}
595
-		    ?>
595
+			?>
596 596
 		    <li><?php echo _("Display airlines:"); ?>
597 597
 		    <br/>
598 598
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -612,14 +612,14 @@  discard block
 block discarded – undo
612 612
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
613 613
 					}
614 614
 				}
615
-			    ?>
615
+				?>
616 616
 			</select>
617 617
 		    </li>
618 618
 		    <?php
619 619
 			$Spotter = new Spotter();
620 620
 			$allalliancenames = $Spotter->getAllAllianceNames();
621 621
 			if (!empty($allalliancenames)) {
622
-		    ?>
622
+			?>
623 623
 		    <li><?php echo _("Display alliance:"); ?>
624 624
 		    <br/>
625 625
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -633,18 +633,18 @@  discard block
 block discarded – undo
633 633
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
634 634
 					}
635 635
 				}
636
-			    ?>
636
+				?>
637 637
 			</select>
638 638
 		    </li>
639 639
 		    <?php
640 640
 			}
641
-		    ?>
641
+			?>
642 642
 		    <?php
643 643
 			}
644
-		    ?>
644
+			?>
645 645
 		    <?php
646 646
 			if (isset($globalAPRS) && $globalAPRS) {
647
-		    ?>
647
+			?>
648 648
 		    <li><?php echo _("Display APRS sources name:"); ?>
649 649
 			<select class="selectpicker" multiple onchange="sources(this);">
650 650
 			    <?php
@@ -668,18 +668,18 @@  discard block
 block discarded – undo
668 668
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
669 669
 					}
670 670
 				}
671
-			    ?>
671
+				?>
672 672
 			</select>
673 673
 		    </li>
674 674
 		    <?php
675 675
 			}
676
-		    ?>
676
+			?>
677 677
 		    <?php
678 678
 			if (!isset($globalAircraft) || $globalAircraft) {
679
-		    ?>
679
+			?>
680 680
 		    <?php
681
-			    if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
682
-		    ?>
681
+				if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
682
+			?>
683 683
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
684 684
 			<select class="selectpicker" onchange="airlinestype(this);">
685 685
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -689,21 +689,21 @@  discard block
 block discarded – undo
689 689
 			</select>
690 690
 		    </li>
691 691
 		    <?php
692
-			    }
693
-		    ?>
692
+				}
693
+			?>
694 694
 		    <?php
695 695
 			}
696
-		    ?>
696
+			?>
697 697
 		    <?php
698 698
 			if (isset($globalMarine) && $globalMarine) {
699
-		    ?>
699
+			?>
700 700
 		    <li>
701 701
 			<?php echo _("Display vessels with MMSI:"); ?>
702 702
 			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
703 703
 		    </li>
704 704
 		    <?php
705 705
 			}
706
-		    ?>
706
+			?>
707 707
 		    <li>
708 708
 			<?php echo _("Display with ident:"); ?>
709 709
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
 	    </form>
717 717
     	</div>
718 718
 <?php
719
-    if (isset($globalSatellite) && $globalSatellite) {
719
+	if (isset($globalSatellite) && $globalSatellite) {
720 720
 ?>
721 721
         <div class="sidebar-pane" id="satellites">
722 722
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -756,14 +756,14 @@  discard block
 block discarded – undo
756 756
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
757 757
 					}
758 758
 				}
759
-			    ?>
759
+				?>
760 760
 			</select>
761 761
 		    </li>
762 762
 		</ul>
763 763
 	    </form>
764 764
 	</div>
765 765
 <?php
766
-    }
766
+	}
767 767
 ?>
768 768
     </div>
769 769
 </div>
Please login to merge, or discard this patch.
Braces   +525 added lines, -132 removed lines patch added patch discarded remove patch
@@ -52,7 +52,10 @@  discard block
 block discarded – undo
52 52
 <?php
53 53
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
54 54
 ?>
55
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
55
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
56
+	print '?tsk='.$tsk;
57
+}
58
+?>"></script>
56 59
 <?php
57 60
 	if (!isset($globalAircraft) || $globalAircraft) {
58 61
 ?>
@@ -142,8 +145,14 @@  discard block
 block discarded – undo
142 145
 ?>
143 146
 		<form>
144 147
 			<ul>
145
-				<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>
146
-				<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>
148
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
149
+	print 'checked';
150
+}
151
+?> /><?php echo _("Display waypoints"); ?></label></div></li>
152
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
153
+	print 'checked';
154
+}
155
+?> /><?php echo _("Display airspace"); ?></label></div></li>
147 156
 			</ul>
148 157
 		</form>
149 158
 <?php
@@ -151,8 +160,14 @@  discard block
 block discarded – undo
151 160
 ?>
152 161
 		<form>
153 162
 			<ul>
154
-				<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>
155
-				<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>
163
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
164
+	print 'checked';
165
+}
166
+?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
167
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
168
+	print 'checked';
169
+}
170
+?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
156 171
 			</ul>
157 172
 			<p>This layers are in Beta, this can and will crash.</p>
158 173
 		</form>
@@ -163,14 +178,32 @@  discard block
 block discarded – undo
163 178
 		<h1>NOTAM</h1>
164 179
 		<form>
165 180
 			<ul>
166
-				<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>
181
+				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') {
182
+	print 'checked';
183
+}
184
+?> /><?php echo _("Display NOTAM"); ?></label></div></li>
167 185
 				<li><?php echo _("NOTAM scope:"); ?>
168 186
 					<select class="selectpicker" onchange="notamscope(this);">
169
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
170
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
171
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
172
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
173
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
187
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
188
+	print ' selected';
189
+}
190
+?>>All</option>
191
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
192
+	print ' selected';
193
+}
194
+?>>Airport/Enroute warning</option>
195
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
196
+	print ' selected';
197
+}
198
+?>>Airport warning</option>
199
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
200
+	print ' selected';
201
+}
202
+?>>Navigation warning</option>
203
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
204
+	print ' selected';
205
+}
206
+?>>Enroute warning</option>
174 207
 					</select
175 208
 				</li>
176 209
 			</ul>
@@ -198,7 +231,10 @@  discard block
 block discarded – undo
198 231
 		    <div class="form-group">
199 232
 			<label><?php echo _("From:"); ?></label>
200 233
 			<div class='input-group date' id='datetimepicker1'>
201
-			    <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 />
234
+			    <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') {
235
+	print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC';
236
+}
237
+?>" required />
202 238
 			    <span class="input-group-addon">
203 239
 				<span class="glyphicon glyphicon-calendar"></span>
204 240
 			    </span>
@@ -207,7 +243,10 @@  discard block
 block discarded – undo
207 243
 		    <div class="form-group">
208 244
 			<label><?php echo _("To:"); ?></label>
209 245
 			<div class='input-group date' id='datetimepicker2'>
210
-			    <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'; ?>" />
246
+			    <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') {
247
+	print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC';
248
+}
249
+?>" />
211 250
 			    <span class="input-group-addon">
212 251
 				<span class="glyphicon glyphicon-calendar"></span>
213 252
 			    </span>
@@ -239,8 +278,20 @@  discard block
 block discarded – undo
239 278
 		    </script>
240 279
 		<li><?php echo _("Playback speed:"); ?>
241 280
 		    <div class="range">
242
-			<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'; ?>">
243
-			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
281
+			<input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
282
+	print $_POST['archivespeed'];
283
+} elseif (isset($_COOKIE['archive_speed'])) {
284
+	print $_COOKIE['archive_speed'];
285
+} else {
286
+	print '1';
287
+}
288
+?>">
289
+			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
290
+	print $_COOKIE['archive_speed'];
291
+} else {
292
+	print '1';
293
+}
294
+?></output>
244 295
 		    </div>
245 296
 		</li>
246 297
 		<?php
@@ -269,29 +320,53 @@  discard block
 block discarded – undo
269 320
 		    <li><?php echo _("Type of Map:"); ?>
270 321
 			<select  class="selectpicker" onchange="mapType(this);">
271 322
 			    <?php
272
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
273
-				else $MapType = $_COOKIE['MapType'];
323
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
324
+					$MapType = $globalMapProvider;
325
+				} else {
326
+					$MapType = $_COOKIE['MapType'];
327
+				}
274 328
 			    ?>
275 329
 			    <?php
276 330
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
277 331
 			    ?>
278
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
332
+			    <option value="offline"<?php if ($MapType == 'offline') {
333
+	print ' selected';
334
+}
335
+?>>Natural Earth (local)</option>
279 336
 			    <?php
280 337
 				} else {
281 338
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
282 339
 			    ?>
283
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
340
+			    <option value="offline"<?php if ($MapType == 'offline') {
341
+	print ' selected';
342
+}
343
+?>>Natural Earth (local)</option>
284 344
 			    <?php
285 345
 				    }
286 346
 			    ?>
287
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
288
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
347
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
348
+	print ' selected';
349
+}
350
+?>>ArcGIS Streetmap</option>
351
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
352
+	print ' selected';
353
+}
354
+?>>ArcGIS Satellite</option>
289 355
 			    <?php
290 356
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
291 357
 			    ?>
292
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
293
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
294
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
358
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
359
+	print ' selected';
360
+}
361
+?>>Bing-Aerial</option>
362
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
363
+	print ' selected';
364
+}
365
+?>>Bing-Hybrid</option>
366
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
367
+	print ' selected';
368
+}
369
+?>>Bing-Road</option>
295 370
 			    <?php
296 371
 				    }
297 372
 			    ?>
@@ -301,59 +376,143 @@  discard block
 block discarded – undo
301 376
 			    <?php
302 377
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
303 378
 			    ?>
304
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
305
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
306
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
379
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
380
+	print ' selected';
381
+}
382
+?>>Here-Aerial</option>
383
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
384
+	print ' selected';
385
+}
386
+?>>Here-Hybrid</option>
387
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
388
+	print ' selected';
389
+}
390
+?>>Here-Road</option>
307 391
 			    <?php
308 392
 					}
309 393
 			    ?>
310 394
 			    <?php
311 395
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
312 396
 			    ?>
313
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
314
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
315
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
316
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
397
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
398
+	print ' selected';
399
+}
400
+?>>Google Roadmap</option>
401
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
402
+	print ' selected';
403
+}
404
+?>>Google Satellite</option>
405
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
406
+	print ' selected';
407
+}
408
+?>>Google Hybrid</option>
409
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
410
+	print ' selected';
411
+}
412
+?>>Google Terrain</option>
317 413
 			    <?php
318 414
 					}
319 415
 			    ?>
320 416
 			    <?php
321 417
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
322 418
 			    ?>
323
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
324
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
325
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
419
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
420
+	print ' selected';
421
+}
422
+?>>MapQuest-OSM</option>
423
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
424
+	print ' selected';
425
+}
426
+?>>MapQuest-Aerial</option>
427
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
428
+	print ' selected';
429
+}
430
+?>>MapQuest-Hybrid</option>
326 431
 			    <?php
327 432
 					}
328 433
 			    ?>
329
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
330
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
434
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
435
+	print ' selected';
436
+}
437
+?>>Yandex</option>
438
+			    <option value="offline"<?php if ($MapType == 'offline') {
439
+	print ' selected';
440
+}
441
+?>>Natural Earth</option>
331 442
 			    <?php
332 443
 				    }
333 444
 			    ?>
334
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
445
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
446
+	print ' selected';
447
+}
448
+?>>National Geographic Street</option>
335 449
 			    <?php
336 450
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
337
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
338
-					else $MapBoxId = $_COOKIE['MapTypeId'];
451
+					if (!isset($_COOKIE['MapTypeId'])) {
452
+						$MapBoxId = 'default';
453
+					} else {
454
+						$MapBoxId = $_COOKIE['MapTypeId'];
455
+					}
339 456
 			    ?>
340
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
341
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
342
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
343
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
344
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
345
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
346
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
347
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
348
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
349
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
350
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
351
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
352
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
457
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
458
+	print ' selected';
459
+}
460
+?>>Mapbox GL</option>
461
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
462
+	print ' selected';
463
+}
464
+?>>Mapbox default</option>
465
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
466
+	print ' selected';
467
+}
468
+?>>Mapbox streets</option>
469
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
470
+	print ' selected';
471
+}
472
+?>>Mapbox light</option>
473
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
474
+	print ' selected';
475
+}
476
+?>>Mapbox dark</option>
477
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
478
+	print ' selected';
479
+}
480
+?>>Mapbox satellite</option>
481
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
482
+	print ' selected';
483
+}
484
+?>>Mapbox streets-satellite</option>
485
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
486
+	print ' selected';
487
+}
488
+?>>Mapbox streets-basic</option>
489
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
490
+	print ' selected';
491
+}
492
+?>>Mapbox comic</option>
493
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
494
+	print ' selected';
495
+}
496
+?>>Mapbox outdoors</option>
497
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
498
+	print ' selected';
499
+}
500
+?>>Mapbox pencil</option>
501
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
502
+	print ' selected';
503
+}
504
+?>>Mapbox pirates</option>
505
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
506
+	print ' selected';
507
+}
508
+?>>Mapbox emerald</option>
353 509
 			    <?php
354 510
 				    }
355 511
 			    ?>
356
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
512
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
513
+	print ' selected';
514
+}
515
+?>>OpenStreetMap</option>
357 516
 			    <?php
358 517
 				}
359 518
 			    ?>
@@ -364,10 +523,22 @@  discard block
 block discarded – undo
364 523
 ?>
365 524
 		    <li><?php echo _("Type of Terrain:"); ?>
366 525
 			<select  class="selectpicker" onchange="terrainType(this);">
367
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
368
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
369
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
370
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
526
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
527
+	print ' selected';
528
+}
529
+?>>stk terrain</option>
530
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
531
+	print ' selected';
532
+}
533
+?>>ellipsoid</option>
534
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
535
+	print ' selected';
536
+}
537
+?>>vr terrain</option>
538
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
539
+	print ' selected';
540
+}
541
+?>>ArticDEM</option>
371 542
 			</select>
372 543
 		    </li>
373 544
 <?php
@@ -376,50 +547,98 @@  discard block
 block discarded – undo
376 547
 <?php
377 548
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
378 549
 ?>
379
-		    <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>
550
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
551
+	print 'checked';
552
+}
553
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
380 554
 
381 555
 <?php
382 556
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
383 557
 ?>
384
-		    <!--<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>-->
385
-		    <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>
386
-		    <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>
387
-		    <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>
388
-		    <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>
558
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
559
+	print 'checked';
560
+}
561
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
562
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
563
+	print 'checked';
564
+}
565
+?> ><?php echo _("Display flight path"); ?></label></div></li>
566
+		    <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)) {
567
+	print 'checked';
568
+}
569
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
570
+		    <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)) {
571
+	print 'checked';
572
+}
573
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
574
+		    <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)) {
575
+	print 'checked';
576
+}
577
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
389 578
 <?php
390 579
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
391 580
 ?>
392
-		    <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>
581
+		    <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)) {
582
+	print 'checked';
583
+}
584
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
393 585
 <?php
394 586
 	}
395 587
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
396 588
 ?>
397
-		    <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>
589
+		    <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)) {
590
+	print 'checked';
591
+}
592
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
398 593
 <?php
399 594
 	}
400 595
     }
401 596
 ?>
402
-		    <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>
403
-		    <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>
404
-		    <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>
405
-		    <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>
597
+		    <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'])) {
598
+	print 'checked';
599
+}
600
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
601
+		    <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))) {
602
+	print 'checked';
603
+}
604
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
605
+		    <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))) {
606
+	print 'checked';
607
+}
608
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
609
+		    <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))) {
610
+	print 'checked';
611
+}
612
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
406 613
 <?php
407 614
 	if (isset($globalFires)) {
408 615
 ?>
409
-		    <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>
616
+		    <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))) {
617
+	print 'checked';
618
+}
619
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
410 620
 <?php
411 621
 	}
412 622
 	if (isset($globalMap3D) && $globalMap3D) {
413 623
 ?>
414
-		    <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>
624
+		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') {
625
+	print 'checked';
626
+}
627
+?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
415 628
 <?php
416 629
 	}
417 630
 ?>
418 631
 <?php
419 632
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
420 633
 ?>
421
-		    <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>
422
-		    <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>
634
+		    <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')) {
635
+	print 'checked';
636
+}
637
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
638
+		    <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)) {
639
+	print 'checked';
640
+}
641
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
423 642
 <?php
424 643
     }
425 644
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -432,17 +651,25 @@  discard block
 block discarded – undo
432 651
 			if (function_exists('array_column')) {
433 652
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
434 653
 		    ?>
435
-		    <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>
654
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
655
+	print 'checked';
656
+}
657
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
436 658
 		    <?php
437 659
 			    }
438 660
 			} elseif (isset($globalSources)) {
439 661
 			    $dispolar = false;
440 662
 			    foreach ($globalSources as $testsource) {
441
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
663
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
664
+			        	$dispolar = true;
665
+			        }
442 666
 			    }
443 667
 			    if ($dispolar) {
444 668
 		    ?>
445
-		    <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>
669
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
670
+	print 'checked';
671
+}
672
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
446 673
 		    <?php
447 674
 			    }
448 675
 		        }
@@ -455,11 +682,21 @@  discard block
 block discarded – undo
455 682
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
456 683
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
457 684
 		    ?>
458
-		    <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>
685
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
686
+	print 'checked';
687
+}
688
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
459 689
 		    <?php 
460 690
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
461 691
 		    ?>
462
-			<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>
692
+			<li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
693
+	print $_COOKIE['IconColor'];
694
+} elseif (isset($globalAircraftIconColor)) {
695
+	print $globalAircraftIconColor;
696
+} else {
697
+	print '1a3151';
698
+}
699
+?>"></li>
463 700
 		    <?php
464 701
 				}
465 702
 			    }
@@ -470,7 +707,14 @@  discard block
 block discarded – undo
470 707
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
471 708
 		    ?>
472 709
 		    <li><?php echo _("Marine icon color:"); ?>
473
-			<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'; ?>">
710
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
711
+	print $_COOKIE['MarineIconColor'];
712
+} elseif (isset($globalMarineIconColor)) {
713
+	print $globalMarineIconColor;
714
+} else {
715
+	print '1a3151';
716
+}
717
+?>">
474 718
 		    </li>
475 719
 		    <?php
476 720
 			    }
@@ -481,7 +725,14 @@  discard block
 block discarded – undo
481 725
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
482 726
 		    ?>
483 727
 		    <li><?php echo _("Tracker icon color:"); ?>
484
-			<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'; ?>">
728
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
729
+	print $_COOKIE['TrackerIconColor'];
730
+} elseif (isset($globalTrackerIconColor)) {
731
+	print $globalTrackerIconColor;
732
+} else {
733
+	print '1a3151';
734
+}
735
+?>">
485 736
 		    </li>
486 737
 		    <?php
487 738
 			    }
@@ -492,8 +743,22 @@  discard block
 block discarded – undo
492 743
 		    ?>
493 744
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
494 745
 			<div class="range">
495
-			    <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'; ?>">
496
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
746
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
747
+	print $_COOKIE['AirportZoom'];
748
+} elseif (isset($globalAirportZoom)) {
749
+	print $globalAirportZoom;
750
+} else {
751
+	print '7';
752
+}
753
+?>">
754
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
755
+	print $_COOKIE['AirportZoom'];
756
+} elseif (isset($globalAirportZoom)) {
757
+	print $globalAirportZoom;
758
+} else {
759
+	print '7';
760
+}
761
+?></output>
497 762
 			</div>
498 763
 		    </li>
499 764
 		    <?php
@@ -504,17 +769,40 @@  discard block
 block discarded – undo
504 769
 ?>
505 770
 		    <li><?php echo _("Set scaling factor for rendering resolution:"); ?>
506 771
 			<div class="range">
507
-			    <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?>">
508
-			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output>
772
+			    <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) {
773
+	print $_COOKIE['resolutionScale'];
774
+} else {
775
+	print '1';
776
+}
777
+?>">
778
+			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) {
779
+	print $_COOKIE['resolutionScale'];
780
+} else {
781
+	print '1';
782
+}
783
+?></output>
509 784
 			</div>
510 785
 		    </li>
511 786
 <?php
512 787
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
513 788
 ?>
514
-		    <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>
515
-		    <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"); ?>&nbsp;
789
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
790
+	print 'checked';
791
+}
792
+?> > <?php echo _("Use airlines liveries"); ?></li>
793
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
794
+	print 'checked';
795
+}
796
+?> > <?php echo _("Force Aircraft color"); ?>&nbsp;
516 797
 		    <!--<li><?php echo _("Aircraft icon color:"); ?>-->
517
-			<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'; ?>">
798
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
799
+	print $_COOKIE['IconColor'];
800
+} elseif (isset($globalAircraftIconColor)) {
801
+	print $globalAircraftIconColor;
802
+} else {
803
+	print 'ff0000';
804
+}
805
+?>">
518 806
 		    </li>
519 807
 <?php
520 808
 	}
@@ -522,9 +810,19 @@  discard block
 block discarded – undo
522 810
 <?php
523 811
 	if (isset($globalMarine) && $globalMarine === TRUE) {
524 812
 ?>
525
-		    <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"); ?>&nbsp;
813
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
814
+	print 'checked';
815
+}
816
+?> ><?php echo _("Force Marine color"); ?>&nbsp;
526 817
 		    <!--<li><?php echo _("Marine icon color:"); ?>-->
527
-			<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'; ?>">
818
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
819
+	print $_COOKIE['MarineIconColor'];
820
+} elseif (isset($globalMarineIconColor)) {
821
+	print $globalMarineIconColor;
822
+} else {
823
+	print 'ff0000';
824
+}
825
+?>">
528 826
 		    </li>
529 827
 <?php
530 828
 	}
@@ -532,9 +830,19 @@  discard block
 block discarded – undo
532 830
 <?php
533 831
 	if (isset($globalTracker) && $globalTracker === TRUE) {
534 832
 ?>
535
-		    <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"); ?>&nbsp;
833
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
834
+	print 'checked';
835
+}
836
+?> ><?php echo _("Force Tracker color"); ?>&nbsp;
536 837
 		    <!--<li><?php echo _("Tracker icon color:"); ?>-->
537
-			<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'; ?>">
838
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
839
+	print $_COOKIE['TrackerIconColor'];
840
+} elseif (isset($globalTrackerIconColor)) {
841
+	print $globalTrackerIconColor;
842
+} else {
843
+	print 'ff0000';
844
+}
845
+?>">
538 846
 		    </li>
539 847
 <?php
540 848
 	}
@@ -542,22 +850,46 @@  discard block
 block discarded – undo
542 850
 ?>
543 851
 		    <li><?php echo _("Distance unit:"); ?>
544 852
 			<select class="selectpicker" onchange="unitdistance(this);">
545
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
546
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
547
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
853
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
854
+	echo ' selected';
855
+}
856
+?>>km</option>
857
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
858
+	echo ' selected';
859
+}
860
+?>>nm</option>
861
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
862
+	echo ' selected';
863
+}
864
+?>>mi</option>
548 865
 		        </select>
549 866
 		    </li>
550 867
 		    <li><?php echo _("Altitude unit:"); ?>
551 868
 			<select class="selectpicker" onchange="unitaltitude(this);">
552
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
553
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
869
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
870
+	echo ' selected';
871
+}
872
+?>>m</option>
873
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
874
+	echo ' selected';
875
+}
876
+?>>feet</option>
554 877
 		        </select>
555 878
 		    </li>
556 879
 		    <li><?php echo _("Speed unit:"); ?>
557 880
 			<select class="selectpicker" onchange="unitspeed(this);">
558
-			    <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>
559
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
560
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
881
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
882
+	echo ' selected';
883
+}
884
+?>>km/h</option>
885
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
886
+	echo ' selected';
887
+}
888
+?>>mph</option>
889
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
890
+	echo ' selected';
891
+}
892
+?>>knots</option>
561 893
 		        </select>
562 894
 		    </li>
563 895
 
@@ -575,9 +907,18 @@  discard block
 block discarded – undo
575 907
 		    <?php
576 908
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
577 909
 		    ?>
578
-			<?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 } ?>
579
-			<?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 } ?>
580
-			<?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 } ?>
910
+			<?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'])) {
911
+	print 'checked';
912
+}
913
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
914
+			<?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'])) {
915
+	print 'checked';
916
+}
917
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
918
+			<?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'])) {
919
+	print 'checked';
920
+}
921
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
581 922
 		    <?php
582 923
 			}
583 924
 		    ?>
@@ -585,10 +926,16 @@  discard block
 block discarded – undo
585 926
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
586 927
 		    ?>
587 928
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
588
-			    <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>
929
+			    <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'])) {
930
+	print 'checked';
931
+}
932
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
589 933
 			<?php } ?>
590 934
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
591
-			    <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>
935
+			    <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'])) {
936
+	print 'checked';
937
+}
938
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
592 939
 			<?php } ?>
593 940
 		    <?php
594 941
 			}
@@ -605,7 +952,9 @@  discard block
 block discarded – undo
605 952
 				}
606 953
 				foreach($allairlinenames as $airline) {
607 954
 					$airline_name = $airline['airline_name'];
608
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
955
+					if (strlen($airline_name) > 30) {
956
+						$airline_name = substr($airline_name,0,30).'...';
957
+					}
609 958
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
610 959
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
611 960
 					} else {
@@ -623,7 +972,10 @@  discard block
 block discarded – undo
623 972
 		    <li><?php echo _("Display alliance:"); ?>
624 973
 		    <br/>
625 974
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
626
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
975
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
976
+	echo ' selected';
977
+}
978
+?>><?php echo _("All"); ?></option>
627 979
 			    <?php
628 980
 				foreach($allalliancenames as $alliance) {
629 981
 					$alliance_name = $alliance['alliance'];
@@ -682,10 +1034,22 @@  discard block
 block discarded – undo
682 1034
 		    ?>
683 1035
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
684 1036
 			<select class="selectpicker" onchange="airlinestype(this);">
685
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
686
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
687
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
688
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
1037
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
1038
+	echo ' selected';
1039
+}
1040
+?>><?php echo _("All"); ?></option>
1041
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
1042
+	echo ' selected';
1043
+}
1044
+?>><?php echo _("Passenger"); ?></option>
1045
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
1046
+	echo ' selected';
1047
+}
1048
+?>><?php echo _("Cargo"); ?></option>
1049
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
1050
+	echo ' selected';
1051
+}
1052
+?>><?php echo _("Military"); ?></option>
689 1053
 			</select>
690 1054
 		    </li>
691 1055
 		    <?php
@@ -699,14 +1063,20 @@  discard block
 block discarded – undo
699 1063
 		    ?>
700 1064
 		    <li>
701 1065
 			<?php echo _("Display vessels with MMSI:"); ?>
702
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1066
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1067
+	print $_COOKIE['filter_mmsi'];
1068
+}
1069
+?>" />
703 1070
 		    </li>
704 1071
 		    <?php
705 1072
 			}
706 1073
 		    ?>
707 1074
 		    <li>
708 1075
 			<?php echo _("Display with ident:"); ?>
709
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1076
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1077
+	print $_COOKIE['filter_ident'];
1078
+}
1079
+?>" />
710 1080
 		    </li>
711 1081
 		</ul>
712 1082
 	    </form>
@@ -722,7 +1092,10 @@  discard block
 block discarded – undo
722 1092
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
723 1093
 	    <form>
724 1094
 		<ul>
725
-		    <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>
1095
+		    <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'])) {
1096
+	print 'checked';
1097
+}
1098
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
726 1099
 		    <li><?php echo _("Type:"); ?>
727 1100
 			<select class="selectpicker" multiple onchange="sattypes(this);">
728 1101
 			    <?php
@@ -730,25 +1103,45 @@  discard block
 block discarded – undo
730 1103
 				$types = $Satellite->get_tle_types();
731 1104
 				foreach ($types as $type) {
732 1105
 					$type_name = $type['tle_type'];
733
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
734
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
735
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
736
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
737
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
738
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
739
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
740
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
741
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
742
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
743
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
744
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
745
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
746
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
747
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
748
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
749
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
750
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
751
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1106
+					if ($type_name == 'musson') {
1107
+						$type_name = 'Russian LEO Navigation';
1108
+					} else if ($type_name == 'nnss') {
1109
+						$type_name = 'Navi Navigation Satellite System';
1110
+					} else if ($type_name == 'sbas') {
1111
+						$type_name = 'Satellite-Based Augmentation System';
1112
+					} else if ($type_name == 'glo-ops') {
1113
+						$type_name = 'Glonass Operational';
1114
+					} else if ($type_name == 'gps-ops') {
1115
+						$type_name = 'GPS Operational';
1116
+					} else if ($type_name == 'argos') {
1117
+						$type_name = 'ARGOS Data Collection System';
1118
+					} else if ($type_name == 'tdrss') {
1119
+						$type_name = 'Tracking and Data Relay Satellite System';
1120
+					} else if ($type_name == 'sarsat') {
1121
+						$type_name = 'Search & Rescue';
1122
+					} else if ($type_name == 'dmc') {
1123
+						$type_name = 'Disaster Monitoring';
1124
+					} else if ($type_name == 'resource') {
1125
+						$type_name = 'Earth Resources';
1126
+					} else if ($type_name == 'stations') {
1127
+						$type_name = 'Space Stations';
1128
+					} else if ($type_name == 'geo') {
1129
+						$type_name = 'Geostationary';
1130
+					} else if ($type_name == 'amateur') {
1131
+						$type_name = 'Amateur Radio';
1132
+					} else if ($type_name == 'x-comm') {
1133
+						$type_name = 'Experimental';
1134
+					} else if ($type_name == 'other-comm') {
1135
+						$type_name = 'Other Comm';
1136
+					} else if ($type_name == 'science') {
1137
+						$type_name = 'Space & Earth Science';
1138
+					} else if ($type_name == 'military') {
1139
+						$type_name = 'Miscellaneous Military';
1140
+					} else if ($type_name == 'radar') {
1141
+						$type_name = 'Radar Calibration';
1142
+					} else if ($type_name == 'tle-new') {
1143
+						$type_name = 'Last 30 days launches';
1144
+					}
752 1145
 					
753 1146
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
754 1147
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.