Completed
Push — master ( d6e0fa...61cb26 )
by Yannick
35:32
created
index.php 1 patch
Braces   +566 added lines, -143 removed lines patch added patch discarded remove patch
@@ -57,7 +57,10 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
59 59
 ?>
60
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
60
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
61
+	print '?tsk='.$tsk;
62
+}
63
+?>"></script>
61 64
 <?php
62 65
 	if (!isset($globalAircraft) || $globalAircraft) {
63 66
 ?>
@@ -135,8 +138,14 @@  discard block
 block discarded – undo
135 138
 			<h1>Weather</h1>
136 139
 			<ul>
137 140
 			
138
-				<li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') print 'checked'; ?> /><?php echo _("Weather Winds"); ?></label></div></li>
139
-				<li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') print 'checked'; ?> /><?php echo _("Weather Waves"); ?></label></div></li>
141
+				<li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') {
142
+	print 'checked';
143
+}
144
+?> /><?php echo _("Weather Winds"); ?></label></div></li>
145
+				<li><div class="checkbox"><label><input type="checkbox" name="wave" value="1" onclick="clickWave(this);" <?php if (isset($_COOKIE['weather_wave']) && $_COOKIE['weather_wave'] == 'true') {
146
+	print 'checked';
147
+}
148
+?> /><?php echo _("Weather Waves"); ?></label></div></li>
140 149
 			
141 150
 <?php
142 151
 		if (isset($globalOpenWeatherMapKey) && $globalOpenWeatherMapKey != '') {
@@ -155,7 +164,10 @@  discard block
 block discarded – undo
155 164
 ?>
156 165
 			<h1>Weather</h1>
157 166
 			<ul>
158
-				<li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) print 'checked'; ?> ><?php echo _("Display weather on 3D map"); ?></label></div></li>
167
+				<li><div class="checkbox"><label><input type="checkbox" name="displayweather" value="1" onclick="clickDisplayWeather(this)" <?php if ((isset($_COOKIE['show_Weather']) && $_COOKIE['show_Weather'] == 'true') || (!isset($_COOKIE['show_Weather']) && (isset($globalMapWeather) && $globalMapWeather === TRUE))) {
168
+	print 'checked';
169
+}
170
+?> ><?php echo _("Display weather on 3D map"); ?></label></div></li>
159 171
 			</ul>
160 172
 <?php
161 173
 	}
@@ -172,13 +184,22 @@  discard block
 block discarded – undo
172 184
 <?php
173 185
 		if (!isset($globalAircraft) || $globalAircraft) {
174 186
 ?>
175
-				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?></label></div></li>
176
-				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?></label></div></li>
187
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
188
+	print 'checked';
189
+}
190
+?> /><?php echo _("Display waypoints"); ?></label></div></li>
191
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
192
+	print 'checked';
193
+}
194
+?> /><?php echo _("Display airspace"); ?></label></div></li>
177 195
 <?php
178 196
 		}
179 197
 		if (isset($globalMarine) && $globalMarine) {
180 198
 ?>
181
-				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
199
+				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') {
200
+	print 'checked';
201
+}
202
+?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
182 203
 <?php
183 204
 		}
184 205
 ?>
@@ -193,13 +214,22 @@  discard block
 block discarded – undo
193 214
 <?php
194 215
 		if (!isset($globalAircraft) || $globalAircraft) {
195 216
 ?>
196
-				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') print 'checked'; ?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
197
-				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') print 'checked'; ?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
217
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
218
+	print 'checked';
219
+}
220
+?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
221
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
222
+	print 'checked';
223
+}
224
+?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
198 225
 <?php
199 226
 		}
200 227
 		if (isset($globalMarine) && $globalMarine) {
201 228
 ?>
202
-				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') print 'checked'; ?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
229
+				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') {
230
+	print 'checked';
231
+}
232
+?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
203 233
 <?php
204 234
 		}
205 235
 ?>
@@ -214,14 +244,32 @@  discard block
 block discarded – undo
214 244
 		<h1>NOTAM</h1>
215 245
 		<form>
216 246
 			<ul>
