Completed
Push — master ( 416413...2c5ccc )
by Yannick
16:48 queued 08:22
created
install/index.php 3 patches
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -305,17 +305,17 @@  discard block
 block discarded – undo
305 305
 				</tr>
306 306
 				<!--
307 307
 		<?php
308
-		    require_once(dirname(__FILE__).'/../require/class.Connection.php');
309
-		    $Connection = new Connection();
308
+			require_once(dirname(__FILE__).'/../require/class.Connection.php');
309
+			$Connection = new Connection();
310 310
 		?>
311 311
 				-->
312 312
 		<?php
313
-		    if ($Connection->db != NULL) {
313
+			if ($Connection->db != NULL) {
314 314
 			if ($Connection->tableExists('source_location')) {
315
-			    require_once(dirname(__FILE__).'/../require/class.Source.php');
316
-			    $Source = new Source();
317
-			    $alllocations = $Source->getAllLocationInfo();
318
-			    foreach ($alllocations as $location) {
315
+				require_once(dirname(__FILE__).'/../require/class.Source.php');
316
+				$Source = new Source();
317
+				$alllocations = $Source->getAllLocationInfo();
318
+				foreach ($alllocations as $location) {
319 319
 		?>
320 320
 				<tr>
321 321
 	    				<input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" />
@@ -329,9 +329,9 @@  discard block
 block discarded – undo
329 329
 				</tr>
330 330
 		
331 331
 		<?php
332
-			    }
332
+				}
333
+			}
333 334
 			}
334
-		    }
335 335
 		?>
336 336
 
337 337
 				<tr>
@@ -424,12 +424,12 @@  discard block
 block discarded – undo
424 424
 ?>
425 425
 							<tr>
426 426
 								<?php
427
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
427
+									if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
428 428
 								?>
429 429
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
430 430
 								<td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td>
431 431
 								<?php
432
-								    } else {
432
+									} else {
433 433
 									$hostport = explode(':',$source['host']);
434 434
 									if (isset($hostport[1])) {
435 435
 										$host = $hostport[0];
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 								<td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td>
443 443
 								<td><input type="number" name="port[]" id="port" value="<?php print $port; ?>" /></td>
444 444
 								<?php
445
-								    }
445
+									}
446 446
 								?>
447 447
 								<td>
448 448
 									<select name="format[]" id="format">
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 			<br />
759 759
 			<p>
760 760
 			<?php 
761
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
761
+				if (extension_loaded('gd') && function_exists('gd_info')) {
762 762
 			?>
763 763
 				<label for="aircrafticoncolor">Color of aircraft icon on map</label>
764 764
 				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" />
@@ -768,11 +768,11 @@  discard block
 block discarded – undo
768 768
 				<b>The directory cache is not writable, aircraft icon will not be cached</b>
769 769
 			<?php
770 770
 				}
771
-			    } else {
771
+				} else {
772 772
 			?>
773 773
 				<b>PHP GD is not installed, you can t change color of aircraft icon on map</b>
774 774
 			<?php
775
-			    }
775
+				}
776 776
 			?>
777 777
 			</p>
778 778
 			<br />
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
 	</p>
792 792
 <?php
793 793
 	require('../footer.php');
794
-        exit;
794
+		exit;
795 795
 }
796 796
 	
797 797
 $settings = array();
@@ -881,8 +881,8 @@  discard block
 block discarded – undo
881 881
 	
882 882
 	$sources = array();
883 883
 	foreach ($source_name as $keys => $name) {
884
-	    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]);
885
-	    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]);
884
+		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]);
885
+		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]);
886 886
 	}
887 887
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
888 888
 
@@ -1176,14 +1176,14 @@  discard block
 block discarded – undo
1176 1176
 
1177 1177
 	// Set some defaults values...
1178 1178
 	if (!isset($globalAircraftImageSources)) {
1179
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1180
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1179
+		$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1180
+		$settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1181 1181
 	}
1182 1182
 
1183 1183
 	if (!isset($globalSchedulesSources)) {
1184
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1185
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1186
-    	}
1184
+		$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1185
+			$settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1186
+		}
1187 1187
 
1188 1188
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1189 1189
 
@@ -1235,21 +1235,21 @@  discard block
 block discarded – undo
1235 1235
 	$popi = false;
1236 1236
 	$popw = false;
1237 1237
 	foreach ($_SESSION['done'] as $done) {
1238
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1239
-	    if ($done == 'Create database') $pop = true;
1240
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1241
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1242
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
1238
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1239
+		if ($done == 'Create database') $pop = true;
1240
+		if ($_SESSION['install'] == 'database_create') $pop = true;
1241
+		if ($_SESSION['install'] == 'database_import') $popi = true;
1242
+		if ($_SESSION['install'] == 'waypoints') $popw = true;
1243 1243
 	}
1244 1244
 	if ($pop) {
1245
-	    sleep(5);
1246
-	    print '<li>Create database....<img src="../images/loading.gif" /></li>';
1245
+		sleep(5);
1246
+		print '<li>Create database....<img src="../images/loading.gif" /></li>';
1247 1247
 	} else if ($popi) {
1248
-	    sleep(5);
1249
-	    print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1248
+		sleep(5);
1249
+		print '<li>Create and import tables....<img src="../images/loading.gif" /></li>';
1250 1250
 	} else if ($popw) {
1251
-	    sleep(5);
1252
-	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1251
+		sleep(5);
1252
+		print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1253 1253
 	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1254 1254
 	print '</div></ul>';
1255 1255
 	print '<div id="error"></div>';
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
 	unset($_COOKIE['install']);
1313 1313
 	print '<div class="info column"><ul>';
1314 1314
 	foreach ($_SESSION['done'] as $done) {
1315
-	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1315
+		print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1316 1316
 	}
1317 1317
 	print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>';
1318 1318
 	print '</ul></div>';
Please login to merge, or discard this patch.
Spacing   +210 added lines, -210 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
 	}
@@ -438,13 +438,13 @@  discard block
 block discarded – undo
438 438
 ?>
439 439
 							<tr>
440 440
 								<?php
441
-								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
441
+								    if (filter_var($source['host'], FILTER_VALIDATE_URL)) {
442 442
 								?>
443 443
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
444 444
 								<td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td>
445 445
 								<?php
446 446
 								    } else {
447
-									$hostport = explode(':',$source['host']);
447
+									$hostport = explode(':', $source['host']);
448 448
 									if (isset($hostport[1])) {
449 449
 										$host = $hostport[0];
450 450
 										$port = $hostport[1];
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 			<br />
781 781
 			<p>
782 782
 				<label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label>
783
-				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" />
783
+				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" />
784 784
 			</p>
785 785
 			<br />
786 786
 			<p>
@@ -826,14 +826,14 @@  discard block
 block discarded – undo
826 826
 $error = '';
827 827
 
828 828
 if (isset($_POST['dbtype'])) {
829
-	$dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING);
830
-	$dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING);
831
-	$dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING);
832
-	$dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING);
833
-	$dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING);
834
-	$dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING);
835
-	$dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING);
836
-	$dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING);
829
+	$dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING);
830
+	$dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING);
831
+	$dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING);
832
+	$dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING);
833
+	$dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING);
834
+	$dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING);
835
+	$dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING);
836
+	$dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING);
837 837
 
838 838
 	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded';
839 839
 	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded';
@@ -853,48 +853,48 @@  discard block
 block discarded – undo
853 853
 	} else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
854 854
 	*/
855 855
 	
856
-	$settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname));
856
+	$settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname));
857 857
 
858
-	$sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING);
859
-	$siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING);
860
-	$timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING);
861
-	$language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING);
862
-	$settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language));
858
+	$sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING);
859
+	$siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING);
860
+	$timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING);
861
+	$language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING);
862
+	$settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language));
863 863
 
864
-	$mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING);
865
-	$mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING);
866
-	$mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING);
867
-	$googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING);
868
-	$bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING);
869
-	$mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING);
870
-	$hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING);
871
-	$hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING);
872
-	$settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey));
864
+	$mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING);
865
+	$mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING);
866
+	$mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING);
867
+	$googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING);
868
+	$bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING);
869
+	$mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING);
870
+	$hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING);
871
+	$hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING);
872
+	$settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey));
873 873
 	
874
-	$latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING);
875
-	$latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING);
876
-	$longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING);
877
-	$longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING);
878
-	$livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT);
879
-	$settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom));
874
+	$latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING);
875
+	$latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING);
876
+	$longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING);
877
+	$longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING);
878
+	$livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT);
879
+	$settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom));
880 880
 
881
-	$squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING);
882
-	$settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country));
881
+	$squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING);
882
+	$settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country));
883 883
 
884
-	$latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING);
885
-	$longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING);
886
-	$settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter));
884
+	$latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING);
885
+	$longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING);
886
+	$settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter));
887 887
 
888
-	$acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING);
888
+	$acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING);
889 889
 	if ($acars == 'acars') {
890
-		$settings = array_merge($settings,array('globalACARS' => 'TRUE'));
890
+		$settings = array_merge($settings, array('globalACARS' => 'TRUE'));
891 891
 	} else {
892
-		$settings = array_merge($settings,array('globalACARS' => 'FALSE'));
892
+		$settings = array_merge($settings, array('globalACARS' => 'FALSE'));
893 893
 	}
894 894
 
895
-	$flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING);
896
-	$flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING);
897
-	$settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword));
895
+	$flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING);
896
+	$flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING);
897
+	$settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword));
898 898
 	
899 899
 	$source_name = $_POST['source_name'];
900 900
 	$source_latitude = $_POST['source_latitude'];
@@ -908,8 +908,8 @@  discard block
 block discarded – undo
908 908
 	
909 909
 	$sources = array();
910 910
 	foreach ($source_name as $keys => $name) {
911
-	    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]);
912
-	    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]);
911
+	    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]);
912
+	    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]);
913 913
 	}
914 914
 	if (count($sources) > 0) $_SESSION['sources'] = $sources;
915 915
 
@@ -922,23 +922,23 @@  discard block
 block discarded – undo
922 922
 	$sbsurl = $_POST['sbsurl'];
923 923
 	*/
924 924
 
925
-	$globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING);
926
-	$globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING);
927
-	$globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING);
928
-	$globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING);
929
-	$globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING);
930
-	$globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING);
931
-	$datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING);
925
+	$globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING);
926
+	$globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING);
927
+	$globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING);
928
+	$globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING);
929
+	$globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING);
930
+	$globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING);
931
+	$datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING);
932 932
 
933
-	$globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING);
934
-	if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
935
-	else $settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
936
-	$globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING);
937
-	if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE'));
938
-	else $settings = array_merge($settings,array('globalTracker' => 'FALSE'));
939
-	$globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING);
940
-	if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE'));
941
-	else $settings = array_merge($settings,array('globalMarine' => 'FALSE'));
933
+	$globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING);
934
+	if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE'));
935
+	else $settings = array_merge($settings, array('globalAircraft' => 'FALSE'));
936
+	$globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING);
937
+	if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE'));
938
+	else $settings = array_merge($settings, array('globalTracker' => 'FALSE'));
939
+	$globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING);
940
+	if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE'));
941
+	else $settings = array_merge($settings, array('globalMarine' => 'FALSE'));
942 942
 
943 943
 /*	
944 944
 	$globalSBS1Hosts = array();
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 	}
955 955
 	$settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts));
956 956
 */
957
-	$settings_comment = array_merge($settings_comment,array('globalSBS1Hosts'));
957
+	$settings_comment = array_merge($settings_comment, array('globalSBS1Hosts'));
958 958
 	$host = $_POST['host'];
959 959
 	$port = $_POST['port'];
960 960
 	$name = $_POST['name'];
@@ -965,96 +965,96 @@  discard block
 block discarded – undo
965 965
 	foreach ($host as $key => $h) {
966 966
 		if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE';
967 967
 		else $cov = 'FALSE';
968
-		if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov);
968
+		if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov);
969 969
 	}
970
-	$settings = array_merge($settings,array('globalSources' => $gSources));
970
+	$settings = array_merge($settings, array('globalSources' => $gSources));
971 971
 
972 972
 /*
973 973
 	$sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT);
974 974
 	$settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout));
975 975
 */
976
-	$acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING);
977
-	$acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT);
978
-	$settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport));
976
+	$acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING);
977
+	$acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT);
978
+	$settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport));
979 979
 
980
-	$bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING);
981
-	$settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly));
980
+	$bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING);
981
+	$settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly));
982 982
 
983
-	$notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING);
984
-	$settings = array_merge($settings,array('globalNOTAMSource' => $notamsource));
985
-	$metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING);
986
-	$settings = array_merge($settings,array('globalMETARurl' => $metarsource));
983
+	$notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING);
984
+	$settings = array_merge($settings, array('globalNOTAMSource' => $notamsource));
985
+	$metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING);
986
+	$settings = array_merge($settings, array('globalMETARurl' => $metarsource));
987 987
 
988
-	$zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING);
989
-	$zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING);
990
-	$zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT);
988
+	$zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING);
989
+	$zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING);
990
+	$zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT);
991 991
 	if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') {
992
-		$settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance)));
993
-	} else $settings = array_merge($settings,array('globalDistanceIgnore' => array()));
992
+		$settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance)));
993
+	} else $settings = array_merge($settings, array('globalDistanceIgnore' => array()));
994 994
 
995
-	$refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT);
996
-	$settings = array_merge($settings,array('globalLiveInterval' => $refresh));
997
-	$maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT);
998
-	$settings = array_merge($settings,array('globalMapRefresh' => $maprefresh));
999
-	$mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT);
1000
-	$settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle));
1001
-	$closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT);
1002
-	$settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist));
995
+	$refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT);
996
+	$settings = array_merge($settings, array('globalLiveInterval' => $refresh));
997
+	$maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT);
998
+	$settings = array_merge($settings, array('globalMapRefresh' => $maprefresh));
999
+	$mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT);
1000
+	$settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle));
1001
+	$closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT);
1002
+	$settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist));
1003 1003
 
1004
-	$aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT);
1005
-	$settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize));
1004
+	$aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT);
1005
+	$settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize));
1006 1006
 
1007
-	$archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT);
1008
-	$settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths));
1007
+	$archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT);
1008
+	$settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths));
1009 1009
 	
1010
-	$archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING);
1010
+	$archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING);
1011 1011
 	if ($archiveyear == "archiveyear") {
1012
-		$settings = array_merge($settings,array('globalArchiveYear' => 'TRUE'));
1012
+		$settings = array_merge($settings, array('globalArchiveYear' => 'TRUE'));
1013 1013
 	} else {
1014
-		$settings = array_merge($settings,array('globalArchiveYear' => 'FALSE'));
1014
+		$settings = array_merge($settings, array('globalArchiveYear' => 'FALSE'));
1015 1015
 	}
1016
-	$archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT);
1017
-	$settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths));
1018
-	$archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT);
1019
-	$settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1016
+	$archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT);
1017
+	$settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths));
1018
+	$archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT);
1019
+	$settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths));
1020 1020
 
