Completed
Push — master ( 8149d9...4dca71 )
by Yannick
30:37
created
js/map-aircraft.3d.js.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -265,22 +265,22 @@  discard block
 block discarded – undo
265 265
 			var entityid = entity.id;
266 266
 			var lastupdateentity = entity.properties.lastupdate;
267 267
 			<?php 
268
-			    if (isset($globalMapUseBbox) && $globalMapUseBbox) {
269
-			    // Remove flights not in latest CZML
268
+				if (isset($globalMapUseBbox) && $globalMapUseBbox) {
269
+				// Remove flights not in latest CZML
270 270
 			?>
271 271
 			if (lastupdateentity != lastupdate) {
272 272
 				viewer.dataSources.get(dsn).entities.remove(entity);
273 273
 				czmlds.entities.removeById(entityid);
274 274
 			}
275 275
 			<?php
276
-			    } else {
276
+				} else {
277 277
 			?>
278 278
 			if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) {
279 279
 				viewer.dataSources.get(dsn).entities.remove(entity);
280 280
 				czmlds.entities.removeById(entityid);
281 281
 			}
282 282
 			<?php
283
-			    }
283
+				}
284 284
 			?>
285 285
 		}
286 286
 	}
@@ -718,12 +718,12 @@  discard block
 block discarded – undo
718 718
 }
719 719
 
720 720
 <?php
721
-    if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) {
721
+	if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) {
722 722
 ?>
723 723
 update_atcLayer();
724 724
 setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
725 725
 <?php
726
-    }
726
+	}
727 727
 ?>
728 728
 
729 729
 function iconColor(color) {
Please login to merge, or discard this patch.
index.php 1 patch
Braces   +513 added lines, -129 removed lines patch added patch discarded remove patch
@@ -49,7 +49,10 @@  discard block
 block discarded – undo
49 49
 <?php
50 50
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
51 51
 ?>
52
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
52
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
53
+	print '?tsk='.$tsk;
54
+}
55
+?>"></script>
53 56
 <?php
54 57
 	if (!isset($globalAircraft) || $globalAircraft) {
55 58
 ?>
@@ -139,8 +142,14 @@  discard block
 block discarded – undo
139 142
 ?>
140 143
 		<form>
141 144
 			<ul>
142
-				<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>
143
-				<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>
145
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
146
+	print 'checked';
147
+}
148
+?> /><?php echo _("Display waypoints"); ?></label></div></li>
149
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
150
+	print 'checked';
151
+}
152
+?> /><?php echo _("Display airspace"); ?></label></div></li>
144 153
 			</ul>
145 154
 		</form>
146 155
 <?php
@@ -148,8 +157,14 @@  discard block
 block discarded – undo
148 157
 ?>
149 158
 		<form>
150 159
 			<ul>
151
-				<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>
152
-				<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>
160
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
161
+	print 'checked';
162
+}
163
+?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
164
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
165
+	print 'checked';
166
+}
167
+?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
153 168
 			</ul>
154 169
 			<p>This layers are in Beta, this can and will crash.</p>
155 170
 		</form>
@@ -160,14 +175,32 @@  discard block
 block discarded – undo
160 175
 		<h1>NOTAM</h1>
161 176
 		<form>
162 177
 			<ul>
163
-				<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>
178
+				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') {
179
+	print 'checked';
180
+}
181
+?> /><?php echo _("Display NOTAM"); ?></label></div></li>
164 182
 				<li><?php echo _("NOTAM scope:"); ?>
165 183
 					<select class="selectpicker" onchange="notamscope(this);">
166
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
167
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
168
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
169
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
170
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
184
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
185
+	print ' selected';
186
+}
187
+?>>All</option>
188
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
189
+	print ' selected';
190
+}
191
+?>>Airport/Enroute warning</option>
192
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
193
+	print ' selected';
194
+}
195
+?>>Airport warning</option>
196
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
197
+	print ' selected';
198
+}
199
+?>>Navigation warning</option>
200
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
201
+	print ' selected';
202
+}
203
+?>>Enroute warning</option>
171 204
 					</select
