Completed
Push — master ( 010c41...55b6fc )
by Yannick
33:46
created
js/map-aircraft.2d.js.php 1 patch
Braces   +60 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,16 +13,27 @@  discard block
 block discarded – undo
13 13
 <?php
14 14
 
15 15
 // Compressed GeoJson is used if true
16
-if (!isset($globalJsonCompress)) $compress = true;
17
-else $compress = $globalJsonCompress;
16
+if (!isset($globalJsonCompress)) {
17
+	$compress = true;
18
+} else {
19
+	$compress = $globalJsonCompress;
20
+}
18 21
 
19
-if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
20
-if (isset($_GET['flightaware_id'])) $flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
22
+if (isset($_GET['ident'])) {
23
+	$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
24
+}
25
+if (isset($_GET['flightaware_id'])) {
26
+	$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
27
+}
21 28
 ?>
22 29
 <?php
23
-if (isset($_COOKIE['IconColor'])) $IconColor = $_COOKIE['IconColor'];
24
-elseif (isset($globalAircraftIconColor)) $IconColor = $globalAircraftIconColor;
25
-else $IconColor = '1a3151';
30
+if (isset($_COOKIE['IconColor'])) {
31
+	$IconColor = $_COOKIE['IconColor'];
32
+} elseif (isset($globalAircraftIconColor)) {
33
+	$IconColor = $globalAircraftIconColor;
34
+} else {
35
+	$IconColor = '1a3151';
36
+}
26 37
 ?>
27 38
 <?php
28 39
 if (isset($globalDebug) && $globalDebug === TRUE) {
@@ -99,9 +110,12 @@  discard block
 block discarded – undo
99 110
 
100 111
 function update_airportsLayer() {
101 112
 <?php
102
-	if (isset($_COOKIE['AirportZoom'])) $getZoom = $_COOKIE['AirportZoom'];
103
-	else $getZoom = '7';
104
-?>
113
+	if (isset($_COOKIE['AirportZoom'])) {
114
+		$getZoom = $_COOKIE['AirportZoom'];
115
+	} else {
116
+		$getZoom = '7';
117
+	}
118
+	?>
105 119
 	if (typeof airportsLayer != 'undefined') {
106 120
 		if (map.hasLayer(airportsLayer) == true) {
107 121
 			map.removeLayer(airportsLayer);
@@ -382,7 +396,12 @@  discard block
 block discarded – undo
382 396
 <?php
383 397
 		} else {
384 398
 ?>
385
-					var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
399
+					var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
400
+	print $archiveupdatetime*1000;
401
+} else {
402
+	print $globalMapRefresh*1000+20000;
403
+}
404
+?>+feature.properties.sqt*1000);
386 405
 					return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
387 406
 <?php
388 407
 		}
@@ -433,7 +452,12 @@  discard block
 block discarded – undo
433 452
 <?php
434 453
 		} else {
435 454
 ?>
436
-						var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
455
+						var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
456
+	print $archiveupdatetime*1000;
457
+} else {
458
+	print $globalMapRefresh*1000+20000;
459
+}
460
+?>+feature.properties.sqt*1000);
437 461
 						return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
438 462
 <?php
439 463
 		}
@@ -481,7 +505,12 @@  discard block
 block discarded – undo
481 505
 <?php
482 506
 		} else {
483 507
 ?>
484
-							var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
508
+							var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
509
+	print $archiveupdatetime*1000;
510
+} else {
511
+	print $globalMapRefresh*1000+20000;
512
+}
513
+?>+feature.properties.sqt*1000);
485 514
 							return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
486 515
 <?php
487 516
 		}
@@ -1000,12 +1029,22 @@  discard block
 block discarded – undo
1000 1029
 		update_archiveLayer(0);
1001 1030
 	} else {
1002 1031
 		//then load it again every 30 seconds
1003
-		var reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>);
1032
+		var reloadPage = setInterval(function(){if (noTimeout) getLiveData(0)},<?php if (isset($globalMapRefresh)) {
1033
+	print $globalMapRefresh*1000;
1034
+} else {
1035
+	print '30000';
1036
+}
1037
+?>);
1004 1038
 <?php
1005 1039
 		if (!((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) && (isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
1006 1040
 ?>
1007 1041
 		update_polarLayer();
1008
-		setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
1042
+		setInterval(function(){map.removeLayer(polarLayer);update_polarLayer()},<?php if (isset($globalMapRefresh)) {
1043
+	print $globalMapRefresh*1000*2;
1044
+} else {
1045
+	print '60000';
1046
+}
1047
+?>);
1009 1048
 <?php
1010 1049
 		}
1011 1050
 ?>
@@ -1018,7 +1057,12 @@  discard block
 block discarded – undo
1018 1057
 	if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) {
1019 1058
 ?>
1020 1059
 	update_atcLayer();
1021
-	setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
1060
+	setInterval(function(){map.removeLayer(atcLayer);update_atcLayer()},<?php if (isset($globalMapRefresh)) {
1061
+	print $globalMapRefresh*1000*2;
1062
+} else {
1063
+	print '60000';
1064
+}
1065
+?>);
1022 1066
 <?php
1023 1067
 	}
1024 1068
 ?>
Please login to merge, or discard this patch.
js/map-tracker.2d.js.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once('../require/settings.php');
3 3
 require_once('../require/class.Language.php'); 
4
-setcookie("MapFormat",'2d');
4
+setcookie("MapFormat", '2d');
5 5
 ?>
6 6
 /**
7 7
  * This javascript is part of FlightAirmap.
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 
28 28
 <?php
29 29
 	if (isset($_GET['famtrackid'])) {
30
-		$famtrackid = filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING);
30
+		$famtrackid = filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING);
31 31
 	}
32 32
 	if (isset($_GET['ident'])) {
33
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
33
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
34 34
 	}
35 35
 	if (!isset($ident) && !isset($famtrackid)) {
36 36
 ?>
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 <?php
211 211
 		} else {
212 212
 ?>
213
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
213
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
214 214
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
215 215
 <?php
216 216
 		}
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 			    /*
227 227
 			    shadowUrl: iconURLShadowpath,
228 228
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
229
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
229
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
230 230
 			    */
231 231
 			})
232 232
 		    })
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 <?php
268 268
 		} else {
269 269
 ?>
270
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
270
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
271 271
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
272 272
 <?php
273 273
 		}
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 <?php
324 324
 		} else {
325 325
 ?>
326
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
326
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
327 327
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
328 328
 <?php
329 329
 		}
Please login to merge, or discard this patch.
Braces   +39 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,10 +13,15 @@  discard block
 block discarded – undo
13 13
 <?php
14 14
 
15 15
 // Compressed GeoJson is used if true
16
-if (!isset($globalJsonCompress)) $compress = true;
17
-else $compress = $globalJsonCompress;
16
+if (!isset($globalJsonCompress)) {
17
+	$compress = true;
18
+} else {
19
+	$compress = $globalJsonCompress;
20
+}
18 21
 $archive = false;
19
-if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') $archive = true;
22
+if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') {
23
+	$archive = true;
24
+}
20 25
 ?>
21 26
 
22 27
 
@@ -174,9 +179,13 @@  discard block
 block discarded – undo
174 179
 		    if (callsign != ""){ markerTrackerLabel += callsign; }
175 180
 		    if (type != ""){ markerTrackerLabel += ' - '+type; }
176 181
 <?php
177
-	if (isset($_COOKIE['TrackerIconColor'])) $IconColor = $_COOKIE['TrackerIconColor'];
178
-	elseif (isset($globalTrackerIconColor)) $IconColor = $globalTrackerIconColor;
179
-	else $IconColor = '1a3151';
182
+	if (isset($_COOKIE['TrackerIconColor'])) {
183
+		$IconColor = $_COOKIE['TrackerIconColor'];
184
+	} elseif (isset($globalTrackerIconColor)) {
185
+		$IconColor = $globalTrackerIconColor;
186
+	} else {
187
+		$IconColor = '1a3151';
188
+	}
180 189
 	if (!isset($ident) && !isset($famtrackid)) {
181 190
 ?>
182 191
 		    //info_tracker_update(feature.properties.fc);
@@ -210,7 +219,12 @@  discard block
 block discarded – undo
210 219
 <?php
211 220
 		} else {
212 221
 ?>
213
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
222
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
223
+	print $archiveupdatetime*1000;
224
+} else {
225
+	print $globalMapRefresh*1000+20000;
226
+}
227
+?>+feature.properties.sqt*1000);
214 228
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
215 229
 <?php
216 230
 		}
@@ -267,7 +281,12 @@  discard block
 block discarded – undo
267 281
 <?php
268 282
 		} else {
269 283
 ?>
270
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
284
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
285
+	print $archiveupdatetime*1000;
286
+} else {
287
+	print $globalMapRefresh*1000+20000;
288
+}
289
+?>+feature.properties.sqt*1000);
271 290
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
272 291
 <?php
273 292
 		}
@@ -323,7 +342,12 @@  discard block
 block discarded – undo
323 342
 <?php
324 343
 		} else {
325 344
 ?>
326
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
345
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
346
+	print $archiveupdatetime*1000;
347
+} else {
348
+	print $globalMapRefresh*1000+20000;
349
+}
350
+?>+feature.properties.sqt*1000);
327 351
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
328 352
 <?php
329 353
 		}
@@ -780,7 +804,12 @@  discard block
 block discarded – undo
780 804
 getLiveTrackerData(0);
781 805
 //then load it again every 30 seconds
782 806
 var reloadTrackerPage = setInterval(
783
-    function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>);
807
+    function(){if (noTimeout) getLiveTrackerData(0)},<?php if (isset($globalMapRefresh)) {
808
+	print $globalMapRefresh*1000;
809
+} else {
810
+	print '30000';
811
+}
812
+?>);
784 813
 <?php
785 814
 	}
786 815
 ?>
Please login to merge, or discard this patch.
js/map-marine.2d.js.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once('../require/settings.php');
3 3
 require_once('../require/class.Language.php'); 
4
-setcookie("MapFormat",'2d');
4
+setcookie("MapFormat", '2d');
5 5
 ?>
