Completed
Push — master ( d55e29...5c3a30 )
by Yannick
78:14 queued 47:23
created
index.php 3 patches
Indentation   +100 added lines, -100 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     <?php }; if (isset($globalSatellite) && $globalSatellite) { ?><td><div id="ibxsatellite"><h4><?php echo _("Satellites Displayed"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?>
48 48
 </tr></table></div>
49 49
 <?php
50
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
50
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
51 51
 ?>
52 52
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
53 53
 <?php
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
72 72
 <?php
73 73
 	}
74
-    }
74
+	}
75 75
 ?>
76 76
 
77 77
 <div id="sidebar" class="sidebar collapsed">
@@ -82,34 +82,34 @@  discard block
 block discarded – undo
82 82
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
83 83
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
84 84
 <?php
85
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
85
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
86 86
 	if (isset($globalArchive) && $globalArchive == TRUE) {
87 87
 ?>
88 88
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
89 89
 <?php
90 90
 	}
91
-    }
91
+	}
92 92
 ?>
93 93
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
94 94
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
95 95
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
96 96
 <?php
97
-    if (isset($globalMap3D) && $globalMap3D) {
97
+	if (isset($globalMap3D) && $globalMap3D) {
98 98
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
99 99
 ?>
100 100
 	<li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
101 101
 <?php
102 102
 	} else {
103
-	    if (isset($globalSatellite) && $globalSatellite) {
103
+		if (isset($globalSatellite) && $globalSatellite) {
104 104
 ?>
105 105
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
106 106
 <?php
107
-	    }
107
+		}
108 108
 ?>
109 109
 	<li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
110 110
 <?php
111 111
 	}
112
-    }
112
+	}
113 113
 ?>
114 114
     </ul>
115 115
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 ?>
185 185
         </div>
186 186
 <?php
187
-    if (isset($globalArchive) && $globalArchive == TRUE) {
187
+	if (isset($globalArchive) && $globalArchive == TRUE) {
188 188
 ?>
189 189
         <div class="sidebar-pane" id="archive">
190 190
 	    <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	    </form>
244 244
 	</div>
245 245
 <?php
246
-    }
246
+	}
247 247
 ?>
248 248
         <div class="sidebar-pane" id="settings">
249 249
 	    <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -254,72 +254,72 @@  discard block
 block discarded – undo
254 254
 			    <?php
255 255
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
256 256
 				else $MapType = $_COOKIE['MapType'];
257
-			    ?>
257
+				?>
258 258
 			    <?php
259 259
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
260
-			    ?>
260
+				?>
261 261
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
262 262
 			    <?php
263 263
 				} else {
264
-				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265
-			    ?>
264
+					if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265
+				?>
266 266
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
267 267
 			    <?php
268
-				    }
269
-			    ?>
268
+					}
269
+				?>
270 270
 			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
271 271
 			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
272 272
 			    <?php
273
-				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
274
-			    ?>
273
+					if (isset($globalBingMapKey) && $globalBingMapKey != '') {
274
+				?>
275 275
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
276 276
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
277 277
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
278 278
 			    <?php
279
-				    }
280
-			    ?>
279
+					}
280
+				?>
281 281
 			    <?php
282
-				    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
283
-			    ?>
282
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
283
+				?>
284 284
 			    <?php
285 285
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
286
-			    ?>
286
+				?>
287 287
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
288 288
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
289 289
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
290 290
 			    <?php
291 291
 					}
292
-			    ?>
292
+				?>
293 293
 			    <?php
294 294
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
295
-			    ?>
295
+				?>
296 296
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
297 297
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
298 298
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
299 299
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
300 300
 			    <?php
301 301
 					}
302
-			    ?>
302
+				?>
303 303
 			    <?php
304 304
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
305
-			    ?>
305
+				?>
306 306
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
307 307
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
308 308
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
309 309
 			    <?php
310 310
 					}
311
-			    ?>
311
+				?>
312 312
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
313 313
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
314 314
 			    <?php
315
-				    }
316
-			    ?>
315
+					}
316
+				?>
317 317
 			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
318 318
 			    <?php
319
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
319
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
320 320
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
321 321
 					else $MapBoxId = $_COOKIE['MapTypeId'];
322
-			    ?>
322
+				?>
323 323
 			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
324 324
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
325 325
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
@@ -334,16 +334,16 @@  discard block
 block discarded – undo
334 334
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
335 335
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
336 336
 			    <?php
337
-				    }
338
-			    ?>
337
+					}
338
+				?>
339 339
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
340 340
 			    <?php
341 341
 				}
342
-			    ?>
342
+				?>
343 343
 			</select>
344 344
 		    </li>
345 345
 <?php
346
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
346
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
347 347
 ?>
348 348
 		    <li><?php echo _("Type of Terrain:"); ?>
349 349
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -354,10 +354,10 @@  discard block
 block discarded – undo
354 354
 			</select>
355 355
 		    </li>
356 356
 <?php
357
-    }
357
+	}
358 358
 ?>
359 359
 <?php
360
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
360
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
361 361
 ?>
362 362
 		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
363 363
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 		    <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
381 381
 <?php
382 382
 	}
383
-    }
383
+	}
384 384
 ?>
385 385
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
386 386
 		    <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li>
@@ -392,82 +392,82 @@  discard block
 block discarded – undo