217
-				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') print 'checked'; ?> /><?php echo _("Display NOTAM"); ?></label></div></li>
247
+				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') {
248
+	print 'checked';
249
+}
250
+?> /><?php echo _("Display NOTAM"); ?></label></div></li>
218 251
 				<li><?php echo _("NOTAM scope:"); ?>
219 252
 					<select class="selectpicker" onchange="notamscope(this);">
220
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
221
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
222
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
223
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
224
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
253
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
254
+	print ' selected';
255
+}
256
+?>>All</option>
257
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
258
+	print ' selected';
259
+}
260
+?>>Airport/Enroute warning</option>
261
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
262
+	print ' selected';
263
+}
264
+?>>Airport warning</option>
265
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
266
+	print ' selected';
267
+}
268
+?>>Navigation warning</option>
269
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
270
+	print ' selected';
271
+}
272
+?>>Enroute warning</option>
225 273
 					</select
226 274
 				</li>
227 275
 			</ul>
@@ -249,7 +297,10 @@  discard block
 block discarded – undo
249 297
 		    <div class="form-group">
250 298
 			<label><?php echo _("From:"); ?></label>
251 299
 			<div class='input-group date' id='datetimepicker1'>
252
-			    <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC'; ?>" required />
300
+			    <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') {
301
+	print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC';
302
+}
303
+?>" required />
253 304
 			    <span class="input-group-addon">
254 305
 				<span class="glyphicon glyphicon-calendar"></span>
255 306
 			    </span>
@@ -258,7 +309,10 @@  discard block
 block discarded – undo
258 309
 		    <div class="form-group">
259 310
 			<label><?php echo _("To:"); ?></label>
260 311
 			<div class='input-group date' id='datetimepicker2'>
261
-			    <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC'; ?>" />
312
+			    <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') {
313
+	print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC';
314
+}
315
+?>" />
262 316
 			    <span class="input-group-addon">
263 317
 				<span class="glyphicon glyphicon-calendar"></span>
264 318
 			    </span>
@@ -290,8 +344,20 @@  discard block
 block discarded – undo
290 344
 		    </script>
291 345
 		<li><?php echo _("Playback speed:"); ?>
292 346
 		    <div class="range">
293
-			<input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>">
294
-			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
347
+			<input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
348
+	print $_POST['archivespeed'];
349
+} elseif (isset($_COOKIE['archive_speed'])) {
350
+	print $_COOKIE['archive_speed'];
351
+} else {
352
+	print '1';
353
+}
354
+?>">
355
+			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
356
+	print $_COOKIE['archive_speed'];
357
+} else {
358
+	print '1';
359
+}
360
+?></output>
295 361
 		    </div>
296 362
 		</li>
297 363
 		<?php
@@ -320,14 +386,20 @@  discard block
 block discarded – undo
320 386
 		    <li><?php echo _("Type of Map:"); ?>
321 387
 			    <?php
322 388
 				if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
323
-					if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
324
-					else $MapType = $_COOKIE['MapType'];
389
+					if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
390
+						$MapType = $globalMapProvider;
391
+					} else {
392
+						$MapType = $_COOKIE['MapType'];
393
+					}
325 394
 			    ?>
326 395
 			<select  class="selectpicker" onchange="mapType(this);">
327 396
 			    <?php
328 397
 				} else {
329
-					if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') $MapType = $globalMapProvider;
330
-					else $MapType = $_COOKIE['MapType3D'];
398
+					if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') {
399
+						$MapType = $globalMapProvider;
400
+					} else {
401
+						$MapType = $_COOKIE['MapType3D'];
402
+					}
331 403
 			    ?>
332 404
 			<select  class="selectpicker" onchange="mapType3D(this);">
333 405
 			    <?php
@@ -336,24 +408,48 @@  discard block
 block discarded – undo
336 408
 			    <?php
337 409
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
338 410
 			    ?>
339
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
411
+			    <option value="offline"<?php if ($MapType == 'offline') {
412
+	print ' selected';
413
+}
414
+?>>Natural Earth (local)</option>
340 415
 			    <?php
