Completed
Push — master ( 1987da...e90b55 )
by Yannick
34:25
created
header.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,35 +14,35 @@  discard block
 block discarded – undo
14 14
 if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline';
15 15
 
16 16
 if (isset($_GET['3d'])) {
17
-	setcookie('MapFormat','3d');
17
+	setcookie('MapFormat', '3d');
18 18
 } else if (isset($_GET['2d'])) {
19
-	setcookie('MapFormat','2d');
19
+	setcookie('MapFormat', '2d');
20 20
 }
21 21
 
22 22
 if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
23
-	$tsk = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL);
23
+	$tsk = filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL);
24 24
 }
25 25
 
26 26
 if (isset($_POST['archive'])) {
27
-	setcookie('archive','true');
28
-	setcookie('archive_begin',strtotime($_POST['start_date']));
29
-	setcookie('archive_end',strtotime($_POST['end_date']));
30
-	setcookie('archive_speed',$_POST['archivespeed']);
27
+	setcookie('archive', 'true');
28
+	setcookie('archive_begin', strtotime($_POST['start_date']));
29
+	setcookie('archive_end', strtotime($_POST['end_date']));
30
+	setcookie('archive_speed', $_POST['archivespeed']);
31 31
 }
32 32
 if (isset($_POST['noarchive'])) {
33
-	setcookie('archive','false',-1);
34
-	setcookie('archive_begin','',-1);
35
-	setcookie('archive_end','',-1);
36
-	setcookie('archive_speed','',-1);
33
+	setcookie('archive', 'false', -1);
34
+	setcookie('archive_begin', '', -1);
35
+	setcookie('archive_end', '', -1);
36
+	setcookie('archive_speed', '', -1);
37 37
 }
38 38
 // When button "Remove all filters" is clicked
39 39
 if (isset($_POST['removefilters'])) {
40
-	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
41
-	    return strpos($key,'filter_') === 0;
40
+	$allfilters = array_filter(array_keys($_COOKIE), function($key) {
41
+	    return strpos($key, 'filter_') === 0;
42 42
 	});
43 43
 	foreach ($allfilters as $filt) {
44 44
 		unset($_COOKIE[$filt]);
45
-		setcookie($filt,null,-1);
45
+		setcookie($filt, null, -1);
46 46
 	}
47 47
 }
48 48
 ?>
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
265 265
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
266 266
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
267
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
267
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
268 268
 <?php
269 269
 		if (!isset($type) || $type == 'aircraft') {
270 270
 ?>
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
338 338
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
339 339
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
340
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
340
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if (isset($latitude)) print '&latitude='.$latitude; ?><?php if (isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
341 341
 <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
342 342
 <?php
343 343
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
@@ -742,8 +742,8 @@  discard block
 block discarded – undo
742 742
 ?>
743 743
       <div class="search">
744 744
       <form action="<?php print $globalURL; ?>/search" method="get">
745
-		<!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>-->
746
-		<input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>
745
+		<!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != "") { print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>-->
746
+		<input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != "") { print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>
747 747
 	</form>
748 748
 	</div>
749 749
   	<div class="social">
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 	print '</div>';
762 762
 }
763 763
 
764
-if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') {
764
+if (strtolower($current_page) == 'ident-detailed' || strtolower($current_page) == 'flightid-overview') {
765 765
 ?>
766 766
     <div class="top-header clear" role="main">
767 767
 <?php
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
     </div>
775 775
 <?php
776 776
 }
777
-if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false))
777
+if ((strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) || (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false))
778 778
 {
779 779
     ?>
780 780
     <div class="top-header clear" role="main">
@@ -787,15 +787,15 @@  discard block
 block discarded – undo
787 787
         var zoom = 13;
788 788
 //create the map
789 789
 <?php
790
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
790
+    if (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($airport_array[0]['latitude'])) {
791 791
 ?>
792 792
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
793 793
 <?php
794
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
794
+    } elseif (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) {
795 795
 ?>
796 796
   map = L.map('map', { zoomControl:true });
797 797
 <?php
798
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
798
+    } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
799 799
 ?>
800 800
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
801 801
     var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map);
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
     var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
804 804
     var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
805 805
 <?php
806
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
806
+    } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
807 807
 ?>
808 808
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
809 809
 <?php
Please login to merge, or discard this patch.
Braces   +84 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,12 +6,19 @@  discard block
 block discarded – undo
6 6
 //gets the page file and stores it in a variable
7 7
 $file_path = pathinfo($_SERVER['SCRIPT_NAME']);
8 8
 $current_page = $file_path['filename'];
9
-if ($globalTimezone == '') $globalTimezone = 'UTC';
9
+if ($globalTimezone == '') {
10
+	$globalTimezone = 'UTC';
11
+}
10 12
 date_default_timezone_set($globalTimezone);
11
-if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType'];
12
-else $MapType = $globalMapProvider;
13
+if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') {
14
+	$MapType = $_COOKIE['MapType'];
15
+} else {
16
+	$MapType = $globalMapProvider;
17
+}
13 18
 
14
-if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline';
19
+if (isset($globalMapOffline) && $globalMapOffline) {
20
+	$MapType = 'offline';
21
+}
15 22
 
16 23
 if (isset($_GET['3d'])) {
17 24
 	setcookie('MapFormat','3d');
@@ -219,7 +226,10 @@  discard block
 block discarded – undo
219 226
 <?php
220 227
 //		}
221 228
 ?>
222
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script>
229
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) {
230
+	print '&tsk='.$tsk;
231
+}
232
+?>"></script>
223 233
 <?php
224 234
 		if (!isset($globalAircraft) || $globalAircraft) {
225 235
 ?>
@@ -264,7 +274,13 @@  discard block
 block discarded – undo
264 274
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
265 275
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
266 276
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
267
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
277
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) {
278
+	print '&latitude='.$latitude;
279
+}
280
+?><?php if(isset($longitude)) {
281
+	print '&longitude='.$longitude;
282
+}
283
+?>&<?php print time(); ?>"></script>
268 284
 <?php
269 285
 		if (!isset($type) || $type == 'aircraft') {
270 286
 ?>
@@ -337,7 +353,13 @@  discard block
 block discarded – undo
337 353
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
338 354
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
339 355
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
340
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
356
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) {
357
+	print '&latitude='.$latitude;
358
+}
359
+?><?php if(isset($longitude)) {
360
+	print '&longitude='.$longitude;
361
+}
362
+?>&<?php print time(); ?>"></script>
341 363
 <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
342 364
 <?php
343 365
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
@@ -418,7 +440,12 @@  discard block
 block discarded – undo
418 440
         <span class="icon-bar"></span>
419 441
       </button>
420 442
       <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a>
421
-      <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
443
+      <a class="navbar-brand" href="<?php if ($globalURL == '') {
444
+	print '/';
445
+} else {
446
+	print $globalURL;
447
+}
448
+?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
422 449
     </div>
423 450
     <div class="collapse navbar-collapse">
424 451
 
@@ -473,7 +500,10 @@  discard block
 block discarded – undo
473 500
 	}
474 501
 ?>
475 502
 
476
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
503
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
504
+	echo 'right-';
505
+}
506
+?>caret"></b></a>
477 507
           <ul class="dropdown-menu">
478 508
           	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li>
479 509
 <?php
@@ -544,8 +574,14 @@  discard block
 block discarded – undo
544 574
         </li>
545 575
       	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
546 576
       	<li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li>
547
-        <li class="dropdown<?php if ($sub) echo '-submenu'; ?>">
548
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
577
+        <li class="dropdown<?php if ($sub) {
578
+	echo '-submenu';
579
+}
580
+?>">
581
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) {
582
+	echo 'right-';
583
+}
584
+?>caret"></b></a>
549 585
           <ul class="dropdown-menu">
550 586
           	<li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li>
551 587
           	<li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li>
@@ -589,7 +625,10 @@  discard block
 block discarded – undo
589 625
 <?php
590 626
 	}
591 627
 ?>
592
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
628
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
629
+	echo 'right-';
630
+}
631
+?>caret"></b></a>
593 632
 		<ul class="dropdown-menu">
594 633
 		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
595 634
 		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -630,7 +669,10 @@  discard block
 block discarded – undo
630 669
 <?php
631 670
 	}
632 671
 ?>
633
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
672
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
673
+	echo 'right-';
674
+}
675
+?>caret"></b></a>
634 676
 		<ul class="dropdown-menu">
635 677
 		    <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li>
636 678
 		    <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -673,7 +715,10 @@  discard block
 block discarded – undo
673 715
 ?>
674 716
 
675 717
 <!--
676
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
718
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
719
+	echo 'right-';
720
+}
721
+?>caret"></b></a>
677 722
 		<ul class="dropdown-menu">
678 723
 		    <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li>
679 724
 		    <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -730,7 +775,9 @@  discard block
 block discarded – undo
730 775
   		        $alllang = $Language->getLanguages();
731 776
   		        foreach ($alllang as $key => $lang) {
732 777
   		            print '<option value="'.$key.'"';
733
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
778
+  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) {
779
+  		            	print ' selected ';
780
+  		            }
734 781
   		            print '>'.$lang[0].'</option>';
735 782
   		        }
736 783
   		    ?>
@@ -878,9 +925,24 @@  discard block
 block discarded – undo
878 925
 	$customid = $globalMapProvider;
879 926
 ?>
880 927
     L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
881
-        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
882
-        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
883
-        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
928
+        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
929
+	print $globalMapCustomLayer[$customid]['maxZoom'];
930
+} else {
931
+	print '18';
932
+}
933
+?>,
934
+        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
935
+	print $globalMapCustomLayer[$customid]['minZoom'];
936
+} else {
937
+	print '0';
938
+}
939
+?>,
940
+        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
941
+	print 'false';
942
+} else {
943
+	print 'true';
944
+}
945
+?>,
884 946
         attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
885 947
     }).addTo(map);
886 948
 <?php
@@ -903,4 +965,7 @@  discard block
 block discarded – undo
903 965
 
904 966
 ?>
905 967
 
906
-<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
968
+<section class="container main-content <?php if (strtolower($current_page) == 'index') {
969
+	print 'index ';
970
+}
971
+?>clear">
Please login to merge, or discard this patch.
scripts/update_db.php 1 patch
Braces   +30 added lines, -11 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@  discard block
 block discarded – undo
9 9
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
10 10
 	exec("ps ux", $output, $result);
11 11
 	$j = 0;
12
-	foreach ($output as $line) if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ")) $j++;
12
+	foreach ($output as $line) {
13
+		if(strpos($line, dirname(__FILE__)."/update_db.php") && !strpos($line, "sh ")) $j++;
14
+	}
13 15
 	if ($j > 1) {
14 16
 		echo "Script is already runnning...";
15 17
 		die();
@@ -29,14 +31,18 @@  discard block
 block discarded – undo
29 31
 			$update_db->update_notam();
30 32
 		}
31 33
 		$update_db->insert_last_notam_update();
32
-	} elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) echo "NOTAM are only updated once a day.\n";
34
+	} elseif (isset($globalDebug) && $globalDebug && isset($globalNOTAM) && $globalNOTAM) {
35
+		echo "NOTAM are only updated once a day.\n";
36
+	}
33 37
 	if ($update_db->check_last_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
34 38
 		$update_db->update_all();
35 39
 	//	require_once(dirname(__FILE__).'/../require/class.Spotter.php');
36 40
 	//	$Spotter = new Spotter();
37 41
 	//	$Spotter->updateFieldsFromOtherTables();
38 42
 		$update_db->insert_last_update();
39
-	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n";
43
+	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM)) {
44
+		echo "DB are populated with external data only every 15 days ! Files are not updated more often.\n";
45
+	}
40 46
 	if (isset($globalWaypoints) && $globalWaypoints && $update_db->check_last_airspace_update()) {
41 47
 		echo "Check if new airspace version exist...";
42 48
 		echo $update_db->update_airspace_fam();
@@ -45,8 +51,11 @@  discard block
 block discarded – undo
45 51
 	if (isset($globalGeoid) && $globalGeoid && $update_db->check_last_geoid_update()) {
46 52
 		echo "Check if new geoid version exist...";
47 53
 		$error = $update_db->update_geoid_fam();
48
-		if ($error == '') $update_db->insert_last_geoid_update();
49
-		else echo $error;
54
+		if ($error == '') {
55
+			$update_db->insert_last_geoid_update();
56
+		} else {
57
+			echo $error;
58
+		}
50 59
 	}
51 60
 	if (isset($globalMarine) && $globalMarine && $update_db->check_last_marine_identity_update()) {
52 61
 		echo "Check if new marine identity version exist...";
@@ -64,13 +73,17 @@  discard block
 block discarded – undo
64 73
 			//echo "Done";
65 74
 		}
66 75
 		$update_db->insert_last_owner_update();
67
-	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Owner are only updated every 15 days.\n";
76
+	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
77
+		echo "Owner are only updated every 15 days.\n";
78
+	}
68 79
 
69 80
 	if ($update_db->check_last_airlines_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
70 81
 		echo "Updating airlines...\n";
71 82
 		echo $update_db->update_airlines_fam();
72 83
 		$update_db->insert_last_airlines_update();
73
-	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Airlines are only updated every 15 days.\n";
84
+	} elseif (isset($globalDebug) && $globalDebug && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
85
+		echo "Airlines are only updated every 15 days.\n";
86
+	}
74 87
 
75 88
 	if (isset($globalAccidents) && $globalAccidents && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
76 89
 		require_once(dirname(__FILE__).'/../require/class.Accident.php');
@@ -79,7 +92,9 @@  discard block
 block discarded – undo
79 92
 		if ($Accident->check_last_accidents_update()) {
80 93
 			$Accident->download_update();
81 94
 			$Accident->insert_last_accidents_update();
82
-		} else echo "Accidents are updated once a day.\n";
95
+		} else {
96
+			echo "Accidents are updated once a day.\n";
97
+		}
83 98
 	}