1021
-	$britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING);
1022
-	$settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways));
1023
-	$transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING);
1024
-	$settings = array_merge($settings,array('globalTransaviaKey' => $transavia));
1021
+	$britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING);
1022
+	$settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways));
1023
+	$transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING);
1024
+	$settings = array_merge($settings, array('globalTransaviaKey' => $transavia));
1025 1025
 
1026
-	$lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING);
1027
-	$lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING);
1028
-	$settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret)));
1026
+	$lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING);
1027
+	$lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING);
1028
+	$settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret)));
1029 1029
 
1030 1030
 	// Create in settings.php keys not yet configurable if not already here
1031 1031
 	//if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => ''));
1032
-	if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1032
+	if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE'));
1033 1033
 
1034
-	$resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING);
1034
+	$resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING);
1035 1035
 	if ($resetyearstats == 'resetyearstats') {
1036
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE'));
1036
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE'));
1037 1037
 	} else {
1038
-		$settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE'));
1038
+		$settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE'));
1039 1039
 	}
1040 1040
 
1041
-	$archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING);
1041
+	$archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING);
1042 1042
 	if ($archive == 'archive') {
1043
-		$settings = array_merge($settings,array('globalArchive' => 'TRUE'));
1043
+		$settings = array_merge($settings, array('globalArchive' => 'TRUE'));
1044 1044
 	} else {
1045
-		$settings = array_merge($settings,array('globalArchive' => 'FALSE'));
1045
+		$settings = array_merge($settings, array('globalArchive' => 'FALSE'));
1046 1046
 	}
1047
-	$daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING);
1047
+	$daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING);
1048 1048
 	if ($daemon == 'daemon') {
1049
-		$settings = array_merge($settings,array('globalDaemon' => 'TRUE'));
1049
+		$settings = array_merge($settings, array('globalDaemon' => 'TRUE'));
1050 1050
 	} else {
1051
-		$settings = array_merge($settings,array('globalDaemon' => 'FALSE'));
1051
+		$settings = array_merge($settings, array('globalDaemon' => 'FALSE'));
1052 1052
 	}
1053
-	$schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING);
1053
+	$schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING);
1054 1054
 	if ($schedules == 'schedules') {
1055
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE'));
1055
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE'));
1056 1056
 	} else {
1057
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE'));
1057
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE'));
1058 1058
 	}
1059 1059
 
1060 1060
 /*
@@ -1065,177 +1065,177 @@  discard block
 block discarded – undo
1065 1065
 		$settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE'));
1066 1066
 	}
1067 1067
 */
1068
-	$settings = array_merge($settings,array('globalFlightAware' => 'FALSE'));
1069
-	if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1070
-	else $settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1071
-	if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1072
-	else $settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1068
+	$settings = array_merge($settings, array('globalFlightAware' => 'FALSE'));
1069
+	if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE'));
1070
+	else $settings = array_merge($settings, array('globalSBS1' => 'FALSE'));
1071
+	if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE'));
1072
+	else $settings = array_merge($settings, array('globalAPRS' => 'FALSE'));
1073 1073
 	if ($globalivao == 'ivao') {
1074 1074
 		//$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE'));
1075
-		$settings = array_merge($settings,array('globalIVAO' => 'TRUE'));
1076
-	} else $settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1075
+		$settings = array_merge($settings, array('globalIVAO' => 'TRUE'));
1076
+	} else $settings = array_merge($settings, array('globalIVAO' => 'FALSE'));
1077 1077
 	if ($globalvatsim == 'vatsim') {
1078 1078
 		//$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE'));
1079
-		$settings = array_merge($settings,array('globalVATSIM' => 'TRUE'));
1080
-	} else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1079
+		$settings = array_merge($settings, array('globalVATSIM' => 'TRUE'));
1080
+	} else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE'));
1081 1081
 	if ($globalphpvms == 'phpvms') {
1082
-		$settings = array_merge($settings,array('globalphpVMS' => 'TRUE'));
1083
-	} else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1082
+		$settings = array_merge($settings, array('globalphpVMS' => 'TRUE'));
1083
+	} else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE'));
1084 1084
 	if ($globalvam == 'vam') {
1085
-		$settings = array_merge($settings,array('globalVAM' => 'TRUE'));
1086
-	} else $settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1085
+		$settings = array_merge($settings, array('globalVAM' => 'TRUE'));
1086
+	} else $settings = array_merge($settings, array('globalVAM' => 'FALSE'));
1087 1087
 	if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') {
1088
-		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE'));
1089
-	} else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1088
+		$settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE'));
1089
+	} else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE'));
1090 1090
 	
1091 1091
 
1092 1092
 
1093
-	$notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING);
1093
+	$notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING);
1094 1094
 	if ($notam == 'notam') {
1095
-		$settings = array_merge($settings,array('globalNOTAM' => 'TRUE'));
1095
+		$settings = array_merge($settings, array('globalNOTAM' => 'TRUE'));
1096 1096
 	} else {
1097
-		$settings = array_merge($settings,array('globalNOTAM' => 'FALSE'));
1097
+		$settings = array_merge($settings, array('globalNOTAM' => 'FALSE'));
1098 1098
 	}
1099
-	$owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING);
1099
+	$owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING);
1100 1100
 	if ($owner == 'owner') {
1101
-		$settings = array_merge($settings,array('globalOwner' => 'TRUE'));
1101
+		$settings = array_merge($settings, array('globalOwner' => 'TRUE'));
1102 1102
 	} else {
1103
-		$settings = array_merge($settings,array('globalOwner' => 'FALSE'));
1103
+		$settings = array_merge($settings, array('globalOwner' => 'FALSE'));
1104 1104
 	}
1105
-	$map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING);
1105
+	$map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING);
1106 1106
 	if ($map3d == 'map3d') {
1107
-		$settings = array_merge($settings,array('globalMap3D' => 'TRUE'));
1107
+		$settings = array_merge($settings, array('globalMap3D' => 'TRUE'));
1108 1108
 	} else {
1109
-		$settings = array_merge($settings,array('globalMap3D' => 'FALSE'));
1109
+		$settings = array_merge($settings, array('globalMap3D' => 'FALSE'));
1110 1110
 	}
1111
-	$crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING);
1111
+	$crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING);
1112 1112
 	if ($crash == 'crash') {
1113
-		$settings = array_merge($settings,array('globalAccidents' => 'TRUE'));
1113
+		$settings = array_merge($settings, array('globalAccidents' => 'TRUE'));
1114 1114
 	} else {
1115
-		$settings = array_merge($settings,array('globalAccidents' => 'FALSE'));
1115
+		$settings = array_merge($settings, array('globalAccidents' => 'FALSE'));
1116 1116
 	}
1117
-	$mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING);
1117
+	$mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING);
1118 1118
 	if ($mapsatellites == 'mapsatellites') {
1119
-		$settings = array_merge($settings,array('globalMapSatellites' => 'TRUE'));
1119
+		$settings = array_merge($settings, array('globalMapSatellites' => 'TRUE'));
1120 1120
 	} else {
1121
-		$settings = array_merge($settings,array('globalMapSatellites' => 'FALSE'));
1121
+		$settings = array_merge($settings, array('globalMapSatellites' => 'FALSE'));
1122 1122
 	}
1123
-	$map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING);
1123
+	$map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING);
1124 1124
 	if ($map3ddefault == 'map3ddefault') {
1125
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE'));
1125
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE'));
1126 1126
 	} else {
1127
-		$settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE'));
1127
+		$settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE'));
1128 1128
 	}
1129
-	$translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING);
1129
+	$translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING);
1130 1130
 	if ($translate == 'translate') {
1131
-		$settings = array_merge($settings,array('globalTranslate' => 'TRUE'));
1131
+		$settings = array_merge($settings, array('globalTranslate' => 'TRUE'));
1132 1132
 	} else {
1133
-		$settings = array_merge($settings,array('globalTranslate' => 'FALSE'));
1133
+		$settings = array_merge($settings, array('globalTranslate' => 'FALSE'));
1134 1134
 	}
1135
-	$realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING);
1135
+	$realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING);
1136 1136
 	if ($realairlines == 'realairlines') {
1137
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE'));
1137
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE'));
1138 1138
 	} else {
1139
-		$settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE'));
1139
+		$settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE'));
1140 1140
 	}
1141
-	$estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING);
1141
+	$estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING);
1142 1142
 	if ($estimation == 'estimation') {
1143
-		$settings = array_merge($settings,array('globalMapEstimation' => 'TRUE'));
1143
+		$settings = array_merge($settings, array('globalMapEstimation' => 'TRUE'));
1144 1144
 	} else {
1145
-		$settings = array_merge($settings,array('globalMapEstimation' => 'FALSE'));
1145
+		$settings = array_merge($settings, array('globalMapEstimation' => 'FALSE'));
1146 1146
 	}
1147
-	$metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING);
1147
+	$metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING);
1148 1148
 	if ($metar == 'metar') {
1149
-		$settings = array_merge($settings,array('globalMETAR' => 'TRUE'));
1149
+		$settings = array_merge($settings, array('globalMETAR' => 'TRUE'));
1150 1150
 	} else {
1151
-		$settings = array_merge($settings,array('globalMETAR' => 'FALSE'));
1151
+		$settings = array_merge($settings, array('globalMETAR' => 'FALSE'));
1152 1152
 	}
1153
-	$metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING);
1153
+	$metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING);
1154 1154
 	if ($metarcycle == 'metarcycle') {
1155
-		$settings = array_merge($settings,array('globalMETARcycle' => 'TRUE'));
1155
+		$settings = array_merge($settings, array('globalMETARcycle' => 'TRUE'));
1156 1156
 	} else {
1157
-		$settings = array_merge($settings,array('globalMETARcycle' => 'FALSE'));
1157
+		$settings = array_merge($settings, array('globalMETARcycle' => 'FALSE'));
1158 1158
 	}
1159
-	$fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING);
1159
+	$fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING);
1160 1160
 	if ($fork == 'fork') {
1161
-		$settings = array_merge($settings,array('globalFork' => 'TRUE'));
1161
+		$settings = array_merge($settings, array('globalFork' => 'TRUE'));
1162 1162
 	} else {
1163
-		$settings = array_merge($settings,array('globalFork' => 'FALSE'));
1163
+		$settings = array_merge($settings, array('globalFork' => 'FALSE'));
1164 1164
 	}
1165 1165
 
1166
-	$colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING);
1166
+	$colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING);
1167 1167
 	if ($colormap == 'colormap') {
1168
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE'));
1168
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE'));
1169 1169
 	} else {
1170
-		$settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE'));
1170
+		$settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE'));
1171 1171
 	}
1172 1172
 	
1173 1173
 	if (isset($_POST['aircrafticoncolor'])) {
1174
-		$aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING);
1175
-		$settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1)));
1174
+		$aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING);
1175
+		$settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1)));
1176 1176
 	}
1177 1177
 
1178
-	$airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT);
1179
-	$settings = array_merge($settings,array('globalAirportZoom' => $airportzoom));
1178
+	$airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT);
1179
+	$settings = array_merge($settings, array('globalAirportZoom' => $airportzoom));
1180 1180
 
1181
-	$unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING);
1182
-	$settings = array_merge($settings,array('globalUnitDistance' => $unitdistance));
1183
-	$unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING);
1184
-	$settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude));
1185
-	$unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING);
1186
-	$settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed));
1181
+	$unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING);
1182
+	$settings = array_merge($settings, array('globalUnitDistance' => $unitdistance));
1183
+	$unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING);
1184
+	$settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude));
1185
+	$unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING);
1186
+	$settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed));
1187 1187
 
1188
-	$mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING);
1188
+	$mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING);
1189 1189
 	if ($mappopup == 'mappopup') {
1190
-		$settings = array_merge($settings,array('globalMapPopup' => 'TRUE'));
1190
+		$settings = array_merge($settings, array('globalMapPopup' => 'TRUE'));
1191 1191
 	} else {
1192
-		$settings = array_merge($settings,array('globalMapPopup' => 'FALSE'));
1192
+		$settings = array_merge($settings, array('globalMapPopup' => 'FALSE'));
1193 1193
 	}
1194
-	$airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING);
1194
+	$airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING);
1195 1195
 	if ($airportpopup == 'airportpopup') {
1196
-		$settings = array_merge($settings,array('globalAirportPopup' => 'TRUE'));
1196
+		$settings = array_merge($settings, array('globalAirportPopup' => 'TRUE'));
1197 1197
 	} else {
1198
-		$settings = array_merge($settings,array('globalAirportPopup' => 'FALSE'));
1198
+		$settings = array_merge($settings, array('globalAirportPopup' => 'FALSE'));
1199 1199
 	}
1200
-	$maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING);
1200
+	$maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING);
1201 1201
 	if ($maphistory == 'maphistory') {
1202
-		$settings = array_merge($settings,array('globalMapHistory' => 'TRUE'));
1202
+		$settings = array_merge($settings, array('globalMapHistory' => 'TRUE'));
1203 1203
 	} else {
1204
-		$settings = array_merge($settings,array('globalMapHistory' => 'FALSE'));
1204
+		$settings = array_merge($settings, array('globalMapHistory' => 'FALSE'));
1205 1205
 	}
1206
-	$flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING);
1206
+	$flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING);
1207 1207
 	if ($flightroute == 'flightroute') {
1208
-		$settings = array_merge($settings,array('globalMapRoute' => 'TRUE'));
1208
+		$settings = array_merge($settings, array('globalMapRoute' => 'TRUE'));
1209 1209
 	} else {
1210
-		$settings = array_merge($settings,array('globalMapRoute' => 'FALSE'));
1210
+		$settings = array_merge($settings, array('globalMapRoute' => 'FALSE'));
1211 1211
 	}
1212
-	$allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING);
1212
+	$allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING);
1213 1213
 	if ($allflights == 'allflights') {
1214
-		$settings = array_merge($settings,array('globalAllFlights' => 'TRUE'));
1214
+		$settings = array_merge($settings, array('globalAllFlights' => 'TRUE'));
1215 1215
 	} else {
1216
-		$settings = array_merge($settings,array('globalAllFlights' => 'FALSE'));
1216
+		$settings = array_merge($settings, array('globalAllFlights' => 'FALSE'));
1217 1217
 	}
1218
-	$waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING);
1218
+	$waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING);
1219 1219
 	if ($waypoints == 'waypoints') {
1220
-		$settings = array_merge($settings,array('globalWaypoints' => 'TRUE'));
1220
+		$settings = array_merge($settings, array('globalWaypoints' => 'TRUE'));
1221 1221
 	} else {
1222
-		$settings = array_merge($settings,array('globalWaypoints' => 'FALSE'));
1222
+		$settings = array_merge($settings, array('globalWaypoints' => 'FALSE'));
1223 1223
 	}
1224 1224
 
1225
-	if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
1225
+	if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE'));
1226 1226
 
1227 1227
 	// Set some defaults values...
1228 1228
 	if (!isset($globalAircraftImageSources)) {
1229
-	    $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters');
1230
-	    $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources));
1229
+	    $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters');
1230
+	    $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources));
1231 1231
 	}
1232 1232
 
1233 1233
 	if (!isset($globalSchedulesSources)) {
1234
-	    $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
1235
-    	    $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources));
1234
+	    $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware');
1235
+    	    $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources));
1236 1236
     	}
1237 1237
 
1238
-	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1238
+	$settings = array_merge($settings, array('globalInstalled' => 'TRUE'));
1239 1239
 
