Completed
Push — master ( 21495f...45bf8f )
by Yannick
30:34
created
index.php 2 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="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
313 313
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
314 314
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
315 315
 			    <?php
316
-				    }
317
-			    ?>
316
+					}
317
+				?>
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,81 +392,81 @@  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
 <?php
399
-    }
400
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
399
+	}
400
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
401 401
 ?>
402 402
 		    <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>
403 403
 <?php
404
-    }
404
+	}
405 405
 ?>
406 406
 		    <?php
407 407
 			if (function_exists('array_column')) {
408
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
409
-		    ?>
408
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
409
+			?>
410 410
 		    <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>
411 411
 		    <?php
412
-			    }
412
+				}
413 413
 			} elseif (isset($globalSources)) {
414
-			    $dispolar = false;
415
-			    foreach ($globalSources as $testsource) {
416
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
417
-			    }
418
-			    if ($dispolar) {
419
-		    ?>
414
+				$dispolar = false;
415
+				foreach ($globalSources as $testsource) {
416
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
417
+				}
418
+				if ($dispolar) {
419
+			?>
420 420
 		    <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>
421 421
 		    <?php
422
-			    }
423
-		        }
424
-		    ?>
422
+				}
423
+				}
424
+			?>
425 425
 <?php
426
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
426
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
427 427
 ?>
428 428
 
429 429
 		    <?php
430 430
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
431
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
432
-		    ?>
431
+					if (extension_loaded('gd') && function_exists('gd_info')) {
432
+			?>
433 433
 		    <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>
434 434
 		    <?php 
435 435
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
436
-		    ?>
436
+			?>
437 437
 		    <li><?php echo _("Aircraft icon color:"); ?>
438 438
 			<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'; ?>">
439 439
 		    </li>
440 440
 		    <?php
441 441
 				}
442
-			    }
443
-		        }
444
-		    ?>
442
+				}
443
+				}
444
+			?>
445 445
 		    <?php
446 446
 			if (isset($globalMarine) && $globalMarine === TRUE) {
447
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
448
-		    ?>
447
+				if (extension_loaded('gd') && function_exists('gd_info')) {
448
+			?>
449 449
 		    <li><?php echo _("Marine icon color:"); ?>
450 450
 			<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'; ?>">
451 451
 		    </li>
452 452
 		    <?php
453
-			    }
454
-		        }
455
-		    ?>
453
+				}
454
+				}
455
+			?>
456 456
 		    <?php
457 457
 			if (isset($globalTracker) && $globalTracker === TRUE) {
458
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
459
-		    ?>
458
+				if (extension_loaded('gd') && function_exists('gd_info')) {
459
+			?>
460 460
 		    <li><?php echo _("Tracker icon color:"); ?>
461 461
 			<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'; ?>">
462 462
 		    </li>
463 463
 		    <?php
464
-			    }
465
-		        }
466
-		    ?>
464
+				}
465
+				}
466
+			?>
467 467
 		    <?php
468 468
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
469
-		    ?>
469
+			?>
470 470
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
471 471
 			<div class="range">
472 472
 			    <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'; ?>">
@@ -475,9 +475,9 @@  discard block
 block discarded – undo
475 475
 		    </li>
476 476
 		    <?php
477 477
 			}
478
-		    ?>
478
+			?>
479 479
 <?php
480
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
480
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
481 481
 ?>
482 482
 <?php
483 483
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 		    </li>
510 510
 <?php
511 511
 	}
512
-    }
512
+	}
513 513
 ?>
514 514
 		    <li><?php echo _("Distance unit:"); ?>
515 515
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -542,19 +542,19 @@  discard block
 block discarded – undo
542 542
 		    <ul>
543 543
 		    <?php
544 544
 			if (!isset($globalAircraft) || $globalAircraft) {
545
-		    ?>
545
+			?>
546 546
 		    <?php
547 547
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
548
-		    ?>
548
+			?>
549 549
 			<?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 } ?>
550 550
 			<?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 } ?>
551 551
 			<?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 } ?>
552 552
 		    <?php
553 553
 			}
554
-		    ?>
554
+			?>
555 555
 		    <?php
556 556
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
557
-		    ?>
557
+			?>
558 558
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
559 559
 			    <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>
560 560
 			<?php } ?>
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 			<?php } ?>
564 564
 		    <?php
565 565
 			}
