Completed
Push — master ( 2874a1...1a51fc )
by Yannick
09:22
created
install/index.php 1 patch
Spacing   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 require_once(dirname(__FILE__).'/class.create_db.php');
11 11
 require_once(dirname(__FILE__).'/class.update_schema.php');
12 12
 require_once(dirname(__FILE__).'/class.settings.php');
13
-$title="Install";
13
+$title = "Install";
14 14
 require(dirname(__FILE__).'/../require/settings.php');
15 15
 require(dirname(__FILE__).'/header.php');
16 16
 
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
 if (!extension_loaded('curl')) {
70 70
 	$error[] = "Curl is not loaded.";
71 71
 }
72
-if(function_exists('apache_get_modules') ){
73
-	if(!in_array('mod_rewrite',apache_get_modules())) {
72
+if (function_exists('apache_get_modules')) {
73
+	if (!in_array('mod_rewrite', apache_get_modules())) {
74 74
 		$error[] = "mod_rewrite is not available.";
75 75
 	}
76 76
 /*
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 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>';
87 87
 if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) {
88 88
 	if (function_exists('get_headers')) {
89
-		$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/','search',str_replace('index.php',$_SERVER["REQUEST_URI"])));
90
-		if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) {
89
+		$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/', 'search', str_replace('index.php', $_SERVER["REQUEST_URI"])));
90
+		if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) {
91 91
 			print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work.</strong></p></div>';
92 92
 		}
93 93
 	}
@@ -441,13 +441,13 @@  discard block
 block discarded – undo
441 441
 ?>
442 442
 							<tr>
443 443
 								<?php
444
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
444
+								    if (filter_var($source['host'], FILTER_VALIDATE_URL)) {
445 445
 								?>
446 446
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
447 447
 								<td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td>
448 448
 								<?php
449 449
 								    } else {
450
-									$hostport = explode(':',$source['host']);
450
+									$hostport = explode(':', $source['host']);
451 451
 									if (isset($hostport[1])) {
452 452
 										$host = $hostport[0];
453 453
 										$port = $hostport[1];
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
 			<br />
800 800
 			<p>
801 801
 				<label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label>
802
-				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" />
802
+				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" />
803 803
 			</p>
804 804
 			<br />
805 805
 			<p>
@@ -855,14 +855,14 @@  discard block
 block discarded – undo
855 855
 $error = '';
856 856
 
857 857
 if (isset($_POST['dbtype'])) {
858
-	$dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING);
859
-	$dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING);
860
-	$dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING);
861
-	$dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING);
862
-	$dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING);
863
-	$dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING);
864
-	$dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING);
865
-	$dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING);
858
+	$dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING);
859
+	$dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING);
860
+	$dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING);
861
+	$dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING);
862
+	$dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING);
863
+	$dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING);
864
+	$dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING);
865
+	$dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING);
866 866
 
867 867
 	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded';
868 868
 	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded';
@@ -882,48 +882,48 @@  discard block
 block discarded – undo
882 882
 	} else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
883 883
 	*/
884 884
 	
885
-	$settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
885
+	$settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname));
886 886
 
887
-	$sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING);
888
-	$siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING);
889
-	$timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING);
890
-	$language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING);
891
-	$settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language));
887
+	$sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING);
888
+	$siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING);
889
+	$timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING);
890
+	$language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING);
891
+	$settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language));
892 892
 
893
-	$mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING);
894
-	$mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING);
895
-	$mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING);
896
-	$googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING);
897
-	$bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING);
898
-	$mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING);
899
-	$hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING);
900
-	$hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING);
901
-	$settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey));
893
+	$mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING);
894
+	$mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING);
895
+	$mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING);
896
+	$googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING);
897
+	$bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING);
898
+	$mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING);
899
+	$hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING);
900
+	$hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING);
901
+	$settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey));
902 902
 	
903
-	$latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING);
904
-	$latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING);
905
-	$longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING);
906
-	$longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING);
907
-	$livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT);
908
-	$settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom));
903
+	$latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING);
904
+	$latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING);
905
+	$longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING);
906
+	$longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING);
907
+	$livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT);
908
+	$settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom));
909 909
 
910
-	$squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING);
911
-	$settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country));
910
+	$squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING);
911
+	$settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country));
912 912
 
913
-	$latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING);
914
-	$longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING);
915
-	$settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter));
913
+	$latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING);
914
+	$longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING);
915
+	$settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter));
916 916
 
917
-	$acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING);
917
+	$acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING);
918 918
 	if ($acars == 'acars') {
919
-		$settings = array_merge($settings,array('globalACARS' => 'TRUE'));
919
+		$settings = array_merge($settings, array('globalACARS' => 'TRUE'));
920 920
 	} else {
921
-		$settings = array_merge($settings,array('globalACARS' => 'FALSE'));
921
+		$settings = array_merge($settings, array('globalACARS' => 'FALSE'));
922 922
 	}
923 923
 
924
-	$flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING);
925
-	$flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING);
926
-	$settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword));
924
+	$flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING);
925
+	$flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING);
926
+	$settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword));
927 927
 	
928 928
 	$source_name = $_POST['source_name'];
929 929
 	$source_latitude = $_POST['source_latitude'];
@@ -937,8 +937,8 @@  discard block
 block discarded – undo
937 937
 	
938 938
 	$sources = array();
939 939
 	foreach ($source_name as $keys => $name) {
940
-	    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]);
941
-	    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]);
940
+	    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]);
941
+	    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]);
942 942
 	}
943 943
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
944 944
 
@@ -951,24 +951,24 @@  discard block
 block discarded – undo
951 951
 	$sbsurl = $_POST['sbsurl'];
952 952
 	*/
953 953
 
954
-	$globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING);
955
-	$globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING);
956
-	$globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING);
957
-	$globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING);
958
-	$globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING);
959
-	$globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING);
960
-	$globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING);
961
-	$datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING);
954
+	$globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING);
955
+	$globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING);
956
+	$globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING);
957
+	$globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING);
958
+	$globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING);
959
+	$globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING);
960
+	$globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING);
961
+	$datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING);
962 962
 
963
-	$globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING);
964
-	if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
965
-	else $settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
966
-	$globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING);
967
-	if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE'));
968
-	else $settings = array_merge($settings,array('globalTracker' => 'FALSE'));
969
-	$globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING);
970
-	if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE'));
971
-	else $settings = array_merge($settings,array('globalMarine' => 'FALSE'));
963
+	$globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING);
964
+	if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE'));
965
+	else $settings = array_merge($settings, array('globalAircraft' => 'FALSE'));
966
+	$globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING);
967
+	if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE'));
968
+	else $settings = array_merge($settings, array('globalTracker' => 'FALSE'));
969
+	$globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING);
970
+	if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE'));
971
+	else $settings = array_merge($settings, array('globalMarine' => 'FALSE'));
972 972
 
973 973
 /*	
974 974
 	$globalSBS1Hosts = array();
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
 	}
985 985
 	$settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts));
986 986
 */
987
-	$settings_comment = array_merge($settings_comment,array('globalSBS1Hosts'));
987
+	$settings_comment = array_merge($settings_comment, array('globalSBS1Hosts'));
988 988
 	$host = $_POST['host'];
989 989
 	$port = $_POST['port'];
990 990
 	$name = $_POST['name'];
@@ -999,99 +999,99 @@  discard block
 block discarded – undo
999 999
 		else $cov = 'FALSE';
1000 1000
 		if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE';
1001 1001
 		else $arch = 'FALSE';
1002
-		if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch);
1002
+		if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch);
1003 1003
 	}
1004
-	$settings = array_merge($settings,array('globalSources' => $gSources));
1004
+	$settings = array_merge($settings, array('globalSources' => $gSources));
1005 1005
 
1006 1006
 /*
1007 1007
 	$sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT);
1008 1008
 	$settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout));
1009 1009
 */
1010
-	$acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING);
1011
-	$acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT);
1012
-	$settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport));
1010
+	$acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING);
1011
+	$acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT);
1012
+	$settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport));
1013 1013
 
1014
-	$bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING);
1015
-	$settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly));
1014
+	$bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING);
1015
+	$settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly));
1016 1016
 
1017
-	$customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING);
1018
-	$settings = array_merge($settings,array('globalCustomCSS' => $customcss));
1017
+	$customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING);
1018
+	$settings = array_merge($settings, array('globalCustomCSS' => $customcss));
1019 1019
 
1020
-	$notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING);
1021
-	$settings = array_merge($settings,array('globalNOTAMSource' => $notamsource));
1022
-	$metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING);
1023
-	$settings = array_merge($settings,array('globalMETARurl' => $metarsource));
1020
+	$notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING);
1021
+	$settings = array_merge($settings, array('globalNOTAMSource' => $notamsource));
1022
+	$metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING);
1023
+	$settings = array_merge($settings, array('globalMETARurl' => $metarsource));
1024 1024
 
1025
-	$zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING);
1026
-	$zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING);
1027
-	$zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT);
1025
+	$zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING);
1026
+	$zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING);
1027
+	$zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT);
1028 1028
 	if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') {
1029
-		$settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance)));
1030
-	} else $settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1029
+		$settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance)));
1030
+	} else $settings = array_merge($settings, array('globalDistanceIgnore' => array()));
1031 1031
 
1032
-	$refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT);
1033
-	$settings = array_merge($settings,array('globalLiveInterval' => $refresh));
1034
-	$maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT);
1035
-	$settings = array_merge($settings,array('globalMapRefresh' => $maprefresh));
1036
-	$mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT);
1037
-	$settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle));
1038
-	$closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT);
1039
-	$settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist));
1032
+	$refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT);
1033
+	$settings = array_merge($settings, array('globalLiveInterval' => $refresh));
1034
+	$maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT);
1035
+	$settings = array_merge($settings, array('globalMapRefresh' => $maprefresh));
1036
+	$mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT);
1037
+	$settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle));
1038
+	$closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT);
1039
+	$settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist));
1040 1040
 
1041
-	$aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT);
1042
-	$settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize));
1041
+	$aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT);
1042
+	$settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize));
1043 1043
 
1044
-	$archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT);
1045
-	$settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths));
1044
+	$archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT);
1045
+	$settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths));
1046 1046
 	
1047
-	$archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING);
1047
+	$archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING);
1048 1048
 	if ($archiveyear == "archiveyear") {
1049
-		$settings = array_merge($settings,array('globalArchiveYear' => 'TRUE'));
1049
+		$settings = array_merge($settings, array('globalArchiveYear' => 'TRUE'));
1050 1050
 	} else {
1051
-		$settings = array_merge($settings,array('globalArchiveYear' => 'FALSE'));
1051
+		$settings = array_merge($settings, array('globalArchiveYear' => 'FALSE'));
1052 1052
 	}
1053
-	$archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT);
1054
-	$settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths));
1055
-	$archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT);
1056
-	$settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1053
+	$archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT);
1054
+	$settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths));
1055
+	$archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT);
1056
+	$settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1057 1057
 
1058
-	$britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING);
1059
-	$settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways));
1060
-	$transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING);
1061
-	$settings = array_merge($settings,array('globalTransaviaKey' => $transavia));
1058
+	$britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING);
1059
+	$settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways));
1060
+	$transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING);
1061
+	$settings = array_merge($settings, array('globalTransaviaKey' => $transavia));
1062 1062
 
1063
-	$lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING);
1064
-	$lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING);
1065
-	$settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret)));
1063
+	$lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING);
1064
+	$lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING);
1065
+	$settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret)));
1066 1066
 
1067 1067
 	// Create in settings.php keys not yet configurable if not already here
1068 1068
 	//if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => ''));
1069
-	if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1069
+	if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE'));
1070 1070
 
1071
-	$resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING);
1071
+	$resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING);
1072 1072
 	if ($resetyearstats == 'resetyearstats') {
1073
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE'));
1073
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE'));
1074 1074
 	} else {
1075
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE'));
1075
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE'));
1076 1076
 	}
1077 1077
 
1078
-	$archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING);
1078
+	$archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING);
1079 1079
 	if ($archive == 'archive') {
1080
-		$settings = array_merge($settings,array('globalArchive' => 'TRUE'));
1080
+		$settings = array_merge($settings, array('globalArchive' => 'TRUE'));
1081 1081
 	} else {
1082
-		$settings = array_merge($settings,array('globalArchive' => 'FALSE'));
1082
+		$settings = array_merge($settings, array('globalArchive' => 'FALSE'));
1083 1083
 	}
1084
-	$daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING);
1084
+	$daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING);
1085 1085
 	if ($daemon == 'daemon') {
1086
-		$settings = array_merge($settings,array('globalDaemon' => 'TRUE'));
1086
+		$settings = array_merge($settings, array('globalDaemon' => 'TRUE'));
1087 1087
 	} else {
1088
-		$settings = array_merge($settings,array('globalDaemon' => 'FALSE'));
1088
+		$settings = array_merge($settings, array('globalDaemon' => 'FALSE'));
1089 1089
 	}
1090
-	$schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING);
1090
+	$schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING);
1091 1091
 	if ($schedules == 'schedules') {
1092
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE'));
1092
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE'));
1093 1093
 	} else {
1094
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE'));
1094
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE'));
1095 1095
 	}
