@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | require_once(dirname(__FILE__).'/class.create_db.php'); |
23 | 23 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
24 | 24 | require_once(dirname(__FILE__).'/class.settings.php'); |
25 | -$title="Install"; |
|
25 | +$title = "Install"; |
|
26 | 26 | require(dirname(__FILE__).'/../require/settings.php'); |
27 | 27 | require_once(dirname(__FILE__).'/../require/class.Common.php'); |
28 | 28 | require(dirname(__FILE__).'/header.php'); |
@@ -92,8 +92,8 @@ discard block |
||
92 | 92 | if (!extension_loaded('curl')) { |
93 | 93 | $error[] = "Curl is not loaded."; |
94 | 94 | } |
95 | - if(function_exists('apache_get_modules') ){ |
|
96 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
95 | + if (function_exists('apache_get_modules')) { |
|
96 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
97 | 97 | $error[] = "mod_rewrite is not available."; |
98 | 98 | } |
99 | 99 | /* |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | 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>'; |
110 | 110 | if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) { |
111 | 111 | if (function_exists('get_headers')) { |
112 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/','search',str_replace('index.php',$_SERVER["REQUEST_URI"]))); |
|
113 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
112 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/', 'search', str_replace('index.php', $_SERVER["REQUEST_URI"]))); |
|
113 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
114 | 114 | print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work.</strong></p></div>'; |
115 | 115 | } |
116 | 116 | } |
@@ -481,13 +481,13 @@ discard block |
||
481 | 481 | ?> |
482 | 482 | <tr> |
483 | 483 | <?php |
484 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
484 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
485 | 485 | ?> |
486 | 486 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
487 | 487 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
488 | 488 | <?php |
489 | 489 | } else { |
490 | - $hostport = explode(':',$source['host']); |
|
490 | + $hostport = explode(':', $source['host']); |
|
491 | 491 | if (isset($hostport[1])) { |
492 | 492 | $host = $hostport[0]; |
493 | 493 | $port = $hostport[1]; |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | <select name="timezones[]" id="timezones"> |
535 | 535 | <?php |
536 | 536 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
537 | - foreach($timezonelist as $timezones){ |
|
537 | + foreach ($timezonelist as $timezones) { |
|
538 | 538 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
539 | 539 | print '<option selected>'.$timezones.'</option>'; |
540 | 540 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | <select name="timezones[]" id="timezones"> |
587 | 587 | <?php |
588 | 588 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
589 | - foreach($timezonelist as $timezones){ |
|
589 | + foreach ($timezonelist as $timezones) { |
|
590 | 590 | if ($timezones == 'UTC') { |
591 | 591 | print '<option selected>'.$timezones.'</option>'; |
592 | 592 | } else print '<option>'.$timezones.'</option>'; |
@@ -912,7 +912,7 @@ discard block |
||
912 | 912 | <br /> |
913 | 913 | <p> |
914 | 914 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
915 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
915 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
916 | 916 | </p> |
917 | 917 | <br /> |
918 | 918 | <p> |
@@ -968,14 +968,14 @@ discard block |
||
968 | 968 | $error = ''; |
969 | 969 | |
970 | 970 | if (isset($_POST['dbtype'])) { |
971 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
972 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
973 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
974 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
975 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
976 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
977 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
978 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
971 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
972 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
973 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
974 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
975 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
976 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
977 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
978 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
979 | 979 | |
980 | 980 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
981 | 981 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -995,49 +995,49 @@ discard block |
||
995 | 995 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
996 | 996 | */ |
997 | 997 | |
998 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
998 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
999 | 999 | |
1000 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
1001 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
1002 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
1003 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
1004 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
1000 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
1001 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
1002 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
1003 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
1004 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
1005 | 1005 | |
1006 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
1007 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
1008 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
1009 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
1010 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
1011 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
1012 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
1013 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
1014 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
1015 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
1006 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
1007 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
1008 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
1009 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
1010 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
1011 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
1012 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
1013 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
1014 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
1015 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
1016 | 1016 | |
1017 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
1018 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
1019 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
1020 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
1021 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
1022 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
1017 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
1018 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
1019 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
1020 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
1021 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
1022 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
1023 | 1023 | |
1024 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
1025 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
1024 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
1025 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
1026 | 1026 | |
1027 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
1028 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
1029 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
1027 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
1028 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
1029 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
1030 | 1030 | |
1031 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
1031 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
1032 | 1032 | if ($acars == 'acars') { |
1033 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
1033 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
1034 | 1034 | } else { |
1035 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
1035 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
1036 | 1036 | } |
1037 | 1037 | |
1038 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
1039 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
1040 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
1038 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
1039 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
1040 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
1041 | 1041 | |
1042 | 1042 | $source_name = $_POST['source_name']; |
1043 | 1043 | $source_latitude = $_POST['source_latitude']; |
@@ -1051,8 +1051,8 @@ discard block |
||
1051 | 1051 | |
1052 | 1052 | $sources = array(); |
1053 | 1053 | foreach ($source_name as $keys => $name) { |
1054 | - 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]); |
|
1055 | - 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]); |
|
1054 | + 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]); |
|
1055 | + 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]); |
|
1056 | 1056 | } |
1057 | 1057 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
1058 | 1058 | |
@@ -1065,27 +1065,27 @@ discard block |
||
1065 | 1065 | $sbsurl = $_POST['sbsurl']; |
1066 | 1066 | */ |
1067 | 1067 | |
1068 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
1069 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
1070 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
1071 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
1072 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
1073 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
1074 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
1075 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
1068 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
1069 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
1070 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
1071 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
1072 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
1073 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
1074 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
1075 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
1076 | 1076 | |
1077 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
1078 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1079 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1080 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
1081 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1082 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1083 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
1084 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1085 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1086 | - $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
|
1087 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
1088 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
1077 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
1078 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
1079 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
1080 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
1081 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
1082 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
1083 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
1084 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
1085 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
1086 | + $globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING); |
|
1087 | + if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE')); |
|
1088 | + else $settings = array_merge($settings, array('globalSatellite' => 'FALSE')); |
|
1089 | 1089 | |
1090 | 1090 | /* |
1091 | 1091 | $globalSBS1Hosts = array(); |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | } |
1102 | 1102 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
1103 | 1103 | */ |
1104 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
1104 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
1105 | 1105 | $host = $_POST['host']; |
1106 | 1106 | $port = $_POST['port']; |
1107 | 1107 | $name = $_POST['name']; |
@@ -1118,113 +1118,113 @@ discard block |
||
1118 | 1118 | else $cov = 'FALSE'; |
1119 | 1119 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
1120 | 1120 | else $arch = 'FALSE'; |
1121 | - if (strpos($format[$key],'_callback')) { |
|
1122 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
1121 | + if (strpos($format[$key], '_callback')) { |
|
1122 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
1123 | 1123 | } elseif ($h != '' || $name[$key] != '') { |
1124 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
1124 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
1125 | 1125 | } |
1126 | 1126 | if ($format[$key] == 'airwhere') $forcepilots = true; |
1127 | 1127 | } |
1128 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
1128 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
1129 | 1129 | |
1130 | 1130 | /* |
1131 | 1131 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
1132 | 1132 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
1133 | 1133 | */ |
1134 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
1135 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
1136 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
1134 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
1135 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
1136 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
1137 | 1137 | |
1138 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
1139 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
1138 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
1139 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
1140 | 1140 | |
1141 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
1142 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
1141 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
1142 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
1143 | 1143 | |
1144 | - $map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING); |
|
1145 | - $settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile)); |
|
1144 | + $map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING); |
|
1145 | + $settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile)); |
|
1146 | 1146 | |
1147 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
1148 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
1149 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
1150 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
1147 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
1148 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
1149 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
1150 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
1151 | 1151 | |
1152 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
1153 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
1154 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
1152 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
1153 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
1154 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
1155 | 1155 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
1156 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
1157 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1156 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
1157 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
1158 | 1158 | |
1159 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
1160 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
1161 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
1162 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
1163 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
1164 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
1165 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
1166 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
1159 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
1160 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
1161 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
1162 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
1163 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
1164 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
1165 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
1166 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
1167 | 1167 | |
1168 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
1169 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
1168 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
1169 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
1170 | 1170 | |
1171 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
1172 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
1171 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
1172 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
1173 | 1173 | |
1174 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
1174 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
1175 | 1175 | if ($archiveyear == "archiveyear") { |
1176 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
1176 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
1177 | 1177 | } else { |
1178 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
1178 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
1179 | 1179 | } |
1180 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1181 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1182 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1183 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1180 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1181 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1182 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1183 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1184 | 1184 | |
1185 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
1186 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
1187 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
1188 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
1185 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
1186 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
1187 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
1188 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
1189 | 1189 | |
1190 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
1191 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
1192 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
1190 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
1191 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
1192 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
1193 | 1193 | |
1194 | 1194 | // Create in settings.php keys not yet configurable if not already here |
1195 | 1195 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1196 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1196 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
1197 | 1197 | |
1198 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
1198 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
1199 | 1199 | if ($resetyearstats == 'resetyearstats') { |
1200 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
1200 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
1201 | 1201 | } else { |
1202 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
1202 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
1203 | 1203 | } |
1204 | 1204 | |
1205 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
1205 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
1206 | 1206 | if ($archive == 'archive') { |
1207 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
1207 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
1208 | 1208 | } else { |
1209 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
1209 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
1210 | 1210 | } |
1211 | - $archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING); |
|
1211 | + $archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING); |
|
1212 | 1212 | if ($archiveresults == 'archiveresults') { |
1213 | - $settings = array_merge($settings,array('globalArchiveResults' => 'TRUE')); |
|
1213 | + $settings = array_merge($settings, array('globalArchiveResults' => 'TRUE')); |
|
1214 | 1214 | } else { |
1215 | - $settings = array_merge($settings,array('globalArchiveResults' => 'FALSE')); |
|
1215 | + $settings = array_merge($settings, array('globalArchiveResults' => 'FALSE')); |
|
1216 | 1216 | } |
1217 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
1217 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
1218 | 1218 | if ($daemon == 'daemon') { |
1219 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
1219 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
1220 | 1220 | } else { |
1221 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
1221 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
1222 | 1222 | } |
1223 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
1223 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
1224 | 1224 | if ($schedules == 'schedules') { |
1225 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
1225 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
1226 | 1226 | } else { |
1227 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
1227 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
1228 | 1228 | } |
1229 | 1229 | |
1230 | 1230 | /* |
@@ -1235,227 +1235,227 @@ discard block |
||
1235 | 1235 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
1236 | 1236 | } |
1237 | 1237 | */ |
1238 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
1239 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1240 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1241 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1242 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1238 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
1239 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
1240 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
1241 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
1242 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
1243 | 1243 | $va = false; |
1244 | 1244 | if ($globalivao == 'ivao') { |
1245 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
1245 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
1246 | 1246 | $va = true; |
1247 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1247 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
1248 | 1248 | if ($globalvatsim == 'vatsim') { |
1249 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
1249 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
1250 | 1250 | $va = true; |
1251 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1251 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
1252 | 1252 | if ($globalphpvms == 'phpvms') { |
1253 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
1253 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
1254 | 1254 | $va = true; |
1255 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1255 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
1256 | 1256 | if ($globalvam == 'vam') { |
1257 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
1257 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
1258 | 1258 | $va = true; |
1259 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1259 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
1260 | 1260 | if ($va) { |
1261 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
1262 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1261 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
1262 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
1263 | 1263 | if ($globalva == 'va' || $va) { |
1264 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
1265 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1264 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
1265 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1266 | 1266 | } else { |
1267 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
1268 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1269 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
1267 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
1268 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1269 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
1270 | 1270 | } |
1271 | 1271 | |
1272 | 1272 | |
1273 | 1273 | |
1274 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
1274 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
1275 | 1275 | if ($notam == 'notam') { |
1276 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
1276 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
1277 | 1277 | } else { |
1278 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
1278 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
1279 | 1279 | } |
1280 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
1280 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
1281 | 1281 | if ($owner == 'owner') { |
1282 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
1282 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
1283 | 1283 | } else { |
1284 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
1284 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
1285 | 1285 | } |
1286 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
1286 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
1287 | 1287 | if ($map3d == 'map3d') { |
1288 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
1288 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
1289 | 1289 | } else { |
1290 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
1290 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
1291 | 1291 | } |
1292 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
1292 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
1293 | 1293 | if ($crash == 'crash') { |
1294 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
1294 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
1295 | 1295 | } else { |
1296 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
1296 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
1297 | 1297 | } |
1298 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
1298 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
1299 | 1299 | if ($mapsatellites == 'mapsatellites') { |
1300 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
1300 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
1301 | 1301 | } else { |
1302 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
1302 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
1303 | 1303 | } |
1304 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
1304 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
1305 | 1305 | if ($map3ddefault == 'map3ddefault') { |
1306 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
1306 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
1307 | 1307 | } else { |
1308 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
1308 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
1309 | 1309 | } |
1310 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
1310 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
1311 | 1311 | if ($translate == 'translate') { |
1312 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
1312 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
1313 | 1313 | } else { |
1314 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
1314 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
1315 | 1315 | } |
1316 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
1316 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
1317 | 1317 | if ($realairlines == 'realairlines') { |
1318 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
1318 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
1319 | 1319 | } else { |
1320 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
1320 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
1321 | 1321 | } |
1322 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
1322 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
1323 | 1323 | if ($estimation == 'estimation') { |
1324 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
1324 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
1325 | 1325 | } else { |
1326 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
1326 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
1327 | 1327 | } |
1328 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
1328 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
1329 | 1329 | if ($metar == 'metar') { |
1330 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
1330 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
1331 | 1331 | } else { |
1332 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
1332 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
1333 | 1333 | } |
1334 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
1334 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
1335 | 1335 | if ($metarcycle == 'metarcycle') { |
1336 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
1336 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
1337 | 1337 | } else { |
1338 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
1338 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
1339 | 1339 | } |
1340 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
1340 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
1341 | 1341 | if ($fork == 'fork') { |
1342 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
1342 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
1343 | 1343 | } else { |
1344 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
1344 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
1345 | 1345 | } |
1346 | 1346 | |
1347 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
1347 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
1348 | 1348 | if ($colormap == 'colormap') { |
1349 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
1349 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
1350 | 1350 | } else { |
1351 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
1351 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
1352 | 1352 | } |
1353 | 1353 | |
1354 | 1354 | if (isset($_POST['aircrafticoncolor'])) { |
1355 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
1356 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
1355 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
1356 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
1357 | 1357 | } |
1358 | 1358 | |
1359 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
1360 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
1359 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
1360 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
1361 | 1361 | |
1362 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
1363 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
1364 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
1365 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
1366 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
1367 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
1362 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
1363 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
1364 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
1365 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
1366 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
1367 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
1368 | 1368 | |
1369 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
1369 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
1370 | 1370 | if ($mappopup == 'mappopup') { |
1371 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
1371 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
1372 | 1372 | } else { |
1373 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
1373 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
1374 | 1374 | } |
1375 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
1375 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
1376 | 1376 | if ($airportpopup == 'airportpopup') { |
1377 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
1377 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
1378 | 1378 | } else { |
1379 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
1379 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
1380 | 1380 | } |
1381 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
1381 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
1382 | 1382 | if ($maphistory == 'maphistory') { |
1383 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
1383 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
1384 | 1384 | } else { |
1385 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
1385 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
1386 | 1386 | } |
1387 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
1387 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
1388 | 1388 | if ($maptooltip == 'maptooltip') { |
1389 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
1389 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
1390 | 1390 | } else { |
1391 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
1391 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
1392 | 1392 | } |
1393 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
1393 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
1394 | 1394 | if ($flightroute == 'flightroute') { |
1395 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
1395 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
1396 | 1396 | } else { |
1397 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
1397 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
1398 | 1398 | } |
1399 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
1399 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
1400 | 1400 | if ($flightremainingroute == 'flightremainingroute') { |
1401 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
1401 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
1402 | 1402 | } else { |
1403 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
1403 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
1404 | 1404 | } |
1405 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
1405 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
1406 | 1406 | if ($allflights == 'allflights') { |
1407 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
1407 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
1408 | 1408 | } else { |
1409 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
1409 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
1410 | 1410 | } |
1411 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
1411 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
1412 | 1412 | if ($bbox == 'bbox') { |
1413 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
1413 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
1414 | 1414 | } else { |
1415 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
1415 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
1416 | 1416 | } |
1417 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
1417 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
1418 | 1418 | if ($groundaltitude == 'groundaltitude') { |
1419 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
1419 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
1420 | 1420 | } else { |
1421 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
1421 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
1422 | 1422 | } |
1423 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
1423 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
1424 | 1424 | if ($waypoints == 'waypoints') { |
1425 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
1425 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
1426 | 1426 | } else { |
1427 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
1427 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
1428 | 1428 | } |
1429 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
1429 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
1430 | 1430 | if ($geoid == 'geoid') { |
1431 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
1431 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
1432 | 1432 | } else { |
1433 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
1433 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
1434 | 1434 | } |
1435 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
1436 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
1435 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
1436 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
1437 | 1437 | |
1438 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
1438 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
1439 | 1439 | if ($noairlines == 'noairlines') { |
1440 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
1440 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
1441 | 1441 | } else { |
1442 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
1442 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
1443 | 1443 | } |
1444 | 1444 | |
1445 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1445 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
1446 | 1446 | |
1447 | 1447 | // Set some defaults values... |
1448 | 1448 | if (!isset($globalAircraftImageSources)) { |
1449 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1450 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1449 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
1450 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1451 | 1451 | } |
1452 | 1452 | |
1453 | 1453 | if (!isset($globalSchedulesSources)) { |
1454 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1455 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1454 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
1455 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1456 | 1456 | } |
1457 | 1457 | |
1458 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
1458 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
1459 | 1459 | |
1460 | 1460 | if ($error == '') settings::modify_settings($settings); |
1461 | 1461 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | //require_once('require/class.SpotterLive.php'); |
8 | 8 | require_once('require/class.SpotterArchive.php'); |
9 | 9 | |
10 | -if (!isset($_GET['owner'])){ |
|
10 | +if (!isset($_GET['owner'])) { |
|
11 | 11 | header('Location: '.$globalURL.''); |
12 | 12 | } else { |
13 | 13 | $Spotter = new Spotter(); |
14 | 14 | $SpotterArchive = new SpotterArchive(); |
15 | 15 | //$Translation = new Translation(); |
16 | 16 | //calculuation for the pagination |
17 | - if(!isset($_GET['limit'])) |
|
17 | + if (!isset($_GET['limit'])) |
|
18 | 18 | { |
19 | 19 | $limit_start = 0; |
20 | 20 | $limit_end = 25; |
@@ -35,29 +35,29 @@ discard block |
||
35 | 35 | |
36 | 36 | $page_url = $globalURL.'/owner/'.$_GET['owner']; |
37 | 37 | |
38 | - $owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING); |
|
39 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
40 | - $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
41 | - $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
38 | + $owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING); |
|
39 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
40 | + $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
41 | + $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
42 | 42 | $filter = array(); |
43 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
44 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
43 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
44 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
45 | 45 | if ($sort != '') |
46 | 46 | { |
47 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
47 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
48 | 48 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
49 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference, $sort,$filter); |
|
49 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, $sort, $filter); |
|
50 | 50 | } |
51 | 51 | } else { |
52 | - $spotter_array = $Spotter->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference,'',$filter); |
|
52 | + $spotter_array = $Spotter->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, '', $filter); |
|
53 | 53 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
54 | - $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,$limit_start.",".$absolute_difference,'',$filter); |
|
54 | + $spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, $limit_start.",".$absolute_difference, '', $filter); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | if (!empty($spotter_array)) |
59 | 59 | { |
60 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['aircraft_owner']); |
|
60 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['aircraft_owner']); |
|
61 | 61 | //$ident = $spotter_array[0]['ident']; |
62 | 62 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
63 | 63 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -117,23 +117,23 @@ discard block |
||
117 | 117 | $Stats = new Stats(); |
118 | 118 | if ($year == '' && $month == '') $flights = $Stats->getStatsOwner($owner); |
119 | 119 | else $flights = 0; |
120 | - if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner,$filter); |
|
120 | + if ($flights == 0) $flights = $Spotter->countFlightsByOwner($owner, $filter); |
|
121 | 121 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
122 | - $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner,$filter)); |
|
122 | + $aircraft_type = count($Spotter->countAllAircraftTypesByOwner($owner, $filter)); |
|
123 | 123 | print '<div><span class="label">'._("Aircrafts type").'</span>'.$aircraft_type.'</div>'; |
124 | - $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner,$filter)); |
|
124 | + $aircraft_registration = count($Spotter->countAllAircraftRegistrationByOwner($owner, $filter)); |
|
125 | 125 | print '<div><span class="label">'._("Aircrafts").'</span>'.$aircraft_registration.'</div>'; |
126 | - $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner,$filter)); |
|
126 | + $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByOwner($owner, $filter)); |
|
127 | 127 | print '<div><span class="label">'._("Manufacturers").'</span>'.$aircraft_manufacturer.'</div>'; |
128 | - $airlines = count($Spotter->countAllAirlinesByOwner($owner,$filter)); |
|
128 | + $airlines = count($Spotter->countAllAirlinesByOwner($owner, $filter)); |
|
129 | 129 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
130 | - $duration = $Spotter->getFlightDurationByOwner($owner,$filter); |
|
130 | + $duration = $Spotter->getFlightDurationByOwner($owner, $filter); |
|
131 | 131 | if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
132 | 132 | print '</div>'; |
133 | 133 | |
134 | 134 | include('owner-sub-menu.php'); |
135 | 135 | print '<div class="table column">'; |
136 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the owner <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>'; |
|
136 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the owner <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>'; |
|
137 | 137 | |
138 | 138 | include('table-output.php'); |
139 | 139 | print '<div class="pagination">'; |
@@ -7,14 +7,14 @@ discard block |
||
7 | 7 | //require_once('require/class.SpotterLive.php'); |
8 | 8 | require_once('require/class.SpotterArchive.php'); |
9 | 9 | |
10 | -if (!isset($_GET['pilot'])){ |
|
10 | +if (!isset($_GET['pilot'])) { |
|
11 | 11 | header('Location: '.$globalURL.'/'); |
12 | 12 | } else { |
13 | 13 | $Spotter = new Spotter(); |
14 | 14 | $SpotterArchive = new SpotterArchive(); |
15 | 15 | $Translation = new Translation(); |
16 | 16 | //calculuation for the pagination |
17 | - if(!isset($_GET['limit'])) |
|
17 | + if (!isset($_GET['limit'])) |
|
18 | 18 | { |
19 | 19 | $limit_start = 0; |
20 | 20 | $limit_end = 25; |
@@ -35,29 +35,29 @@ discard block |
||
35 | 35 | |
36 | 36 | $page_url = $globalURL.'/pilot/'.$_GET['pilot']; |
37 | 37 | |
38 | - $pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING); |
|
39 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
40 | - $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
41 | - $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
38 | + $pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING); |
|
39 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
40 | + $year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
41 | + $month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
42 | 42 | $filter = array(); |
43 | - if ($year != '') $filter = array_merge($filter,array('year' => $year)); |
|
44 | - if ($month != '') $filter = array_merge($filter,array('month' => $month)); |
|
43 | + if ($year != '') $filter = array_merge($filter, array('year' => $year)); |
|
44 | + if ($month != '') $filter = array_merge($filter, array('month' => $month)); |
|
45 | 45 | if ($sort != '') |
46 | 46 | { |
47 | - $spotter_array = $Spotter->getSpotterDataByPilot($pilot,$limit_start.",".$absolute_difference, $sort,$filter); |
|
47 | + $spotter_array = $Spotter->getSpotterDataByPilot($pilot, $limit_start.",".$absolute_difference, $sort, $filter); |
|
48 | 48 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
49 | - $spotter_array = $SpotterArchive->getSpotterDataByPilot($pilot,$limit_start.",".$absolute_difference, $sort,$filter); |
|
49 | + $spotter_array = $SpotterArchive->getSpotterDataByPilot($pilot, $limit_start.",".$absolute_difference, $sort, $filter); |
|
50 | 50 | } |
51 | 51 | } else { |
52 | - $spotter_array = $Spotter->getSpotterDataByPilot($pilot,$limit_start.",".$absolute_difference,'',$filter); |
|
52 | + $spotter_array = $Spotter->getSpotterDataByPilot($pilot, $limit_start.",".$absolute_difference, '', $filter); |
|
53 | 53 | if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) { |
54 | - $spotter_array = $SpotterArchive->getSpotterDataByPilot($pilot,$limit_start.",".$absolute_difference,'',$filter); |
|
54 | + $spotter_array = $SpotterArchive->getSpotterDataByPilot($pilot, $limit_start.",".$absolute_difference, '', $filter); |
|
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | 58 | if (!empty($spotter_array)) |
59 | 59 | { |
60 | - $title = sprintf(_("Detailed View for %s"),$spotter_array[0]['pilot_name']); |
|
60 | + $title = sprintf(_("Detailed View for %s"), $spotter_array[0]['pilot_name']); |
|
61 | 61 | $ident = $spotter_array[0]['ident']; |
62 | 62 | if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude']; |
63 | 63 | if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude']; |
@@ -118,23 +118,23 @@ discard block |
||
118 | 118 | $Stats = new Stats(); |
119 | 119 | $flights = $Stats->getStatsPilot($pilot); |
120 | 120 | } else $flights = 0; |
121 | - if ($flights == 0) $flights = $Spotter->countFlightsByPilot($pilot,$filter); |
|
121 | + if ($flights == 0) $flights = $Spotter->countFlightsByPilot($pilot, $filter); |
|
122 | 122 | print '<div><span class="label">'._("Flights").'</span>'.$flights.'</div>'; |
123 | - $aircraft_type = count($Spotter->countAllAircraftTypesByPilot($pilot,$filter)); |
|
123 | + $aircraft_type = count($Spotter->countAllAircraftTypesByPilot($pilot, $filter)); |
|
124 | 124 | print '<div><span class="label">'._("Aircrafts type").'</span>'.$aircraft_type.'</div>'; |
125 | - $aircraft_registration = count($Spotter->countAllAircraftRegistrationByPilot($pilot,$filter)); |
|
125 | + $aircraft_registration = count($Spotter->countAllAircraftRegistrationByPilot($pilot, $filter)); |
|
126 | 126 | print '<div><span class="label">'._("Aircrafts").'</span>'.$aircraft_registration.'</div>'; |
127 | - $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByPilot($pilot,$filter)); |
|
127 | + $aircraft_manufacturer = count($Spotter->countAllAircraftManufacturerByPilot($pilot, $filter)); |
|
128 | 128 | print '<div><span class="label">'._("Manufacturers").'</span>'.$aircraft_manufacturer.'</div>'; |
129 | - $airlines = count($Spotter->countAllAirlinesByPilot($pilot,$filter)); |
|
129 | + $airlines = count($Spotter->countAllAirlinesByPilot($pilot, $filter)); |
|
130 | 130 | print '<div><span class="label">'._("Airlines").'</span>'.$airlines.'</div>'; |
131 | - $duration = $Spotter->getFlightDurationByPilot($pilot,$filter); |
|
131 | + $duration = $Spotter->getFlightDurationByPilot($pilot, $filter); |
|
132 | 132 | if ($duration != '0') print '<div><span class="label">'._("Total flights spotted duration").'</span>'.$duration.'</div>'; |
133 | 133 | print '</div>'; |
134 | 134 | |
135 | 135 | include('owner-sub-menu.php'); |
136 | 136 | print '<div class="table column">'; |
137 | - print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the pilot <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>'; |
|
137 | + print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the pilot <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>'; |
|
138 | 138 | |
139 | 139 | include('table-output.php'); |
140 | 140 | print '<div class="pagination">'; |