172 205
 				</li>
173 206
 			</ul>
@@ -195,7 +228,12 @@  discard block
 block discarded – undo
195 228
 		        <div class="form-group">
196 229
 			    <label>From (UTC):</label>
197 230
 		            <div class='input-group date' id='datetimepicker1'>
198
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
231
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) {
232
+	print $_POST['start_date'];
233
+} elseif (isset($_COOKIE['archive_begin'])) {
234
+	print date("m/d/Y h:i a",$_COOKIE['archive_begin']);
235
+}
236
+?>" required />
199 237
 		                <span class="input-group-addon">
200 238
             			    <span class="glyphicon glyphicon-calendar"></span>
201 239
 		                </span>
@@ -204,7 +242,12 @@  discard block
 block discarded – undo
204 242
 		        <div class="form-group">
205 243
 			    <label>To (UTC):</label>
206 244
 		            <div class='input-group date' id='datetimepicker2'>
207
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" />
245
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) {
246
+	print $_POST['end_date'];
247
+} elseif (isset($_COOKIE['archive_end'])) {
248
+	print date("m/d/Y h:i a",$_COOKIE['archive_end']);
249
+}
250
+?>" />
208 251
             			<span class="input-group-addon">
209 252
 		                    <span class="glyphicon glyphicon-calendar"></span>
210 253
             			</span>
@@ -229,8 +272,20 @@  discard block
 block discarded – undo
229 272
 			</script>
230 273
 		    <li><?php echo _("Playback speed:"); ?>
231 274
 			<div class="range">
232
-			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>">
233
-			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
275
+			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
276
+	print $_POST['archivespeed'];
277
+} elseif (isset($_COOKIE['archive_speed'])) {
278
+	print $_COOKIE['archive_speed'];
279
+} else {
280
+	print '1';
281
+}
282
+?>">
283
+			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
284
+	print $_COOKIE['archive_speed'];
285
+} else {
286
+	print '1';
287
+}
288
+?></output>
234 289
 			</div>
235 290
 		    </li>
236 291
 		    <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li>
@@ -252,29 +307,53 @@  discard block
 block discarded – undo
252 307
 		    <li><?php echo _("Type of Map:"); ?>
253 308
 			<select  class="selectpicker" onchange="mapType(this);">
254 309
 			    <?php
255
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
256
-				else $MapType = $_COOKIE['MapType'];
310
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
311
+					$MapType = $globalMapProvider;
312
+				} else {
313
+					$MapType = $_COOKIE['MapType'];
314
+				}
257 315
 			    ?>
258 316
 			    <?php
259 317
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
260 318
 			    ?>
261
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
319
+			    <option value="offline"<?php if ($MapType == 'offline') {
320
+	print ' selected';
321
+}
322
+?>>Natural Earth (local)</option>
262 323
 			    <?php
263 324
 				} else {
264 325
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265 326
 			    ?>
266
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
327
+			    <option value="offline"<?php if ($MapType == 'offline') {
328
+	print ' selected';
329
+}
330
+?>>Natural Earth (local)</option>
267 331
 			    <?php
268 332
 				    }
269 333
 			    ?>
270
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
271
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
334
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
335
+	print ' selected';
336
+}
337
+?>>ArcGIS Streetmap</option>
338
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
339
+	print ' selected';
340
+}
341
+?>>ArcGIS Satellite</option>
272 342
 			    <?php
273 343
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
274 344
 			    ?>
275
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
276
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
277
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
345
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
346
+	print ' selected';
347
+}
348
+?>>Bing-Aerial</option>
349
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
350
+	print ' selected';
351
+}
352
+?>>Bing-Hybrid</option>
353
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
354
+	print ' selected';
355
+}
356
+?>>Bing-Road</option>
278 357
 			    <?php
279 358
 				    }
280 359
 			    ?>