84 99
   
85 100
 }
@@ -92,7 +107,9 @@  discard block
 block discarded – undo
92 107
 		if ($METAR->check_last_update()) {
93 108
 			$METAR->addMETARCycle();
94 109
 			$METAR->insert_last_update();
95
-		} else echo "METAR are only updated every 30 minutes.\n";
110
+		} else {
111
+			echo "METAR are only updated every 30 minutes.\n";
112
+		}
96 113
 	}
97 114
 
98 115
 	if (isset($globalSchedules) && $globalSchedules && $update_db->check_last_schedules_update() && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
@@ -100,8 +117,10 @@  discard block
 block discarded – undo
100 117
 		//$update_db->update_oneworld();
101 118
 		$update_db->update_skyteam();
102 119
 		$update_db->insert_last_schedules_update();
103
-	} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) echo "Schedules are only updated every 15 days.\n";
104
-}
120
+	} elseif (isset($globalDebug) && $globalDebug && isset($globalOwner) && $globalOwner && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS)) {
121
+		echo "Schedules are only updated every 15 days.\n";
122
+	}
123
+	}
105 124
 
106 125
 if (isset($globalArchiveMonths) && $globalArchiveMonths > 0) {
107 126
 	echo "Updating statistics and archive old data...\n";
Please login to merge, or discard this patch.
js/map.3d.js.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -331,15 +331,15 @@  discard block
 block discarded – undo
331 331
     }
332 332
 
333 333
 <?php
334
-    if (isset($globalMapUseBbox) && $globalMapUseBbox) {
334
+	if (isset($globalMapUseBbox) && $globalMapUseBbox) {
335 335
 ?>
336 336
     var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php?coord="+bbox());
337 337
 <?php
338
-    } else {
338
+	} else {
339 339
 ?>
340 340
     var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php");
341 341
 <?php
342
-    }
342
+	}
343 343
 ?>
344 344
     loc_geojson.then(function(geojsondata) {
345 345
 	loc = new Cesium.CustomDataSource('location');
@@ -512,15 +512,15 @@  discard block
 block discarded – undo
512 512
 //	if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
513 513
 ?>
514 514
 <?php
515
-    if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
515
+	if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
516 516
 ?>
517 517
 var MapTerrain = 'ellipsoid';
518 518
 <?php
519
-    } else {
519
+	} else {
520 520
 ?>
521 521
 var MapTerrain = getCookie('MapTerrain');
522 522
 <?php
523
-    }
523
+	}
524 524
 ?>
525 525
 
526 526
 
@@ -574,11 +574,11 @@  discard block
 block discarded – undo
574 574
 }
575 575
 
576 576
 <?php
577
-    if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
577
+	if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) {
578 578
 ?>
579 579
 update_tsk();
580 580
 <?php
581
-    }
581
+	}
582 582
 ?>
583 583
 
584 584
 update_locationsLayer();
Please login to merge, or discard this patch.
Braces   +40 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,21 +5,30 @@  discard block
 block discarded – undo
5 5
 
6 6
 document.cookie =  'MapFormat=3d; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
7 7
 <?php
8
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
9
-	else $MapType = $globalMapProvider;
8
+	if (isset($_COOKIE['MapType'])) {
9
+		$MapType = $_COOKIE['MapType'];
10
+	} else {
11
+		$MapType = $globalMapProvider;
12
+	}
10 13
 
11 14
 //	unset($_COOKIE['MapType']);
12 15
 	if ($MapType != 'Mapbox' && $MapType != 'OpenStreetMap' && $MapType != 'Bing-Aerial' && $MapType != 'Bing-Hybrid' && $MapType != 'Bing-Road' && $MapType != 'offline') {
13
-		if (isset($globalBingMapKey) && $globalBingMapKey != '') $MapType = 'Bing-Aerial';
14
-		else $MapType = 'OpenStreetMap';
16
+		if (isset($globalBingMapKey) && $globalBingMapKey != '') {
17
+			$MapType = 'Bing-Aerial';
18
+		} else {
19
+			$MapType = 'OpenStreetMap';
20
+		}
15 21
 	}
16 22
 	if (($MapType == 'Bing-Aerial' || $MapType == 'Bing-Hybrid' || $MapType == 'Bing-Road') && (!isset($globalBingMapKey) || $globalBingMapKey == '')) {
17 23
 		$MapType = 'OpenStreetMap';
18 24
 	}