1096 1096
 
1097 1097
 /*
@@ -1102,207 +1102,207 @@  discard block
 block discarded – undo
1102 1102
 		$settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE'));
1103 1103
 	}
1104 1104
 */
1105
-	$settings = array_merge($settings,array('globalFlightAware' => 'FALSE'));
1106
-	if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1107
-	else $settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1108
-	if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1109
-	else $settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1105
+	$settings = array_merge($settings, array('globalFlightAware' => 'FALSE'));
1106
+	if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE'));
1107
+	else $settings = array_merge($settings, array('globalSBS1' => 'FALSE'));
1108
+	if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE'));
1109
+	else $settings = array_merge($settings, array('globalAPRS' => 'FALSE'));
1110 1110
 	$va = false;
1111 1111
 	if ($globalivao == 'ivao') {
1112
-		$settings = array_merge($settings,array('globalIVAO' => 'TRUE'));
1112
+		$settings = array_merge($settings, array('globalIVAO' => 'TRUE'));
1113 1113
 		$va = true;
1114
-	} else $settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1114
+	} else $settings = array_merge($settings, array('globalIVAO' => 'FALSE'));
1115 1115
 	if ($globalvatsim == 'vatsim') {
1116
-		$settings = array_merge($settings,array('globalVATSIM' => 'TRUE'));
1116
+		$settings = array_merge($settings, array('globalVATSIM' => 'TRUE'));
1117 1117
 		$va = true;
1118
-	} else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1118
+	} else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE'));
1119 1119
 	if ($globalphpvms == 'phpvms') {
1120
-		$settings = array_merge($settings,array('globalphpVMS' => 'TRUE'));
1120
+		$settings = array_merge($settings, array('globalphpVMS' => 'TRUE'));
1121 1121
 		$va = true;
1122
-	} else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1122
+	} else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE'));
1123 1123
 	if ($globalvam == 'vam') {
1124
-		$settings = array_merge($settings,array('globalVAM' => 'TRUE'));
1124
+		$settings = array_merge($settings, array('globalVAM' => 'TRUE'));
1125 1125
 		$va = true;
1126
-	} else $settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1126
+	} else $settings = array_merge($settings, array('globalVAM' => 'FALSE'));
1127 1127
 	if ($va) {
1128
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE'));
1129
-	} else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1128
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE'));
1129
+	} else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE'));
1130 1130
 	if ($globalva == 'va' || $va) {
1131
-		$settings = array_merge($settings,array('globalVA' => 'TRUE'));
1132
-	} else $settings = array_merge($settings,array('globalVA' => 'FALSE'));
1131
+		$settings = array_merge($settings, array('globalVA' => 'TRUE'));
1132
+	} else $settings = array_merge($settings, array('globalVA' => 'FALSE'));
1133 1133
 	
1134 1134
 
1135 1135
 
1136
-	$notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING);
1136
+	$notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING);
1137 1137
 	if ($notam == 'notam') {
1138
-		$settings = array_merge($settings,array('globalNOTAM' => 'TRUE'));
1138
+		$settings = array_merge($settings, array('globalNOTAM' => 'TRUE'));
1139 1139
 	} else {
1140
-		$settings = array_merge($settings,array('globalNOTAM' => 'FALSE'));
1140
+		$settings = array_merge($settings, array('globalNOTAM' => 'FALSE'));
1141 1141
 	}
1142
-	$owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING);
1142
+	$owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING);
1143 1143
 	if ($owner == 'owner') {
1144
-		$settings = array_merge($settings,array('globalOwner' => 'TRUE'));
1144
+		$settings = array_merge($settings, array('globalOwner' => 'TRUE'));
1145 1145
 	} else {
1146
-		$settings = array_merge($settings,array('globalOwner' => 'FALSE'));
1146
+		$settings = array_merge($settings, array('globalOwner' => 'FALSE'));
1147 1147
 	}
1148
-	$map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING);
1148
+	$map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING);
1149 1149
 	if ($map3d == 'map3d') {
1150
-		$settings = array_merge($settings,array('globalMap3D' => 'TRUE'));
1150
+		$settings = array_merge($settings, array('globalMap3D' => 'TRUE'));
1151 1151
 	} else {
1152
-		$settings = array_merge($settings,array('globalMap3D' => 'FALSE'));
1152
+		$settings = array_merge($settings, array('globalMap3D' => 'FALSE'));
1153 1153
 	}
1154
-	$crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING);
1154
+	$crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING);
1155 1155
 	if ($crash == 'crash') {
1156
-		$settings = array_merge($settings,array('globalAccidents' => 'TRUE'));
1156
+		$settings = array_merge($settings, array('globalAccidents' => 'TRUE'));
1157 1157
 	} else {
1158
-		$settings = array_merge($settings,array('globalAccidents' => 'FALSE'));
1158
+		$settings = array_merge($settings, array('globalAccidents' => 'FALSE'));
1159 1159
 	}
1160
-	$mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING);
1160
+	$mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING);
1161 1161
 	if ($mapsatellites == 'mapsatellites') {
1162
-		$settings = array_merge($settings,array('globalMapSatellites' => 'TRUE'));
1162
+		$settings = array_merge($settings, array('globalMapSatellites' => 'TRUE'));
1163 1163
 	} else {
1164
-		$settings = array_merge($settings,array('globalMapSatellites' => 'FALSE'));
1164
+		$settings = array_merge($settings, array('globalMapSatellites' => 'FALSE'));
1165 1165
 	}
1166
-	$map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING);
1166
+	$map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING);
1167 1167
 	if ($map3ddefault == 'map3ddefault') {
1168
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE'));
1168
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE'));
1169 1169
 	} else {
1170
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE'));
1170
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE'));
1171 1171
 	}
1172
-	$translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING);
1172
+	$translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING);
1173 1173
 	if ($translate == 'translate') {
1174
-		$settings = array_merge($settings,array('globalTranslate' => 'TRUE'));
1174
+		$settings = array_merge($settings, array('globalTranslate' => 'TRUE'));
1175 1175
 	} else {
1176
-		$settings = array_merge($settings,array('globalTranslate' => 'FALSE'));
1176
+		$settings = array_merge($settings, array('globalTranslate' => 'FALSE'));
1177 1177
 	}
1178
-	$realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING);
1178
+	$realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING);
1179 1179
 	if ($realairlines == 'realairlines') {
1180
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE'));
1180
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE'));
1181 1181
 	} else {
1182
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE'));
1182
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE'));
1183 1183
 	}
1184
-	$estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING);
1184
+	$estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING);
1185 1185
 	if ($estimation == 'estimation') {
1186
-		$settings = array_merge($settings,array('globalMapEstimation' => 'TRUE'));
1186
+		$settings = array_merge($settings, array('globalMapEstimation' => 'TRUE'));
1187 1187
 	} else {
1188
-		$settings = array_merge($settings,array('globalMapEstimation' => 'FALSE'));
1188
+		$settings = array_merge($settings, array('globalMapEstimation' => 'FALSE'));
1189 1189
 	}
1190
-	$metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING);
1190
+	$metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING);
1191 1191
 	if ($metar == 'metar') {
1192
-		$settings = array_merge($settings,array('globalMETAR' => 'TRUE'));
1192
+		$settings = array_merge($settings, array('globalMETAR' => 'TRUE'));
1193 1193
 	} else {
1194
-		$settings = array_merge($settings,array('globalMETAR' => 'FALSE'));
1194
+		$settings = array_merge($settings, array('globalMETAR' => 'FALSE'));
1195 1195
 	}
1196
-	$metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING);
1196
+	$metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING);
1197 1197
 	if ($metarcycle == 'metarcycle') {
1198
-		$settings = array_merge($settings,array('globalMETARcycle' => 'TRUE'));
1198
+		$settings = array_merge($settings, array('globalMETARcycle' => 'TRUE'));
1199 1199
 	} else {
1200
-		$settings = array_merge($settings,array('globalMETARcycle' => 'FALSE'));
1200
+		$settings = array_merge($settings, array('globalMETARcycle' => 'FALSE'));
1201 1201
 	}
1202
-	$fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING);
1202
+	$fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING);
1203 1203
 	if ($fork == 'fork') {
1204
-		$settings = array_merge($settings,array('globalFork' => 'TRUE'));
1204
+		$settings = array_merge($settings, array('globalFork' => 'TRUE'));
1205 1205
 	} else {
1206
-		$settings = array_merge($settings,array('globalFork' => 'FALSE'));
1206
+		$settings = array_merge($settings, array('globalFork' => 'FALSE'));
1207 1207
 	}
1208 1208
 
1209
-	$colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING);
1209
+	$colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING);
1210 1210
 	if ($colormap == 'colormap') {
1211
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE'));
1211
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE'));
1212 1212
 	} else {
1213
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE'));
1213
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE'));
1214 1214
 	}
1215 1215
 	
1216 1216
 	if (isset($_POST['aircrafticoncolor'])) {
1217
-		$aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING);
1218
-		$settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1)));
1217
+		$aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING);
1218
+		$settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1)));
1219 1219
 	}
1220 1220
 
1221
-	$airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT);
1222
-	$settings = array_merge($settings,array('globalAirportZoom' => $airportzoom));
1221
+	$airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT);
1222
+	$settings = array_merge($settings, array('globalAirportZoom' => $airportzoom));
1223 1223
 
1224
-	$unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING);
1225
-	$settings = array_merge($settings,array('globalUnitDistance' => $unitdistance));
1226
-	$unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING);
1227
-	$settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude));
1228
-	$unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING);
1229
-	$settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed));
1224
+	$unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING);
1225
+	$settings = array_merge($settings, array('globalUnitDistance' => $unitdistance));
1226
+	$unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING);
1227
+	$settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude));
1228
+	$unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING);
1229
+	$settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed));
1230 1230
 
1231
-	$mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING);
1231
+	$mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING);
1232 1232
 	if ($mappopup == 'mappopup') {
1233
-		$settings = array_merge($settings,array('globalMapPopup' => 'TRUE'));
1233
+		$settings = array_merge($settings, array('globalMapPopup' => 'TRUE'));
1234 1234
 	} else {
1235
-		$settings = array_merge($settings,array('globalMapPopup' => 'FALSE'));
1235
+		$settings = array_merge($settings, array('globalMapPopup' => 'FALSE'));
1236 1236
 	}
1237
-	$airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING);
1237
+	$airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING);
1238 1238
 	if ($airportpopup == 'airportpopup') {
1239
-		$settings = array_merge($settings,array('globalAirportPopup' => 'TRUE'));
1239
+		$settings = array_merge($settings, array('globalAirportPopup' => 'TRUE'));
1240 1240
 	} else {
1241
-		$settings = array_merge($settings,array('globalAirportPopup' => 'FALSE'));
1241
+		$settings = array_merge($settings, array('globalAirportPopup' => 'FALSE'));
1242 1242
 	}
1243
-	$maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING);
1243
+	$maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING);
1244 1244
 	if ($maphistory == 'maphistory') {
1245
-		$settings = array_merge($settings,array('globalMapHistory' => 'TRUE'));
1245
+		$settings = array_merge($settings, array('globalMapHistory' => 'TRUE'));
1246 1246
 	} else {
1247
-		$settings = array_merge($settings,array('globalMapHistory' => 'FALSE'));
1247
+		$settings = array_merge($settings, array('globalMapHistory' => 'FALSE'));
1248 1248
 	}
1249
-	$maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING);
1249
+	$maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING);
1250 1250
 	if ($maptooltip == 'maptooltip') {
1251
-		$settings = array_merge($settings,array('globalMapTooltip' => 'TRUE'));
1251
+		$settings = array_merge($settings, array('globalMapTooltip' => 'TRUE'));
1252 1252
 	} else {
1253
-		$settings = array_merge($settings,array('globalMapTooltip' => 'FALSE'));
1253
+		$settings = array_merge($settings, array('globalMapTooltip' => 'FALSE'));
1254 1254
 	}
1255
-	$flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING);
1255
+	$flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING);
1256 1256
 	if ($flightroute == 'flightroute') {
1257
-		$settings = array_merge($settings,array('globalMapRoute' => 'TRUE'));
1257
+		$settings = array_merge($settings, array('globalMapRoute' => 'TRUE'));
1258 1258
 	} else {
1259
-		$settings = array_merge($settings,array('globalMapRoute' => 'FALSE'));
1259
+		$settings = array_merge($settings, array('globalMapRoute' => 'FALSE'));
1260 1260
 	}
1261
-	$flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING);
1261
+	$flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING);
1262 1262
 	if ($flightremainingroute == 'flightremainingroute') {
1263
-		$settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE'));
1263
+		$settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE'));
1264 1264
 	} else {
1265
-		$settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE'));
1265
+		$settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE'));
1266 1266
 	}
1267
-	$allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING);
1267
+	$allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING);
1268 1268
 	if ($allflights == 'allflights') {
1269
-		$settings = array_merge($settings,array('globalAllFlights' => 'TRUE'));
1269
+		$settings = array_merge($settings, array('globalAllFlights' => 'TRUE'));
1270 1270
 	} else {
1271
-		$settings = array_merge($settings,array('globalAllFlights' => 'FALSE'));
1271
+		$settings = array_merge($settings, array('globalAllFlights' => 'FALSE'));
1272 1272
 	}