@@ -284,59 +363,143 @@  discard block
 block discarded – undo
284 363
 			    <?php
285 364
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
286 365
 			    ?>
287
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
288
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
289
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
366
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
367
+	print ' selected';
368
+}
369
+?>>Here-Aerial</option>
370
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
371
+	print ' selected';
372
+}
373
+?>>Here-Hybrid</option>
374
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
375
+	print ' selected';
376
+}
377
+?>>Here-Road</option>
290 378
 			    <?php
291 379
 					}
292 380
 			    ?>
293 381
 			    <?php
294 382
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
295 383
 			    ?>
296
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
297
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
298
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
299
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
384
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
385
+	print ' selected';
386
+}
387
+?>>Google Roadmap</option>
388
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
389
+	print ' selected';
390
+}
391
+?>>Google Satellite</option>
392
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
393
+	print ' selected';
394
+}
395
+?>>Google Hybrid</option>
396
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
397
+	print ' selected';
398
+}
399
+?>>Google Terrain</option>
300 400
 			    <?php
301 401
 					}
302 402
 			    ?>
303 403
 			    <?php
304 404
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
305 405
 			    ?>
306
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
307
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
308
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
406
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
407
+	print ' selected';
408
+}
409
+?>>MapQuest-OSM</option>
410
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
411
+	print ' selected';
412
+}
413
+?>>MapQuest-Aerial</option>
414
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
415
+	print ' selected';
416
+}
417
+?>>MapQuest-Hybrid</option>
309 418
 			    <?php
310 419
 					}
311 420
 			    ?>
312
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
313
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
421
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
422
+	print ' selected';
423
+}
424
+?>>Yandex</option>
425
+			    <option value="offline"<?php if ($MapType == 'offline') {
426
+	print ' selected';
427
+}
428
+?>>Natural Earth</option>
314 429
 			    <?php
315 430
 				    }
316 431
 			    ?>
317
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
432
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
433
+	print ' selected';
434
+}
435
+?>>National Geographic Street</option>
318 436
 			    <?php
319 437
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
320
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
321
-					else $MapBoxId = $_COOKIE['MapTypeId'];
438
+					if (!isset($_COOKIE['MapTypeId'])) {
439
+						$MapBoxId = 'default';
440
+					} else {
441
+						$MapBoxId = $_COOKIE['MapTypeId'];
442
+					}
322 443
 			    ?>
323
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
324
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
325
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
326
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
327
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
328
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
329
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
330
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
331
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
332
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
333
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
334
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
335
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
444
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
445
+	print ' selected';
446
+}
447
+?>>Mapbox GL</option>
448
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
449
+	print ' selected';
450
+}
451
+?>>Mapbox default</option>
452
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
453
+	print ' selected';
454
+}
455
+?>>Mapbox streets</option>
456
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
457
+	print ' selected';
458
+}
459
+?>>Mapbox light</option>
460
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
461
+	print ' selected';
462
+}
463
+?>>Mapbox dark</option>
464
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
465
+	print ' selected';
466
+}
467
+?>>Mapbox satellite</option>
468
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
469
+	print ' selected';
470
+}
471
+?>>Mapbox streets-satellite</option>
472
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
473
+	print ' selected';
474
+}
475
+?>>Mapbox streets-basic</option>
476
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
477
+	print ' selected';
478
+}
479
+?>>Mapbox comic</option>
480
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
481
+	print ' selected';
482
+}
483
+?>>Mapbox outdoors</option>
484
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
485
+	print ' selected';
486
+}
487
+?>>Mapbox pencil</option>
488
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
489
+	print ' selected';
490
+}
491
+?>>Mapbox pirates</option>
492
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
493
+	print ' selected';
494
+}
495
+?>>Mapbox emerald</option>
336 496
 			    <?php
337 497
 				    }
338 498
 			    ?>
339
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
499
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
500
+	print ' selected';
501
+}
502
+?>>OpenStreetMap</option>
340 503
 			    <?php
341 504
 				}