19 25
 	if ($MapType == 'Mapbox') {
20
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
21
-		else $MapBoxId = $_COOKIE['MapTypeId'];
22
-?>
26
+		if ($_COOKIE['MapTypeId'] == 'default') {
27
+			$MapBoxId = $globalMapboxId;
28
+		} else {
29
+			$MapBoxId = $_COOKIE['MapTypeId'];
30
+		}
31
+		?>
23 32
 	var imProv = Cesium.MapboxImageryProvider({
24 33
 		credit: 'Map data © OpenStreetMap contributors, ' +
25 34
 	      'CC-BY-SA, ' +
@@ -126,13 +135,23 @@  discard block
 block discarded – undo
126 135
 */
127 136
 ?>
128 137
 <?php
129
-	}  elseif (isset($globalMapCustomLayer[$MapType])) {
138
+	} elseif (isset($globalMapCustomLayer[$MapType])) {
130 139
 		$customid = $MapType;
131 140
 ?>
132 141
 	var imProv = Cesium.createOpenStreetMapImageryProvider({
133 142
 		url : '<?php print $globalMapCustomLayer[$customid]['url']; ?>',
134
-		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '99'; ?>,
135
-		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
143
+		maximumLevel: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
144
+	print $globalMapCustomLayer[$customid]['maxZoom'];
145
+} else {
146
+	print '99';
147
+}
148
+?>,
149
+		minimumLevel: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
150
+	print $globalMapCustomLayer[$customid]['minZoom'];
151
+} else {
152
+	print '0';
153
+}
154
+?>,
136 155
 		credit: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
137 156
 	});
138 157
 <?php
@@ -459,8 +478,11 @@  discard block
 block discarded – undo
459 478
 	if (isset($_COOKIE['lastcentercoord']) || (isset($globalCenterLatitude) && isset($globalCenterLongitude) && $globalCenterLatitude != '' && $globalCenterLongitude != '')) {
460 479
 		if (isset($_COOKIE['lastcentercoord'])) {
461 480
 			$lastcentercoord = explode(',',$_COOKIE['lastcentercoord']);
462
-			if (!isset($lastcentercoord[3])) $zoom = $lastcentercoord[2]*1000000.0;
463
-			else $zoom = $lastcentercoord[3];
481
+			if (!isset($lastcentercoord[3])) {
482
+				$zoom = $lastcentercoord[2]*1000000.0;
483
+			} else {
484
+				$zoom = $lastcentercoord[3];
485
+			}
464 486
 			$viewcenterlatitude = $lastcentercoord[0];
465 487
 			$viewcenterlongitude = $lastcentercoord[1];
466 488
 		} else {
@@ -582,7 +604,12 @@  discard block
 block discarded – undo
582 604
 ?>
583 605
 
584 606
 update_locationsLayer();
585
-setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
607
+setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) {
608
+	print $globalMapRefresh*1000*2;
609
+} else {
610
+	print '60000';
611
+}
612
+?>);
586 613
 /*
587 614
 var handlera = new Cesium.ScreenSpaceEventHandler(viewer.canvas, false);
588 615
 handlera.setInputAction(
Please login to merge, or discard this patch.
js/map.2d.js.php 1 patch
Braces   +109 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,10 +4,15 @@  discard block
 block discarded – undo
4 4
 
5 5
 setcookie("MapFormat",'2d');
6 6
 
7
-if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = '';
7
+if (!isset($globalOpenWeatherMapKey)) {
8
+	$globalOpenWeatherMapKey = '';
9
+}
8 10
 // Compressed GeoJson is used if true
9
-if (!isset($globalJsonCompress)) $compress = true;
10
-else $compress = $globalJsonCompress;
11
+if (!isset($globalJsonCompress)) {
12
+	$compress = true;
13
+} else {
14
+	$compress = $globalJsonCompress;
15
+}
11 16
 if (isset($_GET['archive'])) {
12 17
 	$archive = true;
13 18
 	//$archiveupdatetime = 50;
@@ -18,8 +23,11 @@  discard block
 block discarded – undo
18 23
 	//$lastupd = round(($_GET['enddate']-$_GET['begindate'])/(($_GET['during']*60)/10));
19 24
 	//$lastupd = 20;
20 25
 	$lastupd = $_GET['archivespeed']*$archiveupdatetime;
21
-	if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate'];
22
-	else $enddate = time();
26
+	if (isset($_GET['enddate']) && $_GET['enddate'] != '') {
27
+		$enddate = $_GET['enddate'];
28
+	} else {
29
+		$enddate = time();
30
+	}
23 31
 	setcookie("archive_begin",$begindate);
24 32
 	setcookie("archive_end",$enddate);
25 33
 	setcookie("archive_update",$lastupd);
@@ -107,7 +115,17 @@  discard block
 block discarded – undo
107 115
 	}
108 116
 
109 117
 	//create the map
110
-	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);
118
+	map = L.map('archive-map', { zoomControl:false }).setView([<?php if (isset($latitude)) {
119
+	print $latitude;
120
+} else {
121
+	print $globalCenterLatitude;
122
+}
123
+?>,<?php if (isset($longitude)) {
124
+	print $longitude;
125
+} else {
126
+	print $globalCenterLongitude;
127
+}
128
+?>], zoom);
111 129
 <?php
112 130
 	} else {
113 131
 		if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) {
@@ -133,9 +151,21 @@  discard block
 block discarded – undo
133 151
 	     || navigator.userAgent.match(/BlackBerry/i)
134 152
 	     || navigator.userAgent.match(/Windows Phone/i))
135 153
 	{
136
-		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>;
154
+		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) {
155
+	print $viewzoom-1;
156
+} elseif (isset($viewzoom)) {
157
+	print $viewzoom;
158
+} else {
159
+	print '8';
160
+}
161
+?>;
137 162
 	} else {
138
-		var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>;
163
+		var zoom = <?php if (isset($viewzoom)) {
164
+	print $viewzoom;
165
+} else {
166
+	print '9';
167
+}
168
+?>;
139 169
 	}
140 170
 
141 171
 	//create the map
@@ -161,16 +191,27 @@  discard block
 block discarded – undo
161 191
 	bounds = L.latLngBounds(southWest,northEast);
162 192
 	//a few title layers
163 193
 <?php
164
-	if (isset($_COOKIE['MapType'])) $MapType = $_COOKIE['MapType'];
165
-	else $MapType = $globalMapProvider;
194
+	if (isset($_COOKIE['MapType'])) {
195
+		$MapType = $_COOKIE['MapType'];
196
+	} else {
197
+		$MapType = $globalMapProvider;
198
+	}
166 199
 
167 200
 	if ($MapType == 'Mapbox') {
168
-		if ($_COOKIE['MapTypeId'] == 'default') $MapBoxId = $globalMapboxId;
169
-		else $MapBoxId = $_COOKIE['MapTypeId'];
170
-?>
201
+		if ($_COOKIE['MapTypeId'] == 'default') {
202
+			$MapBoxId = $globalMapboxId;
203
+		} else {
204
+			$MapBoxId = $_COOKIE['MapTypeId'];
205
+		}
206
+		?>
171 207
 	L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
172 208
 	    maxZoom: 18,
173
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
209
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
210
+	print 'false';
211
+} else {
212
+	print 'true';
213
+}
214
+?>,
174 215
 	    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
175 216
 	      '<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
176 217
 	      'Imagery © <a href="http://mapbox.com">Mapbox</a>',
@@ -189,7 +230,12 @@  discard block
 block discarded – undo
189 230
 ?>
190 231
 	L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
191 232
 	    maxZoom: 18,
192
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
233
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
234
+	print 'false';
235
+} else {
236
+	print 'true';
237
+}
238
+?>,
193 239
 	    attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
194 240
 	      '<a href="www.openstreetmap.org/copyright">Open Database Licence</a>'
195 241
 	}).addTo(map);
@@ -235,20 +281,26 @@  discard block
 block discarded – undo
235 281
 	map.addLayer(yandexLayer);
236 282
 <?php
237 283
 	} elseif ($MapType == 'Bing-Aerial') {
238
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
239
-?>
284
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
285
+			setcookie('MapType','OpenStreetMap');
286
+		}
287
+		?>
240 288
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'});
241 289
 	map.addLayer(bingLayer);
242 290
 <?php
243 291
 	} elseif ($MapType == 'Bing-Hybrid') {
244
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
245
-?>
292
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
293
+			setcookie('MapType','OpenStreetMap');
294
+		}
295
+		?>
246 296
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'});
247 297
 	map.addLayer(bingLayer);
248 298
 <?php
249 299
 	} elseif ($MapType == 'Bing-Road') {
250
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
251
-?>
300
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') {
301
+			setcookie('MapType','OpenStreetMap');
302
+		}
303
+		?>
252 304
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'});
253 305
 	map.addLayer(bingLayer);
254 306
 <?php
@@ -277,7 +329,12 @@  discard block
 block discarded – undo
277 329
 	    maxZoom: 5,
278 330
 	    tms : true,
279 331
 	    zindex : 3,
280
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
332
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
333
+	print 'false';
334
+} else {
335
+	print 'true';
336
+}
337
+?>,
281 338
 	    attribution: 'Natural Earth'
282 339
 	}).addTo(map);
283 340
 <?php
@@ -285,9 +342,24 @@  discard block
 block discarded – undo
285 342
 		$customid = $MapType;
286 343
 ?>
287 344
 	L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
288
-	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
289
-	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
290
-	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
345
+	    maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
346
+	print $globalMapCustomLayer[$customid]['maxZoom'];
347
+} else {
348
+	print '18';
349
+}
350
+?>,
351
+	    minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
352
+	print $globalMapCustomLayer[$customid]['minZoom'];
353
+} else {
354
+	print '0';
355
+}
356
+?>,
357
+	    noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
358
+	print 'false';
359
+} else {
360
+	print 'true';
361
+}
362
+?>,
291 363
 	    attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
292 364
 	}).addTo(map);
293 365
 
@@ -327,7 +399,12 @@  discard block
 block discarded – undo
327 399
 		}
328 400
 	} elseif ($globalBounding == 'circle') {
329 401
 ?>
330
-	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) print $globalBoundingCircleSize; else print '70000'; ?>,{
402
+	var circle = L.circle([<?php print $globalCenterLatitude; ?>, <?php print $globalCenterLongitude; ?>],<?php if (isset($globalBoundingCircleSize)) {
403
+	print $globalBoundingCircleSize;
404
+} else {
405
+	print '70000';
406
+}
407
+?>,{
331 408
 	    color: '#92C7D1',
332 409
 	    fillColor: '#92C7D1',
333 410
 	    fillOpacity: 0.3,
@@ -419,7 +496,12 @@  discard block
 block discarded – undo
419 496
 		createCookie('lastcentercoord',map.getCenter().lat+','+map.getCenter().lng+','+map.getZoom(),2);
420 497
 	});
421 498
 update_locationsLayer();
422
-setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
499
+setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) {
500
+	print $globalMapRefresh*1000*2;
501
+} else {
502
+	print '60000';
503
+}
504
+?>);
423 505
 
424 506
 <?php
425 507
     // Add support for custom json via $globalMapJson
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     <?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 } ?>
48 48
 </tr></table></div>
49 49
 <?php
50
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
50
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
51 51
 ?>
52 52
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
53 53
 <?php
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
72 72
 <?php
73 73
 	}
74
-    }
74
+	}
75 75
 ?>
76 76
 
77 77
 <div id="sidebar" class="sidebar collapsed">
@@ -82,34 +82,34 @@  discard block
 block discarded – undo
82 82
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
83 83
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
84 84
 <?php
85
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
85
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
86 86
 	if (isset($globalArchive) && $globalArchive == TRUE) {
87 87
 ?>
88 88
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
89 89
 <?php
90 90
 	}
91
-    }
91
+	}
92 92
 ?>
93 93
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
94 94
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
95 95
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
96 96
 <?php
97
-    if (isset($globalMap3D) && $globalMap3D) {
97
+	if (isset($globalMap3D) && $globalMap3D) {
98 98
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
99 99
 ?>
100 100
 	<li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
101 101
 <?php
102 102
 	} else {
103
-	    if (isset($globalSatellite) && $globalSatellite) {
103
+		if (isset($globalSatellite) && $globalSatellite) {
104 104
 ?>
105 105
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
106 106
 <?php
107
-	    }
107
+		}
108 108
 ?>
109 109
 	<li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
110 110
 <?php
111 111
 	}
112
-    }
112
+	}
113 113
 ?>
114 114
     </ul>
115 115
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 ?>
185 185
         </div>
186 186
 <?php
187
-    if (isset($globalArchive) && $globalArchive == TRUE) {
187
+	if (isset($globalArchive) && $globalArchive == TRUE) {
188 188
 ?>
189 189
         <div class="sidebar-pane" id="archive">
190 190
 	    <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	    </form>
244 244
 	</div>
245 245
 <?php
246
-    }
246
+	}
247 247
 ?>
248 248
         <div class="sidebar-pane" id="settings">
249 249
 	    <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -254,67 +254,67 @@  discard block
 block discarded – undo
254 254
 			    <?php
255 255
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
256 256
 				else $MapType = $_COOKIE['MapType'];
257
-			    ?>
257
+				?>
258 258
 			    <?php
259 259
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
260
-			    ?>
260
+				?>
261 261
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
262 262
 			    <?php
263 263
 				} else {
264
-				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265
-			    ?>
264
+					if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265
+				?>
266 266
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
267 267
 			    <?php
268
-				    }
269
-				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
270
-			    ?>
268
+					}
269
+					if (isset($globalBingMapKey) && $globalBingMapKey != '') {
270
+				?>
271 271
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
272 272
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
273 273
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
274 274
 			    <?php
275
-				    }
276
-			    ?>
275
+					}
276
+				?>
277 277
 			    <?php
278
-				    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
279
-			    ?>
278
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
279
+				?>
280 280
 			    <?php
281 281
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
282
-			    ?>
282
+				?>
283 283
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
284 284
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
285 285
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
286 286
 			    <?php
287 287
 					}
288
-			    ?>
288
+				?>
289 289
 			    <?php
290 290
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
291
-			    ?>
291
+				?>
292 292
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
293 293
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
294 294
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
295 295
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
296 296
 			    <?php
297 297
 					}
298
-			    ?>
298
+				?>
299 299
 			    <?php
300 300
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
301
-			    ?>
301
+				?>
302 302
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
303 303
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
304 304
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
305 305
 			    <?php
306 306
 					}
307
-			    ?>
307
+				?>
308 308
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
309 309
 			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
310 310
 			    <?php
311
-				    }
312
-			    ?>
311
+					}
312
+				?>
313 313
 			    <?php
314
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
314
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
315 315
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
316 316
 					else $MapBoxId = $_COOKIE['MapTypeId'];
317
-			    ?>
317
+				?>
318 318
 			<!--    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> -->
319 319
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
320 320
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
@@ -329,16 +329,16 @@  discard block
 block discarded – undo
329 329
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
330 330
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
331 331
 			    <?php
332
-				    }
333
-			    ?>
332
+					}
333
+				?>
334 334
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
335 335
 			    <?php
336 336
 				}
337
-			    ?>
337
+				?>
338 338
 			</select>
339 339
 		    </li>
340 340
 <?php
341
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
341
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d' && (!isset($globalMapOffline) || $globalMapOffline === FALSE)) {
342 342
 ?>
343 343
 		    <li><?php echo _("Type of Terrain:"); ?>
344 344
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -349,10 +349,10 @@  discard block
 block discarded – undo
349 349
 			</select>
350 350
 		    </li>
351 351
 <?php
352
-    }
352
+	}
353 353
 ?>
354 354
 <?php
355
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
355
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
356 356
 ?>
357 357
 		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if ((isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') || (!isset($_COOKIE['Map2DBuildings']))) print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
358 358
 
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 		    <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>
372 372
 <?php
373 373
 	}
374
-    }
374
+	}
375 375
 ?>
376 376
 		    <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>
377 377
 		    <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>
@@ -383,81 +383,81 @@  discard block
 block discarded – undo
383 383
 		    <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>
384 384
 <?php
385 385
 	}
386
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
386
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
387 387
 ?>
388 388
 		    <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>
389 389
 <?php
390
-    }
391
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
390
+	}
391
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
392 392
 ?>
393 393
 		    <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>
394 394
 <?php
395
-    }
395
+	}
396 396
 ?>
397 397
 		    <?php
398 398
 			if (function_exists('array_column')) {
399
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
400
-		    ?>
399
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
400
+			?>
401 401
 		    <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>
402 402
 		    <?php
403
-			    }
403
+				}
404 404
 			} elseif (isset($globalSources)) {
405
-			    $dispolar = false;
406
-			    foreach ($globalSources as $testsource) {
407
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
408
-			    }
409
-			    if ($dispolar) {
410
-		    ?>
405
+				$dispolar = false;
406
+				foreach ($globalSources as $testsource) {
407
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
408
+				}
409
+				if ($dispolar) {
410
+			?>
411 411
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
412 412
 		    <?php
413
-			    }
414
-		        }
415
-		    ?>
413
+				}
414
+				}
415
+			?>
416 416
 <?php
417
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
417
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
418 418
 ?>
419 419
 
420 420
 		    <?php
421 421
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
422
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
423
-		    ?>
422
+					if (extension_loaded('gd') && function_exists('gd_info')) {
423
+			?>
424 424
 		    <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>
425 425
 		    <?php 
426 426
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
427
-		    ?>
427
+			?>
428 428
 		    <li><?php echo _("Aircraft icon color:"); ?>
429 429
 			<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'; ?>">
430 430
 		    </li>
431 431
 		    <?php
432 432
 				}
433
-			    }
434
-		        }
435
-		    ?>
433
+				}
434
+				}
435
+			?>
436 436
 		    <?php
437 437
 			if (isset($globalMarine) && $globalMarine === TRUE) {
438
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
439
-		    ?>
438
+				if (extension_loaded('gd') && function_exists('gd_info')) {
439
+			?>
440 440
 		    <li><?php echo _("Marine icon color:"); ?>
441 441
 			<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'; ?>">
442 442
 		    </li>
443 443
 		    <?php
444
-			    }
445
-		        }
446
-		    ?>
444
+				}
445
+				}
446
+			?>
447 447
 		    <?php
448 448
 			if (isset($globalTracker) && $globalTracker === TRUE) {
449
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
450
-		    ?>
449
+				if (extension_loaded('gd') && function_exists('gd_info')) {
450
+			?>
451 451
 		    <li><?php echo _("Tracker icon color:"); ?>
452 452
 			<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'; ?>">
453 453
 		    </li>
454 454
 		    <?php
455
-			    }
456
-		        }
457
-		    ?>
455
+				}
456
+				}
457
+			?>
458 458
 		    <?php
459 459
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
460
-		    ?>
460
+			?>
461 461
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
462 462
 			<div class="range">
463 463
 			    <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'; ?>">
@@ -466,9 +466,9 @@  discard block
 block discarded – undo
466 466
 		    </li>
467 467
 		    <?php
468 468
 			}
469
-		    ?>
469
+			?>
470 470
 <?php
471
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
471
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
472 472
 ?>
473 473
 <?php
474 474
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 		    </li>
501 501
 <?php
502 502
 	}
503
-    }
503
+	}
504 504
 ?>
505 505
 		    <li><?php echo _("Distance unit:"); ?>
506 506
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -533,19 +533,19 @@  discard block
 block discarded – undo
533 533
 		    <ul>
534 534
 		    <?php
535 535
 			if (!isset($globalAircraft) || $globalAircraft) {
536
-		    ?>
536
+			?>
537 537
 		    <?php
538 538
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
539
-		    ?>
539
+			?>
540 540
 			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
541 541
 			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
542 542
 			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
543 543
 		    <?php
544 544
 			}
545
-		    ?>
545
+			?>
546 546
 		    <?php
547 547
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
548
-		    ?>
548
+			?>
549 549
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
550 550
 			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
551 551
 			<?php } ?>
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 			<?php } ?>
555 555
 		    <?php
556 556
 			}
557
-		    ?>
557
+			?>
558 558
 		    <li><?php echo _("Display airlines:"); ?>
559 559
 		    <br/>
560 560
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -574,14 +574,14 @@  discard block
 block discarded – undo
574 574
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
575 575
 					}
576 576
 				}
577
-			    ?>
577
+				?>
578 578
 			</select>
579 579
 		    </li>
580 580
 		    <?php
581 581
 			$Spotter = new Spotter();
582 582
 			$allalliancenames = $Spotter->getAllAllianceNames();
583 583
 			if (!empty($allalliancenames)) {
584
-		    ?>
584
+			?>
585 585
 		    <li><?php echo _("Display alliance:"); ?>
586 586
 		    <br/>
587 587
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -595,18 +595,18 @@  discard block
 block discarded – undo
595 595
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
596 596
 					}
597 597
 				}
598
-			    ?>
598
+				?>
599 599
 			</select>
600 600
 		    </li>
601 601
 		    <?php
602 602
 			}
603
-		    ?>
603
+			?>
604 604
 		    <?php
605 605
 			}
606
-		    ?>
606
+			?>
607 607
 		    <?php
608 608
 			if (isset($globalAPRS) && $globalAPRS) {
609
-		    ?>
609
+			?>
610 610
 		    <li><?php echo _("Display APRS sources name:"); ?>
611 611
 			<select class="selectpicker" multiple onchange="sources(this);">
612 612
 			    <?php
@@ -630,18 +630,18 @@  discard block
 block discarded – undo
630 630
 						echo '<option value="'.$src['name'].'">'.$src['name'].'</option>';
631 631
 					}
632 632
 				}
633
-			    ?>
633
+				?>
634 634
 			</select>
635 635
 		    </li>
636 636
 		    <?php
637 637
 			}
638
-		    ?>
638
+			?>
639 639
 		    <?php
640 640
 			if (!isset($globalAircraft) || $globalAircraft) {
641
-		    ?>
641
+			?>
642 642
 		    <?php
643
-			    if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
644
-		    ?>
643
+				if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
644
+			?>
645 645
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
646 646
 			<select class="selectpicker" onchange="airlinestype(this);">
647 647
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -651,21 +651,21 @@  discard block
 block discarded – undo
651 651
 			</select>
652 652
 		    </li>
653 653
 		    <?php
654
-			    }
655
-		    ?>
654
+				}
655
+			?>
656 656
 		    <?php
657 657
 			}
658
-		    ?>
658
+			?>
659 659
 		    <?php
660 660
 			if (isset($globalMarine) && $globalMarine) {
661
-		    ?>
661
+			?>
662 662
 		    <li>
663 663
 			<?php echo _("Display vessels with MMSI:"); ?>
664 664
 			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
665 665
 		    </li>
666 666
 		    <?php
667 667
 			}
668
-		    ?>
668
+			?>
669 669
 		    <li>
670 670
 			<?php echo _("Display with ident:"); ?>
671 671
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 	    </form>
679 679
     	</div>
680 680
 <?php
681
-    if (isset($globalSatellite) && $globalSatellite) {
681
+	if (isset($globalSatellite) && $globalSatellite) {
682 682
 ?>
683 683
         <div class="sidebar-pane" id="satellites">
684 684
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -718,14 +718,14 @@  discard block
 block discarded – undo
718 718
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
719 719
 					}
720 720
 				}
721
-			    ?>
721
+				?>
722 722
 			</select>
723 723
 		    </li>
724 724
 		</ul>
725 725
 	    </form>
726 726
 	</div>
727 727
 <?php
728
-    }
728
+	}
729 729
 ?>
730 730
     </div>
731 731
 </div>
Please login to merge, or discard this patch.
Braces   +473 added lines, -119 removed lines patch added patch discarded remove patch
@@ -49,7 +49,10 @@  discard block
 block discarded – undo
49 49
 <?php
50 50
     if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
51 51
 ?>
52
-<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) print '?tsk='.$tsk; ?>"></script>
52
+<script src="<?php echo $globalURL; ?>/js/map.3d.js.php<?php if (isset($tsk)) {
53
+	print '?tsk='.$tsk;
54
+}
55
+?>"></script>
53 56
 <?php
54 57
 	if (!isset($globalAircraft) || $globalAircraft) {
55 58
 ?>
@@ -163,11 +166,26 @@  discard block
 block discarded – undo
163 166
 				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li>
164 167
 				<li><?php echo _("NOTAM scope:"); ?>
165 168
 					<select class="selectpicker" onchange="notamscope(this);">
166
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
167
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
168
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
169
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
170
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
169
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
170
+	print ' selected';
171
+}
172
+?>>All</option>
173
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
174
+	print ' selected';
175
+}
176
+?>>Airport/Enroute warning</option>
177
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
178
+	print ' selected';
179
+}
180
+?>>Airport warning</option>
181
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
182
+	print ' selected';
183
+}
184
+?>>Navigation warning</option>
185
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
186
+	print ' selected';
187
+}
188
+?>>Enroute warning</option>
171 189
 					</select
172 190
 				</li>
173 191
 			</ul>
@@ -195,7 +213,12 @@  discard block
 block discarded – undo
195 213
 		        <div class="form-group">
196 214
 			    <label>From (UTC):</label>
197 215
 		            <div class='input-group date' id='datetimepicker1'>
198
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) print $_POST['start_date']; elseif (isset($_COOKIE['archive_begin'])) print date("m/d/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
216
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) {
217
+	print $_POST['start_date'];
218
+} elseif (isset($_COOKIE['archive_begin'])) {
219
+	print date("m/d/Y h:i a",$_COOKIE['archive_begin']);
220
+}
221
+?>" required />
199 222
 		                <span class="input-group-addon">
200 223
             			    <span class="glyphicon glyphicon-calendar"></span>
201 224
 		                </span>
@@ -204,7 +227,12 @@  discard block
 block discarded – undo
204 227
 		        <div class="form-group">
205 228
 			    <label>To (UTC):</label>
206 229
 		            <div class='input-group date' id='datetimepicker2'>
207
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) print $_POST['end_date']; elseif (isset($_COOKIE['archive_end'])) print date("m/d/Y h:i a",$_COOKIE['archive_end']); ?>" />
230
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) {
231
+	print $_POST['end_date'];
232
+} elseif (isset($_COOKIE['archive_end'])) {
233
+	print date("m/d/Y h:i a",$_COOKIE['archive_end']);
234
+}
235
+?>" />
208 236
             			<span class="input-group-addon">
209 237
 		                    <span class="glyphicon glyphicon-calendar"></span>
210 238
             			</span>
@@ -229,8 +257,20 @@  discard block
 block discarded – undo
229 257
 			</script>
230 258
 		    <li><?php echo _("Playback speed:"); ?>
231 259
 			<div class="range">
232
-			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) print $_POST['archivespeed']; elseif (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?>">
233
-			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
260
+			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
261
+	print $_POST['archivespeed'];
262
+} elseif (isset($_COOKIE['archive_speed'])) {
263
+	print $_COOKIE['archive_speed'];
264
+} else {
265
+	print '1';
266
+}
267
+?>">
268
+			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
269
+	print $_COOKIE['archive_speed'];
270
+} else {
271
+	print '1';
272
+}
273
+?></output>
234 274
 			</div>
235 275
 		    </li>
236 276
 		    <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li>
@@ -252,25 +292,43 @@  discard block
 block discarded – undo
252 292
 		    <li><?php echo _("Type of Map:"); ?>
253 293
 			<select  class="selectpicker" onchange="mapType(this);">
254 294
 			    <?php
255
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
256
-				else $MapType = $_COOKIE['MapType'];
295
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
296
+					$MapType = $globalMapProvider;
297
+				} else {
298
+					$MapType = $_COOKIE['MapType'];
299
+				}
257 300
 			    ?>
258 301
 			    <?php
259 302
 				if (isset($globalMapOffline) && $globalMapOffline === TRUE) {
260 303
 			    ?>
261
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
304
+			    <option value="offline"<?php if ($MapType == 'offline') {
305
+	print ' selected';
306
+}
307
+?>>Natural Earth (local)</option>
262 308
 			    <?php
263 309
 				} else {
264 310
 				    if (file_exists(dirname(__FILE__).'/js/Cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml')) {
265 311
 			    ?>
266
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth (local)</option>
312
+			    <option value="offline"<?php if ($MapType == 'offline') {
313
+	print ' selected';
314
+}
315
+?>>Natural Earth (local)</option>
267 316
 			    <?php
268 317
 				    }
269 318
 				    if (isset($globalBingMapKey) && $globalBingMapKey != '') {
270 319
 			    ?>
271
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
272
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
273
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
320
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
321
+	print ' selected';
322
+}
323
+?>>Bing-Aerial</option>
324
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
325
+	print ' selected';
326
+}
327
+?>>Bing-Hybrid</option>
328
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
329
+	print ' selected';
330
+}
331
+?>>Bing-Road</option>
274 332
 			    <?php
275 333
 				    }
276 334
 			    ?>
@@ -280,58 +338,139 @@  discard block
 block discarded – undo
280 338
 			    <?php
281 339
 					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
282 340
 			    ?>
283
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
284
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
285
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
341
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
342
+	print ' selected';
343
+}
344
+?>>Here-Aerial</option>
345
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
346
+	print ' selected';
347
+}
348
+?>>Here-Hybrid</option>
349
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
350
+	print ' selected';
351
+}
352
+?>>Here-Road</option>
286 353
 			    <?php
287 354
 					}
288 355
 			    ?>
289 356
 			    <?php
290 357
 					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
291 358
 			    ?>
292
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
293
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
294
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
295
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
359
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
360
+	print ' selected';
361
+}
362
+?>>Google Roadmap</option>
363
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
364
+	print ' selected';
365
+}
366
+?>>Google Satellite</option>
367
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
368
+	print ' selected';
369
+}
370
+?>>Google Hybrid</option>
371
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
372
+	print ' selected';
373
+}
374
+?>>Google Terrain</option>
296 375
 			    <?php
297 376
 					}
298 377
 			    ?>
299 378
 			    <?php
300 379
 					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
301 380
 			    ?>
302
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
303
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
304
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
381
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
382
+	print ' selected';
383
+}
384
+?>>MapQuest-OSM</option>
385
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
386
+	print ' selected';
387
+}
388
+?>>MapQuest-Aerial</option>
389
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
390
+	print ' selected';
391
+}
392
+?>>MapQuest-Hybrid</option>
305 393
 			    <?php
306 394
 					}
307 395
 			    ?>
308
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
309
-			    <option value="offline"<?php if ($MapType == 'offline') print ' selected'; ?>>Natural Earth</option>
396
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
397
+	print ' selected';
398
+}
399
+?>>Yandex</option>
400
+			    <option value="offline"<?php if ($MapType == 'offline') {
401
+	print ' selected';
402
+}
403
+?>>Natural Earth</option>
310 404
 			    <?php
311 405
 				    }
312 406
 			    ?>
313 407
 			    <?php
314 408
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
315
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
316
-					else $MapBoxId = $_COOKIE['MapTypeId'];
409
+					if (!isset($_COOKIE['MapTypeId'])) {
410
+						$MapBoxId = 'default';
411
+					} else {
412
+						$MapBoxId = $_COOKIE['MapTypeId'];
413
+					}
317 414
 			    ?>
318
-			<!--    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') print ' selected'; ?>>Mapbox GL</option> -->
319
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
320
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
321
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
322
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
323
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
324
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
325
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
326
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
327
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
328
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
329
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
330
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
415
+			<!--    <option value="MapboxGL"<?php if ($MapType == 'MapboxGL') {
416
+	print ' selected';
417
+}
418
+?>>Mapbox GL</option> -->
419
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
420
+	print ' selected';
421
+}
422
+?>>Mapbox default</option>
423
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
424
+	print ' selected';
425
+}
426
+?>>Mapbox streets</option>
427
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
428
+	print ' selected';
429
+}
430
+?>>Mapbox light</option>
431
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
432
+	print ' selected';
433
+}
434
+?>>Mapbox dark</option>
435
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
436
+	print ' selected';
437
+}
438
+?>>Mapbox satellite</option>
439
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
440
+	print ' selected';
441
+}
442
+?>>Mapbox streets-satellite</option>
443
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
444
+	print ' selected';
445
+}
446
+?>>Mapbox streets-basic</option>
447
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
448
+	print ' selected';
449
+}
450
+?>>Mapbox comic</option>
451
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
452
+	print ' selected';
453
+}
454
+?>>Mapbox outdoors</option>
455
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
456
+	print ' selected';
457
+}
458
+?>>Mapbox pencil</option>
459
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
460
+	print ' selected';
461
+}
462
+?>>Mapbox pirates</option>
463
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
464
+	print ' selected';
465
+}
466
+?>>Mapbox emerald</option>
331 467
 			    <?php
332 468
 				    }
333 469
 			    ?>
334
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
470
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
471
+	print ' selected';
472
+}
473
+?>>OpenStreetMap</option>
335 474
 			    <?php
336 475
 				}
337 476
 			    ?>
@@ -342,10 +481,22 @@  discard block
 block discarded – undo
342 481
 ?>
343 482
 		    <li><?php echo _("Type of Terrain:"); ?>
344 483
 			<select  class="selectpicker" onchange="terrainType(this);">
345
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
346
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
347
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
348
-			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') print ' selected';?>>ArticDEM</option>
484
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
485
+	print ' selected';
486
+}
487
+?>>stk terrain</option>
488
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
489
+	print ' selected';
490
+}
491
+?>>ellipsoid</option>
492
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
493
+	print ' selected';
494
+}
495
+?>>vr terrain</option>
496
+			    <option value="articdem"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'articdem') {
497
+	print ' selected';
498
+}
499
+?>>ArticDEM</option>
349 500
 			</select>
350 501
 		    </li>
351 502
 <?php
@@ -354,38 +505,77 @@  discard block
 block discarded – undo
354 505
 <?php
355 506
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
356 507
 ?>
357
-		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if ((isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') || (!isset($_COOKIE['Map2DBuildings']))) print 'checked'; ?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
508
+		    <li><div class="checkbox"><label><input type="checkbox" name="display2dbuildings" value="1" onclick="clickDisplay2DBuildings(this)" <?php if ((isset($_COOKIE['Map2DBuildings']) && $_COOKIE['Map2DBuildings'] == 'true') || (!isset($_COOKIE['Map2DBuildings']))) {
509
+	print 'checked';
510
+}
511
+?> ><?php echo _("Display 2.5D buidings on map"); ?></label></div></li>
358 512
 
359 513
 <?php
360 514
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
361 515
 ?>
362
-		    <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>
363
-		    <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>
364
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
365
-		    <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>
366
-		    <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>
516
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
517
+	print 'checked';
518
+}
519
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>
520
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
521
+	print 'checked';
522
+}
523
+?> ><?php echo _("Display flight path"); ?></label></div></li>
524
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || (isset($globalMapRoute) && $globalMapRoute)) {
525
+	print 'checked';
526
+}
527
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
528
+		    <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)) {
529
+	print 'checked';
530
+}
531
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
532
+		    <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)) {
533
+	print 'checked';
534
+}
535
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
367 536
 <?php
368 537
 	}
369 538
 	if (isset($globalSatellite) && $globalSatellite === TRUE) {
370 539
 ?>
371
-		    <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>
540
+		    <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)) {
541
+	print 'checked';
542
+}
543
+?> ><?php echo _("Satellites animate between updates"); ?></label></div></li>
372 544
 <?php
373 545
 	}
374 546
     }
375 547
 ?>
376
-		    <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>
377
-		    <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>
378
-		    <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>
379
-		    <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>
548
+		    <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'])) {
549
+	print 'checked';
550
+}
551
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
552
+		    <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))) {
553
+	print 'checked';
554
+}
555
+?> ><?php echo _("Display ground station on map"); ?></label></div></li>
556
+		    <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))) {
557
+	print 'checked';
558
+}
559
+?> ><?php echo _("Display weather station on map"); ?></label></div></li>
560
+		    <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))) {
561
+	print 'checked';
562
+}
563
+?> ><?php echo _("Display lightning on map"); ?></label></div></li>
380 564
 <?php
381 565
 	if (isset($globalFires)) {
382 566
 ?>
383
-		    <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>
567
+		    <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))) {
568
+	print 'checked';
569
+}
570
+?> ><?php echo _("Display fires on map"); ?></label></div></li>
384 571
 <?php
385 572
 	}
386 573
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
387 574
 ?>
388
-		    <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>
575
+		    <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')) {
576
+	print 'checked';
577
+}
578
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
389 579
 <?php
390 580
     }
391 581
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -398,17 +588,25 @@  discard block
 block discarded – undo
398 588
 			if (function_exists('array_column')) {
399 589
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
400 590
 		    ?>
401
-		    <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>
591
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
592
+	print 'checked';
593
+}
594
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
402 595
 		    <?php
403 596
 			    }
404 597
 			} elseif (isset($globalSources)) {
405 598
 			    $dispolar = false;
406 599
 			    foreach ($globalSources as $testsource) {
407
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
600
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
601
+			        	$dispolar = true;
602
+			        }
408 603
 			    }
409 604
 			    if ($dispolar) {
410 605
 		    ?>
411
-		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
606
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
607
+	print 'checked';
608
+}
609
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
412 610
 		    <?php
413 611
 			    }
414 612
 		        }
@@ -421,12 +619,22 @@  discard block
 block discarded – undo
421 619
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
422 620
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
423 621
 		    ?>
424
-		    <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>
622
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
623
+	print 'checked';
624
+}
625
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
425 626
 		    <?php 
426 627
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
427 628
 		    ?>
428 629
 		    <li><?php echo _("Aircraft icon color:"); ?>
429
-			<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'; ?>">
630
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
631
+	print $_COOKIE['IconColor'];
632
+} elseif (isset($globalAircraftIconColor)) {
633
+	print $globalAircraftIconColor;
634
+} else {
635
+	print '1a3151';
636
+}
637
+?>">
430 638
 		    </li>
431 639
 		    <?php
432 640
 				}
@@ -438,7 +646,14 @@  discard block
 block discarded – undo
438 646
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
439 647
 		    ?>
440 648
 		    <li><?php echo _("Marine icon color:"); ?>
441
-			<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'; ?>">
649
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
650
+	print $_COOKIE['MarineIconColor'];
651
+} elseif (isset($globalMarineIconColor)) {
652
+	print $globalMarineIconColor;
653
+} else {
654
+	print '1a3151';
655
+}
656
+?>">
442 657
 		    </li>
443 658
 		    <?php
444 659
 			    }
@@ -449,7 +664,14 @@  discard block
 block discarded – undo
449 664
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
450 665
 		    ?>
451 666
 		    <li><?php echo _("Tracker icon color:"); ?>
452
-			<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'; ?>">
667
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
668
+	print $_COOKIE['TrackerIconColor'];
669
+} elseif (isset($globalTrackerIconColor)) {
670
+	print $globalTrackerIconColor;
671
+} else {
672
+	print '1a3151';
673
+}
674
+?>">
453 675
 		    </li>
454 676
 		    <?php
455 677
 			    }
@@ -460,8 +682,22 @@  discard block
 block discarded – undo
460 682
 		    ?>
461 683
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
462 684
 			<div class="range">
463
-			    <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'; ?>">
464
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
685
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
686
+	print $_COOKIE['AirportZoom'];
687
+} elseif (isset($globalAirportZoom)) {
688
+	print $globalAirportZoom;
689
+} else {
690
+	print '7';
691
+}
692
+?>">
693
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
694
+	print $_COOKIE['AirportZoom'];
695
+} elseif (isset($globalAirportZoom)) {
696
+	print $globalAirportZoom;
697
+} else {
698
+	print '7';
699
+}
700
+?></output>
465 701
 			</div>
466 702
 		    </li>
467 703
 		    <?php
@@ -473,10 +709,23 @@  discard block
 block discarded – undo
473 709
 <?php
474 710
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
475 711
 ?>
476
-		    <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>
477
-		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li>
712
+		    <li><input type="checkbox" name="useliveries" value="1" onclick="useLiveries(this)" <?php if (isset($_COOKIE['UseLiveries']) && $_COOKIE['UseLiveries'] == 'true') {
713
+	print 'checked';
714
+}
715
+?> ><?php echo _("Use airlines liveries"); ?></li>
716
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
717
+	print 'checked';
718
+}
719
+?> ><?php echo _("Force Aircraft color"); ?></li>
478 720
 		    <li><?php echo _("Aircraft icon color:"); ?>
479
-			<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'; ?>">
721
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
722
+	print $_COOKIE['IconColor'];
723
+} elseif (isset($globalAircraftIconColor)) {
724
+	print $globalAircraftIconColor;
725
+} else {
726
+	print 'ff0000';
727
+}
728
+?>">
480 729
 		    </li>
481 730
 <?php
482 731
 	}
@@ -484,9 +733,19 @@  discard block
 block discarded – undo
484 733
 <?php
485 734
 	if (isset($globalMarine) && $globalMarine === TRUE) {
486 735
 ?>
487
-		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li>
736
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="MarineiconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
737
+	print 'checked';
738
+}
739
+?> ><?php echo _("Force Marine color"); ?></li>
488 740
 		    <li><?php echo _("Marine icon color:"); ?>
489
-			<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'; ?>">
741
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="MarineiconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
742
+	print $_COOKIE['MarineIconColor'];
743
+} elseif (isset($globalMarineIconColor)) {
744
+	print $globalMarineIconColor;
745
+} else {
746
+	print 'ff0000';
747
+}
748
+?>">
490 749
 		    </li>
491 750
 <?php
492 751
 	}
@@ -494,9 +753,19 @@  discard block
 block discarded – undo
494 753
 <?php
495 754
 	if (isset($globalTracker) && $globalTracker === TRUE) {
496 755
 ?>
497
-		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Tracker color"); ?></li>
756
+		    <li><input type="checkbox" name="trackercolorforce" value="1" onclick="TrackericonColorForce(this)" <?php if (isset($_COOKIE['TrackerIconColorForce']) && $_COOKIE['TrackerIconColorForce'] == 'true') {
757
+	print 'checked';
758
+}
759
+?> ><?php echo _("Force Tracker color"); ?></li>
498 760
 		    <li><?php echo _("Tracker icon color:"); ?>
499
-			<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'; ?>">
761
+			<input type="color" name="trackercolor" id="html5colorpicker" onchange="TrackericonColor(trackercolor.value);" value="#<?php if (isset($_COOKIE['TrackerIconColor'])) {
762
+	print $_COOKIE['TrackerIconColor'];
763
+} elseif (isset($globalTrackerIconColor)) {
764
+	print $globalTrackerIconColor;
765
+} else {
766
+	print 'ff0000';
767
+}
768
+?>">
500 769
 		    </li>
501 770
 <?php
502 771
 	}
@@ -504,22 +773,46 @@  discard block
 block discarded – undo
504 773
 ?>
505 774
 		    <li><?php echo _("Distance unit:"); ?>
506 775
 			<select class="selectpicker" onchange="unitdistance(this);">
507
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
508
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
509
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
776
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
777
+	echo ' selected';
778
+}
779
+?>>km</option>
780
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
781
+	echo ' selected';
782
+}
783
+?>>nm</option>
784
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
785
+	echo ' selected';
786
+}
787
+?>>mi</option>
510 788
 		        </select>
511 789
 		    </li>
512 790
 		    <li><?php echo _("Altitude unit:"); ?>
513 791
 			<select class="selectpicker" onchange="unitaltitude(this);">
514
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
515
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
792
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
793
+	echo ' selected';
794
+}
795
+?>>m</option>
796
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
797
+	echo ' selected';
798
+}
799
+?>>feet</option>
516 800
 		        </select>
517 801
 		    </li>
518 802
 		    <li><?php echo _("Speed unit:"); ?>
519 803
 			<select class="selectpicker" onchange="unitspeed(this);">
520
-			    <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>
521
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
522
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
804
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
805
+	echo ' selected';
806
+}
807
+?>>km/h</option>
808
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
809
+	echo ' selected';
810
+}
811
+?>>mph</option>
812
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
813
+	echo ' selected';
814
+}
815
+?>>knots</option>
523 816
 		        </select>
524 817
 		    </li>
525 818
 
@@ -537,9 +830,18 @@  discard block
 block discarded – undo
537 830
 		    <?php
538 831
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
539 832
 		    ?>
540
-			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
541
-			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
542
-			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
833
+			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) {
834
+	print 'checked';
835
+}
836
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
837
+			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) {
838
+	print 'checked';
839
+}
840
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
841
+			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) {
842
+	print 'checked';
843
+}
844
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
543 845
 		    <?php
544 846
 			}
545 847
 		    ?>
@@ -547,10 +849,16 @@  discard block
 block discarded – undo
547 849
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
548 850
 		    ?>
549 851
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
550
-			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
852
+			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) {
853
+	print 'checked';
854
+}
855
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
551 856
 			<?php } ?>
552 857
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
553
-			    <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) print 'checked'; ?> ><?php echo _("Display APRS data"); ?></label></div></li>
858
+			    <li><div class="checkbox"><label><input type="checkbox" name="aprs" value="1" onclick="clickAPRS(this)" <?php if ((isset($_COOKIE['ShowAPRS']) && $_COOKIE['ShowAPRS'] == 'true') || !isset($_COOKIE['ShowAPRS'])) {
859
+	print 'checked';
860
+}
861
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
554 862
 			<?php } ?>
555 863
 		    <?php
556 864
 			}
@@ -567,7 +875,9 @@  discard block
 block discarded – undo
567 875
 				}
568 876
 				foreach($allairlinenames as $airline) {
569 877
 					$airline_name = $airline['airline_name'];
570
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
878
+					if (strlen($airline_name) > 30) {
879
+						$airline_name = substr($airline_name,0,30).'...';
880
+					}
571 881
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
572 882
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
573 883
 					} else {
@@ -585,7 +895,10 @@  discard block
 block discarded – undo
585 895
 		    <li><?php echo _("Display alliance:"); ?>
586 896
 		    <br/>
587 897
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
588
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
898
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
899
+	echo ' selected';
900
+}
901
+?>><?php echo _("All"); ?></option>
589 902
 			    <?php
590 903
 				foreach($allalliancenames as $alliance) {
591 904
 					$alliance_name = $alliance['alliance'];
@@ -644,10 +957,22 @@  discard block
 block discarded – undo
644 957
 		    ?>
645 958
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
646 959
 			<select class="selectpicker" onchange="airlinestype(this);">
647
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
648
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
649
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
650
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
960
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
961
+	echo ' selected';
962
+}
963
+?>><?php echo _("All"); ?></option>
964
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
965
+	echo ' selected';
966
+}
967
+?>><?php echo _("Passenger"); ?></option>
968
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
969
+	echo ' selected';
970
+}
971
+?>><?php echo _("Cargo"); ?></option>
972
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
973
+	echo ' selected';
974
+}
975
+?>><?php echo _("Military"); ?></option>
651 976
 			</select>
652 977
 		    </li>
653 978
 		    <?php
@@ -661,14 +986,20 @@  discard block
 block discarded – undo
661 986
 		    ?>
662 987
 		    <li>
663 988
 			<?php echo _("Display vessels with MMSI:"); ?>
664
-			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) print $_COOKIE['filter_mmsi']; ?>" />
989
+			<input type="text" name="mmsifilter" onchange="mmsifilter();" id="mmsifilter" value="<?php if (isset($_COOKIE['filter_mmsi'])) {
990
+	print $_COOKIE['filter_mmsi'];
991
+}
992
+?>" />
665 993
 		    </li>
666 994
 		    <?php
667 995
 			}
668 996
 		    ?>
669 997
 		    <li>
670 998
 			<?php echo _("Display with ident:"); ?>
671
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
999
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
1000
+	print $_COOKIE['filter_ident'];
1001
+}
1002
+?>" />
672 1003
 		    </li>
673 1004
 		</ul>
674 1005
 	    </form>
@@ -684,7 +1015,10 @@  discard block
 block discarded – undo
684 1015
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
685 1016
 	    <form>
686 1017
 		<ul>
687
-		    <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>
1018
+		    <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'])) {
1019
+	print 'checked';
1020
+}
1021
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
688 1022
 		    <li><?php echo _("Type:"); ?>
689 1023
 			<select class="selectpicker" multiple onchange="sattypes(this);">
690 1024
 			    <?php
@@ -692,25 +1026,45 @@  discard block
 block discarded – undo
692 1026
 				$types = $Satellite->get_tle_types();
693 1027
 				foreach ($types as $type) {
694 1028
 					$type_name = $type['tle_type'];
695
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
696
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
697
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
698
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
699
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
700
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
701
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
702
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
703
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
704
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
705
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
706
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
707
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
708
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
709
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
710
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
711
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
712
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
713
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
1029
+					if ($type_name == 'musson') {
1030
+						$type_name = 'Russian LEO Navigation';
1031
+					} else if ($type_name == 'nnss') {
1032
+						$type_name = 'Navi Navigation Satellite System';
1033
+					} else if ($type_name == 'sbas') {
1034
+						$type_name = 'Satellite-Based Augmentation System';
1035
+					} else if ($type_name == 'glo-ops') {
1036
+						$type_name = 'Glonass Operational';
1037
+					} else if ($type_name == 'gps-ops') {
1038
+						$type_name = 'GPS Operational';
1039
+					} else if ($type_name == 'argos') {
1040
+						$type_name = 'ARGOS Data Collection System';
1041
+					} else if ($type_name == 'tdrss') {
1042
+						$type_name = 'Tracking and Data Relay Satellite System';
1043
+					} else if ($type_name == 'sarsat') {
1044
+						$type_name = 'Search & Rescue';
1045
+					} else if ($type_name == 'dmc') {
1046
+						$type_name = 'Disaster Monitoring';
1047
+					} else if ($type_name == 'resource') {
1048
+						$type_name = 'Earth Resources';
1049
+					} else if ($type_name == 'stations') {
1050
+						$type_name = 'Space Stations';
1051
+					} else if ($type_name == 'geo') {
1052
+						$type_name = 'Geostationary';
1053
+					} else if ($type_name == 'amateur') {
1054
+						$type_name = 'Amateur Radio';
1055
+					} else if ($type_name == 'x-comm') {
1056
+						$type_name = 'Experimental';
1057
+					} else if ($type_name == 'other-comm') {
1058
+						$type_name = 'Other Comm';
1059
+					} else if ($type_name == 'science') {
1060
+						$type_name = 'Space & Earth Science';
1061
+					} else if ($type_name == 'military') {
1062
+						$type_name = 'Miscellaneous Military';
1063
+					} else if ($type_name == 'radar') {
1064
+						$type_name = 'Radar Calibration';
1065
+					} else if ($type_name == 'tle-new') {
1066
+						$type_name = 'Last 30 days launches';
1067
+					}
714 1068
 					
715 1069
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
716 1070
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.
install/index.php 1 patch
Spacing   +272 added lines, -272 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 require_once(dirname(__FILE__).'/class.create_db.php');
23 23
 require_once(dirname(__FILE__).'/class.update_schema.php');
24 24
 require_once(dirname(__FILE__).'/class.settings.php');
25
-$title="Install";
25
+$title = "Install";
26 26
 require(dirname(__FILE__).'/../require/settings.php');
27 27
 require_once(dirname(__FILE__).'/../require/class.Common.php');
28 28
 require(dirname(__FILE__).'/header.php');
@@ -95,8 +95,8 @@  discard block
 block discarded – undo
95 95
 	if (!extension_loaded('curl')) {
96 96
 		$error[] = "Curl is not loaded.";
97 97
 	}
98
-	if(function_exists('apache_get_modules') ){
99
-		if(!in_array('mod_rewrite',apache_get_modules())) {
98
+	if (function_exists('apache_get_modules')) {
99
+		if (!in_array('mod_rewrite', apache_get_modules())) {
100 100
 			$error[] = "mod_rewrite is not available.";
101 101
 		}
102 102
 	/*
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	print '<div class="info column"><p><strong>If you use MySQL or MariaDB, check that <i>max_allowed_packet</i> >= 8M, else import of some table can fail.</strong></p></div>';
113 113
 	if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) {
114 114
 		if (function_exists('get_headers')) {
115
-			$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/','search',str_replace('index.php',$_SERVER["REQUEST_URI"])));
116
-			if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) {
115
+			$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/', 'search', str_replace('index.php', $_SERVER["REQUEST_URI"])));
116
+			if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) {
117 117
 				print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work.</strong></p></div>';
118 118
 			}
119 119
 		}
@@ -503,13 +503,13 @@  discard block
 block discarded – undo
503 503
 ?>
504 504
 							<tr>
505 505
 								<?php
506
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
506
+								    if (filter_var($source['host'], FILTER_VALIDATE_URL)) {
507 507
 								?>
508 508
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
509 509
 								<td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td>
510 510
 								<?php
511 511
 								    } else {
512
-									$hostport = explode(':',$source['host']);
512
+									$hostport = explode(':', $source['host']);
513 513
 									if (isset($hostport[1])) {
514 514
 										$host = $hostport[0];
515 515
 										$port = $hostport[1];
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 									<select name="timezones[]" id="timezones">
558 558
 								<?php
559 559
 									$timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
560
-									foreach($timezonelist as $timezones){
560
+									foreach ($timezonelist as $timezones) {
561 561
 										if (isset($source['timezone']) && $source['timezone'] == $timezones) {
562 562
 											print '<option selected>'.$timezones.'</option>';
563 563
 										} elseif (!isset($source['timezone']) && $timezones == 'UTC') {
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
 									<select name="timezones[]" id="timezones">
611 611
 								<?php
612 612
 									$timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);
613
-									foreach($timezonelist as $timezones){
613
+									foreach ($timezonelist as $timezones) {
614 614
 										if ($timezones == 'UTC') {
615 615
 											print '<option selected>'.$timezones.'</option>';
616 616
 										} else print '<option>'.$timezones.'</option>';
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 			<br />
1020 1020
 			<p>
1021 1021
 				<label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label>
1022
-				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" />
1022
+				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" />
1023 1023
 			</p>
1024 1024
 			<br />
1025 1025
 			<p>
@@ -1081,14 +1081,14 @@  discard block
 block discarded – undo
1081 1081
 $error = '';
1082 1082
 
1083 1083
 if (isset($_POST['dbtype'])) {
1084
-	$dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING);
1085
-	$dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING);
1086
-	$dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING);
1087
-	$dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING);
1088
-	$dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING);
1089
-	$dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING);
1090
-	$dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING);
1091
-	$dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING);
1084
+	$dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING);
1085
+	$dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING);
1086
+	$dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING);
1087
+	$dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING);
1088
+	$dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING);
1089
+	$dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING);
1090
+	$dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING);
1091
+	$dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING);
1092 1092
 
1093 1093
 	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded';
1094 1094
 	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded';
@@ -1108,49 +1108,49 @@  discard block
 block discarded – undo
1108 1108
 	} else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
1109 1109
 	*/
1110 1110
 	
1111
-	$settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
1111
+	$settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname));
1112 1112
 