1273
-	$bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING);
1273
+	$bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING);
1274 1274
 	if ($bbox == 'bbox') {
1275
-		$settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE'));
1275
+		$settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE'));
1276 1276
 	} else {
1277
-		$settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE'));
1277
+		$settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE'));
1278 1278
 	}
1279
-	$waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING);
1279
+	$waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING);
1280 1280
 	if ($waypoints == 'waypoints') {
1281
-		$settings = array_merge($settings,array('globalWaypoints' => 'TRUE'));
1281
+		$settings = array_merge($settings, array('globalWaypoints' => 'TRUE'));
1282 1282
 	} else {
1283
-		$settings = array_merge($settings,array('globalWaypoints' => 'FALSE'));
1283
+		$settings = array_merge($settings, array('globalWaypoints' => 'FALSE'));
1284 1284
 	}
1285
-	$noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING);
1285
+	$noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING);
1286 1286
 	if ($noairlines == 'noairlines') {
1287
-		$settings = array_merge($settings,array('globalNoAirlines' => 'TRUE'));
1287
+		$settings = array_merge($settings, array('globalNoAirlines' => 'TRUE'));
1288 1288
 	} else {
1289
-		$settings = array_merge($settings,array('globalNoAirlines' => 'FALSE'));
1289
+		$settings = array_merge($settings, array('globalNoAirlines' => 'FALSE'));
1290 1290
 	}
1291 1291
 
1292
-	if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
1292
+	if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE'));
1293 1293
 
1294 1294
 	// Set some defaults values...
1295 1295
 	if (!isset($globalAircraftImageSources)) {
1296
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1297
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1296
+	    $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters');
1297
+	    $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources));
1298 1298
 	}
1299 1299
 
1300 1300
 	if (!isset($globalSchedulesSources)) {
1301
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1302
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1301
+	    $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware');
1302
+    	    $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources));
1303 1303
     	}
1304 1304
 
1305
-	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1305
+	$settings = array_merge($settings, array('globalInstalled' => 'TRUE'));
1306 1306
 
1307 1307
 	if ($error == '') settings::modify_settings($settings);
1308 1308
 	if ($error == '') settings::comment_settings($settings_comment);
Please login to merge, or discard this patch.
live-geojson.php 2 patches
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@  discard block
 block discarded – undo
5 5
 $marine = false;
6 6
 $usecoord = false;
7 7
 if (isset($_GET['tracker'])) {
8
-    $tracker = true;
8
+	$tracker = true;
9 9
 }
10 10
 if (isset($_GET['marine'])) {
11
-    $marine = true;
11
+	$marine = true;
12 12
 }
13 13
 if ($tracker) {
14
-    require_once('require/class.Tracker.php');
15
-    require_once('require/class.TrackerLive.php');
16
-    require_once('require/class.TrackerArchive.php');
14
+	require_once('require/class.Tracker.php');
15
+	require_once('require/class.TrackerLive.php');
16
+	require_once('require/class.TrackerArchive.php');
17 17
 } elseif ($marine) {
18
-    require_once('require/class.Marine.php');
19
-    require_once('require/class.MarineLive.php');
20
-    require_once('require/class.MarineArchive.php');
18
+	require_once('require/class.Marine.php');
19
+	require_once('require/class.MarineLive.php');
20
+	require_once('require/class.MarineArchive.php');
21 21
 } else {
22
-    require_once('require/class.Spotter.php');
23
-    require_once('require/class.SpotterLive.php');
24
-    require_once('require/class.SpotterArchive.php');
22
+	require_once('require/class.Spotter.php');
23
+	require_once('require/class.SpotterLive.php');
24
+	require_once('require/class.SpotterArchive.php');
25 25
 }
26 26
 
27 27
 $begintime = microtime(true);
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 $Common = new Common();
42 42
 
43 43
 if (isset($_GET['download'])) {
44
-    if ($_GET['download'] == "true")
45
-    {
44
+	if ($_GET['download'] == "true")
45
+	{
46 46
 	header('Content-disposition: attachment; filename="flightairmap.json"');
47
-    }
47
+	}
48 48
 }
49 49
 header('Content-Type: text/javascript');
50 50
 
@@ -497,17 +497,17 @@  discard block
 block discarded – undo
497 497
 				if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history'];
498 498
 				
499 499
 				if (
500
-				    (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') 
501
-				    || ((isset($globalMapHistory) && $globalMapHistory) || $allhistory)
500
+					(isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') 
501
+					|| ((isset($globalMapHistory) && $globalMapHistory) || $allhistory)
502 502
 				//    || (isset($history) && $history != '' && $history != 'NA' && ($history == $spotter_item['ident'] || $history == $spotter_item['flightaware_id']))
503 503
 				//    || (isset($history) && $history != '' && $history != 'NA' && $history == $spotter_item['ident'])
504
-				    || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id']))
505
-				    || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])
506
-				    || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id']))
507
-				    || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id'])
508
-				    || (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid']))
509
-				    || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid'])
510
-				    ) {
504
+					|| (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id']))
505
+					|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id'])
506
+					|| (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['fammarine_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['fammarine_id']))
507
+					|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['fammarine_id']) && $_GET['fammarine_id'] == $spotter_item['fammarine_id'])
508
+					|| (isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['famtrackid']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['famtrackid']))
509
+					|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['famtrackid']) && $_GET['famtrackid'] == $spotter_item['famtrackid'])
510
+					) {
511 511
 					if ($tracker) {
512 512
 						if ($from_archive || $globalArchive) {
513 513
 							$spotter_history_array = $TrackerArchive->getAllArchiveTrackerDataById($spotter_item['famtrackid']);
@@ -596,65 +596,65 @@  discard block
 block discarded – undo
596 596
 				}
597 597
 				
598 598
 				if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id']))
599
-				    || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']))
600
-				     && (isset($spotter_item['departure_airport']) 
601
-				        && $spotter_item['departure_airport'] != 'NA' 
602
-				        && isset($spotter_item['arrival_airport']) 
603
-				        && $spotter_item['arrival_airport'] != 'NA' 
604
-				        && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") 
605
-				    	    || (isset($globalMapRoute) && $globalMapRoute)))) {
606
-				    if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": [';
607
-				    else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": [';
608
-				    if (isset($spotter_item['departure_airport_latitude'])) {
599
+					|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']))
600
+					 && (isset($spotter_item['departure_airport']) 
601
+						&& $spotter_item['departure_airport'] != 'NA' 
602
+						&& isset($spotter_item['arrival_airport']) 
603
+						&& $spotter_item['arrival_airport'] != 'NA' 
604
+						&& ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") 
605
+							|| (isset($globalMapRoute) && $globalMapRoute)))) {
606
+					if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": [';
607
+					else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": [';
608
+					if (isset($spotter_item['departure_airport_latitude'])) {
609 609
 					$output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],';
610
-				    } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') {
610
+					} elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') {
611 611
 					$dairport = $Spotter->getAllAirportInfo($spotter_item['departure_airport']);
612 612
 					if (isset($dairport[0]['latitude'])) {
613
-					    $output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],';
613
+						$output_air .= '['.$dairport[0]['longitude'].','.$dairport[0]['latitude'].'],';
614 614
 					}
615
-				    }
616
-				    if (isset($spotter_item['arrival_airport_latitude'])) {
615
+					}
616
+					if (isset($spotter_item['arrival_airport_latitude'])) {
617 617
 					$output_air .= '['.$spotter_item['arrival_airport_longitude'].','.$spotter_item['arrival_airport_latitude'].'],';
618
-				    } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') {
618
+					} elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') {
619 619
 					$aairport = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']);
620 620
 					if (isset($aairport[0]['latitude'])) {
621
-					    $output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].'],';
621
+						$output_air .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].'],';
622 622
 					}
623
-				    }
624
-				    $output_air  = substr($output_air, 0, -1);
625
-				    $output_air .= ']}},';
626
-				    $output .= $output_air;
627
-				    unset($output_air);
623
+					}
624
+					$output_air  = substr($output_air, 0, -1);
625
+					$output_air .= ']}},';
626
+					$output .= $output_air;
627
+					unset($output_air);
628 628
 				}
629 629
 
630 630
 				//if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA' && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) {
631 631
 				//if (isset($history) && $history != '' && $history == $spotter_item['ident'] && isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA' && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") || (!isset($_COOKIE['MapRoute']) && (!isset($globalMapRoute) || (isset($globalMapRoute) && $globalMapRoute))))) {
632 632
 				if (((isset($history) && $history != '' && $history != 'NA' && isset($spotter_item['flightaware_id']) && str_replace('-','',$history) == str_replace('-','',$spotter_item['flightaware_id']))
633
-				    || (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']))
634
-				     && (isset($spotter_item['arrival_airport']) 
635
-				        && $spotter_item['arrival_airport'] != 'NA' 
636
-				        && ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == "true") 
637
-				    	    || (!isset($_COOKIE['MapRemainaingRoute']) && (!isset($globalMapRemainingRoute) 
638
-				    	    || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) {
639
-				    $havedata = false;
640
-				    if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": [';
641
-				    else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": [';
642
-				    $output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],';
633
+					|| (isset($history) && $history == '' && isset($spotter_item['flightaware_id']) && isset($_GET['flightaware_id']) && $_GET['flightaware_id'] == $spotter_item['flightaware_id']))
634
+					 && (isset($spotter_item['arrival_airport']) 
635
+						&& $spotter_item['arrival_airport'] != 'NA' 
636
+						&& ((isset($_COOKIE['MapRemainingRoute']) && $_COOKIE['MapRemainingRoute'] == "true") 
637
+							|| (!isset($_COOKIE['MapRemainaingRoute']) && (!isset($globalMapRemainingRoute) 
638
+							|| (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) {
639
+					$havedata = false;
640
+					if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": [';
641
+					else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": [';
642
+					$output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],';
643 643
 
644
-				    if (isset($spotter_item['arrival_airport_latitude'])) {
644
+					if (isset($spotter_item['arrival_airport_latitude'])) {
645 645
 					$output_dest .= '['.$spotter_item['arrival_airport_longitude'].','.$spotter_item['arrival_airport_latitude'].']';
646 646
 					$havedata = true;
647
-				    } elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') {
647
+					} elseif (isset($spotter_item['arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') {
648 648
 					$aairport = $Spotter->getAllAirportInfo($spotter_item['arrival_airport']);
649 649
 					if (isset($aairport[0]['latitude'])) {
650
-					    $output_dest .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']';
651
-					    $havedata = true;
650
+						$output_dest .= '['.$aairport[0]['longitude'].','.$aairport[0]['latitude'].']';
651
+						$havedata = true;
652 652
 					}
653
-				    }
654
-				    //$output_dest  = substr($output_dest, 0, -1);
655
-				    $output_dest .= ']}},';
656
-				    if ($havedata) $output .= $output_dest;
657
-				    unset($output_dest);
653
+					}
654
+					//$output_dest  = substr($output_dest, 0, -1);
655
+					$output_dest .= ']}},';
656
+					if ($havedata) $output .= $output_dest;
657
+					unset($output_dest);
658 658
 				}
659 659
 			}
660 660
 			$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
Braces   +289 added lines, -113 removed lines patch added patch discarded remove patch
@@ -48,27 +48,52 @@  discard block
 block discarded – undo
48 48
 }
49 49
 header('Content-Type: text/javascript');
50 50
 
51
-if (!isset($globalJsonCompress)) $compress = true;
52
-else $compress = $globalJsonCompress;
51
+if (!isset($globalJsonCompress)) {
52
+	$compress = true;
53
+} else {
54
+	$compress = $globalJsonCompress;
55
+}
53 56
 
54 57
 $from_archive = false;
55 58
 $min = true;
56 59
 $allhistory = false;
57 60
 $filter['source'] = array();
58
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') $filter['source'] = array_merge($filter['source'],array('vatsimtxt'));
59
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') $filter['source'] = array_merge($filter['source'],array('whazzup'));
60
-if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') $filter['source'] = array_merge($filter['source'],array('phpvmacars'));
61
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') $filter['source'] = array_merge($filter['source'],array('sbs','famaprs'));
62
-if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') $filter['source'] = array_merge($filter['source'],array('aprs'));
63
-if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') $filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING);
64
-if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') $filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING);
65
-if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') $filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING);
66
-if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') $filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING);
67
-if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') $filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING);
61
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalVATSIM) && $globalVATSIM && isset($_COOKIE['filter_ShowVATSIM']) && $_COOKIE['filter_ShowVATSIM'] == 'true') {
62
+	$filter['source'] = array_merge($filter['source'],array('vatsimtxt'));
63
+}
64
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalIVAO) && $globalIVAO && isset($_COOKIE['filter_ShowIVAO']) && $_COOKIE['filter_ShowIVAO'] == 'true') {
65
+	$filter['source'] = array_merge($filter['source'],array('whazzup'));
66
+}
67
+if ((!isset($globalMapVAchoose) || $globalMapVAchoose) && isset($globalphpVMS) && $globalphpVMS && isset($_COOKIE['filter_ShowVMS']) && $_COOKIE['filter_ShowVMS'] == 'true') {
68
+	$filter['source'] = array_merge($filter['source'],array('phpvmacars'));
69
+}
70
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalSBS1) && $globalSBS1 && isset($_COOKIE['filter_ShowSBS1']) && $_COOKIE['filter_ShowSBS1'] == 'true') {
71
+	$filter['source'] = array_merge($filter['source'],array('sbs','famaprs'));
72
+}
73
+if ((!isset($globalMapchoose) || $globalMapchoose) && isset($globalAPRS) && $globalAPRS && isset($_COOKIE['filter_ShowAPRS']) && $_COOKIE['filter_ShowAPRS'] == 'true') {
74
+	$filter['source'] = array_merge($filter['source'],array('aprs'));
75
+}
76
+if (isset($_COOKIE['filter_ident']) && $_COOKIE['filter_ident'] != '') {
77
+	$filter['ident'] = filter_var($_COOKIE['filter_ident'],FILTER_SANITIZE_STRING);
78
+}
79
+if (isset($_COOKIE['filter_Airlines']) && $_COOKIE['filter_Airlines'] != '') {
80
+	$filter['airlines'] = filter_var_array(explode(',',$_COOKIE['filter_Airlines']),FILTER_SANITIZE_STRING);
81
+}
82
+if (isset($_COOKIE['filter_Sources']) && $_COOKIE['filter_Sources'] != '') {
83
+	$filter['source_aprs'] = filter_var_array(explode(',',$_COOKIE['filter_Sources']),FILTER_SANITIZE_STRING);
84
+}
85
+if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] != 'all') {
86
+	$filter['airlinestype'] = filter_var($_COOKIE['filter_airlinestype'],FILTER_SANITIZE_STRING);
87
+}
88
+if (isset($_COOKIE['filter_alliance']) && $_COOKIE['filter_alliance'] != 'all') {
89
+	$filter['alliance'] = filter_var($_COOKIE['filter_alliance'],FILTER_SANITIZE_STRING);
90
+}
68 91
 