1240 1240
 	if ($error == '') settings::modify_settings($settings);
1241 1241
 	if ($error == '') settings::comment_settings($settings_comment);
Please login to merge, or discard this patch.
Braces   +428 added lines, -113 removed lines patch added patch discarded remove patch
@@ -131,45 +131,72 @@  discard block
 block discarded – undo
131 131
 			</div>
132 132
 			<p>
133 133
 				<label for="dbhost">Database hostname</label>
134
-				<input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" />
134
+				<input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) {
135
+	print $globalDBhost;
136
+}
137
+?>" />
135 138
 			</p>
136 139
 			<p>
137 140
 				<label for="dbport">Database port</label>
138
-				<input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" />
141
+				<input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) {
142
+	print $globalDBport;
143
+}
144
+?>" />
139 145
 				<p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p>
140 146
 			</p>
141 147
 			<p>
142 148
 				<label for="dbname">Database name</label>
143
-				<input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" />
149
+				<input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) {
150
+	print $globalDBname;
151
+}
152
+?>" />
144 153
 			</p>
145 154
 			<p>
146 155
 				<label for="dbuser">Database user</label>
147
-				<input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" />
156
+				<input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) {
157
+	print $globalDBuser;
158
+}
159
+?>" />
148 160
 			</p>
149 161
 			<p>
150 162
 				<label for="dbuserpass">Database user password</label>
151
-				<input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" />
163
+				<input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) {
164
+	print $globalDBpass;
165
+}
166
+?>" />
152 167
 			</p>
153 168
 		</fieldset>
154 169
 		<fieldset id="site">
155 170
 			<legend>Site configuration</legend>
156 171
 			<p>
157 172
 				<label for="sitename">Site name</label>
158
-				<input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" />
173
+				<input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) {
174
+	print $globalName;
175
+}
176
+?>" />
159 177
 			</p>
160 178
 			<p>
161 179
 				<label for="siteurl">Site directory</label>
162
-				<input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" />
180
+				<input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) {
181
+	print $globalURL;
182
+}
183
+?>" />
163 184
 				<p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p>
164 185
 			</p>
165 186
 			<p>
166 187
 				<label for="timezone">Timezone</label>
167
-				<input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" />
188
+				<input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) {
189
+	print $globalTimezone;
190
+}
191
+?>" />
168 192
 				<p class="help-block">ex : UTC, Europe/Paris,...</p>
169 193
 			</p>
170 194
 			<p>
171 195
 				<label for="language">Language</label>
172
-				<input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" />
196
+				<input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) {
197
+	print $globalLanguage;
198
+}
199
+?>" />
173 200
 				<p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p>
174 201
 			</p>
175 202
 		</fieldset>
@@ -190,11 +217,17 @@  discard block
 block discarded – undo
190 217
 			<div id="mapbox_data">
191 218
 				<p>
192 219
 					<label for="mapboxid">Mapbox id</label>
193
-					<input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" />
220
+					<input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) {
221
+	print $globalMapboxId;
222
+}
223
+?>" />
194 224
 				</p>
195 225
 				<p>
196 226
 					<label for="mapboxtoken">Mapbox token</label>
197
-					<input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" />
227
+					<input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) {
228
+	print $globalMapboxToken;
229
+}
230
+?>" />
198 231
 				</p>
199 232
 				<p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p>
200 233
 			</div>
@@ -202,7 +235,10 @@  discard block
 block discarded – undo
202 235
 			<div id="google_data">
203 236
 				<p>
204 237
 					<label for="googlekey">Google API key</label>
205
-					<input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" />
238
+					<input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) {
239
+	print $globalGoogleAPIKey;
240
+}
241
+?>" />
206 242
 					<p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p>
207 243
 				</p>
208 244
 			</div>
@@ -210,7 +246,10 @@  discard block
 block discarded – undo
210 246
 			<div id="bing_data">
211 247
 				<p>
212 248
 					<label for="bingkey">Bing Map key</label>
213
-					<input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" />
249
+					<input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) {
250
+	print $globalBingMapKey;
251
+}
252
+?>" />
214 253
 					<p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p>
215 254
 				</p>
216 255
 			</div>
@@ -218,7 +257,10 @@  discard block
 block discarded – undo
218 257
 			<div id="mapquest_data">
219 258
 				<p>
220 259
 					<label for="mapquestkey">MapQuest key</label>
221
-					<input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" />
260
+					<input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) {
261
+	print $globalMapQuestKey;
262
+}
263
+?>" />
222 264
 					<p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p>
223 265
 				</p>
224 266
 			</div>
@@ -226,11 +268,17 @@  discard block
 block discarded – undo
226 268
 			<div id="here_data">
227 269
 				<p>
228 270
 					<label for="hereappid">Here App_Id</label>
229
-					<input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" />
271
+					<input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) {
272
+	print $globalHereappId;
273
+}
274
+?>" />
230 275
 				</p>
231 276
 				<p>
232 277
 					<label for="hereappcode">Here App_Code</label>
233
-					<input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" />
278
+					<input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) {
279
+	print $globalHereappCode;
280
+}
281
+?>" />
234 282
 				</p>
235 283
 				<p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p>
236 284
 			</div>
@@ -239,42 +287,86 @@  discard block
 block discarded – undo
239 287
 			<legend>Coverage area</legend>
240 288
 			<p>
241 289
 				<label for="latitudemax">The maximum latitude (north)</label>
242
-				<input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" />
290
+				<input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) {
291
+	print $globalLatitudeMax;
292
+}
293
+?>" />
243 294
 			</p>
244 295
 			<p>
245 296
 				<label for="latitudemin">The minimum latitude (south)</label>
246
-				<input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" />
297
+				<input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) {
298
+	print $globalLatitudeMin;
299
+}
300
+?>" />
247 301
 			</p>
248 302
 			<p>
249 303
 				<label for="longitudemax">The maximum longitude (west)</label>
250
-				<input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" />
304
+				<input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) {
305
+	print $globalLongitudeMax;
306
+}
307
+?>" />
251 308
 			</p>
252 309
 			<p>
253 310
 				<label for="longitudemin">The minimum longitude (east)</label>
254
-				<input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" />
311
+				<input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) {
312
+	print $globalLongitudeMin;
313
+}
314
+?>" />
255 315
 			</p>
256 316
 			<p>
257 317
 				<label for="latitudecenter">The latitude center</label>
258
-				<input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" />
318
+				<input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) {
319
+	print $globalCenterLatitude;
320
+}
321
+?>" />
259 322
 			</p>
260 323
 			<p>
261 324
 				<label for="longitudecenter">The longitude center</label>
262
-				<input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" />
325
+				<input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) {
326
+	print $globalCenterLongitude;
327
+}
328
+?>" />
263 329
 			</p>
264 330
 			<p>
265 331
 				<label for="livezoom">Default Zoom on live map</label>
266
-				<input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" />
332
+				<input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) {
333
+	print $globalLiveZoom;
334
+} else {
335
+	print '9';
336
+}
337
+?>" />
267 338
 			</p>
268 339
 			<p>
269 340
 				<label for="squawk_country">Country for squawk usage</label>
270 341
 				<select name="squawk_country" id="squawk_country">
271
-					<option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option>
272
-					<option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option>
273
-					<option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option>
274
-					<option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option>
275
-					<option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option>
276
-					<option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option>
277
-					<option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option>
342
+					<option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') {
343
+	print ' selected ';
344
+}
345
+?>>UK</option>
346
+					<option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') {
347
+	print ' selected ';
348
+}
349
+?>>NZ</option>
350
+					<option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') {
351
+	print ' selected ';
352
+}
353
+?>>US</option>
354
+					<option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') {
355
+	print ' selected ';
356
+}
357
+?>>AU</option>
358
+					<option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') {
359
+	print ' selected ';
360
+}
361
+?>>NL</option>
362
+					<option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') {
363
+	print ' selected ';
364
+}
365
+?>>FR</option>
366
+					<option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') {
367
+	print ' selected ';
368
+}
369
+?>>TR</option>
278 370
 				</select>
279 371
 			</p>
280 372
 		</fieldset>
@@ -283,15 +375,24 @@  discard block
 block discarded – undo
283 375
 			<p><i>Only put in DB flights that are inside a circle</i></p>
284 376
 			<p>
285 377
 				<label for="latitude">Center latitude</label>
286
-				<input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" />
378
+				<input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) {
379
+	echo $globalDistanceIgnore['latitude'];
380
+}
381
+?>" />
287 382
 			</p>
288 383
 			<p>
289 384
 				<label for="longitude">Center longitude</label>
290
-				<input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" />
385
+				<input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) {
386
+	echo $globalDistanceIgnore['longitude'];
387
+}
388
+?>" />
291 389
 			</p>
292 390
 			<p>
293 391
 				<label for="Distance">Distance (in km)</label>
294
-				<input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" />
392
+				<input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) {
393
+	echo $globalDistanceIgnore['distance'];
394
+}
395
+?>" />
295 396
 			</p>
296 397
 		</fieldset>
297 398
 		<fieldset id="sourceloc">
@@ -397,11 +498,17 @@  discard block
 block discarded – undo
397 498
 			<div id="flightaware_data">
398 499
 				<p>
399 500
 					<label for="flightawareusername">FlightAware username</label>
400
-					<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" />
501
+					<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) {
502
+	print $globalFlightAwareUsername;
503
+}
504
+?>" />
401 505
 				</p>
402 506
 				<p>
403 507
 					<label for="flightawarepassword">FlightAware password/API key</label>
404
-					<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" />
508
+					<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) {
509
+	print $globalFlightAwarePassword;
510
+}
511
+?>" />
405 512
 				</p>
406 513
 			</div>
407 514
 -->
@@ -460,26 +567,80 @@  discard block
 block discarded – undo
460 567
 								?>
461 568
 								<td>
462 569
 									<select name="format[]" id="format">
463
-										<option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option>
464
-										<option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option>
465
-										<option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option>
466
-										<option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option>
467
-										<option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option>
468
-										<option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option>
469
-										<option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option>
470
-										<option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server</option>
471
-										<option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option>
472
-										<option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option>
473
-										<option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option>
474
-										<option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option>
475
-										<option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option>
476
-										<option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option>
477
-										<option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option>
478
-										<option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option>
570
+										<option value="auto" <?php if (!isset($source['format'])) {
571
+	print 'selected';
572
+}
573
+?>>Auto</option>
574
+										<option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') {
575
+	print 'selected';
576
+}
577
+?>>SBS</option>
578
+										<option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') {
579
+	print 'selected';
580
+}
581
+?>>TSV</option>
582
+										<option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') {
583
+	print 'selected';
584
+}
585
+?>>Raw</option>
586
+										<option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') {
587
+	print 'selected';
588
+}
589
+?>>APRS</option>
590
+										<option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') {
591
+	print 'selected';
592
+}
593
+?>>Radarcape deltadb.txt</option>
594
+										<option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') {
595
+	print 'selected';
596
+}
597
+?>>Vatsim</option>
598
+										<option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') {
599
+	print 'selected';
600
+}
601
+?>>Virtual Radar Server</option>
602
+										<option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') {
603
+	print 'selected';
604
+}
605
+?>>phpVMS</option>
606
+										<option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') {
607
+	print 'selected';
608
+}
609
+?>>Virtual Airlines Manager</option>
610
+										<option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') {
611
+	print 'selected';
612
+}
613
+?>>IVAO</option>
614
+										<option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') {
615
+	print 'selected';
616
+}
617
+?>>FlightGear Multiplayer</option>
618
+										<option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') {
619
+	print 'selected';
620
+}
621
+?>>FlightGear Singleplayer</option>
622
+										<option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') {
623
+	print 'selected';
624
+}
625
+?>>ACARS from acarsdec/acarsdeco2 over UDP</option>
626
+										<option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') {
627
+	print 'selected';
628
+}
629
+?>>ACARS SBS-3 over TCP</option>
630
+										<option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') {
631
+	print 'selected';
632
+}
633
+?>>NMEA AIS over TCP</option>
479 634
 									</select>
480 635
 								</td>
481
-								<td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td>
482
-								<td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) print 'checked'; ?> /></td>
636
+								<td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) {
637
+	print $source['name'];
638
+}
639
+?>" /></td>
640
+								<td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) {
641
+	print 'checked';
642
+}
643
+?> /></td>
483 644
 								<td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td>
484 645
 							</tr>
485 646
 <?php
@@ -526,11 +687,17 @@  discard block
 block discarded – undo
526 687
 					<p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p>
527 688
 					<p>
528 689
 						<label for="acarshost">ACARS UDP host</label>
529
-						<input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" />
690
+						<input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) {
691
+	print $globalACARSHost;
692
+}
693
+?>" />
530 694
 					</p>
531 695
 					<p>
532 696
 						<label for="acarsport">ACARS UDP port</label>
533
-						<input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" />
697
+						<input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) {
698
+	print $globalACARSPort;
699
+}
700
+?>" />
534 701
 					</p>
535 702
 				</fieldset>
536 703
 			</div>
@@ -610,13 +777,19 @@  discard block
 block discarded – undo
610 777
 			<div id="schedules_options">
611 778
 				<p>
612 779
 					<label for="britishairways">British Airways API Key</label>
613
-					<input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" />
780
+					<input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) {
781
+	print $globalBritishAirwaysKey;
782
+}
783
+?>" />
614 784
 					<p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p>
615 785
 				</p>
616 786
 				<!--
617 787
 				<p>
618 788
 					<label for="transavia">Transavia Test API Consumer Key</label>
619
-					<input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" />
789
+					<input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) {
790
+	print $globalTransaviaKey;
791
+}
792
+?>" />
620 793
 					<p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p>
621 794
 				</p>
622 795
 				-->
@@ -625,10 +798,16 @@  discard block
 block discarded – undo
625 798
 						<b>Lufthansa API Key</b>
626 799
 						<p>
627 800
 							<label for="lufthansakey">Key</label>
628
-							<input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" />
801
+							<input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) {
802
+	print $globalLufthansaKey['key'];
803
+}
804
+?>" />
629 805
 						</p><p>
630 806
 							<label for="lufthansasecret">Secret</label>
631
-							<input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" />
807
+							<input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) {
808
+	print $globalLufthansaKey['secret'];
809
+}
810
+?>" />
632 811
 						</p>
633 812
 					</div>
634 813
 					<p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p>
@@ -648,7 +827,10 @@  discard block
 block discarded – undo
648 827
 			</p>
649 828
 			<p>
650 829
 				<label for="notamsource">URL of your feed from notaminfo.com</label>
651
-				<input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" />
830
+				<input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) {
831
+	print $globalNOTAMSource;
832
+}
833
+?>" />
652 834
 				<p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p>
653 835
 			</p>
654 836
 			<br />
@@ -664,14 +846,20 @@  discard block
 block discarded – undo
664 846
 			<div id="metarsrc">
665 847
 				<p>
666 848
 					<label for="metarsource">URL of your METAR source</label>
667
-					<input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" />
849
+					<input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) {
850
+	print $globalMETARurl;
851
+}
852
+?>" />
668 853
 					<p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p>
669 854
 				</p>
670 855
 			</div>
671 856
 			<br />
672 857
 			<p>
673 858
 				<label for="bitly">Bit.ly access token api (used in search page)</label>
674
-				<input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" />
859
+				<input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) {
860
+	print $globalBitlyAccessToken;
861
+}
862
+?>" />
675 863
 			</p>
676 864
 			<br />
677 865
 			<p>
@@ -691,7 +879,12 @@  discard block
 block discarded – undo
691 879
 			</p>