392 392
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li>
393 393
 <?php
394 394
 	}
395
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
395
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
396 396
 ?>
397 397
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li>
398 398
 		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
399 399
 <?php
400
-    }
401
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
400
+	}
401
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
402 402
 ?>
403 403
 		    <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li>
404 404
 <?php
405
-    }
405
+	}
406 406
 ?>
407 407
 		    <?php
408 408
 			if (function_exists('array_column')) {
409
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
410
-		    ?>
409
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
410
+			?>
411 411
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
412 412
 		    <?php
413
-			    }
413
+				}
414 414
 			} elseif (isset($globalSources)) {
415
-			    $dispolar = false;
416
-			    foreach ($globalSources as $testsource) {
417
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
418
-			    }
419
-			    if ($dispolar) {
420
-		    ?>
415
+				$dispolar = false;
416
+				foreach ($globalSources as $testsource) {
417
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
418
+				}
419
+				if ($dispolar) {
420
+			?>
421 421
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
422 422
 		    <?php
423
-			    }
424
-		        }
425
-		    ?>
423
+				}
424
+				}
425
+			?>
426 426
 <?php
427
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
427
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
428 428
 ?>
429 429
 
430 430
 		    <?php
431 431
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
432
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
433
-		    ?>
432
+					if (extension_loaded('gd') && function_exists('gd_info')) {
433
+			?>
434 434
 		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
435 435
 		    <?php 
436 436
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
437
-		    ?>
437
+			?>
438 438
 		    <li><?php echo _("Aircraft icon color:"); ?>
439 439
 			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>">
440 440
 		    </li>
441 441
 		    <?php
442 442
 				}
443
-			    }
444
-		        }
445
-		    ?>
443
+				}
444
+				}
445
+			?>
446 446
 		    <?php
447 447
 			if (isset($globalMarine) && $globalMarine === TRUE) {
448
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
449
-		    ?>
448
+				if (extension_loaded('gd') && function_exists('gd_info')) {
449
+			?>
450 450
 		    <li><?php echo _("Marine icon color:"); ?>
451 451
 			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
452 452
 		    </li>
453 453
 		    <?php
454
-			    }
455
-		        }
456
-		    ?>
454
+				}
455
+				}
456
+			?>
457 457
 		    <?php
458 458
 			if (isset($globalTracker) && $globalTracker === TRUE) {
459
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
460
-		    ?>
459
+				if (extension_loaded('gd') && function_exists('gd_info')) {
460
+			?>
461 461
 		    <li><?php echo _("Tracker icon color:"); ?>
462 462
 			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>">
463 463
 		    </li>
464 464
 		    <?php
465
-			    }
466
-		        }
467
-		    ?>
465
+				}
466
+				}
467
+			?>
468 468
 		    <?php
469 469
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
470
-		    ?>
470
+			?>
471 471
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
472 472
 			<div class="range">
473 473
 			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>">
@@ -476,9 +476,9 @@  discard block
 block discarded – undo
476 476
 		    </li>
477 477
 		    <?php
478 478
 			}
479
-		    ?>
479
+			?>
480 480
 <?php
481
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
481
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
482 482
 ?>
483 483
 <?php
484 484
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 		    </li>
511 511
 <?php
512 512
 	}
513
-    }
513
+	}
514 514
 ?>
515 515
 		    <li><?php echo _("Distance unit:"); ?>
516 516
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -543,19 +543,19 @@  discard block
 block discarded – undo
543 543
 		    <ul>
544 544
 		    <?php
545 545
 			if (!isset($globalAircraft) || $globalAircraft) {
546
-		    ?>
546
+			?>
547 547
 		    <?php
548 548
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
549
-		    ?>
549
+			?>
550 550
 			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
551 551
 			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
552 552
 			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
553 553
 		    <?php
554 554
 			}
555
-		    ?>
555
+			?>
556 556
 		    <?php
557 557
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
558
-		    ?>
558
+			?>
559 559
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
560 560
 			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
561 561
 			<?php } ?>
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 			<?php } ?>
565 565
 		    <?php
566 566
 			}
567
-		    ?>
567
+			?>
568 568
 		    <li><?php echo _("Display airlines:"); ?>
569 569
 		    <br/>
570 570
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -584,14 +584,14 @@  discard block
 block discarded – undo
584 584
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
585 585
 					}
586 586
 				}
587
-			    ?>
587
+				?>
588 588
 			</select>
589 589
 		    </li>
590 590
 		    <?php
591 591
 			$Spotter = new Spotter();
592 592
 			$allalliancenames = $Spotter->getAllAllianceNames();
593 593
 			if (!empty($allalliancenames)) {
594
-		    ?>
594
+			?>
595 595
 		    <li><?php echo _("Display alliance:"); ?>
596 596
 		    <br/>
597 597
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -605,18 +605,18 @@  discard block
 block discarded – undo
605 605
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
606 606
 					}
607 607
 				}
608
-			    ?>
608
+				?>
609 609
 			</select>
610 610
 		    </li>
611 611
 		    <?php
612 612
 			}
613
-		    ?>
613
+			?>
614 614
 		    <?php
615 615
 			}
616
-		    ?>
616
+			?>
617 617
 		    <?php
