@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | require_once(dirname(__FILE__).'/class.create_db.php'); |
| 11 | 11 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
| 12 | 12 | require_once(dirname(__FILE__).'/class.settings.php'); |
| 13 | -$title="Install"; |
|
| 13 | +$title = "Install"; |
|
| 14 | 14 | require(dirname(__FILE__).'/../require/settings.php'); |
| 15 | 15 | require(dirname(__FILE__).'/header.php'); |
| 16 | 16 | |
@@ -69,8 +69,8 @@ discard block |
||
| 69 | 69 | if (!extension_loaded('curl')) { |
| 70 | 70 | $error[] = "Curl is not loaded."; |
| 71 | 71 | } |
| 72 | -if(function_exists('apache_get_modules') ){ |
|
| 73 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
| 72 | +if (function_exists('apache_get_modules')) { |
|
| 73 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
| 74 | 74 | $error[] = "mod_rewrite is not available."; |
| 75 | 75 | } |
| 76 | 76 | /* |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | print '<div class="info column"><p><strong>If you use MySQL or MariaDB, check that <i>max_allowed_packet</i> >= 8M, else import of some table can fail.</strong></p></div>'; |
| 87 | 87 | if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) { |
| 88 | 88 | if (function_exists('get_headers')) { |
| 89 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/','search',str_replace('index.php',$_SERVER["REQUEST_URI"]))); |
|
| 90 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
| 89 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/', 'search', str_replace('index.php', $_SERVER["REQUEST_URI"]))); |
|
| 90 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
| 91 | 91 | print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work.</strong></p></div>'; |
| 92 | 92 | } |
| 93 | 93 | } |
@@ -441,13 +441,13 @@ discard block |
||
| 441 | 441 | ?> |
| 442 | 442 | <tr> |
| 443 | 443 | <?php |
| 444 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 444 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
| 445 | 445 | ?> |
| 446 | 446 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 447 | 447 | <td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td> |
| 448 | 448 | <?php |
| 449 | 449 | } else { |
| 450 | - $hostport = explode(':',$source['host']); |
|
| 450 | + $hostport = explode(':', $source['host']); |
|
| 451 | 451 | if (isset($hostport[1])) { |
| 452 | 452 | $host = $hostport[0]; |
| 453 | 453 | $port = $hostport[1]; |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | <br /> |
| 792 | 792 | <p> |
| 793 | 793 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 794 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 794 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
| 795 | 795 | </p> |
| 796 | 796 | <br /> |
| 797 | 797 | <p> |
@@ -842,14 +842,14 @@ discard block |
||
| 842 | 842 | $error = ''; |
| 843 | 843 | |
| 844 | 844 | if (isset($_POST['dbtype'])) { |
| 845 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
| 846 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
| 847 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
| 848 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
| 849 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
| 850 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
| 851 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
| 852 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
| 845 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
| 846 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
| 847 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
| 848 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
| 849 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
| 850 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
| 851 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
| 852 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
| 853 | 853 | |
| 854 | 854 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
| 855 | 855 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -869,48 +869,48 @@ discard block |
||
| 869 | 869 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
| 870 | 870 | */ |
| 871 | 871 | |
| 872 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 872 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 873 | 873 | |
| 874 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
| 875 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
| 876 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
| 877 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
| 878 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
| 874 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
| 875 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
| 876 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
| 877 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
| 878 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
| 879 | 879 | |
| 880 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
| 881 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
| 882 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
| 883 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
| 884 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
| 885 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
| 886 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
| 887 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
| 888 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey)); |
|
| 880 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
| 881 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
| 882 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
| 883 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
| 884 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
| 885 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
| 886 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
| 887 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
| 888 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey)); |
|
| 889 | 889 | |
| 890 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
| 891 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
| 892 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
| 893 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
| 894 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 895 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
| 890 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
| 891 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
| 892 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
| 893 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
| 894 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 895 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
| 896 | 896 | |
| 897 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
| 898 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
| 897 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
| 898 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
| 899 | 899 | |
| 900 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
| 901 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
| 902 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
| 900 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
| 901 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
| 902 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
| 903 | 903 | |
| 904 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
| 904 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
| 905 | 905 | if ($acars == 'acars') { |
| 906 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
| 906 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
| 907 | 907 | } else { |
| 908 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
| 908 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
| 909 | 909 | } |
| 910 | 910 | |
| 911 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
| 912 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
| 913 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 911 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
| 912 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
| 913 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 914 | 914 | |
| 915 | 915 | $source_name = $_POST['source_name']; |
| 916 | 916 | $source_latitude = $_POST['source_latitude']; |
@@ -924,8 +924,8 @@ discard block |
||
| 924 | 924 | |
| 925 | 925 | $sources = array(); |
| 926 | 926 | foreach ($source_name as $keys => $name) { |
| 927 | - 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]); |
|
| 928 | - 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]); |
|
| 927 | + 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]); |
|
| 928 | + 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]); |
|
| 929 | 929 | } |
| 930 | 930 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 931 | 931 | |
@@ -938,24 +938,24 @@ discard block |
||
| 938 | 938 | $sbsurl = $_POST['sbsurl']; |
| 939 | 939 | */ |
| 940 | 940 | |
| 941 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
| 942 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
| 943 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
| 944 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
| 945 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
| 946 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
| 947 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
| 948 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
| 941 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
| 942 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
| 943 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
| 944 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
| 945 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
| 946 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
| 947 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
| 948 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
| 949 | 949 | |
| 950 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
| 951 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 952 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 953 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
| 954 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 955 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 956 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
| 957 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 958 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 950 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
| 951 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
| 952 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
| 953 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
| 954 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
| 955 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
| 956 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
| 957 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
| 958 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
| 959 | 959 | |
| 960 | 960 | /* |
| 961 | 961 | $globalSBS1Hosts = array(); |
@@ -971,7 +971,7 @@ discard block |
||
| 971 | 971 | } |
| 972 | 972 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
| 973 | 973 | */ |
| 974 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
| 974 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
| 975 | 975 | $host = $_POST['host']; |
| 976 | 976 | $port = $_POST['port']; |
| 977 | 977 | $name = $_POST['name']; |
@@ -986,96 +986,96 @@ discard block |
||
| 986 | 986 | else $cov = 'FALSE'; |
| 987 | 987 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
| 988 | 988 | else $arch = 'FALSE'; |
| 989 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch); |
|
| 989 | + if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch); |
|
| 990 | 990 | } |
| 991 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
| 991 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
| 992 | 992 | |
| 993 | 993 | /* |
| 994 | 994 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
| 995 | 995 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
| 996 | 996 | */ |
| 997 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
| 998 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
| 999 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
| 997 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
| 998 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
| 999 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
| 1000 | 1000 | |
| 1001 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
| 1002 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
| 1001 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
| 1002 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
| 1003 | 1003 | |
| 1004 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
| 1005 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
| 1006 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
| 1007 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
| 1004 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
| 1005 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
| 1006 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
| 1007 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
| 1008 | 1008 | |
| 1009 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
| 1010 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
| 1011 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
| 1009 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
| 1010 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
| 1011 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
| 1012 | 1012 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1013 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
| 1014 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1013 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
| 1014 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
| 1015 | 1015 | |
| 1016 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1017 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
| 1018 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1019 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
| 1020 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
| 1021 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
| 1022 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
| 1023 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
| 1016 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1017 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
| 1018 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1019 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
| 1020 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
| 1021 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
| 1022 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
| 1023 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
| 1024 | 1024 | |
| 1025 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
| 1026 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
| 1025 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
| 1026 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
| 1027 | 1027 | |
| 1028 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1029 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
| 1028 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1029 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
| 1030 | 1030 | |
| 1031 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
| 1031 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
| 1032 | 1032 | if ($archiveyear == "archiveyear") { |
| 1033 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
| 1033 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
| 1034 | 1034 | } else { |
| 1035 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
| 1035 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
| 1036 | 1036 | } |
| 1037 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1038 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1039 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1040 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1037 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1038 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1039 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1040 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1041 | 1041 | |
| 1042 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
| 1043 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1044 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
| 1045 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
| 1042 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
| 1043 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1044 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
| 1045 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
| 1046 | 1046 | |
| 1047 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
| 1048 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
| 1049 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
| 1047 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
| 1048 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
| 1049 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
| 1050 | 1050 | |
| 1051 | 1051 | // Create in settings.php keys not yet configurable if not already here |
| 1052 | 1052 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1053 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1053 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
| 1054 | 1054 | |
| 1055 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
| 1055 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
| 1056 | 1056 | if ($resetyearstats == 'resetyearstats') { |
| 1057 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1057 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1058 | 1058 | } else { |
| 1059 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1059 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
| 1062 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
| 1063 | 1063 | if ($archive == 'archive') { |
| 1064 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
| 1064 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
| 1065 | 1065 | } else { |
| 1066 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
| 1066 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
| 1067 | 1067 | } |
| 1068 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
| 1068 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
| 1069 | 1069 | if ($daemon == 'daemon') { |
| 1070 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
| 1070 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
| 1071 | 1071 | } else { |
| 1072 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
| 1072 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
| 1073 | 1073 | } |
| 1074 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
| 1074 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
| 1075 | 1075 | if ($schedules == 'schedules') { |
| 1076 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
| 1076 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
| 1077 | 1077 | } else { |
| 1078 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
| 1078 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
| 1079 | 1079 | } |
| 1080 | 1080 | |
| 1081 | 1081 | /* |
@@ -1086,195 +1086,195 @@ discard block |
||
| 1086 | 1086 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
| 1087 | 1087 | } |
| 1088 | 1088 | */ |
| 1089 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
| 1090 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1091 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1092 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1093 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1089 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
| 1090 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
| 1091 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
| 1092 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
| 1093 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
| 1094 | 1094 | $va = false; |
| 1095 | 1095 | if ($globalivao == 'ivao') { |
| 1096 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
| 1096 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
| 1097 | 1097 | $va = true; |
| 1098 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1098 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
| 1099 | 1099 | if ($globalvatsim == 'vatsim') { |
| 1100 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
| 1100 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
| 1101 | 1101 | $va = true; |
| 1102 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1102 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
| 1103 | 1103 | if ($globalphpvms == 'phpvms') { |
| 1104 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
| 1104 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
| 1105 | 1105 | $va = true; |
| 1106 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1106 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
| 1107 | 1107 | if ($globalvam == 'vam') { |
| 1108 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
| 1108 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
| 1109 | 1109 | $va = true; |
| 1110 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1110 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
| 1111 | 1111 | if ($va) { |
| 1112 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
| 1113 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1112 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
| 1113 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
| 1114 | 1114 | if ($globalva == 'va' || $va) { |
| 1115 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
| 1116 | - } else $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1115 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
| 1116 | + } else $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
| 1117 | 1117 | |
| 1118 | 1118 | |
| 1119 | 1119 | |
| 1120 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
| 1120 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
| 1121 | 1121 | if ($notam == 'notam') { |
| 1122 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
| 1122 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
| 1123 | 1123 | } else { |
| 1124 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
| 1124 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
| 1125 | 1125 | } |
| 1126 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
| 1126 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
| 1127 | 1127 | if ($owner == 'owner') { |
| 1128 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
| 1128 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
| 1129 | 1129 | } else { |
| 1130 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
| 1130 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
| 1131 | 1131 | } |
| 1132 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
| 1132 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
| 1133 | 1133 | if ($map3d == 'map3d') { |
| 1134 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
| 1134 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
| 1135 | 1135 | } else { |
| 1136 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
| 1136 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
| 1137 | 1137 | } |
| 1138 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
| 1138 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
| 1139 | 1139 | if ($crash == 'crash') { |
| 1140 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
| 1140 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
| 1141 | 1141 | } else { |
| 1142 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
| 1142 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
| 1143 | 1143 | } |
| 1144 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
| 1144 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
| 1145 | 1145 | if ($mapsatellites == 'mapsatellites') { |
| 1146 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
| 1146 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
| 1147 | 1147 | } else { |
| 1148 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
| 1148 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
| 1149 | 1149 | } |
| 1150 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
| 1150 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
| 1151 | 1151 | if ($map3ddefault == 'map3ddefault') { |
| 1152 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
| 1152 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
| 1153 | 1153 | } else { |
| 1154 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
| 1154 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
| 1155 | 1155 | } |
| 1156 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
| 1156 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
| 1157 | 1157 | if ($translate == 'translate') { |
| 1158 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
| 1158 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
| 1159 | 1159 | } else { |
| 1160 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
| 1160 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
| 1161 | 1161 | } |
| 1162 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
| 1162 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
| 1163 | 1163 | if ($realairlines == 'realairlines') { |
| 1164 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
| 1164 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
| 1165 | 1165 | } else { |
| 1166 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
| 1166 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
| 1167 | 1167 | } |
| 1168 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
| 1168 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
| 1169 | 1169 | if ($estimation == 'estimation') { |
| 1170 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
| 1170 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
| 1171 | 1171 | } else { |
| 1172 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
| 1172 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
| 1173 | 1173 | } |
| 1174 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
| 1174 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
| 1175 | 1175 | if ($metar == 'metar') { |
| 1176 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
| 1176 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
| 1177 | 1177 | } else { |
| 1178 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
| 1178 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
| 1179 | 1179 | } |
| 1180 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
| 1180 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
| 1181 | 1181 | if ($metarcycle == 'metarcycle') { |
| 1182 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
| 1182 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
| 1183 | 1183 | } else { |
| 1184 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
| 1184 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
| 1185 | 1185 | } |
| 1186 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
| 1186 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
| 1187 | 1187 | if ($fork == 'fork') { |
| 1188 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
| 1188 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
| 1189 | 1189 | } else { |
| 1190 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
| 1190 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
| 1191 | 1191 | } |
| 1192 | 1192 | |
| 1193 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
| 1193 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
| 1194 | 1194 | if ($colormap == 'colormap') { |
| 1195 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1195 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1196 | 1196 | } else { |
| 1197 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1197 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1198 | 1198 | } |
| 1199 | 1199 | |
| 1200 | 1200 | if (isset($_POST['aircrafticoncolor'])) { |
| 1201 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
| 1202 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
| 1201 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
| 1202 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
| 1203 | 1203 | } |
| 1204 | 1204 | |
| 1205 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1206 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
| 1205 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1206 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
| 1207 | 1207 | |
| 1208 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
| 1209 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
| 1210 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
| 1211 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
| 1212 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
| 1213 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
| 1208 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
| 1209 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
| 1210 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
| 1211 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
| 1212 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
| 1213 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
| 1214 | 1214 | |
| 1215 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
| 1215 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
| 1216 | 1216 | if ($mappopup == 'mappopup') { |
| 1217 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
| 1217 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
| 1218 | 1218 | } else { |
| 1219 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
| 1219 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
| 1220 | 1220 | } |
| 1221 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
| 1221 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
| 1222 | 1222 | if ($airportpopup == 'airportpopup') { |
| 1223 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
| 1223 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
| 1224 | 1224 | } else { |
| 1225 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
| 1225 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
| 1226 | 1226 | } |
| 1227 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
| 1227 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
| 1228 | 1228 | if ($maphistory == 'maphistory') { |
| 1229 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
| 1229 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
| 1230 | 1230 | } else { |
| 1231 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
| 1231 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
| 1232 | 1232 | } |
| 1233 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
| 1233 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
| 1234 | 1234 | if ($flightroute == 'flightroute') { |
| 1235 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
| 1235 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
| 1236 | 1236 | } else { |
| 1237 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
| 1237 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
| 1238 | 1238 | } |
| 1239 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
| 1239 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
| 1240 | 1240 | if ($allflights == 'allflights') { |
| 1241 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
| 1241 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
| 1242 | 1242 | } else { |
| 1243 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
| 1243 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
| 1244 | 1244 | } |
| 1245 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
| 1245 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
| 1246 | 1246 | if ($bbox == 'bbox') { |
| 1247 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
| 1247 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
| 1248 | 1248 | } else { |
| 1249 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
| 1249 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
| 1250 | 1250 | } |
| 1251 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
| 1251 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
| 1252 | 1252 | if ($waypoints == 'waypoints') { |
| 1253 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
| 1253 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
| 1254 | 1254 | } else { |
| 1255 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
| 1255 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
| 1256 | 1256 | } |
| 1257 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
| 1257 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
| 1258 | 1258 | if ($noairlines == 'noairlines') { |
| 1259 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
| 1259 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
| 1260 | 1260 | } else { |
| 1261 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
| 1261 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
| 1262 | 1262 | } |
| 1263 | 1263 | |
| 1264 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1264 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
| 1265 | 1265 | |
| 1266 | 1266 | // Set some defaults values... |
| 1267 | 1267 | if (!isset($globalAircraftImageSources)) { |
| 1268 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1269 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1268 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
| 1269 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1270 | 1270 | } |
| 1271 | 1271 | |
| 1272 | 1272 | if (!isset($globalSchedulesSources)) { |
| 1273 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1274 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1273 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
| 1274 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1275 | 1275 | } |
| 1276 | 1276 | |
| 1277 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
| 1277 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
| 1278 | 1278 | |
| 1279 | 1279 | if ($error == '') settings::modify_settings($settings); |
| 1280 | 1280 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -131,45 +131,72 @@ discard block |
||
| 131 | 131 | </div> |
| 132 | 132 | <p> |
| 133 | 133 | <label for="dbhost">Database hostname</label> |
| 134 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 134 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 135 | + print $globalDBhost; |
|
| 136 | +} |
|
| 137 | +?>" /> |
|
| 135 | 138 | </p> |
| 136 | 139 | <p> |
| 137 | 140 | <label for="dbport">Database port</label> |
| 138 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 141 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 142 | + print $globalDBport; |
|
| 143 | +} |
|
| 144 | +?>" /> |
|
| 139 | 145 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 140 | 146 | </p> |
| 141 | 147 | <p> |
| 142 | 148 | <label for="dbname">Database name</label> |
| 143 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 149 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 150 | + print $globalDBname; |
|
| 151 | +} |
|
| 152 | +?>" /> |
|
| 144 | 153 | </p> |
| 145 | 154 | <p> |
| 146 | 155 | <label for="dbuser">Database user</label> |
| 147 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 156 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 157 | + print $globalDBuser; |
|
| 158 | +} |
|
| 159 | +?>" /> |
|
| 148 | 160 | </p> |
| 149 | 161 | <p> |
| 150 | 162 | <label for="dbuserpass">Database user password</label> |
| 151 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 163 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 164 | + print $globalDBpass; |
|
| 165 | +} |
|
| 166 | +?>" /> |
|
| 152 | 167 | </p> |
| 153 | 168 | </fieldset> |
| 154 | 169 | <fieldset id="site"> |
| 155 | 170 | <legend>Site configuration</legend> |
| 156 | 171 | <p> |
| 157 | 172 | <label for="sitename">Site name</label> |
| 158 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 173 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 174 | + print $globalName; |
|
| 175 | +} |
|
| 176 | +?>" /> |
|
| 159 | 177 | </p> |
| 160 | 178 | <p> |
| 161 | 179 | <label for="siteurl">Site directory</label> |
| 162 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 180 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 181 | + print $globalURL; |
|
| 182 | +} |
|
| 183 | +?>" /> |
|
| 163 | 184 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 164 | 185 | </p> |
| 165 | 186 | <p> |
| 166 | 187 | <label for="timezone">Timezone</label> |
| 167 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 188 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 189 | + print $globalTimezone; |
|
| 190 | +} |
|
| 191 | +?>" /> |
|
| 168 | 192 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 169 | 193 | </p> |
| 170 | 194 | <p> |
| 171 | 195 | <label for="language">Language</label> |
| 172 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 196 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 197 | + print $globalLanguage; |
|
| 198 | +} |
|
| 199 | +?>" /> |
|
| 173 | 200 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 174 | 201 | </p> |
| 175 | 202 | </fieldset> |
@@ -190,11 +217,17 @@ discard block |
||
| 190 | 217 | <div id="mapbox_data"> |
| 191 | 218 | <p> |
| 192 | 219 | <label for="mapboxid">Mapbox id</label> |
| 193 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 220 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 221 | + print $globalMapboxId; |
|
| 222 | +} |
|
| 223 | +?>" /> |
|
| 194 | 224 | </p> |
| 195 | 225 | <p> |
| 196 | 226 | <label for="mapboxtoken">Mapbox token</label> |
| 197 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 227 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 228 | + print $globalMapboxToken; |
|
| 229 | +} |
|
| 230 | +?>" /> |
|
| 198 | 231 | </p> |
| 199 | 232 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 200 | 233 | </div> |
@@ -202,7 +235,10 @@ discard block |
||
| 202 | 235 | <div id="google_data"> |
| 203 | 236 | <p> |
| 204 | 237 | <label for="googlekey">Google API key</label> |
| 205 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 238 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 239 | + print $globalGoogleAPIKey; |
|
| 240 | +} |
|
| 241 | +?>" /> |
|
| 206 | 242 | <p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p> |
| 207 | 243 | </p> |
| 208 | 244 | </div> |
@@ -210,7 +246,10 @@ discard block |
||
| 210 | 246 | <div id="bing_data"> |
| 211 | 247 | <p> |
| 212 | 248 | <label for="bingkey">Bing Map key</label> |
| 213 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 249 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 250 | + print $globalBingMapKey; |
|
| 251 | +} |
|
| 252 | +?>" /> |
|
| 214 | 253 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 215 | 254 | </p> |
| 216 | 255 | </div> |
@@ -218,7 +257,10 @@ discard block |
||
| 218 | 257 | <div id="mapquest_data"> |
| 219 | 258 | <p> |
| 220 | 259 | <label for="mapquestkey">MapQuest key</label> |
| 221 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 260 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 261 | + print $globalMapQuestKey; |
|
| 262 | +} |
|
| 263 | +?>" /> |
|
| 222 | 264 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 223 | 265 | </p> |
| 224 | 266 | </div> |
@@ -226,11 +268,17 @@ discard block |
||
| 226 | 268 | <div id="here_data"> |
| 227 | 269 | <p> |
| 228 | 270 | <label for="hereappid">Here App_Id</label> |
| 229 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 271 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 272 | + print $globalHereappId; |
|
| 273 | +} |
|
| 274 | +?>" /> |
|
| 230 | 275 | </p> |
| 231 | 276 | <p> |
| 232 | 277 | <label for="hereappcode">Here App_Code</label> |
| 233 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 278 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 279 | + print $globalHereappCode; |
|
| 280 | +} |
|
| 281 | +?>" /> |
|
| 234 | 282 | </p> |
| 235 | 283 | <p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p> |
| 236 | 284 | </div> |
@@ -239,42 +287,86 @@ discard block |
||
| 239 | 287 | <legend>Coverage area</legend> |
| 240 | 288 | <p> |
| 241 | 289 | <label for="latitudemax">The maximum latitude (north)</label> |
| 242 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 290 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 291 | + print $globalLatitudeMax; |
|
| 292 | +} |
|
| 293 | +?>" /> |
|
| 243 | 294 | </p> |
| 244 | 295 | <p> |
| 245 | 296 | <label for="latitudemin">The minimum latitude (south)</label> |
| 246 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 297 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 298 | + print $globalLatitudeMin; |
|
| 299 | +} |
|
| 300 | +?>" /> |
|
| 247 | 301 | </p> |
| 248 | 302 | <p> |
| 249 | 303 | <label for="longitudemax">The maximum longitude (west)</label> |
| 250 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 304 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 305 | + print $globalLongitudeMax; |
|
| 306 | +} |
|
| 307 | +?>" /> |
|
| 251 | 308 | </p> |
| 252 | 309 | <p> |
| 253 | 310 | <label for="longitudemin">The minimum longitude (east)</label> |
| 254 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 311 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 312 | + print $globalLongitudeMin; |
|
| 313 | +} |
|
| 314 | +?>" /> |
|
| 255 | 315 | </p> |
| 256 | 316 | <p> |
| 257 | 317 | <label for="latitudecenter">The latitude center</label> |
| 258 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 318 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 319 | + print $globalCenterLatitude; |
|
| 320 | +} |
|
| 321 | +?>" /> |
|
| 259 | 322 | </p> |
| 260 | 323 | <p> |
| 261 | 324 | <label for="longitudecenter">The longitude center</label> |
| 262 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 325 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 326 | + print $globalCenterLongitude; |
|
| 327 | +} |
|
| 328 | +?>" /> |
|
| 263 | 329 | </p> |
| 264 | 330 | <p> |
| 265 | 331 | <label for="livezoom">Default Zoom on live map</label> |
| 266 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 332 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 333 | + print $globalLiveZoom; |
|
| 334 | +} else { |
|
| 335 | + print '9'; |
|
| 336 | +} |
|
| 337 | +?>" /> |
|
| 267 | 338 | </p> |
| 268 | 339 | <p> |
| 269 | 340 | <label for="squawk_country">Country for squawk usage</label> |
| 270 | 341 | <select name="squawk_country" id="squawk_country"> |
| 271 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 272 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 273 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 274 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 275 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 276 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 277 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 342 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 343 | + print ' selected '; |
|
| 344 | +} |
|
| 345 | +?>>UK</option> |
|
| 346 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 347 | + print ' selected '; |
|
| 348 | +} |
|
| 349 | +?>>NZ</option> |
|
| 350 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 351 | + print ' selected '; |
|
| 352 | +} |
|
| 353 | +?>>US</option> |
|
| 354 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 355 | + print ' selected '; |
|
| 356 | +} |
|
| 357 | +?>>AU</option> |
|
| 358 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 359 | + print ' selected '; |
|
| 360 | +} |
|
| 361 | +?>>NL</option> |
|
| 362 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 363 | + print ' selected '; |
|
| 364 | +} |
|
| 365 | +?>>FR</option> |
|
| 366 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 367 | + print ' selected '; |
|
| 368 | +} |
|
| 369 | +?>>TR</option> |
|
| 278 | 370 | </select> |
| 279 | 371 | </p> |
| 280 | 372 | </fieldset> |
@@ -283,15 +375,24 @@ discard block |
||
| 283 | 375 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 284 | 376 | <p> |
| 285 | 377 | <label for="latitude">Center latitude</label> |
| 286 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 378 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 379 | + echo $globalDistanceIgnore['latitude']; |
|
| 380 | +} |
|
| 381 | +?>" /> |
|
| 287 | 382 | </p> |
| 288 | 383 | <p> |
| 289 | 384 | <label for="longitude">Center longitude</label> |
| 290 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 385 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 386 | + echo $globalDistanceIgnore['longitude']; |
|
| 387 | +} |
|
| 388 | +?>" /> |
|
| 291 | 389 | </p> |
| 292 | 390 | <p> |
| 293 | 391 | <label for="Distance">Distance (in km)</label> |
| 294 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 392 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 393 | + echo $globalDistanceIgnore['distance']; |
|
| 394 | +} |
|
| 395 | +?>" /> |
|
| 295 | 396 | </p> |
| 296 | 397 | </fieldset> |
| 297 | 398 | <fieldset id="sourceloc"> |
@@ -399,11 +500,17 @@ discard block |
||
| 399 | 500 | <div id="flightaware_data"> |
| 400 | 501 | <p> |
| 401 | 502 | <label for="flightawareusername">FlightAware username</label> |
| 402 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 503 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 504 | + print $globalFlightAwareUsername; |
|
| 505 | +} |
|
| 506 | +?>" /> |
|
| 403 | 507 | </p> |
| 404 | 508 | <p> |
| 405 | 509 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 406 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 510 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 511 | + print $globalFlightAwarePassword; |
|
| 512 | +} |
|
| 513 | +?>" /> |
|
| 407 | 514 | </p> |
| 408 | 515 | </div> |
| 409 | 516 | --> |
@@ -463,28 +570,88 @@ discard block |
||
| 463 | 570 | ?> |
| 464 | 571 | <td> |
| 465 | 572 | <select name="format[]" id="format"> |
| 466 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 467 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 468 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 469 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 470 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 471 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 472 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 473 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 474 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 475 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 476 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 477 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 478 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 479 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 480 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 481 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 482 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 573 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 574 | + print 'selected'; |
|
| 575 | +} |
|
| 576 | +?>>Auto</option> |
|
| 577 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 578 | + print 'selected'; |
|
| 579 | +} |
|
| 580 | +?>>SBS</option> |
|
| 581 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 582 | + print 'selected'; |
|
| 583 | +} |
|
| 584 | +?>>TSV</option> |
|
| 585 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 586 | + print 'selected'; |
|
| 587 | +} |
|
| 588 | +?>>Raw</option> |
|
| 589 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 590 | + print 'selected'; |
|
| 591 | +} |
|
| 592 | +?>>APRS</option> |
|
| 593 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 594 | + print 'selected'; |
|
| 595 | +} |
|
| 596 | +?>>Radarcape deltadb.txt</option> |
|
| 597 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 598 | + print 'selected'; |
|
| 599 | +} |
|
| 600 | +?>>Vatsim</option> |
|
| 601 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 602 | + print 'selected'; |
|
| 603 | +} |
|
| 604 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 605 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 606 | + print 'selected'; |
|
| 607 | +} |
|
| 608 | +?>>Virtual Radar Server TCP</option> |
|
| 609 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 610 | + print 'selected'; |
|
| 611 | +} |
|
| 612 | +?>>phpVMS</option> |
|
| 613 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 614 | + print 'selected'; |
|
| 615 | +} |
|
| 616 | +?>>Virtual Airlines Manager</option> |
|
| 617 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 618 | + print 'selected'; |
|
| 619 | +} |
|
| 620 | +?>>IVAO</option> |
|
| 621 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 622 | + print 'selected'; |
|
| 623 | +} |
|
| 624 | +?>>FlightGear Multiplayer</option> |
|
| 625 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 626 | + print 'selected'; |
|
| 627 | +} |
|
| 628 | +?>>FlightGear Singleplayer</option> |
|
| 629 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 630 | + print 'selected'; |
|
| 631 | +} |
|
| 632 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 633 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 634 | + print 'selected'; |
|
| 635 | +} |
|
| 636 | +?>>ACARS SBS-3 over TCP</option> |
|
| 637 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 638 | + print 'selected'; |
|
| 639 | +} |
|
| 640 | +?>>NMEA AIS over TCP</option> |
|
| 483 | 641 | </select> |
| 484 | 642 | </td> |
| 485 | - <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td> |
|
| 486 | - <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> |
|
| 487 | - <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> |
|
| 643 | + <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 644 | + print $source['name']; |
|
| 645 | +} |
|
| 646 | +?>" /></td> |
|
| 647 | + <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']) { |
|
| 648 | + print 'checked'; |
|
| 649 | +} |
|
| 650 | +?> /></td> |
|
| 651 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 652 | + print 'checked'; |
|
| 653 | +} |
|
| 654 | +?> /></td> |
|
| 488 | 655 | <td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td> |
| 489 | 656 | </tr> |
| 490 | 657 | <?php |
@@ -533,11 +700,17 @@ discard block |
||
| 533 | 700 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 534 | 701 | <p> |
| 535 | 702 | <label for="acarshost">ACARS UDP host</label> |
| 536 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 703 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 704 | + print $globalACARSHost; |
|
| 705 | +} |
|
| 706 | +?>" /> |
|
| 537 | 707 | </p> |
| 538 | 708 | <p> |
| 539 | 709 | <label for="acarsport">ACARS UDP port</label> |
| 540 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 710 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 711 | + print $globalACARSPort; |
|
| 712 | +} |
|
| 713 | +?>" /> |
|
| 541 | 714 | </p> |
| 542 | 715 | </fieldset> |
| 543 | 716 | </div> |
@@ -617,13 +790,19 @@ discard block |
||
| 617 | 790 | <div id="schedules_options"> |
| 618 | 791 | <p> |
| 619 | 792 | <label for="britishairways">British Airways API Key</label> |
| 620 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 793 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 794 | + print $globalBritishAirwaysKey; |
|
| 795 | +} |
|
| 796 | +?>" /> |
|
| 621 | 797 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 622 | 798 | </p> |
| 623 | 799 | <!-- |
| 624 | 800 | <p> |
| 625 | 801 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 626 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 802 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 803 | + print $globalTransaviaKey; |
|
| 804 | +} |
|
| 805 | +?>" /> |
|
| 627 | 806 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 628 | 807 | </p> |
| 629 | 808 | --> |
@@ -632,10 +811,16 @@ discard block |
||
| 632 | 811 | <b>Lufthansa API Key</b> |
| 633 | 812 | <p> |
| 634 | 813 | <label for="lufthansakey">Key</label> |
| 635 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 814 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 815 | + print $globalLufthansaKey['key']; |
|
| 816 | +} |
|
| 817 | +?>" /> |
|
| 636 | 818 | </p><p> |
| 637 | 819 | <label for="lufthansasecret">Secret</label> |
| 638 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 820 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 821 | + print $globalLufthansaKey['secret']; |
|
| 822 | +} |
|
| 823 | +?>" /> |
|
| 639 | 824 | </p> |
| 640 | 825 | </div> |
| 641 | 826 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -655,7 +840,10 @@ discard block |
||
| 655 | 840 | </p> |
| 656 | 841 | <p> |
| 657 | 842 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 658 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 843 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 844 | + print $globalNOTAMSource; |
|
| 845 | +} |
|
| 846 | +?>" /> |
|
| 659 | 847 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 660 | 848 | </p> |
| 661 | 849 | <br /> |
@@ -671,14 +859,20 @@ discard block |
||
| 671 | 859 | <div id="metarsrc"> |
| 672 | 860 | <p> |
| 673 | 861 | <label for="metarsource">URL of your METAR source</label> |
| 674 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 862 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 863 | + print $globalMETARurl; |
|
| 864 | +} |
|
| 865 | +?>" /> |
|
| 675 | 866 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 676 | 867 | </p> |
| 677 | 868 | </div> |
| 678 | 869 | <br /> |
| 679 | 870 | <p> |
| 680 | 871 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 681 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 872 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 873 | + print $globalBitlyAccessToken; |
|
| 874 | +} |
|
| 875 | +?>" /> |
|
| 682 | 876 | </p> |
| 683 | 877 | <br /> |
| 684 | 878 | <p> |
@@ -698,7 +892,12 @@ discard block |
||
| 698 | 892 | </p> |
| 699 | 893 | <p> |
| 700 | 894 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 701 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
| 895 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 896 | + print $globalArchiveMonths; |
|
| 897 | +} else { |
|
| 898 | + echo '0'; |
|
| 899 | +} |
|
| 900 | +?>" /> |
|
| 702 | 901 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 703 | 902 | </p> |
| 704 | 903 | <p> |
@@ -708,12 +907,22 @@ discard block |
||
| 708 | 907 | </p> |
| 709 | 908 | <p> |
| 710 | 909 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 711 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
| 910 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 911 | + print $globalArchiveKeepMonths; |
|
| 912 | +} else { |
|
| 913 | + echo '0'; |
|
| 914 | +} |
|
| 915 | +?>" /> |
|
| 712 | 916 | <p class="help-block">0 to disable</p> |
| 713 | 917 | </p> |
| 714 | 918 | <p> |
| 715 | 919 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 716 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
| 920 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 921 | + print $globalArchiveKeepTrackMonths; |
|
| 922 | +} else { |
|
| 923 | + echo '0'; |
|
| 924 | +} |
|
| 925 | +?>" /> |
|
| 717 | 926 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 718 | 927 | </p> |
| 719 | 928 | <br /> |
@@ -723,7 +932,12 @@ discard block |
||
| 723 | 932 | <p class="help-block">Uncheck if the script is running as cron job</p> |
| 724 | 933 | <div id="cronends"> |
| 725 | 934 | <label for="cronend">Run script for xx seconds</label> |
| 726 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 935 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 936 | + print $globalCronEnd; |
|
| 937 | +} else { |
|
| 938 | + print '0'; |
|
| 939 | +} |
|
| 940 | +?>" /> |
|
| 727 | 941 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 728 | 942 | </div> |
| 729 | 943 | </p> |
@@ -768,15 +982,30 @@ discard block |
||
| 768 | 982 | <br /> |
| 769 | 983 | <p> |
| 770 | 984 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 771 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 985 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 986 | + echo $globalLiveInterval; |
|
| 987 | +} else { |
|
| 988 | + echo '200'; |
|
| 989 | +} |
|
| 990 | +?>" /> |
|
| 772 | 991 | </p> |
| 773 | 992 | <p> |
| 774 | 993 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 775 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 994 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 995 | + echo $globalMapRefresh; |
|
| 996 | +} else { |
|
| 997 | + echo '30'; |
|
| 998 | +} |
|
| 999 | +?>" /> |
|
| 776 | 1000 | </p> |
| 777 | 1001 | <p> |
| 778 | 1002 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 779 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1003 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1004 | + echo $globalMapIdleTimeout; |
|
| 1005 | +} else { |
|
| 1006 | + echo '30'; |
|
| 1007 | +} |
|
| 1008 | +?>" /> |
|
| 780 | 1009 | <p class="help-block">0 to disable</p> |
| 781 | 1010 | </p> |
| 782 | 1011 | <p> |
@@ -786,12 +1015,20 @@ discard block |
||
| 786 | 1015 | <br /> |
| 787 | 1016 | <p> |
| 788 | 1017 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 789 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1018 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1019 | + echo $globalClosestMinDist; |
|
| 1020 | +} else { |
|
| 1021 | + echo '50'; |
|
| 1022 | +} |
|
| 1023 | +?>" /> |
|
| 790 | 1024 | </p> |
| 791 | 1025 | <br /> |
| 792 | 1026 | <p> |
| 793 | 1027 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 794 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1028 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1029 | + echo $globalAircraftSize; |
|
| 1030 | +} |
|
| 1031 | +?>" /> |
|
| 795 | 1032 | </p> |
| 796 | 1033 | <br /> |
| 797 | 1034 | <p> |
@@ -804,7 +1041,12 @@ discard block |
||
| 804 | 1041 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 805 | 1042 | ?> |
| 806 | 1043 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 807 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1044 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1045 | + echo $globalAircraftIconColor; |
|
| 1046 | +} else { |
|
| 1047 | + echo '1a3151'; |
|
| 1048 | +} |
|
| 1049 | +?>" /> |
|
| 808 | 1050 | <?php |
| 809 | 1051 | if (!is_writable('../cache')) { |
| 810 | 1052 | ?> |
@@ -822,8 +1064,18 @@ discard block |
||
| 822 | 1064 | <p> |
| 823 | 1065 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 824 | 1066 | <div class="range"> |
| 825 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 826 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1067 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1068 | + echo $globalAirportZoom; |
|
| 1069 | +} else { |
|
| 1070 | + echo '7'; |
|
| 1071 | +} |
|
| 1072 | +?>" /> |
|
| 1073 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1074 | + echo $globalAirportZoom; |
|
| 1075 | +} else { |
|
| 1076 | + echo '7'; |
|
| 1077 | +} |
|
| 1078 | +?></output> |
|
| 827 | 1079 | </div> |
| 828 | 1080 | </p> |
| 829 | 1081 | </fieldset> |
@@ -851,8 +1103,12 @@ discard block |
||
| 851 | 1103 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 852 | 1104 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 853 | 1105 | |
| 854 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 855 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1106 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1107 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1108 | + } |
|
| 1109 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1110 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1111 | + } |
|
| 856 | 1112 | |
| 857 | 1113 | $_SESSION['database_root'] = $dbroot; |
| 858 | 1114 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -919,15 +1175,23 @@ discard block |
||
| 919 | 1175 | $source_city = $_POST['source_city']; |
| 920 | 1176 | $source_country = $_POST['source_country']; |
| 921 | 1177 | $source_ref = $_POST['source_ref']; |
| 922 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 923 | - else $source_id = array(); |
|
| 1178 | + if (isset($source_id)) { |
|
| 1179 | + $source_id = $_POST['source_id']; |
|
| 1180 | + } else { |
|
| 1181 | + $source_id = array(); |
|
| 1182 | + } |
|
| 924 | 1183 | |
| 925 | 1184 | $sources = array(); |
| 926 | 1185 | foreach ($source_name as $keys => $name) { |
| 927 | - 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]); |
|
| 928 | - 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]); |
|
| 1186 | + if (isset($source_id[$keys])) { |
|
| 1187 | + $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]); |
|
| 1188 | + } else { |
|
| 1189 | + $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]); |
|
| 1190 | + } |
|
| 1191 | + } |
|
| 1192 | + if (count($sources) > 0) { |
|
| 1193 | + $_SESSION['sources'] = $sources; |
|
| 929 | 1194 | } |
| 930 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 931 | 1195 | |
| 932 | 1196 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 933 | 1197 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -948,14 +1212,23 @@ discard block |
||
| 948 | 1212 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 949 | 1213 | |
| 950 | 1214 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 951 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 952 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1215 | + if ($globalaircraft == 'aircraft') { |
|
| 1216 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1217 | + } else { |
|
| 1218 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1219 | + } |
|
| 953 | 1220 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 954 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 955 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1221 | + if ($globaltracker == 'tracker') { |
|
| 1222 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1223 | + } else { |
|
| 1224 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1225 | + } |
|
| 956 | 1226 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 957 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 958 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1227 | + if ($globalmarine == 'marine') { |
|
| 1228 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1229 | + } else { |
|
| 1230 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1231 | + } |
|
| 959 | 1232 | |
| 960 | 1233 | /* |
| 961 | 1234 | $globalSBS1Hosts = array(); |
@@ -976,17 +1249,31 @@ discard block |
||
| 976 | 1249 | $port = $_POST['port']; |
| 977 | 1250 | $name = $_POST['name']; |
| 978 | 1251 | $format = $_POST['format']; |
| 979 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 980 | - else $sourcestats = array(); |
|
| 981 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 982 | - else $noarchive = array(); |
|
| 1252 | + if (isset($_POST['sourcestats'])) { |
|
| 1253 | + $sourcestats = $_POST['sourcestats']; |
|
| 1254 | + } else { |
|
| 1255 | + $sourcestats = array(); |
|
| 1256 | + } |
|
| 1257 | + if (isset($_POST['noarchive'])) { |
|
| 1258 | + $noarchive = $_POST['noarchive']; |
|
| 1259 | + } else { |
|
| 1260 | + $noarchive = array(); |
|
| 1261 | + } |
|
| 983 | 1262 | $gSources = array(); |
| 984 | 1263 | foreach ($host as $key => $h) { |
| 985 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 986 | - else $cov = 'FALSE'; |
|
| 987 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 988 | - else $arch = 'FALSE'; |
|
| 989 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch); |
|
| 1264 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1265 | + $cov = 'TRUE'; |
|
| 1266 | + } else { |
|
| 1267 | + $cov = 'FALSE'; |
|
| 1268 | + } |
|
| 1269 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1270 | + $arch = 'TRUE'; |
|
| 1271 | + } else { |
|
| 1272 | + $arch = 'FALSE'; |
|
| 1273 | + } |
|
| 1274 | + if ($h != '') { |
|
| 1275 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch); |
|
| 1276 | + } |
|
| 990 | 1277 | } |
| 991 | 1278 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 992 | 1279 | |
@@ -1011,7 +1298,9 @@ discard block |
||
| 1011 | 1298 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1012 | 1299 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1013 | 1300 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1014 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1301 | + } else { |
|
| 1302 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1303 | + } |
|
| 1015 | 1304 | |
| 1016 | 1305 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1017 | 1306 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1050,7 +1339,9 @@ discard block |
||
| 1050 | 1339 | |
| 1051 | 1340 | // Create in settings.php keys not yet configurable if not already here |
| 1052 | 1341 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1053 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1342 | + if (!isset($globalDebug)) { |
|
| 1343 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1344 | + } |
|
| 1054 | 1345 | |
| 1055 | 1346 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1056 | 1347 | if ($resetyearstats == 'resetyearstats') { |
@@ -1087,33 +1378,51 @@ discard block |
||
| 1087 | 1378 | } |
| 1088 | 1379 | */ |
| 1089 | 1380 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1090 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1091 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1092 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1093 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1381 | + if ($globalsbs == 'sbs') { |
|
| 1382 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1383 | + } else { |
|
| 1384 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1385 | + } |
|
| 1386 | + if ($globalaprs == 'aprs') { |
|
| 1387 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1388 | + } else { |
|
| 1389 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1390 | + } |
|
| 1094 | 1391 | $va = false; |
| 1095 | 1392 | if ($globalivao == 'ivao') { |
| 1096 | 1393 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1097 | 1394 | $va = true; |
| 1098 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1395 | + } else { |
|
| 1396 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1397 | + } |
|
| 1099 | 1398 | if ($globalvatsim == 'vatsim') { |
| 1100 | 1399 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1101 | 1400 | $va = true; |
| 1102 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1401 | + } else { |
|
| 1402 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1403 | + } |
|
| 1103 | 1404 | if ($globalphpvms == 'phpvms') { |
| 1104 | 1405 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1105 | 1406 | $va = true; |
| 1106 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1407 | + } else { |
|
| 1408 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1409 | + } |
|
| 1107 | 1410 | if ($globalvam == 'vam') { |
| 1108 | 1411 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1109 | 1412 | $va = true; |
| 1110 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1413 | + } else { |
|
| 1414 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1415 | + } |
|
| 1111 | 1416 | if ($va) { |
| 1112 | 1417 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1113 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1418 | + } else { |
|
| 1419 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1420 | + } |
|
| 1114 | 1421 | if ($globalva == 'va' || $va) { |
| 1115 | 1422 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1116 | - } else $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1423 | + } else { |
|
| 1424 | + $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1425 | + } |
|
| 1117 | 1426 | |
| 1118 | 1427 | |
| 1119 | 1428 | |
@@ -1261,7 +1570,9 @@ discard block |
||
| 1261 | 1570 | $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
| 1262 | 1571 | } |
| 1263 | 1572 | |
| 1264 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1573 | + if (!isset($globalTransaction)) { |
|
| 1574 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1575 | + } |
|
| 1265 | 1576 | |
| 1266 | 1577 | // Set some defaults values... |
| 1267 | 1578 | if (!isset($globalAircraftImageSources)) { |
@@ -1276,15 +1587,23 @@ discard block |
||
| 1276 | 1587 | |
| 1277 | 1588 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1278 | 1589 | |
| 1279 | - if ($error == '') settings::modify_settings($settings); |
|
| 1280 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 1590 | + if ($error == '') { |
|
| 1591 | + settings::modify_settings($settings); |
|
| 1592 | + } |
|
| 1593 | + if ($error == '') { |
|
| 1594 | + settings::comment_settings($settings_comment); |
|
| 1595 | + } |
|
| 1281 | 1596 | if ($error != '') { |
| 1282 | 1597 | print '<div class="info column">'.$error.'</div>'; |
| 1283 | 1598 | require('../footer.php'); |
| 1284 | 1599 | exit; |
| 1285 | 1600 | } else { |
| 1286 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1287 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 1601 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 1602 | + $_SESSION['waypoints'] = 1; |
|
| 1603 | + } |
|
| 1604 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 1605 | + $_SESSION['owner'] = 1; |
|
| 1606 | + } |
|
| 1288 | 1607 | if (isset($_POST['createdb'])) { |
| 1289 | 1608 | $_SESSION['install'] = 'database_create'; |
| 1290 | 1609 | } else { |
@@ -1325,10 +1644,18 @@ discard block |
||
| 1325 | 1644 | $popw = false; |
| 1326 | 1645 | foreach ($_SESSION['done'] as $done) { |
| 1327 | 1646 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1328 | - if ($done == 'Create database') $pop = true; |
|
| 1329 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1330 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1331 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1647 | + if ($done == 'Create database') { |
|
| 1648 | + $pop = true; |
|
| 1649 | + } |
|
| 1650 | + if ($_SESSION['install'] == 'database_create') { |
|
| 1651 | + $pop = true; |
|
| 1652 | + } |
|
| 1653 | + if ($_SESSION['install'] == 'database_import') { |
|
| 1654 | + $popi = true; |
|
| 1655 | + } |
|
| 1656 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 1657 | + $popw = true; |
|
| 1658 | + } |
|
| 1332 | 1659 | } |
| 1333 | 1660 | if ($pop) { |
| 1334 | 1661 | sleep(5); |
@@ -1339,7 +1666,9 @@ discard block |
||
| 1339 | 1666 | } else if ($popw) { |
| 1340 | 1667 | sleep(5); |
| 1341 | 1668 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1342 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1669 | + } else { |
|
| 1670 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1671 | + } |
|
| 1343 | 1672 | print '</div></ul>'; |
| 1344 | 1673 | print '<div id="error"></div>'; |
| 1345 | 1674 | /* foreach ($_SESSION['done'] as $done) { |