1113
-	$sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING);
1114
-	$siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING);
1115
-	$timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING);
1116
-	$language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING);
1117
-	$settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language));
1113
+	$sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING);
1114
+	$siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING);
1115
+	$timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING);
1116
+	$language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING);
1117
+	$settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language));
1118 1118
 
1119
-	$mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING);
1120
-	$mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING);
1121
-	$mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING);
1122
-	$googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING);
1123
-	$bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING);
1124
-	$openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING);
1125
-	$mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING);
1126
-	$hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING);
1127
-	$hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING);
1128
-	$settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey));
1119
+	$mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING);
1120
+	$mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING);
1121
+	$mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING);
1122
+	$googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING);
1123
+	$bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING);
1124
+	$openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING);
1125
+	$mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING);
1126
+	$hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING);
1127
+	$hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING);
1128
+	$settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey));
1129 1129
 	
1130
-	$latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING);
1131
-	$latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING);
1132
-	$longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING);
1133
-	$longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING);
1134
-	$livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT);
1135
-	$settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom));
1130
+	$latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING);
1131
+	$latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING);
1132
+	$longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING);
1133
+	$longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING);
1134
+	$livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT);
1135
+	$settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom));
1136 1136
 