6 6
 /**
7 7
  * This javascript is part of FlightAirmap.
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
 
39 39
 <?php
40 40
 	if (isset($_GET['fammarine_id'])) {
41
-		$fammarine_id = filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING);
41
+		$fammarine_id = filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING);
42 42
 	}
43 43
 	if (isset($_GET['ident'])) {
44
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
44
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
45 45
 	}
46 46
 	if (!isset($ident) && !isset($fammarine_id)) {
47 47
 ?>
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 <?php
202 202
 		} else {
203 203
 ?>
204
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
204
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
205 205
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
206 206
 <?php
207 207
 		}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			    /*
218 218
 			    shadowUrl: iconURLShadowpath,
219 219
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
220
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
220
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
221 221
 			    */
222 222
 			})
223 223
 		    })
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 <?php
259 259
 		} else {
260 260
 ?>
261
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
261
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
262 262
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
263 263
 <?php
264 264
 		}
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 <?php
315 315
 		} else {
316 316
 ?>
317
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
317
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
318 318
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
319 319
 <?php
320 320
 		}
Please login to merge, or discard this patch.
Braces   +36 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,11 +14,18 @@  discard block
 block discarded – undo
14 14
 <?php
15 15
 
16 16
 // Compressed GeoJson is used if true
17
-if (!isset($globalJsonCompress)) $compress = true;
18
-else $compress = $globalJsonCompress;
19
-if (isset($_COOKIE['MarineIconColor'])) $MarineIconColor = $_COOKIE['MarineIconColor'];
20
-elseif (isset($globalMarineIconColor)) $MarineIconColor = $globalMarineIconColor;
21
-else $MarineIconColor = '43d1d8';
17
+if (!isset($globalJsonCompress)) {
18
+	$compress = true;
19
+} else {
20
+	$compress = $globalJsonCompress;
21
+}
22
+if (isset($_COOKIE['MarineIconColor'])) {
23
+	$MarineIconColor = $_COOKIE['MarineIconColor'];
24
+} elseif (isset($globalMarineIconColor)) {
25
+	$MarineIconColor = $globalMarineIconColor;
26
+} else {
27
+	$MarineIconColor = '43d1d8';
28
+}
22 29
 
23 30
 if (isset($globalVM) && $globalVM) {
24 31
 ?>
@@ -201,7 +208,12 @@  discard block
 block discarded – undo
201 208
 <?php
202 209
 		} else {
203 210
 ?>
204
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
211
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
212
+	print $archiveupdatetime*1000;
213
+} else {
214
+	print $globalMapRefresh*1000+20000;
215
+}
216
+?>+feature.properties.sqt*1000);
205 217
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
206 218
 <?php
207 219
 		}
@@ -258,7 +270,12 @@  discard block
 block discarded – undo
258 270
 <?php
259 271
 		} else {
260 272
 ?>
261
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
273
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
274
+	print $archiveupdatetime*1000;
275
+} else {
276
+	print $globalMapRefresh*1000+20000;
277
+}
278
+?>+feature.properties.sqt*1000);
262 279
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
263 280
 <?php
264 281
 		}
@@ -314,7 +331,12 @@  discard block
 block discarded – undo
314 331
 <?php
315 332
 		} else {
316 333
 ?>
317
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
334
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
335
+	print $archiveupdatetime*1000;
336
+} else {
337
+	print $globalMapRefresh*1000+20000;
338
+}
339
+?>+feature.properties.sqt*1000);
318 340
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
319 341
 <?php
320 342
 		}
@@ -746,7 +768,12 @@  discard block
 block discarded – undo
746 768
 } else {
747 769
 	//then load it again every 30 seconds
748 770
 	var reloadMarinePage = setInterval(
749
-	function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>);
771
+	function(){if (noTimeout) getLiveMarineData(0)},<?php if (isset($globalMapRefresh)) {
772
+	print $globalMapRefresh*1000;
773
+} else {
774
+	print '30000';
775
+}
776
+?>);
750 777
 }
751 778
 
752 779
 if (getCookie('openseamap') == 'true') loadOpenSeaMap(getCookie('openseamap'));
Please login to merge, or discard this patch.
js/map-satellite.2d.js.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once('../require/settings.php');
3 3
 require_once('../require/class.Language.php'); 
4
-setcookie("MapFormat",'2d');
4
+setcookie("MapFormat", '2d');
5 5
 ?>
6 6
 /**
7 7
  * This javascript is part of FlightAirmap.
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 
27 27
 <?php
28 28
 	if (isset($_GET['famsatid'])) {
29
-		$famsatid = filter_input(INPUT_GET,'famsatid',FILTER_SANITIZE_STRING);
29
+		$famsatid = filter_input(INPUT_GET, 'famsatid', FILTER_SANITIZE_STRING);
30 30
 	}
31 31
 	if (isset($_GET['ident'])) {
32
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
32
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
33 33
 	}
34 34
 	if (!isset($ident) && !isset($famsatid)) {
35 35
 ?>
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 <?php
175 175
 		} else {
176 176
 ?>
177
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
177
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
178 178
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
179 179
 <?php
180 180
 		}
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 			    /*
191 191
 			    shadowUrl: iconURLShadowpath,
192 192
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
193
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
193
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
194 194
 			    */
195 195
 			})
196 196
 		    })
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 <?php
232 232
 		} else {
233 233
 ?>
234
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
234
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
235 235
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
236 236
 <?php
237 237
 		}
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 <?php
288 288
 		} else {
289 289
 ?>
290
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
290
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
291 291
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
292 292
 <?php
293 293
 		}
Please login to merge, or discard this patch.
Braces   +42 added lines, -10 removed lines patch added patch discarded remove patch
@@ -13,8 +13,11 @@  discard block
 block discarded – undo
13 13
 <?php
14 14
 
15 15
 // Compressed GeoJson is used if true
16
-if (!isset($globalJsonCompress)) $compress = true;
17
-else $compress = $globalJsonCompress;
16
+if (!isset($globalJsonCompress)) {
17
+	$compress = true;
18
+} else {
19
+	$compress = $globalJsonCompress;
20
+}
18 21
 $compress = false;
19 22
 ?>
20 23
 
@@ -145,9 +148,13 @@  discard block
 block discarded – undo
145 148
 		    if (callsign != ""){ markerSatelliteLabel += callsign; }
146 149
 		    if (type != ""){ markerSatelliteLabel += ' - '+type; }
147 150
 <?php
148
-	if (isset($_COOKIE['SatelliteIconColor'])) $IconColor = $_COOKIE['SatelliteIconColor'];
149
-	elseif (isset($globalSatelliteIconColor)) $IconColor = $globalSatelliteIconColor;
150
-	else $IconColor = '1a3151';
151
+	if (isset($_COOKIE['SatelliteIconColor'])) {
152
+		$IconColor = $_COOKIE['SatelliteIconColor'];
153
+	} elseif (isset($globalSatelliteIconColor)) {
154
+		$IconColor = $globalSatelliteIconColor;
155
+	} else {
156
+		$IconColor = '1a3151';
157
+	}
151 158
 	if (!isset($ident) && !isset($famsatid)) {
152 159
 ?>
153 160
 		    info_satellite_update(feature.properties.fc);
@@ -174,7 +181,12 @@  discard block
 block discarded – undo
174 181
 <?php
175 182
 		} else {
176 183
 ?>
177
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
184
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
185
+	print $archiveupdatetime*1000;
186
+} else {
187
+	print $globalMapRefresh*1000+20000;
188
+}
189
+?>+feature.properties.sqt*1000);
178 190
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
179 191
 <?php
180 192
 		}
@@ -231,7 +243,12 @@  discard block
 block discarded – undo
231 243
 <?php
232 244
 		} else {
233 245
 ?>
234
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
246
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
247
+	print $archiveupdatetime*1000;
248
+} else {
249
+	print $globalMapRefresh*1000+20000;
250
+}
251
+?>+feature.properties.sqt*1000);
235 252
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
236 253
 <?php
237 254
 		}
@@ -287,7 +304,12 @@  discard block
 block discarded – undo
287 304
 <?php
288 305
 		} else {
289 306
 ?>
290
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
307
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) {
308
+	print $archiveupdatetime*1000;
309
+} else {
310
+	print $globalMapRefresh*1000+20000;
311
+}
312
+?>+feature.properties.sqt*1000);
291 313
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
292 314
 <?php
293 315
 		}
@@ -456,14 +478,24 @@  discard block
 block discarded – undo
456 478
 	if (isset($archive) && $archive) {
457 479
 ?>
458 480
 //then load it again every 30 seconds
459
-//  var reload = setInterval(function(){if (noTimeout) updateSat(0)},<?php if (isset($globalMapRefresh)) print ($globalMapRefresh*1000)/2; else print '15000'; ?>);
481
+//  var reload = setInterval(function(){if (noTimeout) updateSat(0)},<?php if (isset($globalMapRefresh)) {
482
+	print ($globalMapRefresh*1000)/2;
483
+} else {
484
+	print '15000';
485
+}
486
+?>);
460 487
 var reloadSatellitePage = setInterval(function(){if (noTimeout) updateSat(0)},<?php print $archiveupdatetime*1000; ?>);
461 488
 <?php
462 489
 	} else {
463 490
 ?>
464 491
 //then load it again every 30 seconds
465 492
 var reloadSatellitePage = setInterval(
466
-    function(){if (noTimeout) updateSat(0)},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000; else print '30000'; ?>);
493
+    function(){if (noTimeout) updateSat(0)},<?php if (isset($globalMapRefresh)) {
494
+	print $globalMapRefresh*1000;
495
+} else {
496
+	print '30000';
497
+}
498
+?>);
467 499
 <?php
468 500
 	}
469 501
 ?>
Please login to merge, or discard this patch.
js/map.2d.js.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
 	};
449 449
 
450 450
 <?php
451
-    if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
451
+	if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
452 452
 ?>
453 453
 	function tskPopup (feature, layer) {
454 454
 		var output = '';
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
 	};
484 484
 	update_tsk();
485 485
 <?php
486
-    }
486
+	}
487 487
 ?>
488 488
 	map.on('moveend', function() {
489 489
 		if (map.hasLayer(locationsLayer) == true) {
@@ -504,10 +504,10 @@  discard block
 block discarded – undo
504 504
 		update_santaLayer(false);
505 505
 	}
506 506
 <?php
507
-    // Add support for custom json via $globalMapJson
508
-    if (isset($globalMapJson) && is_array($globalMapJson)) {
507
+	// Add support for custom json via $globalMapJson
508
+	if (isset($globalMapJson) && is_array($globalMapJson)) {
509 509
 	foreach ($globalMapJson as $json) {
510
-	    if (isset($json['url'])) {
510
+		if (isset($json['url'])) {
511 511
 ?>
512 512
 update_genLayer('<?php print $json['url']; ?>');
513 513
 <?php
@@ -516,9 +516,9 @@  discard block
 block discarded – undo
516 516
 setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>);
517 517
 <?php
518 518
 		}
519
-	    }
519
+		}
520
+	}
520 521
 	}
521
-    }
522 522
 