618 618
 			if (isset($globalAPRS) && $globalAPRS) {
619
-		    ?>
619
+			?>
620 620
 		    <li><?php echo _("Display APRS sources name:"); ?>
621 621
 			<select class="selectpicker" multiple onchange="sources(this);">
622 622
 			    <?php
@@ -640,18 +640,18 @@  discard block
 block discarded – undo
640 640
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
641 641
 					}
642 642
 				}
643
-			    ?>
643
+				?>
644 644
 			</select>
645 645
 		    </li>
646 646
 		    <?php
647 647
 			}
648
-		    ?>
648
+			?>
649 649
 		    <?php
650 650
 			if (!isset($globalAircraft) || $globalAircraft) {
651
-		    ?>
651
+			?>
652 652
 		    <?php
653
-			    if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
654
-		    ?>
653
+				if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
654
+			?>
655 655
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
656 656
 			<select class="selectpicker" onchange="airlinestype(this);">
657 657
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -661,21 +661,21 @@  discard block
 block discarded – undo
661 661
 			</select>
662 662
 		    </li>
663 663
 		    <?php
664
-			    }
665
-		    ?>
664
+				}
665
+			?>
666 666
 		    <?php
667 667
 			}
668
-		    ?>
668
+			?>
669 669
 		    <?php
670 670
 			if (isset($globalMarine) && $globalMarine) {
671
-		    ?>
671
+			?>
672 672
 		    <li>
673 673
 			<?php echo _("Display vessels with MMSI:"); ?>
674 674
 			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
675 675
 		    </li>
676 676
 		    <?php
677 677
 			}
678
-		    ?>
678
+			?>
679 679
 		    <li>
680 680
 			<?php echo _("Display with ident:"); ?>
681 681
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 	    </form>
689 689
     	</div>
690 690
 <?php
691
-    if (isset($globalSatellite) && $globalSatellite) {
691
+	if (isset($globalSatellite) && $globalSatellite) {
692 692
 ?>
693 693
         <div class="sidebar-pane" id="satellites">
694 694
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -728,14 +728,14 @@  discard block
 block discarded – undo
728 728
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
729 729
 					}
730 730
 				}
731
-			    ?>
731
+				?>
732 732
 			</select>
733 733
 		    </li>
734 734
 		</ul>
735 735
 	    </form>
736 736
 	</div>
737 737
 <?php
738
-    }
738
+	}
739 739
 ?>
740 740
     </div>
741 741
 </div>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 require_once('require/class.Satellite.php');
6 6
 
7
-$trackident = filter_input(INPUT_GET,'trackid',FILTER_SANITIZE_STRING);
7
+$trackident = filter_input(INPUT_GET, 'trackid', FILTER_SANITIZE_STRING);
8 8
 if ($trackident != '') {
9 9
 	require_once('require/class.SpotterLive.php');
10 10
 	$SpotterLive = new SpotterLive();
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		$spotterid = $Spotter->getSpotterIDBasedOnFlightAwareID($trackident);
15 15
 		header('Location: '.$globalURL.'/flightid/'.$spotterid);
16 16
 	} else {
17
-		setcookie('MapTrack',$resulttrackident[0]['flightaware_id']);
17
+		setcookie('MapTrack', $resulttrackident[0]['flightaware_id']);
18 18
 	}
19 19
 } else {
20 20
 	unset($_COOKIE['MapTrack']);
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 		        <div class="form-group">
196 196
 			    <label>From (UTC):</label>
197 197
 		            <div class='input-group date' id='datetimepicker1'>
198
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
198
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a", $_COOKIE['archive_begin']); ?>" required />
199 199
 		                <span class="input-group-addon">
200 200
             			    <span class="glyphicon glyphicon-calendar"></span>
201 201
 		                </span>
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		        <div class="form-group">
205 205
 			    <label>To (UTC):</label>
206 206
 		            <div class='input-group date' id='datetimepicker2'>
207
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" />
207
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a", $_COOKIE['archive_end']); ?>" />
208 208
             			<span class="input-group-addon">
209 209
 		                    <span class="glyphicon glyphicon-calendar"></span>
210 210
             			</span>
@@ -348,9 +348,9 @@  discard block
 block discarded – undo
348 348
 		    <li><?php echo _("Type of Terrain:"); ?>
349 349
 			<select  class="selectpicker" onchange="terrainType(this);">
350 350
 			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
351
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
352
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
353
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
351
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected'; ?>>ellipsoid</option>
352
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected'; ?>>vr terrain</option>
353
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected'; ?>>ArticDEM</option>
354 354
 			</select>
355 355
 		    </li>
356 356
 <?php
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
399 399
 <?php
400 400
     }
401
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
401
+    if (time() > mktime(0, 0, 0, 12, 1, date("Y")) && time() < mktime(0, 0, 0, 12, 31, date("Y"))) {
402 402
 ?>
403 403
 		    <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li>
404 404
 <?php
@@ -575,10 +575,10 @@  discard block
 block discarded – undo
575 575
 					$Spotter = new Spotter();
576 576
 					$allairlinenames = $Spotter->getAllAirlineNames();
577 577
 				}