566
-		    ?>
566
+			?>
567 567
 		    <li><?php echo _("Display airlines:"); ?>
568 568
 		    <br/>
569 569
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -583,14 +583,14 @@  discard block
 block discarded – undo
583 583
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
584 584
 					}
585 585
 				}
586
-			    ?>
586
+				?>
587 587
 			</select>
588 588
 		    </li>
589 589
 		    <?php
590 590
 			$Spotter = new Spotter();
591 591
 			$allalliancenames = $Spotter->getAllAllianceNames();
592 592
 			if (!empty($allalliancenames)) {
593
-		    ?>
593
+			?>
594 594
 		    <li><?php echo _("Display alliance:"); ?>
595 595
 		    <br/>
596 596
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -604,18 +604,18 @@  discard block
 block discarded – undo
604 604
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
605 605
 					}
606 606
 				}
607
-			    ?>
607
+				?>
608 608
 			</select>
609 609
 		    </li>
610 610
 		    <?php
611 611
 			}
612
-		    ?>
612
+			?>
613 613
 		    <?php
614 614
 			}
615
-		    ?>
615
+			?>
616 616
 		    <?php
617 617
 			if (isset($globalAPRS) && $globalAPRS) {
618
-		    ?>
618
+			?>
619 619
 		    <li><?php echo _("Display APRS sources name:"); ?>
620 620
 			<select class="selectpicker" multiple onchange="sources(this);">
621 621
 			    <?php
@@ -639,18 +639,18 @@  discard block
 block discarded – undo
639 639
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
640 640
 					}
641 641
 				}
642
-			    ?>
642
+				?>
643 643
 			</select>
644 644
 		    </li>
645 645
 		    <?php
646 646
 			}
647
-		    ?>
647
+			?>
648 648
 		    <?php
649 649
 			if (!isset($globalAircraft) || $globalAircraft) {
650
-		    ?>
650
+			?>
651 651
 		    <?php
652
-			    if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
653
-		    ?>
652
+				if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
653
+			?>
654 654
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
655 655
 			<select class="selectpicker" onchange="airlinestype(this);">
656 656
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -660,21 +660,21 @@  discard block
 block discarded – undo
660 660
 			</select>
661 661
 		    </li>
662 662
 		    <?php
663
-			    }
664
-		    ?>
663
+				}
664
+			?>
665 665
 		    <?php
666 666
 			}
667
-		    ?>
667
+			?>
668 668
 		    <?php
669 669
 			if (isset($globalMarine) && $globalMarine) {
670
-		    ?>
670
+			?>
671 671
 		    <li>
672 672
 			<?php echo _("Display vessels with MMSI:"); ?>
673 673
 			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
674 674
 		    </li>
675 675
 		    <?php
676 676
 			}
677
-		    ?>
677
+			?>
678 678
 		    <li>
679 679
 			<?php echo _("Display with ident:"); ?>
680 680
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 	    </form>
688 688
     	</div>
689 689
 <?php
690
-    if (isset($globalSatellite) && $globalSatellite) {
690
+	if (isset($globalSatellite) && $globalSatellite) {
691 691
 ?>
692 692
         <div class="sidebar-pane" id="satellites">
693 693
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -727,14 +727,14 @@  discard block
 block discarded – undo
727 727
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
728 728
 					}
729 729
 				}
730
-			    ?>
730
+				?>
731 731
 			</select>
732 732
 		    </li>
733 733
 		</ul>
734 734
 	    </form>
735 735
 	</div>
736 736
 <?php
737
-    }
737
+	}
738 738
 ?>
739 739
     </div>
740 740
 </div>
Please login to merge, or discard this patch.
Braces   +489 added lines, -123 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="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
313
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
314
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
406
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
407
+	print ' selected';
408
+}
409
+?>>National Geographic Street</option>
410
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
411
+	print ' selected';
412
+}
413
+?>>Yandex</option>
414
+			    <option value="offline"<?php if ($MapType == 'offline') {
415
+	print ' selected';
416
+}
417
+?>>Natural Earth</option>
315 418
 			    <?php
316 419
 				    }
317 420
 			    ?>
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,42 +519,84 @@  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>
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>
398 600
 <?php
399 601
     }
400 602
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -407,17 +609,25 @@  discard block
 block discarded – undo
407 609
 			if (function_exists('array_column')) {
408 610
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
409 611
 		    ?>
410
-		    <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>
612
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
613
+	print 'checked';
614
+}
615
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
411 616
 		    <?php