342 505
 			    ?>
@@ -347,10 +510,22 @@  discard block
 block discarded – undo
347 510
 ?>
348 511
 		    <li><?php echo _("Type of Terrain:"); ?>
349 512
 			<select  class="selectpicker" onchange="terrainType(this);">
350
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
351
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
352
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
353
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
513
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
514
+	print ' selected';
515
+}
516
+?>>stk terrain</option>
517
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
518
+	print ' selected';
519
+}
520
+?>>ellipsoid</option>
521
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
522
+	print ' selected';
523
+}
524
+?>>vr terrain</option>
525
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
526
+	print ' selected';
527
+}
528
+?>>ArticDEM</option>
354 529
 			</select>
355 530
 		    </li>
356 531
 <?php
@@ -359,43 +534,88 @@  discard block
 block discarded – undo
359 534
 <?php
360 535
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
361 536
 ?>
362
-		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
537
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
538
+	print 'checked';
539
+}
540
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
363 541
 
364 542
 <?php
365 543
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
366 544
 ?>
367
-		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
368
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) print 'checked'; ?> ><?php echo _("Display flight path"); ?></label></div></li>
369
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (!isset($_COOKIE['MapRoute']) && isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
370
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightremainingroute" value="1" onclick="clickFlightRemainingRoute(this)" <?php if ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == 'true') || (!isset($_COOKIE['MapRemainingRoute']) && isset($globalMapRemainingRoute) && $globalMapRemainingRoute)) print 'checked'; ?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
371
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
545
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
546
+	print 'checked';
547
+}
548
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
549
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
550
+	print 'checked';
551
+}
552
+?> ><?php echo _("Display flight path"); ?></label></div></li>
553
+		    <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)) {
554
+	print 'checked';
555
+}
556
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
557
+		    <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)) {
558
+	print 'checked';
559
+}
560
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
561
+		    <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)) {
562
+	print 'checked';
563
+}
564
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
372 565
 <?php
373 566
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
374 567
 ?>
375
-		    <li><div class="checkbox"><label><input type="checkbox" name="mapmatching" value="1" onclick="clickMapMatching(this)" <?php if ((isset($_COOKIE['mapmatching']) && $_COOKIE['mapmatching'] == 'true') || (!isset($_COOKIE['mapmatching']) && isset($globalMapMatching) && $globalMapMatching)) print 'checked'; ?> ><?php echo _("Enable map matching"); ?></label></div></li>
568
+		    <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)) {
569
+	print 'checked';
570
+}
571
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
376 572
 <?php
377 573
 	}
378 574
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
379 575
 ?>
380
-		    <li><div class="checkbox"><label><input type="checkbox" name="satelliteestimation" value="1" onclick="clickSatelliteEstimation(this)" <?php if ((isset($_COOKIE['satelliteestimation']) && $_COOKIE['satelliteestimation'] == 'true') || (!isset($_COOKIE['satelliteestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['satelliteestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
576
+		    <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)) {
577
+	print 'checked';
578
+}
579
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
381 580
 <?php
382 581
 	}
383 582
     }
384 583
 ?>
385
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true' || !isset($_COOKIE['displayairports'])) print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
386
-		    <li><div class="checkbox"><label><input type="checkbox" name="displaygroundstation" value="1" onclick="clickDisplayGroundStation(this)" <?php if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') || (!isset($_COOKIE['show_GroundStation']) && (isset($globalMapGroundStation) && $globalMapGroundStation === TRUE))) print 'checked'; ?> ><?php echo _("Display ground station on map"); ?></label></div></li>
387
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayweatherstation" value="1" onclick="clickDisplayWeatherStation(this)" <?php if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') || (!isset($_COOKIE['show_WeatherStation']) && (isset($globalMapWeatherStation) && $globalMapWeatherStation === TRUE))) print 'checked'; ?> ><?php echo _("Display weather station on map"); ?></label></div></li>
388
-		    <li><div class="checkbox"><label><input type="checkbox" name="displaylightning" value="1" onclick="clickDisplayLightning(this)" <?php if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') || (!isset($_COOKIE['show_Lightning']) && (isset($globalMapLightning) && $globalMapLightning === TRUE))) print 'checked'; ?> ><?php echo _("Display lightning on map"); ?></label></div></li>
584
+		    <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'])) {
585
+	print 'checked';
586
+}
587
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
588
+		    <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))) {
589
+	print 'checked';
590
+}
591
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
592
+		    <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))) {
593
+	print 'checked';
594
+}
595
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
596
+		    <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))) {
597
+	print 'checked';
598
+}
599
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
389 600
 <?php