578
-				foreach($allairlinenames as $airline) {
578
+				foreach ($allairlinenames as $airline) {
579 579
 					$airline_name = $airline['airline_name'];
580
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
581
-					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
580
+					if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...';
581
+					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['filter_Airlines']))) {
582 582
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
583 583
 					} else {
584 584
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
598 598
 			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
599 599
 			    <?php
600
-				foreach($allalliancenames as $alliance) {
600
+				foreach ($allalliancenames as $alliance) {
601 601
 					$alliance_name = $alliance['alliance'];
602 602
 					if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] == $alliance_name) {
603 603
 						echo '<option value="'.$alliance_name.'" selected>'.$alliance_name.'</option>';
@@ -633,8 +633,8 @@  discard block
 block discarded – undo
633 633
 				*/
634 634
 				$Source = new Source();
635 635
 				$datasource = $Source->getLocationInfoByType('gs');
636
-				foreach($datasource as $src) {
637
-					if (isset($_COOKIE['filter_Sources']) && in_array($src['name'],explode(',',$_COOKIE['filter_Sources']))) {
636
+				foreach ($datasource as $src) {
637
+					if (isset($_COOKIE['filter_Sources']) && in_array($src['name'], explode(',', $_COOKIE['filter_Sources']))) {
638 638
 						echo '<option value="'.$src['name'].'" selected>'.$src['name'].'</option>';
639 639
 					} else {
640 640
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
723 723
 					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
724 724
 					
725
-					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
725
+					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'], explode(',', $_COOKIE['sattypes']))) {
726 726
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
727 727
 					} else {
728 728
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
Please login to merge, or discard this patch.
Braces   +493 added lines, -124 removed lines patch added patch discarded remove patch
@@ -49,7 +49,10 @@  discard block
 block discarded – undo
49 49
 <?php
50 50
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
51 51
 ?>
52
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
52
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
53
+	print '?tsk='.$tsk;
54
+}
55
+?>"></script>
53 56
 <?php
54 57
 	if (!isset($globalAircraft) || $globalAircraft) {
55 58
 ?>
@@ -163,11 +166,26 @@  discard block
 block discarded – undo
163 166
 				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li>
164 167
 				<li><?php echo _("NOTAM scope:"); ?>
165 168
 					<select class="selectpicker" onchange="notamscope(this);">
166
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
167
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
168
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
169
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
170
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
169
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
170
+	print ' selected';
171
+}
172
+?>>All</option>
173
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
174
+	print ' selected';
175
+}
176
+?>>Airport/Enroute warning</option>
177
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
178
+	print ' selected';
179
+}
180
+?>>Airport warning</option>
181
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
182
+	print ' selected';
183
+}
184
+?>>Navigation warning</option>
185
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
186
+	print ' selected';
187
+}
188
+?>>Enroute warning</option>
171 189
 					</select
172 190
 				</li>
173 191
 			</ul>
@@ -195,7 +213,12 @@  discard block
 block discarded – undo
195 213
 		        <div class="form-group">
196 214
 			    <label>From (UTC):</label>
197 215
 		            <div class='input-group date' id='datetimepicker1'>
198
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
216
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) {
217
+	print $_POST['start_date'];
218
+} elseif (isset($_COOKIE['archive_begin'])) {
219
+	print date("m/d/Y h:i a",$_COOKIE['archive_begin']);
220
+}
221
+?>" required />
199 222
 		                <span class="input-group-addon">
200 223
             			    <span class="glyphicon glyphicon-calendar"></span>
201 224
 		                </span>
@@ -204,7 +227,12 @@  discard block
 block discarded – undo
204 227
 		        <div class="form-group">
205 228
 			    <label>To (UTC):</label>
206 229
 		            <div class='input-group date' id='datetimepicker2'>
207
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" />
230
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) {
231
+	print $_POST['end_date'];
232
+} elseif (isset($_COOKIE['archive_end'])) {
233
+	print date("m/d/Y h:i a",$_COOKIE['archive_end']);
234
+}
235
+?>" />
208 236
             			<span class="input-group-addon">
209 237
 		                    <span class="glyphicon glyphicon-calendar"></span>
210 238
             			</span>
@@ -229,8 +257,20 @@  discard block
 block discarded – undo
229 257
 			</script>
230 258
 		    <li><?php echo _("Playback speed:"); ?>
231 259
 			<div class="range">
232
-			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>">
233
-			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
260
+			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
261
+	print $_POST['archivespeed'];
262
+} elseif (isset($_COOKIE['archive_speed'])) {
263
+	print $_COOKIE['archive_speed'];
264
+} else {
265
+	print '1';
266
+}
267
+?>">
268
+			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
269
+	print $_COOKIE['archive_speed'];
270
+} else {
271
+	print '1';
272
+}
273
+?></output>
234 274
 			</div>
235 275
 		    </li>
236 276
 		    <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li>
@@ -252,29 +292,53 @@  discard block
 block discarded – undo
252 292
 		    <li><?php echo _("Type of Map:"); ?>
253 293
 			<select  class="selectpicker" onchange="mapType(this);">
254 294
 			    <?php
255
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
256
-				else $MapType = $_COOKIE['MapType'];
295
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
296
+					$MapType = $globalMapProvider;
297
+				} else {
298
+					$MapType = $_COOKIE['MapType'];
299
+				}
257 300
 			    ?>
258 301
 			    <?php
259 302
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
260 303
 			    ?>
261
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
304
+			    <option value="offline"<?php if ($MapType == 'offline') {
305
+	print ' selected';
306
+}
307
+?>>Natural Earth (local)</option>
262 308
 			    <?php