1137
-	$squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING);
1138
-	$settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country));
1137
+	$squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING);
1138
+	$settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country));
1139 1139
 
1140
-	$latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING);
1141
-	$longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING);
1142
-	$settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter));
1140
+	$latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING);
1141
+	$longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING);
1142
+	$settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter));
1143 1143
 
1144
-	$acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING);
1144
+	$acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING);
1145 1145
 	if ($acars == 'acars') {
1146
-		$settings = array_merge($settings,array('globalACARS' => 'TRUE'));
1146
+		$settings = array_merge($settings, array('globalACARS' => 'TRUE'));
1147 1147
 	} else {
1148
-		$settings = array_merge($settings,array('globalACARS' => 'FALSE'));
1148
+		$settings = array_merge($settings, array('globalACARS' => 'FALSE'));
1149 1149
 	}
1150 1150
 
1151
-	$flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING);
1152
-	$flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING);
1153
-	$settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword));
1151
+	$flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING);
1152
+	$flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING);
1153
+	$settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword));
1154 1154
 	
1155 1155
 	$source_name = $_POST['source_name'];
1156 1156
 	$source_latitude = $_POST['source_latitude'];
@@ -1164,8 +1164,8 @@  discard block
 block discarded – undo