692 880
 			<p>
693 881
 				<label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label>
694
-				<input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" />
882
+				<input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) {
883
+	print $globalArchiveMonths;
884
+} else {
885
+	echo '0';
886
+}
887
+?>" />
695 888
 				<p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p>
696 889
 			</p>
697 890
 			<p>
@@ -701,12 +894,22 @@  discard block
 block discarded – undo
701 894
 			</p>
702 895
 			<p>
703 896
 				<label for="archivekeepmonths">Keep flights data for xx months in archive</label>
704
-				<input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" />
897
+				<input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) {
898
+	print $globalArchiveKeepMonths;
899
+} else {
900
+	echo '0';
901
+}
902
+?>" />
705 903
 				<p class="help-block">0 to disable</p>
706 904
 			</p>
707 905
 			<p>
708 906
 				<label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label>
709
-				<input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" />
907
+				<input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) {
908
+	print $globalArchiveKeepTrackMonths;
909
+} else {
910
+	echo '0';
911
+}
912
+?>" />
710 913
 				<p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p>
711 914
 			</p>
712 915
 			<br />
@@ -716,7 +919,12 @@  discard block
 block discarded – undo
716 919
 				<p class="help-block">Uncheck if the script is running as cron job</p>
717 920
 				<div id="cronends"> 
718 921
 					<label for="cronend">Run script for xx seconds</label>
719
-					<input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" />
922
+					<input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) {
923
+	print $globalCronEnd;
924
+} else {
925
+	print '0';
926
+}
927
+?>" />
720 928
 					<p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p>
721 929
 				</div>
722 930
 			</p>
@@ -761,26 +969,49 @@  discard block
 block discarded – undo
761 969
 			<br />
762 970
 			<p>
763 971
 				<label for="refresh">Show flights detected since xxx seconds</label>
764
-				<input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" />
972
+				<input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) {
973
+	echo $globalLiveInterval;
974
+} else {
975
+	echo '200';
976
+}
977
+?>" />
765 978
 			</p>
766 979
 			<p>
767 980
 				<label for="maprefresh">Live map refresh (in seconds)</label>
768
-				<input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" />
981
+				<input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) {
982
+	echo $globalMapRefresh;
983
+} else {
984
+	echo '30';
985
+}
986
+?>" />
769 987
 			</p>
770 988
 			<p>
771 989
 				<label for="mapidle">Map idle timeout (in minutes)</label>
772
-				<input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" />
990
+				<input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) {
991
+	echo $globalMapIdleTimeout;
992
+} else {
993
+	echo '30';
994
+}
995
+?>" />
773 996
 				<p class="help-block">0 to disable</p>
774 997
 			</p>
775 998
 			<br />
776 999
 			<p>
777 1000
 				<label for="closestmindist">Distance to airport set as arrival (in km)</label>
778
-				<input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" />
1001
+				<input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) {
1002
+	echo $globalClosestMinDist;
1003
+} else {
1004
+	echo '50';
1005
+}
1006
+?>" />
779 1007
 			</p>
780 1008
 			<br />
781 1009
 			<p>
782 1010
 				<label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label>
783
-				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" />
1011
+				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) {
1012
+	echo $globalAircraftSize;
1013
+}
1014
+?>" />
784 1015
 			</p>
785 1016
 			<br />
786 1017
 			<p>
@@ -788,7 +1019,12 @@  discard block
 block discarded – undo
788 1019
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
789 1020
 			?>
790 1021
 				<label for="aircrafticoncolor">Color of aircraft icon on map</label>
791
-				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" />
1022
+				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) {
1023
+	echo $globalAircraftIconColor;
1024
+} else {
1025
+	echo '1a3151';
1026
+}
1027
+?>" />
792 1028
 			<?php
793 1029
 				if (!is_writable('../cache')) {
794 1030
 			?>
@@ -806,8 +1042,18 @@  discard block
 block discarded – undo
806 1042
 			<p>
807 1043
 				<label for="airportzoom">Zoom level minimum to see airports icons</label>
808 1044
 				<div class="range">
809
-					<input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" />
810
-					<output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output>
1045
+					<input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) {
1046
+	echo $globalAirportZoom;
1047
+} else {
1048
+	echo '7';
1049
+}
1050
+?>" />
1051
+					<output id="range"><?php if (isset($globalAirportZoom)) {
1052
+	echo $globalAirportZoom;
1053
+} else {
1054
+	echo '7';
1055
+}
1056
+?></output>
811 1057
 				</div>
812 1058
 			</p>
813 1059
 		</fieldset>
@@ -835,8 +1081,12 @@  discard block
 block discarded – undo
835 1081
 	$dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING);
836 1082
 	$dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING);
837 1083
 
838
-	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded';
839
-	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded';
1084
+	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) {
1085
+		$error .= 'Mysql driver for PDO must be loaded';
1086
+	}
1087
+	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) {
1088
+		$error .= 'PosgreSQL driver for PDO must be loaded';
1089
+	}
840 1090
 	
841 1091
 	$_SESSION['database_root'] = $dbroot;
842 1092
 	$_SESSION['database_rootpass'] = $dbrootpass;
@@ -903,15 +1153,23 @@  discard block
 block discarded – undo
903 1153
 	$source_city = $_POST['source_city'];
904 1154
 	$source_country = $_POST['source_country'];
905 1155
 	$source_ref = $_POST['source_ref'];
906
-	if (isset($source_id)) $source_id = $_POST['source_id'];
907
-	else $source_id = array();
1156
+	if (isset($source_id)) {
1157
+		$source_id = $_POST['source_id'];
1158
+	} else {
1159
+		$source_id = array();
1160
+	}
908 1161
 	
909 1162
 	$sources = array();
910 1163
 	foreach ($source_name as $keys => $name) {
911
-	    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]);
912
-	    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]);
1164
+	    if (isset($source_id[$keys])) {
1165
+	    	$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]);
1166
+	    } else {
1167
+	    	$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]);
1168
+	    }
1169
+	}
1170
+	if (count($sources) > 0) {
1171
+		$_SESSION['sources'] = $sources;
913 1172
 	}
914
-	if (count($sources) > 0) $_SESSION['sources'] = $sources;
915 1173
 
916 1174
 	//$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING);
917 1175
 	//$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT);
@@ -931,14 +1189,23 @@  discard block
 block discarded – undo
931 1189
 	$datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING);
932 1190
 
933 1191
 	$globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING);
934
-	if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
935
-	else $settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
1192
+	if ($globalaircraft == 'aircraft') {
1193
+		$settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
1194
+	} else {
1195
+		$settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
1196
+	}
936 1197
 	$globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING);
937
-	if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE'));
938
-	else $settings = array_merge($settings,array('globalTracker' => 'FALSE'));
1198
+	if ($globaltracker == 'tracker') {
1199
+		$settings = array_merge($settings,array('globalTracker' => 'TRUE'));
1200
+	} else {
1201
+		$settings = array_merge($settings,array('globalTracker' => 'FALSE'));
1202
+	}
939 1203
 	$globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING);
940
-	if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE'));
941
-	else $settings = array_merge($settings,array('globalMarine' => 'FALSE'));
1204
+	if ($globalmarine == 'marine') {
1205
+		$settings = array_merge($settings,array('globalMarine' => 'TRUE'));
1206
+	} else {
1207
+		$settings = array_merge($settings,array('globalMarine' => 'FALSE'));
1208
+	}
942 1209
 
943 1210
 /*	
944 1211
 	$globalSBS1Hosts = array();
@@ -959,13 +1226,21 @@  discard block
 block discarded – undo
959 1226
 	$port = $_POST['port'];
960 1227
 	$name = $_POST['name'];
961 1228
 	$format = $_POST['format'];
962
-	if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats'];
963
-	else $sourcestats = array();
1229
+	if (isset($_POST['sourcestats'])) {
1230
+		$sourcestats = $_POST['sourcestats'];
1231
+	} else {
1232
+		$sourcestats = array();
1233
+	}
964 1234
 	$gSources = array();
965 1235
 	foreach ($host as $key => $h) {
966
-		if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE';
967
-		else $cov = 'FALSE';
968
-		if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov);
1236
+		if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) {
1237
+			$cov = 'TRUE';
1238
+		} else {
1239
+			$cov = 'FALSE';
1240
+		}
1241
+		if ($h != '') {
1242
+			$gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov);
1243
+		}
969 1244
 	}
970 1245
 	$settings = array_merge($settings,array('globalSources' => $gSources));
971 1246
 
@@ -990,7 +1265,9 @@  discard block
 block discarded – undo
990 1265
 	$zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT);
991 1266
 	if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') {
992 1267
 		$settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance)));
993
-	} else $settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1268
+	} else {
1269
+		$settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1270
+	}
994 1271
 
995 1272
 	$refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT);
996 1273
 	$settings = array_merge($settings,array('globalLiveInterval' => $refresh));
@@ -1029,7 +1306,9 @@  discard block
 block discarded – undo
1029 1306
 
1030 1307
 	// Create in settings.php keys not yet configurable if not already here
1031 1308
 	//if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => ''));
1032
-	if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1309
+	if (!isset($globalDebug)) {
1310
+		$settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1311
+	}
1033 1312
 
1034 1313
 	$resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING);
1035 1314
 	if ($resetyearstats == 'resetyearstats') {
@@ -1066,27 +1345,43 @@  discard block
 block discarded – undo
1066 1345
 	}
1067 1346
 */
1068 1347
 	$settings = array_merge($settings,array('globalFlightAware' => 'FALSE'));
1069
-	if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1070
-	else $settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1071
-	if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1072
-	else $settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1348
+	if ($globalsbs == 'sbs') {
1349
+		$settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1350
+	} else {
1351
+		$settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1352
+	}
1353
+	if ($globalaprs == 'aprs') {
1354
+		$settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1355
+	} else {
1356
+		$settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1357
+	}
1073 1358
 	if ($globalivao == 'ivao') {
1074 1359
 		//$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE'));
1075 1360
 		$settings = array_merge($settings,array('globalIVAO' => 'TRUE'));
1076
-	} else $settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1361
+	} else {
1362
+		$settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1363
+	}
1077 1364
 	if ($globalvatsim == 'vatsim') {
1078 1365
 		//$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE'));
1079 1366
 		$settings = array_merge($settings,array('globalVATSIM' => 'TRUE'));
1080
-	} else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1367
+	} else {
1368
+		$settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1369
+	}
1081 1370
 	if ($globalphpvms == 'phpvms') {
1082 1371
 		$settings = array_merge($settings,array('globalphpVMS' => 'TRUE'));
1083
-	} else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1372
+	} else {
1373
+		$settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1374
+	}
1084 1375
 	if ($globalvam == 'vam') {
1085 1376
 		$settings = array_merge($settings,array('globalVAM' => 'TRUE'));
1086
-	} else $settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1377
+	} else {
1378
+		$settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1379
+	}
1087 1380
 	if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') {
1088 1381
 		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE'));
1089
-	} else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1382
+	} else {
1383
+		$settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1384
+	}
1090 1385
 	
1091 1386
 
1092 1387
 
@@ -1222,7 +1517,9 @@  discard block
 block discarded – undo
1222 1517
 		$settings = array_merge($settings,array('globalWaypoints' => 'FALSE'));
1223 1518
 	}
1224 1519
 
1225
-	if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
1520
+	if (!isset($globalTransaction)) {
1521
+		$settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
1522
+	}
1226 1523
 
1227 1524
 	// Set some defaults values...