69 92
 if (isset($globalMapPopup) && !$globalMapPopup && !(isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true')) {
70 93
 	$min = true;
71
-} else $min = false;
94
+} else {
95
+	$min = false;
96
+}
72 97
 
73 98
 if (isset($_GET['ident'])) {
74 99
 	$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
@@ -157,21 +182,33 @@  discard block
 block discarded – undo
157 182
 		} else {
158 183
 			$flightcnt = $SpotterLive->getLiveSpotterCount($filter);
159 184
 		}
160
-	} else $flightcnt = count($spotter_array);
161
-	if ($flightcnt == '') $flightcnt = 0;
162
-} else $flightcnt = 0;
185
+	} else {
186
+		$flightcnt = count($spotter_array);
187
+	}
188
+	if ($flightcnt == '') {
189
+		$flightcnt = 0;
190
+	}
191
+	} else {
192
+	$flightcnt = 0;
193
+}
163 194
 
164 195
 $sqltime = round(microtime(true)-$begintime,2);
165 196
 
166
-if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) $usenextlatlon = false;
167
-else $usenextlatlon = true;
197
+if ((!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation == FALSE) || (isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'false')) {
198
+	$usenextlatlon = false;
199
+} else {
200
+	$usenextlatlon = true;
201
+}
168 202
 $j = 0;
169 203
 $prev_flightaware_id = '';
170 204
 $aircrafts_shadow = array();
171 205
 $output = '{';
172 206
 	$output .= '"type": "FeatureCollection",';
173
-		if ($min) $output .= '"minimal": "true",';
174
-		else $output .= '"minimal": "false",';
207
+		if ($min) {
208
+			$output .= '"minimal": "true",';
209
+		} else {
210
+			$output .= '"minimal": "false",';
211
+		}
175 212
 		//$output .= '"fc": "'.$flightcnt.'",';
176 213
 		$output .= '"sqt": "'.$sqltime.'",';
177 214
 
@@ -215,18 +252,29 @@  discard block
 block discarded – undo
215 252
 						}
216 253
 						$output .= '"properties": {';
217 254
 						if (isset($spotter_item['flightaware_id'])) {
218
-							if ($compress) $output .= '"fi": "'.$spotter_item['flightaware_id'].'",';
219
-							else $output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",';
255
+							if ($compress) {
256
+								$output .= '"fi": "'.$spotter_item['flightaware_id'].'",';
257
+							} else {
258
+								$output .= '"flightaware_id": "'.$spotter_item['flightaware_id'].'",';
259
+							}
220 260
 						} elseif (isset($spotter_item['famtrackid'])) {
221
-							if ($compress) $output .= '"fti": "'.$spotter_item['famtrackid'].'",';
222
-							else $output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",';
261
+							if ($compress) {
262
+								$output .= '"fti": "'.$spotter_item['famtrackid'].'",';
263
+							} else {
264
+								$output .= '"famtrackid": "'.$spotter_item['famtrackid'].'",';
265
+							}
223 266
 						} elseif (isset($spotter_item['fammarine_id'])) {
224
-							if ($compress) $output .= '"fmi": "'.$spotter_item['fammarine_id'].'",';
225
-							else $output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",';
267
+							if ($compress) {
268
+								$output .= '"fmi": "'.$spotter_item['fammarine_id'].'",';
269
+							} else {
270
+								$output .= '"fammarineid": "'.$spotter_item['fammarine_id'].'",';
271
+							}
226 272
 						}
227 273
 							$output .= '"fc": "'.$flightcnt.'",';
228 274
 							$output .= '"sqt": "'.$sqltime.'",';
229
-							if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",';
275
+							if (isset($begindate)) {
276
+								$output .= '"archive_date": "'.$begindate.'",';
277
+							}
230 278
 
231 279
 /*
232 280
 							if ($min) $output .= '"minimal": "true",';
@@ -234,14 +282,22 @@  discard block
 block discarded – undo
234 282
 */
235 283
 							//$output .= '"fc": "'.$spotter_item['nb'].'",';
236 284
 						if (isset($spotter_item['ident']) && $spotter_item['ident'] != '') {
237
-							if ($compress) $output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",';
238
-							else $output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",';
285
+							if ($compress) {
286
+								$output .= '"c": "'.str_replace('\\','',$spotter_item['ident']).'",';
287
+							} else {
288
+								$output .= '"callsign": "'.str_replace('\\','',$spotter_item['ident']).'",';
289
+							}
239 290
 							//"
240 291
 						} else {
241
-							if ($compress) $output .= '"c": "NA",';
242
-							else $output .= '"callsign": "NA",';
292
+							if ($compress) {
293
+								$output .= '"c": "NA",';
294
+							} else {
295
+								$output .= '"callsign": "NA",';
296
+							}
297
+						}
298
+						if (isset($spotter_item['registration'])) {
299
+							$output .= '"registration": "'.$spotter_item['registration'].'",';
243 300
 						}
244
-						if (isset($spotter_item['registration'])) $output .= '"registration": "'.$spotter_item['registration'].'",';
245 301
 						if (isset($spotter_item['aircraft_name']) && isset($spotter_item['aircraft_type'])) {
246 302
 							$output .= '"aircraft_name": "'.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')",';
247 303
 							$output .= '"aircraft_wiki": "http://'.strtolower($globalLanguage).'.wikipedia.org/wiki/'.urlencode(str_replace(' ','_',$spotter_item['aircraft_name'])).'",';
@@ -254,15 +310,21 @@  discard block
 block discarded – undo
254 310
 							$output .= '"aircraft_icao": "'.$spotter_item['aircraft_icao'].'",';
255 311
 						}
