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