1228 1525
 	if (!isset($globalAircraftImageSources)) {
@@ -1237,15 +1534,23 @@  discard block
 block discarded – undo
1237 1534
 
1238 1535
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1239 1536
 
1240
-	if ($error == '') settings::modify_settings($settings);
1241
-	if ($error == '') settings::comment_settings($settings_comment);
1537
+	if ($error == '') {
1538
+		settings::modify_settings($settings);
1539
+	}
1540
+	if ($error == '') {
1541
+		settings::comment_settings($settings_comment);
1542
+	}
1242 1543
 	if ($error != '') {
1243 1544
 		print '<div class="info column">'.$error.'</div>';
1244 1545
 		require('../footer.php');
1245 1546
 		exit;
1246 1547
 	} else {
1247
-		if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1;
1248
-		if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1;
1548
+		if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') {
1549
+			$_SESSION['waypoints'] = 1;
1550
+		}
1551
+		if (isset($_POST['owner']) && $_POST['owner'] == 'owner') {
1552
+			$_SESSION['owner'] = 1;
1553
+		}
1249 1554
 		if (isset($_POST['createdb'])) {
1250 1555
 			$_SESSION['install'] = 'database_create';
1251 1556
 		} else {
@@ -1286,10 +1591,18 @@  discard block
 block discarded – undo
1286 1591
 	$popw = false;
1287 1592
 	foreach ($_SESSION['done'] as $done) {
1288 1593
 	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1289
-	    if ($done == 'Create database') $pop = true;
1290
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1291
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1292
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
1594
+	    if ($done == 'Create database') {
1595
+	    	$pop = true;
1596
+	    }
1597
+	    if ($_SESSION['install'] == 'database_create') {
1598
+	    	$pop = true;
1599
+	    }
1600
+	    if ($_SESSION['install'] == 'database_import') {
1601
+	    	$popi = true;
1602
+	    }
1603
+	    if ($_SESSION['install'] == 'waypoints') {
1604
+	    	$popw = true;
1605
+	    }
1293 1606
 	}
1294 1607
 	if ($pop) {
1295 1608
 	    sleep(5);
@@ -1300,7 +1613,9 @@  discard block
 block discarded – undo
1300 1613
 	} else if ($popw) {
1301 1614
 	    sleep(5);
1302 1615
 	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1303
-	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1616
+	} else {
1617
+		print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
1618
+	}
1304 1619
 	print '</div></ul>';
1305 1620
 	print '<div id="error"></div>';
1306 1621
 /*	foreach ($_SESSION['done'] as $done) {
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
11
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Aircraft from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Aircraft from %s"), $manufacturer);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25 25
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
26
-	foreach($all_manufacturers as $all_manufacturer)
26
+	foreach ($all_manufacturers as $all_manufacturer)
27 27
 	{
28
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29 29
 		{
30 30
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
31 31
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	include('manufacturer-sub-menu.php');
45 45
 	print '<div class="column">';
46 46
 	print '<h2>'._("Most Common Aircraft").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 
49 49
 	$aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer);
50 50
 	if (!empty($aircraft_array))
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		print '</thead>';
60 60
 		print '<tbody>';
61 61
 		$i = 1;
62
-		foreach($aircraft_array as $aircraft_item)
62
+		foreach ($aircraft_array as $aircraft_item)
63 63
 		{
64 64
 			print '<tr>';
65 65
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
manufacturer-statistics-airline-country.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
11
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Airlines by Country from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Airlines by Country from %s"), $manufacturer);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25 25
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
26
-	foreach($all_manufacturers as $all_manufacturer)
26
+	foreach ($all_manufacturers as $all_manufacturer)
27 27
 	{
28
-		if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28
+		if ($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29 29
 		{
30 30
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
31 31
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	include('manufacturer-sub-menu.php');
45 45
 	print '<div class="column">';
46 46
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 	$airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer);
49 49
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
50 50
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             	["'._("Country").'", "'._("# of times").'"], ';
57 57
 
58 58
 	$country_data = '';
59
-	foreach($airline_array as $airline_item)
59
+	foreach ($airline_array as $airline_item)
60 60
 	{
61 61
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
62 62
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		print '</thead>';
91 91
 		print '<tbody>';
92 92
 		$i = 1;
93
-		foreach($airline_array as $airline_item)
93
+		foreach ($airline_array as $airline_item)
94 94
 		{
95 95
 			print '<tr>';
96 96
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
manufacturer-detailed.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -47,7 +47,9 @@  discard block
 block discarded – undo
47 47
 		print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
48 48
 		$Stats = new Stats();
49 49
 		$all_manufacturers = $Stats->getAllManufacturers();
50
-		if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
50
+		if (empty($all_manufacturers)) {
51
+			$all_manufacturers = $Spotter->getAllManufacturers();
52
+		}
51 53
 		foreach($all_manufacturers as $all_manufacturer)
52 54
 		{
53 55
 			if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,16 +4,16 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 $Spotter = new Spotter();
7
-if (!isset($_GET['aircraft_manufacturer'])){
7
+if (!isset($_GET['aircraft_manufacturer'])) {
8 8
 	header('Location: '.$globalURL.'');
9 9
 } else {
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']))
11
+	if (!isset($_GET['limit']))
12 12
 	{
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -27,19 +27,19 @@  discard block
 block discarded – undo
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29 29
 	
30
-	$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
31
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
30
+	$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
31
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/manufacturer/'.$_GET['aircraft_manufacturer'];
33 33
 	
34 34
 	if ($sort != '') {
35
-		$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,$limit_start.",".$absolute_difference, $sort);
35
+		$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, $limit_start.",".$absolute_difference, $sort);
36 36
 	} else {
37
-		$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,$limit_start.",".$absolute_difference, '');
37
+		$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, $limit_start.",".$absolute_difference, '');
38 38
 	}
39 39
 	
40 40
 	if (!empty($spotter_array))
41 41
 	{
42
-		$title = sprintf(_("Detailed View for %s"),$manufacturer);
42
+		$title = sprintf(_("Detailed View for %s"), $manufacturer);
43 43
 
44 44
 		require_once('header.php');
45 45
 		print '<div class="select-item">';
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 		$Stats = new Stats();
49 49
 		$all_manufacturers = $Stats->getAllManufacturers();
50 50
 		if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
51
-		foreach($all_manufacturers as $all_manufacturer)
51
+		foreach ($all_manufacturers as $all_manufacturer)
52 52
 		{
53
-			if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
53
+			if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
54 54
 			{
55 55
 				print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
56 56
 			} else {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 		print '</div>';
68 68
 
69 69
 		print '<div class="table column">';
70
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong."),$manufacturer).'</p>';
70
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong."), $manufacturer).'</p>';
71 71
 
72 72
 		include('manufacturer-sub-menu.php');
73 73
 		include('table-output.php'); 
Please login to merge, or discard this patch.
require/class.ATC.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     /**
12 12
     * Get SQL query part for filter used
13 13
     * @param Array $filter the filter
14
-    * @return Array the SQL part
14
+    * @return string the SQL part
15 15
     */
16 16
     public function getFilter($filter = array(),$where = false,$and = false) {
17 17
 	global $globalFilter, $globalStatsFilters, $globalFilterName;
Please login to merge, or discard this patch.
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,20 +20,27 @@  discard block
 block discarded – undo
20 20
 	if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) {
21 21
 	    if (isset($globalStatsFilters[$globalFilterName][0]['source'])) {
22 22
 		foreach($globalStatsFilters[$globalFilterName] as $source) {
23
-			if (isset($source['source'])) $filter['source'][] = $source['source'];
23
+			if (isset($source['source'])) {
24
+				$filter['source'][] = $source['source'];
25
+			}
24 26
 		}
25 27
 	    } else {
26 28
 		$filter = $globalStatsFilters[$globalFilterName];
27 29
 	    }
28 30
 	}
29
-	if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter);
31
+	if (is_array($globalFilter)) {
32
+		$filter = array_merge($filter,$globalFilter);
33
+	}
30 34
 	$filter_query_join = '';
31 35
 	$filter_query_where = '';
32 36
 	if (isset($filter['source']) && !empty($filter['source'])) {
33 37
 	    $filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')";
34 38
 	}
35
-	if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE';
36
-	elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND';
39
+	if ($filter_query_where == '' && $where) {
40
+		$filter_query_where = ' WHERE';
41
+	} elseif ($filter_query_where != '' && $and) {
42
+		$filter_query_where .= ' AND';
43
+	}
37 44
 	$filter_query = $filter_query_join.$filter_query_where;
38 45
 	return $filter_query;
39 46
     }
@@ -57,7 +64,9 @@  discard block
 block discarded – undo
57 64
     		$info = str_replace('^','<br />',$info);
58 65
     		$info = str_replace('&amp;sect;','',$info);
59 66
     		$info = str_replace('"','',$info);
60
-    		if ($type == '') $type = NULL;
67
+    		if ($type == '') {
68
+    			$type = NULL;
69
+    		}
61 70
                 $query = "INSERT INTO atc (ident,frequency,latitude,longitude,atc_range,info,atc_lastseen,type,ivao_id,ivao_name,format_source,source_name) VALUES (:ident,:frequency,:latitude,:longitude,:range,:info,:date,:type,:ivao_id,:ivao_name,:format_source,:source_name)";
62 71
                 $query_values = array(':ident' => $ident,':frequency' => $frequency,':latitude' => $latitude,':longitude' => $longitude,':range' => $range,':info' => $info,':date' => $date,':ivao_id' => $ivao_id,':ivao_name' => $ivao_name, ':type' => $type,':format_source' => $format_source,':source_name' => $source_name);
63 72
                  try {
Please login to merge, or discard this patch.
Indentation   +73 added lines, -73 removed lines patch added patch discarded remove patch
@@ -10,100 +10,100 @@
 block discarded – undo
10 10
 	}
11 11
 	
12 12
 	
13
-    /**
14
-    * Get SQL query part for filter used
15
-    * @param Array $filter the filter
16
-    * @return Array the SQL part
17
-    */
18
-    public function getFilter($filter = array(),$where = false,$and = false) {
13
+	/**
14
+	 * Get SQL query part for filter used
15
+	 * @param Array $filter the filter
16
+	 * @return Array the SQL part
17
+	 */
18
+	public function getFilter($filter = array(),$where = false,$and = false) {
19 19
 	global $globalFilter, $globalStatsFilters, $globalFilterName;
20 20
 	if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) {
21
-	    if (isset($globalStatsFilters[$globalFilterName][0]['source'])) {
21
+		if (isset($globalStatsFilters[$globalFilterName][0]['source'])) {
22 22
 		foreach($globalStatsFilters[$globalFilterName] as $source) {
23 23
 			if (isset($source['source'])) $filter['source'][] = $source['source'];
24 24
 		}
25
-	    } else {
25
+		} else {
26 26
 		$filter = $globalStatsFilters[$globalFilterName];
27
-	    }
27
+		}
28 28
 	}
29 29
 	if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter);
30 30
 	$filter_query_join = '';
31 31
 	$filter_query_where = '';
32 32
 	if (isset($filter['source']) && !empty($filter['source'])) {
33
-	    $filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')";
33
+		$filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')";
34 34
 	}
35 35
 	if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE';
36 36
 	elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND';
37 37
 	$filter_query = $filter_query_join.$filter_query_where;
38 38
 	return $filter_query;
39
-    }
39
+	}
40 40
 
41
-       public function getAll() {
42
-    		$filter_query = $this->getFilter(array());
43
-                $query = "SELECT * FROM atc".$filter_query;
44
-                $query_values = array();
45
-                 try {
46
-                        $sth = $this->db->prepare($query);
47
-                        $sth->execute($query_values);
48
-                } catch(PDOException $e) {
49
-                        return "error : ".$e->getMessage();
50
-                }
51
-                $all = $sth->fetchAll(PDO::FETCH_ASSOC);
52
-                return $all;
53
-        }
41
+	   public function getAll() {
42
+			$filter_query = $this->getFilter(array());
43
+				$query = "SELECT * FROM atc".$filter_query;
44
+				$query_values = array();
45
+				 try {
46
+						$sth = $this->db->prepare($query);
47
+						$sth->execute($query_values);
48
+				} catch(PDOException $e) {
49
+						return "error : ".$e->getMessage();
50
+				}
51
+				$all = $sth->fetchAll(PDO::FETCH_ASSOC);
52
+				return $all;
53
+		}
54 54
 
55
-       public function add($ident,$frequency,$latitude,$longitude,$range,$info,$date,$type = '',$ivao_id = '',$ivao_name = '',$format_source = '',$source_name = '') {
56
-    		$info = preg_replace('/[^(\x20-\x7F)]*/','',$info);
57
-    		$info = str_replace('^','<br />',$info);
58
-    		$info = str_replace('&amp;sect;','',$info);
59
-    		$info = str_replace('"','',$info);
60
-    		if ($type == '') $type = NULL;
61
-                $query = "INSERT INTO atc (ident,frequency,latitude,longitude,atc_range,info,atc_lastseen,type,ivao_id,ivao_name,format_source,source_name) VALUES (:ident,:frequency,:latitude,:longitude,:range,:info,:date,:type,:ivao_id,:ivao_name,:format_source,:source_name)";
62
-                $query_values = array(':ident' => $ident,':frequency' => $frequency,':latitude' => $latitude,':longitude' => $longitude,':range' => $range,':info' => $info,':date' => $date,':ivao_id' => $ivao_id,':ivao_name' => $ivao_name, ':type' => $type,':format_source' => $format_source,':source_name' => $source_name);
63
-                 try {
64
-                        $sth = $this->db->prepare($query);
65
-                        $sth->execute($query_values);
66
-                } catch(PDOException $e) {
67
-                        return "error : ".$e->getMessage();
68
-                }
69
-        }
55
+	   public function add($ident,$frequency,$latitude,$longitude,$range,$info,$date,$type = '',$ivao_id = '',$ivao_name = '',$format_source = '',$source_name = '') {
56
+			$info = preg_replace('/[^(\x20-\x7F)]*/','',$info);
57
+			$info = str_replace('^','<br />',$info);
58
+			$info = str_replace('&amp;sect;','',$info);
59
+			$info = str_replace('"','',$info);
60
+			if ($type == '') $type = NULL;
61
+				$query = "INSERT INTO atc (ident,frequency,latitude,longitude,atc_range,info,atc_lastseen,type,ivao_id,ivao_name,format_source,source_name) VALUES (:ident,:frequency,:latitude,:longitude,:range,:info,:date,:type,:ivao_id,:ivao_name,:format_source,:source_name)";
62
+				$query_values = array(':ident' => $ident,':frequency' => $frequency,':latitude' => $latitude,':longitude' => $longitude,':range' => $range,':info' => $info,':date' => $date,':ivao_id' => $ivao_id,':ivao_name' => $ivao_name, ':type' => $type,':format_source' => $format_source,':source_name' => $source_name);
63
+				 try {
64
+						$sth = $this->db->prepare($query);
65
+						$sth->execute($query_values);
66
+				} catch(PDOException $e) {
67
+						return "error : ".$e->getMessage();
68
+				}
69
+		}
70 70
 
71
-       public function deleteById($id) {
72
-                $query = "DELETE FROM atc WHERE atc_id = :id";
73
-                $query_values = array(':id' => $id);
74
-                 try {
75
-                        $sth = $this->db->prepare($query);
76
-                        $sth->execute($query_values);
77
-                } catch(PDOException $e) {
78
-                        return "error : ".$e->getMessage();
79
-                }
80
-        }
71
+	   public function deleteById($id) {
72
+				$query = "DELETE FROM atc WHERE atc_id = :id";
73
+				$query_values = array(':id' => $id);
74
+				 try {
75
+						$sth = $this->db->prepare($query);
76
+						$sth->execute($query_values);
77
+				} catch(PDOException $e) {
78
+						return "error : ".$e->getMessage();
79
+				}
80
+		}
81 81
 
82
-       public function deleteAll() {
83
-                $query = "DELETE FROM atc";
84
-                $query_values = array();
85
-                 try {
86
-                        $sth = $this->db->prepare($query);
87
-                        $sth->execute($query_values);
88
-                } catch(PDOException $e) {
89
-                        return "error : ".$e->getMessage();
90
-                }
91
-        }
82
+	   public function deleteAll() {
83
+				$query = "DELETE FROM atc";
84
+				$query_values = array();
85
+				 try {
86
+						$sth = $this->db->prepare($query);
87
+						$sth->execute($query_values);
88
+				} catch(PDOException $e) {
89
+						return "error : ".$e->getMessage();
90
+				}
91
+		}
92 92
 
93 93
 	public function deleteOldATC() {
94
-                global $globalDBdriver;
95
-                if ($globalDBdriver == 'mysql') {
96
-                        $query  = "DELETE FROM atc WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 HOUR) >= atc.atc_lastseen";
97
-                } else {
98
-                        $query  = "DELETE FROM atc WHERE NOW() AT TIME ZONE 'UTC' - '1 HOUR'->INTERVAL >= atc.atc_lastseen";
99
-                }
100
-                try {
101
-                        $sth = $this->db->prepare($query);
102
-                        $sth->execute();
103
-                } catch(PDOException $e) {
104
-                        return "error";
105
-                }
106
-                return "success";
107
-        }
94
+				global $globalDBdriver;
95
+				if ($globalDBdriver == 'mysql') {
96
+						$query  = "DELETE FROM atc WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 1 HOUR) >= atc.atc_lastseen";
97
+				} else {
98
+						$query  = "DELETE FROM atc WHERE NOW() AT TIME ZONE 'UTC' - '1 HOUR'->INTERVAL >= atc.atc_lastseen";
99
+				}
100
+				try {
101
+						$sth = $this->db->prepare($query);
102
+						$sth->execute();
103
+				} catch(PDOException $e) {
104
+						return "error";
105
+				}
106
+				return "success";
107
+		}
108 108
 }
109 109
 ?>
110 110
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -15,22 +15,22 @@  discard block
 block discarded – undo
15 15
     * @param Array $filter the filter
16 16
     * @return Array the SQL part
17 17
     */
18
-    public function getFilter($filter = array(),$where = false,$and = false) {
18
+    public function getFilter($filter = array(), $where = false, $and = false) {
19 19
 	global $globalFilter, $globalStatsFilters, $globalFilterName;
20 20
 	if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) {
21 21
 	    if (isset($globalStatsFilters[$globalFilterName][0]['source'])) {
22
-		foreach($globalStatsFilters[$globalFilterName] as $source) {
22
+		foreach ($globalStatsFilters[$globalFilterName] as $source) {
23 23
 			if (isset($source['source'])) $filter['source'][] = $source['source'];
24 24
 		}
25 25
 	    } else {
26 26
 		$filter = $globalStatsFilters[$globalFilterName];
27 27
 	    }
28 28
 	}
29
-	if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter);
29
+	if (is_array($globalFilter)) $filter = array_merge($filter, $globalFilter);
30 30
 	$filter_query_join = '';
31 31
 	$filter_query_where = '';
32 32
 	if (isset($filter['source']) && !empty($filter['source'])) {
33
-	    $filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')";
33
+	    $filter_query_where = " WHERE format_source IN ('".implode("','", $filter['source'])."')";
34 34
 	}
35 35
 	if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE';
36 36
 	elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND';
@@ -45,25 +45,25 @@  discard block
 block discarded – undo
45 45
                  try {
46 46
                         $sth = $this->db->prepare($query);
47 47
                         $sth->execute($query_values);
48
-                } catch(PDOException $e) {
48
+                } catch (PDOException $e) {
49 49
                         return "error : ".$e->getMessage();
50 50
                 }
51 51
                 $all = $sth->fetchAll(PDO::FETCH_ASSOC);
52 52
                 return $all;
53 53
         }