1164 1164
 	
1165 1165
 	$sources = array();
1166 1166
 	foreach ($source_name as $keys => $name) {
1167
-	    if (isset($source_id[$keys])) $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'id' => $source_id[$keys],'source' => $source_ref[$keys]);
1168
-	    else $sources[] = array('name' => $name,'latitude' => $source_latitude[$keys],'longitude' => $source_longitude[$keys],'altitude' => $source_altitude[$keys],'city' => $source_city[$keys],'country' => $source_country[$keys],'source' => $source_ref[$keys]);
1167
+	    if (isset($source_id[$keys])) $sources[] = array('name' => $name, 'latitude' => $source_latitude[$keys], 'longitude' => $source_longitude[$keys], 'altitude' => $source_altitude[$keys], 'city' => $source_city[$keys], 'country' => $source_country[$keys], 'id' => $source_id[$keys], 'source' => $source_ref[$keys]);
1168
+	    else $sources[] = array('name' => $name, 'latitude' => $source_latitude[$keys], 'longitude' => $source_longitude[$keys], 'altitude' => $source_altitude[$keys], 'city' => $source_city[$keys], 'country' => $source_country[$keys], 'source' => $source_ref[$keys]);
1169 1169
 	}
1170 1170
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
1171 1171
 
@@ -1174,16 +1174,16 @@  discard block
 block discarded – undo
1174 1174
 	$newstype = $_POST['newstype'];
1175 1175
 	
1176 1176
 	$newsfeeds = array();
1177
-	foreach($newsurl as $newskey => $url) {
1177
+	foreach ($newsurl as $newskey => $url) {
1178 1178
 	    if ($url != '') {
1179 1179
 		$type = $newstype[$newskey];
1180 1180
 		$lng = $newslng[$newskey];
1181 1181
 		if (isset($newsfeeds[$type][$lng])) {
1182
-		    $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1182
+		    $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng], array($url));
1183 1183
 		} else $newsfeeds[$type][$lng] = array($url);
1184 1184
 	    }
1185 1185
 	}
1186
-	$settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds));
1186
+	$settings = array_merge($settings, array('globalNewsFeeds' => $newsfeeds));
1187 1187
 
1188 1188
 	//$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING);
1189 1189
 	//$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT);
@@ -1194,27 +1194,27 @@  discard block
 block discarded – undo
1194 1194
 	$sbsurl = $_POST['sbsurl'];
1195 1195
 	*/
1196 1196
 
1197
-	$globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING);
1198
-	$globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING);
1199
-	$globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING);
1200
-	$globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING);
1201
-	$globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING);
1202
-	$globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING);
1203
-	$globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING);
1204
-	$datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING);
1197
+	$globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING);
1198
+	$globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING);
1199
+	$globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING);
1200
+	$globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING);
1201
+	$globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING);
1202
+	$globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING);
1203
+	$globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING);
1204
+	$datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING);
1205 1205
 
1206
-	$globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING);
1207
-	if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
1208
-	else $settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
1209
-	$globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING);
1210
-	if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE'));
1211
-	else $settings = array_merge($settings,array('globalTracker' => 'FALSE'));
1212
-	$globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING);
1213
-	if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE'));
1214
-	else $settings = array_merge($settings,array('globalMarine' => 'FALSE'));
1215
-	$globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING);
1216
-	if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE'));
1217
-	else $settings = array_merge($settings,array('globalSatellite' => 'FALSE'));
1206
+	$globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING);
1207
+	if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE'));
1208
+	else $settings = array_merge($settings, array('globalAircraft' => 'FALSE'));
1209
+	$globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING);
1210
+	if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE'));
1211
+	else $settings = array_merge($settings, array('globalTracker' => 'FALSE'));
1212
+	$globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING);
1213
+	if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE'));
1214
+	else $settings = array_merge($settings, array('globalMarine' => 'FALSE'));
1215
+	$globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING);
1216
+	if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE'));
1217
+	else $settings = array_merge($settings, array('globalSatellite' => 'FALSE'));
1218 1218
 
1219 1219
 /*	
1220 1220
 	$globalSBS1Hosts = array();
@@ -1230,7 +1230,7 @@  discard block
 block discarded – undo
1230 1230
 	}
1231 1231
 	$settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts));
1232 1232
 */
1233
-	$settings_comment = array_merge($settings_comment,array('globalSBS1Hosts'));
1233
+	$settings_comment = array_merge($settings_comment, array('globalSBS1Hosts'));
1234 1234
 	$host = $_POST['host'];
1235 1235
 	$port = $_POST['port'];
1236 1236
 	$name = $_POST['name'];
@@ -1247,113 +1247,113 @@  discard block
 block discarded – undo
1247 1247
 		else $cov = 'FALSE';
1248 1248
 		if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE';
1249 1249
 		else $arch = 'FALSE';
1250
-		if (strpos($format[$key],'_callback')) {
1251
-			$gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE');
1250
+		if (strpos($format[$key], '_callback')) {
1251
+			$gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE');
1252 1252
 		} elseif ($h != '' || $name[$key] != '') {
1253
-			$gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE');
1253
+			$gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE');
1254 1254
 		}
1255 1255
 		if ($format[$key] == 'airwhere') $forcepilots = true;
1256 1256
 	}
1257
-	$settings = array_merge($settings,array('globalSources' => $gSources));
1257
+	$settings = array_merge($settings, array('globalSources' => $gSources));
1258 1258
 
1259 1259
 /*
1260 1260
 	$sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT);
1261 1261
 	$settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout));
1262 1262
 */
1263
-	$acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING);
1264
-	$acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT);
1265
-	$settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport));
1263
+	$acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING);
1264
+	$acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT);
1265
+	$settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport));
1266 1266
 