390 601
 	if (isset($globalFires)) {
391 602
 ?>
392
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayfires" value="1" onclick="clickDisplayFires(this)" <?php if ((isset($_COOKIE['show_Fires']) && $_COOKIE['show_Fires'] == 'true') || (!isset($_COOKIE['show_Fires']) && (isset($globalMapFires) && $globalMapFires === TRUE))) print 'checked'; ?> ><?php echo _("Display fires on map"); ?></label></div></li>
603
+		    <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))) {
604
+	print 'checked';
605
+}
606
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
393 607
 <?php
394 608
 	}
395 609
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
396 610
 ?>
397
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li>
398
-		    <li><div class="checkbox"><label><input type="checkbox" name="one3dmodel" value="1" onclick="useOne3Dmodel(this)" <?php if ((isset($_COOKIE['one3dmodel']) && $_COOKIE['one3dmodel'] == 'true') || (!isset($_COOKIE['one3dmodel']) && isset($globalMap3DOneModel) && $globalMap3DOneModel)) print 'checked'; ?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
611
+		    <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')) {
612
+	print 'checked';
613
+}
614
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
615
+		    <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)) {
616
+	print 'checked';
617
+}
618
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
399 619
 <?php
400 620
     }
401 621
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -408,17 +628,25 @@  discard block
 block discarded – undo
408 628
 			if (function_exists('array_column')) {
409 629
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
410 630
 		    ?>
411
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
631
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
632
+	print 'checked';
633
+}
634
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
412 635
 		    <?php
413 636
 			    }
414 637
 			} elseif (isset($globalSources)) {
415 638
 			    $dispolar = false;
416 639
 			    foreach ($globalSources as $testsource) {
417
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
640
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
641
+			        	$dispolar = true;
642
+			        }
418 643
 			    }
419 644
 			    if ($dispolar) {
420 645
 		    ?>
421
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
646
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
647
+	print 'checked';
648
+}
649
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
422 650
 		    <?php
423 651
 			    }
424 652
 		        }
@@ -431,12 +659,22 @@  discard block
 block discarded – undo
431 659
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
432 660
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
433 661
 		    ?>
434
-		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
662
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
663
+	print 'checked';
664
+}
665
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
435 666
 		    <?php 
436 667
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
437 668
 		    ?>
438 669
 		    <li><?php echo _("Aircraft icon color:"); ?>
439
-			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>">
670
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
671
+	print $_COOKIE['IconColor'];
672
+} elseif (isset($globalAircraftIconColor)) {
673
+	print $globalAircraftIconColor;
674
+} else {
675
+	print '1a3151';
676
+}
677
+?>">
440 678
 		    </li>
441 679
 		    <?php
442 680
 				}
@@ -448,7 +686,14 @@  discard block
 block discarded – undo
448 686
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
449 687
 		    ?>
450 688
 		    <li><?php echo _("Marine icon color:"); ?>
451
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
689
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
690
+	print $_COOKIE['MarineIconColor'];
691
+} elseif (isset($globalMarineIconColor)) {
692
+	print $globalMarineIconColor;
693
+} else {
694
+	print '1a3151';
695
+}
696
+?>">
452 697
 		    </li>
453 698
 		    <?php
454 699
 			    }
@@ -459,7 +704,14 @@  discard block
 block discarded – undo