54 54
 
55
-       public function add($ident,$frequency,$latitude,$longitude,$range,$info,$date,$type = '',$ivao_id = '',$ivao_name = '',$format_source = '',$source_name = '') {
56
-    		$info = preg_replace('/[^(\x20-\x7F)]*/','',$info);
57
-    		$info = str_replace('^','<br />',$info);
58
-    		$info = str_replace('&amp;sect;','',$info);
59
-    		$info = str_replace('"','',$info);
55
+       public function add($ident, $frequency, $latitude, $longitude, $range, $info, $date, $type = '', $ivao_id = '', $ivao_name = '', $format_source = '', $source_name = '') {
56
+    		$info = preg_replace('/[^(\x20-\x7F)]*/', '', $info);
57
+    		$info = str_replace('^', '<br />', $info);
58
+    		$info = str_replace('&amp;sect;', '', $info);
59
+    		$info = str_replace('"', '', $info);
60 60
     		if ($type == '') $type = NULL;
61 61
                 $query = "INSERT INTO atc (ident,frequency,latitude,longitude,atc_range,info,atc_lastseen,type,ivao_id,ivao_name,format_source,source_name) VALUES (:ident,:frequency,:latitude,:longitude,:range,:info,:date,:type,:ivao_id,:ivao_name,:format_source,:source_name)";
62
-                $query_values = array(':ident' => $ident,':frequency' => $frequency,':latitude' => $latitude,':longitude' => $longitude,':range' => $range,':info' => $info,':date' => $date,':ivao_id' => $ivao_id,':ivao_name' => $ivao_name, ':type' => $type,':format_source' => $format_source,':source_name' => $source_name);
62
+                $query_values = array(':ident' => $ident, ':frequency' => $frequency, ':latitude' => $latitude, ':longitude' => $longitude, ':range' => $range, ':info' => $info, ':date' => $date, ':ivao_id' => $ivao_id, ':ivao_name' => $ivao_name, ':type' => $type, ':format_source' => $format_source, ':source_name' => $source_name);
63 63
                  try {
64 64
                         $sth = $this->db->prepare($query);
65 65
                         $sth->execute($query_values);
66
-                } catch(PDOException $e) {
66
+                } catch (PDOException $e) {
67 67
                         return "error : ".$e->getMessage();
68 68
                 }
69 69
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                  try {
75 75
                         $sth = $this->db->prepare($query);
76 76
                         $sth->execute($query_values);
77
-                } catch(PDOException $e) {
77
+                } catch (PDOException $e) {
78 78
                         return "error : ".$e->getMessage();
79 79
                 }
80 80
         }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                  try {
86 86
                         $sth = $this->db->prepare($query);
87 87
                         $sth->execute($query_values);
88
-                } catch(PDOException $e) {
88
+                } catch (PDOException $e) {
89 89
                         return "error : ".$e->getMessage();
90 90
                 }
91 91
         }
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                 try {
101 101
                         $sth = $this->db->prepare($query);
102 102
                         $sth->execute();
103
-                } catch(PDOException $e) {
103
+                } catch (PDOException $e) {
104 104
                         return "error";
105 105
                 }
106 106
                 return "success";
Please login to merge, or discard this patch.
space-data.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <button type="button" class="close">&times;</button>
8 8
 <?php
9 9
 
10
-$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING);
10
+$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING);
11 11
 $sat = urldecode($sat);
12 12
 
13 13
 if ($sat == 'ISS (ZARYA)') {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	$aircraft_name = 'INTEGRAL';
43 43
 //	$ground_speed = 14970;
44 44
 	$launch_date = '17 October 2002';
45
-} elseif (strpos($sat,'IRIDIUM') !== false) {
45
+} elseif (strpos($sat, 'IRIDIUM') !== false) {
46 46
 	$image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg';
47 47
 	$image_copyright = 'Cliff';
48 48
 	$ident = 'Iridium satellite constellation';
@@ -50,22 +50,22 @@  discard block
 block discarded – undo
50 50
 	$aircraft_name = $sat;
51 51
 //	$ground_speed = 14970;
52 52
 //	$launch_date = '29 september 2011';
53
-} elseif (strpos($sat,'ORBCOMM') !== false) {
53
+} elseif (strpos($sat, 'ORBCOMM') !== false) {
54 54
 	$ident = 'Orbcomm';
55 55
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)';
56 56
 	$aircraft_name = $sat;
57
-} elseif (strpos($sat,'GLOBALSTAR') !== false) {
57
+} elseif (strpos($sat, 'GLOBALSTAR') !== false) {
58 58
 	$ident = 'Globalstar';
59 59
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar';
60 60
 	$aircraft_name = $sat;
61
-} elseif (strpos($sat,'OSCAR 7') !== false) {
61
+} elseif (strpos($sat, 'OSCAR 7') !== false) {
62 62
 	$image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg';
63 63
 	$image_copyright = 'Amsat.org';
64 64
 	$ident = 'AMSAT-OSCAR 7';
65 65
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7';
66 66
 	$aircraft_name = $sat;
67 67
 	$launch_date = '15 November 1974';
68
-} elseif (strpos($sat,'santaclaus') !== false) {
68
+} elseif (strpos($sat, 'santaclaus') !== false) {
69 69
 	$image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg';
70 70
 	$image_copyright = 'Jonathan G Meath';
71 71
 	$ident = 'Santa Claus';
Please login to merge, or discard this patch.
live-santa-czml.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
30 30
 $output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"';
31
-if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"';
31
+if (!isset($_GET['now'])) {
32
+	$output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"';
33
+}
32 34
 $output .= '}';
33 35
 //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}';
34 36
 //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
@@ -37,7 +39,9 @@  discard block
 block discarded – undo
37 39
 $output .= '},';
38 40
 $output .= '{';
39 41
 $output .= '"id": "santaclaus",';
40
-if (!isset($_GET['now'])) $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",';
42
+if (!isset($_GET['now'])) {
43
+	$output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",';
44
+}
41 45
 $output .= '"properties": {';
42 46
 // Not yet supported in CZML with Cesium
43 47
 $output .= '},';
Please login to merge, or discard this patch.
Spacing   +290 added lines, -290 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}';
28 28
 
29 29
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
30
-$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"';
30
+$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"';
31 31
 if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"';
32 32
 $output .= '}';
33 33
 //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 if (!isset($_GET['now'])) {
60 60
 	$output .= '"epoch" : "'.date("Y").'-12-24T02:00:00Z",';
61 61
 } else {
62
-	$output .= '"epoch" : "'.date("c",time() - $globalLiveInterval).'",';
62
+	$output .= '"epoch" : "'.date("c", time() - $globalLiveInterval).'",';
63 63
 }
64 64
 //$output .= '"type": "Point",';
65 65
 //$output .= '"interpolationAlgorithm" : "LAGRANGE",';
@@ -69,581 +69,581 @@  discard block
 block discarded – undo
69 69
 $output .= '"cartographicDegrees": [';
70 70
 $i = 0;
71 71
 $output .= $i.',-114.4,82.7,150000,';
72
-$i = $i+300;
72
+$i = $i + 300;
73 73
 $output .= $i.',-173.300003,64.379997,150000,';
74
-$i = $i+300;
74
+$i = $i + 300;
75 75
 $output .= $i.',177.479995,64.75,150000,';
76
-$i = $i+300;
76
+$i = $i + 300;
77 77
 $output .= $i.',158.65,53.016667,150000,';
78
-$i = $i+300;
78
+$i = $i + 300;
79 79
 $output .= $i.',165.545318,11.626074,150000,';
80
-$i = $i+300;
80
+$i = $i + 300;
81 81
 $output .= $i.',171.1300517813333,7.07999665990053,150000,';
82
-$i = $i+300;
82
+$i = $i + 300;
83 83
 $output .= $i.',179.380004,-16.469999,150000,';
84
-$i = $i+300;
84
+$i = $i + 300;
85 85
 $output .= $i.',178.429992,-18.129999,150000,';
86
-$i = $i+300;
86
+$i = $i + 300;
87 87
 $output .= $i.',174.759994,-36.849998,150000,';
88
-$i = $i+300;
88
+$i = $i + 300;
89 89
 $output .= $i.',176.839996,-39.639999,150000,';
90
-$i = $i+300;
90
+$i = $i + 300;
91 91
 $output .= $i.',174.779998,-41.279998,150000,';
92
-$i = $i+300;
92
+$i = $i + 300;
93 93
 $output .= $i.',172.639999,-43.529998,150000,';
94
-$i = $i+300;
94
+$i = $i + 300;
95 95
 $output .= $i.',167.838199,-46.986747,150000,';
96
-$i = $i+300;
96
+$i = $i + 300;
97 97
 $output .= $i.',168.320999,-17.740391,150000,';
98
-$i = $i+300;
98
+$i = $i + 300;
99 99
 $output .= $i.',167.149993,-15.51,150000,';
100
-$i = $i+300;
100
+$i = $i + 300;
101 101
 $output .= $i.',159.910003,-9.43,150000,';
102
-$i = $i+300;
102
+$i = $i + 300;
103 103
 $output .= $i.',156.850006,-8.1,150000,';
104
-$i = $i+300;
104
+$i = $i + 300;
105 105
 $output .= $i.',158.160003,6.92,150000,';
106
-$i = $i+300;
106
+$i = $i + 300;
107 107
 $output .= $i.',150.017702,45.873311,150000,';
108
-$i = $i+300;
108
+$i = $i + 300;
109 109
 $output .= $i.',154.796487,49.429802,150000,';
110
-$i = $i+300;
110
+$i = $i + 300;
111 111
 $output .= $i.',142.7262,46.948978,150000,';
112
-$i = $i+300;
112
+$i = $i + 300;
113 113
 $output .= $i.',150.800003,59.569999,150000,';
114
-$i = $i+300;
114
+$i = $i + 300;
115 115
 $output .= $i.',135.119995,48.419998,150000,';
116
-$i = $i+300;
116
+$i = $i + 300;
117 117
 $output .= $i.',131.899993,43.130001,150000,';
118
-$i = $i+300;
118
+$i = $i + 300;
119 119
 $output .= $i.',142.212096,27.070652,150000,';
120
-$i = $i+300;
120
+$i = $i + 300;
121 121
 $output .= $i.',141.312779,24.78389,150000,';
122
-$i = $i+300;
122
+$i = $i + 300;
123 123
 $output .= $i.',144.79373,13.444305,150000,';
124
-$i = $i+300;
124
+$i = $i + 300;
125 125
 $output .= $i.',151.783334,8.45,150000,';
126
-$i = $i+300;
126
+$i = $i + 300;
127 127
 $output .= $i.',151.749999,7.416667,150000,';
128
-$i = $i+300;
128
+$i = $i + 300;
129 129
 $output .= $i.',152.160003,-4.199999,150000,';
130
-$i = $i+300;
130
+$i = $i + 300;
131 131
 $output .= $i.',146.990005,-6.719999,150000,';
132
-$i = $i+300;
132
+$i = $i + 300;
133 133
 $output .= $i.',143.211639,-9.085352,150000,';
134
-$i = $i+300;
134
+$i = $i + 300;
135 135
 $output .= $i.',146.779998,-19.26,150000,';
136
-$i = $i+300;
136
+$i = $i + 300;
137 137
 $output .= $i.',149.179992,-21.139999,150000,';
138
-$i = $i+300;
138
+$i = $i + 300;
139 139
 $output .= $i.',153.020004,-27.459999,150000,';
140
-$i = $i+300;
140
+$i = $i + 300;
141 141
 $output .= $i.',151.210006,-33.869998,150000,';
142
-$i = $i+300;
142
+$i = $i + 300;
143 143
 $output .= $i.',147.291199,-42.85088,150000,';
144
-$i = $i+300;
144
+$i = $i + 300;
145 145
 $output .= $i.',138.600006,-34.93,150000,';
146
-$i = $i+300;
146
+$i = $i + 300;
147 147
 $output .= $i.',133.869995,-23.7,150000,';
148
-$i = $i+300;
148
+$i = $i + 300;
149 149
 $output .= $i.',130.850006,-12.43,150000,';
150
-$i = $i+300;
150
+$i = $i + 300;
151 151
 $output .= $i.',143.62,-3.56,150000,';
152
-$i = $i+300;
152
+$i = $i + 300;
153 153
 $output .= $i.',134.5552,7.3608,150000,';
154
-$i = $i+300;
154
+$i = $i + 300;
155 155
 $output .= $i.',135.169998,34.68,150000,';
156
-$i = $i+300;
156
+$i = $i + 300;
157 157
 $output .= $i.',138.690002,35.169998,150000,';
158
-$i = $i+300;
158
+$i = $i + 300;
159 159
 $output .= $i.',139.770004,35.669998,150000,';
160
-$i = $i+300;
160
+$i = $i + 300;
161 161
 $output .= $i.',140.740005,40.830001,150000,';
162
-$i = $i+300;
162
+$i = $i + 300;
163 163
 $output .= $i.',128.600006,35.869998,150000,';
164
-$i = $i+300;
164
+$i = $i + 300;
165 165
 $output .= $i.',125.925925,38.950981,150000,';
166
-$i = $i+300;
166
+$i = $i + 300;
167 167
 $output .= $i.',129.771118,62.093056,150000,';
168
-$i = $i+300;
168
+$i = $i + 300;
169 169
 $output .= $i.',104.239997,52.330001,150000,';
170
-$i = $i+300;
170
+$i = $i + 300;
171 171
 $output .= $i.',114.5056,48.060478,150000,';
172
-$i = $i+300;
172
+$i = $i + 300;
173 173
 $output .= $i.',106.580001,29.569999,150000,';
174
-$i = $i+300;
174
+$i = $i + 300;
175 175
 $output .= $i.',121.470001,31.229999,150000,';
176
-$i = $i+300;
176
+$i = $i + 300;
177 177
 $output .= $i.',113.25,23.12,150000,';
178
-$i = $i+300;
178
+$i = $i + 300;
179 179
 $output .= $i.',114.177465,22.307184,150000,';
180
-$i = $i+300;
180
+$i = $i + 300;
181 181
 $output .= $i.',121.639999,18.36,150000,';
182
-$i = $i+300;
182
+$i = $i + 300;
183 183
 $output .= $i.',122.080001,6.92,150000,';
184
-$i = $i+300;
184
+$i = $i + 300;
185 185
 $output .= $i.',114.639999,4.809999,150000,';
186
-$i = $i+300;
186
+$i = $i + 300;
187 187
 $output .= $i.',119.412399,-5.152193,150000,';
188
-$i = $i+300;
188
+$i = $i + 300;
189 189
 $output .= $i.',122.230003,-17.959999,150000,';
190
-$i = $i+300;
190
+$i = $i + 300;
191 191
 $output .= $i.',115.839996,-31.959999,150000,';
192
-$i = $i+300;
192
+$i = $i + 300;
193 193
 $output .= $i.',105.680687,-10.428593,150000,';
194
-$i = $i+300;
194
+$i = $i + 300;
195 195
 $output .= $i.',104.75,-2.99,150000,';
196
-$i = $i+300;
196
+$i = $i + 300;
197 197
 $output .= $i.',113.029998,3.17,150000,';
198
-$i = $i+300;
198
+$i = $i + 300;
199 199
 $output .= $i.',100.720001,4.86,150000,';
200
-$i = $i+300;
200
+$i = $i + 300;
201 201
 $output .= $i.',104.18,10.609999,150000,';