341 416
 				} else {
342 417
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
343 418
 			    ?>
344
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
419
+			    <option value="offline"<?php if ($MapType == 'offline') {
420
+	print ' selected';
421
+}
422
+?>>Natural Earth (local)</option>
345 423
 			    <?php
346 424
 				    }
347 425
 			    ?>
348
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
349
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
350
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') print ' selected'; ?>>ArcGIS Ocean</option>
426
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
427
+	print ' selected';
428
+}
429
+?>>ArcGIS Streetmap</option>
430
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
431
+	print ' selected';
432
+}
433
+?>>ArcGIS Satellite</option>
434
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') {
435
+	print ' selected';
436
+}
437
+?>>ArcGIS Ocean</option>
351 438
 			    <?php
352 439
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
353 440
 			    ?>
354
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
355
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
356
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
441
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
442
+	print ' selected';
443
+}
444
+?>>Bing-Aerial</option>
445
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
446
+	print ' selected';
447
+}
448
+?>>Bing-Hybrid</option>
449
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
450
+	print ' selected';
451
+}
452
+?>>Bing-Road</option>
357 453
 			    <?php
358 454
 				    }
359 455
 			    ?>
@@ -363,59 +459,143 @@  discard block
 block discarded – undo
363 459
 			    <?php
364 460
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
365 461
 			    ?>
366
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
367
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
368
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
462
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
463
+	print ' selected';
464
+}
465
+?>>Here-Aerial</option>
466
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
467
+	print ' selected';
468
+}
469
+?>>Here-Hybrid</option>
470
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
471
+	print ' selected';
472
+}
473
+?>>Here-Road</option>
369 474
 			    <?php
370 475
 					}
371 476
 			    ?>
372 477
 			    <?php
373 478
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
374 479
 			    ?>
375
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
376
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
377
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
378
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
480
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
481
+	print ' selected';
482
+}
483
+?>>Google Roadmap</option>
484
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
485
+	print ' selected';
486
+}
487
+?>>Google Satellite</option>
488
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
489
+	print ' selected';
490
+}
491
+?>>Google Hybrid</option>
492
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
493
+	print ' selected';
494
+}
495
+?>>Google Terrain</option>
379 496
 			    <?php
380 497
 					}
381 498
 			    ?>
382 499
 			    <?php
383 500
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
384 501
 			    ?>
385
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
386
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
387
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
502
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
503
+	print ' selected';
504
+}
505
+?>>MapQuest-OSM</option>
506
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
507
+	print ' selected';
508
+}
509
+?>>MapQuest-Aerial</option>
510
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
511
+	print ' selected';
512
+}
513
+?>>MapQuest-Hybrid</option>
388 514
 			    <?php
389 515
 					}
390 516
 			    ?>
391
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
392
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
517
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
518
+	print ' selected';
519
+}
520
+?>>Yandex</option>
521
+			    <option value="offline"<?php if ($MapType == 'offline') {
522
+	print ' selected';
523
+}
524
+?>>Natural Earth</option>
393 525
 			    <?php
394 526
 				    }
395 527
 			    ?>
396
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
528
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
529
+	print ' selected';
530
+}
531
+?>>National Geographic Street</option>
397 532
 			    <?php
398 533
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
399
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
400
-					else $MapBoxId = $_COOKIE['MapTypeId'];
534
+					if (!isset($_COOKIE['MapTypeId'])) {
535
+						$MapBoxId = 'default';
536
+					} else {
537
+						$MapBoxId = $_COOKIE['MapTypeId'];
538
+					}
401 539
 			    ?>