459 704
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
460 705
 		    ?>
461 706
 		    <li><?php echo _("Tracker icon color:"); ?>
462
-			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print '1a3151'; ?>">
707
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
708
+	print $_COOKIE['TrackerIconColor'];
709
+} elseif (isset($globalTrackerIconColor)) {
710
+	print $globalTrackerIconColor;
711
+} else {
712
+	print '1a3151';
713
+}
714
+?>">
463 715
 		    </li>
464 716
 		    <?php
465 717
 			    }
@@ -470,8 +722,22 @@  discard block
 block discarded – undo
470 722
 		    ?>
471 723
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
472 724
 			<div class="range">
473
-			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>">
474
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
725
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
726
+	print $_COOKIE['AirportZoom'];
727
+} elseif (isset($globalAirportZoom)) {
728
+	print $globalAirportZoom;
729
+} else {
730
+	print '7';
731
+}
732
+?>">
733
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
734
+	print $_COOKIE['AirportZoom'];
735
+} elseif (isset($globalAirportZoom)) {
736
+	print $globalAirportZoom;
737
+} else {
738
+	print '7';
739
+}
740
+?></output>
475 741
 			</div>
476 742
 		    </li>
477 743
 		    <?php
@@ -483,10 +749,23 @@  discard block
 block discarded – undo
483 749
 <?php
484 750
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
485 751
 ?>
486
-		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') print 'checked'; ?> ><?php echo _("Use airlines liveries"); ?></li>
487
-		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li>
752
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
753
+	print 'checked';
754
+}
755
+?> ><?php echo _("Use airlines liveries"); ?></li>
756
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
757
+	print 'checked';
758
+}
759
+?> ><?php echo _("Force Aircraft color"); ?></li>
488 760
 		    <li><?php echo _("Aircraft icon color:"); ?>
489
-			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print 'ff0000'; ?>">
761
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
762
+	print $_COOKIE['IconColor'];
763
+} elseif (isset($globalAircraftIconColor)) {
764
+	print $globalAircraftIconColor;
765
+} else {
766
+	print 'ff0000';
767
+}
768
+?>">
490 769
 		    </li>
491 770
 <?php
492 771
 	}
@@ -494,9 +773,19 @@  discard block
 block discarded – undo
494 773
 <?php
495 774
 	if (isset($globalMarine) && $globalMarine === TRUE) {
496 775
 ?>
497
-		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li>
776
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
777
+	print 'checked';
778
+}
779
+?> ><?php echo _("Force Marine color"); ?></li>
498 780
 		    <li><?php echo _("Marine icon color:"); ?>
499
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>">
781
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
782
+	print $_COOKIE['MarineIconColor'];
783
+} elseif (isset($globalMarineIconColor)) {
784
+	print $globalMarineIconColor;
785
+} else {
786
+	print 'ff0000';
787
+}
788
+?>">
500 789
 		    </li>
501 790
 <?php
502 791
 	}
@@ -504,9 +793,19 @@  discard block
 block discarded – undo
504 793
 <?php
505 794
 	if (isset($globalTracker) && $globalTracker === TRUE) {
506 795
 ?>
507
-		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?></li>
796
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
797
+	print 'checked';
798
+}
799
+?> ><?php echo _("Force Tracker color"); ?></li>
508 800
 		    <li><?php echo _("Tracker icon color:"); ?>
509
-			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) print $_COOKIE['TrackerIconColor']; elseif (isset($globalTrackerIconColor)) print $globalTrackerIconColor; else print 'ff0000'; ?>">
801
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
802
+	print $_COOKIE['TrackerIconColor'];
803
+} elseif (isset($globalTrackerIconColor)) {
804
+	print $globalTrackerIconColor;
805
+} else {
806
+	print 'ff0000';
807
+}
808
+?>">
510 809
 		    </li>
511 810
 <?php
512 811
 	}
@@ -514,22 +813,46 @@  discard block
 block discarded – undo
514 813
 ?>