412 617
 			    }
413 618
 			} elseif (isset($globalSources)) {
414 619
 			    $dispolar = false;
415 620
 			    foreach ($globalSources as $testsource) {
416
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
621
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
622
+			        	$dispolar = true;
623
+			        }
417 624
 			    }
418 625
 			    if ($dispolar) {
419 626
 		    ?>
420
-		    <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>
627
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
628
+	print 'checked';
629
+}
630
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
421 631
 		    <?php
422 632
 			    }
423 633
 		        }
@@ -430,12 +640,22 @@  discard block
 block discarded – undo
430 640
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
431 641
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
432 642
 		    ?>
433
-		    <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>
643
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
644
+	print 'checked';
645
+}
646
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
434 647
 		    <?php 
435 648
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
436 649
 		    ?>
437 650
 		    <li><?php echo _("Aircraft icon color:"); ?>
438
-			<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'; ?>">
651
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
652
+	print $_COOKIE['IconColor'];
653
+} elseif (isset($globalAircraftIconColor)) {
654
+	print $globalAircraftIconColor;
655
+} else {
656
+	print '1a3151';
657
+}
658
+?>">
439 659
 		    </li>
440 660
 		    <?php
441 661
 				}
@@ -447,7 +667,14 @@  discard block
 block discarded – undo
447 667
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
448 668
 		    ?>
449 669
 		    <li><?php echo _("Marine icon color:"); ?>
450
-			<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'; ?>">
670
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
671
+	print $_COOKIE['MarineIconColor'];
672
+} elseif (isset($globalMarineIconColor)) {
673
+	print $globalMarineIconColor;
674
+} else {
675
+	print '1a3151';
676
+}
677
+?>">
451 678
 		    </li>
452 679
 		    <?php
453 680
 			    }
@@ -458,7 +685,14 @@  discard block
 block discarded – undo
458 685
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
459 686
 		    ?>
460 687
 		    <li><?php echo _("Tracker icon color:"); ?>
461
-			<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'; ?>">
688
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
689
+	print $_COOKIE['TrackerIconColor'];
690
+} elseif (isset($globalTrackerIconColor)) {
691
+	print $globalTrackerIconColor;
692
+} else {
693
+	print '1a3151';
694
+}
695
+?>">
462 696
 		    </li>
463 697
 		    <?php
464 698
 			    }
@@ -469,8 +703,22 @@  discard block
 block discarded – undo
469 703
 		    ?>
470 704
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
471 705
 			<div class="range">
472
-			    <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'; ?>">
473
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
706
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
707
+	print $_COOKIE['AirportZoom'];
708
+} elseif (isset($globalAirportZoom)) {
709
+	print $globalAirportZoom;
710
+} else {
711
+	print '7';
712
+}
713
+?>">
714
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
715
+	print $_COOKIE['AirportZoom'];
716
+} elseif (isset($globalAirportZoom)) {
717
+	print $globalAirportZoom;
718
+} else {
719
+	print '7';
720
+}
721
+?></output>
474 722
 			</div>
475 723
 		    </li>
476 724
 		    <?php
@@ -482,10 +730,23 @@  discard block
 block discarded – undo
482 730
 <?php
483 731
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
484 732
 ?>
485
-		    <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>
486
-		    <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>
733
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
734
+	print 'checked';
735
+}
736
+?> ><?php echo _("Use airlines liveries"); ?></li>
737
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
738
+	print 'checked';
739
+}
740
+?> ><?php echo _("Force Aircraft color"); ?></li>
487 741
 		    <li><?php echo _("Aircraft icon color:"); ?>
488
-			<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'; ?>">
742
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
743
+	print $_COOKIE['IconColor'];
744
+} elseif (isset($globalAircraftIconColor)) {
745
+	print $globalAircraftIconColor;
746
+} else {
747
+	print 'ff0000';
748
+}
749
+?>">
489 750
 		    </li>
490 751
 <?php
491 752
 	}
@@ -493,9 +754,19 @@  discard block
 block discarded – undo
493 754
 <?php
494 755
 	if (isset($globalMarine) && $globalMarine === TRUE) {
495 756
 ?>
496
-		    <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>
757
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
758
+	print 'checked';
759
+}
760
+?> ><?php echo _("Force Marine color"); ?></li>
497 761
 		    <li><?php echo _("Marine icon color:"); ?>