256 312
 						if (!isset($spotter_item['aircraft_shadow']) && !$tracker) {
257
-							if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') $spotter_item['aircraft_shadow'] = '';
258
-							else {
313
+							if (!isset($spotter_item['aircraft_icao']) || $spotter_item['aircraft_icao'] == '') {
314
+								$spotter_item['aircraft_shadow'] = '';
315
+							} else {
259 316
 								$aircraft_icao = $spotter_item['aircraft_icao'];
260
-								if (isset($aircrafts_shadow[$aircraft_icao])) $spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao];
261
-								else {
317
+								if (isset($aircrafts_shadow[$aircraft_icao])) {
318
+									$spotter_item['aircraft_shadow'] = $aircrafts_shadow[$aircraft_icao];
319
+								} else {
262 320
 									$aircraft_info = $Spotter->getAllAircraftInfo($spotter_item['aircraft_icao']);
263
-									if (count($aircraft_info) > 0) $spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow'];
264
-									elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') $spotter_item['aircraft_shadow'] = 'PA18.png';
265
-									else $spotter_item['aircraft_shadow'] = '';
321
+									if (count($aircraft_info) > 0) {
322
+										$spotter_item['aircraft_shadow'] = $aircraft_info[0]['aircraft_shadow'];
323
+									} elseif (isset($spotter_item['format_source']) && $spotter_item['format_source'] == 'aprs') {
324
+										$spotter_item['aircraft_shadow'] = 'PA18.png';
325
+									} else {
326
+										$spotter_item['aircraft_shadow'] = '';
327
+									}
266 328
 									$aircrafts_shadow[$aircraft_icao] = $spotter_item['aircraft_shadow'];
267 329
 								}
268 330
 							}
@@ -270,73 +332,139 @@  discard block
 block discarded – undo
270 332
 						if (!isset($spotter_item['aircraft_shadow']) || $spotter_item['aircraft_shadow'] == '') {
271 333
 							if ($tracker) {
272 334
 								if (isset($spotter_item['type']) && $spotter_item['type'] == 'Ambulance') {
273
-									if ($compress) $output .= '"as": "ambulance.png",';
274
-									else $output .= '"aircraft_shadow": "ambulance.png",';
335
+									if ($compress) {
336
+										$output .= '"as": "ambulance.png",';
337
+									} else {
338
+										$output .= '"aircraft_shadow": "ambulance.png",';
339
+									}
275 340
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Police') {
276
-									if ($compress) $output .= '"as": "police.png",';
277
-									else $output .= '"aircraft_shadow": "police.png",';
341
+									if ($compress) {
342
+										$output .= '"as": "police.png",';
343
+									} else {
344
+										$output .= '"aircraft_shadow": "police.png",';
345
+									}
278 346
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Yacht (Sail)') {
279
-									if ($compress) $output .= '"as": "ship.png",';
280
-									else $output .= '"aircraft_shadow": "ship.png",';
347
+									if ($compress) {
348
+										$output .= '"as": "ship.png",';
349
+									} else {
350
+										$output .= '"aircraft_shadow": "ship.png",';
351
+									}
281 352
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Ship (Power Boat)') {
282
-									if ($compress) $output .= '"as": "ship.png",';
283
-									else $output .= '"aircraft_shadow": "ship.png",';
353
+									if ($compress) {
354
+										$output .= '"as": "ship.png",';
355
+									} else {
356
+										$output .= '"aircraft_shadow": "ship.png",';
357
+									}
284 358
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Shuttle') {
285
-									if ($compress) $output .= '"as": "ship.png",';
286
-									else $output .= '"aircraft_shadow": "ship.png",';
359
+									if ($compress) {
360
+										$output .= '"as": "ship.png",';
361
+									} else {
362
+										$output .= '"aircraft_shadow": "ship.png",';
363
+									}
287 364
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck') {
288
-									if ($compress) $output .= '"as": "truck.png",';
289
-									else $output .= '"aircraft_shadow": "truck.png",';
365
+									if ($compress) {
366
+										$output .= '"as": "truck.png",';
367
+									} else {
368
+										$output .= '"aircraft_shadow": "truck.png",';
369
+									}
290 370
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Truck (18 Wheeler)') {
291
-									if ($compress) $output .= '"as": "truck.png",';
292
-									else $output .= '"aircraft_shadow": "truck.png",';
371
+									if ($compress) {
372
+										$output .= '"as": "truck.png",';
373
+									} else {
374
+										$output .= '"aircraft_shadow": "truck.png",';
375
+									}
293 376
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Aircraft (small)') {
294
-									if ($compress) $output .= '"as": "aircraft.png",';
295
-									else $output .= '"aircraft_shadow": "aircraft.png",';
377
+									if ($compress) {
378
+										$output .= '"as": "aircraft.png",';
379
+									} else {
380
+										$output .= '"aircraft_shadow": "aircraft.png",';
381
+									}
296 382
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Large Aircraft') {
297
-									if ($compress) $output .= '"as": "aircraft.png",';
298
-									else $output .= '"aircraft_shadow": "aircraft.png",';
383
+									if ($compress) {
384
+										$output .= '"as": "aircraft.png",';
385
+									} else {
386
+										$output .= '"aircraft_shadow": "aircraft.png",';
387
+									}
299 388
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Helicopter') {
300
-									if ($compress) $output .= '"as": "helico.png",';
301
-									else $output .= '"aircraft_shadow": "helico.png",';
389
+									if ($compress) {
390
+										$output .= '"as": "helico.png",';
391
+									} else {
392
+										$output .= '"aircraft_shadow": "helico.png",';
393
+									}
302 394
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Railroad Engine') {
303
-									if ($compress) $output .= '"as": "rail.png",';
304
-									else $output .= '"aircraft_shadow": "rail.png",';
395
+									if ($compress) {
396
+										$output .= '"as": "rail.png",';
397
+									} else {
398
+										$output .= '"aircraft_shadow": "rail.png",';
399
+									}
305 400
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Firetruck') {
306
-									if ($compress) $output .= '"as": "firetruck.png",';
307
-									else $output .= '"aircraft_shadow": "firetruck.png",';
401
+									if ($compress) {
402
+										$output .= '"as": "firetruck.png",';
403
+									} else {
404
+										$output .= '"aircraft_shadow": "firetruck.png",';
405
+									}
308 406
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bus') {
309
-									if ($compress) $output .= '"as": "bus.png",';
310
-									else $output .= '"aircraft_shadow": "bus.png",';
407
+									if ($compress) {
408
+										$output .= '"as": "bus.png",';
409
+									} else {
410
+										$output .= '"aircraft_shadow": "bus.png",';
411
+									}
311 412
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Phone') {
312
-									if ($compress) $output .= '"as": "phone.png",';
313
-									else $output .= '"aircraft_shadow": "phone.png",';
413
+									if ($compress) {
414
+										$output .= '"as": "phone.png",';
415
+									} else {
416
+										$output .= '"aircraft_shadow": "phone.png",';
417
+									}
314 418
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Jogger') {
315
-									if ($compress) $output .= '"as": "jogger.png",';
316
-									else $output .= '"aircraft_shadow": "jogger.png",';
419
+									if ($compress) {
420
+										$output .= '"as": "jogger.png",';
421
+									} else {
422
+										$output .= '"aircraft_shadow": "jogger.png",';
423
+									}
317 424
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Bike') {
318
-									if ($compress) $output .= '"as": "bike.png",';
319
-									else $output .= '"aircraft_shadow": "bike.png",';
425
+									if ($compress) {
426
+										$output .= '"as": "bike.png",';
427
+									} else {
428
+										$output .= '"aircraft_shadow": "bike.png",';
429
+									}
320 430
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Motorcycle') {
321
-									if ($compress) $output .= '"as": "motorcycle.png",';
322
-									else $output .= '"aircraft_shadow": "motorcycle.png",';
431
+									if ($compress) {
432
+										$output .= '"as": "motorcycle.png",';
433
+									} else {
434
+										$output .= '"aircraft_shadow": "motorcycle.png",';
435
+									}
323 436
 								} elseif (isset($spotter_item['type']) && $spotter_item['type'] == 'Balloon') {
324
-									if ($compress) $output .= '"as": "balloon.png",';
325
-									else $output .= '"aircraft_shadow": "balloon.png",';
437
+									if ($compress) {
438
+										$output .= '"as": "balloon.png",';
439
+									} else {
440
+										$output .= '"aircraft_shadow": "balloon.png",';
441
+									}
326 442
 								} else {
327
-									if ($compress) $output .= '"as": "car.png",';
328
-									else $output .= '"aircraft_shadow": "car.png",';
443
+									if ($compress) {
444
+										$output .= '"as": "car.png",';
445
+									} else {
446
+										$output .= '"aircraft_shadow": "car.png",';
447
+									}
329 448
 								}
330 449
 							} elseif ($marine) {
331
-								if ($compress) $output .= '"as": "ship.png",';
332
-								else $output .= '"aircraft_shadow": "ship.png",';
450
+								if ($compress) {
451
+									$output .= '"as": "ship.png",';
452
+								} else {
453
+									$output .= '"aircraft_shadow": "ship.png",';
454
+								}
333 455
 							} else {
334
-								if ($compress) $output .= '"as": "default.png",';
335
-								else $output .= '"aircraft_shadow": "default.png",';
456
+								if ($compress) {
457
+									$output .= '"as": "default.png",';
458
+								} else {
459
+									$output .= '"aircraft_shadow": "default.png",';
460
+								}
336 461
 							}
337 462
 						} else {
338
-							if ($compress) $output .= '"as": "'.$spotter_item['aircraft_shadow'].'",';
339
-							else $output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",';
463
+							if ($compress) {
464
+								$output .= '"as": "'.$spotter_item['aircraft_shadow'].'",';
465
+							} else {
466
+								$output .= '"aircraft_shadow": "'.$spotter_item['aircraft_shadow'].'",';
467
+							}
340 468
 						}
341 469
 						if (isset($spotter_item['airline_name'])) {
342 470
 							$output .= '"airline_name": "'.$spotter_item['airline_name'].'",';
@@ -344,8 +472,11 @@  discard block
 block discarded – undo
344 472
 							$output .= '"airline_name": "NA",';
345 473
 						}
346 474
 						if (isset($spotter_item['departure_airport'])) {
347
-							if ($compress) $output .= '"dac": "'.$spotter_item['departure_airport'].'",';
348
-							else $output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",';
475
+							if ($compress) {
476
+								$output .= '"dac": "'.$spotter_item['departure_airport'].'",';
477
+							} else {
478
+								$output .= '"departure_airport_code": "'.$spotter_item['departure_airport'].'",';
479
+							}
349 480
 						}
350 481
 						if (isset($spotter_item['departure_airport_city'])) {
351 482
 							$output .= '"departure_airport": "'.$spotter_item['departure_airport_city'].', '.$spotter_item['departure_airport_country'].'",';
@@ -357,8 +488,11 @@  discard block
 block discarded – undo
357 488
 							$output .= '"arrival_airport_time": "'.$spotter_item['arrival_airport_time'].'",';
358 489
 						}
359 490
 						if (isset($spotter_item['arrival_airport'])) {
360
-							if ($compress) $output .= '"aac": "'.$spotter_item['arrival_airport'].'",';
361
-							else $output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",';
491
+							if ($compress) {
492
+								$output .= '"aac": "'.$spotter_item['arrival_airport'].'",';
493
+							} else {
494
+								$output .= '"arrival_airport_code": "'.$spotter_item['arrival_airport'].'",';
495
+							}
362 496
 						}
363 497
 						if (isset($spotter_item['arrival_airport_city'])) {
364 498
 							$output .= '"arrival_airport": "'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].'",';
@@ -377,11 +511,17 @@  discard block
 block discarded – undo
377 511
 						}
378 512
 						
379 513
 						if (isset($spotter_item['altitude'])) {
380
-							if ($compress) $output .= '"a": "'.$spotter_item['altitude'].'",';
381
-							else $output .= '"altitude": "'.$spotter_item['altitude'].'",';
514
+							if ($compress) {
515
+								$output .= '"a": "'.$spotter_item['altitude'].'",';
516
+							} else {
517
+								$output .= '"altitude": "'.$spotter_item['altitude'].'",';
518
+							}
519
+						}
520
+						if ($compress) {
521
+							$output .= '"h": "'.$spotter_item['heading'].'",';
522
+						} else {
523
+							$output .= '"heading": "'.$spotter_item['heading'].'",';
382 524
 						}
383
-						if ($compress)$output .= '"h": "'.$spotter_item['heading'].'",';
384
-						else $output .= '"heading": "'.$spotter_item['heading'].'",';
385 525
 						
386 526
 						if (isset($archivespeed)) {
387 527
 							$nextcoord = $Common->nextcoord($spotter_item['latitude'],$spotter_item['longitude'],$spotter_item['ground_speed'],$spotter_item['heading'],$archivespeed);
@@ -391,7 +531,9 @@  discard block
 block discarded – undo
391 531
 							$output .= '"nextlatlon": ['.$nextcoord['latitude'].','.$nextcoord['longitude'].'],';
392 532
 						}
393 533
 
394
-						if (!$min) $output .= '"image": "'.$image.'",';
534
+						if (!$min) {
535
+							$output .= '"image": "'.$image.'",';
536
+						}
395 537
 						if (isset($spotter_item['image_copyright']) && $spotter_item['image_copyright'] != '') {
396 538
 							$output .= '"image_copyright": "'.str_replace('"',"'",trim(str_replace(array("\r\n","\r","\n","\\r","\\n","\\r\\n"),'',$spotter_item['image_copyright']))).'",';
397 539
 						}
@@ -399,8 +541,11 @@  discard block
 block discarded – undo
399 541
 							$output .= '"image_source_website": "'.urlencode($spotter_item['image_source_website']).'",';
400 542
 						}
401 543
 						if (isset($spotter_item['squawk'])) {
402
-							if ($compress) $output .= '"sq": "'.$spotter_item['squawk'].'",';
403
-							else $output .= '"squawk": "'.$spotter_item['squawk'].'",';
544
+							if ($compress) {
545
+								$output .= '"sq": "'.$spotter_item['squawk'].'",';
546
+							} else {
547
+								$output .= '"squawk": "'.$spotter_item['squawk'].'",';
548
+							}
404 549
 						}
405 550
 						if (isset($spotter_item['squawk_usage'])) {
406 551
 							$output .= '"squawk_usage": "'.$spotter_item['squawk_usage'].'",';
@@ -419,14 +564,23 @@  discard block
 block discarded – undo
419 564
 						}
420 565
 						// type when not aircraft ?
421 566
 						if (isset($spotter_item['type'])) {
422
-							if ($compress) $output .= '"t": "'.$spotter_item['type'].'"';
423
-							else $output .= '"type": "'.$spotter_item['type'].'"';
567
+							if ($compress) {
568
+								$output .= '"t": "'.$spotter_item['type'].'"';
569
+							} else {
570
+								$output .= '"type": "'.$spotter_item['type'].'"';
571
+							}
424 572
 						} elseif ($marine) {
425
-							if ($compress) $output .= '"t": "ship"';
426
-							else $output .= '"type": "ship"';
573
+							if ($compress) {
574
+								$output .= '"t": "ship"';
575
+							} else {
576
+								$output .= '"type": "ship"';
577
+							}
427 578
 						} else {
428
-							if ($compress) $output .= '"t": "aircraft"';
429
-							else $output .= '"type": "aircraft"';
579
+							if ($compress) {
580
+								$output .= '"t": "aircraft"';
581
+							} else {
582
+								$output .= '"type": "aircraft"';
583
+							}
430 584
 						}
431 585
 						$output .= '},';
432 586
 						$output .= '"geometry": {';
@@ -494,7 +648,9 @@  discard block
 block discarded – undo
494 648
 			}
495 649
 */
496 650
 				$history = filter_input(INPUT_GET,'history',FILTER_SANITIZE_STRING);
497
-				if ($history == '' && isset($_COOKIE['history'])) $history = $_COOKIE['history'];
651
+				if ($history == '' && isset($_COOKIE['history'])) {
652
+					$history = $_COOKIE['history'];
653
+				}
498 654
 				
499 655
 				if (
500 656
 				    (isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true') 
@@ -538,8 +694,11 @@  discard block
 block discarded – undo
538 694
 									$output_history .= ']}},';
539 695
 									$output .= $output_history;
540 696
 								}
541
-								if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": [';
542
-								else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": [';
697
+								if ($compress) {
698
+									$output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history","a": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": [';
699
+								} else {
700
+									$output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history","altitude": "'.$alt.'"},"geometry": {"type": "LineString","coordinates": [';
701
+								}
543 702
 							}
544 703
 							$output_history .= '[';
545 704
 							$output_history .=  $spotter_history['longitude'].', ';
@@ -558,9 +717,14 @@  discard block
 block discarded – undo
558 717
 							$prev_alt = $alt;
559 718
 						} else {
560 719
 							if ($d == false) {
561
-								if ($compress) $output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history"},"geometry": {"type": "LineString","coordinates": [';
562
-								else $output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": [';
563
-							} else $d = true;
720
+								if ($compress) {
721
+									$output_history = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "history"},"geometry": {"type": "LineString","coordinates": [';
722
+								} else {
723
+									$output_history = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "history"},"geometry": {"type": "LineString","coordinates": [';
724
+								}
725
+							} else {
726
+								$d = true;
727
+							}
564 728
 							$output_history .= '[';
565 729
 							$output_history .=  $spotter_history['longitude'].', ';
566 730
 							$output_history .=  $spotter_history['latitude'];
@@ -581,7 +745,9 @@  discard block
 block discarded – undo
581 745
 							$output_historyd = '[';
582 746
 							$output_historyd .=  $spotter_item['longitude'].', ';
583 747
 							$output_historyd .=  $spotter_item['latitude'];
584
-							if (isset($spotter_history['altitude'])) $output_historyd .=  ','.$spotter_item['altitude']*30.48;
748
+							if (isset($spotter_history['altitude'])) {
749
+								$output_historyd .=  ','.$spotter_item['altitude']*30.48;
750
+							}
585 751
 							$output_historyd .= '],';
586 752
 							//$output_history = $output_historyd.$output_history;
587 753
 							$output_history = $output_history.$output_historyd;
@@ -603,8 +769,11 @@  discard block
 block discarded – undo
603 769
 				        && $spotter_item['arrival_airport'] != 'NA' 
604 770
 				        && ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == "true") 
605 771
 				    	    || (isset($globalMapRoute) && $globalMapRoute)))) {
606
-				    if ($compress) $output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": [';
607
-				    else $output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": [';
772
+				    if ($compress) {
773
+				    	$output_air = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "route"},"geometry": {"type": "LineString","coordinates": [';
774
+				    } else {
775
+				    	$output_air = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "route"},"geometry": {"type": "LineString","coordinates": [';
776
+				    }
608 777
 				    if (isset($spotter_item['departure_airport_latitude'])) {
609 778
 					$output_air .= '['.$spotter_item['departure_airport_longitude'].','.$spotter_item['departure_airport_latitude'].'],';
610 779
 				    } elseif (isset($spotter_item['departure_airport']) && $spotter_item['departure_airport'] != 'NA') {
@@ -637,8 +806,11 @@  discard block
 block discarded – undo
637 806
 				    	    || (!isset($_COOKIE['MapRemainaingRoute']) && (!isset($globalMapRemainingRoute) 
638 807
 				    	    || (isset($globalMapRemainingRoute) && $globalMapRemainingRoute)))))) {
639 808
 				    $havedata = false;
640
-				    if ($compress) $output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": [';
641
-				    else $output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": [';
809
+				    if ($compress) {
810
+				    	$output_dest = '{"type": "Feature","properties": {"c": "'.$spotter_item['ident'].'","t": "routedest"},"geometry": {"type": "LineString","coordinates": [';
811
+				    } else {
812
+				    	$output_dest = '{"type": "Feature","properties": {"callsign": "'.$spotter_item['ident'].'","type": "routedest"},"geometry": {"type": "LineString","coordinates": [';
813
+				    }
642 814
 				    $output_dest .= '['.$spotter_item['longitude'].','.$spotter_item['latitude'].'],';
643 815
 
644 816
 				    if (isset($spotter_item['arrival_airport_latitude'])) {
@@ -653,7 +825,9 @@  discard block
 block discarded – undo
653 825
 				    }
654 826
 				    //$output_dest  = substr($output_dest, 0, -1);
655 827
 				    $output_dest .= ']}},';
656
-				    if ($havedata) $output .= $output_dest;
828
+				    if ($havedata) {
829
+				    	$output .= $output_dest;
830
+				    }
657 831
 				    unset($output_dest);
658 832
 				}
659 833
 			}