523 523
 ?>
524 524
 //adds the bootstrap tooltip to the map icons
Please login to merge, or discard this patch.
Braces   +134 added lines, -30 removed lines patch added patch discarded remove patch
@@ -13,10 +13,15 @@  discard block
 block discarded – undo
13 13
 "use strict";
14 14
 <?php
15 15
 
16
-if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = '';
16
+if (!isset($globalOpenWeatherMapKey)) {
17
+	$globalOpenWeatherMapKey = '';
18
+}
17 19
 // Compressed GeoJson is used if true
18
-if (!isset($globalJsonCompress)) $compress = true;
19
-else $compress = $globalJsonCompress;
20
+if (!isset($globalJsonCompress)) {
21
+	$compress = true;
22
+} else {
23
+	$compress = $globalJsonCompress;
24
+}
20 25
 
21 26
 /*
22 27
 if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') {
@@ -142,7 +147,17 @@  discard block
 block discarded – undo
142 147
 	}
143 148
 
144 149
 	//create the map
145
-	map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) print $latitude; else print $globalCenterLatitude; ?>,<?php if (isset($longitude)) print $longitude; else print $globalCenterLongitude; ?>], zoom);
150
+	map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) {
151
+	print $latitude;
152
+} else {
153
+	print $globalCenterLatitude;
154
+}
155
+?>,<?php if (isset($longitude)) {
156
+	print $longitude;
157
+} else {
158
+	print $globalCenterLongitude;
159
+}
160
+?>], zoom);
146 161
 <?php
147 162
 	} else {
148 163
 		if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) {
@@ -168,9 +183,21 @@  discard block
 block discarded – undo
168 183
 	     || navigator.userAgent.match(/BlackBerry/i)
169 184
 	     || navigator.userAgent.match(/Windows Phone/i))
170 185
 	{
171
-		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>;
186
+		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) {
187
+	print $viewzoom-1;
188
+} elseif (isset($viewzoom)) {
189
+	print $viewzoom;
190
+} else {
191
+	print '8';
192
+}
193
+?>;
172 194
 	} else {
173
-		var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>;
195
+		var zoom = <?php if (isset($viewzoom)) {
196
+	print $viewzoom;
197
+} else {
198
+	print '9';
199
+}
200
+?>;
174 201
 	}
175 202
 
176 203
 	//create the map
@@ -196,16 +223,27 @@  discard block
 block discarded – undo
196 223
 	var bounds = L.latLngBounds(southWest,northEast);
197 224
 	//a few title layers
198 225
 <?php
199
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
200
-	else $MapType = $globalMapProvider;
226
+	if (isset($_COOKIE['MapType'])) {
227
+		$MapType = $_COOKIE['MapType'];
228
+	} else {
229
+		$MapType = $globalMapProvider;
230
+	}
201 231
 
202 232
 	if ($MapType == 'Mapbox') {
203
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
204
-		else $MapBoxId = $_COOKIE['MapTypeId'];
205
-?>
233
+		if ($_COOKIE['MapTypeId'] == 'default') {
234
+			$MapBoxId = $globalMapboxId;
235
+		} else {
236
+			$MapBoxId = $_COOKIE['MapTypeId'];
237
+		}
238
+		?>
206 239
 	L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
207 240
 	    maxZoom: 18,
208
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
241
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
242
+	print 'false';
243
+} else {
244
+	print 'true';
245
+}
246
+?>,
209 247
 	    attribution: '© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a></strong>',
210 248
 	    id: '<?php print $MapBoxId; ?>',
211 249
 	    token: '<?php print $globalMapboxToken; ?>'
@@ -224,7 +262,12 @@  discard block
 block discarded – undo
224 262
 ?>
225 263
 	L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
226 264
 	    maxZoom: 18,
227
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
265
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
266
+	print 'false';
267
+} else {
268
+	print 'true';
269
+}
270
+?>,
228 271
 	    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
229 272
 	      '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>'
230 273
 	}).addTo(map);
@@ -233,7 +276,12 @@  discard block
 block discarded – undo
233 276
 ?>
234 277
 	L.tileLayer('https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', {
235 278
 	    maxZoom: 18,
236
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
279
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
280
+	print 'false';
281
+} else {
282
+	print 'true';
283
+}
284
+?>,
237 285
 	    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
238 286
 		'&copy; <a href="http://openseamap.org">OpenSeaMap</a> contributors, ' +
239 287
 	      '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>'
@@ -243,7 +291,12 @@  discard block
 block discarded – undo
243 291
 ?>
244 292
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}', {
245 293
 	    maxZoom: 18,
246
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
294
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
295
+	print 'false';
296
+} else {
297
+	print 'true';
298
+}
299
+?>,
247 300
 	    attribution: 'Tiles &copy; Esri &mdash; Sources: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
248 301
 	}).addTo(map);
249 302
 <?php
@@ -251,7 +304,12 @@  discard block
 block discarded – undo
251 304
 ?>
252 305
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
253 306
 	    maxZoom: 18,
254
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
307
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
308
+	print 'false';
309
+} else {
310
+	print 'true';
311
+}
312
+?>,
255 313
 	    attribution: 'Tiles &copy; Esri &mdash; Sources: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
256 314
 	}).addTo(map);
257 315
 <?php
@@ -259,7 +317,12 @@  discard block
 block discarded – undo
259 317
 ?>
260 318
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/tile/{z}/{y}/{x}', {
261 319
 	    maxZoom: 18,
262
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
320
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
321
+	print 'false';
322
+} else {
323
+	print 'true';
324
+}
325
+?>,
263 326
 	    attribution: 'Tiles &copy; Esri &mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'
264 327
 	}).addTo(map);
265 328
 <?php
@@ -267,7 +330,12 @@  discard block
 block discarded – undo
267 330
 ?>
268 331
 	L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}', {
269 332
 	    maxZoom: 18,
270
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
333
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
334
+	print 'false';
335
+} else {
336
+	print 'true';
337
+}
338
+?>,
271 339
 	    attribution: 'Tiles &copy; Esri &mdash; Sources: National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'
272 340
 	}).addTo(map);
273 341
 <?php
@@ -312,20 +380,26 @@  discard block
 block discarded – undo
312 380
 	map.addLayer(yandexLayer);
313 381
 <?php
314 382
 	} elseif ($MapType == 'Bing-Aerial') {
315
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
316
-?>
383
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
384
+			setcookie('MapType','OpenStreetMap');
385
+		}
386
+		?>
317 387
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'});
318 388
 	map.addLayer(bingLayer);
319 389
 <?php
320 390
 	} elseif ($MapType == 'Bing-Hybrid') {
321
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
322
-?>
391
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
392
+			setcookie('MapType','OpenStreetMap');
393
+		}
394
+		?>
323 395
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'});
324 396
 	map.addLayer(bingLayer);
325 397
 <?php
326 398
 	} elseif ($MapType == 'Bing-Road') {
327
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
328
-?>
399
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
400
+			setcookie('MapType','OpenStreetMap');
401
+		}
402
+		?>
329 403
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'});
330 404
 	map.addLayer(bingLayer);
331 405
 <?php
@@ -354,7 +428,12 @@  discard block
 block discarded – undo
354 428
 	    maxZoom: 5,
355 429
 	    tms : true,
356 430
 	    zindex : 3,
357
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
431
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
432
+	print 'false';
433
+} else {
434
+	print 'true';
435
+}
436
+?>,
358 437
 	    attribution: 'Natural Earth'
359 438
 	}).addTo(map);
360 439
 <?php
@@ -362,9 +441,24 @@  discard block
 block discarded – undo
362 441
 		$customid = $MapType;
363 442
 ?>
364 443
 	L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
365
-	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
366
-	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
367
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
444
+	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
445
+	print $globalMapCustomLayer[$customid]['maxZoom'];
446
+} else {
447
+	print '18';
448
+}
449
+?>,
450
+	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
451
+	print $globalMapCustomLayer[$customid]['minZoom'];
452
+} else {
453
+	print '0';
454
+}
455
+?>,
456
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
457
+	print 'false';
458
+} else {
459
+	print 'true';
460
+}
461
+?>,
368 462
 	    attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
369 463
 	}).addTo(map);
370 464
 
@@ -404,7 +498,12 @@  discard block
 block discarded – undo
404 498
 		}
405 499
 	} elseif ($globalBounding == 'circle') {
406 500
 ?>
407
-	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{
501
+	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) {
502
+	print $globalBoundingCircleSize;
503
+} else {
504
+	print '70000';
505
+}
506
+?>,{
408 507
 	    color: '#92C7D1',
409 508
 	    fillColor: '#92C7D1',
410 509
 	    fillOpacity: 0.3,
@@ -494,7 +593,12 @@  discard block
 block discarded – undo
494 593
 	});
495 594
 	if (archive === false) {
496 595
 		update_locationsLayer();
497
-		setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
596
+		setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) {
597
+	print $globalMapRefresh*1000*2;
598
+} else {
599
+	print '60000';
600
+}
601
+?>);
498 602
 	}
499 603
 	var currentdate = new Date();
500 604
 	var currentyear = new Date().getFullYear();
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +106 added lines, -106 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     <?php }; if (isset($globalSatellite) && $globalSatellite) { ?><td><div id="ibxsatellite"><h4><?php echo _("Satellites Displayed"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?>
56 56
 </tr></table></div>
57 57
 <?php
58
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
58
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
59 59
 ?>
60 60
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
61 61
 <script src="<?php echo $globalURL; ?>/js/meuusjs.1.0.3.min.js"></script>
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
82 82
 <?php
83 83
 	}
84
-    }
84
+	}
85 85
 ?>
86 86
 
87 87
 <div id="sidebar" class="sidebar collapsed">
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 	<li><a href="" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
93 93
 	<li><a href="" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
94 94
 <?php
95
-    //if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) {
95
+	//if ((isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') || (isset($globalBeta) && $globalBeta === TRUE)) {
96 96
 	if (isset($globalArchive) && $globalArchive == TRUE && (!isset($globalAircraft) || $globalAircraft === TRUE)) {
97 97
 ?>
98 98
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
99 99
 <?php
100 100
 	}
101
-    //}
101
+	//}
102 102
 ?>
103 103
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
104 104
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 ?>
113 113
 
114 114
 <?php
115
-    if (isset($globalMap3D) && $globalMap3D) {
115
+	if (isset($globalMap3D) && $globalMap3D) {
116 116
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
117 117
 ?>
118 118
 	<li><a href="" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	<li><a href="" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
123 123
 <?php
124 124
 	}
125
-    }
125
+	}
126 126
 ?>
127 127
     </ul>
128 128
 
@@ -306,15 +306,15 @@  discard block
 block discarded – undo
306 306
 		    </div>
307 307
 		</li>
308 308
 		<?php
309
-		    if (isset($globalDemo) && $globalDemo) {
309
+			if (isset($globalDemo) && $globalDemo) {
310 310
 		?>
311 311
 		<li><button type="button" class="btn btn-primary disabled"><?php echo _("Show archive"); ?></button> Disabled in Demo mode</li>
312 312
 		<?php
313
-		    } else {
313
+			} else {
314 314
 		?>
315 315
 		<li><button type="button" onclick="addarchive(begindate,enddate);" class="btn btn-primary"><?php echo _("Show archive"); ?></button></li>
316 316
 		<?php
317
-		    }
317
+			}
318 318
 		?>
319 319
 	    </ul>
320 320
 	    <ul>
@@ -333,83 +333,83 @@  discard block
 block discarded – undo
333 333
 				if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
334 334
 					if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
335 335
 					else $MapType = $_COOKIE['MapType'];
336
-			    ?>
336
+				?>
337 337
 			<select  class="selectpicker" onchange="mapType(this);">
338 338
 			    <?php
339 339
 				} else {
340 340
 					if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') $MapType = $globalMapProvider;
341 341
 					else $MapType = $_COOKIE['MapType3D'];
342
-			    ?>
342
+				?>
343 343
 			<select  class="selectpicker" onchange="mapType3D(this);">
344 344
 			    <?php
345 345
 				}
346
-			    ?>
346
+				?>
347 347
 			    <?php
348 348
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
349
-			    ?>
349
+				?>
350 350
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
351 351
 			    <?php
352 352
 				} else {
353
-				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
354
-			    ?>
353
+					if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
354
+				?>
355 355
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
356 356
 			    <?php
357
-				    }
358
-			    ?>
357
+					}
358
+				?>
359 359
 			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
360 360
 			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
361 361
 			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') print ' selected'; ?>>ArcGIS Ocean</option>
362 362
 			    <?php
363
-				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
364
-			    ?>
363
+					if (isset($globalBingMapKey) && $globalBingMapKey != '') {
364
+				?>
365 365
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
366 366
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
367 367
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
368 368
 			    <?php
369
-				    }
370
-			    ?>
369
+					}
370
+				?>
371 371
 			    <?php
372
-				    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
373
-			    ?>
372
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
373
+				?>
374 374
 			    <?php
375 375
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
376
-			    ?>
376
+				?>
377 377
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
378 378
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
379 379
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
380 380
 			    <?php
381 381
 					}
382
-			    ?>
382
+				?>
383 383
 			    <?php
384 384
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
385
-			    ?>
385
+				?>
386 386
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
387 387
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
388 388
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
389 389
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
390 390
 			    <?php
391 391
 					}
392
-			    ?>
392
+				?>
393 393
 			    <?php
394 394
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
395
-			    ?>
395
+				?>
396 396
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
397 397
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
398 398
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
399 399
 			    <?php
400 400
 					}
401
-			    ?>
401
+				?>
402 402
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
403 403
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
404 404
 			    <?php
405
-				    }
406
-			    ?>
405
+					}
406
+				?>
407 407
 			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
408 408
 			    <?php
409
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
409
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
410 410
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
411 411
 					else $MapBoxId = $_COOKIE['MapTypeId'];
412
-			    ?>
412
+				?>
413 413
 			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
414 414
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
415 415
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
@@ -424,16 +424,16 @@  discard block
 block discarded – undo
424 424
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
425 425
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
426 426
 			    <?php
427
-				    }
428
-			    ?>
427
+					}
428
+				?>
429 429
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
430 430
 			    <?php
431 431
 				}
432
-			    ?>
432
+				?>
433 433
 			</select>
434 434
 		    </li>
435 435
 <?php
436
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
436
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
437 437
 ?>
438 438
 		    <li><?php echo _("Type of Terrain:"); ?>
439 439
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -444,18 +444,18 @@  discard block
 block discarded – undo
444 444
 			</select>
445 445
 		    </li>
446 446
 <?php
447
-    }
447
+	}
448 448
 ?>
449 449
 
450 450
 <?php
451
-    if (isset($globalMap3D) && $globalMap3D) {
451
+	if (isset($globalMap3D) && $globalMap3D) {
452 452
 ?>
453 453
 		    <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>
454 454
 <?php
455
-    }
455
+	}
456 456
 ?>
457 457
 <?php
458
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
458
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
459 459
 ?>
460 460
 		    <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>
461 461
 
@@ -478,12 +478,12 @@  discard block
 block discarded – undo
478 478
 		    <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>
479 479
 <?php
480 480
 	}
481
-    }
482
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
481
+	}
482
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
483 483
 ?>
484 484
 		    <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>
485 485
 <?php
486
-    }
486
+	}
487 487
 ?>
488 488
 		    <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>
489 489
 		    <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>
@@ -502,82 +502,82 @@  discard block
 block discarded – undo
502 502
 ?>
503 503
 		    <li><div class="checkbox"><label><input type="checkbox" name="truelight" value="1" onclick="clickTrueLight(this)" <?php if ((!isset($_COOKIE['truelight']) && (!isset($globalMapTrueLight) || $globalMapTrueLight)) || (isset($_COOKIE['truelight']) && $_COOKIE['truelight'] == 'true')) print 'checked'; ?> ><?php echo _("Enable globe sun lighting"); ?></label></div></li>
504 504
 <?php
505
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
505
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
506 506
 ?>
507 507
 		    <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>
508 508
 		    <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>
509 509
 		    <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>
510 510
 		    <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>
511 511
 <?php
512
-    }
513
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
512
+	}
513
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
514 514
 ?>
515 515
 		    <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li>
516 516
 <?php
517
-    }
517
+	}
518 518
 ?>
519 519
 		    <?php
520 520
 			if (function_exists('array_column')) {
521
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
522
-		    ?>
521
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
522
+			?>
523 523
 		    <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>
524 524
 		    <?php
525
-			    }
525
+				}
526 526
 			} elseif (isset($globalSources)) {
527
-			    $dispolar = false;
528
-			    foreach ($globalSources as $testsource) {
529
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
530
-			    }
531
-			    if ($dispolar) {
532
-		    ?>
527
+				$dispolar = false;
528
+				foreach ($globalSources as $testsource) {
529
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
530
+				}
531
+				if ($dispolar) {
532
+			?>
533 533
 		    <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>
534 534
 		    <?php
535
-			    }
536
-		        }
537
-		    ?>
535
+				}
536
+				}
537
+			?>
538 538
 <?php
539
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
539
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
540 540
 ?>
541 541
 
542 542
 		    <?php
543 543
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
544
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
545
-		    ?>
544
+					if (extension_loaded('gd') && function_exists('gd_info')) {
545
+			?>
546 546
 		    <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>
547 547
 		    <?php 
548 548
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
549
-		    ?>
549
+			?>
550 550
 			<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>
551 551
 		    <?php
552 552
 				}
553
-			    }
554
-		        }
555
-		    ?>
553
+				}
554
+				}
555
+			?>
556 556
 		    <?php
557 557
 			if (isset($globalMarine) && $globalMarine === TRUE) {
558
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
559
-		    ?>
558
+				if (extension_loaded('gd') && function_exists('gd_info')) {
559
+			?>
560 560
 		    <li><?php echo _("Marine icon color:"); ?>
561 561
 			<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'; ?>">
562 562
 		    </li>
563 563
 		    <?php
564
-			    }
565
-		        }
566
-		    ?>
564
+				}
565
+				}
566
+			?>
567 567
 		    <?php
568 568
 			if (isset($globalTracker) && $globalTracker === TRUE) {
569
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
570
-		    ?>
569
+				if (extension_loaded('gd') && function_exists('gd_info')) {
570
+			?>
571 571
 		    <li><?php echo _("Tracker icon color:"); ?>
572 572
 			<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'; ?>">
573 573
 		    </li>
574 574
 		    <?php
575
-			    }
576
-		        }
577
-		    ?>
575
+				}
576
+				}
577
+			?>
578 578
 		    <?php
579 579
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
580
-		    ?>
580
+			?>
581 581
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
582 582
 			<div class="range">
583 583
 			    <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'; ?>">
@@ -586,9 +586,9 @@  discard block
 block discarded – undo
586 586
 		    </li>
587 587
 		    <?php
588 588
 			}
589
-		    ?>
589
+			?>
590 590
 <?php
591
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
591
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
592 592
 ?>
593 593
 		    <li><?php echo _("Set scaling factor for rendering resolution:"); ?>
594 594
 			<div class="range">
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
 		    </li>
627 627
 <?php
628 628
 	}
629
-    }
629
+	}
630 630
 ?>
631 631
 		    <li><?php echo _("Distance unit:"); ?>
632 632
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -666,19 +666,19 @@  discard block
 block discarded – undo
666 666
 		    <ul>
667 667
 		    <?php
668 668
 			if (!isset($globalAircraft) || $globalAircraft) {
669
-		    ?>
669
+			?>
670 670
 		    <?php
671 671
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
672
-		    ?>
672
+			?>
673 673
 			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
674 674
 			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
675 675
 			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
676 676
 		    <?php
677 677
 			}
678
-		    ?>
678
+			?>
679 679
 		    <?php
680 680
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
681
-		    ?>
681
+			?>
682 682
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
683 683
 			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
684 684
 			<?php } ?>
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
 			<li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') print 'checked'; ?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li>
689 689
 		    <?php
690 690
 			}
691
-		    ?>
691
+			?>
692 692
 		    <li><?php echo _("Display airlines:"); ?>
693 693
 		    <br/>
694 694
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -708,14 +708,14 @@  discard block
 block discarded – undo
708 708
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
709 709
 					}
710 710
 				}
711
-			    ?>
711
+				?>
712 712
 			</select>
713 713
 		    </li>
714 714
 		    <?php
715 715
 			$Spotter = new Spotter();
716 716
 			$allalliancenames = $Spotter->getAllAllianceNames();
717 717
 			if (!empty($allalliancenames)) {
718
-		    ?>
718
+			?>
719 719
 		    <li><?php echo _("Display alliance:"); ?>
720 720
 		    <br/>
721 721
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -729,18 +729,18 @@  discard block
 block discarded – undo
729 729
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
730 730
 					}
731 731
 				}
732
-			    ?>
732
+				?>
733 733
 			</select>
734 734
 		    </li>
735 735
 		    <?php
736 736
 			}
737
-		    ?>
737
+			?>
738 738
 		    <?php
739 739
 			}
740
-		    ?>
740
+			?>
741 741
 		    <?php
742 742
 			if (isset($globalAPRS) && $globalAPRS) {
743
-		    ?>
743
+			?>
744 744
 		    <li><?php echo _("Display APRS sources name:"); ?>
745 745
 			<select class="selectpicker" multiple onchange="sources(this);">
746 746
 			    <?php
@@ -764,18 +764,18 @@  discard block
 block discarded – undo
764 764
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
765 765
 					}
766 766
 				}
767
-			    ?>
767
+				?>
768 768
 			</select>
769 769
 		    </li>
770 770
 		    <?php
771 771
 			}
772
-		    ?>
772
+			?>
773 773
 		    <?php
774 774
 			if (!isset($globalAircraft) || $globalAircraft) {
775
-		    ?>
775
+			?>
776 776
 		    <?php
777
-			    if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
778
-		    ?>
777
+				if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
778
+			?>
779 779
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
780 780
 			<select class="selectpicker" onchange="airlinestype(this);">
781 781
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -785,14 +785,14 @@  discard block
 block discarded – undo
785 785
 			</select>
786 786
 		    </li>
787 787
 		    <?php
788
-			    }
789
-		    ?>
788
+				}
789
+			?>
790 790
 		    <?php
791 791
 			}
792
-		    ?>
792
+			?>
793 793
 		    <?php
794 794
 			if (isset($globalMarine) && $globalMarine) {
795
-		    ?>
795
+			?>
796 796
 		    <li>
797 797
 			<?php echo _("Display vessels with MMSI:"); ?>
798 798
 			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
@@ -815,7 +815,7 @@  discard block
 block discarded – undo
815 815
 								print '<option value="'.$race['race_id'].'">'.$race['race_name'].'</option>';
816 816
 							}
817 817
 						}
818
-			    ?>
818
+				?>
819 819
 			</select>
820 820
 		    </li>
821 821
 
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 					}
824 824
 				}
825 825
 			}
826
-		    ?>
826
+			?>
827 827
 		    <li>
828 828
 			<?php echo _("Display with ident:"); ?>
829 829
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
 	    </form>
837 837
     	</div>
838 838
 <?php
839
-    if (isset($globalSatellite) && $globalSatellite) {
839
+	if (isset($globalSatellite) && $globalSatellite) {
840 840
 ?>
841 841
         <div class="sidebar-pane" id="satellites">
842 842
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -876,14 +876,14 @@  discard block
 block discarded – undo
876 876
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
877 877
 					}
878 878
 				}
879
-			    ?>
879
+				?>
880 880
 			</select>
881 881
 		    </li>
882 882
 		</ul>
883 883
 	    </form>
884 884
 	</div>
885 885
 <?php
886
-    }
886
+	}
887 887
 ?>
888 888
     </div>
889 889
 </div>
Please login to merge, or discard this patch.
Braces   +598 added lines, -151 removed lines patch added patch discarded remove patch
@@ -57,7 +57,10 @@  discard block
 block discarded – undo
57 57
 <?php
58 58
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
59 59
 ?>
60
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
60
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
61
+	print '?tsk='.$tsk;
62
+}
63
+?>"></script>
61 64
 <script src="<?php echo $globalURL; ?>/js/meuusjs.1.0.3.min.js"></script>
62 65
 <script src="<?php echo $globalURL; ?>/js/map.3d.weather.js"></script>
63 66
 <?php
@@ -137,10 +140,22 @@  discard block
 block discarded – undo
137 140
 			<h1>Weather</h1>
138 141
 			<ul>
139 142
 			
140
-				<li><div class="checkbox"><label><input type="checkbox" name="wind" value="1" onclick="clickWind(this);" <?php if (isset($_COOKIE['weather_wind']) && $_COOKIE['weather_wind'] == 'true') print 'checked'; ?> /><?php echo _("Weather Winds"); ?></label></div></li>
141
-				<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 _("Ocean surface currents"); ?></label></div></li>
142
-				<li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li>
143
-				<!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') print 'checked'; ?> /><?php echo _("Weather Waves height background"); ?></label></div></li> -->
143
+				<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') {
144
+	print 'checked';
145
+}
146
+?> /><?php echo _("Weather Winds"); ?></label></div></li>
147
+				<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') {
148
+	print 'checked';
149
+}
150
+?> /><?php echo _("Ocean surface currents"); ?></label></div></li>
151
+				<li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') {
152
+	print 'checked';
153
+}
154
+?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li>
155
+				<!-- <li><div class="checkbox"><label><input type="checkbox" name="backwave" value="1" onclick="clickBackWave(this);" <?php if (isset($_COOKIE['weather_backwave']) && $_COOKIE['weather_backwave'] == 'true') {
156
+	print 'checked';
157
+}
158
+?> /><?php echo _("Weather Waves height background"); ?></label></div></li> -->
144 159
 			
145 160
 <?php
146 161
 		if (isset($globalOpenWeatherMapKey) && $globalOpenWeatherMapKey != '') {
@@ -162,12 +177,18 @@  discard block
 block discarded – undo
162 177
 <?php
163 178
 		if (isset($globalMETAR) && isset($globalMETARcycle) && $globalMETAR && $globalMETARcycle) {
164 179
 ?>
165
-				<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 3D weather"); ?></label></div></li>
180
+				<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))) {
181
+	print 'checked';
182
+}
183
+?> ><?php echo _("Display 3D weather"); ?></label></div></li>
166 184
 			<!--	<li><div class="checkbox"><label><input type="checkbox" name="displayrain" value="1" onclick="clickDisplayRain(this)" ><?php echo _("Display rain on 3D map"); ?></label></div></li>-->
167 185
 <?php
168 186
 		}
169 187
 ?>
170
-				<li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') print 'checked'; ?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li>
188
+				<li><div class="checkbox"><label><input type="checkbox" name="fire" value="1" onclick="clickFire(this);" <?php if (isset($_COOKIE['weather_fire']) && $_COOKIE['weather_fire'] == 'true') {
189
+	print 'checked';
190
+}
191
+?> /><?php echo _("NASA Fire Hotspots"); ?></label></div></li>
171 192
 			</ul>
172 193
 <?php
173 194
 	}
@@ -183,13 +204,22 @@  discard block
 block discarded – undo
183 204
 <?php
184 205
 		if (!isset($globalAircraft) || $globalAircraft) {
185 206
 ?>
186
-				<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>
187
-				<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>
207
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
208
+	print 'checked';
209
+}
210
+?> /><?php echo _("Display waypoints"); ?></label></div></li>
211
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
212
+	print 'checked';
213
+}
214
+?> /><?php echo _("Display airspace"); ?></label></div></li>
188 215
 <?php
189 216
 		}
190 217
 		if (isset($globalMarine) && $globalMarine) {
191 218
 ?>
192
-				<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>
219
+				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') {
220
+	print 'checked';
221
+}
222
+?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
193 223
 <?php
194 224
 		}
195 225
 ?>
@@ -204,13 +234,22 @@  discard block
 block discarded – undo
204 234
 <?php
205 235
 		if (!isset($globalAircraft) || $globalAircraft) {
206 236
 ?>
207
-				<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>
208
-				<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>
237
+				<li><div class="checkbox"><label><input type="checkbox" name="waypoints" value="1" onclick="showWaypoints(this);" <?php if (isset($_COOKIE['waypoints']) && $_COOKIE['waypoints'] == 'true') {
238
+	print 'checked';
239
+}
240
+?> /><?php echo _("Display waypoints"); ?> Beta</label></div></li>
241
+				<li><div class="checkbox"><label><input type="checkbox" name="airspace" value="1" onclick="showAirspace(this);" <?php if (isset($_COOKIE['airspace']) && $_COOKIE['airspace'] == 'true') {
242
+	print 'checked';
243
+}
244
+?> /><?php echo _("Display airspace"); ?> Beta</label></div></li>
209 245
 <?php
210 246
 		}
211 247
 		if (isset($globalMarine) && $globalMarine) {
212 248
 ?>
213
-				<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>
249
+				<li><div class="checkbox"><label><input type="checkbox" name="openseamap" value="1" onclick="clickOpenSeaMap(this);" <?php if (isset($_COOKIE['openseamap']) && $_COOKIE['openseamap'] == 'true') {
250
+	print 'checked';
251
+}
252
+?> /><?php echo _("Display OpenSeaMap"); ?></label></div></li>
214 253
 <?php
215 254
 		}
216 255
 ?>
@@ -225,14 +264,32 @@  discard block
 block discarded – undo
225 264
 		<h1>NOTAM</h1>
226 265
 		<form>
227 266
 			<ul>
228
-				<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>
267
+				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam(this);" <?php if (isset($_COOKIE['notam']) && $_COOKIE['notam'] == 'true') {
268
+	print 'checked';
269
+}
270
+?> /><?php echo _("Display NOTAM"); ?></label></div></li>
229 271
 				<li><?php echo _("NOTAM scope:"); ?>
230 272
 					<select class="selectpicker" onchange="notamscope(this);">
231
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
232
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
233
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
234
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
235
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
273
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
274
+	print ' selected';
275
+}
276
+?>>All</option>
277
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
278
+	print ' selected';
279
+}
280
+?>>Airport/Enroute warning</option>
281
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
282
+	print ' selected';
283
+}
284
+?>>Airport warning</option>
285
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
286
+	print ' selected';
287
+}
288
+?>>Navigation warning</option>
289
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
290
+	print ' selected';
291
+}
292
+?>>Enroute warning</option>
236 293
 					</select
237 294
 				</li>
238 295
 			</ul>
@@ -260,7 +317,10 @@  discard block
 block discarded – undo
260 317
 		    <div class="form-group">
261 318
 			<label><?php echo _("From:"); ?></label>
262 319
 			<div class='input-group date' id='datetimepicker1'>
263
-			    <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 />
320
+			    <input type='text' id="start_date" name="start_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_begin']) && $_COOKIE['archive_begin'] != '') {
321
+	print date("Y-m-d H:i",$_COOKIE['archive_begin']).' UTC';
322
+}
323
+?>" required />
264 324
 			    <span class="input-group-addon">
265 325
 				<span class="glyphicon glyphicon-calendar"></span>
266 326
 			    </span>
@@ -269,7 +329,10 @@  discard block
 block discarded – undo
269 329
 		    <div class="form-group">
270 330
 			<label><?php echo _("To:"); ?></label>
271 331
 			<div class='input-group date' id='datetimepicker2'>
272
-			    <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'; ?>" />
332
+			    <input type='text' id="end_date" name="end_date" class="form-control" autocomplete="off" value="<?php if (isset($_COOKIE['archive_end']) && $_COOKIE['archive_end'] != '') {
333
+	print date("Y-m-d H:i",$_COOKIE['archive_end']).' UTC';
334
+}
335
+?>" />
273 336
 			    <span class="input-group-addon">
274 337
 				<span class="glyphicon glyphicon-calendar"></span>
275 338
 			    </span>
@@ -301,8 +364,20 @@  discard block
 block discarded – undo
301 364
 		    </script>
302 365
 		<li><?php echo _("Playback speed:"); ?>
303 366
 		    <div class="range">
304
-			<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'; ?>">
305
-			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
367
+			<input type="range" min="0" max="50" step="1" id="archivespeed" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
368
+	print $_POST['archivespeed'];
369
+} elseif (isset($_COOKIE['archive_speed'])) {
370
+	print $_COOKIE['archive_speed'];
371
+} else {
372
+	print '1';
373
+}
374
+?>">
375
+			<output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
376
+	print $_COOKIE['archive_speed'];
377
+} else {
378
+	print '1';
379
+}
380
+?></output>
306 381
 		    </div>
307 382
 		</li>
308 383
 		<?php
@@ -331,14 +406,20 @@  discard block
 block discarded – undo
331 406
 		    <li><?php echo _("Type of Map:"); ?>
332 407
 			    <?php
333 408
 				if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
334
-					if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
335
-					else $MapType = $_COOKIE['MapType'];
409
+					if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
410
+						$MapType = $globalMapProvider;
411
+					} else {
412
+						$MapType = $_COOKIE['MapType'];
413
+					}
336 414
 			    ?>
337 415
 			<select  class="selectpicker" onchange="mapType(this);">
338 416
 			    <?php
339 417
 				} else {
340
-					if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') $MapType = $globalMapProvider;
341
-					else $MapType = $_COOKIE['MapType3D'];
418
+					if (!isset($_COOKIE['MapType3D']) || $_COOKIE['MapType3D'] == '') {
419
+						$MapType = $globalMapProvider;
420
+					} else {
421
+						$MapType = $_COOKIE['MapType3D'];
422
+					}
342 423
 			    ?>
343 424
 			<select  class="selectpicker" onchange="mapType3D(this);">
344 425
 			    <?php
@@ -347,24 +428,48 @@  discard block
 block discarded – undo
347 428
 			    <?php
348 429
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
349 430
 			    ?>
350
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
431
+			    <option value="offline"<?php if ($MapType == 'offline') {
432
+	print ' selected';
433
+}
434
+?>>Natural Earth (local)</option>
351 435
 			    <?php
352 436
 				} else {
353 437
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
354 438
 			    ?>
355
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
439
+			    <option value="offline"<?php if ($MapType == 'offline') {
440
+	print ' selected';
441
+}
442
+?>>Natural Earth (local)</option>
356 443
 			    <?php
357 444
 				    }
358 445
 			    ?>
359
-			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') print ' selected'; ?>>ArcGIS Streetmap</option>
360
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') print ' selected'; ?>>ArcGIS Satellite</option>
361
-			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') print ' selected'; ?>>ArcGIS Ocean</option>
446
+			    <option value="ArcGIS-Streetmap"<?php if ($MapType == 'ArcGIS-Streetmap') {
447
+	print ' selected';
448
+}
449
+?>>ArcGIS Streetmap</option>
450
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Satellite') {
451
+	print ' selected';
452
+}
453
+?>>ArcGIS Satellite</option>
454
+			    <option value="ArcGIS-Satellite"<?php if ($MapType == 'ArcGIS-Ocean') {
455
+	print ' selected';
456
+}
457
+?>>ArcGIS Ocean</option>
362 458
 			    <?php
363 459
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
364 460
 			    ?>
365
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
366
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
367
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
461
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
462
+	print ' selected';
463
+}
464
+?>>Bing-Aerial</option>
465
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
466
+	print ' selected';
467
+}
468
+?>>Bing-Hybrid</option>
469
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
470
+	print ' selected';
471
+}
472
+?>>Bing-Road</option>
368 473
 			    <?php
369 474
 				    }
370 475
 			    ?>
@@ -374,59 +479,143 @@  discard block
 block discarded – undo
374 479
 			    <?php
375 480
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
376 481
 			    ?>
377
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
378
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
379
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
482
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
483
+	print ' selected';
484
+}
485
+?>>Here-Aerial</option>
486
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
487
+	print ' selected';
488
+}
489
+?>>Here-Hybrid</option>
490
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
491
+	print ' selected';
492
+}
493
+?>>Here-Road</option>
380 494
 			    <?php
381 495
 					}
382 496
 			    ?>
383 497
 			    <?php
384 498
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
385 499
 			    ?>
386
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
387
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
388
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
389
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
500
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
501
+	print ' selected';
502
+}
503
+?>>Google Roadmap</option>
504
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
505
+	print ' selected';
506
+}
507
+?>>Google Satellite</option>
508
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
509
+	print ' selected';
510
+}
511
+?>>Google Hybrid</option>
512
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
513
+	print ' selected';
514
+}
515
+?>>Google Terrain</option>
390 516
 			    <?php
391 517
 					}
392 518
 			    ?>
393 519
 			    <?php
394 520
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
395 521
 			    ?>
396
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
397
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
398
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
522
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
523
+	print ' selected';
524
+}
525
+?>>MapQuest-OSM</option>
526
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
527
+	print ' selected';
528
+}
529
+?>>MapQuest-Aerial</option>
530
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
531
+	print ' selected';
532
+}
533
+?>>MapQuest-Hybrid</option>
399 534
 			    <?php
400 535
 					}
401 536
 			    ?>
402
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
403
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
537
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
538
+	print ' selected';
539
+}
540
+?>>Yandex</option>
541
+			    <option value="offline"<?php if ($MapType == 'offline') {
542
+	print ' selected';
543
+}
544
+?>>Natural Earth</option>
404 545
 			    <?php
405 546
 				    }
406 547
 			    ?>
407
-			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') print ' selected'; ?>>National Geographic Street</option>
548
+			    <option value="NatGeo-Street"<?php if ($MapType == 'NatGeo-Street') {
549
+	print ' selected';
550
+}
551
+?>>National Geographic Street</option>
408 552
 			    <?php
409 553
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
410
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
411
-					else $MapBoxId = $_COOKIE['MapTypeId'];
554
+					if (!isset($_COOKIE['MapTypeId'])) {
555
+						$MapBoxId = 'default';
556
+					} else {
557
+						$MapBoxId = $_COOKIE['MapTypeId'];
558
+					}
412 559
 			    ?>
413
-			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option>
414
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
415
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
416
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
417
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
418
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
419
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
420
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
421
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
422
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
423
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
424
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
425
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
560
+			    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
561
+	print ' selected';
562
+}
563
+?>>Mapbox GL</option>
564
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
565
+	print ' selected';
566
+}
567
+?>>Mapbox default</option>
568
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
569
+	print ' selected';
570
+}
571
+?>>Mapbox streets</option>
572
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
573
+	print ' selected';
574
+}
575
+?>>Mapbox light</option>
576
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
577
+	print ' selected';
578
+}
579
+?>>Mapbox dark</option>
580
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
581
+	print ' selected';
582
+}
583
+?>>Mapbox satellite</option>
584
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
585
+	print ' selected';
586
+}
587
+?>>Mapbox streets-satellite</option>
588
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
589
+	print ' selected';
590
+}
591
+?>>Mapbox streets-basic</option>
592
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
593
+	print ' selected';
594
+}
595
+?>>Mapbox comic</option>
596
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
597
+	print ' selected';
598
+}
599
+?>>Mapbox outdoors</option>
600
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
601
+	print ' selected';
602
+}
603
+?>>Mapbox pencil</option>
604
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
605
+	print ' selected';
606
+}
607
+?>>Mapbox pirates</option>
608
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
609
+	print ' selected';
610
+}
611
+?>>Mapbox emerald</option>
426 612
 			    <?php
427 613
 				    }
428 614
 			    ?>
429
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
615
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
616
+	print ' selected';
617
+}
618
+?>>OpenStreetMap</option>
430 619
 			    <?php
431 620
 				}
432 621
 			    ?>
@@ -437,10 +626,22 @@  discard block
 block discarded – undo
437 626
 ?>
438 627
 		    <li><?php echo _("Type of Terrain:"); ?>
439 628
 			<select  class="selectpicker" onchange="terrainType(this);">
440
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
441
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
442
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
443
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
629
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
630
+	print ' selected';
631
+}
632
+?>>stk terrain</option>
633
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
634
+	print ' selected';
635
+}
636
+?>>ellipsoid</option>
637
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
638
+	print ' selected';
639
+}
640
+?>>vr terrain</option>
641
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
642
+	print ' selected';
643
+}
644
+?>>ArticDEM</option>
444 645
 			</select>
445 646
 		    </li>
446 647
 <?php
@@ -450,64 +651,124 @@  discard block
 block discarded – undo
450 651
 <?php
451 652
     if (isset($globalMap3D) && $globalMap3D) {
452 653
 ?>
453
-		    <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>
654
+		    <li><div class="checkbox"><label><input type="checkbox" name="synchro2d3d" value="1" onclick="clickSyncMap2D3D(this)" <?php if (isset($_COOKIE['Map2D3DSync']) && $_COOKIE['Map2D3DSync'] == 'true') {
655
+	print 'checked';
656
+}
657
+?> ><?php echo _("Use same type of map for 2D & 3D"); ?></label></div></li>
454 658
 <?php
455 659
     }
456 660
 ?>
457 661
 <?php
458 662
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
459 663
 ?>
460
-		    <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>
664
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if (isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') {
665
+	print 'checked';
666
+}
667
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
461 668
 
462 669
 <?php
463 670
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
464 671
 ?>
465
-		    <!--<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>-->
466
-		    <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>
467
-		    <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>
468
-		    <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>
469
-		    <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>
672
+		    <!--<li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
673
+	print 'checked';
674
+}
675
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>-->
676
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
677
+	print 'checked';
678
+}
679
+?> ><?php echo _("Display flight path"); ?></label></div></li>
680
+		    <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)) {
681
+	print 'checked';
682
+}
683
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
684
+		    <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)) {
685
+	print 'checked';
686
+}
687
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
688
+		    <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)) {
689
+	print 'checked';
690
+}
691
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
470 692
 <?php
471 693
 	} elseif (!isset($globalTracker) || $globalTracker === TRUE) {
472 694
 ?>
473
-		    <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>
695
+		    <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)) {
696
+	print 'checked';
697
+}
698
+?> ><?php echo _("Enable map matching"); ?></label></div></li>
474 699
 <?php
475 700
 	}
476 701
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
477 702
 ?>
478
-		    <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>
703
+		    <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)) {
704
+	print 'checked';
705
+}
706
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
479 707
 <?php
480 708
 	}
481 709
     }
482 710
     if (!isset($globalAircraft) || $globalAircraft === TRUE) {
483 711
 ?>
484
-		    <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>
712
+		    <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'])) {
713
+	print 'checked';
714
+}
715
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
485 716
 <?php
486 717
     }
487 718
 ?>
488
-		    <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>
489
-		    <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>
490
-		    <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>
719
+		    <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))) {
720
+	print 'checked';
721
+}
722
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
723
+		    <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))) {
724
+	print 'checked';
725
+}
726
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
727
+		    <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))) {
728
+	print 'checked';
729
+}
730
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
491 731
 <?php
492 732
 	if (isset($globalFires) && $globalFires) {
493 733
 ?>
494
-		    <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>
734
+		    <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))) {
735
+	print 'checked';
736
+}
737
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
495 738
 <?php
496 739
 	}
497 740
 	if (isset($globalMap3D) && $globalMap3D) {
498 741
 ?>
499
-		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) print 'checked'; ?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
742
+		    <li><div class="checkbox"><label><input type="checkbox" name="singlemodel" value="1" onclick="clickSingleModel(this)" <?php if ((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') || (!isset($_COOKIE['singlemodel']) && isset($globalMap3DSelected) && $globalMap3DSelected)) {
743
+	print 'checked';
744
+}
745
+?> ><?php echo _("Only display selected flight on 3D mode"); ?></label></div></li>
500 746
 <?php
501 747
 	}
502 748
 ?>
503
-		    <li><div class="checkbox"><label><input type="checkbox" name="truelight" value="1" onclick="clickTrueLight(this)" <?php if ((!isset($_COOKIE['truelight']) && (!isset($globalMapTrueLight) || $globalMapTrueLight)) || (isset($_COOKIE['truelight']) && $_COOKIE['truelight'] == 'true')) print 'checked'; ?> ><?php echo _("Enable globe sun lighting"); ?></label></div></li>
749
+		    <li><div class="checkbox"><label><input type="checkbox" name="truelight" value="1" onclick="clickTrueLight(this)" <?php if ((!isset($_COOKIE['truelight']) && (!isset($globalMapTrueLight) || $globalMapTrueLight)) || (isset($_COOKIE['truelight']) && $_COOKIE['truelight'] == 'true')) {
750
+	print 'checked';
751
+}
752
+?> ><?php echo _("Enable globe sun lighting"); ?></label></div></li>
504 753
 <?php
505 754
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
506 755
 ?>
507
-		    <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>
508
-		    <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>
509
-		    <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>
510
-		    <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>
756
+		    <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')) {
757
+	print 'checked';
758
+}
759
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
760
+		    <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')) {
761
+	print 'checked';
762
+}
763
+?> ><?php echo _("Use shadows"); ?></label></div></li>
764
+		    <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)) {
765
+	print 'checked';
766
+}
767
+?> ><?php echo _("Use same 3D model for all aircraft (use fewer resources)"); ?></label></div></li>
768
+		    <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'])) {
769
+	print 'checked';
770
+}
771
+?> ><?php echo _("Display realtime data in infobox"); ?></label></div></li>
511 772
 <?php
512 773
     }
513 774
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -520,17 +781,25 @@  discard block
 block discarded – undo
520 781
 			if (function_exists('array_column')) {
521 782
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
522 783
 		    ?>
523
-		    <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>
784
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
785
+	print 'checked';
786
+}
787
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
524 788
 		    <?php
525 789
 			    }
526 790
 			} elseif (isset($globalSources)) {
527 791
 			    $dispolar = false;
528 792
 			    foreach ($globalSources as $testsource) {
529
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
793
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
794
+			        	$dispolar = true;
795
+			        }
530 796
 			    }
531 797
 			    if ($dispolar) {
532 798
 		    ?>
533
-		    <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>
799
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
800
+	print 'checked';
801
+}
802
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
534 803
 		    <?php
535 804
 			    }
536 805
 		        }
@@ -543,11 +812,21 @@  discard block
 block discarded – undo
543 812
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
544 813
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
545 814
 		    ?>
546
-		    <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>
815
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
816
+	print 'checked';
817
+}
818
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
547 819
 		    <?php 
548 820
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
549 821
 		    ?>
550
-			<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>
822
+			<li><?php echo _("Aircraft icon color:"); ?><input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
823
+	print $_COOKIE['IconColor'];
824
+} elseif (isset($globalAircraftIconColor)) {
825
+	print $globalAircraftIconColor;
826
+} else {
827
+	print '1a3151';
828
+}
829
+?>"></li>
551 830
 		    <?php
552 831
 				}
553 832
 			    }
@@ -558,7 +837,14 @@  discard block
 block discarded – undo
558 837
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
559 838
 		    ?>
560 839
 		    <li><?php echo _("Marine icon color:"); ?>
561
-			<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'; ?>">
840
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
841
+	print $_COOKIE['MarineIconColor'];
842
+} elseif (isset($globalMarineIconColor)) {
843
+	print $globalMarineIconColor;
844
+} else {
845
+	print '1a3151';
846
+}
847
+?>">
562 848
 		    </li>
563 849
 		    <?php
564 850
 			    }
@@ -569,7 +855,14 @@  discard block
 block discarded – undo
569 855
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
570 856
 		    ?>
571 857
 		    <li><?php echo _("Tracker icon color:"); ?>
572
-			<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'; ?>">
858
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
859
+	print $_COOKIE['TrackerIconColor'];
860
+} elseif (isset($globalTrackerIconColor)) {
861
+	print $globalTrackerIconColor;
862
+} else {
863
+	print '1a3151';
864
+}
865
+?>">
573 866
 		    </li>
574 867
 		    <?php
575 868
 			    }
@@ -580,8 +873,22 @@  discard block
 block discarded – undo
580 873
 		    ?>
581 874
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
582 875
 			<div class="range">
583
-			    <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'; ?>">
584
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
876
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
877
+	print $_COOKIE['AirportZoom'];
878
+} elseif (isset($globalAirportZoom)) {
879
+	print $globalAirportZoom;
880
+} else {
881
+	print '7';
882
+}
883
+?>">
884
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
885
+	print $_COOKIE['AirportZoom'];
886
+} elseif (isset($globalAirportZoom)) {
887
+	print $globalAirportZoom;
888
+} else {
889
+	print '7';
890
+}
891
+?></output>
585 892
 			</div>
586 893
 		    </li>
587 894
 		    <?php
@@ -592,17 +899,40 @@  discard block
 block discarded – undo
592 899
 ?>
593 900
 		    <li><?php echo _("Set scaling factor for rendering resolution:"); ?>
594 901
 			<div class="range">
595
-			    <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'; ?>">
596
-			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) print $_COOKIE['resolutionScale']; else print '1'; ?></output>
902
+			    <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'])) {
903
+	print $_COOKIE['resolutionScale'];
904
+} else {
905
+	print '1';
906
+}
907
+?>">
908
+			    <output id="scale"><?php if (isset($_COOKIE['resolutionScale'])) {
909
+	print $_COOKIE['resolutionScale'];
910
+} else {
911
+	print '1';
912
+}
913
+?></output>
597 914
 			</div>
598 915
 		    </li>
599 916
 <?php
600 917
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
601 918
 ?>
602
-		    <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>
603
-		    <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;
919
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
920
+	print 'checked';
921
+}
922
+?> > <?php echo _("Use airlines liveries"); ?></li>
923
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
924
+	print 'checked';
925
+}
926
+?> > <?php echo _("Force Aircraft color"); ?>&nbsp;
604 927
 		    <!--<li><?php echo _("Aircraft icon color:"); ?>-->
605
-			<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'; ?>">
928
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
929
+	print $_COOKIE['IconColor'];
930
+} elseif (isset($globalAircraftIconColor)) {
931
+	print $globalAircraftIconColor;
932
+} else {
933
+	print 'ff0000';
934
+}
935
+?>">
606 936
 		    </li>
607 937
 <?php
608 938
 	}
@@ -610,9 +940,19 @@  discard block
 block discarded – undo
610 940
 <?php
611 941
 	if (isset($globalMarine) && $globalMarine === TRUE) {
612 942
 ?>
613
-		    <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;
943
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
944
+	print 'checked';
945
+}
946
+?> ><?php echo _("Force Marine color"); ?>&nbsp;
614 947
 		    <!--<li><?php echo _("Marine icon color:"); ?>-->
615
-			<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'; ?>">
948
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
949
+	print $_COOKIE['MarineIconColor'];
950
+} elseif (isset($globalMarineIconColor)) {
951
+	print $globalMarineIconColor;
952
+} else {
953
+	print 'ff0000';
954
+}
955
+?>">
616 956
 		    </li>
617 957
 <?php
618 958
 	}
@@ -620,9 +960,19 @@  discard block
 block discarded – undo
620 960
 <?php
621 961
 	if (isset($globalTracker) && $globalTracker === TRUE) {
622 962
 ?>
623
-		    <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;
963
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
964
+	print 'checked';
965
+}
966
+?> ><?php echo _("Force Tracker color"); ?>&nbsp;
624 967
 		    <!--<li><?php echo _("Tracker icon color:"); ?>-->
625
-			<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'; ?>">
968
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
969
+	print $_COOKIE['TrackerIconColor'];
970
+} elseif (isset($globalTrackerIconColor)) {
971
+	print $globalTrackerIconColor;
972
+} else {
973
+	print 'ff0000';
974
+}
975
+?>">
626 976
 		    </li>
627 977
 <?php
628 978
 	}
@@ -630,29 +980,62 @@  discard block
 block discarded – undo
630 980
 ?>
631 981
 		    <li><?php echo _("Distance unit:"); ?>
632 982
 			<select class="selectpicker" onchange="unitdistance(this);">
633
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
634
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
635
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
983
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
984
+	echo ' selected';
985
+}
986
+?>>km</option>
987
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
988
+	echo ' selected';
989
+}
990
+?>>nm</option>
991
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
992
+	echo ' selected';
993
+}
994
+?>>mi</option>
636 995
 		        </select>
637 996
 		    </li>
638 997
 		    <li><?php echo _("Altitude unit:"); ?>
639 998
 			<select class="selectpicker" onchange="unitaltitude(this);">
640
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
641
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
999
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
1000
+	echo ' selected';
1001
+}
1002
+?>>m</option>
1003
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
1004
+	echo ' selected';
1005
+}
1006
+?>>feet</option>
642 1007
 		        </select>
643 1008
 		    </li>
644 1009
 		    <li><?php echo _("Speed unit:"); ?>
645 1010
 			<select class="selectpicker" onchange="unitspeed(this);">
646
-			    <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>
647
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
648
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
1011
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
1012
+	echo ' selected';
1013
+}
1014
+?>>km/h</option>
1015
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
1016
+	echo ' selected';
1017
+}
1018
+?>>mph</option>
1019
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
1020
+	echo ' selected';
1021
+}
1022
+?>>knots</option>
649 1023
 		        </select>
650 1024
 		    </li>
651 1025
 		    <li><?php echo _("Coordinate unit:"); ?>
652 1026
 			<select class="selectpicker" onchange="unitcoordinate(this);">
653
-			    <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) echo ' selected'; ?>>DD</option>
654
-			    <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) echo ' selected'; ?>>DMS</option>
655
-			    <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) echo ' selected'; ?>>DM</option>
1027
+			    <option value="dd"<?php if ((!isset($_COOKIE['unitcoordinate']) && (!isset($globalUnitCoordinate) || (isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dd'))) || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dd')) {
1028
+	echo ' selected';
1029
+}
1030
+?>>DD</option>
1031
+			    <option value="dms"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dms') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dms')) {
1032
+	echo ' selected';
1033
+}
1034
+?>>DMS</option>
1035
+			    <option value="dm"<?php if ((!isset($_COOKIE['unitcoordinate']) && isset($globalUnitCoordinate) && $globalUnitCoordinate == 'dm') || (isset($_COOKIE['unitcoordinate']) && $_COOKIE['unitcoordinate'] == 'dm')) {
1036
+	echo ' selected';
1037
+}
1038
+?>>DM</option>
656 1039
 		        </select>
657 1040
 		    </li>
658 1041
 
@@ -670,9 +1053,18 @@  discard block
 block discarded – undo
670 1053
 		    <?php
671 1054
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
672 1055
 		    ?>
673
-			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
674
-			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
675
-			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
1056
+			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') || !isset($_COOKIE['filter_ShowVATSIM'])) {
1057
+	print 'checked';
1058
+}
1059
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
1060
+			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') || !isset($_COOKIE['filter_ShowIVAO'])) {
1061
+	print 'checked';
1062
+}
1063
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
1064
+			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') || !isset($_COOKIE['filter_ShowVMS'])) {
1065
+	print 'checked';
1066
+}
1067
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
676 1068
 		    <?php
677 1069
 			}
678 1070
 		    ?>
@@ -680,12 +1072,21 @@  discard block
 block discarded – undo
680 1072
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
681 1073
 		    ?>
682 1074
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
683
-			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
1075
+			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') || !isset($_COOKIE['filter_ShowSBS1'])) {
1076
+	print 'checked';
1077
+}
1078
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
684 1079
 			<?php } ?>
685 1080
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
686
-			    <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li>
1081
+			    <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') || !isset($_COOKIE['filter_ShowAPRS'])) {
1082
+	print 'checked';
1083
+}
1084
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
687 1085
 			<?php } ?>
688
-			<li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') print 'checked'; ?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li>
1086
+			<li><div class="checkbox"><label><input type="checkbox" name="blocked" value="1" onclick="clickBlocked(this)" <?php if (isset($_COOKIE['filter_blocked']) && $_COOKIE['filter_blocked'] == 'true') {
1087
+	print 'checked';
1088
+}
1089
+?> ><?php echo _("Only display FAA ASDI blocked aircrafts"); ?></label></div></li>
689 1090
 		    <?php
690 1091
 			}
691 1092
 		    ?>
@@ -701,7 +1102,9 @@  discard block
 block discarded – undo
701 1102
 				}
702 1103
 				foreach($allairlinenames as $airline) {
703 1104
 					$airline_name = $airline['airline_name'];
704
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
1105
+					if (strlen($airline_name) > 30) {
1106
+						$airline_name = substr($airline_name,0,30).'...';
1107
+					}
705 1108
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
706 1109
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
707 1110
 					} else {
@@ -719,7 +1122,10 @@  discard block
 block discarded – undo
719 1122
 		    <li><?php echo _("Display alliance:"); ?>
720 1123
 		    <br/>
721 1124
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
722
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
1125
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
1126
+	echo ' selected';
1127
+}
1128
+?>><?php echo _("All"); ?></option>
723 1129
 			    <?php
724 1130
 				foreach($allalliancenames as $alliance) {
725 1131
 					$alliance_name = $alliance['alliance'];
@@ -778,10 +1184,22 @@  discard block
 block discarded – undo
778 1184
 		    ?>
779 1185
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
780 1186
 			<select class="selectpicker" onchange="airlinestype(this);">
781
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
782
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
783
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
784
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
1187
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
1188
+	echo ' selected';
1189
+}
1190
+?>><?php echo _("All"); ?></option>
1191
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
1192
+	echo ' selected';
1193
+}
1194
+?>><?php echo _("Passenger"); ?></option>
1195
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
1196
+	echo ' selected';
1197
+}
1198
+?>><?php echo _("Cargo"); ?></option>
1199
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
1200
+	echo ' selected';
1201
+}
1202
+?>><?php echo _("Military"); ?></option>
785 1203
 			</select>
786 1204
 		    </li>
787 1205
 		    <?php
@@ -795,7 +1213,10 @@  discard block
 block discarded – undo
795 1213
 		    ?>
796 1214
 		    <li>
797 1215
 			<?php echo _("Display vessels with MMSI:"); ?>
798
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
1216
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
1217
+	print $_COOKIE['filter_mmsi'];
1218
+}
1219
+?>" />
799 1220
 		    </li>
800 1221
 			<?php
801 1222
 				if (isset($globalVM) && $globalVM) {
@@ -826,7 +1247,10 @@  discard block
 block discarded – undo
826 1247
 		    ?>
827 1248
 		    <li>
828 1249
 			<?php echo _("Display with ident:"); ?>
829
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
1250
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1251
+	print $_COOKIE['filter_ident'];
1252
+}
1253
+?>" />
830 1254
 		    </li>
831 1255
 		</ul>
832 1256
 	    </form>
@@ -842,7 +1266,10 @@  discard block
 block discarded – undo
842 1266
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
843 1267
 	    <form>
844 1268
 		<ul>
845
-		    <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>
1269
+		    <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'])) {
1270
+	print 'checked';
1271
+}
1272
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
846 1273
 		    <li><?php echo _("Type:"); ?>
847 1274
 			<select class="selectpicker" multiple onchange="sattypes(this);">
848 1275
 			    <?php
@@ -850,25 +1277,45 @@  discard block
 block discarded – undo
850 1277
 				$types = $Satellite->get_tle_types();
851 1278
 				foreach ($types as $type) {
852 1279
 					$type_name = $type['tle_type'];
853
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
854
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
855
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
856
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
857
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
858
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
859
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
860
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
861
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
862
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
863
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
864
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
865
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
866
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
867
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
868
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
869
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
870
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
871
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1280
+					if ($type_name == 'musson') {
1281
+						$type_name = 'Russian LEO Navigation';
1282
+					} else if ($type_name == 'nnss') {
1283
+						$type_name = 'Navi Navigation Satellite System';
1284
+					} else if ($type_name == 'sbas') {
1285
+						$type_name = 'Satellite-Based Augmentation System';
1286
+					} else if ($type_name == 'glo-ops') {
1287
+						$type_name = 'Glonass Operational';
1288
+					} else if ($type_name == 'gps-ops') {
1289
+						$type_name = 'GPS Operational';
1290
+					} else if ($type_name == 'argos') {
1291
+						$type_name = 'ARGOS Data Collection System';
1292
+					} else if ($type_name == 'tdrss') {
1293
+						$type_name = 'Tracking and Data Relay Satellite System';
1294
+					} else if ($type_name == 'sarsat') {
1295
+						$type_name = 'Search & Rescue';
1296
+					} else if ($type_name == 'dmc') {
1297
+						$type_name = 'Disaster Monitoring';
1298
+					} else if ($type_name == 'resource') {
1299
+						$type_name = 'Earth Resources';
1300
+					} else if ($type_name == 'stations') {
1301
+						$type_name = 'Space Stations';
1302
+					} else if ($type_name == 'geo') {
1303
+						$type_name = 'Geostationary';
1304
+					} else if ($type_name == 'amateur') {
1305
+						$type_name = 'Amateur Radio';
1306
+					} else if ($type_name == 'x-comm') {
1307
+						$type_name = 'Experimental';
1308
+					} else if ($type_name == 'other-comm') {
1309
+						$type_name = 'Other Comm';
1310
+					} else if ($type_name == 'science') {
1311
+						$type_name = 'Space & Earth Science';
1312
+					} else if ($type_name == 'military') {
1313
+						$type_name = 'Miscellaneous Military';
1314
+					} else if ($type_name == 'radar') {
1315
+						$type_name = 'Radar Calibration';
1316
+					} else if ($type_name == 'tle-new') {
1317
+						$type_name = 'Last 30 days launches';
1318
+					}
872 1319
 					
873 1320
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
874 1321
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.