515 814
 		    <li><?php echo _("Distance unit:"); ?>
516 815
 			<select class="selectpicker" onchange="unitdistance(this);">
517
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
518
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
519
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
816
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
817
+	echo ' selected';
818
+}
819
+?>>km</option>
820
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
821
+	echo ' selected';
822
+}
823
+?>>nm</option>
824
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
825
+	echo ' selected';
826
+}
827
+?>>mi</option>
520 828
 		        </select>
521 829
 		    </li>
522 830
 		    <li><?php echo _("Altitude unit:"); ?>
523 831
 			<select class="selectpicker" onchange="unitaltitude(this);">
524
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
525
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
832
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
833
+	echo ' selected';
834
+}
835
+?>>m</option>
836
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
837
+	echo ' selected';
838
+}
839
+?>>feet</option>
526 840
 		        </select>
527 841
 		    </li>
528 842
 		    <li><?php echo _("Speed unit:"); ?>
529 843
 			<select class="selectpicker" onchange="unitspeed(this);">
530
-			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) echo ' selected'; ?>>km/h</option>
531
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
532
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
844
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
845
+	echo ' selected';
846
+}
847
+?>>km/h</option>
848
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
849
+	echo ' selected';
850
+}
851
+?>>mph</option>
852
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
853
+	echo ' selected';
854
+}
855
+?>>knots</option>
533 856
 		        </select>
534 857
 		    </li>
535 858
 
@@ -547,9 +870,18 @@  discard block
 block discarded – undo
547 870
 		    <?php
548 871
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
549 872
 		    ?>
550
-			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
551
-			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
552
-			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
873
+			<?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'])) {
874
+	print 'checked';
875
+}
876
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
877
+			<?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'])) {
878
+	print 'checked';
879
+}
880
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
881
+			<?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'])) {
882
+	print 'checked';
883
+}
884
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
553 885
 		    <?php
554 886
 			}
555 887
 		    ?>
@@ -557,10 +889,16 @@  discard block
 block discarded – undo
557 889
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
558 890
 		    ?>
559 891
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
560
-			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
892
+			    <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'])) {
893
+	print 'checked';
894
+}
895
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
561 896
 			<?php } ?>
562 897
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
563
-			    <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li>
898
+			    <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'])) {
899
+	print 'checked';
900
+}
901
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
564 902
 			<?php } ?>
565 903
 		    <?php
566 904
 			}
@@ -577,7 +915,9 @@  discard block
 block discarded – undo
577 915
 				}
578 916
 				foreach($allairlinenames as $airline) {
579 917
 					$airline_name = $airline['airline_name'];
580
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
918
+					if (strlen($airline_name) > 30) {
919
+						$airline_name = substr($airline_name,0,30).'...';
920
+					}
581 921
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
582 922
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
583 923
 					} else {
@@ -595,7 +935,10 @@  discard block
 block discarded – undo
595 935
 		    <li><?php echo _("Display alliance:"); ?>
596 936
 		    <br/>
597 937
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
598
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
938
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
939
+	echo ' selected';
940
+}
941
+?>><?php echo _("All"); ?></option>
599 942
 			    <?php
600 943
 				foreach($allalliancenames as $alliance) {
601 944
 					$alliance_name = $alliance['alliance'];
@@ -654,10 +997,22 @@  discard block
 block discarded – undo
654 997
 		    ?>
655 998
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
656 999
 			<select class="selectpicker" onchange="airlinestype(this);">
657
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
658
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
659
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
660
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
1000
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
1001
+	echo ' selected';
1002
+}
1003
+?>><?php echo _("All"); ?></option>
1004
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
1005
+	echo ' selected';
1006
+}
1007
+?>><?php echo _("Passenger"); ?></option>
1008
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
1009
+	echo ' selected';
1010
+}
1011
+?>><?php echo _("Cargo"); ?></option>
1012
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
1013
+	echo ' selected';
1014
+}
1015
+?>><?php echo _("Military"); ?></option>
661 1016
 			</select>