1267
-	$bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING);
1268
-	$settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly));
1267
+	$bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING);
1268
+	$settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly));
1269 1269
 
1270
-	$customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING);
1271
-	$settings = array_merge($settings,array('globalCustomCSS' => $customcss));
1270
+	$customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING);
1271
+	$settings = array_merge($settings, array('globalCustomCSS' => $customcss));
1272 1272
 
1273
-	$map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING);
1274
-	$settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile));
1273
+	$map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING);
1274
+	$settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile));
1275 1275
 
1276
-	$notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING);
1277
-	$settings = array_merge($settings,array('globalNOTAMSource' => $notamsource));
1278
-	$metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING);
1279
-	$settings = array_merge($settings,array('globalMETARurl' => $metarsource));
1276
+	$notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING);
1277
+	$settings = array_merge($settings, array('globalNOTAMSource' => $notamsource));
1278
+	$metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING);
1279
+	$settings = array_merge($settings, array('globalMETARurl' => $metarsource));
1280 1280
 
1281
-	$zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING);
1282
-	$zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING);
1283
-	$zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT);
1281
+	$zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING);
1282
+	$zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING);
1283
+	$zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT);
1284 1284
 	if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') {
1285
-		$settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance)));
1286
-	} else $settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1285
+		$settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance)));
1286
+	} else $settings = array_merge($settings, array('globalDistanceIgnore' => array()));
1287 1287
 
1288
-	$refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT);
1289
-	$settings = array_merge($settings,array('globalLiveInterval' => $refresh));
1290
-	$maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT);
1291
-	$settings = array_merge($settings,array('globalMapRefresh' => $maprefresh));
1292
-	$mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT);
1293
-	$settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle));
1294
-	$closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT);
1295
-	$settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist));
1288
+	$refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT);
1289
+	$settings = array_merge($settings, array('globalLiveInterval' => $refresh));
1290
+	$maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT);
1291
+	$settings = array_merge($settings, array('globalMapRefresh' => $maprefresh));
1292
+	$mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT);
1293
+	$settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle));
1294
+	$closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT);
1295
+	$settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist));
1296 1296
 
1297
-	$aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT);
1298
-	$settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize));
1297
+	$aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT);
1298
+	$settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize));
1299 1299
 
1300
-	$archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT);
1301
-	$settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths));
1300
+	$archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT);
1301
+	$settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths));
1302 1302
 	
1303
-	$archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING);
1303
+	$archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING);
1304 1304
 	if ($archiveyear == "archiveyear") {
1305
-		$settings = array_merge($settings,array('globalArchiveYear' => 'TRUE'));
1305
+		$settings = array_merge($settings, array('globalArchiveYear' => 'TRUE'));
1306 1306
 	} else {
1307
-		$settings = array_merge($settings,array('globalArchiveYear' => 'FALSE'));
1307
+		$settings = array_merge($settings, array('globalArchiveYear' => 'FALSE'));
1308 1308
 	}
1309
-	$archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT);
1310
-	$settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths));
1311
-	$archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT);
1312
-	$settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1309
+	$archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT);
1310
+	$settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths));
1311
+	$archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT);
1312
+	$settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1313 1313
 
1314
-	$britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING);
1315
-	$settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways));
1316
-	$transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING);
1317
-	$settings = array_merge($settings,array('globalTransaviaKey' => $transavia));
1314
+	$britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING);
1315
+	$settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways));
1316
+	$transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING);
1317
+	$settings = array_merge($settings, array('globalTransaviaKey' => $transavia));
1318 1318
 
1319
-	$lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING);
1320
-	$lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING);
1321
-	$settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret)));
1319
+	$lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING);
1320
+	$lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING);
1321
+	$settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret)));
1322 1322
 
1323 1323
 	// Create in settings.php keys not yet configurable if not already here
1324 1324
 	//if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => ''));
1325
-	if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1325
+	if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE'));
1326 1326
 
1327
-	$resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING);
1327
+	$resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING);
1328 1328
 	if ($resetyearstats == 'resetyearstats') {
1329
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE'));
1329
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE'));
1330 1330
 	} else {
1331
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE'));
1331
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE'));
1332 1332
 	}
1333 1333
 
1334
-	$archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING);
1334
+	$archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING);
1335 1335
 	if ($archive == 'archive') {
1336
-		$settings = array_merge($settings,array('globalArchive' => 'TRUE'));
1336
+		$settings = array_merge($settings, array('globalArchive' => 'TRUE'));
1337 1337
 	} else {
1338
-		$settings = array_merge($settings,array('globalArchive' => 'FALSE'));
1338
+		$settings = array_merge($settings, array('globalArchive' => 'FALSE'));
1339 1339
 	}
1340
-	$archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING);
1340
+	$archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING);
1341 1341
 	if ($archiveresults == 'archiveresults') {
1342
-		$settings = array_merge($settings,array('globalArchiveResults' => 'TRUE'));
1342
+		$settings = array_merge($settings, array('globalArchiveResults' => 'TRUE'));
1343 1343
 	} else {
1344
-		$settings = array_merge($settings,array('globalArchiveResults' => 'FALSE'));
1344
+		$settings = array_merge($settings, array('globalArchiveResults' => 'FALSE'));
1345 1345
 	}
1346
-	$daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING);
1346
+	$daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING);
1347 1347
 	if ($daemon == 'daemon') {
1348
-		$settings = array_merge($settings,array('globalDaemon' => 'TRUE'));
1348
+		$settings = array_merge($settings, array('globalDaemon' => 'TRUE'));
1349 1349
 	} else {
1350
-		$settings = array_merge($settings,array('globalDaemon' => 'FALSE'));
1350
+		$settings = array_merge($settings, array('globalDaemon' => 'FALSE'));
1351 1351
 	}
1352
-	$schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING);
1352
+	$schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING);
1353 1353
 	if ($schedules == 'schedules') {
1354
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE'));
1354
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE'));
1355 1355
 	} else {
1356
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE'));
1356
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE'));
1357 1357
 	}
1358 1358
 
1359 1359
 /*
@@ -1364,264 +1364,264 @@  discard block
 block discarded – undo
1364 1364
 		$settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE'));
1365 1365
 	}
1366 1366
 */
1367
-	$settings = array_merge($settings,array('globalFlightAware' => 'FALSE'));
1368
-	if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1369
-	else $settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1370
-	if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1371
-	else $settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1367
+	$settings = array_merge($settings, array('globalFlightAware' => 'FALSE'));
1368
+	if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE'));
1369
+	else $settings = array_merge($settings, array('globalSBS1' => 'FALSE'));
1370
+	if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE'));
1371
+	else $settings = array_merge($settings, array('globalAPRS' => 'FALSE'));
1372 1372
 	$va = false;
1373 1373
 	if ($globalivao == 'ivao') {
1374
-		$settings = array_merge($settings,array('globalIVAO' => 'TRUE'));
1374
+		$settings = array_merge($settings, array('globalIVAO' => 'TRUE'));
1375 1375
 		$va = true;
1376
-	} else $settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1376
+	} else $settings = array_merge($settings, array('globalIVAO' => 'FALSE'));
1377 1377
 	if ($globalvatsim == 'vatsim') {
1378
-		$settings = array_merge($settings,array('globalVATSIM' => 'TRUE'));
1378
+		$settings = array_merge($settings, array('globalVATSIM' => 'TRUE'));
1379 1379
 		$va = true;
1380
-	} else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1380
+	} else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE'));
1381 1381
 	if ($globalphpvms == 'phpvms') {
1382
-		$settings = array_merge($settings,array('globalphpVMS' => 'TRUE'));
1382
+		$settings = array_merge($settings, array('globalphpVMS' => 'TRUE'));
1383 1383
 		$va = true;
1384
-	} else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1384
+	} else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE'));
1385 1385
 	if ($globalvam == 'vam') {
1386
-		$settings = array_merge($settings,array('globalVAM' => 'TRUE'));
1386
+		$settings = array_merge($settings, array('globalVAM' => 'TRUE'));
1387 1387
 		$va = true;
1388
-	} else $settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1388
+	} else $settings = array_merge($settings, array('globalVAM' => 'FALSE'));
1389 1389
 	if ($va) {
1390
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE'));
1391
-	} else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1390
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE'));
1391
+	} else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE'));
1392 1392
 	if ($globalva == 'va' || $va) {
1393
-		$settings = array_merge($settings,array('globalVA' => 'TRUE'));
1394
-		$settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE'));
1393
+		$settings = array_merge($settings, array('globalVA' => 'TRUE'));
1394
+		$settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE'));
1395 1395
 	} else {
1396
-		$settings = array_merge($settings,array('globalVA' => 'FALSE'));
1397
-		if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE'));
1398
-		else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE'));
1396
+		$settings = array_merge($settings, array('globalVA' => 'FALSE'));
1397
+		if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE'));
1398
+		else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE'));
1399 1399
 	}
1400 1400
 	
1401 1401
 	
1402
-	$mapoffline = filter_input(INPUT_POST,'mapoffline',FILTER_SANITIZE_STRING);
1402
+	$mapoffline = filter_input(INPUT_POST, 'mapoffline', FILTER_SANITIZE_STRING);
1403 1403
 	if ($mapoffline == 'mapoffline') {
1404
-		$settings = array_merge($settings,array('globalMapOffline' => 'TRUE'));
1404
+		$settings = array_merge($settings, array('globalMapOffline' => 'TRUE'));
1405 1405
 	} else {
1406
-		$settings = array_merge($settings,array('globalMapOffline' => 'FALSE'));
1406
+		$settings = array_merge($settings, array('globalMapOffline' => 'FALSE'));
1407 1407
 	}
1408
-	$globaloffline = filter_input(INPUT_POST,'globaloffline',FILTER_SANITIZE_STRING);
1408
+	$globaloffline = filter_input(INPUT_POST, 'globaloffline', FILTER_SANITIZE_STRING);
1409 1409
 	if ($globaloffline == 'globaloffline') {
1410
-		$settings = array_merge($settings,array('globalOffline' => 'TRUE'));
1410
+		$settings = array_merge($settings, array('globalOffline' => 'TRUE'));
1411 1411
 	} else {
1412
-		$settings = array_merge($settings,array('globalOffline' => 'FALSE'));
1412
+		$settings = array_merge($settings, array('globalOffline' => 'FALSE'));
1413 1413
 	}
1414 1414
 
1415
-	$notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING);
1415
+	$notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING);
1416 1416
 	if ($notam == 'notam') {
1417
-		$settings = array_merge($settings,array('globalNOTAM' => 'TRUE'));
1417
+		$settings = array_merge($settings, array('globalNOTAM' => 'TRUE'));
1418 1418
 	} else {
1419
-		$settings = array_merge($settings,array('globalNOTAM' => 'FALSE'));
1419
+		$settings = array_merge($settings, array('globalNOTAM' => 'FALSE'));
1420 1420
 	}
1421
-	$owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING);
1421
+	$owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING);
1422 1422
 	if ($owner == 'owner') {
1423
-		$settings = array_merge($settings,array('globalOwner' => 'TRUE'));
1423
+		$settings = array_merge($settings, array('globalOwner' => 'TRUE'));
1424 1424
 	} else {
1425
-		$settings = array_merge($settings,array('globalOwner' => 'FALSE'));
1425
+		$settings = array_merge($settings, array('globalOwner' => 'FALSE'));
1426 1426
 	}
1427
-	$map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING);
1427
+	$map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING);
1428 1428
 	if ($map3d == 'map3d') {
1429
-		$settings = array_merge($settings,array('globalMap3D' => 'TRUE'));
1429
+		$settings = array_merge($settings, array('globalMap3D' => 'TRUE'));
1430 1430
 	} else {
1431
-		$settings = array_merge($settings,array('globalMap3D' => 'FALSE'));
1431
+		$settings = array_merge($settings, array('globalMap3D' => 'FALSE'));
1432 1432
 	}
1433
-	$crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING);
1433
+	$crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING);
1434 1434
 	if ($crash == 'crash') {
1435
-		$settings = array_merge($settings,array('globalAccidents' => 'TRUE'));
1435
+		$settings = array_merge($settings, array('globalAccidents' => 'TRUE'));
1436 1436
 	} else {
1437
-		$settings = array_merge($settings,array('globalAccidents' => 'FALSE'));
1437
+		$settings = array_merge($settings, array('globalAccidents' => 'FALSE'));
1438 1438
 	}
1439
-	$fires = filter_input(INPUT_POST,'fires',FILTER_SANITIZE_STRING);
1439
+	$fires = filter_input(INPUT_POST, 'fires', FILTER_SANITIZE_STRING);
1440 1440
 	if ($fires == 'fires') {
1441
-		$settings = array_merge($settings,array('globalMapFires' => 'TRUE'));
1441
+		$settings = array_merge($settings, array('globalMapFires' => 'TRUE'));
1442 1442
 	} else {
1443
-		$settings = array_merge($settings,array('globalMapFires' => 'FALSE'));
1443
+		$settings = array_merge($settings, array('globalMapFires' => 'FALSE'));
1444 1444
 	}
1445
-	$firessupport = filter_input(INPUT_POST,'firessupport',FILTER_SANITIZE_STRING);
1445
+	$firessupport = filter_input(INPUT_POST, 'firessupport', FILTER_SANITIZE_STRING);
1446 1446
 	if ($firessupport == 'firessupport') {
1447
-		$settings = array_merge($settings,array('globalFires' => 'TRUE'));
1447
+		$settings = array_merge($settings, array('globalFires' => 'TRUE'));
1448 1448
 	} else {
1449
-		$settings = array_merge($settings,array('globalFires' => 'FALSE'));
1449
+		$settings = array_merge($settings, array('globalFires' => 'FALSE'));
1450 1450
 	}
