@@ -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'); |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | if (!extension_loaded('curl')) { |
| 94 | 94 | $error[] = "Curl is not loaded."; |
| 95 | 95 | } |
| 96 | - if(function_exists('apache_get_modules') ){ |
|
| 97 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
| 96 | + if (function_exists('apache_get_modules')) { |
|
| 97 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
| 98 | 98 | $error[] = "mod_rewrite is not available."; |
| 99 | 99 | } |
| 100 | 100 | /* |
@@ -113,22 +113,22 @@ discard block |
||
| 113 | 113 | $alllng = $Language->listLocaleDir(); |
| 114 | 114 | if (count($alllng) != count($availablelng)) { |
| 115 | 115 | $notavailable = array(); |
| 116 | - foreach($alllng as $lng) { |
|
| 116 | + foreach ($alllng as $lng) { |
|
| 117 | 117 | if (!isset($availablelng[$lng])) $notavailable[] = $lng; |
| 118 | 118 | } |
| 119 | - print '<div class="alert alert-warning">The following translation can\'t be used on your system: '.implode(', ',$notavailable).'. You need to add the system locales: <a href="https://github.com/Ysurac/FlightAirMap/wiki/Translation">documentation</a>.</div>'; |
|
| 119 | + print '<div class="alert alert-warning">The following translation can\'t be used on your system: '.implode(', ', $notavailable).'. You need to add the system locales: <a href="https://github.com/Ysurac/FlightAirMap/wiki/Translation">documentation</a>.</div>'; |
|
| 120 | 120 | } |
| 121 | 121 | } |
| 122 | 122 | print '<div class="alert alert-info">If you use MySQL or MariaDB, check that <i>max_allowed_packet</i> >= 8M, else import of some tables can fail.</div>'; |
| 123 | 123 | if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) { |
| 124 | 124 | if (function_exists('get_headers')) { |
| 125 | 125 | //$check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/','install'),'search',str_replace('index.php','',$_SERVER["REQUEST_URI"]))); |
| 126 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/','install'),'live/geojson?test',str_replace('index.php','',$_SERVER["REQUEST_URI"]))); |
|
| 127 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
| 126 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/', 'install'), 'live/geojson?test', str_replace('index.php', '', $_SERVER["REQUEST_URI"]))); |
|
| 127 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
| 128 | 128 | print '<div class="alert alert-danger"><strong>Error</strong> Check your configuration, rewrite don\'t seems to work well. If using Apache, you need to desactivate MultiViews <a href="https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration">https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration</a></div>'; |
| 129 | 129 | } else { |
| 130 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/','install'),'search',str_replace('index.php','',$_SERVER["REQUEST_URI"]))); |
|
| 131 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
| 130 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace(array('install/', 'install'), 'search', str_replace('index.php', '', $_SERVER["REQUEST_URI"]))); |
|
| 131 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
| 132 | 132 | print '<div class="alert alert-danger"><strong>Error</strong> Check your configuration, rewrite don\'t seems to work well. If using Apache, you need to desactivate MultiViews <a href="https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration">https://github.com/Ysurac/FlightAirMap/wiki/Apache-configuration</a></div>'; |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
| 209 | 209 | if (isset($_SERVER['REQUEST_URI'])) { |
| 210 | 210 | $URL = $_SERVER['REQUEST_URI']; |
| 211 | - $globalURL = str_replace('/install','',str_replace('/install/','',str_replace('/install/index.php','',$URL))); |
|
| 211 | + $globalURL = str_replace('/install', '', str_replace('/install/', '', str_replace('/install/index.php', '', $URL))); |
|
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | 214 | ?> |
@@ -538,13 +538,13 @@ discard block |
||
| 538 | 538 | ?> |
| 539 | 539 | <tr> |
| 540 | 540 | <?php |
| 541 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 541 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
| 542 | 542 | ?> |
| 543 | 543 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 544 | 544 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 545 | 545 | <?php |
| 546 | 546 | } else { |
| 547 | - $hostport = explode(':',$source['host']); |
|
| 547 | + $hostport = explode(':', $source['host']); |
|
| 548 | 548 | if (isset($hostport[1])) { |
| 549 | 549 | $host = $hostport[0]; |
| 550 | 550 | $port = $hostport[1]; |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | <select name="timezones[]" id="timezones"> |
| 596 | 596 | <?php |
| 597 | 597 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 598 | - foreach($timezonelist as $timezones){ |
|
| 598 | + foreach ($timezonelist as $timezones) { |
|
| 599 | 599 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
| 600 | 600 | print '<option selected>'.$timezones.'</option>'; |
| 601 | 601 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | <select name="timezones[]" id="timezones"> |
| 652 | 652 | <?php |
| 653 | 653 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 654 | - foreach($timezonelist as $timezones){ |
|
| 654 | + foreach ($timezonelist as $timezones) { |
|
| 655 | 655 | if ($timezones == 'UTC') { |
| 656 | 656 | print '<option selected>'.$timezones.'</option>'; |
| 657 | 657 | } else print '<option>'.$timezones.'</option>'; |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | <br /> |
| 1115 | 1115 | <p> |
| 1116 | 1116 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1117 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1117 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
| 1118 | 1118 | </p> |
| 1119 | 1119 | <br /> |
| 1120 | 1120 | <p> |
@@ -1176,14 +1176,14 @@ discard block |
||
| 1176 | 1176 | $error = ''; |
| 1177 | 1177 | |
| 1178 | 1178 | if (isset($_POST['dbtype'])) { |
| 1179 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
| 1180 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
| 1181 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
| 1182 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
| 1183 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
| 1184 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
| 1185 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
| 1186 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
| 1179 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
| 1180 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
| 1181 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
| 1182 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
| 1183 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
| 1184 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
| 1185 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
| 1186 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
| 1187 | 1187 | |
| 1188 | 1188 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
| 1189 | 1189 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -1203,49 +1203,49 @@ discard block |
||
| 1203 | 1203 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
| 1204 | 1204 | */ |
| 1205 | 1205 | |
| 1206 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 1206 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 1207 | 1207 | |
| 1208 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
| 1209 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
| 1210 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
| 1211 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
| 1212 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
| 1208 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
| 1209 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
| 1210 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
| 1211 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
| 1212 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
| 1213 | 1213 | |
| 1214 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
| 1215 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
| 1216 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
| 1217 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
| 1218 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
| 1219 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
| 1220 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
| 1221 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
| 1222 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
| 1223 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1214 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
| 1215 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
| 1216 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
| 1217 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
| 1218 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
| 1219 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
| 1220 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
| 1221 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
| 1222 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
| 1223 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1224 | 1224 | |
| 1225 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
| 1226 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
| 1227 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
| 1228 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
| 1229 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1230 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
| 1225 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
| 1226 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
| 1227 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
| 1228 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
| 1229 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1230 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
| 1231 | 1231 | |
| 1232 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
| 1233 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
| 1232 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
| 1233 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
| 1234 | 1234 | |
| 1235 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
| 1236 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
| 1237 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
| 1235 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
| 1236 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
| 1237 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
| 1238 | 1238 | |
| 1239 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
| 1239 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
| 1240 | 1240 | if ($acars == 'acars') { |
| 1241 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
| 1241 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
| 1242 | 1242 | } else { |
| 1243 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
| 1243 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
| 1244 | 1244 | } |
| 1245 | 1245 | |
| 1246 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
| 1247 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
| 1248 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1246 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
| 1247 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
| 1248 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1249 | 1249 | |
| 1250 | 1250 | $source_name = $_POST['source_name']; |
| 1251 | 1251 | $source_latitude = $_POST['source_latitude']; |
@@ -1259,8 +1259,8 @@ discard block |
||
| 1259 | 1259 | |
| 1260 | 1260 | $sources = array(); |
| 1261 | 1261 | foreach ($source_name as $keys => $name) { |
| 1262 | - 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]); |
|
| 1263 | - 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]); |
|
| 1262 | + 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]); |
|
| 1263 | + 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]); |
|
| 1264 | 1264 | } |
| 1265 | 1265 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1266 | 1266 | |
@@ -1269,16 +1269,16 @@ discard block |
||
| 1269 | 1269 | $newstype = $_POST['newstype']; |
| 1270 | 1270 | |
| 1271 | 1271 | $newsfeeds = array(); |
| 1272 | - foreach($newsurl as $newskey => $url) { |
|
| 1272 | + foreach ($newsurl as $newskey => $url) { |
|
| 1273 | 1273 | if ($url != '') { |
| 1274 | 1274 | $type = $newstype[$newskey]; |
| 1275 | 1275 | $lng = $newslng[$newskey]; |
| 1276 | 1276 | if (isset($newsfeeds[$type][$lng])) { |
| 1277 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1277 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng], array($url)); |
|
| 1278 | 1278 | } else $newsfeeds[$type][$lng] = array($url); |
| 1279 | 1279 | } |
| 1280 | 1280 | } |
| 1281 | - $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
|
| 1281 | + $settings = array_merge($settings, array('globalNewsFeeds' => $newsfeeds)); |
|
| 1282 | 1282 | |
| 1283 | 1283 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 1284 | 1284 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1289,28 +1289,28 @@ discard block |
||
| 1289 | 1289 | $sbsurl = $_POST['sbsurl']; |
| 1290 | 1290 | */ |
| 1291 | 1291 | |
| 1292 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
| 1293 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
| 1294 | - $globalvm = filter_input(INPUT_POST,'globalvm',FILTER_SANITIZE_STRING); |
|
| 1295 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
| 1296 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
| 1297 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
| 1298 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
| 1299 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
| 1300 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
| 1292 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
| 1293 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
| 1294 | + $globalvm = filter_input(INPUT_POST, 'globalvm', FILTER_SANITIZE_STRING); |
|
| 1295 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
| 1296 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
| 1297 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
| 1298 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
| 1299 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
| 1300 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
| 1301 | 1301 | |
| 1302 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
| 1303 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1304 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1305 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
| 1306 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1307 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1308 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
| 1309 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1310 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1311 | - $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
|
| 1312 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1313 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1302 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
| 1303 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
| 1304 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
| 1305 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
| 1306 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
| 1307 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
| 1308 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
| 1309 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
| 1310 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
| 1311 | + $globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING); |
|
| 1312 | + if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE')); |
|
| 1313 | + else $settings = array_merge($settings, array('globalSatellite' => 'FALSE')); |
|
| 1314 | 1314 | |
| 1315 | 1315 | /* |
| 1316 | 1316 | $globalSBS1Hosts = array(); |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | } |
| 1327 | 1327 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
| 1328 | 1328 | */ |
| 1329 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
| 1329 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
| 1330 | 1330 | $host = $_POST['host']; |
| 1331 | 1331 | $port = $_POST['port']; |
| 1332 | 1332 | $name = $_POST['name']; |
@@ -1343,115 +1343,115 @@ discard block |
||
| 1343 | 1343 | else $cov = 'FALSE'; |
| 1344 | 1344 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
| 1345 | 1345 | else $arch = 'FALSE'; |
| 1346 | - if (strpos($format[$key],'_callback')) { |
|
| 1347 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
| 1346 | + if (strpos($format[$key], '_callback')) { |
|
| 1347 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
| 1348 | 1348 | } elseif ($format[$key] != 'auto' || ($h != '' || $name[$key] != '')) { |
| 1349 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
| 1349 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
| 1350 | 1350 | } |
| 1351 | 1351 | if ($format[$key] == 'airwhere') $forcepilots = true; |
| 1352 | 1352 | } |
| 1353 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
| 1353 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
| 1354 | 1354 | |
| 1355 | 1355 | /* |
| 1356 | 1356 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
| 1357 | 1357 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
| 1358 | 1358 | */ |
| 1359 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
| 1360 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
| 1361 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
| 1359 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
| 1360 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
| 1361 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
| 1362 | 1362 | |
| 1363 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
| 1364 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
| 1363 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
| 1364 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
| 1365 | 1365 | |
| 1366 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
| 1367 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
| 1366 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
| 1367 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
| 1368 | 1368 | |
| 1369 | - $map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING); |
|
| 1370 | - $settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile)); |
|
| 1369 | + $map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING); |
|
| 1370 | + $settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile)); |
|
| 1371 | 1371 | |
| 1372 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
| 1373 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
| 1374 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
| 1375 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
| 1372 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
| 1373 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
| 1374 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
| 1375 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
| 1376 | 1376 | |
| 1377 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
| 1378 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
| 1379 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
| 1377 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
| 1378 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
| 1379 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
| 1380 | 1380 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1381 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
| 1382 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1381 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
| 1382 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
| 1383 | 1383 | |
| 1384 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1385 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
| 1386 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1387 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
| 1388 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
| 1389 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
| 1390 | - $minfetch = filter_input(INPUT_POST,'minfetch',FILTER_SANITIZE_NUMBER_INT); |
|
| 1391 | - $settings = array_merge($settings,array('globalMinFetch' => $minfetch)); |
|
| 1392 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
| 1393 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
| 1384 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1385 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
| 1386 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1387 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
| 1388 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
| 1389 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
| 1390 | + $minfetch = filter_input(INPUT_POST, 'minfetch', FILTER_SANITIZE_NUMBER_INT); |
|
| 1391 | + $settings = array_merge($settings, array('globalMinFetch' => $minfetch)); |
|
| 1392 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
| 1393 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
| 1394 | 1394 | |
| 1395 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
| 1396 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
| 1395 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
| 1396 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
| 1397 | 1397 | |
| 1398 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1399 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
| 1398 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1399 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
| 1400 | 1400 | |
| 1401 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
| 1401 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
| 1402 | 1402 | if ($archiveyear == "archiveyear") { |
| 1403 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
| 1403 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
| 1404 | 1404 | } else { |
| 1405 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
| 1405 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
| 1406 | 1406 | } |
| 1407 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1408 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1409 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1410 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1407 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1408 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1409 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1410 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1411 | 1411 | |
| 1412 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
| 1413 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1414 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
| 1415 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
| 1412 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
| 1413 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1414 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
| 1415 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
| 1416 | 1416 | |
| 1417 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
| 1418 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
| 1419 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
| 1417 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
| 1418 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
| 1419 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
| 1420 | 1420 | |
| 1421 | 1421 | // Create in settings.php keys not yet configurable if not already here |
| 1422 | 1422 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1423 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1423 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
| 1424 | 1424 | |
| 1425 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
| 1425 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
| 1426 | 1426 | if ($resetyearstats == 'resetyearstats') { |
| 1427 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1427 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1428 | 1428 | } else { |
| 1429 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1429 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1430 | 1430 | } |
| 1431 | 1431 | |
| 1432 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
| 1432 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
| 1433 | 1433 | if ($archive == 'archive') { |
| 1434 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
| 1434 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
| 1435 | 1435 | } else { |
| 1436 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
| 1436 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
| 1437 | 1437 | } |
| 1438 | - $archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING); |
|
| 1438 | + $archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING); |
|
| 1439 | 1439 | if ($archiveresults == 'archiveresults') { |
| 1440 | - $settings = array_merge($settings,array('globalArchiveResults' => 'TRUE')); |
|
| 1440 | + $settings = array_merge($settings, array('globalArchiveResults' => 'TRUE')); |
|
| 1441 | 1441 | } else { |
| 1442 | - $settings = array_merge($settings,array('globalArchiveResults' => 'FALSE')); |
|
| 1442 | + $settings = array_merge($settings, array('globalArchiveResults' => 'FALSE')); |
|
| 1443 | 1443 | } |
| 1444 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
| 1444 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
| 1445 | 1445 | if ($daemon == 'daemon') { |
| 1446 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
| 1446 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
| 1447 | 1447 | } else { |
| 1448 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
| 1448 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
| 1449 | 1449 | } |
| 1450 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
| 1450 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
| 1451 | 1451 | if ($schedules == 'schedules') { |
| 1452 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
| 1452 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
| 1453 | 1453 | } else { |
| 1454 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
| 1454 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
| 1455 | 1455 | } |
| 1456 | 1456 | |
| 1457 | 1457 | /* |
@@ -1462,290 +1462,290 @@ discard block |
||
| 1462 | 1462 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
| 1463 | 1463 | } |
| 1464 | 1464 | */ |
| 1465 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
| 1466 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1467 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1468 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1469 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1465 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
| 1466 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
| 1467 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
| 1468 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
| 1469 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
| 1470 | 1470 | $va = false; |
| 1471 | 1471 | if ($globalivao == 'ivao') { |
| 1472 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
| 1472 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
| 1473 | 1473 | $va = true; |
| 1474 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1474 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
| 1475 | 1475 | if ($globalvatsim == 'vatsim') { |
| 1476 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
| 1476 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
| 1477 | 1477 | $va = true; |
| 1478 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1478 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
| 1479 | 1479 | if ($globalphpvms == 'phpvms') { |
| 1480 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
| 1480 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
| 1481 | 1481 | $va = true; |
| 1482 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1482 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
| 1483 | 1483 | if ($globalvam == 'vam') { |
| 1484 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
| 1484 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
| 1485 | 1485 | $va = true; |
| 1486 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1486 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
| 1487 | 1487 | if ($va) { |
| 1488 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
| 1489 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1488 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
| 1489 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
| 1490 | 1490 | if ($globalva == 'va' || $va) { |
| 1491 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
| 1492 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1491 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
| 1492 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1493 | 1493 | } else { |
| 1494 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1495 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1496 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1494 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
| 1495 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1496 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
| 1497 | 1497 | } |
| 1498 | 1498 | if ($globalvm == 'vm') { |
| 1499 | - $settings = array_merge($settings,array('globalVM' => 'TRUE')); |
|
| 1499 | + $settings = array_merge($settings, array('globalVM' => 'TRUE')); |
|
| 1500 | 1500 | } else { |
| 1501 | - $settings = array_merge($settings,array('globalVM' => 'FALSE')); |
|
| 1501 | + $settings = array_merge($settings, array('globalVM' => 'FALSE')); |
|
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | - $mapoffline = filter_input(INPUT_POST,'mapoffline',FILTER_SANITIZE_STRING); |
|
| 1504 | + $mapoffline = filter_input(INPUT_POST, 'mapoffline', FILTER_SANITIZE_STRING); |
|
| 1505 | 1505 | if ($mapoffline == 'mapoffline') { |
| 1506 | - $settings = array_merge($settings,array('globalMapOffline' => 'TRUE')); |
|
| 1506 | + $settings = array_merge($settings, array('globalMapOffline' => 'TRUE')); |
|
| 1507 | 1507 | } else { |
| 1508 | - $settings = array_merge($settings,array('globalMapOffline' => 'FALSE')); |
|
| 1508 | + $settings = array_merge($settings, array('globalMapOffline' => 'FALSE')); |
|
| 1509 | 1509 | } |
| 1510 | - $globaloffline = filter_input(INPUT_POST,'globaloffline',FILTER_SANITIZE_STRING); |
|
| 1510 | + $globaloffline = filter_input(INPUT_POST, 'globaloffline', FILTER_SANITIZE_STRING); |
|
| 1511 | 1511 | if ($globaloffline == 'globaloffline') { |
| 1512 | - $settings = array_merge($settings,array('globalOffline' => 'TRUE')); |
|
| 1512 | + $settings = array_merge($settings, array('globalOffline' => 'TRUE')); |
|
| 1513 | 1513 | } else { |
| 1514 | - $settings = array_merge($settings,array('globalOffline' => 'FALSE')); |
|
| 1514 | + $settings = array_merge($settings, array('globalOffline' => 'FALSE')); |
|
| 1515 | 1515 | } |
| 1516 | 1516 | |
| 1517 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
| 1517 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
| 1518 | 1518 | if ($notam == 'notam') { |
| 1519 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
| 1519 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
| 1520 | 1520 | } else { |
| 1521 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
| 1521 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
| 1522 | 1522 | } |
| 1523 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
| 1523 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
| 1524 | 1524 | if ($owner == 'owner') { |
| 1525 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
| 1525 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
| 1526 | 1526 | } else { |
| 1527 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
| 1527 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
| 1528 | 1528 | } |
| 1529 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
| 1529 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
| 1530 | 1530 | if ($map3d == 'map3d') { |
| 1531 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
| 1531 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
| 1532 | 1532 | } else { |
| 1533 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
| 1533 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
| 1534 | 1534 | } |
| 1535 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
| 1535 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
| 1536 | 1536 | if ($crash == 'crash') { |
| 1537 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
| 1537 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
| 1538 | 1538 | } else { |
| 1539 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
| 1539 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
| 1540 | 1540 | } |
| 1541 | - $fires = filter_input(INPUT_POST,'fires',FILTER_SANITIZE_STRING); |
|
| 1541 | + $fires = filter_input(INPUT_POST, 'fires', FILTER_SANITIZE_STRING); |
|
| 1542 | 1542 | if ($fires == 'fires') { |
| 1543 | - $settings = array_merge($settings,array('globalMapFires' => 'TRUE')); |
|
| 1543 | + $settings = array_merge($settings, array('globalMapFires' => 'TRUE')); |
|
| 1544 | 1544 | } else { |
| 1545 | - $settings = array_merge($settings,array('globalMapFires' => 'FALSE')); |
|
| 1545 | + $settings = array_merge($settings, array('globalMapFires' => 'FALSE')); |
|
| 1546 | 1546 | } |
| 1547 | - $firessupport = filter_input(INPUT_POST,'firessupport',FILTER_SANITIZE_STRING); |
|
| 1547 | + $firessupport = filter_input(INPUT_POST, 'firessupport', FILTER_SANITIZE_STRING); |
|
| 1548 | 1548 | if ($firessupport == 'firessupport') { |
| 1549 | - $settings = array_merge($settings,array('globalFires' => 'TRUE')); |
|
| 1549 | + $settings = array_merge($settings, array('globalFires' => 'TRUE')); |
|
| 1550 | 1550 | } else { |
| 1551 | - $settings = array_merge($settings,array('globalFires' => 'FALSE')); |
|
| 1551 | + $settings = array_merge($settings, array('globalFires' => 'FALSE')); |
|
| 1552 | 1552 | } |
| 1553 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
| 1553 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
| 1554 | 1554 | if ($mapsatellites == 'mapsatellites') { |
| 1555 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
| 1555 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
| 1556 | 1556 | } else { |
| 1557 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
| 1557 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
| 1558 | 1558 | } |
| 1559 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
| 1559 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
| 1560 | 1560 | if ($map3ddefault == 'map3ddefault') { |
| 1561 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
| 1561 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
| 1562 | 1562 | } else { |
| 1563 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
| 1563 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
| 1564 | 1564 | } |
| 1565 | - $one3dmodel = filter_input(INPUT_POST,'one3dmodel',FILTER_SANITIZE_STRING); |
|
| 1565 | + $one3dmodel = filter_input(INPUT_POST, 'one3dmodel', FILTER_SANITIZE_STRING); |
|
| 1566 | 1566 | if ($one3dmodel == 'one3dmodel') { |
| 1567 | - $settings = array_merge($settings,array('globalMap3DOneModel' => 'TRUE')); |
|
| 1567 | + $settings = array_merge($settings, array('globalMap3DOneModel' => 'TRUE')); |
|
| 1568 | 1568 | } else { |
| 1569 | - $settings = array_merge($settings,array('globalMap3DOneModel' => 'FALSE')); |
|
| 1569 | + $settings = array_merge($settings, array('globalMap3DOneModel' => 'FALSE')); |
|
| 1570 | 1570 | } |
| 1571 | - $map3dliveries = filter_input(INPUT_POST,'map3dliveries',FILTER_SANITIZE_STRING); |
|
| 1571 | + $map3dliveries = filter_input(INPUT_POST, 'map3dliveries', FILTER_SANITIZE_STRING); |
|
| 1572 | 1572 | if ($map3dliveries == 'map3dliveries') { |
| 1573 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'TRUE')); |
|
| 1573 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'TRUE')); |
|
| 1574 | 1574 | } else { |
| 1575 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'FALSE')); |
|
| 1575 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'FALSE')); |
|
| 1576 | 1576 | } |
| 1577 | - $map3dshadows = filter_input(INPUT_POST,'map3dshadows',FILTER_SANITIZE_STRING); |
|
| 1577 | + $map3dshadows = filter_input(INPUT_POST, 'map3dshadows', FILTER_SANITIZE_STRING); |
|
| 1578 | 1578 | if ($map3dshadows == 'map3dshadows') { |
| 1579 | - $settings = array_merge($settings,array('globalMap3DShadows' => 'TRUE')); |
|
| 1579 | + $settings = array_merge($settings, array('globalMap3DShadows' => 'TRUE')); |
|
| 1580 | 1580 | } else { |
| 1581 | - $settings = array_merge($settings,array('globalMap3DShadows' => 'FALSE')); |
|
| 1581 | + $settings = array_merge($settings, array('globalMap3DShadows' => 'FALSE')); |
|
| 1582 | 1582 | } |
| 1583 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
| 1583 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
| 1584 | 1584 | if ($translate == 'translate') { |
| 1585 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
| 1585 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
| 1586 | 1586 | } else { |
| 1587 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
| 1587 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
| 1588 | 1588 | } |
| 1589 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
| 1589 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
| 1590 | 1590 | if ($realairlines == 'realairlines') { |
| 1591 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
| 1591 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
| 1592 | 1592 | } else { |
| 1593 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
| 1593 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
| 1594 | 1594 | } |
| 1595 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
| 1595 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
| 1596 | 1596 | if ($estimation == 'estimation') { |
| 1597 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
| 1597 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
| 1598 | 1598 | } else { |
| 1599 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
| 1599 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
| 1600 | 1600 | } |
| 1601 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
| 1601 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
| 1602 | 1602 | if ($metar == 'metar') { |
| 1603 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
| 1603 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
| 1604 | 1604 | } else { |
| 1605 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
| 1605 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
| 1606 | 1606 | } |
| 1607 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
| 1607 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
| 1608 | 1608 | if ($metarcycle == 'metarcycle') { |
| 1609 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
| 1609 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
| 1610 | 1610 | } else { |
| 1611 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
| 1611 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
| 1612 | 1612 | } |
| 1613 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
| 1613 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
| 1614 | 1614 | if ($fork == 'fork') { |
| 1615 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
| 1615 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
| 1616 | 1616 | } else { |
| 1617 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
| 1617 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
| 1618 | 1618 | } |
| 1619 | 1619 | |
| 1620 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
| 1620 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
| 1621 | 1621 | if ($colormap == 'colormap') { |
| 1622 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1622 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1623 | 1623 | } else { |
| 1624 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1624 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1625 | 1625 | } |
| 1626 | 1626 | |
| 1627 | 1627 | if (isset($_POST['aircrafticoncolor'])) { |
| 1628 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
| 1629 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
| 1628 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
| 1629 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
| 1630 | 1630 | } |
| 1631 | 1631 | |
| 1632 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1633 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
| 1632 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1633 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
| 1634 | 1634 | |
| 1635 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
| 1636 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
| 1637 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
| 1638 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
| 1639 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
| 1640 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
| 1635 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
| 1636 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
| 1637 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
| 1638 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
| 1639 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
| 1640 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
| 1641 | 1641 | |
| 1642 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
| 1642 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
| 1643 | 1643 | if ($mappopup == 'mappopup') { |
| 1644 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
| 1644 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
| 1645 | 1645 | } else { |
| 1646 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
| 1646 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
| 1647 | 1647 | } |
| 1648 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
| 1648 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
| 1649 | 1649 | if ($airportpopup == 'airportpopup') { |
| 1650 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
| 1650 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
| 1651 | 1651 | } else { |
| 1652 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
| 1652 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
| 1653 | 1653 | } |
| 1654 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
| 1654 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
| 1655 | 1655 | if ($maphistory == 'maphistory') { |
| 1656 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
| 1656 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
| 1657 | 1657 | } else { |
| 1658 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
| 1658 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
| 1659 | 1659 | } |
| 1660 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
| 1660 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
| 1661 | 1661 | if ($maptooltip == 'maptooltip') { |
| 1662 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
| 1662 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
| 1663 | 1663 | } else { |
| 1664 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
| 1664 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
| 1665 | 1665 | } |
| 1666 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
| 1666 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
| 1667 | 1667 | if ($flightroute == 'flightroute') { |
| 1668 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
| 1668 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
| 1669 | 1669 | } else { |
| 1670 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
| 1670 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
| 1671 | 1671 | } |
| 1672 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
| 1672 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
| 1673 | 1673 | if ($flightremainingroute == 'flightremainingroute') { |
| 1674 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1674 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1675 | 1675 | } else { |
| 1676 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1676 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1677 | 1677 | } |
| 1678 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
| 1678 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
| 1679 | 1679 | if ($allflights == 'allflights') { |
| 1680 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
| 1680 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
| 1681 | 1681 | } else { |
| 1682 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
| 1682 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
| 1683 | 1683 | } |
| 1684 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
| 1684 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
| 1685 | 1685 | if ($bbox == 'bbox') { |
| 1686 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
| 1686 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
| 1687 | 1687 | } else { |
| 1688 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
| 1688 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
| 1689 | 1689 | } |
| 1690 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
| 1690 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
| 1691 | 1691 | if ($groundaltitude == 'groundaltitude') { |
| 1692 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
| 1692 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
| 1693 | 1693 | } else { |
| 1694 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
| 1694 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
| 1695 | 1695 | } |
| 1696 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
| 1696 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
| 1697 | 1697 | if ($waypoints == 'waypoints') { |
| 1698 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
| 1698 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
| 1699 | 1699 | } else { |
| 1700 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
| 1700 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
| 1701 | 1701 | } |
| 1702 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
| 1702 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
| 1703 | 1703 | if ($geoid == 'geoid') { |
| 1704 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
| 1704 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
| 1705 | 1705 | } else { |
| 1706 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
| 1706 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
| 1707 | 1707 | } |
| 1708 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
| 1709 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
| 1708 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
| 1709 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
| 1710 | 1710 | |
| 1711 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
| 1711 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
| 1712 | 1712 | if ($noairlines == 'noairlines') { |
| 1713 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
| 1713 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
| 1714 | 1714 | } else { |
| 1715 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
| 1715 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
| 1716 | 1716 | } |
| 1717 | 1717 | |
| 1718 | - $tsk = filter_input(INPUT_POST,'tsk',FILTER_SANITIZE_STRING); |
|
| 1718 | + $tsk = filter_input(INPUT_POST, 'tsk', FILTER_SANITIZE_STRING); |
|
| 1719 | 1719 | if ($tsk == 'tsk') { |
| 1720 | - $settings = array_merge($settings,array('globalTSK' => 'TRUE')); |
|
| 1720 | + $settings = array_merge($settings, array('globalTSK' => 'TRUE')); |
|
| 1721 | 1721 | } else { |
| 1722 | - $settings = array_merge($settings,array('globalTSK' => 'FALSE')); |
|
| 1722 | + $settings = array_merge($settings, array('globalTSK' => 'FALSE')); |
|
| 1723 | 1723 | } |
| 1724 | - $mapmatching = filter_input(INPUT_POST,'mapmatching',FILTER_SANITIZE_STRING); |
|
| 1724 | + $mapmatching = filter_input(INPUT_POST, 'mapmatching', FILTER_SANITIZE_STRING); |
|
| 1725 | 1725 | if ($mapmatching == 'mapmatching') { |
| 1726 | - $settings = array_merge($settings,array('globalMapMatching' => 'TRUE')); |
|
| 1726 | + $settings = array_merge($settings, array('globalMapMatching' => 'TRUE')); |
|
| 1727 | 1727 | } else { |
| 1728 | - $settings = array_merge($settings,array('globalMapMatching' => 'FALSE')); |
|
| 1728 | + $settings = array_merge($settings, array('globalMapMatching' => 'FALSE')); |
|
| 1729 | 1729 | } |
| 1730 | - $mapmatchingsource = filter_input(INPUT_POST,'mapmatchingsource',FILTER_SANITIZE_STRING); |
|
| 1731 | - $settings = array_merge($settings,array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1732 | - $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
|
| 1733 | - $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
|
| 1730 | + $mapmatchingsource = filter_input(INPUT_POST, 'mapmatchingsource', FILTER_SANITIZE_STRING); |
|
| 1731 | + $settings = array_merge($settings, array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1732 | + $graphhopper = filter_input(INPUT_POST, 'graphhopper', FILTER_SANITIZE_STRING); |
|
| 1733 | + $settings = array_merge($settings, array('globalGraphHopperKey' => $graphhopper)); |
|
| 1734 | 1734 | |
| 1735 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1735 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
| 1736 | 1736 | |
| 1737 | 1737 | // Set some defaults values... |
| 1738 | 1738 | if (!isset($globalAircraftImageSources)) { |
| 1739 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1740 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1739 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
| 1740 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1741 | 1741 | } |
| 1742 | 1742 | |
| 1743 | 1743 | if (!isset($globalSchedulesSources)) { |
| 1744 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1745 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1744 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
| 1745 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1746 | 1746 | } |
| 1747 | 1747 | |
| 1748 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
| 1748 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
| 1749 | 1749 | |
| 1750 | 1750 | if ($error == '') settings::modify_settings($settings); |
| 1751 | 1751 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -4,11 +4,19 @@ discard block |
||
| 4 | 4 | if (isset($_SESSION['error'])) { |
| 5 | 5 | header('Content-Encoding: none;'); |
| 6 | 6 | echo 'Error : '.$_SESSION['error'].' - Resetting install... You need to fix the problem and run install again.'; |
| 7 | - if (isset($_SESSION['error'])) unset($_SESSION['error']); |
|
| 8 | - if (isset($_SESSION['errorlst'])) unset($_SESSION['errorlst']); |
|
| 9 | - if (isset($_SESSION['next'])) unset($_SESSION['next']); |
|
| 10 | - if (isset($_SESSION['install'])) unset($_SESSION['install']); |
|
| 11 | -} |
|
| 7 | + if (isset($_SESSION['error'])) { |
|
| 8 | + unset($_SESSION['error']); |
|
| 9 | + } |
|
| 10 | + if (isset($_SESSION['errorlst'])) { |
|
| 11 | + unset($_SESSION['errorlst']); |
|
| 12 | + } |
|
| 13 | + if (isset($_SESSION['next'])) { |
|
| 14 | + unset($_SESSION['next']); |
|
| 15 | + } |
|
| 16 | + if (isset($_SESSION['install'])) { |
|
| 17 | + unset($_SESSION['install']); |
|
| 18 | + } |
|
| 19 | + } |
|
| 12 | 20 | /* |
| 13 | 21 | if (isset($_SESSION['errorlst'])) { |
| 14 | 22 | header('Content-Encoding: none;'); |
@@ -114,7 +122,9 @@ discard block |
||
| 114 | 122 | if (count($alllng) != count($availablelng)) { |
| 115 | 123 | $notavailable = array(); |
| 116 | 124 | foreach($alllng as $lng) { |
| 117 | - if (!isset($availablelng[$lng])) $notavailable[] = $lng; |
|
| 125 | + if (!isset($availablelng[$lng])) { |
|
| 126 | + $notavailable[] = $lng; |
|
| 127 | + } |
|
| 118 | 128 | } |
| 119 | 129 | print '<div class="alert alert-warning">The following translation can\'t be used on your system: '.implode(', ',$notavailable).'. You need to add the system locales: <a href="https://github.com/Ysurac/FlightAirMap/wiki/Translation">documentation</a>.</div>'; |
| 120 | 130 | } |
@@ -175,31 +185,49 @@ discard block |
||
| 175 | 185 | </div> |
| 176 | 186 | <p> |
| 177 | 187 | <label for="dbhost">Database hostname</label> |
| 178 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 188 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 189 | + print $globalDBhost; |
|
| 190 | +} |
|
| 191 | +?>" /> |
|
| 179 | 192 | </p> |
| 180 | 193 | <p> |
| 181 | 194 | <label for="dbport">Database port</label> |
| 182 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 195 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 196 | + print $globalDBport; |
|
| 197 | +} |
|
| 198 | +?>" /> |
|
| 183 | 199 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 184 | 200 | </p> |
| 185 | 201 | <p> |
| 186 | 202 | <label for="dbname">Database name</label> |
| 187 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 203 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 204 | + print $globalDBname; |
|
| 205 | +} |
|
| 206 | +?>" /> |
|
| 188 | 207 | </p> |
| 189 | 208 | <p> |
| 190 | 209 | <label for="dbuser">Database user</label> |
| 191 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 210 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 211 | + print $globalDBuser; |
|
| 212 | +} |
|
| 213 | +?>" /> |
|
| 192 | 214 | </p> |
| 193 | 215 | <p> |
| 194 | 216 | <label for="dbuserpass">Database user password</label> |
| 195 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 217 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 218 | + print $globalDBpass; |
|
| 219 | +} |
|
| 220 | +?>" /> |
|
| 196 | 221 | </p> |
| 197 | 222 | </fieldset> |
| 198 | 223 | <fieldset id="site"> |
| 199 | 224 | <legend>Site configuration</legend> |
| 200 | 225 | <p> |
| 201 | 226 | <label for="sitename">Site name</label> |
| 202 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 227 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 228 | + print $globalName; |
|
| 229 | +} |
|
| 230 | +?>" /> |
|
| 203 | 231 | </p> |
| 204 | 232 | <p> |
| 205 | 233 | <label for="siteurl">Site directory</label> |
@@ -212,18 +240,27 @@ discard block |
||
| 212 | 240 | } |
| 213 | 241 | } |
| 214 | 242 | ?> |
| 215 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 243 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 244 | + print $globalURL; |
|
| 245 | +} |
|
| 246 | +?>" /> |
|
| 216 | 247 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 217 | 248 | <p class="help-block">Can be empty</p> |
| 218 | 249 | </p> |
| 219 | 250 | <p> |
| 220 | 251 | <label for="timezone">Timezone</label> |
| 221 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 252 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 253 | + print $globalTimezone; |
|
| 254 | +} |
|
| 255 | +?>" /> |
|
| 222 | 256 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 223 | 257 | </p> |
| 224 | 258 | <p> |
| 225 | 259 | <label for="language">Language</label> |
| 226 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 260 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 261 | + print $globalLanguage; |
|
| 262 | +} |
|
| 263 | +?>" /> |
|
| 227 | 264 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 228 | 265 | </p> |
| 229 | 266 | </fieldset> |
@@ -243,11 +280,17 @@ discard block |
||
| 243 | 280 | <div id="mapbox_data"> |
| 244 | 281 | <p> |
| 245 | 282 | <label for="mapboxid">Mapbox id</label> |
| 246 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 283 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 284 | + print $globalMapboxId; |
|
| 285 | +} |
|
| 286 | +?>" /> |
|
| 247 | 287 | </p> |
| 248 | 288 | <p> |
| 249 | 289 | <label for="mapboxtoken">Mapbox token</label> |
| 250 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 290 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 291 | + print $globalMapboxToken; |
|
| 292 | +} |
|
| 293 | +?>" /> |
|
| 251 | 294 | </p> |
| 252 | 295 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 253 | 296 | </div> |
@@ -255,7 +298,10 @@ discard block |
||
| 255 | 298 | <div id="google_data"> |
| 256 | 299 | <p> |
| 257 | 300 | <label for="googlekey">Google API key</label> |
| 258 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 301 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 302 | + print $globalGoogleAPIKey; |
|
| 303 | +} |
|
| 304 | +?>" /> |
|
| 259 | 305 | <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> |
| 260 | 306 | </p> |
| 261 | 307 | </div> |
@@ -263,7 +309,10 @@ discard block |
||
| 263 | 309 | <div id="bing_data"> |
| 264 | 310 | <p> |
| 265 | 311 | <label for="bingkey">Bing Map key</label> |
| 266 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 312 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 313 | + print $globalBingMapKey; |
|
| 314 | +} |
|
| 315 | +?>" /> |
|
| 267 | 316 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 268 | 317 | </p> |
| 269 | 318 | </div> |
@@ -271,7 +320,10 @@ discard block |
||
| 271 | 320 | <div id="mapquest_data"> |
| 272 | 321 | <p> |
| 273 | 322 | <label for="mapquestkey">MapQuest key</label> |
| 274 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 323 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 324 | + print $globalMapQuestKey; |
|
| 325 | +} |
|
| 326 | +?>" /> |
|
| 275 | 327 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 276 | 328 | </p> |
| 277 | 329 | </div> |
@@ -279,11 +331,17 @@ discard block |
||
| 279 | 331 | <div id="here_data"> |
| 280 | 332 | <p> |
| 281 | 333 | <label for="hereappid">Here App_Id</label> |
| 282 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 334 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 335 | + print $globalHereappId; |
|
| 336 | +} |
|
| 337 | +?>" /> |
|
| 283 | 338 | </p> |
| 284 | 339 | <p> |
| 285 | 340 | <label for="hereappcode">Here App_Code</label> |
| 286 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 341 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 342 | + print $globalHereappCode; |
|
| 343 | +} |
|
| 344 | +?>" /> |
|
| 287 | 345 | </p> |
| 288 | 346 | <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> |
| 289 | 347 | </div> |
@@ -291,7 +349,10 @@ discard block |
||
| 291 | 349 | <div id="openweathermap_data"> |
| 292 | 350 | <p> |
| 293 | 351 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 294 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 352 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 353 | + print $globalOpenWeatherMapKey; |
|
| 354 | +} |
|
| 355 | +?>" /> |
|
| 295 | 356 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 296 | 357 | </p> |
| 297 | 358 | </div> |
@@ -320,42 +381,86 @@ discard block |
||
| 320 | 381 | <legend>Coverage area</legend> |
| 321 | 382 | <p> |
| 322 | 383 | <label for="latitudemax">The maximum latitude (north)</label> |
| 323 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 384 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 385 | + print $globalLatitudeMax; |
|
| 386 | +} |
|
| 387 | +?>" /> |
|
| 324 | 388 | </p> |
| 325 | 389 | <p> |
| 326 | 390 | <label for="latitudemin">The minimum latitude (south)</label> |
| 327 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 391 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 392 | + print $globalLatitudeMin; |
|
| 393 | +} |
|
| 394 | +?>" /> |
|
| 328 | 395 | </p> |
| 329 | 396 | <p> |
| 330 | 397 | <label for="longitudemax">The maximum longitude (west)</label> |
| 331 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 398 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 399 | + print $globalLongitudeMax; |
|
| 400 | +} |
|
| 401 | +?>" /> |
|
| 332 | 402 | </p> |
| 333 | 403 | <p> |
| 334 | 404 | <label for="longitudemin">The minimum longitude (east)</label> |
| 335 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 405 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 406 | + print $globalLongitudeMin; |
|
| 407 | +} |
|
| 408 | +?>" /> |
|
| 336 | 409 | </p> |
| 337 | 410 | <p> |
| 338 | 411 | <label for="latitudecenter">The latitude center</label> |
| 339 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 412 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 413 | + print $globalCenterLatitude; |
|
| 414 | +} |
|
| 415 | +?>" /> |
|
| 340 | 416 | </p> |
| 341 | 417 | <p> |
| 342 | 418 | <label for="longitudecenter">The longitude center</label> |
| 343 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 419 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 420 | + print $globalCenterLongitude; |
|
| 421 | +} |
|
| 422 | +?>" /> |
|
| 344 | 423 | </p> |
| 345 | 424 | <p> |
| 346 | 425 | <label for="livezoom">Default Zoom on live map</label> |
| 347 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 426 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 427 | + print $globalLiveZoom; |
|
| 428 | +} else { |
|
| 429 | + print '9'; |
|
| 430 | +} |
|
| 431 | +?>" /> |
|
| 348 | 432 | </p> |
| 349 | 433 | <p> |
| 350 | 434 | <label for="squawk_country">Country for squawk usage</label> |
| 351 | 435 | <select name="squawk_country" id="squawk_country"> |
| 352 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 353 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 354 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 355 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 356 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 357 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 358 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 436 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 437 | + print ' selected '; |
|
| 438 | +} |
|
| 439 | +?>>UK</option> |
|
| 440 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 441 | + print ' selected '; |
|
| 442 | +} |
|
| 443 | +?>>NZ</option> |
|
| 444 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 445 | + print ' selected '; |
|
| 446 | +} |
|
| 447 | +?>>US</option> |
|
| 448 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 449 | + print ' selected '; |
|
| 450 | +} |
|
| 451 | +?>>AU</option> |
|
| 452 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 453 | + print ' selected '; |
|
| 454 | +} |
|
| 455 | +?>>NL</option> |
|
| 456 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 457 | + print ' selected '; |
|
| 458 | +} |
|
| 459 | +?>>FR</option> |
|
| 460 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 461 | + print ' selected '; |
|
| 462 | +} |
|
| 463 | +?>>TR</option> |
|
| 359 | 464 | </select> |
| 360 | 465 | </p> |
| 361 | 466 | </fieldset> |
@@ -364,15 +469,24 @@ discard block |
||
| 364 | 469 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 365 | 470 | <p> |
| 366 | 471 | <label for="latitude">Center latitude</label> |
| 367 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 472 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 473 | + echo $globalDistanceIgnore['latitude']; |
|
| 474 | +} |
|
| 475 | +?>" /> |
|
| 368 | 476 | </p> |
| 369 | 477 | <p> |
| 370 | 478 | <label for="longitude">Center longitude</label> |
| 371 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 479 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 480 | + echo $globalDistanceIgnore['longitude']; |
|
| 481 | +} |
|
| 482 | +?>" /> |
|
| 372 | 483 | </p> |
| 373 | 484 | <p> |
| 374 | 485 | <label for="Distance">Distance (in km)</label> |
| 375 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 486 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 487 | + echo $globalDistanceIgnore['distance']; |
|
| 488 | +} |
|
| 489 | +?>" /> |
|
| 376 | 490 | </p> |
| 377 | 491 | </fieldset> |
| 378 | 492 | <fieldset id="sourceloc"> |
@@ -495,11 +609,17 @@ discard block |
||
| 495 | 609 | <div id="flightaware_data"> |
| 496 | 610 | <p> |
| 497 | 611 | <label for="flightawareusername">FlightAware username</label> |
| 498 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 612 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 613 | + print $globalFlightAwareUsername; |
|
| 614 | +} |
|
| 615 | +?>" /> |
|
| 499 | 616 | </p> |
| 500 | 617 | <p> |
| 501 | 618 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 502 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 619 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 620 | + print $globalFlightAwarePassword; |
|
| 621 | +} |
|
| 622 | +?>" /> |
|
| 503 | 623 | </p> |
| 504 | 624 | </div> |
| 505 | 625 | --> |
@@ -541,7 +661,10 @@ discard block |
||
| 541 | 661 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 542 | 662 | ?> |
| 543 | 663 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 544 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 664 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 665 | + print $source['port']; |
|
| 666 | +} |
|
| 667 | +?>" /></td> |
|
| 545 | 668 | <?php |
| 546 | 669 | } else { |
| 547 | 670 | $hostport = explode(':',$source['host']); |
@@ -560,37 +683,118 @@ discard block |
||
| 560 | 683 | ?> |
| 561 | 684 | <td> |
| 562 | 685 | <select name="format[]" id="format"> |
| 563 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 564 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 565 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 566 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 567 | - <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option> |
|
| 568 | - <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') print 'selected'; ?>>Planefinder client</option> |
|
| 569 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 570 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 571 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 572 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 573 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 574 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 575 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 576 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 577 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 578 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 579 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 580 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 581 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 582 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 583 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 584 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 585 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 586 | - <option value="sailaway" <?php if (isset($source['format']) && $source['format'] == 'sailaway') print 'selected'; ?>>Sailaway</option> |
|
| 686 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 687 | + print 'selected'; |
|
| 688 | +} |
|
| 689 | +?>>Auto</option> |
|
| 690 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 691 | + print 'selected'; |
|
| 692 | +} |
|
| 693 | +?>>SBS</option> |
|
| 694 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 695 | + print 'selected'; |
|
| 696 | +} |
|
| 697 | +?>>TSV</option> |
|
| 698 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 699 | + print 'selected'; |
|
| 700 | +} |
|
| 701 | +?>>Raw</option> |
|
| 702 | + <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') { |
|
| 703 | + print 'selected'; |
|
| 704 | +} |
|
| 705 | +?>>Dump1090 aircraft.json</option> |
|
| 706 | + <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') { |
|
| 707 | + print 'selected'; |
|
| 708 | +} |
|
| 709 | +?>>Planefinder client</option> |
|
| 710 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 711 | + print 'selected'; |
|
| 712 | +} |
|
| 713 | +?>>APRS</option> |
|
| 714 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 715 | + print 'selected'; |
|
| 716 | +} |
|
| 717 | +?>>Radarcape deltadb.txt</option> |
|
| 718 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 719 | + print 'selected'; |
|
| 720 | +} |
|
| 721 | +?>>Vatsim</option> |
|
| 722 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 723 | + print 'selected'; |
|
| 724 | +} |
|
| 725 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 726 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 727 | + print 'selected'; |
|
| 728 | +} |
|
| 729 | +?>>Virtual Radar Server TCP</option> |
|
| 730 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 731 | + print 'selected'; |
|
| 732 | +} |
|
| 733 | +?>>phpVMS</option> |
|
| 734 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 735 | + print 'selected'; |
|
| 736 | +} |
|
| 737 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 738 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 739 | + print 'selected'; |
|
| 740 | +} |
|
| 741 | +?>>Virtual Airlines Manager</option> |
|
| 742 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 743 | + print 'selected'; |
|
| 744 | +} |
|
| 745 | +?>>IVAO</option> |
|
| 746 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 747 | + print 'selected'; |
|
| 748 | +} |
|
| 749 | +?>>FlightGear Multiplayer</option> |
|
| 750 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 751 | + print 'selected'; |
|
| 752 | +} |
|
| 753 | +?>>FlightGear Singleplayer</option> |
|
| 754 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 755 | + print 'selected'; |
|
| 756 | +} |
|
| 757 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 758 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 759 | + print 'selected'; |
|
| 760 | +} |
|
| 761 | +?>>ACARS SBS-3 over TCP</option> |
|
| 762 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 763 | + print 'selected'; |
|
| 764 | +} |
|
| 765 | +?>>NMEA AIS over TCP</option> |
|
| 766 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 767 | + print 'selected'; |
|
| 768 | +} |
|
| 769 | +?>>AirWhere website</option> |
|
| 770 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 771 | + print 'selected'; |
|
| 772 | +} |
|
| 773 | +?>>HidnSeek Callback</option> |
|
| 774 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 775 | + print 'selected'; |
|
| 776 | +} |
|
| 777 | +?>>Blitzortung</option> |
|
| 778 | + <option value="sailaway" <?php if (isset($source['format']) && $source['format'] == 'sailaway') { |
|
| 779 | + print 'selected'; |
|
| 780 | +} |
|
| 781 | +?>>Sailaway</option> |
|
| 587 | 782 | </select> |
| 588 | 783 | </td> |
| 589 | 784 | <td> |
| 590 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 785 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 786 | + print $source['name']; |
|
| 787 | +} |
|
| 788 | +?>" /> |
|
| 591 | 789 | </td> |
| 592 | - <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> |
|
| 593 | - <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) print 'checked'; ?> /></td> |
|
| 790 | + <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']) { |
|
| 791 | + print 'checked'; |
|
| 792 | +} |
|
| 793 | +?> /></td> |
|
| 794 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 795 | + print 'checked'; |
|
| 796 | +} |
|
| 797 | +?> /></td> |
|
| 594 | 798 | <td> |
| 595 | 799 | <select name="timezones[]" id="timezones"> |
| 596 | 800 | <?php |
@@ -600,7 +804,9 @@ discard block |
||
| 600 | 804 | print '<option selected>'.$timezones.'</option>'; |
| 601 | 805 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 602 | 806 | print '<option selected>'.$timezones.'</option>'; |
| 603 | - } else print '<option>'.$timezones.'</option>'; |
|
| 807 | + } else { |
|
| 808 | + print '<option>'.$timezones.'</option>'; |
|
| 809 | + } |
|
| 604 | 810 | } |
| 605 | 811 | ?> |
| 606 | 812 | </select> |
@@ -654,7 +860,9 @@ discard block |
||
| 654 | 860 | foreach($timezonelist as $timezones){ |
| 655 | 861 | if ($timezones == 'UTC') { |
| 656 | 862 | print '<option selected>'.$timezones.'</option>'; |
| 657 | - } else print '<option>'.$timezones.'</option>'; |
|
| 863 | + } else { |
|
| 864 | + print '<option>'.$timezones.'</option>'; |
|
| 865 | + } |
|
| 658 | 866 | } |
| 659 | 867 | ?> |
| 660 | 868 | </select> |
@@ -679,11 +887,17 @@ discard block |
||
| 679 | 887 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 680 | 888 | <p> |
| 681 | 889 | <label for="acarshost">ACARS UDP host</label> |
| 682 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 890 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 891 | + print $globalACARSHost; |
|
| 892 | +} |
|
| 893 | +?>" /> |
|
| 683 | 894 | </p> |
| 684 | 895 | <p> |
| 685 | 896 | <label for="acarsport">ACARS UDP port</label> |
| 686 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 897 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 898 | + print $globalACARSPort; |
|
| 899 | +} |
|
| 900 | +?>" /> |
|
| 687 | 901 | </p> |
| 688 | 902 | </fieldset> |
| 689 | 903 | </div> |
@@ -709,17 +923,38 @@ discard block |
||
| 709 | 923 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 710 | 924 | <td> |
| 711 | 925 | <select name="newslang[]"> |
| 712 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 713 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 926 | + <option value="en"<?php if ($lng == 'en') { |
|
| 927 | + print ' selected'; |
|
| 928 | +} |
|
| 929 | +?>>English</option> |
|
| 930 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 931 | + print ' selected'; |
|
| 932 | +} |
|
| 933 | +?>>French</option> |
|
| 714 | 934 | </select> |
| 715 | 935 | </td> |
| 716 | 936 | <td> |
| 717 | 937 | <select name="newstype[]"> |
| 718 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 719 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 720 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 721 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 722 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 938 | + <option value="global"<?php if ($type == 'global') { |
|
| 939 | + print ' selected'; |
|
| 940 | +} |
|
| 941 | +?>>Global</option> |
|
| 942 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 943 | + print ' selected'; |
|
| 944 | +} |
|
| 945 | +?>>Aircraft</option> |
|
| 946 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 947 | + print ' selected'; |
|
| 948 | +} |
|
| 949 | +?>>Marine</option> |
|
| 950 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 951 | + print ' selected'; |
|
| 952 | +} |
|
| 953 | +?>>Tracker</option> |
|
| 954 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 955 | + print ' selected'; |
|
| 956 | +} |
|
| 957 | +?>>Satellite</option> |
|
| 723 | 958 | </select> |
| 724 | 959 | </td> |
| 725 | 960 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -861,13 +1096,19 @@ discard block |
||
| 861 | 1096 | <div id="schedules_options"> |
| 862 | 1097 | <p> |
| 863 | 1098 | <label for="britishairways">British Airways API Key</label> |
| 864 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1099 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1100 | + print $globalBritishAirwaysKey; |
|
| 1101 | +} |
|
| 1102 | +?>" /> |
|
| 865 | 1103 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 866 | 1104 | </p> |
| 867 | 1105 | <!-- |
| 868 | 1106 | <p> |
| 869 | 1107 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 870 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1108 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1109 | + print $globalTransaviaKey; |
|
| 1110 | +} |
|
| 1111 | +?>" /> |
|
| 871 | 1112 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 872 | 1113 | </p> |
| 873 | 1114 | --> |
@@ -876,10 +1117,16 @@ discard block |
||
| 876 | 1117 | <b>Lufthansa API Key</b> |
| 877 | 1118 | <p> |
| 878 | 1119 | <label for="lufthansakey">Key</label> |
| 879 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1120 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1121 | + print $globalLufthansaKey['key']; |
|
| 1122 | +} |
|
| 1123 | +?>" /> |
|
| 880 | 1124 | </p><p> |
| 881 | 1125 | <label for="lufthansasecret">Secret</label> |
| 882 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1126 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1127 | + print $globalLufthansaKey['secret']; |
|
| 1128 | +} |
|
| 1129 | +?>" /> |
|
| 883 | 1130 | </p> |
| 884 | 1131 | </div> |
| 885 | 1132 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -889,11 +1136,17 @@ discard block |
||
| 889 | 1136 | <b>FlightAware API Key</b> |
| 890 | 1137 | <p> |
| 891 | 1138 | <label for="flightawareusername">Username</label> |
| 892 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1139 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1140 | + print $globalFlightAwareUsername; |
|
| 1141 | +} |
|
| 1142 | +?>" /> |
|
| 893 | 1143 | </p> |
| 894 | 1144 | <p> |
| 895 | 1145 | <label for="flightawarepassword">API key</label> |
| 896 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1146 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1147 | + print $globalFlightAwarePassword; |
|
| 1148 | +} |
|
| 1149 | +?>" /> |
|
| 897 | 1150 | </p> |
| 898 | 1151 | </div> |
| 899 | 1152 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -910,10 +1163,22 @@ discard block |
||
| 910 | 1163 | <p> |
| 911 | 1164 | <label for="mapmatchingsource">Map Matching source</label> |
| 912 | 1165 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 913 | - <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>FlightAirMap Map Matching</option> |
|
| 914 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 915 | - <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') print 'selected="selected" '; ?>>OSMR</option> |
|
| 916 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1166 | + <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) { |
|
| 1167 | + print 'selected="selected" '; |
|
| 1168 | +} |
|
| 1169 | +?>>FlightAirMap Map Matching</option> |
|
| 1170 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1171 | + print 'selected="selected" '; |
|
| 1172 | +} |
|
| 1173 | +?>>GraphHopper</option> |
|
| 1174 | + <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') { |
|
| 1175 | + print 'selected="selected" '; |
|
| 1176 | +} |
|
| 1177 | +?>>OSMR</option> |
|
| 1178 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1179 | + print 'selected="selected" '; |
|
| 1180 | +} |
|
| 1181 | +?>>Mapbox</option> |
|
| 917 | 1182 | </select> |
| 918 | 1183 | <p class="help-block">Mapbox need the API Key defined in map section.</p> |
| 919 | 1184 | <p class="help-block">FlightAirMap Map Matching is free, without API key but limited to about 100 input points to keep fast results.</p> |
@@ -921,7 +1186,10 @@ discard block |
||
| 921 | 1186 | <br /> |
| 922 | 1187 | <p> |
| 923 | 1188 | <label for="graphhopper">GraphHopper API Key</label> |
| 924 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1189 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1190 | + print $globalGraphHopperKey; |
|
| 1191 | +} |
|
| 1192 | +?>" /> |
|
| 925 | 1193 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 926 | 1194 | </p> |
| 927 | 1195 | </div> |
@@ -939,7 +1207,10 @@ discard block |
||
| 939 | 1207 | </p> |
| 940 | 1208 | <p> |
| 941 | 1209 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 942 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1210 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1211 | + print $globalNOTAMSource; |
|
| 1212 | +} |
|
| 1213 | +?>" /> |
|
| 943 | 1214 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 944 | 1215 | </p> |
| 945 | 1216 | <br /> |
@@ -955,14 +1226,20 @@ discard block |
||
| 955 | 1226 | <div id="metarsrc"> |
| 956 | 1227 | <p> |
| 957 | 1228 | <label for="metarsource">URL of your METAR source</label> |
| 958 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1229 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1230 | + print $globalMETARurl; |
|
| 1231 | +} |
|
| 1232 | +?>" /> |
|
| 959 | 1233 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 960 | 1234 | </p> |
| 961 | 1235 | </div> |
| 962 | 1236 | <br /> |
| 963 | 1237 | <p> |
| 964 | 1238 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 965 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1239 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1240 | + print $globalBitlyAccessToken; |
|
| 1241 | +} |
|
| 1242 | +?>" /> |
|
| 966 | 1243 | </p> |
| 967 | 1244 | <br /> |
| 968 | 1245 | <p> |
@@ -978,11 +1255,26 @@ discard block |
||
| 978 | 1255 | <p> |
| 979 | 1256 | <label for="geoid_source">Geoid Source</label> |
| 980 | 1257 | <select name="geoid_source" id="geoid_source"> |
| 981 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 982 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 983 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 984 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 985 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1258 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1259 | + print ' selected="selected"'; |
|
| 1260 | +} |
|
| 1261 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1262 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1263 | + print ' selected="selected"'; |
|
| 1264 | +} |
|
| 1265 | +?>>EGM96 5' (19MB)</option> |
|
| 1266 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1267 | + print ' selected="selected"'; |
|
| 1268 | +} |
|
| 1269 | +?>>EGM2008 5' (19MB)</option> |
|
| 1270 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1271 | + print ' selected="selected"'; |
|
| 1272 | +} |
|
| 1273 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1274 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1275 | + print ' selected="selected"'; |
|
| 1276 | +} |
|
| 1277 | +?>>EGM2008 1' (470MB)</option> |
|
| 986 | 1278 | </select> |
| 987 | 1279 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 988 | 1280 | </p> |
@@ -1004,7 +1296,12 @@ discard block |
||
| 1004 | 1296 | </p> |
| 1005 | 1297 | <p> |
| 1006 | 1298 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 1007 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1299 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1300 | + print $globalArchiveMonths; |
|
| 1301 | +} else { |
|
| 1302 | + echo '1'; |
|
| 1303 | +} |
|
| 1304 | +?>" /> |
|
| 1008 | 1305 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 1009 | 1306 | </p> |
| 1010 | 1307 | <p> |
@@ -1014,12 +1311,22 @@ discard block |
||
| 1014 | 1311 | </p> |
| 1015 | 1312 | <p> |
| 1016 | 1313 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 1017 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1314 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1315 | + print $globalArchiveKeepMonths; |
|
| 1316 | +} else { |
|
| 1317 | + echo '1'; |
|
| 1318 | +} |
|
| 1319 | +?>" /> |
|
| 1018 | 1320 | <p class="help-block">0 to disable</p> |
| 1019 | 1321 | </p> |
| 1020 | 1322 | <p> |
| 1021 | 1323 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 1022 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1324 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1325 | + print $globalArchiveKeepTrackMonths; |
|
| 1326 | +} else { |
|
| 1327 | + echo '1'; |
|
| 1328 | +} |
|
| 1329 | +?>" /> |
|
| 1023 | 1330 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 1024 | 1331 | </p> |
| 1025 | 1332 | <br /> |
@@ -1029,7 +1336,12 @@ discard block |
||
| 1029 | 1336 | <p class="help-block">Uncheck if the script is running as cron job. You should always run it as daemon when it's possible.</p> |
| 1030 | 1337 | <div id="cronends"> |
| 1031 | 1338 | <label for="cronend">Run script for xx seconds</label> |
| 1032 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1339 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1340 | + print $globalCronEnd; |
|
| 1341 | +} else { |
|
| 1342 | + print '0'; |
|
| 1343 | +} |
|
| 1344 | +?>" /> |
|
| 1033 | 1345 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 1034 | 1346 | </div> |
| 1035 | 1347 | </p> |
@@ -1082,20 +1394,40 @@ discard block |
||
| 1082 | 1394 | <br /> |
| 1083 | 1395 | <p> |
| 1084 | 1396 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1085 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1397 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1398 | + echo $globalLiveInterval; |
|
| 1399 | +} else { |
|
| 1400 | + echo '200'; |
|
| 1401 | +} |
|
| 1402 | +?>" /> |
|
| 1086 | 1403 | </p> |
| 1087 | 1404 | <p> |
| 1088 | 1405 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1089 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1406 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1407 | + echo $globalMapRefresh; |
|
| 1408 | +} else { |
|
| 1409 | + echo '30'; |
|
| 1410 | +} |
|
| 1411 | +?>" /> |
|
| 1090 | 1412 | </p> |
| 1091 | 1413 | <p> |
| 1092 | 1414 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1093 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1415 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1416 | + echo $globalMapIdleTimeout; |
|
| 1417 | +} else { |
|
| 1418 | + echo '30'; |
|
| 1419 | +} |
|
| 1420 | +?>" /> |
|
| 1094 | 1421 | <p class="help-block">0 to disable</p> |
| 1095 | 1422 | </p> |
| 1096 | 1423 | <p> |
| 1097 | 1424 | <label for="minfetch">HTTP/file source fetch every xxx seconds</label> |
| 1098 | - <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" /> |
|
| 1425 | + <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) { |
|
| 1426 | + echo $globalMinFetch; |
|
| 1427 | +} else { |
|
| 1428 | + echo '20'; |
|
| 1429 | +} |
|
| 1430 | +?>" /> |
|
| 1099 | 1431 | </p> |
| 1100 | 1432 | <p> |
| 1101 | 1433 | <label for="bbox">Only display flights that we can see on screen (bounding box)</label> |
@@ -1109,12 +1441,20 @@ discard block |
||
| 1109 | 1441 | <br /> |
| 1110 | 1442 | <p> |
| 1111 | 1443 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1112 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1444 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1445 | + echo $globalClosestMinDist; |
|
| 1446 | +} else { |
|
| 1447 | + echo '50'; |
|
| 1448 | +} |
|
| 1449 | +?>" /> |
|
| 1113 | 1450 | </p> |
| 1114 | 1451 | <br /> |
| 1115 | 1452 | <p> |
| 1116 | 1453 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1117 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1454 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1455 | + echo $globalAircraftSize; |
|
| 1456 | +} |
|
| 1457 | +?>" /> |
|
| 1118 | 1458 | </p> |
| 1119 | 1459 | <br /> |
| 1120 | 1460 | <p> |
@@ -1133,7 +1473,12 @@ discard block |
||
| 1133 | 1473 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 1134 | 1474 | ?> |
| 1135 | 1475 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1136 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1476 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1477 | + echo $globalAircraftIconColor; |
|
| 1478 | +} else { |
|
| 1479 | + echo '1a3151'; |
|
| 1480 | +} |
|
| 1481 | +?>" /> |
|
| 1137 | 1482 | <?php |
| 1138 | 1483 | if (!is_writable('../cache')) { |
| 1139 | 1484 | ?> |
@@ -1151,14 +1496,27 @@ discard block |
||
| 1151 | 1496 | <p> |
| 1152 | 1497 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1153 | 1498 | <div class="range"> |
| 1154 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1155 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1499 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1500 | + echo $globalAirportZoom; |
|
| 1501 | +} else { |
|
| 1502 | + echo '7'; |
|
| 1503 | +} |
|
| 1504 | +?>" /> |
|
| 1505 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1506 | + echo $globalAirportZoom; |
|
| 1507 | +} else { |
|
| 1508 | + echo '7'; |
|
| 1509 | +} |
|
| 1510 | +?></output> |
|
| 1156 | 1511 | </div> |
| 1157 | 1512 | </p> |
| 1158 | 1513 | <br /> |
| 1159 | 1514 | <p> |
| 1160 | 1515 | <label for="customcss">Custom CSS web path</label> |
| 1161 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1516 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1517 | + echo $globalCustomCSS; |
|
| 1518 | +} |
|
| 1519 | +?>" /> |
|
| 1162 | 1520 | </p> |
| 1163 | 1521 | </fieldset> |
| 1164 | 1522 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1185,8 +1543,12 @@ discard block |
||
| 1185 | 1543 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1186 | 1544 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1187 | 1545 | |
| 1188 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1189 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1546 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1547 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1548 | + } |
|
| 1549 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1550 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1551 | + } |
|
| 1190 | 1552 | |
| 1191 | 1553 | $_SESSION['database_root'] = $dbroot; |
| 1192 | 1554 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1254,15 +1616,23 @@ discard block |
||
| 1254 | 1616 | $source_city = $_POST['source_city']; |
| 1255 | 1617 | $source_country = $_POST['source_country']; |
| 1256 | 1618 | $source_ref = $_POST['source_ref']; |
| 1257 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1258 | - else $source_id = array(); |
|
| 1619 | + if (isset($source_id)) { |
|
| 1620 | + $source_id = $_POST['source_id']; |
|
| 1621 | + } else { |
|
| 1622 | + $source_id = array(); |
|
| 1623 | + } |
|
| 1259 | 1624 | |
| 1260 | 1625 | $sources = array(); |
| 1261 | 1626 | foreach ($source_name as $keys => $name) { |
| 1262 | - 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]); |
|
| 1263 | - 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]); |
|
| 1627 | + if (isset($source_id[$keys])) { |
|
| 1628 | + $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]); |
|
| 1629 | + } else { |
|
| 1630 | + $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]); |
|
| 1631 | + } |
|
| 1632 | + } |
|
| 1633 | + if (count($sources) > 0) { |
|
| 1634 | + $_SESSION['sources'] = $sources; |
|
| 1264 | 1635 | } |
| 1265 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1266 | 1636 | |
| 1267 | 1637 | $newsurl = $_POST['newsurl']; |
| 1268 | 1638 | $newslng = $_POST['newslang']; |
@@ -1275,7 +1645,9 @@ discard block |
||
| 1275 | 1645 | $lng = $newslng[$newskey]; |
| 1276 | 1646 | if (isset($newsfeeds[$type][$lng])) { |
| 1277 | 1647 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1278 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1648 | + } else { |
|
| 1649 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1650 | + } |
|
| 1279 | 1651 | } |
| 1280 | 1652 | } |
| 1281 | 1653 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1300,17 +1672,29 @@ discard block |
||
| 1300 | 1672 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1301 | 1673 | |
| 1302 | 1674 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1303 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1304 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1675 | + if ($globalaircraft == 'aircraft') { |
|
| 1676 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1677 | + } else { |
|
| 1678 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1679 | + } |
|
| 1305 | 1680 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1306 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1307 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1681 | + if ($globaltracker == 'tracker') { |
|
| 1682 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1683 | + } else { |
|
| 1684 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1685 | + } |
|
| 1308 | 1686 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1309 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1310 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1687 | + if ($globalmarine == 'marine') { |
|
| 1688 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1689 | + } else { |
|
| 1690 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1691 | + } |
|
| 1311 | 1692 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1312 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1313 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1693 | + if ($globalsatellite == 'satellite') { |
|
| 1694 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1695 | + } else { |
|
| 1696 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1697 | + } |
|
| 1314 | 1698 | |
| 1315 | 1699 | /* |
| 1316 | 1700 | $globalSBS1Hosts = array(); |
@@ -1332,23 +1716,37 @@ discard block |
||
| 1332 | 1716 | $name = $_POST['name']; |
| 1333 | 1717 | $format = $_POST['format']; |
| 1334 | 1718 | $timezones = $_POST['timezones']; |
| 1335 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1336 | - else $sourcestats = array(); |
|
| 1337 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1338 | - else $noarchive = array(); |
|
| 1719 | + if (isset($_POST['sourcestats'])) { |
|
| 1720 | + $sourcestats = $_POST['sourcestats']; |
|
| 1721 | + } else { |
|
| 1722 | + $sourcestats = array(); |
|
| 1723 | + } |
|
| 1724 | + if (isset($_POST['noarchive'])) { |
|
| 1725 | + $noarchive = $_POST['noarchive']; |
|
| 1726 | + } else { |
|
| 1727 | + $noarchive = array(); |
|
| 1728 | + } |
|
| 1339 | 1729 | $gSources = array(); |
| 1340 | 1730 | $forcepilots = false; |
| 1341 | 1731 | foreach ($host as $key => $h) { |
| 1342 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1343 | - else $cov = 'FALSE'; |
|
| 1344 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1345 | - else $arch = 'FALSE'; |
|
| 1732 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1733 | + $cov = 'TRUE'; |
|
| 1734 | + } else { |
|
| 1735 | + $cov = 'FALSE'; |
|
| 1736 | + } |
|
| 1737 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1738 | + $arch = 'TRUE'; |
|
| 1739 | + } else { |
|
| 1740 | + $arch = 'FALSE'; |
|
| 1741 | + } |
|
| 1346 | 1742 | if (strpos($format[$key],'_callback')) { |
| 1347 | 1743 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1348 | 1744 | } elseif ($format[$key] != 'auto' || ($h != '' || $name[$key] != '')) { |
| 1349 | 1745 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1350 | 1746 | } |
| 1351 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1747 | + if ($format[$key] == 'airwhere') { |
|
| 1748 | + $forcepilots = true; |
|
| 1749 | + } |
|
| 1352 | 1750 | } |
| 1353 | 1751 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1354 | 1752 | |
@@ -1379,7 +1777,9 @@ discard block |
||
| 1379 | 1777 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1380 | 1778 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1381 | 1779 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1382 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1780 | + } else { |
|
| 1781 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1782 | + } |
|
| 1383 | 1783 | |
| 1384 | 1784 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1385 | 1785 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1420,7 +1820,9 @@ discard block |
||
| 1420 | 1820 | |
| 1421 | 1821 | // Create in settings.php keys not yet configurable if not already here |
| 1422 | 1822 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1423 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1823 | + if (!isset($globalDebug)) { |
|
| 1824 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1825 | + } |
|
| 1424 | 1826 | |
| 1425 | 1827 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1426 | 1828 | if ($resetyearstats == 'resetyearstats') { |
@@ -1463,37 +1865,56 @@ discard block |
||
| 1463 | 1865 | } |
| 1464 | 1866 | */ |
| 1465 | 1867 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1466 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1467 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1468 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1469 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1868 | + if ($globalsbs == 'sbs') { |
|
| 1869 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1870 | + } else { |
|
| 1871 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1872 | + } |
|
| 1873 | + if ($globalaprs == 'aprs') { |
|
| 1874 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1875 | + } else { |
|
| 1876 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1877 | + } |
|
| 1470 | 1878 | $va = false; |
| 1471 | 1879 | if ($globalivao == 'ivao') { |
| 1472 | 1880 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1473 | 1881 | $va = true; |
| 1474 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1882 | + } else { |
|
| 1883 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1884 | + } |
|
| 1475 | 1885 | if ($globalvatsim == 'vatsim') { |
| 1476 | 1886 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1477 | 1887 | $va = true; |
| 1478 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1888 | + } else { |
|
| 1889 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1890 | + } |
|
| 1479 | 1891 | if ($globalphpvms == 'phpvms') { |
| 1480 | 1892 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1481 | 1893 | $va = true; |
| 1482 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1894 | + } else { |
|
| 1895 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1896 | + } |
|
| 1483 | 1897 | if ($globalvam == 'vam') { |
| 1484 | 1898 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1485 | 1899 | $va = true; |
| 1486 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1900 | + } else { |
|
| 1901 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1902 | + } |
|
| 1487 | 1903 | if ($va) { |
| 1488 | 1904 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1489 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1905 | + } else { |
|
| 1906 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1907 | + } |
|
| 1490 | 1908 | if ($globalva == 'va' || $va) { |
| 1491 | 1909 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1492 | 1910 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1493 | 1911 | } else { |
| 1494 | 1912 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1495 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1496 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1913 | + if ($forcepilots) { |
|
| 1914 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1915 | + } else { |
|
| 1916 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1917 | + } |
|
| 1497 | 1918 | } |
| 1498 | 1919 | if ($globalvm == 'vm') { |
| 1499 | 1920 | $settings = array_merge($settings,array('globalVM' => 'TRUE')); |
@@ -1732,7 +2153,9 @@ discard block |
||
| 1732 | 2153 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1733 | 2154 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1734 | 2155 | |
| 1735 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2156 | + if (!isset($globalTransaction)) { |
|
| 2157 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2158 | + } |
|
| 1736 | 2159 | |
| 1737 | 2160 | // Set some defaults values... |
| 1738 | 2161 | if (!isset($globalAircraftImageSources)) { |
@@ -1747,15 +2170,23 @@ discard block |
||
| 1747 | 2170 | |
| 1748 | 2171 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1749 | 2172 | |
| 1750 | - if ($error == '') settings::modify_settings($settings); |
|
| 1751 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2173 | + if ($error == '') { |
|
| 2174 | + settings::modify_settings($settings); |
|
| 2175 | + } |
|
| 2176 | + if ($error == '') { |
|
| 2177 | + settings::comment_settings($settings_comment); |
|
| 2178 | + } |
|
| 1752 | 2179 | if ($error != '') { |
| 1753 | 2180 | print '<div class="info column">'.$error.'</div>'; |
| 1754 | 2181 | require('../footer.php'); |
| 1755 | 2182 | exit; |
| 1756 | 2183 | } else { |
| 1757 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1758 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2184 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2185 | + $_SESSION['waypoints'] = 1; |
|
| 2186 | + } |
|
| 2187 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2188 | + $_SESSION['owner'] = 1; |
|
| 2189 | + } |
|
| 1759 | 2190 | if (isset($_POST['createdb'])) { |
| 1760 | 2191 | $_SESSION['install'] = 'database_create'; |
| 1761 | 2192 | } else { |
@@ -1792,10 +2223,18 @@ discard block |
||
| 1792 | 2223 | $popw = false; |
| 1793 | 2224 | foreach ($_SESSION['done'] as $done) { |
| 1794 | 2225 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1795 | - if ($done == 'Create database') $pop = true; |
|
| 1796 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1797 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1798 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2226 | + if ($done == 'Create database') { |
|
| 2227 | + $pop = true; |
|
| 2228 | + } |
|
| 2229 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2230 | + $pop = true; |
|
| 2231 | + } |
|
| 2232 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2233 | + $popi = true; |
|
| 2234 | + } |
|
| 2235 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2236 | + $popw = true; |
|
| 2237 | + } |
|
| 1799 | 2238 | } |
| 1800 | 2239 | if ($pop) { |
| 1801 | 2240 | sleep(5); |
@@ -1806,7 +2245,9 @@ discard block |
||
| 1806 | 2245 | } else if ($popw) { |
| 1807 | 2246 | sleep(5); |
| 1808 | 2247 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1809 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2248 | + } else { |
|
| 2249 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2250 | + } |
|
| 1810 | 2251 | print '</div></ul>'; |
| 1811 | 2252 | print '<div id="error"></div>'; |
| 1812 | 2253 | /* foreach ($_SESSION['done'] as $done) { |