402
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
403
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
404
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
405
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
406
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
407
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
408
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
409
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
410
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
411
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
412
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
413
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
414
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
540
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
541
+	print ' selected';
542
+}
543
+?>>Mapbox GL</option>
544
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
545
+	print ' selected';
546
+}
547
+?>>Mapbox default</option>
548
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
549
+	print ' selected';
550
+}
551
+?>>Mapbox streets</option>
552
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
553
+	print ' selected';
554
+}
555
+?>>Mapbox light</option>
556
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
557
+	print ' selected';
558
+}
559
+?>>Mapbox dark</option>
560
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
561
+	print ' selected';
562
+}
563
+?>>Mapbox satellite</option>
564
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
565
+	print ' selected';
566
+}
567
+?>>Mapbox streets-satellite</option>
568
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
569
+	print ' selected';
570
+}
571
+?>>Mapbox streets-basic</option>
572
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
573
+	print ' selected';
574
+}
575
+?>>Mapbox comic</option>
576
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
577
+	print ' selected';
578
+}
579
+?>>Mapbox outdoors</option>
580
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
581
+	print ' selected';
582
+}
583
+?>>Mapbox pencil</option>
584
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
585
+	print ' selected';
586
+}
587
+?>>Mapbox pirates</option>
588
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
589
+	print ' selected';
590
+}
591
+?>>Mapbox emerald</option>
415 592
 			    <?php
416 593
 				    }
417 594
 			    ?>
418
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
595
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
596
+	print ' selected';
597
+}
598
+?>>OpenStreetMap</option>
419 599
 			    <?php
420 600
 				}
421 601
 			    ?>
@@ -426,10 +606,22 @@  discard block
 block discarded – undo
426 606
 ?>
427 607
 		    <li><?php echo _("Type of Terrain:"); ?>
428 608
 			<select  class="selectpicker" onchange="terrainType(this);">
429
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
430
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
431
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
432
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
609
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
610
+	print ' selected';
611
+}
612
+?>>stk terrain</option>
613
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
614
+	print ' selected';
615
+}
616
+?>>ellipsoid</option>
617
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
618
+	print ' selected';
619
+}
620
+?>>vr terrain</option>
621
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
622
+	print ' selected';
623
+}
624
+?>>ArticDEM</option>
433 625
 			</select>
434 626
 		    </li>
435 627
 <?php
@@ -439,59 +631,116 @@  discard block
 block discarded – undo
439 631
 <?php
440 632
     if (isset($globalMap3D) && $globalMap3D) {
441 633
 ?>
442
-		    <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') print 'checked'; ?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li>
634
+		    <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') {
635
+	print 'checked';
636
+}
637
+?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li>
443 638
 <?php
444 639
     }
445 640
 ?>
446 641
 <?php
447 642
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
448 643
 ?>
449
-		    <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>
644
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
645
+	print 'checked';
646
+}
647
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
450 648
 
451 649
 <?php
452 650
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
453 651
 ?>
454
-		    <!--<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>-->
455
-		    <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>
456
-		    <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>
457
-		    <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>
458
-		    <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>
652
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
653
+	print 'checked';
654
+}
655
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
656
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
657
+	print 'checked';
658
+}
659
+?> ><?php echo _("Display flight path"); ?></label></div></li>
660
+		    <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)) {
661
+	print 'checked';
662
+}
663
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
664
+		    <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)) {
665
+	print 'checked';
666
+}
667
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
668
+		    <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)) {
669
+	print 'checked';
670
+}
671
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
459 672
 <?php
460 673
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
461 674
 ?>
462
-		    <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>
675
+		    <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)) {
676
+	print 'checked';
677
+}
678
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
463 679
 <?php
464 680
 	}
465 681
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
466 682
 ?>
467
-		    <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>
683
+		    <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)) {
684
+	print 'checked';
685
+}
686
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
468 687
 <?php
469 688
 	}
470 689
     }
471 690
 ?>
472
-		    <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>
473
-		    <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>
474
-		    <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>
475
-		    <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>
691
+		    <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'])) {
692
+	print 'checked';
693
+}
694
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
695
+		    <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))) {
696
+	print 'checked';
697
+}
698
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
699
+		    <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))) {
700
+	print 'checked';
701
+}
702
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
703
+		    <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))) {
704
+	print 'checked';
705
+}
706
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
476 707
 <?php
477 708
 	if (isset($globalFires)) {
478 709
 ?>
479
-		    <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>
710
+		    <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))) {
711
+	print 'checked';
712
+}
713
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
480 714
 <?php
481 715
 	}