202
-$i = $i+300;
202
+$i = $i + 300;
203 203
 $output .= $i.',103.864403,13.36866,150000,';
204
-$i = $i+300;
204
+$i = $i + 300;
205 205
 $output .= $i.',99.330001,9.14,150000,';
206
-$i = $i+300;
206
+$i = $i + 300;
207 207
 $output .= $i.',105.073303,18.30217,150000,';
208
-$i = $i+300;
208
+$i = $i + 300;
209 209
 $output .= $i.',91.132088,29.6507,150000,';
210
-$i = $i+300;
210
+$i = $i + 300;
211 211
 $output .= $i.',116.477651,40.332809,150000,';
212
-$i = $i+300;
212
+$i = $i + 300;
213 213
 $output .= $i.',93.059997,56.02,150000,';
214
-$i = $i+300;
214
+$i = $i + 300;
215 215
 $output .= $i.',86.18,69.410003,150000,';
216
-$i = $i+300;
216
+$i = $i + 300;
217 217
 $output .= $i.',88.202881,69.315422,150000,';
218
-$i = $i+300;
218
+$i = $i + 300;
219 219
 $output .= $i.',73.400001,55,150000,';
220
-$i = $i+300;
220
+$i = $i + 300;
221 221
 $output .= $i.',76.949996,52.299999,150000,';
222
-$i = $i+300;
222
+$i = $i + 300;
223 223
 $output .= $i.',78.379997,42.490001,150000,';
224
-$i = $i+300;
224
+$i = $i + 300;
225 225
 $output .= $i.',69.779998,37.919998,150000,';
226
-$i = $i+300;
226
+$i = $i + 300;
227 227
 $output .= $i.',86.933333,27.983333,150000,';
228
-$i = $i+300;
228
+$i = $i + 300;
229 229
 $output .= $i.',84.870002,27.02,150000,';
230
-$i = $i+300;
230
+$i = $i + 300;
231 231
 $output .= $i.',88.36,22.569999,150000,';
232
-$i = $i+300;
232
+$i = $i + 300;
233 233
 $output .= $i.',90.389999,23.7,150000,';
234
-$i = $i+300;
234
+$i = $i + 300;
235 235
 $output .= $i.',97.04,20.78,150000,';
236
-$i = $i+300;
236
+$i = $i + 300;
237 237
 $output .= $i.',92.762917,11.66857,150000,';
238
-$i = $i+300;
238
+$i = $i + 300;
239 239
 $output .= $i.',50.23720550537109,-46.10261535644531,150000,';
240
-$i = $i+300;
240
+$i = $i + 300;
241 241
 $output .= $i.',72.422489,-7.336367,150000,';
242
-$i = $i+300;
242
+$i = $i + 300;
243 243
 $output .= $i.',73.510915,4.174199,150000,';
244
-$i = $i+300;
244
+$i = $i + 300;
245 245
 $output .= $i.',81.050003,6.989999,150000,';
246
-$i = $i+300;
246
+$i = $i + 300;
247 247
 $output .= $i.',72.819999,18.959999,150000,';
248
-$i = $i+300;
248
+$i = $i + 300;
249 249
 $output .= $i.',78.042222,27.174167,150000,';
250
-$i = $i+300;
250
+$i = $i + 300;
251 251
 $output .= $i.',71.449996,30.2,150000,';
252
-$i = $i+300;
252
+$i = $i + 300;
253 253
 $output .= $i.',67.109993,36.703819,150000,';
254
-$i = $i+300;
254
+$i = $i + 300;
255 255
 $output .= $i.',54.36,39.509998,150000,';
256
-$i = $i+300;
256
+$i = $i + 300;
257 257
 $output .= $i.',63.726529,40.214486,150000,';
258
-$i = $i+300;
258
+$i = $i + 300;
259 259
 $output .= $i.',58.853439,48.251126,150000,';
260
-$i = $i+300;
260
+$i = $i + 300;
261 261
 $output .= $i.',56.23246,58.00024,150000,';
262
-$i = $i+300;
262
+$i = $i + 300;
263 263
 $output .= $i.',49.659999,58.599998,150000,';
264
-$i = $i+300;
264
+$i = $i + 300;
265 265
 $output .= $i.',50.150001,53.2,150000,';
266
-$i = $i+300;
266
+$i = $i + 300;
267 267
 $output .= $i.',44.11,41.979999,150000,';
268
-$i = $i+300;
268
+$i = $i + 300;
269 269
 $output .= $i.',49.893226,40.38344,150000,';
270
-$i = $i+300;
270
+$i = $i + 300;
271 271
 $output .= $i.',44.75,40.5,150000,';
272
-$i = $i+300;
272
+$i = $i + 300;
273 273
 $output .= $i.',50.95,34.650001,150000,';
274
-$i = $i+300;
274
+$i = $i + 300;
275 275
 $output .= $i.',56.27433,27.18717,150000,';
276
-$i = $i+300;
276
+$i = $i + 300;
277 277
 $output .= $i.',54.989491,25.005817,150000,';
278
-$i = $i+300;
278
+$i = $i + 300;
279 279
 $output .= $i.',59.549999,22.569999,150000,';
280
-$i = $i+300;
280
+$i = $i + 300;
281 281
 $output .= $i.',47.58318996007591,-9.722414273737707,150000,';
282
-$i = $i+300;
282
+$i = $i + 300;
283 283
 $output .= $i.',57.471008,-20.26026,150000,';
284
-$i = $i+300;
284
+$i = $i + 300;
285 285
 $output .= $i.',37.946460723877,-46.6428451538086,150000,';
286
-$i = $i+300;
286
+$i = $i + 300;
287 287
 $output .= $i.',53,-67.5,150000,';
288
-$i = $i+300;
288
+$i = $i + 300;
289 289
 $output .= $i.',46.99004,-25.03233,150000,';
290
-$i = $i+300;
290
+$i = $i + 300;
291 291
 $output .= $i.',46.310001,-15.72,150000,';
292
-$i = $i+300;
292
+$i = $i + 300;
293 293
 $output .= $i.',44.41203117370608,-12.22338294982911,150000,';
294
-$i = $i+300;
294
+$i = $i + 300;
295 295
 $output .= $i.',39.3822,-6.097406,150000,';
296
-$i = $i+300;
296
+$i = $i + 300;
297 297
 $output .= $i.',39.659999,-4.039999,150000,';
298
-$i = $i+300;
298
+$i = $i + 300;
299 299
 $output .= $i.',40.033333,7.916667,150000,';
300
-$i = $i+300;
300
+$i = $i + 300;
301 301
 $output .= $i.',42.549999,16.899999,150000,';
302
-$i = $i+300;
302
+$i = $i + 300;
303 303
 $output .= $i.',43.970001,26.37,150000,';
304
-$i = $i+300;
304
+$i = $i + 300;
305 305
 $output .= $i.',41.12,30.455,150000,';
306
-$i = $i+300;
306
+$i = $i + 300;
307 307
 $output .= $i.',38.278671,34.547951,150000,';
308
-$i = $i+300;
308
+$i = $i + 300;
309 309
 $output .= $i.',37.619998,55.75,150000,';
310
-$i = $i+300;
310
+$i = $i + 300;
311 311
 $output .= $i.',30.453329,59.951889,150000,';
312
-$i = $i+300;
312
+$i = $i + 300;
313 313
 $output .= $i.',23.12,63.84,150000,';
314
-$i = $i+300;
314
+$i = $i + 300;
315 315
 $output .= $i.',26.709999,58.380001,150000,';
316
-$i = $i+300;
316
+$i = $i + 300;
317 317
 $output .= $i.',25.42,57.549999,150000,';
318
-$i = $i+300;
318
+$i = $i + 300;
319 319
 $output .= $i.',23.319999,55.93,150000,';
320
-$i = $i+300;
320
+$i = $i + 300;
321 321
 $output .= $i.',26.1,52.119998,150000,';
322
-$i = $i+300;
322
+$i = $i + 300;
323 323
 $output .= $i.',32.259998,48.5,150000,';
324
-$i = $i+300;
324
+$i = $i + 300;
325 325
 $output .= $i.',28.829999,47.029998,150000,';
326
-$i = $i+300;
326
+$i = $i + 300;
327 327
 $output .= $i.',25.61,45.659999,150000,';
328
-$i = $i+300;
328
+$i = $i + 300;
329 329
 $output .= $i.',27.469999,42.509998,150000,';
330
-$i = $i+300;
330
+$i = $i + 300;
331 331
 $output .= $i.',23.729999,37.979999,150000,';
332
-$i = $i+300;
332
+$i = $i + 300;
333 333
 $output .= $i.',27.149999,38.43,150000,';
334
-$i = $i+300;
334
+$i = $i + 300;
335 335
 $output .= $i.',31.132659,29.977088,150000,';
336
-$i = $i+300;
336
+$i = $i + 300;
337 337
 $output .= $i.',32.659999,13.17,150000,';
338
-$i = $i+300;
338
+$i = $i + 300;
339 339
 $output .= $i.',33.599998,1.71,150000,';
340
-$i = $i+300;
340
+$i = $i + 300;
341 341
 $output .= $i.',25.92,-2.95,150000,';
342
-$i = $i+300;
342
+$i = $i + 300;
343 343
 $output .= $i.',28.45,-14.439999,150000,';
344
-$i = $i+300;
344
+$i = $i + 300;
345 345
 $output .= $i.',30.819999,-20.059999,150000,';
346
-$i = $i+300;
346
+$i = $i + 300;
347 347
 $output .= $i.',21.639999,-21.7,150000,';
348
-$i = $i+300;
348
+$i = $i + 300;
349 349
 $output .= $i.',25.59,-33.959999,150000,';
350
-$i = $i+300;
350
+$i = $i + 300;
351 351
 $output .= $i.',18.129999,-26.579999,150000,';
352
-$i = $i+300;
352
+$i = $i + 300;
353 353
 $output .= $i.',13.767777,-10.722417,150000,';
354
-$i = $i+300;
354
+$i = $i + 300;
355 355
 $output .= $i.',10.13,-0.15,150000,';
356
-$i = $i+300;
356
+$i = $i + 300;
357 357
 $output .= $i.',20.67,5.76,150000,';
358
-$i = $i+300;
358
+$i = $i + 300;
359 359
 $output .= $i.',9.71,4.059999,150000,';
360
-$i = $i+300;
360
+$i = $i + 300;
361 361
 $output .= $i.',7.44,10.52,150000,';
362
-$i = $i+300;
362
+$i = $i + 300;
363 363
 $output .= $i.',18.69,12.189999,150000,';
364
-$i = $i+300;
364
+$i = $i + 300;
365 365
 $output .= $i.',7.98,17,150000,';
366
-$i = $i+300;
366
+$i = $i + 300;
367 367
 $output .= $i.',14.42,27.069999,150000,';
368
-$i = $i+300;
368
+$i = $i + 300;
369 369
 $output .= $i.',3.678539,32.489059,150000,';
370
-$i = $i+300;
370
+$i = $i + 300;
371 371
 $output .= $i.',-7.619999,33.599998,150000,';
372
-$i = $i+300;
372
+$i = $i + 300;
373 373
 $output .= $i.',13.611066,38.129963,150000,';
374
-$i = $i+300;
374
+$i = $i + 300;
375 375
 $output .= $i.',12.482323,41.895466,150000,';
376
-$i = $i+300;
376
+$i = $i + 300;
377 377
 $output .= $i.',17.189752,44.763891,150000,';
378
-$i = $i+300;
378
+$i = $i + 300;
379 379
 $output .= $i.',16.45,43.509998,150000,';
380
-$i = $i+300;
380
+$i = $i + 300;
381 381
 $output .= $i.',14.51,46.060001,150000,';
382
-$i = $i+300;
382
+$i = $i + 300;
383 383
 $output .= $i.',21.629999,47.54,150000,';
384
-$i = $i+300;
384
+$i = $i + 300;
385 385
 $output .= $i.',16.37,48.220001,150000,';
386
-$i = $i+300;
386
+$i = $i + 300;
387 387
 $output .= $i.',10.736111,47.554444,150000,';
388
-$i = $i+300;
388
+$i = $i + 300;
389 389
 $output .= $i.',14.43,50.080001,150000,';
390
-$i = $i+300;
390
+$i = $i + 300;
391 391
 $output .= $i.',17.129999,48.159999,150000,';
392
-$i = $i+300;
392
+$i = $i + 300;
393 393
 $output .= $i.',22.569999,51.240001,150000,';
394
-$i = $i+300;
394
+$i = $i + 300;
395 395
 $output .= $i.',13.411895,52.523781,150000,';
396
-$i = $i+300;
396
+$i = $i + 300;
397 397
 $output .= $i.',10.039999,56.470001,150000,';
398
-$i = $i+300;
398
+$i = $i + 300;
399 399
 $output .= $i.',13.02,55.61,150000,';
400
-$i = $i+300;
400
+$i = $i + 300;
401 401
 $output .= $i.',17.329999,62.400001,150000,';
402
-$i = $i+300;
402
+$i = $i + 300;
403 403
 $output .= $i.',14.229999,78.059997,150000,';
404
-$i = $i+300;
404
+$i = $i + 300;
405 405
 $output .= $i.',10.399999,63.439998,150000,';
406
-$i = $i+300;
406
+$i = $i + 300;
407 407
 $output .= $i.',2.350966,48.856558,150000,';
408
-$i = $i+300;
408
+$i = $i + 300;
409 409
 $output .= $i.',7.42,43.75,150000,';
410
-$i = $i+300;
410
+$i = $i + 300;
411 411
 $output .= $i.',1.57,42.54,150000,';
412
-$i = $i+300;
412
+$i = $i + 300;
413 413
 $output .= $i.',-0.991293,37.605651,150000,';
414
-$i = $i+300;
414
+$i = $i + 300;
415 415
 $output .= $i.',-7.429999,39.29,150000,';
416
-$i = $i+300;
416
+$i = $i + 300;
417 417
 $output .= $i.',-11.4053,16.5889,150000,';
418
-$i = $i+300;
418
+$i = $i + 300;
419 419
 $output .= $i.',-3.009999,16.78,150000,';
420
-$i = $i+300;
420
+$i = $i + 300;
421 421
 $output .= $i.',-5.36008,5.83885,150000,';
422
-$i = $i+300;
422
+$i = $i + 300;
423 423
 $output .= $i.',-12.3,11.319999,150000,';
424
-$i = $i+300;
424
+$i = $i + 300;
425 425
 $output .= $i.',-16.239999,12.829999,150000,';
426
-$i = $i+300;
426
+$i = $i + 300;
427 427
 $output .= $i.',-16.2507,28.457661,150000,';
428
-$i = $i+300;
428
+$i = $i + 300;
429 429
 $output .= $i.',-0.126197,51.500197,150000,';
430
-$i = $i+300;
430
+$i = $i + 300;
431 431
 $output .= $i.',-2.968111,56.461428,150000,';
432
-$i = $i+300;
432
+$i = $i + 300;
433 433
 $output .= $i.',-7.308429,54.998539,150000,';
434
-$i = $i+300;
434
+$i = $i + 300;
435 435
 $output .= $i.',-8.92,52.7,150000,';
436
-$i = $i+300;
436
+$i = $i + 300;
437 437
 $output .= $i.',-19.000959,63.427502,150000,';
438
-$i = $i+300;
438
+$i = $i + 300;
439 439
 $output .= $i.',-28.364049911499,38.47212219238281,150000,';
440
-$i = $i+300;
440
+$i = $i + 300;
441 441
 $output .= $i.',-23.76,15.279999,150000,';
442
-$i = $i+300;
442
+$i = $i + 300;
443 443
 $output .= $i.',-36.511219,-54.274151,150000,';