1451
-	$mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING);
1451
+	$mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING);
1452 1452
 	if ($mapsatellites == 'mapsatellites') {
1453
-		$settings = array_merge($settings,array('globalMapSatellites' => 'TRUE'));
1453
+		$settings = array_merge($settings, array('globalMapSatellites' => 'TRUE'));
1454 1454
 	} else {
1455
-		$settings = array_merge($settings,array('globalMapSatellites' => 'FALSE'));
1455
+		$settings = array_merge($settings, array('globalMapSatellites' => 'FALSE'));
1456 1456
 	}
1457
-	$map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING);
1457
+	$map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING);
1458 1458
 	if ($map3ddefault == 'map3ddefault') {
1459
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE'));
1459
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE'));
1460 1460
 	} else {
1461
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE'));
1461
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE'));
1462 1462
 	}
1463
-	$map3dliveries = filter_input(INPUT_POST,'map3dliveries',FILTER_SANITIZE_STRING);
1463
+	$map3dliveries = filter_input(INPUT_POST, 'map3dliveries', FILTER_SANITIZE_STRING);
1464 1464
 	if ($map3dliveries == 'map3dliveries') {
1465
-		$settings = array_merge($settings,array('globalMap3DLiveries' => 'TRUE'));
1465
+		$settings = array_merge($settings, array('globalMap3DLiveries' => 'TRUE'));
1466 1466
 	} else {
1467
-		$settings = array_merge($settings,array('globalMap3DLiveries' => 'FALSE'));
1467
+		$settings = array_merge($settings, array('globalMap3DLiveries' => 'FALSE'));
1468 1468
 	}
1469
-	$translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING);
1469
+	$translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING);
1470 1470
 	if ($translate == 'translate') {
1471
-		$settings = array_merge($settings,array('globalTranslate' => 'TRUE'));
1471
+		$settings = array_merge($settings, array('globalTranslate' => 'TRUE'));
1472 1472
 	} else {
1473
-		$settings = array_merge($settings,array('globalTranslate' => 'FALSE'));
1473
+		$settings = array_merge($settings, array('globalTranslate' => 'FALSE'));
1474 1474
 	}
1475
-	$realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING);
1475
+	$realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING);
1476 1476
 	if ($realairlines == 'realairlines') {
1477
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE'));
1477
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE'));
1478 1478
 	} else {
1479
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE'));
1479
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE'));
1480 1480
 	}
1481
-	$estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING);
1481
+	$estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING);
1482 1482
 	if ($estimation == 'estimation') {
1483
-		$settings = array_merge($settings,array('globalMapEstimation' => 'TRUE'));
1483
+		$settings = array_merge($settings, array('globalMapEstimation' => 'TRUE'));
1484 1484
 	} else {
1485
-		$settings = array_merge($settings,array('globalMapEstimation' => 'FALSE'));
1485
+		$settings = array_merge($settings, array('globalMapEstimation' => 'FALSE'));
1486 1486
 	}
1487
-	$metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING);
1487
+	$metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING);
1488 1488
 	if ($metar == 'metar') {
1489
-		$settings = array_merge($settings,array('globalMETAR' => 'TRUE'));
1489
+		$settings = array_merge($settings, array('globalMETAR' => 'TRUE'));
1490 1490
 	} else {
1491
-		$settings = array_merge($settings,array('globalMETAR' => 'FALSE'));
1491
+		$settings = array_merge($settings, array('globalMETAR' => 'FALSE'));
1492 1492
 	}
1493
-	$metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING);
1493
+	$metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING);
1494 1494
 	if ($metarcycle == 'metarcycle') {
1495
-		$settings = array_merge($settings,array('globalMETARcycle' => 'TRUE'));
1495
+		$settings = array_merge($settings, array('globalMETARcycle' => 'TRUE'));
1496 1496
 	} else {
1497
-		$settings = array_merge($settings,array('globalMETARcycle' => 'FALSE'));
1497
+		$settings = array_merge($settings, array('globalMETARcycle' => 'FALSE'));
1498 1498
 	}
1499
-	$fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING);
1499
+	$fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING);
1500 1500
 	if ($fork == 'fork') {
1501
-		$settings = array_merge($settings,array('globalFork' => 'TRUE'));
1501
+		$settings = array_merge($settings, array('globalFork' => 'TRUE'));
1502 1502
 	} else {
1503
-		$settings = array_merge($settings,array('globalFork' => 'FALSE'));
1503
+		$settings = array_merge($settings, array('globalFork' => 'FALSE'));
1504 1504
 	}
1505 1505
 
1506
-	$colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING);
1506
+	$colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING);
1507 1507
 	if ($colormap == 'colormap') {
1508
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE'));
1508
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE'));
1509 1509
 	} else {
1510
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE'));
1510
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE'));
1511 1511
 	}
1512 1512
 	
1513 1513
 	if (isset($_POST['aircrafticoncolor'])) {
1514
-		$aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING);
1515
-		$settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1)));
1514
+		$aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING);
1515
+		$settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1)));
1516 1516
 	}
1517 1517
 
1518
-	$airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT);
1519
-	$settings = array_merge($settings,array('globalAirportZoom' => $airportzoom));
1518
+	$airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT);
1519
+	$settings = array_merge($settings, array('globalAirportZoom' => $airportzoom));
1520 1520
 
1521
-	$unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING);
1522
-	$settings = array_merge($settings,array('globalUnitDistance' => $unitdistance));
1523
-	$unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING);
1524
-	$settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude));
1525
-	$unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING);
1526
-	$settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed));
1521
+	$unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING);
1522
+	$settings = array_merge($settings, array('globalUnitDistance' => $unitdistance));
1523
+	$unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING);
1524
+	$settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude));
1525
+	$unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING);
1526
+	$settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed));
1527 1527
 
1528
-	$mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING);
1528
+	$mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING);
1529 1529
 	if ($mappopup == 'mappopup') {
1530
-		$settings = array_merge($settings,array('globalMapPopup' => 'TRUE'));
1530
+		$settings = array_merge($settings, array('globalMapPopup' => 'TRUE'));
1531 1531
 	} else {
1532
-		$settings = array_merge($settings,array('globalMapPopup' => 'FALSE'));
1532
+		$settings = array_merge($settings, array('globalMapPopup' => 'FALSE'));
1533 1533
 	}
1534
-	$airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING);
1534
+	$airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING);
1535 1535
 	if ($airportpopup == 'airportpopup') {
1536
-		$settings = array_merge($settings,array('globalAirportPopup' => 'TRUE'));
1536
+		$settings = array_merge($settings, array('globalAirportPopup' => 'TRUE'));
1537 1537
 	} else {
1538
-		$settings = array_merge($settings,array('globalAirportPopup' => 'FALSE'));
1538
+		$settings = array_merge($settings, array('globalAirportPopup' => 'FALSE'));
1539 1539
 	}
1540
-	$maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING);
1540
+	$maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING);
1541 1541
 	if ($maphistory == 'maphistory') {
1542
-		$settings = array_merge($settings,array('globalMapHistory' => 'TRUE'));
1542
+		$settings = array_merge($settings, array('globalMapHistory' => 'TRUE'));
1543 1543
 	} else {
1544
-		$settings = array_merge($settings,array('globalMapHistory' => 'FALSE'));
1544
+		$settings = array_merge($settings, array('globalMapHistory' => 'FALSE'));
1545 1545
 	}
1546
-	$maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING);
1546
+	$maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING);
1547 1547
 	if ($maptooltip == 'maptooltip') {
1548
-		$settings = array_merge($settings,array('globalMapTooltip' => 'TRUE'));
1548
+		$settings = array_merge($settings, array('globalMapTooltip' => 'TRUE'));
1549 1549
 	} else {
1550
-		$settings = array_merge($settings,array('globalMapTooltip' => 'FALSE'));
1550
+		$settings = array_merge($settings, array('globalMapTooltip' => 'FALSE'));
1551 1551
 	}
1552
-	$flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING);
1552
+	$flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING);
1553 1553
 	if ($flightroute == 'flightroute') {
1554
-		$settings = array_merge($settings,array('globalMapRoute' => 'TRUE'));
1554
+		$settings = array_merge($settings, array('globalMapRoute' => 'TRUE'));
1555 1555
 	} else {
1556
-		$settings = array_merge($settings,array('globalMapRoute' => 'FALSE'));
1556
+		$settings = array_merge($settings, array('globalMapRoute' => 'FALSE'));
1557 1557
 	}
1558
-	$flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING);
1558
+	$flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING);
1559 1559
 	if ($flightremainingroute == 'flightremainingroute') {
1560
-		$settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE'));
1560
+		$settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE'));
1561 1561
 	} else {
1562
-		$settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE'));
1562
+		$settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE'));
1563 1563
 	}
1564
-	$allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING);
1564
+	$allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING);
1565 1565
 	if ($allflights == 'allflights') {
1566
-		$settings = array_merge($settings,array('globalAllFlights' => 'TRUE'));
1566
+		$settings = array_merge($settings, array('globalAllFlights' => 'TRUE'));
1567 1567
 	} else {
1568
-		$settings = array_merge($settings,array('globalAllFlights' => 'FALSE'));
1568
+		$settings = array_merge($settings, array('globalAllFlights' => 'FALSE'));
1569 1569
 	}
1570
-	$bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING);
1570
+	$bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING);
1571 1571
 	if ($bbox == 'bbox') {
1572
-		$settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE'));
1572
+		$settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE'));
1573 1573
 	} else {
1574
-		$settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE'));
1574
+		$settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE'));
1575 1575
 	}
1576
-	$groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING);
1576
+	$groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING);
1577 1577
 	if ($groundaltitude == 'groundaltitude') {
1578
-		$settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE'));
1578
+		$settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE'));
1579 1579
 	} else {
1580
-		$settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE'));
1580
+		$settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE'));
1581 1581
 	}
1582
-	$waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING);
1582
+	$waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING);
1583 1583
 	if ($waypoints == 'waypoints') {
1584
-		$settings = array_merge($settings,array('globalWaypoints' => 'TRUE'));
1584
+		$settings = array_merge($settings, array('globalWaypoints' => 'TRUE'));
1585 1585
 	} else {
1586
-		$settings = array_merge($settings,array('globalWaypoints' => 'FALSE'));
1586
+		$settings = array_merge($settings, array('globalWaypoints' => 'FALSE'));
1587 1587
 	}
1588
-	$geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING);
1588
+	$geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING);
1589 1589
 	if ($geoid == 'geoid') {
1590
-		$settings = array_merge($settings,array('globalGeoid' => 'TRUE'));
1590
+		$settings = array_merge($settings, array('globalGeoid' => 'TRUE'));
1591 1591
 	} else {
1592
-		$settings = array_merge($settings,array('globalGeoid' => 'FALSE'));
1592
+		$settings = array_merge($settings, array('globalGeoid' => 'FALSE'));
1593 1593
 	}
1594
-	$geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING);
1595
-	$settings = array_merge($settings,array('globalGeoidSource' => $geoid_source));
1594
+	$geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING);
1595
+	$settings = array_merge($settings, array('globalGeoidSource' => $geoid_source));
1596 1596
 
1597
-	$noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING);
1597
+	$noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING);
1598 1598
 	if ($noairlines == 'noairlines') {
1599
-		$settings = array_merge($settings,array('globalNoAirlines' => 'TRUE'));
1599
+		$settings = array_merge($settings, array('globalNoAirlines' => 'TRUE'));
1600 1600
 	} else {
1601
-		$settings = array_merge($settings,array('globalNoAirlines' => 'FALSE'));
1601
+		$settings = array_merge($settings, array('globalNoAirlines' => 'FALSE'));
1602 1602
 	}
1603 1603
 
1604
-	$tsk = filter_input(INPUT_POST,'tsk',FILTER_SANITIZE_STRING);
1604
+	$tsk = filter_input(INPUT_POST, 'tsk', FILTER_SANITIZE_STRING);
1605 1605
 	if ($tsk == 'tsk') {
1606
-		$settings = array_merge($settings,array('globalTSK' => 'TRUE'));
1606
+		$settings = array_merge($settings, array('globalTSK' => 'TRUE'));
1607 1607
 	} else {
1608
-		$settings = array_merge($settings,array('globalTSK' => 'FALSE'));
1608
+		$settings = array_merge($settings, array('globalTSK' => 'FALSE'));
1609 1609
 	}
1610 1610
 
1611
-	if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
1611
+	if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE'));
1612 1612
 
1613 1613
 	// Set some defaults values...
1614 1614
 	if (!isset($globalAircraftImageSources)) {
1615
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1616
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1615
+	    $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters');
1616
+	    $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources));
1617 1617
 	}
1618 1618
 
1619 1619
 	if (!isset($globalSchedulesSources)) {
1620
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1621
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1620
+	    $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware');
1621
+    	    $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources));
1622 1622
     	}
1623 1623
 
1624
-	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1624
+	$settings = array_merge($settings, array('globalInstalled' => 'TRUE'));
1625 1625
 
1626 1626
 	if ($error == '') settings::modify_settings($settings);
1627 1627
 	if ($error == '') settings::comment_settings($settings_comment);
Please login to merge, or discard this patch.