482 716
 	if (isset($globalMap3D) && $globalMap3D) {
483 717
 ?>
484
-		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
718
+		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if (isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') {
719
+	print 'checked';
720
+}
721
+?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
485 722
 <?php
486 723
 	}
487 724
 ?>
488 725
 <?php
489 726
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
490 727
 ?>
491
-		    <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>
492
-		    <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) print 'checked'; ?> ><?php echo _("Use shadows"); ?></label></div></li>
493
-		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
494
-		    <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) print 'checked'; ?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li>
728
+		    <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')) {
729
+	print 'checked';
730
+}
731
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
732
+		    <li><div class="checkbox"><label><input type="checkbox" name="shadows" value="1" onclick="clickShadows(this)" <?php if ((!isset($_COOKIE['map3dnoshadows']) && (!isset($globalMap3DShadows) || $globalMap3DShadows)) || (isset($_COOKIE['map3dnoshadows']) && $_COOKIE['map3dnoshadows'] == 'false')) {
733
+	print 'checked';
734
+}
735
+?> ><?php echo _("Use shadows"); ?></label></div></li>
736
+		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) {
737
+	print 'checked';
738
+}
739
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
740
+		    <li><div class="checkbox"><label><input type="checkbox" name="updaterealtime" value="1" onclick="clickUpdateRealtime(this)" <?php if ((isset($_COOKIE['updaterealtime']) && $_COOKIE['updaterealtime'] == 'true') || !isset($_COOKIE['updaterealtime'])) {
741
+	print 'checked';
742
+}
743
+?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li>
495 744
 <?php
496 745
     }
497 746
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -504,17 +753,25 @@  discard block
 block discarded – undo
504 753
 			if (function_exists('array_column')) {
505 754
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
506 755
 		    ?>
507
-		    <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>
756
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
757
+	print 'checked';
758
+}
759
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
508 760
 		    <?php
509 761
 			    }
510 762
 			} elseif (isset($globalSources)) {
511 763
 			    $dispolar = false;
512 764
 			    foreach ($globalSources as $testsource) {
513
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
765
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
766
+			        	$dispolar = true;
767
+			        }
514 768
 			    }
515 769
 			    if ($dispolar) {
516 770
 		    ?>
517
-		    <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>
771
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
772
+	print 'checked';
773
+}
774
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
518 775
 		    <?php
519 776
 			    }
520 777
 		        }
@@ -527,11 +784,21 @@  discard block
 block discarded – undo
527 784
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
528 785
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
529 786
 		    ?>
530
-		    <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>
787
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
788
+	print 'checked';
789
+}
790
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
531 791
 		    <?php 
532 792
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
533 793
 		    ?>
534
-			<li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>"></li>
794
+			<li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
795
+	print $_COOKIE['IconColor'];
796
+} elseif (isset($globalAircraftIconColor)) {
797
+	print $globalAircraftIconColor;
798
+} else {
799
+	print '1a3151';
800
+}
801
+?>"></li>
535 802
 		    <?php
536 803
 				}
537 804
 			    }
@@ -542,7 +809,14 @@  discard block
 block discarded – undo
542 809
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
543 810
 		    ?>
544 811
 		    <li><?php echo _("Marine icon color:"); ?>
545
-			<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'; ?>">
812
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
813
+	print $_COOKIE['MarineIconColor'];
814
+} elseif (isset($globalMarineIconColor)) {
815
+	print $globalMarineIconColor;
816
+} else {
817
+	print '1a3151';
818
+}
819
+?>">
546 820
 		    </li>
547 821
 		    <?php
548 822
 			    }
@@ -553,7 +827,14 @@  discard block
 block discarded – undo
553 827
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
554 828
 		    ?>
555 829
 		    <li><?php echo _("Tracker icon color:"); ?>
556
-			<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'; ?>">
830
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
831
+	print $_COOKIE['TrackerIconColor'];
832
+} elseif (isset($globalTrackerIconColor)) {
833
+	print $globalTrackerIconColor;
834
+} else {
835
+	print '1a3151';
836
+}
837
+?>">
557 838
 		    </li>
558 839
 		    <?php
559 840
 			    }