498
-			<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'; ?>">
762
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
763
+	print $_COOKIE['MarineIconColor'];
764
+} elseif (isset($globalMarineIconColor)) {
765
+	print $globalMarineIconColor;
766
+} else {
767
+	print 'ff0000';
768
+}
769
+?>">
499 770
 		    </li>
500 771
 <?php
501 772
 	}
@@ -503,9 +774,19 @@  discard block
 block discarded – undo
503 774
 <?php
504 775
 	if (isset($globalTracker) && $globalTracker === TRUE) {
505 776
 ?>
506
-		    <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>
777
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
778
+	print 'checked';
779
+}
780
+?> ><?php echo _("Force Tracker color"); ?></li>
507 781
 		    <li><?php echo _("Tracker icon color:"); ?>
508
-			<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'; ?>">
782
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
783
+	print $_COOKIE['TrackerIconColor'];
784
+} elseif (isset($globalTrackerIconColor)) {
785
+	print $globalTrackerIconColor;
786
+} else {
787
+	print 'ff0000';
788
+}
789
+?>">
509 790
 		    </li>
510 791
 <?php
511 792
 	}
@@ -513,22 +794,46 @@  discard block
 block discarded – undo
513 794
 ?>
514 795
 		    <li><?php echo _("Distance unit:"); ?>
515 796
 			<select class="selectpicker" onchange="unitdistance(this);">
516
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
517
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
518
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
797
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
798
+	echo ' selected';
799
+}
800
+?>>km</option>
801
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
802
+	echo ' selected';
803
+}
804
+?>>nm</option>
805
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
806
+	echo ' selected';
807
+}
808
+?>>mi</option>
519 809
 		        </select>
520 810
 		    </li>
521 811
 		    <li><?php echo _("Altitude unit:"); ?>
522 812
 			<select class="selectpicker" onchange="unitaltitude(this);">
523
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
524
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
813
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
814
+	echo ' selected';
815
+}
816
+?>>m</option>
817
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
818
+	echo ' selected';
819
+}
820
+?>>feet</option>
525 821
 		        </select>
526 822
 		    </li>
527 823
 		    <li><?php echo _("Speed unit:"); ?>
528 824
 			<select class="selectpicker" onchange="unitspeed(this);">
529
-			    <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>
530
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
531
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
825
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
826
+	echo ' selected';
827
+}
828
+?>>km/h</option>
829
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
830
+	echo ' selected';
831
+}
832
+?>>mph</option>
833
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
834
+	echo ' selected';
835
+}
836
+?>>knots</option>
532 837
 		        </select>
533 838
 		    </li>
534 839
 
@@ -546,9 +851,18 @@  discard block
 block discarded – undo
546 851
 		    <?php
547 852
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
548 853
 		    ?>
549
-			<?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 } ?>
550
-			<?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 } ?>
551
-			<?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 } ?>
854
+			<?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'])) {
855
+	print 'checked';
856
+}
857
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
858
+			<?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'])) {
859
+	print 'checked';
860
+}
861
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
862
+			<?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'])) {
863
+	print 'checked';
864
+}
865
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
552 866
 		    <?php
553 867
 			}
554 868
 		    ?>
@@ -556,10 +870,16 @@  discard block
 block discarded – undo
556 870
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
557 871
 		    ?>
558 872
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
559
-			    <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>
873
+			    <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'])) {
874
+	print 'checked';
875
+}
876
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
560 877
 			<?php } ?>
561 878
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
562
-			    <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>
879
+			    <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'])) {
880
+	print 'checked';
881
+}
882
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
563 883
 			<?php } ?>
564 884
 		    <?php
565 885
 			}
@@ -576,7 +896,9 @@  discard block
 block discarded – undo
576 896
 				}
577 897
 				foreach($allairlinenames as $airline) {
578 898
 					$airline_name = $airline['airline_name'];
579
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
899
+					if (strlen($airline_name) > 30) {
900
+						$airline_name = substr($airline_name,0,30).'...';
901
+					}
580 902
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
581 903
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
582 904
 					} else {
@@ -594,7 +916,10 @@  discard block
 block discarded – undo
594 916
 		    <li><?php echo _("Display alliance:"); ?>
595 917
 		    <br/>
596 918
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
597
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
919
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
920
+	echo ' selected';
921
+}
922
+?>><?php echo _("All"); ?></option>
598 923
 			    <?php