263 309
 				} else {
264 310
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265 311
 			    ?>
266
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
312
+			    <option value="offline"<?php if ($MapType == 'offline') {
313
+	print ' selected';
314
+}
315
+?>>Natural Earth (local)</option>
267 316
 			    <?php
268 317
 				    }
269 318
 			    ?>
270
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
271
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
319
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
320
+	print ' selected';
321
+}
322
+?>>ArcGIS Streetmap</option>
323
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
324
+	print ' selected';
325
+}
326
+?>>ArcGIS Satellite</option>
272 327
 			    <?php
273 328
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
274 329
 			    ?>
275
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
276
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
277
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
330
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
331
+	print ' selected';
332
+}
333
+?>>Bing-Aerial</option>
334
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
335
+	print ' selected';
336
+}
337
+?>>Bing-Hybrid</option>
338
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
339
+	print ' selected';
340
+}
341
+?>>Bing-Road</option>
278 342
 			    <?php
279 343
 				    }
280 344
 			    ?>
@@ -284,59 +348,143 @@  discard block
 block discarded – undo
284 348
 			    <?php
285 349
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
286 350
 			    ?>
287
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
288
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
289
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
351
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
352
+	print ' selected';
353
+}
354
+?>>Here-Aerial</option>
355
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
356
+	print ' selected';
357
+}
358
+?>>Here-Hybrid</option>
359
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
360
+	print ' selected';
361
+}
362
+?>>Here-Road</option>
290 363
 			    <?php
291 364
 					}
292 365
 			    ?>
293 366
 			    <?php
294 367
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
295 368
 			    ?>
296
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
297
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
298
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
299
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
369
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
370
+	print ' selected';
371
+}
372
+?>>Google Roadmap</option>
373
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
374
+	print ' selected';
375
+}
376
+?>>Google Satellite</option>
377
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
378
+	print ' selected';
379
+}
380
+?>>Google Hybrid</option>
381
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
382
+	print ' selected';
383
+}
384
+?>>Google Terrain</option>
300 385
 			    <?php
301 386
 					}
302 387
 			    ?>
303 388
 			    <?php
304 389
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
305 390
 			    ?>
306
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
307
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
308
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
391
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
392
+	print ' selected';
393
+}
394
+?>>MapQuest-OSM</option>
395
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
396
+	print ' selected';
397
+}
398
+?>>MapQuest-Aerial</option>
399
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
400
+	print ' selected';
401
+}
402
+?>>MapQuest-Hybrid</option>
309 403
 			    <?php
310 404
 					}
311 405
 			    ?>
312
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
313
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
406
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
407
+	print ' selected';
408
+}
409
+?>>Yandex</option>
410
+			    <option value="offline"<?php if ($MapType == 'offline') {
411
+	print ' selected';
412
+}
413
+?>>Natural Earth</option>
314 414
 			    <?php
315 415
 				    }
316 416
 			    ?>
317
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
417
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
418
+	print ' selected';
419
+}
420
+?>>National Geographic Street</option>
318 421
 			    <?php
319 422
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
320
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
321
-					else $MapBoxId = $_COOKIE['MapTypeId'];
423
+					if (!isset($_COOKIE['MapTypeId'])) {
424
+						$MapBoxId = 'default';
425
+					} else {
426
+						$MapBoxId = $_COOKIE['MapTypeId'];
427
+					}
322 428
 			    ?>
323
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
324
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
325
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
326
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
327
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
328
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
329
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
330
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
331
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
332
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
333
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
334
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
335
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
429
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
430
+	print ' selected';
431
+}
432
+?>>Mapbox GL</option>
433
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
434
+	print ' selected';
435
+}
436
+?>>Mapbox default</option>
437
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
438
+	print ' selected';
439
+}
440
+?>>Mapbox streets</option>
441
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
442
+	print ' selected';
443
+}
444
+?>>Mapbox light</option>
445
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
446
+	print ' selected';
447
+}
448
+?>>Mapbox dark</option>
449
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
450
+	print ' selected';
451
+}
452
+?>>Mapbox satellite</option>
453
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
454
+	print ' selected';
455
+}
456
+?>>Mapbox streets-satellite</option>
457
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
458
+	print ' selected';
459
+}
460
+?>>Mapbox streets-basic</option>
461
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
462
+	print ' selected';
463
+}
464
+?>>Mapbox comic</option>
465
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
466
+	print ' selected';
467
+}
468
+?>>Mapbox outdoors</option>
469
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
470
+	print ' selected';
471
+}
472
+?>>Mapbox pencil</option>
473
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
474
+	print ' selected';
475
+}
476
+?>>Mapbox pirates</option>
477
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
478
+	print ' selected';
479
+}
480
+?>>Mapbox emerald</option>
336 481
 			    <?php
337 482
 				    }
338 483
 			    ?>
339
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
484
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
485
+	print ' selected';
486
+}
487
+?>>OpenStreetMap</option>
340 488
 			    <?php
341 489
 				}
342 490
 			    ?>
@@ -347,10 +495,22 @@  discard block
 block discarded – undo
347 495
 ?>
348 496
 		    <li><?php echo _("Type of Terrain:"); ?>
349 497
 			<select  class="selectpicker" onchange="terrainType(this);">