@@ -564,8 +845,22 @@  discard block
 block discarded – undo
564 845
 		    ?>
565 846
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
566 847
 			<div class="range">
567
-			    <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'; ?>">
568
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
848
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
849
+	print $_COOKIE['AirportZoom'];
850
+} elseif (isset($globalAirportZoom)) {
851
+	print $globalAirportZoom;
852
+} else {
853
+	print '7';
854
+}
855
+?>">
856
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
857
+	print $_COOKIE['AirportZoom'];
858
+} elseif (isset($globalAirportZoom)) {
859
+	print $globalAirportZoom;
860
+} else {
861
+	print '7';
862
+}
863
+?></output>
569 864
 			</div>
570 865
 		    </li>
571 866
 		    <?php
@@ -576,17 +871,40 @@  discard block
 block discarded – undo
576 871
 ?>
577 872
 		    <li><?php echo _("Set scaling factor for rendering resolution:"); ?>
578 873
 			<div class="range">
579
-			    <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?>">
580
-			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output>
874
+			    <input type="range" min="0.5" max="2" step="0.5" name="resolutionscale" onchange="scale.value=value;resolutionScale(resolutionscale.value);" value="<?php if (isset($_COOKIE['resolutionScale'])) {
875
+	print $_COOKIE['resolutionScale'];
876
+} else {
877
+	print '1';
878
+}
879
+?>">
880
+			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) {
881
+	print $_COOKIE['resolutionScale'];
882
+} else {
883
+	print '1';
884
+}
885
+?></output>
581 886
 			</div>
582 887
 		    </li>
583 888
 <?php
584 889
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
585 890
 ?>
586
-		    <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>
587
-		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> > <?php echo _("Force Aircraft color"); ?>&nbsp;
891
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
892
+	print 'checked';
893
+}
894
+?> > <?php echo _("Use airlines liveries"); ?></li>
895
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
896
+	print 'checked';
897
+}
898
+?> > <?php echo _("Force Aircraft color"); ?>&nbsp;
588 899
 		    <!--<li><?php echo _("Aircraft icon color:"); ?>-->
589
-			<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'; ?>">
900
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
901
+	print $_COOKIE['IconColor'];
902
+} elseif (isset($globalAircraftIconColor)) {
903
+	print $globalAircraftIconColor;
904
+} else {
905
+	print 'ff0000';
906
+}
907
+?>">
590 908
 		    </li>
591 909
 <?php
592 910
 	}
@@ -594,9 +912,19 @@  discard block
 block discarded – undo
594 912
 <?php
595 913
 	if (isset($globalMarine) && $globalMarine === TRUE) {
596 914
 ?>
597
-		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?>&nbsp;
915
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
916
+	print 'checked';
917
+}
918
+?> ><?php echo _("Force Marine color"); ?>&nbsp;
598 919
 		    <!--<li><?php echo _("Marine icon color:"); ?>-->
599
-			<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'; ?>">
920
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
921
+	print $_COOKIE['MarineIconColor'];
922
+} elseif (isset($globalMarineIconColor)) {
923
+	print $globalMarineIconColor;
924
+} else {
925
+	print 'ff0000';
926
+}
927
+?>">
600 928
 		    </li>
601 929
 <?php
602 930
 	}
@@ -604,9 +932,19 @@  discard block
 block discarded – undo
604 932
 <?php
605 933
 	if (isset($globalTracker) && $globalTracker === TRUE) {
606 934
 ?>
607
-		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?>&nbsp;
935
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
936
+	print 'checked';
937
+}
938
+?> ><?php echo _("Force Tracker color"); ?>&nbsp;
608 939
 		    <!--<li><?php echo _("Tracker icon color:"); ?>-->
609
-			<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'; ?>">
940
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
941
+	print $_COOKIE['TrackerIconColor'];
942
+} elseif (isset($globalTrackerIconColor)) {
943
+	print $globalTrackerIconColor;
944
+} else {
945
+	print 'ff0000';
946
+}
947
+?>">
610 948
 		    </li>
611 949
 <?php
612 950
 	}
@@ -614,22 +952,46 @@  discard block
 block discarded – undo