599 924
 				foreach($allalliancenames as $alliance) {
600 925
 					$alliance_name = $alliance['alliance'];
@@ -653,10 +978,22 @@  discard block
 block discarded – undo
653 978
 		    ?>
654 979
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
655 980
 			<select class="selectpicker" onchange="airlinestype(this);">
656
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
657
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
658
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
659
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
981
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
982
+	echo ' selected';
983
+}
984
+?>><?php echo _("All"); ?></option>
985
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
986
+	echo ' selected';
987
+}
988
+?>><?php echo _("Passenger"); ?></option>
989
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
990
+	echo ' selected';
991
+}
992
+?>><?php echo _("Cargo"); ?></option>
993
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
994
+	echo ' selected';
995
+}
996
+?>><?php echo _("Military"); ?></option>
660 997
 			</select>
661 998
 		    </li>
662 999
 		    <?php
@@ -670,14 +1007,20 @@  discard block
 block discarded – undo
670 1007
 		    ?>
671 1008
 		    <li>
672 1009
 			<?php echo _("Display vessels with MMSI:"); ?>
673
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1010
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1011
+	print $_COOKIE['filter_mmsi'];
1012
+}
1013
+?>" />
674 1014
 		    </li>
675 1015
 		    <?php
676 1016
 			}
677 1017
 		    ?>
678 1018
 		    <li>
679 1019
 			<?php echo _("Display with ident:"); ?>
680
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1020
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1021
+	print $_COOKIE['filter_ident'];
1022
+}
1023
+?>" />
681 1024
 		    </li>
682 1025
 		</ul>
683 1026
 	    </form>
@@ -693,7 +1036,10 @@  discard block
 block discarded – undo
693 1036
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
694 1037
 	    <form>
695 1038
 		<ul>
696
-		    <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>
1039
+		    <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'])) {
1040
+	print 'checked';
1041
+}
1042
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
697 1043
 		    <li><?php echo _("Type:"); ?>
698 1044
 			<select class="selectpicker" multiple onchange="sattypes(this);">
699 1045
 			    <?php
@@ -701,25 +1047,45 @@  discard block
 block discarded – undo
701 1047
 				$types = $Satellite->get_tle_types();
702 1048
 				foreach ($types as $type) {
703 1049
 					$type_name = $type['tle_type'];
704
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
705
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
706
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
707
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
708
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
709
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
710
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
711
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
712
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
713
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
714
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
715
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
716
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
717
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
718
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
719
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
720
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
721
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
722
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1050
+					if ($type_name == 'musson') {
1051
+						$type_name = 'Russian LEO Navigation';
1052
+					} else if ($type_name == 'nnss') {
1053
+						$type_name = 'Navi Navigation Satellite System';
1054
+					} else if ($type_name == 'sbas') {
1055
+						$type_name = 'Satellite-Based Augmentation System';
1056
+					} else if ($type_name == 'glo-ops') {
1057
+						$type_name = 'Glonass Operational';
1058
+					} else if ($type_name == 'gps-ops') {
1059
+						$type_name = 'GPS Operational';
1060
+					} else if ($type_name == 'argos') {
1061
+						$type_name = 'ARGOS Data Collection System';
1062
+					} else if ($type_name == 'tdrss') {
1063
+						$type_name = 'Tracking and Data Relay Satellite System';
1064
+					} else if ($type_name == 'sarsat') {
1065
+						$type_name = 'Search & Rescue';
1066
+					} else if ($type_name == 'dmc') {
1067
+						$type_name = 'Disaster Monitoring';
1068
+					} else if ($type_name == 'resource') {
1069
+						$type_name = 'Earth Resources';
1070
+					} else if ($type_name == 'stations') {
1071
+						$type_name = 'Space Stations';
1072
+					} else if ($type_name == 'geo') {
1073
+						$type_name = 'Geostationary';
1074
+					} else if ($type_name == 'amateur') {
1075
+						$type_name = 'Amateur Radio';
1076
+					} else if ($type_name == 'x-comm') {
1077
+						$type_name = 'Experimental';
1078
+					} else if ($type_name == 'other-comm') {
1079
+						$type_name = 'Other Comm';
1080
+					} else if ($type_name == 'science') {
1081
+						$type_name = 'Space & Earth Science';
1082
+					} else if ($type_name == 'military') {
1083
+						$type_name = 'Miscellaneous Military';
1084
+					} else if ($type_name == 'radar') {
1085
+						$type_name = 'Radar Calibration';
1086
+					} else if ($type_name == 'tle-new') {
1087
+						$type_name = 'Last 30 days launches';
1088
+					}
723 1089
 					
724 1090
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
725 1091
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.
js/map.3d.js.php 1 patch
Braces   +40 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,21 +5,30 @@  discard block
 block discarded – undo
5 5
 
6 6
 document.cookie =  'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
7 7
 <?php
8
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
9
-	else $MapType = $globalMapProvider;
8
+	if (isset($_COOKIE['MapType'])) {
9
+		$MapType = $_COOKIE['MapType'];
10
+	} else {
11
+		$MapType = $globalMapProvider;
12
+	}
10 13
 
11 14
 //	unset($_COOKIE['MapType']);
12 15
 	if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline' && $MapType != 'ArcGIS-Streetmap' && $MapType != 'ArcGIS-Satellite' && $MapType != 'NatGeo-Street') {
13
-		if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial';
14
-		else $MapType = 'OpenStreetMap';
16
+		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
17
+			$MapType = 'Bing-Aerial';
18
+		} else {
19
+			$MapType = 'OpenStreetMap';
20
+		}
15 21
 	}
