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