350
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
351
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
352
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
353
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
498
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
499
+	print ' selected';
500
+}
501
+?>>stk terrain</option>
502
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
503
+	print ' selected';
504
+}
505
+?>>ellipsoid</option>
506
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
507
+	print ' selected';
508
+}
509
+?>>vr terrain</option>
510
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
511
+	print ' selected';
512
+}
513
+?>>ArticDEM</option>
354 514
 			</select>
355 515
 		    </li>
356 516
 <?php
@@ -359,43 +519,88 @@  discard block
 block discarded – undo
359 519
 <?php
360 520
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
361 521
 ?>
362
-		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
522
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
523
+	print 'checked';
524
+}
525
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
363 526
 
364 527
 <?php
365 528
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
366 529
 ?>
367
-		    <!--<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>-->
368
-		    <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>
369
-		    <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>
370
-		    <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>
371
-		    <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>
530
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
531
+	print 'checked';
532
+}
533
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
534
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
535
+	print 'checked';
536
+}
537
+?> ><?php echo _("Display flight path"); ?></label></div></li>
538
+		    <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)) {
539
+	print 'checked';
540
+}
541
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
542
+		    <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)) {
543
+	print 'checked';
544
+}
545
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
546
+		    <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)) {
547
+	print 'checked';
548
+}
549
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
372 550
 <?php
373 551
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
374 552
 ?>
375
-		    <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>
553
+		    <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)) {
554
+	print 'checked';
555
+}
556
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
376 557
 <?php
377 558
 	}
378 559
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
379 560
 ?>
380
-		    <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
561
+		    <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)) {
562
+	print 'checked';
563
+}
564
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
381 565
 <?php
382 566
 	}
383 567
     }
384 568
 ?>
385
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
386
-		    <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>
387
-		    <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>
388
-		    <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>
569
+		    <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'])) {
570
+	print 'checked';
571
+}
572
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
573
+		    <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))) {
574
+	print 'checked';
575
+}
576
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
577
+		    <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))) {
578
+	print 'checked';
579
+}
580
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
581
+		    <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))) {
582
+	print 'checked';
583
+}
584
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
389 585
 <?php
390 586
 	if (isset($globalFires)) {
391 587
 ?>
392
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li>
588
+		    <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))) {
589
+	print 'checked';
590
+}
591
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
393 592
 <?php
394 593
 	}
395 594
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
396 595
 ?>
397
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li>
398
-		    <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>
596
+		    <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')) {
597
+	print 'checked';
598
+}
599
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
600
+		    <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)) {
601
+	print 'checked';
602
+}
603
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
399 604
 <?php
400 605
     }
401 606
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -408,17 +613,25 @@  discard block
 block discarded – undo
408 613
 			if (function_exists('array_column')) {
409 614
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
410 615
 		    ?>
411
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
616
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
617
+	print 'checked';
618
+}
619
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
412 620
 		    <?php
413 621
 			    }
414 622
 			} elseif (isset($globalSources)) {
415 623
 			    $dispolar = false;
416 624
 			    foreach ($globalSources as $testsource) {
417
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
625
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
626
+			        	$dispolar = true;
627
+			        }
418 628
 			    }
419 629
 			    if ($dispolar) {
420 630
 		    ?>
421
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
631
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
632
+	print 'checked';
633
+}
634
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
422 635
 		    <?php
423 636
 			    }
424 637
 		        }
@@ -431,12 +644,22 @@  discard block
 block discarded – undo
431 644
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
432 645
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
433 646
 		    ?>
434
-		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
647
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
648
+	print 'checked';
649
+}
650
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
435 651
 		    <?php 
436 652
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
437 653
 		    ?>
438 654
 		    <li><?php echo _("Aircraft icon color:"); ?>
439
-			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>">
655
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
656
+	print $_COOKIE['IconColor'];
657
+} elseif (isset($globalAircraftIconColor)) {
658
+	print $globalAircraftIconColor;
659
+} else {
660
+	print '1a3151';
661
+}
662
+?>">
440 663
 		    </li>
441 664
 		    <?php
442 665
 				}
@@ -448,7 +671,14 @@  discard block
 block discarded – undo
448 671
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
449 672
 		    ?>
450 673
 		    <li><?php echo _("Marine icon color:"); ?>
451
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
674
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
675
+	print $_COOKIE['MarineIconColor'];
676
+} elseif (isset($globalMarineIconColor)) {
677
+	print $globalMarineIconColor;
678
+} else {
679
+	print '1a3151';
680
+}
681
+?>">
452 682
 		    </li>
453 683
 		    <?php
454 684
 			    }
@@ -459,7 +689,14 @@  discard block
 block discarded – undo
459 689
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
460 690
 		    ?>
461 691
 		    <li><?php echo _("Tracker icon color:"); ?>
462
-			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>">
692
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
693
+	print $_COOKIE['TrackerIconColor'];
694
+} elseif (isset($globalTrackerIconColor)) {
695
+	print $globalTrackerIconColor;
696
+} else {
697
+	print '1a3151';
698
+}
699
+?>">
463 700
 		    </li>
464 701
 		    <?php
465 702
 			    }
@@ -470,8 +707,22 @@  discard block
 block discarded – undo
470 707
 		    ?>
471 708
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
472 709
 			<div class="range">