@@ -661,7 +835,9 @@  discard block
 block discarded – undo
661 835
 			$output .= ']';
662 836
 			$output .= ',"initial_sqltime": "'.$sqltime.'",';
663 837
 			$output .= '"totaltime": "'.round(microtime(true)-$begintime,2).'",';
664
-			if (isset($begindate)) $output .= '"archive_date": "'.$begindate.'",';
838
+			if (isset($begindate)) {
839
+				$output .= '"archive_date": "'.$begindate.'",';
840
+			}
665 841
 			$output .= '"fc": "'.$j.'"';
666 842
 		} else {
667 843
 			$output .= '"features": ';
Please login to merge, or discard this patch.
index.php 2 patches
Indentation   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     <?php }; if (isset($globalTracker) && $globalTracker) { ?><td><div id="ibxtracker"><h4><?php echo _("Trackers Detected"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div></td><?php } ?>
41 41
 </tr></table></div>
42 42
 <?php
43
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
43
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
44 44
 
45 45
 ?>
46 46
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php"></script>
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
61 61
 <?php
62 62
 	}
63
-    }
63
+	}
64 64
 ?>
65 65
 <div id="dialog" title="<?php echo _("Session has timed-out"); ?>">
66 66
   <p><?php echo _("In order to save data consumption web page times out after 30 minutes. Close this dialog to continue."); ?></p>
@@ -74,34 +74,34 @@  discard block
 block discarded – undo
74 74
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
75 75
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
76 76
 <?php
77
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
77
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
78 78
 	if (isset($globalArchive) && $globalArchive == TRUE) {
79 79
 ?>
80 80
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
81 81
 <?php
82 82
 	}
83
-    }
83
+	}
84 84
 ?>
85 85
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
86 86
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
87 87
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
88 88
 <?php
89
-    if (isset($globalMap3D) && $globalMap3D) {
89
+	if (isset($globalMap3D) && $globalMap3D) {
90 90
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
91 91
 ?>
92 92
 	<li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
93 93
 <?php
94
-        } else {
95
-    	    if (isset($globalMapSatellites) && $globalMapSatellites) {
94
+		} else {
95
+			if (isset($globalMapSatellites) && $globalMapSatellites) {
96 96
 ?>
97 97
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
98 98
 <?php
99
-	    }
99
+		}
100 100
 ?>
101 101
 	<li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
102 102
 <?php
103 103
 	}
104
-    }
104
+	}
105 105
 ?>
106 106
     </ul>
107 107
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 ?>
176 176
         </div>
177 177
 <?php
178
-    if (isset($globalArchive) && $globalArchive == TRUE) {
178
+	if (isset($globalArchive) && $globalArchive == TRUE) {
179 179
 ?>
180 180
         <div class="sidebar-pane" id="archive">
181 181
 	    <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 	    </form>
236 236
 	</div>
237 237
 <?php
238
-    }
238
+	}
239 239
 ?>
240 240
         <div class="sidebar-pane" id="settings">
241 241
 	    <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -246,56 +246,56 @@  discard block
 block discarded – undo
246 246
 			    <?php
247 247
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
248 248
 				else $MapType = $_COOKIE['MapType'];
249
-			    ?>
249
+				?>
250 250
 			    <?php
251 251
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
252
-			    ?>
252
+				?>
253 253
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
254 254
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
255 255
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
256 256
 			    <?php
257 257
 				}
258
-			    ?>
258
+				?>
259 259
 			    <?php
260
-			        if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
261
-			    ?>
260
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
261
+				?>
262 262
 			    <?php
263
-				    if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
264
-			    ?>
263
+					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
264
+				?>
265 265
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
266 266
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
267 267
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
268 268
 			    <?php
269
-				    }
270
-			    ?>
269
+					}
270
+				?>
271 271
 			    <?php
272
-				    if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
273
-			    ?>
272
+					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
273
+				?>
274 274
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
275 275
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
276 276
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
277 277
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
278 278
 			    <?php
279
-				    }
280
-			    ?>
279
+					}
280
+				?>
281 281
 			    <?php
282
-				    if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
283
-			    ?>
282
+					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
283
+				?>
284 284
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
285 285
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
286 286
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
287 287
 			    <?php
288
-				    }
289
-			    ?>
288
+					}
289
+				?>
290 290
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
291 291
 			    <?php
292 292
 				}
293
-			    ?>
293
+				?>
294 294
 			    <?php
295
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
295
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
296 296
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
297 297
 					else $MapBoxId = $_COOKIE['MapTypeId'];
298
-			    ?>
298
+				?>
299 299
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
300 300
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
301 301
 			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
@@ -309,13 +309,13 @@  discard block
 block discarded – undo
309 309
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
310 310
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
311 311
 			    <?php
312
-				    }
313
-			    ?>
312
+					}
313
+				?>
314 314
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
315 315
 			</select>
316 316
 		    </li>
317 317
 <?php
318
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
318
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
319 319
 ?>
320 320
 		    <li><?php echo _("Type of Terrain:"); ?>
321 321
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
 			</select>
326 326
 		    </li>
327 327
 <?php
328
-    }
328
+	}
329 329
 ?>
330 330
 <?php
331
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
331
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
332 332
 ?>
333 333
 		    
334 334
 		    <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>
@@ -337,75 +337,75 @@  discard block
 block discarded – undo
337 337
 		    <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>
338 338
 		    <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>
339 339
 <?php
340
-    }
340
+	}
341 341
 ?>
342 342
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
343 343
 <?php
344
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
344
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
345 345
 ?>
346 346
 		    <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>
347 347
 <?php
348
-    }
349
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
348
+	}
349
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
350 350
 ?>
351 351
 		    <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>
352 352
 <?php
353
-    }
353
+	}
354 354
 ?>
355 355
 
356 356
 		    <?php
357 357
 			if (function_exists('array_column')) {
358
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
359
-		    ?>
358
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
359
+			?>
360 360
 		    <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>
361 361
 		    <?php
362
-			    }
362
+				}
363 363
 			} elseif (isset($globalSources)) {
364
-			    $dispolar = false;
365
-			    foreach ($globalSources as $testsource) {
366
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
367
-			    }
368
-			    if ($dispolar) {
369
-		    ?>
364
+				$dispolar = false;
365
+				foreach ($globalSources as $testsource) {
366
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
367
+				}
368
+				if ($dispolar) {
369
+			?>
370 370
 		    <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>
371 371
 		    <?php
372
-			    }
373
-		        }
374
-		    ?>
372
+				}
373
+				}
374
+			?>
375 375
 <?php
376
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
376
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
377 377
 ?>
378 378
 
379 379
 		    <?php
380 380
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
381
-		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
382
-		    ?>
381
+					if (extension_loaded('gd') && function_exists('gd_info')) {
382
+			?>
383 383
 		    <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>
384 384
 		    <?php 
385 385
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
386
-		    ?>
386
+			?>
387 387
 		    <li><?php echo _("Aircraft icon color:"); ?>
388 388
 			<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'; ?>">
389 389
 		    </li>
390 390
 		    <?php
391 391
 				}
392
-			    }
393
-		        }
394
-		    ?>
392
+				}
393
+				}
394
+			?>
395 395
 		    <?php
396 396
 			if (isset($globalMarine) && $globalMarine === TRUE) {
397
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
398
-		    ?>
397
+				if (extension_loaded('gd') && function_exists('gd_info')) {
398
+			?>
399 399
 		    <li><?php echo _("Marine icon color:"); ?>
400 400
 			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
401 401
 		    </li>
402 402
 		    <?php
403
-			    }
404
-		        }
405
-		    ?>
403
+				}
404
+				}
405
+			?>
406 406
 		    <?php
407 407
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
408
-		    ?>
408
+			?>
409 409
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
410 410
 			<div class="range">
411 411
 			    <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'; ?>">
@@ -414,9 +414,9 @@  discard block
 block discarded – undo
414 414
 		    </li>
415 415
 		    <?php
416 416
 			}
417
-		    ?>
417
+			?>
418 418
 <?php
419
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
419
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
420 420
 ?>
421 421
 <?php
422 422
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
 		    </li>
438 438
 <?php
439 439
 	}
440
-    }
440
+	}
441 441
 ?>
442 442
 		    <li><?php echo _("Distance unit:"); ?>
443 443
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -470,19 +470,19 @@  discard block
 block discarded – undo
470 470
 		    <ul>
471 471
 		    <?php
472 472
 			if (!isset($globalAircraft) || $globalAircraft) {
473
-		    ?>
473
+			?>
474 474
 		    <?php
475 475
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
476
-		    ?>
476
+			?>
477 477
 			<?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 } ?>
478 478
 			<?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 } ?>
479 479
 			<?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 } ?>
480 480
 		    <?php
481 481
 			}
482
-		    ?>
482
+			?>
483 483
 		    <?php
484 484
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
485
-		    ?>
485
+			?>
486 486
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
487 487
 			    <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>
488 488
 			<?php } ?>
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
 			<?php } ?>
492 492
 		    <?php
493 493
 			}
494
-		    ?>
494
+			?>
495 495
 		    <li><?php echo _("Display airlines:"); ?>
496 496
 		    <br/>
497 497
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -511,14 +511,14 @@  discard block
 block discarded – undo
511 511
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
512 512
 					}
513 513
 				}
514
-			    ?>
514
+				?>
515 515
 			</select>
516 516
 		    </li>
517 517
 		    <?php
518 518
 			$Spotter = new Spotter();
519 519
 			$allalliancenames = $Spotter->getAllAllianceNames();
520 520
 			if (!empty($allalliancenames)) {
521
-		    ?>
521
+			?>
522 522
 		    <li><?php echo _("Display alliance:"); ?>
523 523
 		    <br/>
524 524
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -532,18 +532,18 @@  discard block
 block discarded – undo
532 532
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
533 533
 					}
534 534
 				}
535
-			    ?>
535
+				?>
536 536
 			</select>
537 537
 		    </li>
538 538
 		    <?php
539 539
 			}
540
-		    ?>
540
+			?>
541 541
 		    <?php
542 542
 			}
543
-		    ?>
543
+			?>
544 544
 		    <?php
545 545
 			if (isset($globalAPRS) && $globalAPRS) {
546
-		    ?>
546
+			?>
547 547
 		    <li><?php echo _("Display APRS sources name:"); ?>
548 548
 			<select class="selectpicker" multiple onchange="sources(this);">
549 549
 			    <?php
@@ -555,18 +555,18 @@  discard block
 block discarded – undo
555 555
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
556 556
 					}
557 557
 				}
558
-			    ?>
558
+				?>
559 559
 			</select>
560 560
 		    </li>
561 561
 		    <?php
562 562
 			}
563
-		    ?>
563
+			?>
564 564
 		    <?php
565 565
 			if (!isset($globalAircraft) && $globalAircraft) {
566
-		    ?>
566
+			?>
567 567
 		    <?php
568 568
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
569
-		    ?>
569
+			?>
570 570
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
571 571
 			<select class="selectpicker" onchange="airlinestype(this);">
572 572
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -577,14 +577,14 @@  discard block
 block discarded – undo
577 577
 		    </li>
578 578
 		    <?php
579 579
 			}
580
-		    ?>
580
+			?>
581 581
 		    <li>
582 582
 			<?php echo _("Display flight with ident:"); ?>
583 583
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
584 584
 		    </li>
585 585
 		    <?php
586 586
 			}
587
-		    ?>
587
+			?>
588 588
 		</ul>
589 589
 	    </form>
590 590
 	    <form method="post">
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 	    </form>
594 594
     	</div>
595 595
 <?php
596
-    if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
596
+	if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
597 597
 ?>
598 598
         <div class="sidebar-pane" id="satellites">
599 599
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -633,14 +633,14 @@  discard block
 block discarded – undo
633 633
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
634 634
 					}
635 635
 				}
636
-			    ?>
636
+				?>
637 637
 			</select>
638 638
 		    </li>
639 639
 		</ul>
640 640
 	    </form>
641 641
 	</div>
642 642
 <?php
643
-    }
643
+	}
644 644
 ?>
645 645
     </div>
646 646
 </div>
Please login to merge, or discard this patch.
Braces   +397 added lines, -102 removed lines patch added patch discarded remove patch
@@ -154,11 +154,26 @@  discard block
 block discarded – undo
154 154
 				<li><div class="checkbox"><label><input type="checkbox" name="notamcb" value="1" onclick="showNotam();" /><?php echo _("Display NOTAM"); ?></label></div></li>
155 155
 				<li><?php echo _("NOTAM scope:"); ?>
156 156
 					<select class="selectpicker" onchange="notamscope(this);">
157
-						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') print ' selected'; ?>>All</option>
158
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') print ' selected'; ?>>Airport/Enroute warning</option>
159
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') print ' selected'; ?>>Airport warning</option>
160
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') print ' selected'; ?>>Navigation warning</option>
161
-						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') print ' selected'; ?>>Enroute warning</option>
157
+						<option<?php if (!isset($_COOKIE['notamscope']) || $_COOKIE['notamscope'] == 'All') {
158
+	print ' selected';
159
+}
160
+?>>All</option>
161
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport/Enroute warning') {
162
+	print ' selected';
163
+}
164
+?>>Airport/Enroute warning</option>
165
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Airport warning') {
166
+	print ' selected';
167
+}
168
+?>>Airport warning</option>
169
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Navigation warning') {
170
+	print ' selected';
171
+}
172
+?>>Navigation warning</option>
173
+						<option<?php if (isset($_COOKIE['notamscope']) && $_COOKIE['notamscope'] == 'Enroute warning') {
174
+	print ' selected';
175
+}
176
+?>>Enroute warning</option>
162 177
 					</select
