@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | require_once(dirname(__FILE__).'/class.create_db.php'); |
| 13 | 13 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
| 14 | 14 | require_once(dirname(__FILE__).'/class.settings.php'); |
| 15 | -$title="Install"; |
|
| 15 | +$title = "Install"; |
|
| 16 | 16 | require(dirname(__FILE__).'/header.php'); |
| 17 | 17 | require(dirname(__FILE__).'/../require/settings.php'); |
| 18 | 18 | |
@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | if (!extension_loaded('curl')) { |
| 67 | 67 | $error[] = "Curl is not loaded."; |
| 68 | 68 | } |
| 69 | -if(function_exists('apache_get_modules') ){ |
|
| 70 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
| 69 | +if (function_exists('apache_get_modules')) { |
|
| 70 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
| 71 | 71 | $error[] = "mod_rewrite is not available."; |
| 72 | 72 | } |
| 73 | 73 | if (!isset($_SERVER['HTACCESS'])) { |
@@ -499,13 +499,13 @@ discard block |
||
| 499 | 499 | ?> |
| 500 | 500 | <tr> |
| 501 | 501 | <?php |
| 502 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 502 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
| 503 | 503 | ?> |
| 504 | 504 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 505 | 505 | <td><input type="number" name="port[]" id="port" value="<?php print $source['port']; ?>" /></td> |
| 506 | 506 | <?php |
| 507 | 507 | } else { |
| 508 | - $hostport = explode(':',$source['host']); |
|
| 508 | + $hostport = explode(':', $source['host']); |
|
| 509 | 509 | if (isset($hostport[1])) { |
| 510 | 510 | $host = $hostport[0]; |
| 511 | 511 | $port = $hostport[1]; |
@@ -787,7 +787,7 @@ discard block |
||
| 787 | 787 | <br /> |
| 788 | 788 | <p> |
| 789 | 789 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 790 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 790 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
| 791 | 791 | </p> |
| 792 | 792 | <br /> |
| 793 | 793 | <p> |
@@ -833,69 +833,69 @@ discard block |
||
| 833 | 833 | $error = ''; |
| 834 | 834 | |
| 835 | 835 | if (isset($_POST['dbtype'])) { |
| 836 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
| 837 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
| 838 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
| 839 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
| 840 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
| 841 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
| 842 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
| 843 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
| 836 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
| 837 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
| 838 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
| 839 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
| 840 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
| 841 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
| 842 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
| 843 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
| 844 | 844 | |
| 845 | 845 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
| 846 | 846 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
| 847 | 847 | |
| 848 | 848 | if ($error == '' && isset($_POST['createdb']) && $dbname != '' && $dbuser != '' && $dbuserpass != '') { |
| 849 | 849 | if ($dbroot != '' && $dbrootpass != '') { |
| 850 | - $result = create_db::create_database($dbroot,$dbrootpass,$dbuser,$dbuserpass,$dbname,$dbtype,$dbhost); |
|
| 850 | + $result = create_db::create_database($dbroot, $dbrootpass, $dbuser, $dbuserpass, $dbname, $dbtype, $dbhost); |
|
| 851 | 851 | if ($result != '') $error .= $result; |
| 852 | 852 | } |
| 853 | 853 | if ($error == '') { |
| 854 | 854 | //$error .= create_db::import_all_db('../db/'); |
| 855 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBport' => $dbport,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 855 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBport' => $dbport, 'globalDBuser' => $dbuser, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 856 | 856 | } |
| 857 | - } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 857 | + } else $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 858 | 858 | |
| 859 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
| 860 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
| 861 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
| 862 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
| 863 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
| 859 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
| 860 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
| 861 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
| 862 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
| 863 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
| 864 | 864 | |
| 865 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
| 866 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
| 867 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
| 868 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
| 869 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
| 870 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
| 871 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
| 872 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
| 873 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey)); |
|
| 865 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
| 866 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
| 867 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
| 868 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
| 869 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
| 870 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
| 871 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
| 872 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
| 873 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey)); |
|
| 874 | 874 | |
| 875 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
| 876 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
| 877 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
| 878 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
| 879 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 880 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
| 875 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
| 876 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
| 877 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
| 878 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
| 879 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 880 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
| 881 | 881 | |
| 882 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
| 883 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
| 882 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
| 883 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
| 884 | 884 | |
| 885 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
| 886 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
| 887 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
| 885 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
| 886 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
| 887 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
| 888 | 888 | |
| 889 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
| 889 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
| 890 | 890 | if ($acars == 'acars') { |
| 891 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
| 891 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
| 892 | 892 | } else { |
| 893 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
| 893 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
| 894 | 894 | } |
| 895 | 895 | |
| 896 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
| 897 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
| 898 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 896 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
| 897 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
| 898 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 899 | 899 | |
| 900 | 900 | $source_name = $_POST['source_name']; |
| 901 | 901 | $source_latitude = $_POST['source_latitude']; |
@@ -909,8 +909,8 @@ discard block |
||
| 909 | 909 | |
| 910 | 910 | $sources = array(); |
| 911 | 911 | foreach ($source_name as $keys => $name) { |
| 912 | - 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]); |
|
| 913 | - 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]); |
|
| 912 | + 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]); |
|
| 913 | + 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]); |
|
| 914 | 914 | } |
| 915 | 915 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 916 | 916 | |
@@ -923,12 +923,12 @@ discard block |
||
| 923 | 923 | $sbsurl = $_POST['sbsurl']; |
| 924 | 924 | */ |
| 925 | 925 | |
| 926 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
| 927 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
| 928 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
| 929 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
| 930 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
| 931 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
| 926 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
| 927 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
| 928 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
| 929 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
| 930 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
| 931 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
| 932 | 932 | |
| 933 | 933 | /* |
| 934 | 934 | $globalSBS1Hosts = array(); |
@@ -944,7 +944,7 @@ discard block |
||
| 944 | 944 | } |
| 945 | 945 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
| 946 | 946 | */ |
| 947 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
| 947 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
| 948 | 948 | $host = $_POST['host']; |
| 949 | 949 | $port = $_POST['port']; |
| 950 | 950 | $name = $_POST['name']; |
@@ -954,88 +954,88 @@ discard block |
||
| 954 | 954 | foreach ($host as $key => $h) { |
| 955 | 955 | if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
| 956 | 956 | else $cov = 'FALSE'; |
| 957 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
| 957 | + if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov); |
|
| 958 | 958 | } |
| 959 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
| 959 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
| 960 | 960 | |
| 961 | - $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
|
| 962 | - $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
|
| 961 | + $sbstimeout = filter_input(INPUT_POST, 'sbstimeout', FILTER_SANITIZE_NUMBER_INT); |
|
| 962 | + $settings = array_merge($settings, array('globalSourcesTimeOut' => $sbstimeout)); |
|
| 963 | 963 | |
| 964 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
| 965 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
| 966 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
| 964 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
| 965 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
| 966 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
| 967 | 967 | |
| 968 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
| 969 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
| 968 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
| 969 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
| 970 | 970 | |
| 971 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
| 972 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
| 973 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
| 974 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
| 971 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
| 972 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
| 973 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
| 974 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
| 975 | 975 | |
| 976 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
| 977 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
| 978 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
| 976 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
| 977 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
| 978 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
| 979 | 979 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 980 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
| 981 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 980 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
| 981 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
| 982 | 982 | |
| 983 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 984 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
| 985 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 986 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
| 987 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
| 988 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
| 989 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
| 990 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
| 983 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 984 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
| 985 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 986 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
| 987 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
| 988 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
| 989 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
| 990 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
| 991 | 991 | |
| 992 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
| 993 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
| 992 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
| 993 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
| 994 | 994 | |
| 995 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 996 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
| 995 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 996 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
| 997 | 997 | |
| 998 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
| 998 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
| 999 | 999 | if ($archiveyear == "archiveyear") { |
| 1000 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
| 1000 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
| 1001 | 1001 | } else { |
| 1002 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
| 1002 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
| 1003 | 1003 | } |
| 1004 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1005 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1006 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1007 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1004 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1005 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1006 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1007 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1008 | 1008 | |
| 1009 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
| 1010 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1011 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
| 1012 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
| 1009 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
| 1010 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1011 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
| 1012 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
| 1013 | 1013 | |
| 1014 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
| 1015 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
| 1016 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
| 1014 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
| 1015 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
| 1016 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
| 1017 | 1017 | |
| 1018 | 1018 | // Create in settings.php keys not yet configurable if not already here |
| 1019 | 1019 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1020 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1020 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
| 1021 | 1021 | |
| 1022 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
| 1022 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
| 1023 | 1023 | if ($archive == 'archive') { |
| 1024 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
| 1024 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
| 1025 | 1025 | } else { |
| 1026 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
| 1026 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
| 1027 | 1027 | } |
| 1028 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
| 1028 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
| 1029 | 1029 | if ($daemon == 'daemon') { |
| 1030 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
| 1030 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
| 1031 | 1031 | } else { |
| 1032 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
| 1032 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
| 1033 | 1033 | } |
| 1034 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
| 1034 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
| 1035 | 1035 | if ($schedules == 'schedules') { |
| 1036 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
| 1036 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
| 1037 | 1037 | } else { |
| 1038 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
| 1038 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | 1041 | /* |
@@ -1046,132 +1046,132 @@ discard block |
||
| 1046 | 1046 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
| 1047 | 1047 | } |
| 1048 | 1048 | */ |
| 1049 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
| 1050 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1051 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1052 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1053 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1049 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
| 1050 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
| 1051 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
| 1052 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
| 1053 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
| 1054 | 1054 | if ($globalivao == 'ivao') { |
| 1055 | 1055 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
| 1056 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
| 1057 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1056 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
| 1057 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
| 1058 | 1058 | if ($globalvatsim == 'vatsim') { |
| 1059 | 1059 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
| 1060 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
| 1061 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1060 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
| 1061 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
| 1062 | 1062 | if ($globalphpvms == 'phpvms') { |
| 1063 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
| 1064 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1063 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
| 1064 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
| 1065 | 1065 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
| 1066 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
| 1067 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1066 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
| 1067 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
| 1068 | 1068 | |
| 1069 | 1069 | |
| 1070 | 1070 | |
| 1071 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
| 1071 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
| 1072 | 1072 | if ($notam == 'notam') { |
| 1073 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
| 1073 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
| 1074 | 1074 | } else { |
| 1075 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
| 1075 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
| 1076 | 1076 | } |
| 1077 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
| 1077 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
| 1078 | 1078 | if ($owner == 'owner') { |
| 1079 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
| 1079 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
| 1080 | 1080 | } else { |
| 1081 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
| 1081 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
| 1082 | 1082 | } |
| 1083 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
| 1083 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
| 1084 | 1084 | if ($translate == 'translate') { |
| 1085 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
| 1085 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
| 1086 | 1086 | } else { |
| 1087 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
| 1087 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
| 1088 | 1088 | } |
| 1089 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
| 1089 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
| 1090 | 1090 | if ($estimation == 'estimation') { |
| 1091 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
| 1091 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
| 1092 | 1092 | } else { |
| 1093 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
| 1093 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
| 1094 | 1094 | } |
| 1095 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
| 1095 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
| 1096 | 1096 | if ($metar == 'metar') { |
| 1097 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
| 1097 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
| 1098 | 1098 | } else { |
| 1099 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
| 1099 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
| 1100 | 1100 | } |
| 1101 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
| 1101 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
| 1102 | 1102 | if ($metarcycle == 'metarcycle') { |
| 1103 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
| 1103 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
| 1104 | 1104 | } else { |
| 1105 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
| 1105 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
| 1106 | 1106 | } |
| 1107 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
| 1107 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
| 1108 | 1108 | if ($fork == 'fork') { |
| 1109 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
| 1109 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
| 1110 | 1110 | } else { |
| 1111 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
| 1111 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
| 1114 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
| 1115 | 1115 | if ($colormap == 'colormap') { |
| 1116 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1116 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1117 | 1117 | } else { |
| 1118 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1118 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1119 | 1119 | } |
| 1120 | 1120 | |
| 1121 | 1121 | if (isset($_POST['aircrafticoncolor'])) { |
| 1122 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
| 1123 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
| 1122 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
| 1123 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1127 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
| 1126 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1127 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
| 1128 | 1128 | |
| 1129 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
| 1130 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
| 1131 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
| 1132 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
| 1133 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
| 1134 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
| 1129 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
| 1130 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
| 1131 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
| 1132 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
| 1133 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
| 1134 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
| 1135 | 1135 | |
| 1136 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
| 1136 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
| 1137 | 1137 | if ($mappopup == 'mappopup') { |
| 1138 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
| 1138 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
| 1139 | 1139 | } else { |
| 1140 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
| 1140 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
| 1141 | 1141 | } |
| 1142 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
| 1142 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
| 1143 | 1143 | if ($airportpopup == 'airportpopup') { |
| 1144 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
| 1144 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
| 1145 | 1145 | } else { |
| 1146 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
| 1146 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
| 1147 | 1147 | } |
| 1148 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
| 1148 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
| 1149 | 1149 | if ($maphistory == 'maphistory') { |
| 1150 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
| 1150 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
| 1151 | 1151 | } else { |
| 1152 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
| 1152 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
| 1153 | 1153 | } |
| 1154 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
| 1154 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
| 1155 | 1155 | if ($flightroute == 'flightroute') { |
| 1156 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
| 1156 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
| 1157 | 1157 | } else { |
| 1158 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
| 1158 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
| 1159 | 1159 | } |
| 1160 | 1160 | |
| 1161 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1161 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
| 1162 | 1162 | |
| 1163 | 1163 | // Set some defaults values... |
| 1164 | 1164 | if (!isset($globalAircraftImageSources)) { |
| 1165 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1166 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1165 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
| 1166 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1167 | 1167 | } |
| 1168 | 1168 | |
| 1169 | 1169 | if (!isset($globalSchedulesSources)) { |
| 1170 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1171 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1170 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
| 1171 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
| 1174 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
| 1175 | 1175 | |
| 1176 | 1176 | if ($error == '') settings::modify_settings($settings); |
| 1177 | 1177 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -1187,7 +1187,7 @@ discard block |
||
| 1187 | 1187 | print '<div class="info column"><ul>'; |
| 1188 | 1188 | |
| 1189 | 1189 | if (isset($_POST['createdb'])) { |
| 1190 | - $_SESSION['done'] = array('Create database','Write configuration'); |
|
| 1190 | + $_SESSION['done'] = array('Create database', 'Write configuration'); |
|
| 1191 | 1191 | print '<li>Create database....<strong>SUCCESS</strong></li>'; |
| 1192 | 1192 | } else $_SESSION['done'] = array('Write configuration'); |
| 1193 | 1193 | print '<li>Write configuration....<img src="../images/loading.gif" /></li></ul></div>'; |
@@ -117,44 +117,71 @@ discard block |
||
| 117 | 117 | </div> |
| 118 | 118 | <p> |
| 119 | 119 | <label for="dbhost">Database hostname</label> |
| 120 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 120 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 121 | + print $globalDBhost; |
|
| 122 | +} |
|
| 123 | +?>" /> |
|
| 121 | 124 | </p> |
| 122 | 125 | <p> |
| 123 | 126 | <label for="dbport">Database port</label> |
| 124 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 127 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 128 | + print $globalDBport; |
|
| 129 | +} |
|
| 130 | +?>" /> |
|
| 125 | 131 | </p> |
| 126 | 132 | <p> |
| 127 | 133 | <label for="dbname">Database name</label> |
| 128 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 134 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 135 | + print $globalDBname; |
|
| 136 | +} |
|
| 137 | +?>" /> |
|
| 129 | 138 | </p> |
| 130 | 139 | <p> |
| 131 | 140 | <label for="dbuser">Database user</label> |
| 132 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 141 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 142 | + print $globalDBuser; |
|
| 143 | +} |
|
| 144 | +?>" /> |
|
| 133 | 145 | </p> |
| 134 | 146 | <p> |
| 135 | 147 | <label for="dbuserpass">Database user password</label> |
| 136 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 148 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 149 | + print $globalDBpass; |
|
| 150 | +} |
|
| 151 | +?>" /> |
|
| 137 | 152 | </p> |
| 138 | 153 | </fieldset> |
| 139 | 154 | <fieldset> |
| 140 | 155 | <legend>Site configuration</legend> |
| 141 | 156 | <p> |
| 142 | 157 | <label for="sitename">Site name</label> |
| 143 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 158 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 159 | + print $globalName; |
|
| 160 | +} |
|
| 161 | +?>" /> |
|
| 144 | 162 | </p> |
| 145 | 163 | <p> |
| 146 | 164 | <label for="siteurl">Site directory</label> |
| 147 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 165 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 166 | + print $globalURL; |
|
| 167 | +} |
|
| 168 | +?>" /> |
|
| 148 | 169 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 149 | 170 | </p> |
| 150 | 171 | <p> |
| 151 | 172 | <label for="timezone">Timezone</label> |
| 152 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 173 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 174 | + print $globalTimezone; |
|
| 175 | +} |
|
| 176 | +?>" /> |
|
| 153 | 177 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 154 | 178 | </p> |
| 155 | 179 | <p> |
| 156 | 180 | <label for="language">Language</label> |
| 157 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 181 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 182 | + print $globalLanguage; |
|
| 183 | +} |
|
| 184 | +?>" /> |
|
| 158 | 185 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 159 | 186 | </p> |
| 160 | 187 | </fieldset> |
@@ -175,18 +202,27 @@ discard block |
||
| 175 | 202 | <div id="mapbox_data"> |
| 176 | 203 | <p> |
| 177 | 204 | <label for="mapboxid">Mapbox id</label> |
| 178 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 205 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 206 | + print $globalMapboxId; |
|
| 207 | +} |
|
| 208 | +?>" /> |
|
| 179 | 209 | </p> |
| 180 | 210 | <p> |
| 181 | 211 | <label for="mapboxtoken">Mapbox token</label> |
| 182 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 212 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 213 | + print $globalMapboxToken; |
|
| 214 | +} |
|
| 215 | +?>" /> |
|
| 183 | 216 | </p> |
| 184 | 217 | </div> |
| 185 | 218 | <br /> |
| 186 | 219 | <div id="google_data"> |
| 187 | 220 | <p> |
| 188 | 221 | <label for="googlekey">Google API key</label> |
| 189 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 222 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 223 | + print $globalGoogleAPIKey; |
|
| 224 | +} |
|
| 225 | +?>" /> |
|
| 190 | 226 | <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> |
| 191 | 227 | </p> |
| 192 | 228 | </div> |
@@ -194,7 +230,10 @@ discard block |
||
| 194 | 230 | <div id="bing_data"> |
| 195 | 231 | <p> |
| 196 | 232 | <label for="bingkey">Bing Map key</label> |
| 197 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 233 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 234 | + print $globalBingMapKey; |
|
| 235 | +} |
|
| 236 | +?>" /> |
|
| 198 | 237 | <p class="help-block">Get a key <a href="https://msdn.microsoft.com/en-us/library/ff428642.aspx">here</a></p> |
| 199 | 238 | </p> |
| 200 | 239 | </div> |
@@ -202,7 +241,10 @@ discard block |
||
| 202 | 241 | <div id="mapquest_data"> |
| 203 | 242 | <p> |
| 204 | 243 | <label for="mapquestkey">MapQuest key</label> |
| 205 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 244 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 245 | + print $globalMapQuestKey; |
|
| 246 | +} |
|
| 247 | +?>" /> |
|
| 206 | 248 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 207 | 249 | </p> |
| 208 | 250 | </div> |
@@ -210,11 +252,17 @@ discard block |
||
| 210 | 252 | <div id="here_data"> |
| 211 | 253 | <p> |
| 212 | 254 | <label for="hereappid">Here App_Id</label> |
| 213 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 255 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 256 | + print $globalHereappId; |
|
| 257 | +} |
|
| 258 | +?>" /> |
|
| 214 | 259 | </p> |
| 215 | 260 | <p> |
| 216 | 261 | <label for="hereappcode">Here App_Code</label> |
| 217 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 262 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 263 | + print $globalHereappCode; |
|
| 264 | +} |
|
| 265 | +?>" /> |
|
| 218 | 266 | </p> |
| 219 | 267 | <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> |
| 220 | 268 | </div> |
@@ -223,42 +271,86 @@ discard block |
||
| 223 | 271 | <legend>Coverage area</legend> |
| 224 | 272 | <p> |
| 225 | 273 | <label for="latitudemax">The maximum latitude (north)</label> |
| 226 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 274 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 275 | + print $globalLatitudeMax; |
|
| 276 | +} |
|
| 277 | +?>" /> |
|
| 227 | 278 | </p> |
| 228 | 279 | <p> |
| 229 | 280 | <label for="latitudemin">The minimum latitude (south)</label> |
| 230 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 281 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 282 | + print $globalLatitudeMin; |
|
| 283 | +} |
|
| 284 | +?>" /> |
|
| 231 | 285 | </p> |
| 232 | 286 | <p> |
| 233 | 287 | <label for="longitudemax">The maximum longitude (west)</label> |
| 234 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 288 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 289 | + print $globalLongitudeMax; |
|
| 290 | +} |
|
| 291 | +?>" /> |
|
| 235 | 292 | </p> |
| 236 | 293 | <p> |
| 237 | 294 | <label for="longitudemin">The minimum longitude (east)</label> |
| 238 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 295 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 296 | + print $globalLongitudeMin; |
|
| 297 | +} |
|
| 298 | +?>" /> |
|
| 239 | 299 | </p> |
| 240 | 300 | <p> |
| 241 | 301 | <label for="latitudecenter">The latitude center</label> |
| 242 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 302 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 303 | + print $globalCenterLatitude; |
|
| 304 | +} |
|
| 305 | +?>" /> |
|
| 243 | 306 | </p> |
| 244 | 307 | <p> |
| 245 | 308 | <label for="longitudecenter">The longitude center</label> |
| 246 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 309 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 310 | + print $globalCenterLongitude; |
|
| 311 | +} |
|
| 312 | +?>" /> |
|
| 247 | 313 | </p> |
| 248 | 314 | <p> |
| 249 | 315 | <label for="livezoom">Default Zoom on live map</label> |
| 250 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 316 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 317 | + print $globalLiveZoom; |
|
| 318 | +} else { |
|
| 319 | + print '9'; |
|
| 320 | +} |
|
| 321 | +?>" /> |
|
| 251 | 322 | </p> |
| 252 | 323 | <p> |
| 253 | 324 | <label for="squawk_country">Country for squawk usage</label> |
| 254 | 325 | <select name="squawk_country" id="squawk_country"> |
| 255 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 256 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 257 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 258 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 259 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 260 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 261 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 326 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 327 | + print ' selected '; |
|
| 328 | +} |
|
| 329 | +?>>UK</option> |
|
| 330 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 331 | + print ' selected '; |
|
| 332 | +} |
|
| 333 | +?>>NZ</option> |
|
| 334 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 335 | + print ' selected '; |
|
| 336 | +} |
|
| 337 | +?>>US</option> |
|
| 338 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 339 | + print ' selected '; |
|
| 340 | +} |
|
| 341 | +?>>AU</option> |
|
| 342 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 343 | + print ' selected '; |
|
| 344 | +} |
|
| 345 | +?>>NL</option> |
|
| 346 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 347 | + print ' selected '; |
|
| 348 | +} |
|
| 349 | +?>>FR</option> |
|
| 350 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 351 | + print ' selected '; |
|
| 352 | +} |
|
| 353 | +?>>TR</option> |
|
| 262 | 354 | </select> |
| 263 | 355 | </p> |
| 264 | 356 | </fieldset> |
@@ -267,15 +359,24 @@ discard block |
||
| 267 | 359 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 268 | 360 | <p> |
| 269 | 361 | <label for="latitude">Center latitude</label> |
| 270 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 362 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 363 | + echo $globalDistanceIgnore['latitude']; |
|
| 364 | +} |
|
| 365 | +?>" /> |
|
| 271 | 366 | </p> |
| 272 | 367 | <p> |
| 273 | 368 | <label for="longitude">Center longitude</label> |
| 274 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 369 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 370 | + echo $globalDistanceIgnore['longitude']; |
|
| 371 | +} |
|
| 372 | +?>" /> |
|
| 275 | 373 | </p> |
| 276 | 374 | <p> |
| 277 | 375 | <label for="Distance">Distance (in km)</label> |
| 278 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 376 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 377 | + echo $globalDistanceIgnore['distance']; |
|
| 378 | +} |
|
| 379 | +?>" /> |
|
| 279 | 380 | </p> |
| 280 | 381 | </fieldset> |
| 281 | 382 | <fieldset> |
@@ -364,11 +465,17 @@ discard block |
||
| 364 | 465 | <div id="flightaware_data"> |
| 365 | 466 | <p> |
| 366 | 467 | <label for="flightawareusername">FlightAware username</label> |
| 367 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 468 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 469 | + print $globalFlightAwareUsername; |
|
| 470 | +} |
|
| 471 | +?>" /> |
|
| 368 | 472 | </p> |
| 369 | 473 | <p> |
| 370 | 474 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 371 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 475 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 476 | + print $globalFlightAwarePassword; |
|
| 477 | +} |
|
| 478 | +?>" /> |
|
| 372 | 479 | </p> |
| 373 | 480 | </div> |
| 374 | 481 | --> |
@@ -521,20 +628,56 @@ discard block |
||
| 521 | 628 | ?> |
| 522 | 629 | <td> |
| 523 | 630 | <select name="format[]" id="format"> |
| 524 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 525 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 526 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 527 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 528 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 529 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 530 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 531 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server</option> |
|
| 532 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 533 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 631 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 632 | + print 'selected'; |
|
| 633 | +} |
|
| 634 | +?>>Auto</option> |
|
| 635 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 636 | + print 'selected'; |
|
| 637 | +} |
|
| 638 | +?>>SBS</option> |
|
| 639 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 640 | + print 'selected'; |
|
| 641 | +} |
|
| 642 | +?>>TSV</option> |
|
| 643 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 644 | + print 'selected'; |
|
| 645 | +} |
|
| 646 | +?>>Raw</option> |
|
| 647 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 648 | + print 'selected'; |
|
| 649 | +} |
|
| 650 | +?>>APRS</option> |
|
| 651 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 652 | + print 'selected'; |
|
| 653 | +} |
|
| 654 | +?>>Radarcape deltadb.txt</option> |
|
| 655 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 656 | + print 'selected'; |
|
| 657 | +} |
|
| 658 | +?>>Vatsim</option> |
|
| 659 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 660 | + print 'selected'; |
|
| 661 | +} |
|
| 662 | +?>>Virtual Radar Server</option> |
|
| 663 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 664 | + print 'selected'; |
|
| 665 | +} |
|
| 666 | +?>>phpVMS</option> |
|
| 667 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 668 | + print 'selected'; |
|
| 669 | +} |
|
| 670 | +?>>IVAO</option> |
|
| 534 | 671 | </select> |
| 535 | 672 | </td> |
| 536 | - <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td> |
|
| 537 | - <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> |
|
| 673 | + <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 674 | + print $source['name']; |
|
| 675 | +} |
|
| 676 | +?>" /></td> |
|
| 677 | + <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']) { |
|
| 678 | + print 'checked'; |
|
| 679 | +} |
|
| 680 | +?> /></td> |
|
| 538 | 681 | <td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td> |
| 539 | 682 | </tr> |
| 540 | 683 | <?php |
@@ -573,11 +716,17 @@ discard block |
||
| 573 | 716 | <p>Listen UDP server for acarsdec/acarsdeco2/...</p> |
| 574 | 717 | <p> |
| 575 | 718 | <label for="acarshost">ACARS UDP host</label> |
| 576 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 719 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 720 | + print $globalACARSHost; |
|
| 721 | +} |
|
| 722 | +?>" /> |
|
| 577 | 723 | </p> |
| 578 | 724 | <p> |
| 579 | 725 | <label for="acarsport">ACARS UDP port</label> |
| 580 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 726 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 727 | + print $globalACARSPort; |
|
| 728 | +} |
|
| 729 | +?>" /> |
|
| 581 | 730 | </p> |
| 582 | 731 | </fieldset> |
| 583 | 732 | </div> |
@@ -631,12 +780,18 @@ discard block |
||
| 631 | 780 | <div id="schedules_options"> |
| 632 | 781 | <p> |
| 633 | 782 | <label for="britishairways">British Airways API Key</label> |
| 634 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 783 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 784 | + print $globalBritishAirwaysKey; |
|
| 785 | +} |
|
| 786 | +?>" /> |
|
| 635 | 787 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 636 | 788 | </p> |
| 637 | 789 | <p> |
| 638 | 790 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 639 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 791 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 792 | + print $globalTransaviaKey; |
|
| 793 | +} |
|
| 794 | +?>" /> |
|
| 640 | 795 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 641 | 796 | </p> |
| 642 | 797 | <p> |
@@ -644,10 +799,16 @@ discard block |
||
| 644 | 799 | <b>Lufthansa API Key</b> |
| 645 | 800 | <p> |
| 646 | 801 | <label for="lufthansakey">Key</label> |
| 647 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 802 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 803 | + print $globalLufthansaKey['key']; |
|
| 804 | +} |
|
| 805 | +?>" /> |
|
| 648 | 806 | </p><p> |
| 649 | 807 | <label for="lufthansasecret">Secret</label> |
| 650 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 808 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 809 | + print $globalLufthansaKey['secret']; |
|
| 810 | +} |
|
| 811 | +?>" /> |
|
| 651 | 812 | </p> |
| 652 | 813 | </div> |
| 653 | 814 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -667,7 +828,10 @@ discard block |
||
| 667 | 828 | </p> |
| 668 | 829 | <p> |
| 669 | 830 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 670 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 831 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 832 | + print $globalNOTAMSource; |
|
| 833 | +} |
|
| 834 | +?>" /> |
|
| 671 | 835 | </p> |
| 672 | 836 | <br /> |
| 673 | 837 | <p> |
@@ -682,14 +846,20 @@ discard block |
||
| 682 | 846 | <div id="metarsrc"> |
| 683 | 847 | <p> |
| 684 | 848 | <label for="metarsource">URL of your METAR source</label> |
| 685 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 849 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 850 | + print $globalMETARurl; |
|
| 851 | +} |
|
| 852 | +?>" /> |
|
| 686 | 853 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 687 | 854 | </p> |
| 688 | 855 | </div> |
| 689 | 856 | <br /> |
| 690 | 857 | <p> |
| 691 | 858 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 692 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 859 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 860 | + print $globalBitlyAccessToken; |
|
| 861 | +} |
|
| 862 | +?>" /> |
|
| 693 | 863 | </p> |
| 694 | 864 | <br /> |
| 695 | 865 | <p> |
@@ -703,7 +873,12 @@ discard block |
||
| 703 | 873 | </p> |
| 704 | 874 | <p> |
| 705 | 875 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 706 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
| 876 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 877 | + print $globalArchiveMonths; |
|
| 878 | +} else { |
|
| 879 | + echo '0'; |
|
| 880 | +} |
|
| 881 | +?>" /> |
|
| 707 | 882 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 708 | 883 | </p> |
| 709 | 884 | <p> |
@@ -713,12 +888,22 @@ discard block |
||
| 713 | 888 | </p> |
| 714 | 889 | <p> |
| 715 | 890 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 716 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
| 891 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 892 | + print $globalArchiveKeepMonths; |
|
| 893 | +} else { |
|
| 894 | + echo '0'; |
|
| 895 | +} |
|
| 896 | +?>" /> |
|
| 717 | 897 | <p class="help-block">0 to disable</p> |
| 718 | 898 | </p> |
| 719 | 899 | <p> |
| 720 | 900 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 721 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
| 901 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 902 | + print $globalArchiveKeepTrackMonths; |
|
| 903 | +} else { |
|
| 904 | + echo '0'; |
|
| 905 | +} |
|
| 906 | +?>" /> |
|
| 722 | 907 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 723 | 908 | </p> |
| 724 | 909 | <br /> |
@@ -727,7 +912,12 @@ discard block |
||
| 727 | 912 | <input type="checkbox" name="daemon" id="daemon" value="daemon"<?php if ((isset($globalDaemon) && $globalDaemon) || !isset($globalDaemon)) { ?> checked="checked"<?php } ?> onClick="daemon_js()" /> |
| 728 | 913 | <div id="cronends"> |
| 729 | 914 | <label for="cronend">Run script for xx seconds</label> |
| 730 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 915 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 916 | + print $globalCronEnd; |
|
| 917 | +} else { |
|
| 918 | + print '0'; |
|
| 919 | +} |
|
| 920 | +?>" /> |
|
| 731 | 921 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 732 | 922 | </div> |
| 733 | 923 | <p class="help-block">Uncheck if the script is running as cron job</p> |
@@ -768,26 +958,49 @@ discard block |
||
| 768 | 958 | <br /> |
| 769 | 959 | <p> |
| 770 | 960 | <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'; ?>" /> |
|
| 961 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 962 | + echo $globalLiveInterval; |
|
| 963 | +} else { |
|
| 964 | + echo '200'; |
|
| 965 | +} |
|
| 966 | +?>" /> |
|
| 772 | 967 | </p> |
| 773 | 968 | <p> |
| 774 | 969 | <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'; ?>" /> |
|
| 970 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 971 | + echo $globalMapRefresh; |
|
| 972 | +} else { |
|
| 973 | + echo '30'; |
|
| 974 | +} |
|
| 975 | +?>" /> |
|
| 776 | 976 | </p> |
| 777 | 977 | <p> |
| 778 | 978 | <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'; ?>" /> |
|
| 979 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 980 | + echo $globalMapIdleTimeout; |
|
| 981 | +} else { |
|
| 982 | + echo '30'; |
|
| 983 | +} |
|
| 984 | +?>" /> |
|
| 780 | 985 | <p class="help-block">0 to disable</p> |
| 781 | 986 | </p> |
| 782 | 987 | <br /> |
| 783 | 988 | <p> |
| 784 | 989 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 785 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 990 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 991 | + echo $globalClosestMinDist; |
|
| 992 | +} else { |
|
| 993 | + echo '50'; |
|
| 994 | +} |
|
| 995 | +?>" /> |
|
| 786 | 996 | </p> |
| 787 | 997 | <br /> |
| 788 | 998 | <p> |
| 789 | 999 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 790 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1000 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1001 | + echo $globalAircraftSize; |
|
| 1002 | +} |
|
| 1003 | +?>" /> |
|
| 791 | 1004 | </p> |
| 792 | 1005 | <br /> |
| 793 | 1006 | <p> |
@@ -795,7 +1008,12 @@ discard block |
||
| 795 | 1008 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 796 | 1009 | ?> |
| 797 | 1010 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 798 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1011 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1012 | + echo $globalAircraftIconColor; |
|
| 1013 | +} else { |
|
| 1014 | + echo '1a3151'; |
|
| 1015 | +} |
|
| 1016 | +?>" /> |
|
| 799 | 1017 | <?php |
| 800 | 1018 | if (!is_writable('../cache')) { |
| 801 | 1019 | ?> |
@@ -813,8 +1031,18 @@ discard block |
||
| 813 | 1031 | <p> |
| 814 | 1032 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 815 | 1033 | <div class="range"> |
| 816 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 817 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1034 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1035 | + echo $globalAirportZoom; |
|
| 1036 | +} else { |
|
| 1037 | + echo '7'; |
|
| 1038 | +} |
|
| 1039 | +?>" /> |
|
| 1040 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1041 | + echo $globalAirportZoom; |
|
| 1042 | +} else { |
|
| 1043 | + echo '7'; |
|
| 1044 | +} |
|
| 1045 | +?></output> |
|
| 818 | 1046 | </div> |
| 819 | 1047 | </p> |
| 820 | 1048 | </fieldset> |
@@ -842,19 +1070,27 @@ discard block |
||
| 842 | 1070 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 843 | 1071 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 844 | 1072 | |
| 845 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 846 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1073 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1074 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1075 | + } |
|
| 1076 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1077 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1078 | + } |
|
| 847 | 1079 | |
| 848 | 1080 | if ($error == '' && isset($_POST['createdb']) && $dbname != '' && $dbuser != '' && $dbuserpass != '') { |
| 849 | 1081 | if ($dbroot != '' && $dbrootpass != '') { |
| 850 | 1082 | $result = create_db::create_database($dbroot,$dbrootpass,$dbuser,$dbuserpass,$dbname,$dbtype,$dbhost); |
| 851 | - if ($result != '') $error .= $result; |
|
| 1083 | + if ($result != '') { |
|
| 1084 | + $error .= $result; |
|
| 1085 | + } |
|
| 852 | 1086 | } |
| 853 | 1087 | if ($error == '') { |
| 854 | 1088 | //$error .= create_db::import_all_db('../db/'); |
| 855 | 1089 | $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBport' => $dbport,'globalDBuser' => $dbuser,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
| 856 | 1090 | } |
| 857 | - } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 1091 | + } else { |
|
| 1092 | + $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 1093 | + } |
|
| 858 | 1094 | |
| 859 | 1095 | $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
| 860 | 1096 | $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
@@ -904,15 +1140,23 @@ discard block |
||
| 904 | 1140 | $source_city = $_POST['source_city']; |
| 905 | 1141 | $source_country = $_POST['source_country']; |
| 906 | 1142 | $source_ref = $_POST['source_ref']; |
| 907 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 908 | - else $source_id = array(); |
|
| 1143 | + if (isset($source_id)) { |
|
| 1144 | + $source_id = $_POST['source_id']; |
|
| 1145 | + } else { |
|
| 1146 | + $source_id = array(); |
|
| 1147 | + } |
|
| 909 | 1148 | |
| 910 | 1149 | $sources = array(); |
| 911 | 1150 | foreach ($source_name as $keys => $name) { |
| 912 | - 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]); |
|
| 913 | - 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]); |
|
| 1151 | + if (isset($source_id[$keys])) { |
|
| 1152 | + $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]); |
|
| 1153 | + } else { |
|
| 1154 | + $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]); |
|
| 1155 | + } |
|
| 1156 | + } |
|
| 1157 | + if (count($sources) > 0) { |
|
| 1158 | + $_SESSION['sources'] = $sources; |
|
| 914 | 1159 | } |
| 915 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 916 | 1160 | |
| 917 | 1161 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 918 | 1162 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -952,9 +1196,14 @@ discard block |
||
| 952 | 1196 | $sourcestats = $_POST['sourcestats']; |
| 953 | 1197 | $gSources = array(); |
| 954 | 1198 | foreach ($host as $key => $h) { |
| 955 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 956 | - else $cov = 'FALSE'; |
|
| 957 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
| 1199 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1200 | + $cov = 'TRUE'; |
|
| 1201 | + } else { |
|
| 1202 | + $cov = 'FALSE'; |
|
| 1203 | + } |
|
| 1204 | + if ($h != '') { |
|
| 1205 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov); |
|
| 1206 | + } |
|
| 958 | 1207 | } |
| 959 | 1208 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 960 | 1209 | |
@@ -978,7 +1227,9 @@ discard block |
||
| 978 | 1227 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 979 | 1228 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 980 | 1229 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 981 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1230 | + } else { |
|
| 1231 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1232 | + } |
|
| 982 | 1233 | |
| 983 | 1234 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 984 | 1235 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1017,7 +1268,9 @@ discard block |
||
| 1017 | 1268 | |
| 1018 | 1269 | // Create in settings.php keys not yet configurable if not already here |
| 1019 | 1270 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1020 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1271 | + if (!isset($globalDebug)) { |
|
| 1272 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1273 | + } |
|
| 1021 | 1274 | |
| 1022 | 1275 | $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
| 1023 | 1276 | if ($archive == 'archive') { |
@@ -1047,24 +1300,38 @@ discard block |
||
| 1047 | 1300 | } |
| 1048 | 1301 | */ |
| 1049 | 1302 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1050 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1051 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1052 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1053 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1303 | + if ($globalsbs == 'sbs') { |
|
| 1304 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1305 | + } else { |
|
| 1306 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1307 | + } |
|
| 1308 | + if ($globalaprs == 'aprs') { |
|
| 1309 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1310 | + } else { |
|
| 1311 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1312 | + } |
|
| 1054 | 1313 | if ($globalivao == 'ivao') { |
| 1055 | 1314 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
| 1056 | 1315 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1057 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1316 | + } else { |
|
| 1317 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1318 | + } |
|
| 1058 | 1319 | if ($globalvatsim == 'vatsim') { |
| 1059 | 1320 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
| 1060 | 1321 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1061 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1322 | + } else { |
|
| 1323 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1324 | + } |
|
| 1062 | 1325 | if ($globalphpvms == 'phpvms') { |
| 1063 | 1326 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1064 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1327 | + } else { |
|
| 1328 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1329 | + } |
|
| 1065 | 1330 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
| 1066 | 1331 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1067 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1332 | + } else { |
|
| 1333 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1334 | + } |
|
| 1068 | 1335 | |
| 1069 | 1336 | |
| 1070 | 1337 | |
@@ -1158,7 +1425,9 @@ discard block |
||
| 1158 | 1425 | $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
| 1159 | 1426 | } |
| 1160 | 1427 | |
| 1161 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1428 | + if (!isset($globalTransaction)) { |
|
| 1429 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1430 | + } |
|
| 1162 | 1431 | |
| 1163 | 1432 | // Set some defaults values... |
| 1164 | 1433 | if (!isset($globalAircraftImageSources)) { |
@@ -1173,15 +1442,23 @@ discard block |
||
| 1173 | 1442 | |
| 1174 | 1443 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1175 | 1444 | |
| 1176 | - if ($error == '') settings::modify_settings($settings); |
|
| 1177 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 1445 | + if ($error == '') { |
|
| 1446 | + settings::modify_settings($settings); |
|
| 1447 | + } |
|
| 1448 | + if ($error == '') { |
|
| 1449 | + settings::comment_settings($settings_comment); |
|
| 1450 | + } |
|
| 1178 | 1451 | if ($error != '') { |
| 1179 | 1452 | print '<div class="info column">'.$error.'</div>'; |
| 1180 | 1453 | require('../footer.php'); |
| 1181 | 1454 | exit; |
| 1182 | 1455 | } else { |
| 1183 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1184 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 1456 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 1457 | + $_SESSION['waypoints'] = 1; |
|
| 1458 | + } |
|
| 1459 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 1460 | + $_SESSION['owner'] = 1; |
|
| 1461 | + } |
|
| 1185 | 1462 | $_SESSION['install'] = 'database_import'; |
| 1186 | 1463 | //require('../footer.php'); |
| 1187 | 1464 | print '<div class="info column"><ul>'; |
@@ -1189,7 +1466,9 @@ discard block |
||
| 1189 | 1466 | if (isset($_POST['createdb'])) { |
| 1190 | 1467 | $_SESSION['done'] = array('Create database','Write configuration'); |
| 1191 | 1468 | print '<li>Create database....<strong>SUCCESS</strong></li>'; |
| 1192 | - } else $_SESSION['done'] = array('Write configuration'); |
|
| 1469 | + } else { |
|
| 1470 | + $_SESSION['done'] = array('Write configuration'); |
|
| 1471 | + } |
|
| 1193 | 1472 | print '<li>Write configuration....<img src="../images/loading.gif" /></li></ul></div>'; |
| 1194 | 1473 | # flush(); |
| 1195 | 1474 | # @ob_flush(); |
@@ -1204,12 +1483,16 @@ discard block |
||
| 1204 | 1483 | $pop = false; |
| 1205 | 1484 | foreach ($_SESSION['done'] as $done) { |
| 1206 | 1485 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1207 | - if ($done == 'Create database') $pop = true; |
|
| 1486 | + if ($done == 'Create database') { |
|
| 1487 | + $pop = true; |
|
| 1488 | + } |
|
| 1208 | 1489 | } |
| 1209 | 1490 | if ($pop) { |
| 1210 | 1491 | sleep(5); |
| 1211 | 1492 | print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
| 1212 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1493 | + } else { |
|
| 1494 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1495 | + } |
|
| 1213 | 1496 | print '</div></ul>'; |
| 1214 | 1497 | print '<div id="error"></div>'; |
| 1215 | 1498 | /* foreach ($_SESSION['done'] as $done) { |