16 22
 	if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) {
17 23
 		$MapType = 'OpenStreetMap';
18 24
 	}
19 25
 	if ($MapType == 'Mapbox') {
20
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
21
-		else $MapBoxId = $_COOKIE['MapTypeId'];
22
-?>
26
+		if ($_COOKIE['MapTypeId'] == 'default') {
27
+			$MapBoxId = $globalMapboxId;
28
+		} else {
29
+			$MapBoxId = $_COOKIE['MapTypeId'];
30
+		}
31
+		?>
23 32
 	var imProv = Cesium.MapboxImageryProvider({
24 33
 		credit: 'Map data © OpenStreetMap contributors, ' +
25 34
 	      'CC-BY-SA, ' +
@@ -147,13 +156,23 @@  discard block
 block discarded – undo
147 156
 */
148 157
 ?>
149 158
 <?php
150
-	}  elseif (isset($globalMapCustomLayer[$MapType])) {
159
+	} elseif (isset($globalMapCustomLayer[$MapType])) {
151 160
 		$customid = $MapType;
152 161
 ?>
153 162
 	var imProv = Cesium.createOpenStreetMapImageryProvider({
154 163
 		url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>',
155
-		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>,
156
-		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
164
+		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
165
+	print $globalMapCustomLayer[$customid]['maxZoom'];
166
+} else {
167
+	print '99';
168
+}
169
+?>,
170
+		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
171
+	print $globalMapCustomLayer[$customid]['minZoom'];
172
+} else {
173
+	print '0';
174
+}
175
+?>,
157 176
 		credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
158 177
 	});
159 178
 <?php
@@ -480,8 +499,11 @@  discard block
 block discarded – undo
480 499
 	if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) {
481 500
 		if (isset($_COOKIE['lastcentercoord'])) {
482 501
 			$lastcentercoord = explode(',',$_COOKIE['lastcentercoord']);
483
-			if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0;
484
-			else $zoom = $lastcentercoord[3];
502
+			if (!isset($lastcentercoord[3])) {
503
+				$zoom = $lastcentercoord[2]*1000000.0;
504
+			} else {
505
+				$zoom = $lastcentercoord[3];
506
+			}
485 507
 			$viewcenterlatitude = $lastcentercoord[0];
486 508
 			$viewcenterlongitude = $lastcentercoord[1];
487 509
 		} else {
@@ -602,7 +624,12 @@  discard block
 block discarded – undo
602 624
 ?>
603 625
 
604 626
 update_locationsLayer();
605
-setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
627
+setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) {
628
+	print $globalMapRefresh*1000*2;
629
+} else {
630
+	print '60000';
631
+}
632
+?>);
606 633
 /*
607 634
 var handlera = new Cesium.ScreenSpaceEventHandler(viewer.canvas, false);
608 635
 handlera.setInputAction(
Please login to merge, or discard this patch.
js/map.2d.js.php 1 patch
Braces   +127 added lines, -30 removed lines patch added patch discarded remove patch
@@ -4,10 +4,15 @@  discard block
 block discarded – undo
4 4
 
5 5
 setcookie("MapFormat",'2d');
6 6
 
7
-if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = '';
7
+if (!isset($globalOpenWeatherMapKey)) {
8
+	$globalOpenWeatherMapKey = '';
9
+}
8 10
 // Compressed GeoJson is used if true
9
-if (!isset($globalJsonCompress)) $compress = true;
10
-else $compress = $globalJsonCompress;
11
+if (!isset($globalJsonCompress)) {
12
+	$compress = true;
13
+} else {
14
+	$compress = $globalJsonCompress;
15
+}
11 16
 if (isset($_GET['archive'])) {
12 17
 	$archive = true;
13 18
 	//$archiveupdatetime = 50;
@@ -18,8 +23,11 @@  discard block
 block discarded – undo
18 23
 	//$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10));
19 24
 	//$lastupd = 20;
20 25
 	$lastupd = $_GET['archivespeed']*$archiveupdatetime;
21
-	if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate'];
22
-	else $enddate = time();
26
+	if (isset($_GET['enddate']) && $_GET['enddate'] != '') {
27
+		$enddate = $_GET['enddate'];
28
+	} else {
29
+		$enddate = time();
30
+	}
23 31
 	setcookie("archive_begin",$begindate);
24 32
 	setcookie("archive_end",$enddate);
25 33
 	setcookie("archive_update",$lastupd);
@@ -107,7 +115,17 @@  discard block
 block discarded – undo
107 115
 	}
108 116
 
109 117
 	//create the map
110
-	map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom);
118
+	map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) {
119
+	print $latitude;
120
+} else {
121
+	print $globalCenterLatitude;
122
+}
123
+?>,<?php if (isset($longitude)) {
124
+	print $longitude;
125
+} else {
126
+	print $globalCenterLongitude;
127
+}
128
+?>], zoom);
111 129
 <?php
112 130
 	} else {
113 131
 		if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) {
@@ -133,9 +151,21 @@  discard block
 block discarded – undo
133 151
 	     || navigator.userAgent.match(/BlackBerry/i)
134 152
 	     || navigator.userAgent.match(/Windows Phone/i))
135 153
 	{
136
-		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>;
154
+		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) {
155
+	print $viewzoom-1;
156
+} elseif (isset($viewzoom)) {
157
+	print $viewzoom;
158
+} else {
159
+	print '8';
160
+}
161
+?>;
137 162
 	} else {
138
-		var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>;
163
+		var zoom = <?php if (isset($viewzoom)) {
164
+	print $viewzoom;
165
+} else {
166
+	print '9';
167
+}
168
+?>;
139 169
 	}
140 170
 
141 171
 	//create the map
@@ -161,16 +191,27 @@  discard block
 block discarded – undo
161 191
 	bounds = L.latLngBounds(southWest,northEast);
162 192
 	//a few title layers
163 193
 <?php
164
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
165
-	else $MapType = $globalMapProvider;
194
+	if (isset($_COOKIE['MapType'])) {
195
+		$MapType = $_COOKIE['MapType'];
196
+	} else {
197
+		$MapType = $globalMapProvider;
198
+	}
166 199
 
167 200
 	if ($MapType == 'Mapbox') {
168
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
169
-		else $MapBoxId = $_COOKIE['MapTypeId'];
170
-?>
201
+		if ($_COOKIE['MapTypeId'] == 'default') {
202
+			$MapBoxId = $globalMapboxId;
203
+		} else {
204
+			$MapBoxId = $_COOKIE['MapTypeId'];
205
+		}
206
+		?>
171 207
 	L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
172 208
 	    maxZoom: 18,
173
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
209
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
210
+	print 'false';
211
+} else {
212
+	print 'true';
213
+}
214
+?>,
174 215
 	    attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',
175 216
 	    id: '<?php print $MapBoxId; ?>',
176 217
 	    token: '<?php print $globalMapboxToken; ?>'
@@ -189,7 +230,12 @@  discard block
 block discarded – undo
189 230
 ?>
190 231
 	L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
191 232
 	    maxZoom: 18,
192
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
233
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
234
+	print 'false';
235
+} else {
236
+	print 'true';
237
+}
238
+?>,
193 239
 	    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
194 240
 	      '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>'
195 241
 	}).addTo(map);
@@ -198,7 +244,12 @@  discard block
 block discarded – undo
198 244
 ?>
199 245
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
200 246
 	    maxZoom: 18,
201
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
247
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
248
+	print 'false';
249
+} else {
250
+	print 'true';
251
+}
252
+?>,
202 253
 	    attribution: 'Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
203 254
 	}).addTo(map);
204 255
 <?php
@@ -206,7 +257,12 @@  discard block
 block discarded – undo
206 257
 ?>
207 258
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
208 259
 	    maxZoom: 18,
209
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
260
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
261
+	print 'false';
262
+} else {
263
+	print 'true';
264
+}
265
+?>,
210 266
 	    attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
211 267
 	}).addTo(map);
212 268
 <?php
@@ -214,7 +270,12 @@  discard block
 block discarded – undo
214 270
 ?>
215 271
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', {
216 272
 	    maxZoom: 18,
217
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
273
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
274
+	print 'false';
275
+} else {
276
+	print 'true';
277
+}
278
+?>,
218 279
 	    attribution: 'Tiles &copy; Esri &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'
219 280
 	}).addTo(map);
220 281
 <?php
@@ -259,20 +320,26 @@  discard block
 block discarded – undo
259 320
 	map.addLayer(yandexLayer);
260 321
 <?php
261 322
 	} elseif ($MapType == 'Bing-Aerial') {
262
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
263
-?>
323
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
324
+			setcookie('MapType','OpenStreetMap');
325
+		}
326
+		?>
264 327
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'});
265 328
 	map.addLayer(bingLayer);
266 329
 <?php
267 330
 	} elseif ($MapType == 'Bing-Hybrid') {
268
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
269
-?>
331
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
332
+			setcookie('MapType','OpenStreetMap');
333
+		}
334
+		?>
270 335
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'});
271 336
 	map.addLayer(bingLayer);
272 337
 <?php
273 338
 	} elseif ($MapType == 'Bing-Road') {
274
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
275
-?>
339
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
340
+			setcookie('MapType','OpenStreetMap');
341
+		}
342
+		?>
276 343
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'});
277 344
 	map.addLayer(bingLayer);
278 345
 <?php
@@ -301,7 +368,12 @@  discard block
 block discarded – undo
301 368
 	    maxZoom: 5,
302 369
 	    tms : true,
303 370
 	    zindex : 3,
304
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
371
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
372
+	print 'false';
373
+} else {
374
+	print 'true';
375
+}
376
+?>,
305 377
 	    attribution: 'Natural Earth'
306 378
 	}).addTo(map);
307 379
 <?php
@@ -309,9 +381,24 @@  discard block
 block discarded – undo
309 381
 		$customid = $MapType;
310 382
 ?>
311 383
 	L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
312
-	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
313
-	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
314
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
384
+	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
385
+	print $globalMapCustomLayer[$customid]['maxZoom'];
386
+} else {
387
+	print '18';
388
+}
389
+?>,
390
+	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
391
+	print $globalMapCustomLayer[$customid]['minZoom'];
392
+} else {
393
+	print '0';
394
+}
395
+?>,
396
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
397
+	print 'false';
398
+} else {
399
+	print 'true';
400
+}
401
+?>,
315 402
 	    attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
316 403
 	}).addTo(map);
317 404
 
@@ -351,7 +438,12 @@  discard block
 block discarded – undo
351 438
 		}
352 439
 	} elseif ($globalBounding == 'circle') {
353 440
 ?>
354
-	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{
441
+	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) {
442
+	print $globalBoundingCircleSize;
443
+} else {
444
+	print '70000';
445
+}
446
+?>,{
355 447
 	    color: '#92C7D1',
356 448
 	    fillColor: '#92C7D1',
357 449
 	    fillOpacity: 0.3,
@@ -443,7 +535,12 @@  discard block
 block discarded – undo
443 535
 		createCookie('lastcentercoord',map.getCenter().lat+','+map.getCenter().lng+','+map.getZoom(),2);
444 536
 	});
445 537
 update_locationsLayer();
446
-setInterval(function(){if (noTimeout) update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
538
+setInterval(function(){if (noTimeout) update_locationsLayer()},<?php if (isset($globalMapRefresh)) {
539
+	print $globalMapRefresh*1000*2;
540
+} else {
541
+	print '60000';
542
+}
543
+?>);
447 544
 
448 545
 <?php
449 546
     // Add support for custom json via $globalMapJson
Please login to merge, or discard this patch.