614 952
 ?>
615 953
 		    <li><?php echo _("Distance unit:"); ?>
616 954
 			<select class="selectpicker" onchange="unitdistance(this);">
617
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
618
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
619
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
955
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
956
+	echo ' selected';
957
+}
958
+?>>km</option>
959
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
960
+	echo ' selected';
961
+}
962
+?>>nm</option>
963
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
964
+	echo ' selected';
965
+}
966
+?>>mi</option>
620 967
 		        </select>
621 968
 		    </li>
622 969
 		    <li><?php echo _("Altitude unit:"); ?>
623 970
 			<select class="selectpicker" onchange="unitaltitude(this);">
624
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
625
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
971
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
972
+	echo ' selected';
973
+}
974
+?>>m</option>
975
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
976
+	echo ' selected';
977
+}
978
+?>>feet</option>
626 979
 		        </select>
627 980
 		    </li>
628 981
 		    <li><?php echo _("Speed unit:"); ?>
629 982
 			<select class="selectpicker" onchange="unitspeed(this);">
630
-			    <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>
631
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
632
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
983
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
984
+	echo ' selected';
985
+}
986
+?>>km/h</option>
987
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
988
+	echo ' selected';
989
+}
990
+?>>mph</option>
991
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
992
+	echo ' selected';
993
+}
994
+?>>knots</option>
633 995
 		        </select>
634 996
 		    </li>
635 997
 
@@ -647,9 +1009,18 @@  discard block
 block discarded – undo
647 1009
 		    <?php
648 1010
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
649 1011
 		    ?>
650
-			<?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 } ?>
651
-			<?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 } ?>
652
-			<?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 } ?>
1012
+			<?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'])) {
1013
+	print 'checked';
1014
+}
1015
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
1016
+			<?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'])) {
1017
+	print 'checked';
1018
+}
1019
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
1020
+			<?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'])) {
1021
+	print 'checked';
1022
+}
1023
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
653 1024
 		    <?php
654 1025
 			}
655 1026
 		    ?>
@@ -657,10 +1028,16 @@  discard block
 block discarded – undo
657 1028
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
658 1029
 		    ?>
659 1030
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
660
-			    <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>
1031
+			    <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'])) {
1032
+	print 'checked';
1033
+}
1034
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
661 1035
 			<?php } ?>
662 1036
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
663
-			    <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>
1037
+			    <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'])) {
1038
+	print 'checked';
1039
+}
1040
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
664 1041
 			<?php } ?>
665 1042
 		    <?php
666 1043
 			}
@@ -677,7 +1054,9 @@  discard block
 block discarded – undo
677 1054
 				}
678 1055
 				foreach($allairlinenames as $airline) {
679 1056
 					$airline_name = $airline['airline_name'];
680
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
1057
+					if (strlen($airline_name) > 30) {
1058
+						$airline_name = substr($airline_name,0,30).'...';
1059
+					}
681 1060
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
682 1061
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
683 1062
 					} else {
@@ -695,7 +1074,10 @@  discard block
 block discarded – undo
695 1074
 		    <li><?php echo _("Display alliance:"); ?>
696 1075
 		    <br/>
697 1076
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
698
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
1077
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
1078
+	echo ' selected';
1079
+}
1080
+?>><?php echo _("All"); ?></option>
699 1081
 			    <?php
700 1082
 				foreach($allalliancenames as $alliance) {
701 1083
 					$alliance_name = $alliance['alliance'];
@@ -754,10 +1136,22 @@  discard block
 block discarded – undo
754 1136
 		    ?>
755 1137
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
756 1138
 			<select class="selectpicker" onchange="airlinestype(this);">
757
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
758
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
759
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
760
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
1139
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
1140
+	echo ' selected';
1141
+}
1142
+?>><?php echo _("All"); ?></option>
1143
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
1144
+	echo ' selected';
1145
+}
1146
+?>><?php echo _("Passenger"); ?></option>
1147
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
1148
+	echo ' selected';
1149
+}
1150
+?>><?php echo _("Cargo"); ?></option>
1151
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
1152
+	echo ' selected';
1153
+}
1154
+?>><?php echo _("Military"); ?></option>
761 1155
 			</select>