163 178
 				</li>
164 179
 			</ul>
@@ -186,7 +201,12 @@  discard block
 block discarded – undo
186 201
 		        <div class="form-group">
187 202
 			    <label>From (UTC):</label>
188 203
 		            <div class='input-group date' id='datetimepicker1'>
189
-            			<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 />
204
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_POST['start_date'])) {
205
+	print $_POST['start_date'];
206
+} elseif (isset($_COOKIE['archive_begin'])) {
207
+	print date("m/d/Y h:i a",$_COOKIE['archive_begin']);
208
+}
209
+?>" required />
190 210
 		                <span class="input-group-addon">
191 211
             			    <span class="glyphicon glyphicon-calendar"></span>
192 212
 		                </span>
@@ -195,7 +215,12 @@  discard block
 block discarded – undo
195 215
 		        <div class="form-group">
196 216
 			    <label>To (UTC):</label>
197 217
 		            <div class='input-group date' id='datetimepicker2'>
198
-		                <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']); ?>" />
218
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_POST['end_date'])) {
219
+	print $_POST['end_date'];
220
+} elseif (isset($_COOKIE['archive_end'])) {
221
+	print date("m/d/Y h:i a",$_COOKIE['archive_end']);
222
+}
223
+?>" />
199 224
             			<span class="input-group-addon">
200 225
 		                    <span class="glyphicon glyphicon-calendar"></span>
201 226
             			</span>
@@ -221,8 +246,20 @@  discard block
 block discarded – undo
221 246
 
222 247
 		    <li><?php echo _("Playback speed:"); ?>
223 248
 			<div class="range">
224
-			    <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'; ?>">
225
-			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) print $_COOKIE['archive_speed']; else print '1'; ?></output>
249
+			    <input type="range" min="0" max="50" step="1" name="archivespeed" onChange="archivespeedrange.value=value;" value="<?php  if (isset($_POST['archivespeed'])) {
250
+	print $_POST['archivespeed'];
251
+} elseif (isset($_COOKIE['archive_speed'])) {
252
+	print $_COOKIE['archive_speed'];
253
+} else {
254
+	print '1';
255
+}
256
+?>">
257
+			    <output id="archivespeedrange"><?php  if (isset($_COOKIE['archive_speed'])) {
258
+	print $_COOKIE['archive_speed'];
259
+} else {
260
+	print '1';
261
+}
262
+?></output>
226 263
 			</div>
227 264
 		    </li>
228 265
 		    <li><input type="submit" name="archive" value="Show archive" class="btn btn-primary" /></li>
@@ -244,15 +281,27 @@  discard block
 block discarded – undo
244 281
 		    <li><?php echo _("Type of Map:"); ?>
245 282
 			<select  class="selectpicker" onchange="mapType(this);">
246 283
 			    <?php
247
-				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
248
-				else $MapType = $_COOKIE['MapType'];
284
+				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') {
285
+					$MapType = $globalMapProvider;
286
+				} else {
287
+					$MapType = $_COOKIE['MapType'];
288
+				}
249 289
 			    ?>
250 290
 			    <?php
251 291
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
252 292
 			    ?>
253
-			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
254
-			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
255
-			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
293
+			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') {
294
+	print ' selected';
295
+}
296
+?>>Bing-Aerial</option>
297
+			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') {
298
+	print ' selected';
299
+}
300
+?>>Bing-Hybrid</option>
301
+			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') {
302
+	print ' selected';
303
+}
304
+?>>Bing-Road</option>
256 305
 			    <?php
257 306
 				}
258 307
 			    ?>
@@ -262,56 +311,131 @@  discard block
 block discarded – undo
262 311
 			    <?php
263 312
 				    if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
264 313
 			    ?>
265
-			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
266
-			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
267
-			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
314
+			    <option value="Here-Aerial"<?php if ($MapType == 'Here') {
315
+	print ' selected';
316
+}
317
+?>>Here-Aerial</option>
318
+			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') {
319
+	print ' selected';
320
+}
321
+?>>Here-Hybrid</option>
322
+			    <option value="Here-Road"<?php if ($MapType == 'Here') {
323
+	print ' selected';
324
+}
325
+?>>Here-Road</option>
268 326
 			    <?php
269 327
 				    }
270 328
 			    ?>
271 329
 			    <?php
272 330
 				    if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
273 331
 			    ?>
274
-			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
275
-			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
276
-			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
277
-			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
332
+			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') {
333
+	print ' selected';
334
+}
335
+?>>Google Roadmap</option>
336
+			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') {
337
+	print ' selected';
338
+}
339
+?>>Google Satellite</option>
340
+			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') {
341
+	print ' selected';
342
+}
343
+?>>Google Hybrid</option>
344
+			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') {
345
+	print ' selected';
346
+}
347
+?>>Google Terrain</option>
278 348
 			    <?php
279 349
 				    }
280 350
 			    ?>
281 351
 			    <?php
282 352
 				    if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
283 353
 			    ?>
284
-			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
285
-			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
286
-			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
354
+			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') {
355
+	print ' selected';
356
+}
357
+?>>MapQuest-OSM</option>
358
+			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') {
359
+	print ' selected';
360
+}
361
+?>>MapQuest-Aerial</option>
362
+			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') {
363
+	print ' selected';
364
+}
365
+?>>MapQuest-Hybrid</option>
287 366
 			    <?php
288 367
 				    }
289 368
 			    ?>
290
-			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
369
+			    <option value="Yandex"<?php if ($MapType == 'Yandex') {
370
+	print ' selected';
371
+}
372
+?>>Yandex</option>
291 373
 			    <?php
292 374
 				}
293 375
 			    ?>
294 376
 			    <?php
295 377
 				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
296
-					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
297
-					else $MapBoxId = $_COOKIE['MapTypeId'];
378
+					if (!isset($_COOKIE['MapTypeId'])) {
379
+						$MapBoxId = 'default';
380
+					} else {
381
+						$MapBoxId = $_COOKIE['MapTypeId'];
382
+					}
298 383
 			    ?>
299
-			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
300
-			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
301
-			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
302
-			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') print ' selected'; ?>>Mapbox dark</option>
303
-			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') print ' selected'; ?>>Mapbox satellite</option>
304
-			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') print ' selected'; ?>>Mapbox streets-satellite</option>
305
-			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') print ' selected'; ?>>Mapbox streets-basic</option>
306
-			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') print ' selected'; ?>>Mapbox comic</option>
307
-			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') print ' selected'; ?>>Mapbox outdoors</option>
308
-			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') print ' selected'; ?>>Mapbox pencil</option>
309
-			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
310
-			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
384
+			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') {
385
+	print ' selected';
386
+}
387
+?>>Mapbox default</option>
388
+			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') {
389
+	print ' selected';
390
+}
391
+?>>Mapbox streets</option>
392
+			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') {
393
+	print ' selected';
394
+}
395
+?>>Mapbox light</option>
396
+			    <option value="Mapbox-mapbox.dark"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.dark') {
397
+	print ' selected';
398
+}
399
+?>>Mapbox dark</option>
400
+			    <option value="Mapbox-mapbox.satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.satellite') {
401
+	print ' selected';
402
+}
403
+?>>Mapbox satellite</option>
404
+			    <option value="Mapbox-mapbox.streets-satellite"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-satellite') {
405
+	print ' selected';
406
+}
407
+?>>Mapbox streets-satellite</option>
408
+			    <option value="Mapbox-mapbox.streets-basic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets-basic') {
409
+	print ' selected';
410
+}
411
+?>>Mapbox streets-basic</option>
412
+			    <option value="Mapbox-mapbox.comic"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.comic') {
413
+	print ' selected';
414
+}
415
+?>>Mapbox comic</option>
416
+			    <option value="Mapbox-mapbox.outdoors"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.outdoors') {
417
+	print ' selected';
418
+}
419
+?>>Mapbox outdoors</option>
420
+			    <option value="Mapbox-mapbox.pencil"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pencil') {
421
+	print ' selected';
422
+}
423
+?>>Mapbox pencil</option>
424
+			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') {
425
+	print ' selected';
426
+}
427
+?>>Mapbox pirates</option>
428
+			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') {
429
+	print ' selected';
430
+}
431
+?>>Mapbox emerald</option>
311 432
 			    <?php
312 433
 				    }
313 434
 			    ?>
314
-			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
435
+			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') {
436
+	print ' selected';
437
+}
438
+?>>OpenStreetMap</option>
315 439
 			</select>
316 440
 		    </li>
317 441
 <?php
@@ -319,9 +443,18 @@  discard block
 block discarded – undo
319 443
 ?>
320 444
 		    <li><?php echo _("Type of Terrain:"); ?>
321 445
 			<select  class="selectpicker" onchange="terrainType(this);">
322
-			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') print ' selected'; ?>>stk terrain</option>
323
-			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') print ' selected';?>>ellipsoid</option>
324
-			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') print ' selected';?>>vr terrain</option>
446
+			    <option value="stk"<?php if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') {
447
+	print ' selected';
448
+}
449
+?>>stk terrain</option>
450
+			    <option value="ellipsoid"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'ellipsoid') {
451
+	print ' selected';
452
+}
453
+?>>ellipsoid</option>
454
+			    <option value="vrterrain"<?php if (isset($_COOKIE['MapTerrain']) && $_COOKIE['MapTerrain'] == 'vrterrain') {
455
+	print ' selected';
456
+}
457
+?>>vr terrain</option>
325 458
 			</select>
326 459
 		    </li>
327 460
 <?php
@@ -331,19 +464,40 @@  discard block
 block discarded – undo
331 464
     if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
332 465
 ?>
333 466
 		    
334
-		    <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>
335
-		    <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>
336
-		    <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>
337
-		    <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>
338
-		    <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>
467
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') {
468
+	print 'checked';
469
+}
470
+?> ><?php echo _("Display flight info as popup"); ?></label></div></li>
471
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpath" value="1" onclick="clickFlightPath(this)" <?php if ((isset($_COOKIE['flightpath']) && $_COOKIE['flightpath'] == 'true')) {
472
+	print 'checked';
473
+}
474
+?> ><?php echo _("Display flight path"); ?></label></div></li>
475
+		    <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)) {
476
+	print 'checked';
477
+}
478
+?> ><?php echo _("Display flight route on click"); ?></label></div></li>
479
+		    <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)) {
480
+	print 'checked';
481
+}
482
+?> ><?php echo _("Display flight remaining route on click"); ?></label></div></li>
483
+		    <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)) {
484
+	print 'checked';
485
+}
486
+?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
339 487
 <?php
340 488
     }
341 489
 ?>
342
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
490
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') {
491
+	print 'checked';
492
+}
493
+?> ><?php echo _("Display airports on map"); ?></label></div></li>
343 494
 <?php
344 495
     if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
345 496
 ?>
346
-		    <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>
497
+		    <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')) {
498
+	print 'checked';
499
+}
500
+?> ><?php echo _("Show mini-map"); ?></label></div></li>
347 501
 <?php
348 502
     }
349 503
     if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
@@ -357,17 +511,25 @@  discard block
 block discarded – undo
357 511
 			if (function_exists('array_column')) {
358 512
 			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
359 513
 		    ?>
360
-		    <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>
514
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
515
+	print 'checked';
516
+}
517
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
361 518
 		    <?php
362 519
 			    }
363 520
 			} elseif (isset($globalSources)) {
364 521
 			    $dispolar = false;
365 522
 			    foreach ($globalSources as $testsource) {
366
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
523
+			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) {
524
+			        	$dispolar = true;
525
+			        }
367 526
 			    }
368 527
 			    if ($dispolar) {
369 528
 		    ?>
370
-		    <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>
529
+		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) {
530
+	print 'checked';
531
+}
532
+?> ><?php echo _("Display polar on map"); ?></label></div></li>
371 533
 		    <?php
372 534
 			    }
373 535
 		        }
@@ -380,12 +542,22 @@  discard block
 block discarded – undo
380 542
 			if (!isset($globalAircraft) || $globalAircraft === TRUE) {
381 543
 		    	    if (extension_loaded('gd') && function_exists('gd_info')) {
382 544
 		    ?>
383
-		    <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>
545
+		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') {
546
+	print 'checked';
547
+}
548
+?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
384 549
 		    <?php 
385 550
 				if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
386 551
 		    ?>
387 552
 		    <li><?php echo _("Aircraft icon color:"); ?>
388
-			<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'; ?>">
553
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
554
+	print $_COOKIE['IconColor'];
555
+} elseif (isset($globalAircraftIconColor)) {
556
+	print $globalAircraftIconColor;
557
+} else {
558
+	print '1a3151';
559
+}
560
+?>">
389 561
 		    </li>
390 562
 		    <?php
391 563
 				}
@@ -397,7 +569,14 @@  discard block
 block discarded – undo
397 569
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
398 570
 		    ?>
399 571
 		    <li><?php echo _("Marine icon color:"); ?>
400
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
572
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
573
+	print $_COOKIE['MarineIconColor'];
574
+} elseif (isset($globalMarineIconColor)) {
575
+	print $globalMarineIconColor;
576
+} else {
577
+	print '1a3151';
578
+}
579
+?>">
401 580
 		    </li>
402 581
 		    <?php
403 582
 			    }
@@ -408,8 +587,22 @@  discard block
 block discarded – undo
408 587
 		    ?>
409 588
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
410 589
 			<div class="range">
