@@ -317,18 +317,18 @@ discard block |
||
317 | 317 | </tr> |
318 | 318 | <!-- |
319 | 319 | <?php |
320 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
321 | - $Connection = new Connection(); |
|
320 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
321 | + $Connection = new Connection(); |
|
322 | 322 | ?> |
323 | 323 | --> |
324 | 324 | <?php |
325 | - if ($Connection->db != NULL) { |
|
325 | + if ($Connection->db != NULL) { |
|
326 | 326 | if ($Connection->tableExists('source_location')) { |
327 | - require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
328 | - $Source = new Source(); |
|
329 | - //$alllocations = $Source->getAllLocationInfo(); |
|
330 | - $alllocations = $Source->getLocationInfobyType(''); |
|
331 | - foreach ($alllocations as $location) { |
|
327 | + require_once(dirname(__FILE__).'/../require/class.Source.php'); |
|
328 | + $Source = new Source(); |
|
329 | + //$alllocations = $Source->getAllLocationInfo(); |
|
330 | + $alllocations = $Source->getLocationInfobyType(''); |
|
331 | + foreach ($alllocations as $location) { |
|
332 | 332 | ?> |
333 | 333 | <tr> |
334 | 334 | <input type="hidden" name="source_id[]" value="<?php print $location['id']; ?>" /> |
@@ -342,9 +342,9 @@ discard block |
||
342 | 342 | </tr> |
343 | 343 | |
344 | 344 | <?php |
345 | - } |
|
345 | + } |
|
346 | + } |
|
346 | 347 | } |
347 | - } |
|
348 | 348 | ?> |
349 | 349 | |
350 | 350 | <tr> |
@@ -452,12 +452,12 @@ discard block |
||
452 | 452 | ?> |
453 | 453 | <tr> |
454 | 454 | <?php |
455 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
455 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
456 | 456 | ?> |
457 | 457 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
458 | 458 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
459 | 459 | <?php |
460 | - } else { |
|
460 | + } else { |
|
461 | 461 | $hostport = explode(':',$source['host']); |
462 | 462 | if (isset($hostport[1])) { |
463 | 463 | $host = $hostport[0]; |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
471 | 471 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
472 | 472 | <?php |
473 | - } |
|
473 | + } |
|
474 | 474 | ?> |
475 | 475 | <td> |
476 | 476 | <select name="format[]" id="format"> |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | <br /> |
881 | 881 | <p> |
882 | 882 | <?php |
883 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
883 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
884 | 884 | ?> |
885 | 885 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
886 | 886 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -890,11 +890,11 @@ discard block |
||
890 | 890 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
891 | 891 | <?php |
892 | 892 | } |
893 | - } else { |
|
893 | + } else { |
|
894 | 894 | ?> |
895 | 895 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
896 | 896 | <?php |
897 | - } |
|
897 | + } |
|
898 | 898 | ?> |
899 | 899 | </p> |
900 | 900 | <br /> |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | </p> |
919 | 919 | <?php |
920 | 920 | require('../footer.php'); |
921 | - exit; |
|
921 | + exit; |
|
922 | 922 | } |
923 | 923 | // ' |
924 | 924 | $settings = array(); |
@@ -1009,8 +1009,8 @@ discard block |
||
1009 | 1009 | |
1010 | 1010 | $sources = array(); |
1011 | 1011 | foreach ($source_name as $keys => $name) { |
1012 | - 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]); |
|
1013 | - 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]); |
|
1012 | + 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]); |
|
1013 | + 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]); |
|
1014 | 1014 | } |
1015 | 1015 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
1016 | 1016 | |
@@ -1392,14 +1392,14 @@ discard block |
||
1392 | 1392 | |
1393 | 1393 | // Set some defaults values... |
1394 | 1394 | if (!isset($globalAircraftImageSources)) { |
1395 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1396 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1395 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1396 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1397 | 1397 | } |
1398 | 1398 | |
1399 | 1399 | if (!isset($globalSchedulesSources)) { |
1400 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1401 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1402 | - } |
|
1400 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1401 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1402 | + } |
|
1403 | 1403 | |
1404 | 1404 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1405 | 1405 | |
@@ -1446,21 +1446,21 @@ discard block |
||
1446 | 1446 | $popi = false; |
1447 | 1447 | $popw = false; |
1448 | 1448 | foreach ($_SESSION['done'] as $done) { |
1449 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1450 | - if ($done == 'Create database') $pop = true; |
|
1451 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1452 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1453 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1449 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1450 | + if ($done == 'Create database') $pop = true; |
|
1451 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1452 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1453 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1454 | 1454 | } |
1455 | 1455 | if ($pop) { |
1456 | - sleep(5); |
|
1457 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
1456 | + sleep(5); |
|
1457 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
1458 | 1458 | } else if ($popi) { |
1459 | - sleep(5); |
|
1460 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1459 | + sleep(5); |
|
1460 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
1461 | 1461 | } else if ($popw) { |
1462 | - sleep(5); |
|
1463 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
1462 | + sleep(5); |
|
1463 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
1464 | 1464 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
1465 | 1465 | print '</div></ul>'; |
1466 | 1466 | print '<div id="error"></div>'; |
@@ -1523,7 +1523,7 @@ discard block |
||
1523 | 1523 | unset($_COOKIE['install']); |
1524 | 1524 | print '<div class="info column"><ul>'; |
1525 | 1525 | foreach ($_SESSION['done'] as $done) { |
1526 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1526 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
1527 | 1527 | } |
1528 | 1528 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
1529 | 1529 | print '</ul></div>'; |
@@ -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 | } |
@@ -452,13 +452,13 @@ discard block |
||
452 | 452 | ?> |
453 | 453 | <tr> |
454 | 454 | <?php |
455 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
455 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
456 | 456 | ?> |
457 | 457 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
458 | 458 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
459 | 459 | <?php |
460 | 460 | } else { |
461 | - $hostport = explode(':',$source['host']); |
|
461 | + $hostport = explode(':', $source['host']); |
|
462 | 462 | if (isset($hostport[1])) { |
463 | 463 | $host = $hostport[0]; |
464 | 464 | $port = $hostport[1]; |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | <select name="timezones[]" id="timezones"> |
505 | 505 | <?php |
506 | 506 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
507 | - foreach($timezonelist as $timezones){ |
|
507 | + foreach ($timezonelist as $timezones) { |
|
508 | 508 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
509 | 509 | print '<option selected>'.$timezones.'</option>'; |
510 | 510 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | <select name="timezones[]" id="timezones"> |
556 | 556 | <?php |
557 | 557 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
558 | - foreach($timezonelist as $timezones){ |
|
558 | + foreach ($timezonelist as $timezones) { |
|
559 | 559 | if ($timezones == 'UTC') { |
560 | 560 | print '<option selected>'.$timezones.'</option>'; |
561 | 561 | } else print '<option>'.$timezones.'</option>'; |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | <br /> |
871 | 871 | <p> |
872 | 872 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
873 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
873 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
874 | 874 | </p> |
875 | 875 | <br /> |
876 | 876 | <p> |
@@ -926,14 +926,14 @@ discard block |
||
926 | 926 | $error = ''; |
927 | 927 | |
928 | 928 | if (isset($_POST['dbtype'])) { |
929 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
930 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
931 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
932 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
933 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
934 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
935 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
936 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
929 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
930 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
931 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
932 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
933 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
934 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
935 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
936 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
937 | 937 | |
938 | 938 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
939 | 939 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -953,49 +953,49 @@ discard block |
||
953 | 953 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
954 | 954 | */ |
955 | 955 | |
956 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
956 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
957 | 957 | |
958 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
959 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
960 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
961 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
962 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
958 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
959 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
960 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
961 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
962 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
963 | 963 | |
964 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
965 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
966 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
967 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
968 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
969 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
970 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
971 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
972 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
973 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
964 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
965 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
966 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
967 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
968 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
969 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
970 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
971 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
972 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
973 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
974 | 974 | |
975 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
976 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
977 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
978 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
979 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
980 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
975 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
976 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
977 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
978 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
979 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
980 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
981 | 981 | |
982 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
983 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
982 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
983 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
984 | 984 | |
985 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
986 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
987 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
985 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
986 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
987 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
988 | 988 | |
989 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
989 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
990 | 990 | if ($acars == 'acars') { |
991 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
991 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
992 | 992 | } else { |
993 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
993 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
994 | 994 | } |
995 | 995 | |
996 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
997 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
998 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
996 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
997 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
998 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
999 | 999 | |
1000 | 1000 | $source_name = $_POST['source_name']; |
1001 | 1001 | $source_latitude = $_POST['source_latitude']; |
@@ -1009,8 +1009,8 @@ discard block |
||
1009 | 1009 | |
1010 | 1010 | $sources = array(); |
1011 | 1011 | foreach ($source_name as $keys => $name) { |
1012 | - 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]); |
|
1013 | - 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]); |
|
1012 | + 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]); |
|
1013 | + 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]); |
|
1014 | 1014 | } |
1015 | 1015 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
1016 | 1016 | |
@@ -1023,24 +1023,24 @@ discard block |
||
1023 | 1023 | $sbsurl = $_POST['sbsurl']; |
1024 | 1024 | */ |
1025 | 1025 | |
1026 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
1027 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
1028 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
1029 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
1030 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
1031 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
1032 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
1033 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
1026 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
1027 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
1028 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
1029 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
1030 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
1031 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
1032 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
1033 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
1034 | 1034 | |
1035 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
1036 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1037 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1038 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
1039 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1040 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1041 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
1042 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1043 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1035 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
1036 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
1037 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
1038 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
1039 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
1040 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
1041 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
1042 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
1043 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
1044 | 1044 | |
1045 | 1045 | /* |
1046 | 1046 | $globalSBS1Hosts = array(); |
@@ -1056,7 +1056,7 @@ discard block |
||
1056 | 1056 | } |
1057 | 1057 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
1058 | 1058 | */ |
1059 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
1059 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
1060 | 1060 | $host = $_POST['host']; |
1061 | 1061 | $port = $_POST['port']; |
1062 | 1062 | $name = $_POST['name']; |
@@ -1073,104 +1073,104 @@ discard block |
||
1073 | 1073 | else $cov = 'FALSE'; |
1074 | 1074 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
1075 | 1075 | else $arch = 'FALSE'; |
1076 | - if (strpos($format[$key],'_callback')) { |
|
1077 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
1076 | + if (strpos($format[$key], '_callback')) { |
|
1077 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
1078 | 1078 | } elseif ($h != '' || $name[$key] != '') { |
1079 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
1079 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
1080 | 1080 | } |
1081 | 1081 | if ($format[$key] == 'airwhere') $forcepilots = true; |
1082 | 1082 | } |
1083 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
1083 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
1084 | 1084 | |
1085 | 1085 | /* |
1086 | 1086 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
1087 | 1087 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
1088 | 1088 | */ |
1089 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
1090 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
1091 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
1089 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
1090 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
1091 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
1092 | 1092 | |
1093 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
1094 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
1093 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
1094 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
1095 | 1095 | |
1096 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
1097 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
1096 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
1097 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
1098 | 1098 | |
1099 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
1100 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
1101 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
1102 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
1099 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
1100 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
1101 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
1102 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
1103 | 1103 | |
1104 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
1105 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
1106 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
1104 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
1105 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
1106 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
1107 | 1107 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
1108 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
1109 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1108 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
1109 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
1110 | 1110 | |
1111 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
1112 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
1113 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
1114 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
1115 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
1116 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
1117 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
1118 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
1111 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
1112 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
1113 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
1114 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
1115 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
1116 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
1117 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
1118 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
1119 | 1119 | |
1120 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
1121 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
1120 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
1121 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
1122 | 1122 | |
1123 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
1124 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
1123 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
1124 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
1125 | 1125 | |
1126 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
1126 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
1127 | 1127 | if ($archiveyear == "archiveyear") { |
1128 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
1128 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
1129 | 1129 | } else { |
1130 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
1130 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
1131 | 1131 | } |
1132 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1133 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1134 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
1135 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1132 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1133 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
1134 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
1135 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
1136 | 1136 | |
1137 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
1138 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
1139 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
1140 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
1137 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
1138 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
1139 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
1140 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
1141 | 1141 | |
1142 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
1143 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
1144 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
1142 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
1143 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
1144 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
1145 | 1145 | |
1146 | 1146 | // Create in settings.php keys not yet configurable if not already here |
1147 | 1147 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1148 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1148 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
1149 | 1149 | |
1150 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
1150 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
1151 | 1151 | if ($resetyearstats == 'resetyearstats') { |
1152 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
1152 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
1153 | 1153 | } else { |
1154 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
1154 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
1155 | 1155 | } |
1156 | 1156 | |
1157 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
1157 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
1158 | 1158 | if ($archive == 'archive') { |
1159 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
1159 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
1160 | 1160 | } else { |
1161 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
1161 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
1162 | 1162 | } |
1163 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
1163 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
1164 | 1164 | if ($daemon == 'daemon') { |
1165 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
1165 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
1166 | 1166 | } else { |
1167 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
1167 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
1168 | 1168 | } |
1169 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
1169 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
1170 | 1170 | if ($schedules == 'schedules') { |
1171 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
1171 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
1172 | 1172 | } else { |
1173 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
1173 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
1174 | 1174 | } |
1175 | 1175 | |
1176 | 1176 | /* |
@@ -1181,227 +1181,227 @@ discard block |
||
1181 | 1181 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
1182 | 1182 | } |
1183 | 1183 | */ |
1184 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
1185 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1186 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1187 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1188 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1184 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
1185 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
1186 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
1187 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
1188 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
1189 | 1189 | $va = false; |
1190 | 1190 | if ($globalivao == 'ivao') { |
1191 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
1191 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
1192 | 1192 | $va = true; |
1193 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1193 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
1194 | 1194 | if ($globalvatsim == 'vatsim') { |
1195 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
1195 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
1196 | 1196 | $va = true; |
1197 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1197 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
1198 | 1198 | if ($globalphpvms == 'phpvms') { |
1199 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
1199 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
1200 | 1200 | $va = true; |
1201 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1201 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
1202 | 1202 | if ($globalvam == 'vam') { |
1203 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
1203 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
1204 | 1204 | $va = true; |
1205 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1205 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
1206 | 1206 | if ($va) { |
1207 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
1208 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1207 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
1208 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
1209 | 1209 | if ($globalva == 'va' || $va) { |
1210 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
1211 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1210 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
1211 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1212 | 1212 | } else { |
1213 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
1214 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1215 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
1213 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
1214 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
1215 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
1216 | 1216 | } |
1217 | 1217 | |
1218 | 1218 | |
1219 | 1219 | |
1220 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
1220 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
1221 | 1221 | if ($notam == 'notam') { |
1222 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
1222 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
1223 | 1223 | } else { |
1224 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
1224 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
1225 | 1225 | } |
1226 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
1226 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
1227 | 1227 | if ($owner == 'owner') { |
1228 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
1228 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
1229 | 1229 | } else { |
1230 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
1230 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
1231 | 1231 | } |
1232 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
1232 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
1233 | 1233 | if ($map3d == 'map3d') { |
1234 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
1234 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
1235 | 1235 | } else { |
1236 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
1236 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
1237 | 1237 | } |
1238 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
1238 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
1239 | 1239 | if ($crash == 'crash') { |
1240 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
1240 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
1241 | 1241 | } else { |
1242 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
1242 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
1243 | 1243 | } |
1244 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
1244 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
1245 | 1245 | if ($mapsatellites == 'mapsatellites') { |
1246 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
1246 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
1247 | 1247 | } else { |
1248 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
1248 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
1249 | 1249 | } |
1250 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
1250 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
1251 | 1251 | if ($map3ddefault == 'map3ddefault') { |
1252 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
1252 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
1253 | 1253 | } else { |
1254 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
1254 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
1255 | 1255 | } |
1256 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
1256 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
1257 | 1257 | if ($translate == 'translate') { |
1258 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
1258 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
1259 | 1259 | } else { |
1260 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
1260 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
1261 | 1261 | } |
1262 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
1262 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
1263 | 1263 | if ($realairlines == 'realairlines') { |
1264 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
1264 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
1265 | 1265 | } else { |
1266 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
1266 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
1267 | 1267 | } |
1268 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
1268 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
1269 | 1269 | if ($estimation == 'estimation') { |
1270 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
1270 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
1271 | 1271 | } else { |
1272 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
1272 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
1273 | 1273 | } |
1274 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
1274 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
1275 | 1275 | if ($metar == 'metar') { |
1276 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
1276 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
1277 | 1277 | } else { |
1278 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
1278 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
1279 | 1279 | } |
1280 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
1280 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
1281 | 1281 | if ($metarcycle == 'metarcycle') { |
1282 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
1282 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
1283 | 1283 | } else { |
1284 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
1284 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
1285 | 1285 | } |
1286 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
1286 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
1287 | 1287 | if ($fork == 'fork') { |
1288 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
1288 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
1289 | 1289 | } else { |
1290 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
1290 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
1291 | 1291 | } |
1292 | 1292 | |
1293 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
1293 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
1294 | 1294 | if ($colormap == 'colormap') { |
1295 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
1295 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
1296 | 1296 | } else { |
1297 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
1297 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
1298 | 1298 | } |
1299 | 1299 | |
1300 | 1300 | if (isset($_POST['aircrafticoncolor'])) { |
1301 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
1302 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
1301 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
1302 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
1303 | 1303 | } |
1304 | 1304 | |
1305 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
1306 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
1305 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
1306 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
1307 | 1307 | |
1308 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
1309 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
1310 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
1311 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
1312 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
1313 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
1308 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
1309 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
1310 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
1311 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
1312 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
1313 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
1314 | 1314 | |
1315 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
1315 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
1316 | 1316 | if ($mappopup == 'mappopup') { |
1317 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
1317 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
1318 | 1318 | } else { |
1319 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
1319 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
1320 | 1320 | } |
1321 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
1321 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
1322 | 1322 | if ($airportpopup == 'airportpopup') { |
1323 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
1323 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
1324 | 1324 | } else { |
1325 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
1325 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
1326 | 1326 | } |
1327 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
1327 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
1328 | 1328 | if ($maphistory == 'maphistory') { |
1329 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
1329 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
1330 | 1330 | } else { |
1331 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
1331 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
1332 | 1332 | } |
1333 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
1333 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
1334 | 1334 | if ($maptooltip == 'maptooltip') { |
1335 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
1335 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
1336 | 1336 | } else { |
1337 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
1337 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
1338 | 1338 | } |
1339 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
1339 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
1340 | 1340 | if ($flightroute == 'flightroute') { |
1341 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
1341 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
1342 | 1342 | } else { |
1343 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
1343 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
1344 | 1344 | } |
1345 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
1345 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
1346 | 1346 | if ($flightremainingroute == 'flightremainingroute') { |
1347 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
1347 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
1348 | 1348 | } else { |
1349 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
1349 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
1350 | 1350 | } |
1351 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
1351 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
1352 | 1352 | if ($allflights == 'allflights') { |
1353 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
1353 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
1354 | 1354 | } else { |
1355 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
1355 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
1356 | 1356 | } |
1357 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
1357 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
1358 | 1358 | if ($bbox == 'bbox') { |
1359 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
1359 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
1360 | 1360 | } else { |
1361 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
1361 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
1362 | 1362 | } |
1363 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
1363 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
1364 | 1364 | if ($groundaltitude == 'groundaltitude') { |
1365 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
1365 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
1366 | 1366 | } else { |
1367 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
1367 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
1368 | 1368 | } |
1369 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
1369 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
1370 | 1370 | if ($waypoints == 'waypoints') { |
1371 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
1371 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
1372 | 1372 | } else { |
1373 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
1373 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
1374 | 1374 | } |
1375 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
1375 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
1376 | 1376 | if ($geoid == 'geoid') { |
1377 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
1377 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
1378 | 1378 | } else { |
1379 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
1379 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
1380 | 1380 | } |
1381 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
1382 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
1381 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
1382 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
1383 | 1383 | |
1384 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
1384 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
1385 | 1385 | if ($noairlines == 'noairlines') { |
1386 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
1386 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
1387 | 1387 | } else { |
1388 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
1388 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
1389 | 1389 | } |
1390 | 1390 | |
1391 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1391 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
1392 | 1392 | |
1393 | 1393 | // Set some defaults values... |
1394 | 1394 | if (!isset($globalAircraftImageSources)) { |
1395 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
1396 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1395 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
1396 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
1397 | 1397 | } |
1398 | 1398 | |
1399 | 1399 | if (!isset($globalSchedulesSources)) { |
1400 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
1401 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1400 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
1401 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
1402 | 1402 | } |
1403 | 1403 | |
1404 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
1404 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
1405 | 1405 | |
1406 | 1406 | if ($error == '') settings::modify_settings($settings); |
1407 | 1407 | 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> |
@@ -238,7 +286,10 @@ discard block |
||
238 | 286 | <div id="openweathermap_data"> |
239 | 287 | <p> |
240 | 288 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
241 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
289 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
290 | + print $globalOpenWeatherMapKey; |
|
291 | +} |
|
292 | +?>" /> |
|
242 | 293 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
243 | 294 | </p> |
244 | 295 | </div> |
@@ -248,42 +299,86 @@ discard block |
||
248 | 299 | <legend>Coverage area</legend> |
249 | 300 | <p> |
250 | 301 | <label for="latitudemax">The maximum latitude (north)</label> |
251 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
302 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
303 | + print $globalLatitudeMax; |
|
304 | +} |
|
305 | +?>" /> |
|
252 | 306 | </p> |
253 | 307 | <p> |
254 | 308 | <label for="latitudemin">The minimum latitude (south)</label> |
255 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
309 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
310 | + print $globalLatitudeMin; |
|
311 | +} |
|
312 | +?>" /> |
|
256 | 313 | </p> |
257 | 314 | <p> |
258 | 315 | <label for="longitudemax">The maximum longitude (west)</label> |
259 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
316 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
317 | + print $globalLongitudeMax; |
|
318 | +} |
|
319 | +?>" /> |
|
260 | 320 | </p> |
261 | 321 | <p> |
262 | 322 | <label for="longitudemin">The minimum longitude (east)</label> |
263 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
323 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
324 | + print $globalLongitudeMin; |
|
325 | +} |
|
326 | +?>" /> |
|
264 | 327 | </p> |
265 | 328 | <p> |
266 | 329 | <label for="latitudecenter">The latitude center</label> |
267 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
330 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
331 | + print $globalCenterLatitude; |
|
332 | +} |
|
333 | +?>" /> |
|
268 | 334 | </p> |
269 | 335 | <p> |
270 | 336 | <label for="longitudecenter">The longitude center</label> |
271 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
337 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
338 | + print $globalCenterLongitude; |
|
339 | +} |
|
340 | +?>" /> |
|
272 | 341 | </p> |
273 | 342 | <p> |
274 | 343 | <label for="livezoom">Default Zoom on live map</label> |
275 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
344 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
345 | + print $globalLiveZoom; |
|
346 | +} else { |
|
347 | + print '9'; |
|
348 | +} |
|
349 | +?>" /> |
|
276 | 350 | </p> |
277 | 351 | <p> |
278 | 352 | <label for="squawk_country">Country for squawk usage</label> |
279 | 353 | <select name="squawk_country" id="squawk_country"> |
280 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
281 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
282 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
283 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
284 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
285 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
286 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
354 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
355 | + print ' selected '; |
|
356 | +} |
|
357 | +?>>UK</option> |
|
358 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
359 | + print ' selected '; |
|
360 | +} |
|
361 | +?>>NZ</option> |
|
362 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
363 | + print ' selected '; |
|
364 | +} |
|
365 | +?>>US</option> |
|
366 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
367 | + print ' selected '; |
|
368 | +} |
|
369 | +?>>AU</option> |
|
370 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
371 | + print ' selected '; |
|
372 | +} |
|
373 | +?>>NL</option> |
|
374 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
375 | + print ' selected '; |
|
376 | +} |
|
377 | +?>>FR</option> |
|
378 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
379 | + print ' selected '; |
|
380 | +} |
|
381 | +?>>TR</option> |
|
287 | 382 | </select> |
288 | 383 | </p> |
289 | 384 | </fieldset> |
@@ -292,15 +387,24 @@ discard block |
||
292 | 387 | <p><i>Only put in DB flights that are inside a circle</i></p> |
293 | 388 | <p> |
294 | 389 | <label for="latitude">Center latitude</label> |
295 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
390 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
391 | + echo $globalDistanceIgnore['latitude']; |
|
392 | +} |
|
393 | +?>" /> |
|
296 | 394 | </p> |
297 | 395 | <p> |
298 | 396 | <label for="longitude">Center longitude</label> |
299 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
397 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
398 | + echo $globalDistanceIgnore['longitude']; |
|
399 | +} |
|
400 | +?>" /> |
|
300 | 401 | </p> |
301 | 402 | <p> |
302 | 403 | <label for="Distance">Distance (in km)</label> |
303 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
404 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
405 | + echo $globalDistanceIgnore['distance']; |
|
406 | +} |
|
407 | +?>" /> |
|
304 | 408 | </p> |
305 | 409 | </fieldset> |
306 | 410 | <fieldset id="sourceloc"> |
@@ -409,11 +513,17 @@ discard block |
||
409 | 513 | <div id="flightaware_data"> |
410 | 514 | <p> |
411 | 515 | <label for="flightawareusername">FlightAware username</label> |
412 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
516 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
517 | + print $globalFlightAwareUsername; |
|
518 | +} |
|
519 | +?>" /> |
|
413 | 520 | </p> |
414 | 521 | <p> |
415 | 522 | <label for="flightawarepassword">FlightAware password/API key</label> |
416 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
523 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
524 | + print $globalFlightAwarePassword; |
|
525 | +} |
|
526 | +?>" /> |
|
417 | 527 | </p> |
418 | 528 | </div> |
419 | 529 | --> |
@@ -455,7 +565,10 @@ discard block |
||
455 | 565 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
456 | 566 | ?> |
457 | 567 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
458 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
568 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
569 | + print $source['port']; |
|
570 | +} |
|
571 | +?>" /></td> |
|
459 | 572 | <?php |
460 | 573 | } else { |
461 | 574 | $hostport = explode(':',$source['host']); |
@@ -474,32 +587,98 @@ discard block |
||
474 | 587 | ?> |
475 | 588 | <td> |
476 | 589 | <select name="format[]" id="format"> |
477 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
478 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
479 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
480 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
481 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
482 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
483 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
484 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
485 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
486 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
487 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
488 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
489 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
490 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
491 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
492 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
493 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
494 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
495 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
590 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
591 | + print 'selected'; |
|
592 | +} |
|
593 | +?>>Auto</option> |
|
594 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
595 | + print 'selected'; |
|
596 | +} |
|
597 | +?>>SBS</option> |
|
598 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
599 | + print 'selected'; |
|
600 | +} |
|
601 | +?>>TSV</option> |
|
602 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
603 | + print 'selected'; |
|
604 | +} |
|
605 | +?>>Raw</option> |
|
606 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
607 | + print 'selected'; |
|
608 | +} |
|
609 | +?>>APRS</option> |
|
610 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
611 | + print 'selected'; |
|
612 | +} |
|
613 | +?>>Radarcape deltadb.txt</option> |
|
614 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
615 | + print 'selected'; |
|
616 | +} |
|
617 | +?>>Vatsim</option> |
|
618 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
619 | + print 'selected'; |
|
620 | +} |
|
621 | +?>>Virtual Radar Server AircraftList.json</option> |
|
622 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
623 | + print 'selected'; |
|
624 | +} |
|
625 | +?>>Virtual Radar Server TCP</option> |
|
626 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
627 | + print 'selected'; |
|
628 | +} |
|
629 | +?>>phpVMS</option> |
|
630 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
631 | + print 'selected'; |
|
632 | +} |
|
633 | +?>>Virtual Airlines Manager</option> |
|
634 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
635 | + print 'selected'; |
|
636 | +} |
|
637 | +?>>IVAO</option> |
|
638 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
639 | + print 'selected'; |
|
640 | +} |
|
641 | +?>>FlightGear Multiplayer</option> |
|
642 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
643 | + print 'selected'; |
|
644 | +} |
|
645 | +?>>FlightGear Singleplayer</option> |
|
646 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
647 | + print 'selected'; |
|
648 | +} |
|
649 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
650 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
651 | + print 'selected'; |
|
652 | +} |
|
653 | +?>>ACARS SBS-3 over TCP</option> |
|
654 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
655 | + print 'selected'; |
|
656 | +} |
|
657 | +?>>NMEA AIS over TCP</option> |
|
658 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
659 | + print 'selected'; |
|
660 | +} |
|
661 | +?>>AirWhere website</option> |
|
662 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
663 | + print 'selected'; |
|
664 | +} |
|
665 | +?>>HidnSeek Callback</option> |
|
496 | 666 | </select> |
497 | 667 | </td> |
498 | 668 | <td> |
499 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
669 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
670 | + print $source['name']; |
|
671 | +} |
|
672 | +?>" /> |
|
500 | 673 | </td> |
501 | - <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> |
|
502 | - <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> |
|
674 | + <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']) { |
|
675 | + print 'checked'; |
|
676 | +} |
|
677 | +?> /></td> |
|
678 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
679 | + print 'checked'; |
|
680 | +} |
|
681 | +?> /></td> |
|
503 | 682 | <td> |
504 | 683 | <select name="timezones[]" id="timezones"> |
505 | 684 | <?php |
@@ -509,7 +688,9 @@ discard block |
||
509 | 688 | print '<option selected>'.$timezones.'</option>'; |
510 | 689 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
511 | 690 | print '<option selected>'.$timezones.'</option>'; |
512 | - } else print '<option>'.$timezones.'</option>'; |
|
691 | + } else { |
|
692 | + print '<option>'.$timezones.'</option>'; |
|
693 | + } |
|
513 | 694 | } |
514 | 695 | ?> |
515 | 696 | </select> |
@@ -558,7 +739,9 @@ discard block |
||
558 | 739 | foreach($timezonelist as $timezones){ |
559 | 740 | if ($timezones == 'UTC') { |
560 | 741 | print '<option selected>'.$timezones.'</option>'; |
561 | - } else print '<option>'.$timezones.'</option>'; |
|
742 | + } else { |
|
743 | + print '<option>'.$timezones.'</option>'; |
|
744 | + } |
|
562 | 745 | } |
563 | 746 | ?> |
564 | 747 | </select> |
@@ -581,11 +764,17 @@ discard block |
||
581 | 764 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
582 | 765 | <p> |
583 | 766 | <label for="acarshost">ACARS UDP host</label> |
584 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
767 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
768 | + print $globalACARSHost; |
|
769 | +} |
|
770 | +?>" /> |
|
585 | 771 | </p> |
586 | 772 | <p> |
587 | 773 | <label for="acarsport">ACARS UDP port</label> |
588 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
774 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
775 | + print $globalACARSPort; |
|
776 | +} |
|
777 | +?>" /> |
|
589 | 778 | </p> |
590 | 779 | </fieldset> |
591 | 780 | </div> |
@@ -665,13 +854,19 @@ discard block |
||
665 | 854 | <div id="schedules_options"> |
666 | 855 | <p> |
667 | 856 | <label for="britishairways">British Airways API Key</label> |
668 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
857 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
858 | + print $globalBritishAirwaysKey; |
|
859 | +} |
|
860 | +?>" /> |
|
669 | 861 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
670 | 862 | </p> |
671 | 863 | <!-- |
672 | 864 | <p> |
673 | 865 | <label for="transavia">Transavia Test API Consumer Key</label> |
674 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
866 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
867 | + print $globalTransaviaKey; |
|
868 | +} |
|
869 | +?>" /> |
|
675 | 870 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
676 | 871 | </p> |
677 | 872 | --> |
@@ -680,10 +875,16 @@ discard block |
||
680 | 875 | <b>Lufthansa API Key</b> |
681 | 876 | <p> |
682 | 877 | <label for="lufthansakey">Key</label> |
683 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
878 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
879 | + print $globalLufthansaKey['key']; |
|
880 | +} |
|
881 | +?>" /> |
|
684 | 882 | </p><p> |
685 | 883 | <label for="lufthansasecret">Secret</label> |
686 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
884 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
885 | + print $globalLufthansaKey['secret']; |
|
886 | +} |
|
887 | +?>" /> |
|
687 | 888 | </p> |
688 | 889 | </div> |
689 | 890 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -703,7 +904,10 @@ discard block |
||
703 | 904 | </p> |
704 | 905 | <p> |
705 | 906 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
706 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
907 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
908 | + print $globalNOTAMSource; |
|
909 | +} |
|
910 | +?>" /> |
|
707 | 911 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
708 | 912 | </p> |
709 | 913 | <br /> |
@@ -719,14 +923,20 @@ discard block |
||
719 | 923 | <div id="metarsrc"> |
720 | 924 | <p> |
721 | 925 | <label for="metarsource">URL of your METAR source</label> |
722 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
926 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
927 | + print $globalMETARurl; |
|
928 | +} |
|
929 | +?>" /> |
|
723 | 930 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
724 | 931 | </p> |
725 | 932 | </div> |
726 | 933 | <br /> |
727 | 934 | <p> |
728 | 935 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
729 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
936 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
937 | + print $globalBitlyAccessToken; |
|
938 | +} |
|
939 | +?>" /> |
|
730 | 940 | </p> |
731 | 941 | <br /> |
732 | 942 | <p> |
@@ -742,11 +952,26 @@ discard block |
||
742 | 952 | <p> |
743 | 953 | <label for="geoid_source">Geoid Source</label> |
744 | 954 | <select name="geoid_source" id="geoid_source"> |
745 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
746 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
747 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
748 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
749 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
955 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
956 | + print ' selected="selected"'; |
|
957 | +} |
|
958 | +?>>EGM96 15' (2.1MB)</option> |
|
959 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
960 | + print ' selected="selected"'; |
|
961 | +} |
|
962 | +?>>EGM96 5' (19MB)</option> |
|
963 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
964 | + print ' selected="selected"'; |
|
965 | +} |
|
966 | +?>>EGM2008 5' (19MB)</option> |
|
967 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
968 | + print ' selected="selected"'; |
|
969 | +} |
|
970 | +?>>EGM2008 2.5' (75MB)</option> |
|
971 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
972 | + print ' selected="selected"'; |
|
973 | +} |
|
974 | +?>>EGM2008 1' (470MB)</option> |
|
750 | 975 | </select> |
751 | 976 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
752 | 977 | </p> |
@@ -764,7 +989,12 @@ discard block |
||
764 | 989 | </p> |
765 | 990 | <p> |
766 | 991 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
767 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
992 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
993 | + print $globalArchiveMonths; |
|
994 | +} else { |
|
995 | + echo '0'; |
|
996 | +} |
|
997 | +?>" /> |
|
768 | 998 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
769 | 999 | </p> |
770 | 1000 | <p> |
@@ -774,12 +1004,22 @@ discard block |
||
774 | 1004 | </p> |
775 | 1005 | <p> |
776 | 1006 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
777 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
1007 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
1008 | + print $globalArchiveKeepMonths; |
|
1009 | +} else { |
|
1010 | + echo '0'; |
|
1011 | +} |
|
1012 | +?>" /> |
|
778 | 1013 | <p class="help-block">0 to disable</p> |
779 | 1014 | </p> |
780 | 1015 | <p> |
781 | 1016 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
782 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
1017 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
1018 | + print $globalArchiveKeepTrackMonths; |
|
1019 | +} else { |
|
1020 | + echo '0'; |
|
1021 | +} |
|
1022 | +?>" /> |
|
783 | 1023 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
784 | 1024 | </p> |
785 | 1025 | <br /> |
@@ -789,7 +1029,12 @@ discard block |
||
789 | 1029 | <p class="help-block">Uncheck if the script is running as cron job</p> |
790 | 1030 | <div id="cronends"> |
791 | 1031 | <label for="cronend">Run script for xx seconds</label> |
792 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
1032 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
1033 | + print $globalCronEnd; |
|
1034 | +} else { |
|
1035 | + print '0'; |
|
1036 | +} |
|
1037 | +?>" /> |
|
793 | 1038 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
794 | 1039 | </div> |
795 | 1040 | </p> |
@@ -842,15 +1087,30 @@ discard block |
||
842 | 1087 | <br /> |
843 | 1088 | <p> |
844 | 1089 | <label for="refresh">Show flights detected since xxx seconds</label> |
845 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
1090 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
1091 | + echo $globalLiveInterval; |
|
1092 | +} else { |
|
1093 | + echo '200'; |
|
1094 | +} |
|
1095 | +?>" /> |
|
846 | 1096 | </p> |
847 | 1097 | <p> |
848 | 1098 | <label for="maprefresh">Live map refresh (in seconds)</label> |
849 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
1099 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
1100 | + echo $globalMapRefresh; |
|
1101 | +} else { |
|
1102 | + echo '30'; |
|
1103 | +} |
|
1104 | +?>" /> |
|
850 | 1105 | </p> |
851 | 1106 | <p> |
852 | 1107 | <label for="mapidle">Map idle timeout (in minutes)</label> |
853 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
1108 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
1109 | + echo $globalMapIdleTimeout; |
|
1110 | +} else { |
|
1111 | + echo '30'; |
|
1112 | +} |
|
1113 | +?>" /> |
|
854 | 1114 | <p class="help-block">0 to disable</p> |
855 | 1115 | </p> |
856 | 1116 | <p> |
@@ -865,12 +1125,20 @@ discard block |
||
865 | 1125 | <br /> |
866 | 1126 | <p> |
867 | 1127 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
868 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
1128 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
1129 | + echo $globalClosestMinDist; |
|
1130 | +} else { |
|
1131 | + echo '50'; |
|
1132 | +} |
|
1133 | +?>" /> |
|
869 | 1134 | </p> |
870 | 1135 | <br /> |
871 | 1136 | <p> |
872 | 1137 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
873 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
1138 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
1139 | + echo $globalAircraftSize; |
|
1140 | +} |
|
1141 | +?>" /> |
|
874 | 1142 | </p> |
875 | 1143 | <br /> |
876 | 1144 | <p> |
@@ -883,7 +1151,12 @@ discard block |
||
883 | 1151 | if (extension_loaded('gd') && function_exists('gd_info')) { |
884 | 1152 | ?> |
885 | 1153 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
886 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
1154 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
1155 | + echo $globalAircraftIconColor; |
|
1156 | +} else { |
|
1157 | + echo '1a3151'; |
|
1158 | +} |
|
1159 | +?>" /> |
|
887 | 1160 | <?php |
888 | 1161 | if (!is_writable('../cache')) { |
889 | 1162 | ?> |
@@ -901,14 +1174,27 @@ discard block |
||
901 | 1174 | <p> |
902 | 1175 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
903 | 1176 | <div class="range"> |
904 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
905 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
1177 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
1178 | + echo $globalAirportZoom; |
|
1179 | +} else { |
|
1180 | + echo '7'; |
|
1181 | +} |
|
1182 | +?>" /> |
|
1183 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
1184 | + echo $globalAirportZoom; |
|
1185 | +} else { |
|
1186 | + echo '7'; |
|
1187 | +} |
|
1188 | +?></output> |
|
906 | 1189 | </div> |
907 | 1190 | </p> |
908 | 1191 | <br /> |
909 | 1192 | <p> |
910 | 1193 | <label for="customcss">Custom CSS web path</label> |
911 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
1194 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
1195 | + echo $globalCustomCSS; |
|
1196 | +} |
|
1197 | +?>" /> |
|
912 | 1198 | </p> |
913 | 1199 | </fieldset> |
914 | 1200 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -935,8 +1221,12 @@ discard block |
||
935 | 1221 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
936 | 1222 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
937 | 1223 | |
938 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
939 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1224 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
1225 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
1226 | + } |
|
1227 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
1228 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1229 | + } |
|
940 | 1230 | |
941 | 1231 | $_SESSION['database_root'] = $dbroot; |
942 | 1232 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1004,15 +1294,23 @@ discard block |
||
1004 | 1294 | $source_city = $_POST['source_city']; |
1005 | 1295 | $source_country = $_POST['source_country']; |
1006 | 1296 | $source_ref = $_POST['source_ref']; |
1007 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
1008 | - else $source_id = array(); |
|
1297 | + if (isset($source_id)) { |
|
1298 | + $source_id = $_POST['source_id']; |
|
1299 | + } else { |
|
1300 | + $source_id = array(); |
|
1301 | + } |
|
1009 | 1302 | |
1010 | 1303 | $sources = array(); |
1011 | 1304 | foreach ($source_name as $keys => $name) { |
1012 | - 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]); |
|
1013 | - 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]); |
|
1305 | + if (isset($source_id[$keys])) { |
|
1306 | + $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]); |
|
1307 | + } else { |
|
1308 | + $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]); |
|
1309 | + } |
|
1310 | + } |
|
1311 | + if (count($sources) > 0) { |
|
1312 | + $_SESSION['sources'] = $sources; |
|
1014 | 1313 | } |
1015 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
1016 | 1314 | |
1017 | 1315 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
1018 | 1316 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1033,14 +1331,23 @@ discard block |
||
1033 | 1331 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
1034 | 1332 | |
1035 | 1333 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
1036 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1037 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1334 | + if ($globalaircraft == 'aircraft') { |
|
1335 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1336 | + } else { |
|
1337 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1338 | + } |
|
1038 | 1339 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
1039 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1040 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1340 | + if ($globaltracker == 'tracker') { |
|
1341 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1342 | + } else { |
|
1343 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1344 | + } |
|
1041 | 1345 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
1042 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1043 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1346 | + if ($globalmarine == 'marine') { |
|
1347 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1348 | + } else { |
|
1349 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1350 | + } |
|
1044 | 1351 | |
1045 | 1352 | /* |
1046 | 1353 | $globalSBS1Hosts = array(); |
@@ -1062,23 +1369,37 @@ discard block |
||
1062 | 1369 | $name = $_POST['name']; |
1063 | 1370 | $format = $_POST['format']; |
1064 | 1371 | $timezones = $_POST['timezones']; |
1065 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
1066 | - else $sourcestats = array(); |
|
1067 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
1068 | - else $noarchive = array(); |
|
1372 | + if (isset($_POST['sourcestats'])) { |
|
1373 | + $sourcestats = $_POST['sourcestats']; |
|
1374 | + } else { |
|
1375 | + $sourcestats = array(); |
|
1376 | + } |
|
1377 | + if (isset($_POST['noarchive'])) { |
|
1378 | + $noarchive = $_POST['noarchive']; |
|
1379 | + } else { |
|
1380 | + $noarchive = array(); |
|
1381 | + } |
|
1069 | 1382 | $gSources = array(); |
1070 | 1383 | $forcepilots = false; |
1071 | 1384 | foreach ($host as $key => $h) { |
1072 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
1073 | - else $cov = 'FALSE'; |
|
1074 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
1075 | - else $arch = 'FALSE'; |
|
1385 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
1386 | + $cov = 'TRUE'; |
|
1387 | + } else { |
|
1388 | + $cov = 'FALSE'; |
|
1389 | + } |
|
1390 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
1391 | + $arch = 'TRUE'; |
|
1392 | + } else { |
|
1393 | + $arch = 'FALSE'; |
|
1394 | + } |
|
1076 | 1395 | if (strpos($format[$key],'_callback')) { |
1077 | 1396 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
1078 | 1397 | } elseif ($h != '' || $name[$key] != '') { |
1079 | 1398 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
1080 | 1399 | } |
1081 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
1400 | + if ($format[$key] == 'airwhere') { |
|
1401 | + $forcepilots = true; |
|
1402 | + } |
|
1082 | 1403 | } |
1083 | 1404 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
1084 | 1405 | |
@@ -1106,7 +1427,9 @@ discard block |
||
1106 | 1427 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
1107 | 1428 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
1108 | 1429 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
1109 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1430 | + } else { |
|
1431 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1432 | + } |
|
1110 | 1433 | |
1111 | 1434 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
1112 | 1435 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1145,7 +1468,9 @@ discard block |
||
1145 | 1468 | |
1146 | 1469 | // Create in settings.php keys not yet configurable if not already here |
1147 | 1470 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1148 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1471 | + if (!isset($globalDebug)) { |
|
1472 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1473 | + } |
|
1149 | 1474 | |
1150 | 1475 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
1151 | 1476 | if ($resetyearstats == 'resetyearstats') { |
@@ -1182,37 +1507,56 @@ discard block |
||
1182 | 1507 | } |
1183 | 1508 | */ |
1184 | 1509 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
1185 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1186 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1187 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1188 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1510 | + if ($globalsbs == 'sbs') { |
|
1511 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1512 | + } else { |
|
1513 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1514 | + } |
|
1515 | + if ($globalaprs == 'aprs') { |
|
1516 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1517 | + } else { |
|
1518 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1519 | + } |
|
1189 | 1520 | $va = false; |
1190 | 1521 | if ($globalivao == 'ivao') { |
1191 | 1522 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
1192 | 1523 | $va = true; |
1193 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1524 | + } else { |
|
1525 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1526 | + } |
|
1194 | 1527 | if ($globalvatsim == 'vatsim') { |
1195 | 1528 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
1196 | 1529 | $va = true; |
1197 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1530 | + } else { |
|
1531 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1532 | + } |
|
1198 | 1533 | if ($globalphpvms == 'phpvms') { |
1199 | 1534 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
1200 | 1535 | $va = true; |
1201 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1536 | + } else { |
|
1537 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1538 | + } |
|
1202 | 1539 | if ($globalvam == 'vam') { |
1203 | 1540 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
1204 | 1541 | $va = true; |
1205 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1542 | + } else { |
|
1543 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1544 | + } |
|
1206 | 1545 | if ($va) { |
1207 | 1546 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
1208 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1547 | + } else { |
|
1548 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1549 | + } |
|
1209 | 1550 | if ($globalva == 'va' || $va) { |
1210 | 1551 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
1211 | 1552 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
1212 | 1553 | } else { |
1213 | 1554 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
1214 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1215 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
1555 | + if ($forcepilots) { |
|
1556 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
1557 | + } else { |
|
1558 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
1559 | + } |
|
1216 | 1560 | } |
1217 | 1561 | |
1218 | 1562 | |
@@ -1388,7 +1732,9 @@ discard block |
||
1388 | 1732 | $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
1389 | 1733 | } |
1390 | 1734 | |
1391 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1735 | + if (!isset($globalTransaction)) { |
|
1736 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1737 | + } |
|
1392 | 1738 | |
1393 | 1739 | // Set some defaults values... |
1394 | 1740 | if (!isset($globalAircraftImageSources)) { |
@@ -1403,15 +1749,23 @@ discard block |
||
1403 | 1749 | |
1404 | 1750 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1405 | 1751 | |
1406 | - if ($error == '') settings::modify_settings($settings); |
|
1407 | - if ($error == '') settings::comment_settings($settings_comment); |
|
1752 | + if ($error == '') { |
|
1753 | + settings::modify_settings($settings); |
|
1754 | + } |
|
1755 | + if ($error == '') { |
|
1756 | + settings::comment_settings($settings_comment); |
|
1757 | + } |
|
1408 | 1758 | if ($error != '') { |
1409 | 1759 | print '<div class="info column">'.$error.'</div>'; |
1410 | 1760 | require('../footer.php'); |
1411 | 1761 | exit; |
1412 | 1762 | } else { |
1413 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
1414 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
1763 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
1764 | + $_SESSION['waypoints'] = 1; |
|
1765 | + } |
|
1766 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
1767 | + $_SESSION['owner'] = 1; |
|
1768 | + } |
|
1415 | 1769 | if (isset($_POST['createdb'])) { |
1416 | 1770 | $_SESSION['install'] = 'database_create'; |
1417 | 1771 | } else { |
@@ -1447,10 +1801,18 @@ discard block |
||
1447 | 1801 | $popw = false; |
1448 | 1802 | foreach ($_SESSION['done'] as $done) { |
1449 | 1803 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
1450 | - if ($done == 'Create database') $pop = true; |
|
1451 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1452 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1453 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1804 | + if ($done == 'Create database') { |
|
1805 | + $pop = true; |
|
1806 | + } |
|
1807 | + if ($_SESSION['install'] == 'database_create') { |
|
1808 | + $pop = true; |
|
1809 | + } |
|
1810 | + if ($_SESSION['install'] == 'database_import') { |
|
1811 | + $popi = true; |
|
1812 | + } |
|
1813 | + if ($_SESSION['install'] == 'waypoints') { |
|
1814 | + $popw = true; |
|
1815 | + } |
|
1454 | 1816 | } |
1455 | 1817 | if ($pop) { |
1456 | 1818 | sleep(5); |
@@ -1461,7 +1823,9 @@ discard block |
||
1461 | 1823 | } else if ($popw) { |
1462 | 1824 | sleep(5); |
1463 | 1825 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
1464 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1826 | + } else { |
|
1827 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1828 | + } |
|
1465 | 1829 | print '</div></ul>'; |
1466 | 1830 | print '<div id="error"></div>'; |
1467 | 1831 | /* foreach ($_SESSION['done'] as $done) { |