762 1156
 		    </li>
763 1157
 		    <?php
@@ -771,7 +1165,10 @@  discard block
 block discarded – undo
771 1165
 		    ?>
772 1166
 		    <li>
773 1167
 			<?php echo _("Display vessels with MMSI:"); ?>
774
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1168
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1169
+	print $_COOKIE['filter_mmsi'];
1170
+}
1171
+?>" />
775 1172
 		    </li>
776 1173
 			<?php
777 1174
 				if (isset($globalVM) && $globalVM) {
@@ -802,7 +1199,10 @@  discard block
 block discarded – undo
802 1199
 		    ?>
803 1200
 		    <li>
804 1201
 			<?php echo _("Display with ident:"); ?>
805
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1202
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1203
+	print $_COOKIE['filter_ident'];
1204
+}
1205
+?>" />
806 1206
 		    </li>
807 1207
 		</ul>
808 1208
 	    </form>
@@ -818,7 +1218,10 @@  discard block
 block discarded – undo
818 1218
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
819 1219
 	    <form>
820 1220
 		<ul>
821
-		    <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>
1221
+		    <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'])) {
1222
+	print 'checked';
1223
+}
1224
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
822 1225
 		    <li><?php echo _("Type:"); ?>
823 1226
 			<select class="selectpicker" multiple onchange="sattypes(this);">
824 1227
 			    <?php
@@ -826,25 +1229,45 @@  discard block
 block discarded – undo
826 1229
 				$types = $Satellite->get_tle_types();
827 1230
 				foreach ($types as $type) {
828 1231
 					$type_name = $type['tle_type'];
829
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
830
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
831
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
832
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
833
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
834
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
835
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
836
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
837
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
838
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
839
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
840
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
841
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
842
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
843
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
844
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
845
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
846
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
847
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1232
+					if ($type_name == 'musson') {
1233
+						$type_name = 'Russian LEO Navigation';
1234
+					} else if ($type_name == 'nnss') {
1235
+						$type_name = 'Navi Navigation Satellite System';
1236
+					} else if ($type_name == 'sbas') {
1237
+						$type_name = 'Satellite-Based Augmentation System';
1238
+					} else if ($type_name == 'glo-ops') {
1239
+						$type_name = 'Glonass Operational';
1240
+					} else if ($type_name == 'gps-ops') {
1241
+						$type_name = 'GPS Operational';
1242
+					} else if ($type_name == 'argos') {
1243
+						$type_name = 'ARGOS Data Collection System';
1244
+					} else if ($type_name == 'tdrss') {
1245
+						$type_name = 'Tracking and Data Relay Satellite System';
1246
+					} else if ($type_name == 'sarsat') {
1247
+						$type_name = 'Search & Rescue';
1248
+					} else if ($type_name == 'dmc') {
1249
+						$type_name = 'Disaster Monitoring';
1250
+					} else if ($type_name == 'resource') {
1251
+						$type_name = 'Earth Resources';
1252
+					} else if ($type_name == 'stations') {
1253
+						$type_name = 'Space Stations';
1254
+					} else if ($type_name == 'geo') {
1255
+						$type_name = 'Geostationary';
1256
+					} else if ($type_name == 'amateur') {
1257
+						$type_name = 'Amateur Radio';
1258
+					} else if ($type_name == 'x-comm') {
1259
+						$type_name = 'Experimental';
1260
+					} else if ($type_name == 'other-comm') {
1261
+						$type_name = 'Other Comm';
1262
+					} else if ($type_name == 'science') {
1263
+						$type_name = 'Space & Earth Science';
1264
+					} else if ($type_name == 'military') {
1265
+						$type_name = 'Miscellaneous Military';
1266
+					} else if ($type_name == 'radar') {
1267
+						$type_name = 'Radar Calibration';
1268
+					} else if ($type_name == 'tle-new') {
1269
+						$type_name = 'Last 30 days launches';
1270
+					}
848 1271
 					
849 1272
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
850 1273
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.