411
-			    <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'; ?>">
412
-			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?></output>
590
+			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) {
591
+	print $_COOKIE['AirportZoom'];
592
+} elseif (isset($globalAirportZoom)) {
593
+	print $globalAirportZoom;
594
+} else {
595
+	print '7';
596
+}
597
+?>">
598
+			    <output id="range"><?php if (isset($_COOKIE['AirportZoom'])) {
599
+	print $_COOKIE['AirportZoom'];
600
+} elseif (isset($globalAirportZoom)) {
601
+	print $globalAirportZoom;
602
+} else {
603
+	print '7';
604
+}
605
+?></output>
413 606
 			</div>
414 607
 		    </li>
415 608
 		    <?php
@@ -421,9 +614,19 @@  discard block
 block discarded – undo
421 614
 <?php
422 615
 	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
423 616
 ?>
424
-		    <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>
617
+		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') {
618
+	print 'checked';
619
+}
620
+?> ><?php echo _("Force Aircraft color"); ?></li>
425 621
 		    <li><?php echo _("Aircraft icon color:"); ?>
426
-			<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'; ?>">
622
+			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) {
623
+	print $_COOKIE['IconColor'];
624
+} elseif (isset($globalAircraftIconColor)) {
625
+	print $globalAircraftIconColor;
626
+} else {
627
+	print 'ff0000';
628
+}
629
+?>">
427 630
 		    </li>
428 631
 <?php
429 632
 	}
@@ -431,9 +634,19 @@  discard block
 block discarded – undo
431 634
 <?php
432 635
 	if (isset($globalMarine) && $globalMarine === TRUE) {
433 636
 ?>
434
-		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Marine color"); ?></li>
637
+		    <li><input type="checkbox" name="marinecolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['MarineIconColorForce']) && $_COOKIE['MarineIconColorForce'] == 'true') {
638
+	print 'checked';
639
+}
640
+?> ><?php echo _("Force Marine color"); ?></li>
435 641
 		    <li><?php echo _("Marine icon color:"); ?>
436
-			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print 'ff0000'; ?>">
642
+			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) {
643
+	print $_COOKIE['MarineIconColor'];
644
+} elseif (isset($globalMarineIconColor)) {
645
+	print $globalMarineIconColor;
646
+} else {
647
+	print 'ff0000';
648
+}
649
+?>">
437 650
 		    </li>
438 651
 <?php
439 652
 	}
@@ -441,22 +654,46 @@  discard block
 block discarded – undo
441 654
 ?>
442 655
 		    <li><?php echo _("Distance unit:"); ?>
443 656
 			<select class="selectpicker" onchange="unitdistance(this);">
444
-			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) echo ' selected'; ?>>km</option>
445
-			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) echo ' selected'; ?>>nm</option>
446
-			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) echo ' selected'; ?>>mi</option>
657
+			    <option value="km"<?php if ((!isset($_COOKIE['unitdistance']) && (!isset($globalUnitDistance) || (isset($globalUnitDistance) && $globalUnitDistance == 'km'))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
658
+	echo ' selected';
659
+}
660
+?>>km</option>
661
+			    <option value="nm"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
662
+	echo ' selected';
663
+}
664
+?>>nm</option>
665
+			    <option value="mi"<?php if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
666
+	echo ' selected';
667
+}
668
+?>>mi</option>
447 669
 		        </select>
448 670
 		    </li>
449 671
 		    <li><?php echo _("Altitude unit:"); ?>
450 672
 			<select class="selectpicker" onchange="unitaltitude(this);">
451
-			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) echo ' selected'; ?>>m</option>
452
-			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) echo ' selected'; ?>>feet</option>
673
+			    <option value="m"<?php if ((!isset($_COOKIE['unitaltitude']) && (!isset($globalUnitAltitude) || (isset($globalUnitAltitude) && $globalUnitAltitude == 'm'))) || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'm')) {
674
+	echo ' selected';
675
+}
676
+?>>m</option>
677
+			    <option value="feet"<?php if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) {
678
+	echo ' selected';
679
+}
680
+?>>feet</option>
453 681
 		        </select>
454 682
 		    </li>
455 683
 		    <li><?php echo _("Speed unit:"); ?>
456 684
 			<select class="selectpicker" onchange="unitspeed(this);">
457
-			    <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>
458
-			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) echo ' selected'; ?>>mph</option>
459
-			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) echo ' selected'; ?>>knots</option>
685
+			    <option value="kmh"<?php if ((!isset($_COOKIE['unitspeed']) && (!isset($globalUnitSpeed) || (isset($globalUnitSpeed) && $globalUnitSpeed == 'kmh'))) || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'kmh')) {
686
+	echo ' selected';
687
+}
688
+?>>km/h</option>
689
+			    <option value="mph"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'mph') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'mph')) {
690
+	echo ' selected';
691
+}
692
+?>>mph</option>
693
+			    <option value="knots"<?php if ((!isset($_COOKIE['unitspeed']) && isset($globalUnitSpeed) && $globalUnitSpeed == 'knots') || (isset($_COOKIE['unitspeed']) && $_COOKIE['unitspeed'] == 'knots')) {
694
+	echo ' selected';
695
+}
696
+?>>knots</option>
460 697
 		        </select>
461 698
 		    </li>
462 699
 
@@ -474,9 +711,18 @@  discard block
 block discarded – undo
474 711
 		    <?php
475 712
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
476 713
 		    ?>
477
-			<?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 } ?>
478
-			<?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 } ?>
479
-			<?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 } ?>
714
+			<?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'])) {
715
+	print 'checked';
716
+}
717
+?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
718
+			<?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'])) {
719
+	print 'checked';
720
+}
721
+?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
722
+			<?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'])) {
723
+	print 'checked';
724
+}
725
+?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
480 726
 		    <?php
481 727
 			}
482 728
 		    ?>
@@ -484,10 +730,16 @@  discard block
 block discarded – undo
484 730
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
485 731
 		    ?>
486 732
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
487
-			    <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>
733
+			    <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'])) {
734
+	print 'checked';
735
+}
736
+?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
488 737
 			<?php } ?>
489 738
 			<?php if (isset($globalAPRS) && $globalAPRS) { ?>
490
-			    <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>
739
+			    <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'])) {
740
+	print 'checked';
741
+}
742
+?> ><?php echo _("Display APRS data"); ?></label></div></li>
491 743
 			<?php } ?>
492 744
 		    <?php
493 745
 			}
@@ -504,7 +756,9 @@  discard block
 block discarded – undo
504 756
 				}
505 757
 				foreach($allairlinenames as $airline) {
506 758
 					$airline_name = $airline['airline_name'];
507
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
759
+					if (strlen($airline_name) > 30) {
760
+						$airline_name = substr($airline_name,0,30).'...';
761
+					}
508 762
 					if (isset($_COOKIE['filter_Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['filter_Airlines']))) {
509 763
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
510 764
 					} else {
@@ -522,7 +776,10 @@  discard block
 block discarded – undo
522 776
 		    <li><?php echo _("Display alliance:"); ?>
523 777
 		    <br/>
524 778
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
525
-			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
779
+			    <option value="all"<?php if (!isset($_COOKIE['filter_alliance']) || $_COOKIE['filter_alliance'] == 'all' || $_COOKIE['filter_alliance'] == '') {
780
+	echo ' selected';
781
+}
782
+?>><?php echo _("All"); ?></option>
526 783
 			    <?php
527 784
 				foreach($allalliancenames as $alliance) {
528 785
 					$alliance_name = $alliance['alliance'];
@@ -569,10 +826,22 @@  discard block
 block discarded – undo
569 826
 		    ?>
570 827
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
571 828
 			<select class="selectpicker" onchange="airlinestype(this);">
572
-			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
573
-			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') echo ' selected'; ?>><?php echo _("Passenger"); ?></option>
574
-			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') echo ' selected'; ?>><?php echo _("Cargo"); ?></option>
575
-			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') echo ' selected'; ?>><?php echo _("Military"); ?></option>
829
+			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') {
830
+	echo ' selected';
831
+}
832
+?>><?php echo _("All"); ?></option>
833
+			    <option value="passenger"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'passenger') {
834
+	echo ' selected';
835
+}
836
+?>><?php echo _("Passenger"); ?></option>
837
+			    <option value="cargo"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'cargo') {
838
+	echo ' selected';
839
+}
840
+?>><?php echo _("Cargo"); ?></option>
841
+			    <option value="military"<?php if (isset($_COOKIE['filter_airlinestype']) && $_COOKIE['filter_airlinestype'] == 'military') {
842
+	echo ' selected';
843
+}
844
+?>><?php echo _("Military"); ?></option>
576 845
 			</select>
577 846
 		    </li>
578 847
 		    <?php
@@ -580,7 +849,10 @@  discard block
 block discarded – undo
580 849
 		    ?>
581 850
 		    <li>
582 851
 			<?php echo _("Display flight with ident:"); ?>
583
-			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
852
+			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) {
853
+	print $_COOKIE['filter_ident'];
854
+}
855
+?>" />
584 856
 		    </li>
585 857
 		    <?php
586 858
 			}
@@ -599,7 +871,10 @@  discard block
 block discarded – undo
599 871
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
600 872
 	    <form>
601 873
 		<ul>
602
-		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') print 'checked'; ?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
874
+		    <li><div class="checkbox"><label><input type="checkbox" name="displayiss" value="1" onclick="clickDisplayISS(this)" <?php if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss'] == 'true') {
875
+	print 'checked';
876
+}
877
+?> ><?php echo _("Show ISS, Tiangong-1 and Tiangong-2 on map"); ?></label></div></li>
603 878
 		    <li><?php echo _("Type:"); ?>
604 879
 			<select class="selectpicker" multiple onchange="sattypes(this);">
605 880
 			    <?php
@@ -607,25 +882,45 @@  discard block
 block discarded – undo
607 882
 				$types = $Satellite->get_tle_types();
608 883
 				foreach ($types as $type) {
609 884
 					$type_name = $type['tle_type'];
610
-					if ($type_name == 'musson') $type_name = 'Russian LEO Navigation';
611
-					else if ($type_name == 'nnss') $type_name = 'Navi Navigation Satellite System';
612
-					else if ($type_name == 'sbas') $type_name = 'Satellite-Based Augmentation System';
613
-					else if ($type_name == 'glo-ops') $type_name = 'Glonass Operational';
614
-					else if ($type_name == 'gps-ops') $type_name = 'GPS Operational';
615
-					else if ($type_name == 'argos') $type_name = 'ARGOS Data Collection System';
616
-					else if ($type_name == 'tdrss') $type_name = 'Tracking and Data Relay Satellite System';
617
-					else if ($type_name == 'sarsat') $type_name = 'Search & Rescue';
618
-					else if ($type_name == 'dmc') $type_name = 'Disaster Monitoring';
619
-					else if ($type_name == 'resource') $type_name = 'Earth Resources';
620
-					else if ($type_name == 'stations') $type_name = 'Space Stations';
621
-					else if ($type_name == 'geo') $type_name = 'Geostationary';
622
-					else if ($type_name == 'amateur') $type_name = 'Amateur Radio';
623
-					else if ($type_name == 'x-comm') $type_name = 'Experimental';
624
-					else if ($type_name == 'other-comm') $type_name = 'Other Comm';
625
-					else if ($type_name == 'science') $type_name = 'Space & Earth Science';
626
-					else if ($type_name == 'military') $type_name = 'Miscellaneous Military';
627
-					else if ($type_name == 'radar') $type_name = 'Radar Calibration';
628
-					else if ($type_name == 'tle-new') $type_name = 'Last 30 days launches';
885
+					if ($type_name == 'musson') {
886
+						$type_name = 'Russian LEO Navigation';
887
+					} else if ($type_name == 'nnss') {
888
+						$type_name = 'Navi Navigation Satellite System';
889
+					} else if ($type_name == 'sbas') {
890
+						$type_name = 'Satellite-Based Augmentation System';
891
+					} else if ($type_name == 'glo-ops') {
892
+						$type_name = 'Glonass Operational';
893
+					} else if ($type_name == 'gps-ops') {
894
+						$type_name = 'GPS Operational';
895
+					} else if ($type_name == 'argos') {
896
+						$type_name = 'ARGOS Data Collection System';
897
+					} else if ($type_name == 'tdrss') {
898
+						$type_name = 'Tracking and Data Relay Satellite System';
899
+					} else if ($type_name == 'sarsat') {
900
+						$type_name = 'Search & Rescue';
901
+					} else if ($type_name == 'dmc') {
902
+						$type_name = 'Disaster Monitoring';
903
+					} else if ($type_name == 'resource') {
904
+						$type_name = 'Earth Resources';
905
+					} else if ($type_name == 'stations') {
906
+						$type_name = 'Space Stations';
907
+					} else if ($type_name == 'geo') {
908
+						$type_name = 'Geostationary';
909
+					} else if ($type_name == 'amateur') {
910
+						$type_name = 'Amateur Radio';
911
+					} else if ($type_name == 'x-comm') {
912
+						$type_name = 'Experimental';
913
+					} else if ($type_name == 'other-comm') {
914
+						$type_name = 'Other Comm';
915
+					} else if ($type_name == 'science') {
916
+						$type_name = 'Space & Earth Science';
917
+					} else if ($type_name == 'military') {
918
+						$type_name = 'Miscellaneous Military';
919
+					} else if ($type_name == 'radar') {
920
+						$type_name = 'Radar Calibration';
921
+					} else if ($type_name == 'tle-new') {
922
+						$type_name = 'Last 30 days launches';
923
+					}
629 924
 					
630 925
 					if (isset($_COOKIE['sattypes']) && in_array($type['tle_type'],explode(',',$_COOKIE['sattypes']))) {
631 926
 						print '<option value="'.$type['tle_type'].'" selected>'.$type_name.'</option>';
Please login to merge, or discard this patch.