473
-			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>">
474
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
710
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
711
+	print $_COOKIE['AirportZoom'];
712
+} elseif (isset($globalAirportZoom)) {
713
+	print $globalAirportZoom;
714
+} else {
715
+	print '7';
716
+}
717
+?>">
718
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
719
+	print $_COOKIE['AirportZoom'];
720
+} elseif (isset($globalAirportZoom)) {
721
+	print $globalAirportZoom;
722
+} else {
723
+	print '7';
724
+}
725
+?></output>
475 726
 			</div>
476 727
 		    </li>
477 728
 		    <?php
@@ -483,10 +734,23 @@  discard block
 block discarded – undo
483 734
 <?php
484 735
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
485 736
 ?>
486
-		    <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>
487
-		    <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"); ?></li>
737
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
738
+	print 'checked';
739
+}
740
+?> ><?php echo _("Use airlines liveries"); ?></li>
741
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
742
+	print 'checked';
743
+}
744
+?> ><?php echo _("Force Aircraft color"); ?></li>
488 745
 		    <li><?php echo _("Aircraft icon color:"); ?>
489
-			<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'; ?>">
746
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
747
+	print $_COOKIE['IconColor'];
748
+} elseif (isset($globalAircraftIconColor)) {
749
+	print $globalAircraftIconColor;
750
+} else {
751
+	print 'ff0000';
752
+}
753
+?>">
490 754
 		    </li>
491 755
 <?php
492 756
 	}
@@ -494,9 +758,19 @@  discard block
 block discarded – undo
494 758
 <?php
495 759
 	if (isset($globalMarine) && $globalMarine === TRUE) {
496 760
 ?>
497
-		    <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"); ?></li>
761
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
762
+	print 'checked';
763
+}
764
+?> ><?php echo _("Force Marine color"); ?></li>
498 765
 		    <li><?php echo _("Marine icon color:"); ?>
499
-			<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'; ?>">
766
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
767
+	print $_COOKIE['MarineIconColor'];
768
+} elseif (isset($globalMarineIconColor)) {
769
+	print $globalMarineIconColor;
770
+} else {
771
+	print 'ff0000';
772
+}
773
+?>">
500 774
 		    </li>
501 775
 <?php
502 776
 	}
@@ -504,9 +778,19 @@  discard block
 block discarded – undo
504 778
 <?php
505 779
 	if (isset($globalTracker) && $globalTracker === TRUE) {
506 780
 ?>
507
-		    <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"); ?></li>
781
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
782
+	print 'checked';
783
+}
784
+?> ><?php echo _("Force Tracker color"); ?></li>
508 785
 		    <li><?php echo _("Tracker icon color:"); ?>
509
-			<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'; ?>">
786
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
787
+	print $_COOKIE['TrackerIconColor'];
788
+} elseif (isset($globalTrackerIconColor)) {
789
+	print $globalTrackerIconColor;
790
+} else {
791
+	print 'ff0000';
792
+}
793
+?>">
510 794
 		    </li>
511 795
 <?php
512 796
 	}
@@ -514,22 +798,46 @@  discard block
 block discarded – undo
514 798
 ?>
515 799
 		    <li><?php echo _("Distance unit:"); ?>
516 800
 			<select class="selectpicker" onchange="unitdistance(this);">
517
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
518
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
519
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
801
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
802
+	echo ' selected';
803
+}
804
+?>>km</option>
805
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
806
+	echo ' selected';
807
+}
808
+?>>nm</option>
809
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
810
+	echo ' selected';
811
+}
812
+?>>mi</option>
520 813
 		        </select>
521 814
 		    </li>
522 815
 		    <li><?php echo _("Altitude unit:"); ?>
523 816
 			<select class="selectpicker" onchange="unitaltitude(this);">
524
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
525
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
817
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
818
+	echo ' selected';
819
+}
820
+?>>m</option>
821
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
822
+	echo ' selected';
823
+}
824
+?>>feet</option>
526 825
 		        </select>
527 826
 		    </li>
528 827
 		    <li><?php echo _("Speed unit:"); ?>
529 828
 			<select class="selectpicker" onchange="unitspeed(this);">
530
-			    <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>
531
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
532
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
829
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
830
+	echo ' selected';
831
+}
832
+?>>km/h</option>
833
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
834
+	echo ' selected';
835
+}
836
+?>>mph</option>
837
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
838
+	echo ' selected';
839
+}
840
+?>>knots</option>
533 841
 		        </select>
534 842
 		    </li>
535 843
 
@@ -547,9 +855,18 @@  discard block
 block discarded – undo
547 855
 		    <?php
548 856
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
549 857
 		    ?>
550
-			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
551
-			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
552
-			<?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 } ?>
858
+			<?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'])) {
859
+	print 'checked';
860
+}
861
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
862
+			<?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'])) {
863
+	print 'checked';
864
+}
865
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
866
+			<?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'])) {
867
+	print 'checked';
868
+}
869
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
553 870
 		    <?php
554 871
 			}
555 872
 		    ?>
@@ -557,10 +874,16 @@  discard block
 block discarded – undo
557 874
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
558 875
 		    ?>
559 876
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
560
-			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
877
+			    <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'])) {
878
+	print 'checked';
879
+}
880
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
561 881
 			<?php } ?>
562 882
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
563
-			    <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>
883
+			    <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'])) {
884
+	print 'checked';
885
+}
886
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
564 887
 			<?php } ?>
565 888
 		    <?php
566 889
 			}
@@ -577,7 +900,9 @@  discard block
 block discarded – undo