662 1017
 		    </li>
663 1018
 		    <?php
@@ -671,14 +1026,20 @@  discard block
 block discarded – undo
671 1026
 		    ?>
672 1027
 		    <li>
673 1028
 			<?php echo _("Display vessels with MMSI:"); ?>
674
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1029
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1030
+	print $_COOKIE['filter_mmsi'];
1031
+}
1032
+?>" />
675 1033
 		    </li>
676 1034
 		    <?php
677 1035
 			}
678 1036
 		    ?>
679 1037
 		    <li>
680 1038
 			<?php echo _("Display with ident:"); ?>
681
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1039
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1040
+	print $_COOKIE['filter_ident'];
1041
+}
1042
+?>" />
682 1043
 		    </li>
683 1044
 		</ul>
684 1045
 	    </form>
@@ -694,7 +1055,10 @@  discard block
 block discarded – undo
694 1055
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
695 1056
 	    <form>
696 1057
 		<ul>
697
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if ((isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') || !isset($_COOKIE['displayiss'])) print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
1058
+		    <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'])) {
1059
+	print 'checked';
1060
+}
1061
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
698 1062
 		    <li><?php echo _("Type:"); ?>
699 1063
 			<select class="selectpicker" multiple onchange="sattypes(this);">
700 1064
 			    <?php
@@ -702,25 +1066,45 @@  discard block
 block discarded – undo
702 1066
 				$types = $Satellite->get_tle_types();
703 1067
 				foreach ($types as $type) {
704 1068
 					$type_name = $type['tle_type'];
705
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
706
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
707
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
708
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
709
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
710
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
711
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
712
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
713
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
714
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
715
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
716
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
717
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
718
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
719
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
720
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
721
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
722
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
723
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1069
+					if ($type_name == 'musson') {
1070
+						$type_name = 'Russian LEO Navigation';
1071
+					} else if ($type_name == 'nnss') {
1072
+						$type_name = 'Navi Navigation Satellite System';
1073
+					} else if ($type_name == 'sbas') {
1074
+						$type_name = 'Satellite-Based Augmentation System';
1075
+					} else if ($type_name == 'glo-ops') {
1076
+						$type_name = 'Glonass Operational';
1077
+					} else if ($type_name == 'gps-ops') {
1078
+						$type_name = 'GPS Operational';
1079
+					} else if ($type_name == 'argos') {
1080
+						$type_name = 'ARGOS Data Collection System';
1081
+					} else if ($type_name == 'tdrss') {
1082
+						$type_name = 'Tracking and Data Relay Satellite System';
1083
+					} else if ($type_name == 'sarsat') {
1084
+						$type_name = 'Search & Rescue';
1085
+					} else if ($type_name == 'dmc') {
1086
+						$type_name = 'Disaster Monitoring';
1087
+					} else if ($type_name == 'resource') {
1088
+						$type_name = 'Earth Resources';
1089
+					} else if ($type_name == 'stations') {
1090
+						$type_name = 'Space Stations';
1091
+					} else if ($type_name == 'geo') {
1092
+						$type_name = 'Geostationary';
1093
+					} else if ($type_name == 'amateur') {
1094
+						$type_name = 'Amateur Radio';
1095
+					} else if ($type_name == 'x-comm') {
1096
+						$type_name = 'Experimental';
1097
+					} else if ($type_name == 'other-comm') {
1098
+						$type_name = 'Other Comm';
1099
+					} else if ($type_name == 'science') {
1100
+						$type_name = 'Space & Earth Science';
1101
+					} else if ($type_name == 'military') {
1102
+						$type_name = 'Miscellaneous Military';
1103
+					} else if ($type_name == 'radar') {
1104
+						$type_name = 'Radar Calibration';
1105
+					} else if ($type_name == 'tle-new') {
1106
+						$type_name = 'Last 30 days launches';
1107
+					}
724 1108
 					
725 1109
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
726 1110
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.