444
-$i = $i+300;
444
+$i = $i + 300;
445 445
 $output .= $i.',-58.979999,-51.830001,150000,';
446
-$i = $i+300;
446
+$i = $i + 300;
447 447
 $output .= $i.',-64.190002,-31.399999,150000,';
448
-$i = $i+300;
448
+$i = $i + 300;
449 449
 $output .= $i.',-54.18,-32.36,150000,';
450
-$i = $i+300;
450
+$i = $i + 300;
451 451
 $output .= $i.',-43.2,-22.909999,150000,';
452
-$i = $i+300;
452
+$i = $i + 300;
453 453
 $output .= $i.',-37.333333,65.666667,150000,';
454
-$i = $i+300;
454
+$i = $i + 300;
455 455
 $output .= $i.',-69.345131,77.48262,150000,';
456
-$i = $i+300;
456
+$i = $i + 300;
457 457
 $output .= $i.',-55.65049,48.929001,150000,';
458
-$i = $i+300;
458
+$i = $i + 300;
459 459
 $output .= $i.',-63.530471,44.681263,150000,';
460
-$i = $i+300;
460
+$i = $i + 300;
461 461
 $output .= $i.',-66.647818,45.957319,150000,';
462
-$i = $i+300;
462
+$i = $i + 300;
463 463
 $output .= $i.',-59.630001,13.18,150000,';
464
-$i = $i+300;
464
+$i = $i + 300;
465 465
 $output .= $i.',-61.744888,12.06526,150000,';
466
-$i = $i+300;
466
+$i = $i + 300;
467 467
 $output .= $i.',-61.171322,10.30501,150000,';
468
-$i = $i+300;
468
+$i = $i + 300;
469 469
 $output .= $i.',-67.470001,7.9,150000,';
470
-$i = $i+300;
470
+$i = $i + 300;
471 471
 $output .= $i.',-58.159999,6.789999,150000,';
472
-$i = $i+300;
472
+$i = $i + 300;
473 473
 $output .= $i.',-60.02,-3.119999,150000,';
474
-$i = $i+300;
474
+$i = $i + 300;
475 475
 $output .= $i.',-56.45,-14.409999,150000,';
476
-$i = $i+300;
476
+$i = $i + 300;
477 477
 $output .= $i.',-65.260002,-19.059999,150000,';
478
-$i = $i+300;
478
+$i = $i + 300;
479 479
 $output .= $i.',-56.636503,-24.158676,150000,';
480
-$i = $i+300;
480
+$i = $i + 300;
481 481
 $output .= $i.',-56.509998,-33.409999,150000,';
482
-$i = $i+300;
482
+$i = $i + 300;
483 483
 $output .= $i.',-68.523514,-50.021889,150000,';
484
-$i = $i+300;
484
+$i = $i + 300;
485 485
 $output .= $i.',-72.505127,-51.732529,150000,';
486
-$i = $i+300;
486
+$i = $i + 300;
487 487
 $output .= $i.',-71.639999,-33.04,150000,';
488
-$i = $i+300;
488
+$i = $i + 300;
489 489
 $output .= $i.',-72.515821,-13.162849,150000,';
490
-$i = $i+300;
490
+$i = $i + 300;
491 491
 $output .= $i.',-76.970001,-6.03,150000,';
492
-$i = $i+300;
492
+$i = $i + 300;
493 493
 $output .= $i.',-78.620002,-1.24,150000,';
494
-$i = $i+300;
494
+$i = $i + 300;
495 495
 $output .= $i.',-76.739997,8.1,150000,';
496
-$i = $i+300;
496
+$i = $i + 300;
497 497
 $output .= $i.',-79.879913,9.368985,150000,';
498
-$i = $i+300;
498
+$i = $i + 300;
499 499
 $output .= $i.',-76.949996,18,150000,';
500
-$i = $i+300;
500
+$i = $i + 300;
501 501
 $output .= $i.',-72.699996,19.11,150000,';
502
-$i = $i+300;
502
+$i = $i + 300;
503 503
 $output .= $i.',-75.220001,20.149999,150000,';
504
-$i = $i+300;
504
+$i = $i + 300;
505 505
 $output .= $i.',-73.682953,20.95027,150000,';
506
-$i = $i+300;
506
+$i = $i + 300;
507 507
 $output .= $i.',-80.605,28.405556,150000,';
508
-$i = $i+300;
508
+$i = $i + 300;
509 509
 $output .= $i.',-84.388056,33.748889,150000,';
510
-$i = $i+300;
510
+$i = $i + 300;
511 511
 $output .= $i.',-79.931111,32.776389,150000,';
512
-$i = $i+300;
512
+$i = $i + 300;
513 513
 $output .= $i.',-83.920833,35.960556,150000,';
514
-$i = $i+300;
514
+$i = $i + 300;
515 515
 $output .= $i.',-84.500278,38.049167,150000,';
516
-$i = $i+300;
516
+$i = $i + 300;
517 517
 $output .= $i.',-77.460833,38.303056,150000,';
518
-$i = $i+300;
518
+$i = $i + 300;
519 519
 $output .= $i.',-82.515556,40.758333,150000,';
520
-$i = $i+300;
520
+$i = $i + 300;
521 521
 $output .= $i.',-83.045833,42.331389,150000,';
522
-$i = $i+300;
522
+$i = $i + 300;
523 523
 $output .= $i.',-74.006389,40.714167,150000,';
524
-$i = $i+300;
524
+$i = $i + 300;
525 525
 $output .= $i.',-71.802778,42.2625,150000,';
526
-$i = $i+300;
526
+$i = $i + 300;
527 527
 $output .= $i.',-72.973056,43.610556,150000,';
528
-$i = $i+300;
528
+$i = $i + 300;
529 529
 $output .= $i.',-68.0125,46.860556,150000,';
530
-$i = $i+300;
530
+$i = $i + 300;
531 531
 $output .= $i.',-72.581779,46.357398,150000,';
532
-$i = $i+300;
532
+$i = $i + 300;
533 533
 $output .= $i.',-78.53632621543271,52.72737572958358,150000,';
534
-$i = $i+300;
534
+$i = $i + 300;
535 535
 $output .= $i.',-66.921779,52.940118,150000,';
536
-$i = $i+300;
536
+$i = $i + 300;
537 537
 $output .= $i.',-75.652573,62.201069,150000,';
538
-$i = $i+300;
538
+$i = $i + 300;
539 539
 $output .= $i.',-64.865257,67.935417,150000,';
540
-$i = $i+300;
540
+$i = $i + 300;
541 541
 $output .= $i.',-94.969443,74.716943,150000,';
542
-$i = $i+300;
542
+$i = $i + 300;
543 543
 $output .= $i.',-82.793909,76.395731,150000,';
544
-$i = $i+300;
544
+$i = $i + 300;
545 545
 $output .= $i.',-97.49276733398439,69.18675994873048,150000,';
546
-$i = $i+300;
546
+$i = $i + 300;
547 547
 $output .= $i.',-90.5537452697754,63.36753463745121,150000,';
548
-$i = $i+300;
548
+$i = $i + 300;
549 549
 $output .= $i.',-89.270113,48.412197,150000,';
550
-$i = $i+300;
550
+$i = $i + 300;
551 551
 $output .= $i.',-79.604159,43.68731,150000,';
552
-$i = $i+300;
552
+$i = $i + 300;
553 553
 $output .= $i.',-89.401111,43.073056,150000,';
554
-$i = $i+300;
554
+$i = $i + 300;
555 555
 $output .= $i.',-94.633611,42.395278,150000,';
556
-$i = $i+300;
556
+$i = $i + 300;
557 557
 $output .= $i.',-89.588889,40.693611,150000,';
558
-$i = $i+300;
558
+$i = $i + 300;
559 559
 $output .= $i.',-90.197778,38.627222,150000,';
560
-$i = $i+300;
560
+$i = $i + 300;
561 561
 $output .= $i.',-90.704167,35.842222,150000,';
562
-$i = $i+300;
562
+$i = $i + 300;
563 563
 $output .= $i.',-91.061667,33.41,150000,';
564
-$i = $i+300;
564
+$i = $i + 300;
565 565
 $output .= $i.',-92.445,31.311111,150000,';
566
-$i = $i+300;
566
+$i = $i + 300;
567 567
 $output .= $i.',-98.493333,29.423889,150000,';
568
-$i = $i+300;
568
+$i = $i + 300;
569 569
 $output .= $i.',-103.349998,20.67,150000,';
570
-$i = $i+300;
570
+$i = $i + 300;
571 571
 $output .= $i.',-86.830001,21.17,150000,';
572
-$i = $i+300;
572
+$i = $i + 300;
573 573
 $output .= $i.',-89.529998,14.979999,150000,';
574
-$i = $i+300;
574
+$i = $i + 300;
575 575
 $output .= $i.',-87.449996,13.42,150000,';
576
-$i = $i+300;
576
+$i = $i + 300;
577 577
 $output .= $i.',-83.709999,9.369999,150000,';
578
-$i = $i+300;
578
+$i = $i + 300;
579 579
 $output .= $i.',-91.5149765,-0.3781085,150000,';
580
-$i = $i+300;
580
+$i = $i + 300;
581 581
 $output .= $i.',-109.425598,-27.1546,150000,';
582
-$i = $i+300;
582
+$i = $i + 300;
583 583
 $output .= $i.',-109.9142,22.88093,150000,';
584
-$i = $i+300;
584
+$i = $i + 300;
585 585
 $output .= $i.',-110.910003,27.92,150000,';
586
-$i = $i+300;
586
+$i = $i + 300;
587 587
 $output .= $i.',-110.925833,32.221667,150000,';
588
-$i = $i+300;
588
+$i = $i + 300;
589 589
 $output .= $i.',-104.526667,33.395,150000,';
590
-$i = $i+300;
590
+$i = $i + 300;
591 591
 $output .= $i.',-113.061111,37.6775,150000,';
592
-$i = $i+300;
592
+$i = $i + 300;
593 593
 $output .= $i.',-104.820833,38.833889,150000,';
594
-$i = $i+300;
594
+$i = $i + 300;
595 595
 $output .= $i.',-108.73,42.833056,150000,';
596
-$i = $i+300;
596
+$i = $i + 300;
597 597
 $output .= $i.',-113.895,45.175833,150000,';
598
-$i = $i+300;
598
+$i = $i + 300;
599 599
 $output .= $i.',-113.993056,46.872222,150000,';
600
-$i = $i+300;
600
+$i = $i + 300;
601 601
 $output .= $i.',-114.080796,51.039877,150000,';
602
-$i = $i+300;
602
+$i = $i + 300;
603 603
 $output .= $i.',-102.3889594419702,57.15883691318781,150000,';
604
-$i = $i+300;
604
+$i = $i + 300;
605 605
 $output .= $i.',-118.0333,66.0833,150000,';
606
-$i = $i+300;
606
+$i = $i + 300;
607 607
 $output .= $i.',-140.55,64.45,150000,';
608
-$i = $i+300;
608
+$i = $i + 300;
609 609
 $output .= $i.',-122.690386,58.80667,150000,';
610
-$i = $i+300;
610
+$i = $i + 300;
611 611
 $output .= $i.',-121.92985,50.686341,150000,';
612
-$i = $i+300;
612
+$i = $i + 300;
613 613
 $output .= $i.',-122.330833,47.606389,150000,';
614
-$i = $i+300;
614
+$i = $i + 300;
615 615
 $output .= $i.',-122.274167,47.564167,150000,';
616
-$i = $i+300;
616
+$i = $i + 300;
617 617
 $output .= $i.',-122.968503,45.309901,150000,';
618
-$i = $i+300;
618
+$i = $i + 300;
619 619
 $output .= $i.',-122.874444,42.326667,150000,';
620
-$i = $i+300;
620
+$i = $i + 300;
621 621
 $output .= $i.',-122.390556,40.586667,150000,';
622
-$i = $i+300;
622
+$i = $i + 300;
623 623
 $output .= $i.',-117.068611,39.493333,150000,';
624
-$i = $i+300;
624
+$i = $i + 300;
625 625
 $output .= $i.',-122.418333,37.775,150000,';
626
-$i = $i+300;
626
+$i = $i + 300;
627 627
 $output .= $i.',-117.108333,34.207778,150000,';
628
-$i = $i+300;
628
+$i = $i + 300;
629 629
 $output .= $i.',-116.544444,33.830278,150000,';
630
-$i = $i+300;
630
+$i = $i + 300;
631 631
 $output .= $i.',-117.156389,32.715278,150000,';
632
-$i = $i+300;
632
+$i = $i + 300;
633 633
 $output .= $i.',-149.891667,61.218333,150000,';
634
-$i = $i+300;
634
+$i = $i + 300;
635 635
 $output .= $i.',-155.566389,62.948889,150000,';
636
-$i = $i+300;
636
+$i = $i + 300;
637 637
 $output .= $i.',-165.406389,64.501111,150000,';
638
-$i = $i+300;
638
+$i = $i + 300;
639 639
 $output .= $i.',-155.09,19.729722,150000,';
640
-$i = $i+300;
640
+$i = $i + 300;
641 641
 $output .= $i.',-156.337974,20.804858,150000,';
642
-$i = $i+300;
642
+$i = $i + 300;
643 643
 $output .= $i.',-157.043209,21.141189,150000,';
644
-$i = $i+300;
644
+$i = $i + 300;
645 645
 $output .= $i.',-158.009167,21.386667,150000,';
646
-$i = $i+300;
646
+$i = $i + 300;
647 647
 $output .= $i.',-159.371111,21.981111,150000';
648 648
 
649 649
 $output .= ']}}';
Please login to merge, or discard this patch.
route-detailed.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])){
6
+if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']))
11
+	if (!isset($_GET['limit']))
12 12
 	{
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29 29
 	
30
-	$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING);
31
-	$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
30
+	$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING);
31
+	$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/route/'.$departure_airport.'/'.$arrival_airport;
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	if ($sort != '') {
35 35
 		$spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, $limit_start.",".$absolute_difference, $sort);
36 36
 	} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  
40 40
 	if (!empty($spotter_array))
41 41
 	{
42
-		$title = sprintf(_("Detailed View for flights between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']);
42
+		$title = sprintf(_("Detailed View for flights between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']);
43 43
 		require_once('header.php');
44 44
 		print '<div class="info column">';
45 45
 		print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>';
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		include('route-sub-menu.php');
51 51
 		print '<div class="table column">';
52
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."),$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['arrival_airport_icao']).'</p>';
52
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."), $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['arrival_airport_icao']).'</p>';
53 53
     
54 54
 		include('table-output.php'); 
55 55
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
Please login to merge, or discard this patch.
redirect.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if ($_GET['flightaware_id'] != "")
7 7
 {
8
-	$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
8
+	$flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING);
9 9
 	$spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($flightaware_id);
10 10
     
11 11
     if ($spotter_id != "")
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@
 block discarded – undo
8 8
 	$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
9 9
 	$spotter_id = $Spotter->getSpotterIDBasedOnFlightAwareID($flightaware_id);
10 10
     
11
-    if ($spotter_id != "")
12
-    {
13
-        header('Location: '.$globalURL.'/flightid/'.$spotter_id);
14
-    } else {
11
+	if ($spotter_id != "")
12
+	{
13
+		header('Location: '.$globalURL.'/flightid/'.$spotter_id);
14
+	} else {
15 15
 	   header('Location: '.$globalURL);
16
-    }
16
+	}
17 17
 }
18 18
 ?>
19 19
\ No newline at end of file
Please login to merge, or discard this patch.