577 900
 				}
578 901
 				foreach($allairlinenames as $airline) {
579 902
 					$airline_name = $airline['airline_name'];
580
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
903
+					if (strlen($airline_name) > 30) {
904
+						$airline_name = substr($airline_name,0,30).'...';
905
+					}
581 906
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
582 907
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
583 908
 					} else {
@@ -595,7 +920,10 @@  discard block
 block discarded – undo
595 920
 		    <li><?php echo _("Display alliance:"); ?>
596 921
 		    <br/>
597 922
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
598
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
923
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
924
+	echo ' selected';
925
+}
926
+?>><?php echo _("All"); ?></option>
599 927
 			    <?php
600 928
 				foreach($allalliancenames as $alliance) {
601 929
 					$alliance_name = $alliance['alliance'];
@@ -654,10 +982,22 @@  discard block
 block discarded – undo
654 982
 		    ?>
655 983
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
656 984
 			<select class="selectpicker" onchange="airlinestype(this);">
657
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
658
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
659
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
660
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
985
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
986
+	echo ' selected';
987
+}
988
+?>><?php echo _("All"); ?></option>
989
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
990
+	echo ' selected';
991
+}
992
+?>><?php echo _("Passenger"); ?></option>
993
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
994
+	echo ' selected';
995
+}
996
+?>><?php echo _("Cargo"); ?></option>
997
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
998
+	echo ' selected';
999
+}
1000
+?>><?php echo _("Military"); ?></option>
661 1001
 			</select>
662 1002
 		    </li>
663 1003
 		    <?php
@@ -671,14 +1011,20 @@  discard block
 block discarded – undo
671 1011
 		    ?>
672 1012
 		    <li>
673 1013
 			<?php echo _("Display vessels with MMSI:"); ?>
674
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1014
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1015
+	print $_COOKIE['filter_mmsi'];
1016
+}
1017
+?>" />
675 1018
 		    </li>
676 1019
 		    <?php
677 1020
 			}
678 1021
 		    ?>
679 1022
 		    <li>
680 1023
 			<?php echo _("Display with ident:"); ?>
681
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1024
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1025
+	print $_COOKIE['filter_ident'];
1026
+}
1027
+?>" />
682 1028
 		    </li>
683 1029
 		</ul>
684 1030
 	    </form>
@@ -694,7 +1040,10 @@  discard block
 block discarded – undo
694 1040
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
695 1041
 	    <form>
696 1042
 		<ul>
697
-		    <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>
1043
+		    <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'])) {
1044
+	print 'checked';
1045
+}
1046
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
698 1047
 		    <li><?php echo _("Type:"); ?>
699 1048
 			<select class="selectpicker" multiple onchange="sattypes(this);">
700 1049
 			    <?php
@@ -702,25 +1051,45 @@  discard block
 block discarded – undo
702 1051
 				$types = $Satellite->get_tle_types();
703 1052
 				foreach ($types as $type) {
704 1053
 					$type_name = $type['tle_type'];
705
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
706
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
707
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
708
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
709
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
710
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
711
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
712
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
713
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
714
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
715
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
716
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
717
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
718
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
719
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
720
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
721
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
722
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
723
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1054
+					if ($type_name == 'musson') {
1055
+						$type_name = 'Russian LEO Navigation';
1056
+					} else if ($type_name == 'nnss') {
1057
+						$type_name = 'Navi Navigation Satellite System';
1058
+					} else if ($type_name == 'sbas') {
1059
+						$type_name = 'Satellite-Based Augmentation System';
1060
+					} else if ($type_name == 'glo-ops') {
1061
+						$type_name = 'Glonass Operational';
1062
+					} else if ($type_name == 'gps-ops') {
1063
+						$type_name = 'GPS Operational';
1064
+					} else if ($type_name == 'argos') {
1065
+						$type_name = 'ARGOS Data Collection System';
1066
+					} else if ($type_name == 'tdrss') {
1067
+						$type_name = 'Tracking and Data Relay Satellite System';
1068
+					} else if ($type_name == 'sarsat') {
1069
+						$type_name = 'Search & Rescue';
1070
+					} else if ($type_name == 'dmc') {
1071
+						$type_name = 'Disaster Monitoring';
1072
+					} else if ($type_name == 'resource') {
1073
+						$type_name = 'Earth Resources';
1074
+					} else if ($type_name == 'stations') {
1075
+						$type_name = 'Space Stations';
1076
+					} else if ($type_name == 'geo') {
1077
+						$type_name = 'Geostationary';
1078
+					} else if ($type_name == 'amateur') {
1079
+						$type_name = 'Amateur Radio';
1080
+					} else if ($type_name == 'x-comm') {
1081
+						$type_name = 'Experimental';
1082
+					} else if ($type_name == 'other-comm') {
1083
+						$type_name = 'Other Comm';
1084
+					} else if ($type_name == 'science') {
1085
+						$type_name = 'Space & Earth Science';
1086
+					} else if ($type_name == 'military') {
1087
+						$type_name = 'Miscellaneous Military';
1088
+					} else if ($type_name == 'radar') {
1089
+						$type_name = 'Radar Calibration';
1090
+					} else if ($type_name == 'tle-new') {
1091
+						$type_name = 'Last 30 days launches';
1092
+					}
724 1093
 					
725 1094
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
726 1095
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.