@@ -188,13 +188,13 @@ discard block |
||
| 188 | 188 | <p> |
| 189 | 189 | <label for="siteurl">Site directory</label> |
| 190 | 190 | <?php |
| 191 | - // Try to detect site directory |
|
| 192 | - if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
|
| 191 | + // Try to detect site directory |
|
| 192 | + if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
|
| 193 | 193 | if (isset($_SERVER['REQUEST_URI'])) { |
| 194 | 194 | $URL = $_SERVER['REQUEST_URI']; |
| 195 | 195 | $globalURL = str_replace('/install/index.php','',$URL); |
| 196 | 196 | } |
| 197 | - } |
|
| 197 | + } |
|
| 198 | 198 | ?> |
| 199 | 199 | <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
| 200 | 200 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
@@ -373,17 +373,17 @@ discard block |
||
| 373 | 373 | </tr> |
| 374 | 374 | |
| 375 | 375 | <?php |
| 376 | - if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 376 | + if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 377 | 377 | ?> |
| 378 | 378 | <!-- |
| 379 | 379 | <?php |
| 380 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 381 | - $Connection = new Connection(); |
|
| 380 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 381 | + $Connection = new Connection(); |
|
| 382 | 382 | ?> |
| 383 | 383 | --> |
| 384 | 384 | <?php |
| 385 | 385 | if ($Connection->db != NULL) { |
| 386 | - if ($Connection->tableExists('source_location')) { |
|
| 386 | + if ($Connection->tableExists('source_location')) { |
|
| 387 | 387 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
| 388 | 388 | $Source = new Source(); |
| 389 | 389 | //$alllocations = $Source->getAllLocationInfo(); |
@@ -403,9 +403,9 @@ discard block |
||
| 403 | 403 | |
| 404 | 404 | <?php |
| 405 | 405 | } |
| 406 | - } |
|
| 406 | + } |
|
| 407 | + } |
|
| 407 | 408 | } |
| 408 | - } |
|
| 409 | 409 | ?> |
| 410 | 410 | |
| 411 | 411 | <tr> |
@@ -515,12 +515,12 @@ discard block |
||
| 515 | 515 | ?> |
| 516 | 516 | <tr> |
| 517 | 517 | <?php |
| 518 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 518 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 519 | 519 | ?> |
| 520 | 520 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 521 | 521 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 522 | 522 | <?php |
| 523 | - } else { |
|
| 523 | + } else { |
|
| 524 | 524 | $hostport = explode(':',$source['host']); |
| 525 | 525 | if (isset($hostport[1])) { |
| 526 | 526 | $host = $hostport[0]; |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 534 | 534 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
| 535 | 535 | <?php |
| 536 | - } |
|
| 536 | + } |
|
| 537 | 537 | ?> |
| 538 | 538 | <td> |
| 539 | 539 | <select name="format[]" id="format"> |
@@ -673,9 +673,9 @@ discard block |
||
| 673 | 673 | </thead> |
| 674 | 674 | <tbody> |
| 675 | 675 | <?php |
| 676 | - if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 676 | + if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 677 | 677 | foreach ($globalNewsFeeds as $type => $feedslng) { |
| 678 | - foreach ($feedslng as $lng => $feeds) { |
|
| 678 | + foreach ($feedslng as $lng => $feeds) { |
|
| 679 | 679 | foreach ($feeds as $feed) { |
| 680 | 680 | ?> |
| 681 | 681 | <tr> |
@@ -700,9 +700,9 @@ discard block |
||
| 700 | 700 | |
| 701 | 701 | <?php |
| 702 | 702 | } |
| 703 | - } |
|
| 703 | + } |
|
| 704 | + } |
|
| 704 | 705 | } |
| 705 | - } |
|
| 706 | 706 | ?> |
| 707 | 707 | <tr> |
| 708 | 708 | <td><input type="url" name="newsurl[]" /></td> |
@@ -1092,7 +1092,7 @@ discard block |
||
| 1092 | 1092 | <br /> |
| 1093 | 1093 | <p> |
| 1094 | 1094 | <?php |
| 1095 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1095 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1096 | 1096 | ?> |
| 1097 | 1097 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1098 | 1098 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -1102,11 +1102,11 @@ discard block |
||
| 1102 | 1102 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 1103 | 1103 | <?php |
| 1104 | 1104 | } |
| 1105 | - } else { |
|
| 1105 | + } else { |
|
| 1106 | 1106 | ?> |
| 1107 | 1107 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 1108 | 1108 | <?php |
| 1109 | - } |
|
| 1109 | + } |
|
| 1110 | 1110 | ?> |
| 1111 | 1111 | </p> |
| 1112 | 1112 | <br /> |
@@ -1130,7 +1130,7 @@ discard block |
||
| 1130 | 1130 | </p> |
| 1131 | 1131 | <?php |
| 1132 | 1132 | require('../footer.php'); |
| 1133 | - exit; |
|
| 1133 | + exit; |
|
| 1134 | 1134 | } |
| 1135 | 1135 | // ' |
| 1136 | 1136 | $settings = array(); |
@@ -1221,8 +1221,8 @@ discard block |
||
| 1221 | 1221 | |
| 1222 | 1222 | $sources = array(); |
| 1223 | 1223 | foreach ($source_name as $keys => $name) { |
| 1224 | - 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]); |
|
| 1225 | - 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]); |
|
| 1224 | + 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]); |
|
| 1225 | + 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]); |
|
| 1226 | 1226 | } |
| 1227 | 1227 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1228 | 1228 | |
@@ -1232,13 +1232,13 @@ discard block |
||
| 1232 | 1232 | |
| 1233 | 1233 | $newsfeeds = array(); |
| 1234 | 1234 | foreach($newsurl as $newskey => $url) { |
| 1235 | - if ($url != '') { |
|
| 1235 | + if ($url != '') { |
|
| 1236 | 1236 | $type = $newstype[$newskey]; |
| 1237 | 1237 | $lng = $newslng[$newskey]; |
| 1238 | 1238 | if (isset($newsfeeds[$type][$lng])) { |
| 1239 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1239 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1240 | 1240 | } else $newsfeeds[$type][$lng] = array($url); |
| 1241 | - } |
|
| 1241 | + } |
|
| 1242 | 1242 | } |
| 1243 | 1243 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
| 1244 | 1244 | |
@@ -1681,14 +1681,14 @@ discard block |
||
| 1681 | 1681 | |
| 1682 | 1682 | // Set some defaults values... |
| 1683 | 1683 | if (!isset($globalAircraftImageSources)) { |
| 1684 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1685 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1684 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1685 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1686 | 1686 | } |
| 1687 | 1687 | |
| 1688 | 1688 | if (!isset($globalSchedulesSources)) { |
| 1689 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1690 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1691 | - } |
|
| 1689 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1690 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1691 | + } |
|
| 1692 | 1692 | |
| 1693 | 1693 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1694 | 1694 | |
@@ -1736,21 +1736,21 @@ discard block |
||
| 1736 | 1736 | $popi = false; |
| 1737 | 1737 | $popw = false; |
| 1738 | 1738 | foreach ($_SESSION['done'] as $done) { |
| 1739 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1740 | - if ($done == 'Create database') $pop = true; |
|
| 1741 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1742 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1743 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1739 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1740 | + if ($done == 'Create database') $pop = true; |
|
| 1741 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1742 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1743 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1744 | 1744 | } |
| 1745 | 1745 | if ($pop) { |
| 1746 | - sleep(5); |
|
| 1747 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1746 | + sleep(5); |
|
| 1747 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1748 | 1748 | } else if ($popi) { |
| 1749 | - sleep(5); |
|
| 1750 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1749 | + sleep(5); |
|
| 1750 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1751 | 1751 | } else if ($popw) { |
| 1752 | - sleep(5); |
|
| 1753 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1752 | + sleep(5); |
|
| 1753 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1754 | 1754 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1755 | 1755 | print '</div></ul>'; |
| 1756 | 1756 | print '<div id="error"></div>'; |
@@ -1816,7 +1816,7 @@ discard block |
||
| 1816 | 1816 | unset($_COOKIE['install']); |
| 1817 | 1817 | print '<div class="info column"><ul>'; |
| 1818 | 1818 | foreach ($_SESSION['done'] as $done) { |
| 1819 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1819 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1820 | 1820 | } |
| 1821 | 1821 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1822 | 1822 | print '</ul></div>'; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | require_once(dirname(__FILE__).'/class.create_db.php'); |
| 23 | 23 | require_once(dirname(__FILE__).'/class.update_schema.php'); |
| 24 | 24 | require_once(dirname(__FILE__).'/class.settings.php'); |
| 25 | -$title="Install"; |
|
| 25 | +$title = "Install"; |
|
| 26 | 26 | require(dirname(__FILE__).'/../require/settings.php'); |
| 27 | 27 | require_once(dirname(__FILE__).'/../require/class.Common.php'); |
| 28 | 28 | require(dirname(__FILE__).'/header.php'); |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | if (!extension_loaded('curl')) { |
| 96 | 96 | $error[] = "Curl is not loaded."; |
| 97 | 97 | } |
| 98 | - if(function_exists('apache_get_modules') ){ |
|
| 99 | - if(!in_array('mod_rewrite',apache_get_modules())) { |
|
| 98 | + if (function_exists('apache_get_modules')) { |
|
| 99 | + if (!in_array('mod_rewrite', apache_get_modules())) { |
|
| 100 | 100 | $error[] = "mod_rewrite is not available."; |
| 101 | 101 | } |
| 102 | 102 | /* |
@@ -112,8 +112,8 @@ discard block |
||
| 112 | 112 | 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>'; |
| 113 | 113 | if (isset($_SERVER['REQUEST_SCHEME']) && isset($_SERVER['SERVER_NAME']) && isset($_SERVER['SERVER_PORT']) && isset($_SERVER['REQUEST_URI'])) { |
| 114 | 114 | if (function_exists('get_headers')) { |
| 115 | - $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/','search',str_replace('index.php',$_SERVER["REQUEST_URI"]))); |
|
| 116 | - if (isset($check_header[0]) && !stripos($check_header[0],"200 OK")) { |
|
| 115 | + $check_header = @get_headers($_SERVER['REQUEST_SCHEME'].'://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].str_replace('install/', 'search', str_replace('index.php', $_SERVER["REQUEST_URI"]))); |
|
| 116 | + if (isset($check_header[0]) && !stripos($check_header[0], "200 OK")) { |
|
| 117 | 117 | print '<div class="info column"><p><strong>Check your configuration, rewrite don\'t seems to work.</strong></p></div>'; |
| 118 | 118 | } |
| 119 | 119 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | if ((!isset($globalURL) || $globalURL == '') && (!isset($globalDBuser) || $globalDBuser == '')) { |
| 193 | 193 | if (isset($_SERVER['REQUEST_URI'])) { |
| 194 | 194 | $URL = $_SERVER['REQUEST_URI']; |
| 195 | - $globalURL = str_replace('/install/index.php','',$URL); |
|
| 195 | + $globalURL = str_replace('/install/index.php', '', $URL); |
|
| 196 | 196 | } |
| 197 | 197 | } |
| 198 | 198 | ?> |
@@ -515,13 +515,13 @@ discard block |
||
| 515 | 515 | ?> |
| 516 | 516 | <tr> |
| 517 | 517 | <?php |
| 518 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 518 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
| 519 | 519 | ?> |
| 520 | 520 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 521 | 521 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 522 | 522 | <?php |
| 523 | 523 | } else { |
| 524 | - $hostport = explode(':',$source['host']); |
|
| 524 | + $hostport = explode(':', $source['host']); |
|
| 525 | 525 | if (isset($hostport[1])) { |
| 526 | 526 | $host = $hostport[0]; |
| 527 | 527 | $port = $hostport[1]; |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | <select name="timezones[]" id="timezones"> |
| 571 | 571 | <?php |
| 572 | 572 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 573 | - foreach($timezonelist as $timezones){ |
|
| 573 | + foreach ($timezonelist as $timezones) { |
|
| 574 | 574 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
| 575 | 575 | print '<option selected>'.$timezones.'</option>'; |
| 576 | 576 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -624,7 +624,7 @@ discard block |
||
| 624 | 624 | <select name="timezones[]" id="timezones"> |
| 625 | 625 | <?php |
| 626 | 626 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 627 | - foreach($timezonelist as $timezones){ |
|
| 627 | + foreach ($timezonelist as $timezones) { |
|
| 628 | 628 | if ($timezones == 'UTC') { |
| 629 | 629 | print '<option selected>'.$timezones.'</option>'; |
| 630 | 630 | } else print '<option>'.$timezones.'</option>'; |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | <br /> |
| 1077 | 1077 | <p> |
| 1078 | 1078 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1079 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1079 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
| 1080 | 1080 | </p> |
| 1081 | 1081 | <br /> |
| 1082 | 1082 | <p> |
@@ -1138,14 +1138,14 @@ discard block |
||
| 1138 | 1138 | $error = ''; |
| 1139 | 1139 | |
| 1140 | 1140 | if (isset($_POST['dbtype'])) { |
| 1141 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
| 1142 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
| 1143 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
| 1144 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
| 1145 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
| 1146 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
| 1147 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
| 1148 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
| 1141 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
| 1142 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
| 1143 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
| 1144 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
| 1145 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
| 1146 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
| 1147 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
| 1148 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
| 1149 | 1149 | |
| 1150 | 1150 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
| 1151 | 1151 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -1165,49 +1165,49 @@ discard block |
||
| 1165 | 1165 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
| 1166 | 1166 | */ |
| 1167 | 1167 | |
| 1168 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 1168 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 1169 | 1169 | |
| 1170 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
| 1171 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
| 1172 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
| 1173 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
| 1174 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
| 1170 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
| 1171 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
| 1172 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
| 1173 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
| 1174 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
| 1175 | 1175 | |
| 1176 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
| 1177 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
| 1178 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
| 1179 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
| 1180 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
| 1181 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
| 1182 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
| 1183 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
| 1184 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
| 1185 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1176 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
| 1177 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
| 1178 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
| 1179 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
| 1180 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
| 1181 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
| 1182 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
| 1183 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
| 1184 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
| 1185 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1186 | 1186 | |
| 1187 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
| 1188 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
| 1189 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
| 1190 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
| 1191 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1192 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
| 1187 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
| 1188 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
| 1189 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
| 1190 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
| 1191 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1192 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
| 1193 | 1193 | |
| 1194 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
| 1195 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
| 1194 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
| 1195 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
| 1196 | 1196 | |
| 1197 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
| 1198 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
| 1199 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
| 1197 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
| 1198 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
| 1199 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
| 1200 | 1200 | |
| 1201 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
| 1201 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
| 1202 | 1202 | if ($acars == 'acars') { |
| 1203 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
| 1203 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
| 1204 | 1204 | } else { |
| 1205 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
| 1205 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
| 1206 | 1206 | } |
| 1207 | 1207 | |
| 1208 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
| 1209 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
| 1210 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1208 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
| 1209 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
| 1210 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1211 | 1211 | |
| 1212 | 1212 | $source_name = $_POST['source_name']; |
| 1213 | 1213 | $source_latitude = $_POST['source_latitude']; |
@@ -1221,8 +1221,8 @@ discard block |
||
| 1221 | 1221 | |
| 1222 | 1222 | $sources = array(); |
| 1223 | 1223 | foreach ($source_name as $keys => $name) { |
| 1224 | - 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]); |
|
| 1225 | - 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]); |
|
| 1224 | + 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]); |
|
| 1225 | + 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]); |
|
| 1226 | 1226 | } |
| 1227 | 1227 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1228 | 1228 | |
@@ -1231,16 +1231,16 @@ discard block |
||
| 1231 | 1231 | $newstype = $_POST['newstype']; |
| 1232 | 1232 | |
| 1233 | 1233 | $newsfeeds = array(); |
| 1234 | - foreach($newsurl as $newskey => $url) { |
|
| 1234 | + foreach ($newsurl as $newskey => $url) { |
|
| 1235 | 1235 | if ($url != '') { |
| 1236 | 1236 | $type = $newstype[$newskey]; |
| 1237 | 1237 | $lng = $newslng[$newskey]; |
| 1238 | 1238 | if (isset($newsfeeds[$type][$lng])) { |
| 1239 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1239 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng], array($url)); |
|
| 1240 | 1240 | } else $newsfeeds[$type][$lng] = array($url); |
| 1241 | 1241 | } |
| 1242 | 1242 | } |
| 1243 | - $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
|
| 1243 | + $settings = array_merge($settings, array('globalNewsFeeds' => $newsfeeds)); |
|
| 1244 | 1244 | |
| 1245 | 1245 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 1246 | 1246 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1251,27 +1251,27 @@ discard block |
||
| 1251 | 1251 | $sbsurl = $_POST['sbsurl']; |
| 1252 | 1252 | */ |
| 1253 | 1253 | |
| 1254 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
| 1255 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
| 1256 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
| 1257 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
| 1258 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
| 1259 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
| 1260 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
| 1261 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
| 1254 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
| 1255 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
| 1256 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
| 1257 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
| 1258 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
| 1259 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
| 1260 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
| 1261 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
| 1262 | 1262 | |
| 1263 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
| 1264 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1265 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1266 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
| 1267 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1268 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1269 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
| 1270 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1271 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1272 | - $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
|
| 1273 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1274 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1263 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
| 1264 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
| 1265 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
| 1266 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
| 1267 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
| 1268 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
| 1269 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
| 1270 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
| 1271 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
| 1272 | + $globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING); |
|
| 1273 | + if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE')); |
|
| 1274 | + else $settings = array_merge($settings, array('globalSatellite' => 'FALSE')); |
|
| 1275 | 1275 | |
| 1276 | 1276 | /* |
| 1277 | 1277 | $globalSBS1Hosts = array(); |
@@ -1287,7 +1287,7 @@ discard block |
||
| 1287 | 1287 | } |
| 1288 | 1288 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
| 1289 | 1289 | */ |
| 1290 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
| 1290 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
| 1291 | 1291 | $host = $_POST['host']; |
| 1292 | 1292 | $port = $_POST['port']; |
| 1293 | 1293 | $name = $_POST['name']; |
@@ -1304,115 +1304,115 @@ discard block |
||
| 1304 | 1304 | else $cov = 'FALSE'; |
| 1305 | 1305 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
| 1306 | 1306 | else $arch = 'FALSE'; |
| 1307 | - if (strpos($format[$key],'_callback')) { |
|
| 1308 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
| 1307 | + if (strpos($format[$key], '_callback')) { |
|
| 1308 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
| 1309 | 1309 | } elseif ($h != '' || $name[$key] != '') { |
| 1310 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
| 1310 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
| 1311 | 1311 | } |
| 1312 | 1312 | if ($format[$key] == 'airwhere') $forcepilots = true; |
| 1313 | 1313 | } |
| 1314 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
| 1314 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
| 1315 | 1315 | |
| 1316 | 1316 | /* |
| 1317 | 1317 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
| 1318 | 1318 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
| 1319 | 1319 | */ |
| 1320 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
| 1321 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
| 1322 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
| 1320 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
| 1321 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
| 1322 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
| 1323 | 1323 | |
| 1324 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
| 1325 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
| 1324 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
| 1325 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
| 1326 | 1326 | |
| 1327 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
| 1328 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
| 1327 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
| 1328 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
| 1329 | 1329 | |
| 1330 | - $map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING); |
|
| 1331 | - $settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile)); |
|
| 1330 | + $map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING); |
|
| 1331 | + $settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile)); |
|
| 1332 | 1332 | |
| 1333 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
| 1334 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
| 1335 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
| 1336 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
| 1333 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
| 1334 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
| 1335 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
| 1336 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
| 1337 | 1337 | |
| 1338 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
| 1339 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
| 1340 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
| 1338 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
| 1339 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
| 1340 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
| 1341 | 1341 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1342 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
| 1343 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1342 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
| 1343 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
| 1344 | 1344 | |
| 1345 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1346 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
| 1347 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1348 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
| 1349 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
| 1350 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
| 1351 | - $minfetch = filter_input(INPUT_POST,'minfetch',FILTER_SANITIZE_NUMBER_INT); |
|
| 1352 | - $settings = array_merge($settings,array('globalMinFetch' => $minfetch)); |
|
| 1353 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
| 1354 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
| 1345 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1346 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
| 1347 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1348 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
| 1349 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
| 1350 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
| 1351 | + $minfetch = filter_input(INPUT_POST, 'minfetch', FILTER_SANITIZE_NUMBER_INT); |
|
| 1352 | + $settings = array_merge($settings, array('globalMinFetch' => $minfetch)); |
|
| 1353 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
| 1354 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
| 1355 | 1355 | |
| 1356 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
| 1357 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
| 1356 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
| 1357 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
| 1358 | 1358 | |
| 1359 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1360 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
| 1359 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1360 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
| 1361 | 1361 | |
| 1362 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
| 1362 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
| 1363 | 1363 | if ($archiveyear == "archiveyear") { |
| 1364 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
| 1364 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
| 1365 | 1365 | } else { |
| 1366 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
| 1366 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
| 1367 | 1367 | } |
| 1368 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1369 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1370 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1371 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1368 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1369 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1370 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1371 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1372 | 1372 | |
| 1373 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
| 1374 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1375 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
| 1376 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
| 1373 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
| 1374 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1375 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
| 1376 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
| 1377 | 1377 | |
| 1378 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
| 1379 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
| 1380 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
| 1378 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
| 1379 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
| 1380 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
| 1381 | 1381 | |
| 1382 | 1382 | // Create in settings.php keys not yet configurable if not already here |
| 1383 | 1383 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1384 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1384 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
| 1385 | 1385 | |
| 1386 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
| 1386 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
| 1387 | 1387 | if ($resetyearstats == 'resetyearstats') { |
| 1388 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1388 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1389 | 1389 | } else { |
| 1390 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1390 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1391 | 1391 | } |
| 1392 | 1392 | |
| 1393 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
| 1393 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
| 1394 | 1394 | if ($archive == 'archive') { |
| 1395 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
| 1395 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
| 1396 | 1396 | } else { |
| 1397 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
| 1397 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
| 1398 | 1398 | } |
| 1399 | - $archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING); |
|
| 1399 | + $archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING); |
|
| 1400 | 1400 | if ($archiveresults == 'archiveresults') { |
| 1401 | - $settings = array_merge($settings,array('globalArchiveResults' => 'TRUE')); |
|
| 1401 | + $settings = array_merge($settings, array('globalArchiveResults' => 'TRUE')); |
|
| 1402 | 1402 | } else { |
| 1403 | - $settings = array_merge($settings,array('globalArchiveResults' => 'FALSE')); |
|
| 1403 | + $settings = array_merge($settings, array('globalArchiveResults' => 'FALSE')); |
|
| 1404 | 1404 | } |
| 1405 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
| 1405 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
| 1406 | 1406 | if ($daemon == 'daemon') { |
| 1407 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
| 1407 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
| 1408 | 1408 | } else { |
| 1409 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
| 1409 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
| 1410 | 1410 | } |
| 1411 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
| 1411 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
| 1412 | 1412 | if ($schedules == 'schedules') { |
| 1413 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
| 1413 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
| 1414 | 1414 | } else { |
| 1415 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
| 1415 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
| 1416 | 1416 | } |
| 1417 | 1417 | |
| 1418 | 1418 | /* |
@@ -1423,274 +1423,274 @@ discard block |
||
| 1423 | 1423 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
| 1424 | 1424 | } |
| 1425 | 1425 | */ |
| 1426 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
| 1427 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1428 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1429 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1430 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1426 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
| 1427 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
| 1428 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
| 1429 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
| 1430 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
| 1431 | 1431 | $va = false; |
| 1432 | 1432 | if ($globalivao == 'ivao') { |
| 1433 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
| 1433 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
| 1434 | 1434 | $va = true; |
| 1435 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1435 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
| 1436 | 1436 | if ($globalvatsim == 'vatsim') { |
| 1437 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
| 1437 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
| 1438 | 1438 | $va = true; |
| 1439 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1439 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
| 1440 | 1440 | if ($globalphpvms == 'phpvms') { |
| 1441 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
| 1441 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
| 1442 | 1442 | $va = true; |
| 1443 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1443 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
| 1444 | 1444 | if ($globalvam == 'vam') { |
| 1445 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
| 1445 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
| 1446 | 1446 | $va = true; |
| 1447 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1447 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
| 1448 | 1448 | if ($va) { |
| 1449 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
| 1450 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1449 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
| 1450 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
| 1451 | 1451 | if ($globalva == 'va' || $va) { |
| 1452 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
| 1453 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1452 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
| 1453 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1454 | 1454 | } else { |
| 1455 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1456 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1457 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1455 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
| 1456 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1457 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
| 1458 | 1458 | } |
| 1459 | 1459 | |
| 1460 | 1460 | |
| 1461 | - $mapoffline = filter_input(INPUT_POST,'mapoffline',FILTER_SANITIZE_STRING); |
|
| 1461 | + $mapoffline = filter_input(INPUT_POST, 'mapoffline', FILTER_SANITIZE_STRING); |
|
| 1462 | 1462 | if ($mapoffline == 'mapoffline') { |
| 1463 | - $settings = array_merge($settings,array('globalMapOffline' => 'TRUE')); |
|
| 1463 | + $settings = array_merge($settings, array('globalMapOffline' => 'TRUE')); |
|
| 1464 | 1464 | } else { |
| 1465 | - $settings = array_merge($settings,array('globalMapOffline' => 'FALSE')); |
|
| 1465 | + $settings = array_merge($settings, array('globalMapOffline' => 'FALSE')); |
|
| 1466 | 1466 | } |
| 1467 | - $globaloffline = filter_input(INPUT_POST,'globaloffline',FILTER_SANITIZE_STRING); |
|
| 1467 | + $globaloffline = filter_input(INPUT_POST, 'globaloffline', FILTER_SANITIZE_STRING); |
|
| 1468 | 1468 | if ($globaloffline == 'globaloffline') { |
| 1469 | - $settings = array_merge($settings,array('globalOffline' => 'TRUE')); |
|
| 1469 | + $settings = array_merge($settings, array('globalOffline' => 'TRUE')); |
|
| 1470 | 1470 | } else { |
| 1471 | - $settings = array_merge($settings,array('globalOffline' => 'FALSE')); |
|
| 1471 | + $settings = array_merge($settings, array('globalOffline' => 'FALSE')); |
|
| 1472 | 1472 | } |
| 1473 | 1473 | |
| 1474 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
| 1474 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
| 1475 | 1475 | if ($notam == 'notam') { |
| 1476 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
| 1476 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
| 1477 | 1477 | } else { |
| 1478 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
| 1478 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
| 1479 | 1479 | } |
| 1480 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
| 1480 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
| 1481 | 1481 | if ($owner == 'owner') { |
| 1482 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
| 1482 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
| 1483 | 1483 | } else { |
| 1484 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
| 1484 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
| 1485 | 1485 | } |
| 1486 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
| 1486 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
| 1487 | 1487 | if ($map3d == 'map3d') { |
| 1488 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
| 1488 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
| 1489 | 1489 | } else { |
| 1490 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
| 1490 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
| 1491 | 1491 | } |
| 1492 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
| 1492 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
| 1493 | 1493 | if ($crash == 'crash') { |
| 1494 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
| 1494 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
| 1495 | 1495 | } else { |
| 1496 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
| 1496 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
| 1497 | 1497 | } |
| 1498 | - $fires = filter_input(INPUT_POST,'fires',FILTER_SANITIZE_STRING); |
|
| 1498 | + $fires = filter_input(INPUT_POST, 'fires', FILTER_SANITIZE_STRING); |
|
| 1499 | 1499 | if ($fires == 'fires') { |
| 1500 | - $settings = array_merge($settings,array('globalMapFires' => 'TRUE')); |
|
| 1500 | + $settings = array_merge($settings, array('globalMapFires' => 'TRUE')); |
|
| 1501 | 1501 | } else { |
| 1502 | - $settings = array_merge($settings,array('globalMapFires' => 'FALSE')); |
|
| 1502 | + $settings = array_merge($settings, array('globalMapFires' => 'FALSE')); |
|
| 1503 | 1503 | } |
| 1504 | - $firessupport = filter_input(INPUT_POST,'firessupport',FILTER_SANITIZE_STRING); |
|
| 1504 | + $firessupport = filter_input(INPUT_POST, 'firessupport', FILTER_SANITIZE_STRING); |
|
| 1505 | 1505 | if ($firessupport == 'firessupport') { |
| 1506 | - $settings = array_merge($settings,array('globalFires' => 'TRUE')); |
|
| 1506 | + $settings = array_merge($settings, array('globalFires' => 'TRUE')); |
|
| 1507 | 1507 | } else { |
| 1508 | - $settings = array_merge($settings,array('globalFires' => 'FALSE')); |
|
| 1508 | + $settings = array_merge($settings, array('globalFires' => 'FALSE')); |
|
| 1509 | 1509 | } |
| 1510 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
| 1510 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
| 1511 | 1511 | if ($mapsatellites == 'mapsatellites') { |
| 1512 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
| 1512 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
| 1513 | 1513 | } else { |
| 1514 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
| 1514 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
| 1515 | 1515 | } |
| 1516 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
| 1516 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
| 1517 | 1517 | if ($map3ddefault == 'map3ddefault') { |
| 1518 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
| 1518 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
| 1519 | 1519 | } else { |
| 1520 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
| 1520 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
| 1521 | 1521 | } |
| 1522 | - $map3dliveries = filter_input(INPUT_POST,'map3dliveries',FILTER_SANITIZE_STRING); |
|
| 1522 | + $map3dliveries = filter_input(INPUT_POST, 'map3dliveries', FILTER_SANITIZE_STRING); |
|
| 1523 | 1523 | if ($map3dliveries == 'map3dliveries') { |
| 1524 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'TRUE')); |
|
| 1524 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'TRUE')); |
|
| 1525 | 1525 | } else { |
| 1526 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'FALSE')); |
|
| 1526 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'FALSE')); |
|
| 1527 | 1527 | } |
| 1528 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
| 1528 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
| 1529 | 1529 | if ($translate == 'translate') { |
| 1530 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
| 1530 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
| 1531 | 1531 | } else { |
| 1532 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
| 1532 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
| 1533 | 1533 | } |
| 1534 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
| 1534 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
| 1535 | 1535 | if ($realairlines == 'realairlines') { |
| 1536 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
| 1536 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
| 1537 | 1537 | } else { |
| 1538 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
| 1538 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
| 1539 | 1539 | } |
| 1540 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
| 1540 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
| 1541 | 1541 | if ($estimation == 'estimation') { |
| 1542 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
| 1542 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
| 1543 | 1543 | } else { |
| 1544 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
| 1544 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
| 1545 | 1545 | } |
| 1546 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
| 1546 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
| 1547 | 1547 | if ($metar == 'metar') { |
| 1548 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
| 1548 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
| 1549 | 1549 | } else { |
| 1550 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
| 1550 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
| 1551 | 1551 | } |
| 1552 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
| 1552 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
| 1553 | 1553 | if ($metarcycle == 'metarcycle') { |
| 1554 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
| 1554 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
| 1555 | 1555 | } else { |
| 1556 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
| 1556 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
| 1557 | 1557 | } |
| 1558 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
| 1558 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
| 1559 | 1559 | if ($fork == 'fork') { |
| 1560 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
| 1560 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
| 1561 | 1561 | } else { |
| 1562 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
| 1562 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
| 1563 | 1563 | } |
| 1564 | 1564 | |
| 1565 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
| 1565 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
| 1566 | 1566 | if ($colormap == 'colormap') { |
| 1567 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1567 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1568 | 1568 | } else { |
| 1569 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1569 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1570 | 1570 | } |
| 1571 | 1571 | |
| 1572 | 1572 | if (isset($_POST['aircrafticoncolor'])) { |
| 1573 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
| 1574 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
| 1573 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
| 1574 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
| 1575 | 1575 | } |
| 1576 | 1576 | |
| 1577 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1578 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
| 1577 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1578 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
| 1579 | 1579 | |
| 1580 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
| 1581 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
| 1582 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
| 1583 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
| 1584 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
| 1585 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
| 1580 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
| 1581 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
| 1582 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
| 1583 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
| 1584 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
| 1585 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
| 1586 | 1586 | |
| 1587 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
| 1587 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
| 1588 | 1588 | if ($mappopup == 'mappopup') { |
| 1589 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
| 1589 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
| 1590 | 1590 | } else { |
| 1591 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
| 1591 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
| 1592 | 1592 | } |
| 1593 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
| 1593 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
| 1594 | 1594 | if ($airportpopup == 'airportpopup') { |
| 1595 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
| 1595 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
| 1596 | 1596 | } else { |
| 1597 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
| 1597 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
| 1598 | 1598 | } |
| 1599 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
| 1599 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
| 1600 | 1600 | if ($maphistory == 'maphistory') { |
| 1601 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
| 1601 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
| 1602 | 1602 | } else { |
| 1603 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
| 1603 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
| 1604 | 1604 | } |
| 1605 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
| 1605 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
| 1606 | 1606 | if ($maptooltip == 'maptooltip') { |
| 1607 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
| 1607 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
| 1608 | 1608 | } else { |
| 1609 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
| 1609 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
| 1610 | 1610 | } |
| 1611 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
| 1611 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
| 1612 | 1612 | if ($flightroute == 'flightroute') { |
| 1613 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
| 1613 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
| 1614 | 1614 | } else { |
| 1615 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
| 1615 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
| 1616 | 1616 | } |
| 1617 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
| 1617 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
| 1618 | 1618 | if ($flightremainingroute == 'flightremainingroute') { |
| 1619 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1619 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1620 | 1620 | } else { |
| 1621 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1621 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1622 | 1622 | } |
| 1623 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
| 1623 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
| 1624 | 1624 | if ($allflights == 'allflights') { |
| 1625 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
| 1625 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
| 1626 | 1626 | } else { |
| 1627 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
| 1627 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
| 1628 | 1628 | } |
| 1629 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
| 1629 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
| 1630 | 1630 | if ($bbox == 'bbox') { |
| 1631 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
| 1631 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
| 1632 | 1632 | } else { |
| 1633 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
| 1633 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
| 1634 | 1634 | } |
| 1635 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
| 1635 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
| 1636 | 1636 | if ($groundaltitude == 'groundaltitude') { |
| 1637 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
| 1637 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
| 1638 | 1638 | } else { |
| 1639 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
| 1639 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
| 1640 | 1640 | } |
| 1641 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
| 1641 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
| 1642 | 1642 | if ($waypoints == 'waypoints') { |
| 1643 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
| 1643 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
| 1644 | 1644 | } else { |
| 1645 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
| 1645 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
| 1646 | 1646 | } |
| 1647 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
| 1647 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
| 1648 | 1648 | if ($geoid == 'geoid') { |
| 1649 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
| 1649 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
| 1650 | 1650 | } else { |
| 1651 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
| 1651 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
| 1652 | 1652 | } |
| 1653 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
| 1654 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
| 1653 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
| 1654 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
| 1655 | 1655 | |
| 1656 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
| 1656 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
| 1657 | 1657 | if ($noairlines == 'noairlines') { |
| 1658 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
| 1658 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
| 1659 | 1659 | } else { |
| 1660 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
| 1660 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
| 1661 | 1661 | } |
| 1662 | 1662 | |
| 1663 | - $tsk = filter_input(INPUT_POST,'tsk',FILTER_SANITIZE_STRING); |
|
| 1663 | + $tsk = filter_input(INPUT_POST, 'tsk', FILTER_SANITIZE_STRING); |
|
| 1664 | 1664 | if ($tsk == 'tsk') { |
| 1665 | - $settings = array_merge($settings,array('globalTSK' => 'TRUE')); |
|
| 1665 | + $settings = array_merge($settings, array('globalTSK' => 'TRUE')); |
|
| 1666 | 1666 | } else { |
| 1667 | - $settings = array_merge($settings,array('globalTSK' => 'FALSE')); |
|
| 1667 | + $settings = array_merge($settings, array('globalTSK' => 'FALSE')); |
|
| 1668 | 1668 | } |
| 1669 | - $mapmatching = filter_input(INPUT_POST,'mapmatching',FILTER_SANITIZE_STRING); |
|
| 1669 | + $mapmatching = filter_input(INPUT_POST, 'mapmatching', FILTER_SANITIZE_STRING); |
|
| 1670 | 1670 | if ($mapmatching == 'mapmatching') { |
| 1671 | - $settings = array_merge($settings,array('globalMapMatching' => 'TRUE')); |
|
| 1671 | + $settings = array_merge($settings, array('globalMapMatching' => 'TRUE')); |
|
| 1672 | 1672 | } else { |
| 1673 | - $settings = array_merge($settings,array('globalMapMatching' => 'FALSE')); |
|
| 1673 | + $settings = array_merge($settings, array('globalMapMatching' => 'FALSE')); |
|
| 1674 | 1674 | } |
| 1675 | - $mapmatchingsource = filter_input(INPUT_POST,'mapmatchingsource',FILTER_SANITIZE_STRING); |
|
| 1676 | - $settings = array_merge($settings,array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1677 | - $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
|
| 1678 | - $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
|
| 1675 | + $mapmatchingsource = filter_input(INPUT_POST, 'mapmatchingsource', FILTER_SANITIZE_STRING); |
|
| 1676 | + $settings = array_merge($settings, array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1677 | + $graphhopper = filter_input(INPUT_POST, 'graphhopper', FILTER_SANITIZE_STRING); |
|
| 1678 | + $settings = array_merge($settings, array('globalGraphHopperKey' => $graphhopper)); |
|
| 1679 | 1679 | |
| 1680 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1680 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
| 1681 | 1681 | |
| 1682 | 1682 | // Set some defaults values... |
| 1683 | 1683 | if (!isset($globalAircraftImageSources)) { |
| 1684 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1685 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1684 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
| 1685 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1686 | 1686 | } |
| 1687 | 1687 | |
| 1688 | 1688 | if (!isset($globalSchedulesSources)) { |
| 1689 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1690 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1689 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
| 1690 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1691 | 1691 | } |
| 1692 | 1692 | |
| 1693 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
| 1693 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
| 1694 | 1694 | |
| 1695 | 1695 | if ($error == '') settings::modify_settings($settings); |
| 1696 | 1696 | if ($error == '') settings::comment_settings($settings_comment); |
@@ -4,11 +4,19 @@ discard block |
||
| 4 | 4 | if (isset($_SESSION['error'])) { |
| 5 | 5 | header('Content-Encoding: none;'); |
| 6 | 6 | echo 'Error : '.$_SESSION['error'].' - Resetting install... You need to fix the problem and run install again.'; |
| 7 | - if (isset($_SESSION['error'])) unset($_SESSION['error']); |
|
| 8 | - if (isset($_SESSION['errorlst'])) unset($_SESSION['errorlst']); |
|
| 9 | - if (isset($_SESSION['next'])) unset($_SESSION['next']); |
|
| 10 | - if (isset($_SESSION['install'])) unset($_SESSION['install']); |
|
| 11 | -} |
|
| 7 | + if (isset($_SESSION['error'])) { |
|
| 8 | + unset($_SESSION['error']); |
|
| 9 | + } |
|
| 10 | + if (isset($_SESSION['errorlst'])) { |
|
| 11 | + unset($_SESSION['errorlst']); |
|
| 12 | + } |
|
| 13 | + if (isset($_SESSION['next'])) { |
|
| 14 | + unset($_SESSION['next']); |
|
| 15 | + } |
|
| 16 | + if (isset($_SESSION['install'])) { |
|
| 17 | + unset($_SESSION['install']); |
|
| 18 | + } |
|
| 19 | + } |
|
| 12 | 20 | /* |
| 13 | 21 | if (isset($_SESSION['errorlst'])) { |
| 14 | 22 | header('Content-Encoding: none;'); |
@@ -159,31 +167,49 @@ discard block |
||
| 159 | 167 | </div> |
| 160 | 168 | <p> |
| 161 | 169 | <label for="dbhost">Database hostname</label> |
| 162 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 170 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 171 | + print $globalDBhost; |
|
| 172 | +} |
|
| 173 | +?>" /> |
|
| 163 | 174 | </p> |
| 164 | 175 | <p> |
| 165 | 176 | <label for="dbport">Database port</label> |
| 166 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 177 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 178 | + print $globalDBport; |
|
| 179 | +} |
|
| 180 | +?>" /> |
|
| 167 | 181 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 168 | 182 | </p> |
| 169 | 183 | <p> |
| 170 | 184 | <label for="dbname">Database name</label> |
| 171 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 185 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 186 | + print $globalDBname; |
|
| 187 | +} |
|
| 188 | +?>" /> |
|
| 172 | 189 | </p> |
| 173 | 190 | <p> |
| 174 | 191 | <label for="dbuser">Database user</label> |
| 175 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 192 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 193 | + print $globalDBuser; |
|
| 194 | +} |
|
| 195 | +?>" /> |
|
| 176 | 196 | </p> |
| 177 | 197 | <p> |
| 178 | 198 | <label for="dbuserpass">Database user password</label> |
| 179 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 199 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 200 | + print $globalDBpass; |
|
| 201 | +} |
|
| 202 | +?>" /> |
|
| 180 | 203 | </p> |
| 181 | 204 | </fieldset> |
| 182 | 205 | <fieldset id="site"> |
| 183 | 206 | <legend>Site configuration</legend> |
| 184 | 207 | <p> |
| 185 | 208 | <label for="sitename">Site name</label> |
| 186 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 209 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 210 | + print $globalName; |
|
| 211 | +} |
|
| 212 | +?>" /> |
|
| 187 | 213 | </p> |
| 188 | 214 | <p> |
| 189 | 215 | <label for="siteurl">Site directory</label> |
@@ -196,18 +222,27 @@ discard block |
||
| 196 | 222 | } |
| 197 | 223 | } |
| 198 | 224 | ?> |
| 199 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 225 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 226 | + print $globalURL; |
|
| 227 | +} |
|
| 228 | +?>" /> |
|
| 200 | 229 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 201 | 230 | <p class="help-block">Can be empty</p> |
| 202 | 231 | </p> |
| 203 | 232 | <p> |
| 204 | 233 | <label for="timezone">Timezone</label> |
| 205 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 234 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 235 | + print $globalTimezone; |
|
| 236 | +} |
|
| 237 | +?>" /> |
|
| 206 | 238 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 207 | 239 | </p> |
| 208 | 240 | <p> |
| 209 | 241 | <label for="language">Language</label> |
| 210 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 242 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 243 | + print $globalLanguage; |
|
| 244 | +} |
|
| 245 | +?>" /> |
|
| 211 | 246 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 212 | 247 | </p> |
| 213 | 248 | </fieldset> |
@@ -227,11 +262,17 @@ discard block |
||
| 227 | 262 | <div id="mapbox_data"> |
| 228 | 263 | <p> |
| 229 | 264 | <label for="mapboxid">Mapbox id</label> |
| 230 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 265 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 266 | + print $globalMapboxId; |
|
| 267 | +} |
|
| 268 | +?>" /> |
|
| 231 | 269 | </p> |
| 232 | 270 | <p> |
| 233 | 271 | <label for="mapboxtoken">Mapbox token</label> |
| 234 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 272 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 273 | + print $globalMapboxToken; |
|
| 274 | +} |
|
| 275 | +?>" /> |
|
| 235 | 276 | </p> |
| 236 | 277 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 237 | 278 | </div> |
@@ -239,7 +280,10 @@ discard block |
||
| 239 | 280 | <div id="google_data"> |
| 240 | 281 | <p> |
| 241 | 282 | <label for="googlekey">Google API key</label> |
| 242 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 283 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 284 | + print $globalGoogleAPIKey; |
|
| 285 | +} |
|
| 286 | +?>" /> |
|
| 243 | 287 | <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> |
| 244 | 288 | </p> |
| 245 | 289 | </div> |
@@ -247,7 +291,10 @@ discard block |
||
| 247 | 291 | <div id="bing_data"> |
| 248 | 292 | <p> |
| 249 | 293 | <label for="bingkey">Bing Map key</label> |
| 250 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 294 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 295 | + print $globalBingMapKey; |
|
| 296 | +} |
|
| 297 | +?>" /> |
|
| 251 | 298 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 252 | 299 | </p> |
| 253 | 300 | </div> |
@@ -255,7 +302,10 @@ discard block |
||
| 255 | 302 | <div id="mapquest_data"> |
| 256 | 303 | <p> |
| 257 | 304 | <label for="mapquestkey">MapQuest key</label> |
| 258 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 305 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 306 | + print $globalMapQuestKey; |
|
| 307 | +} |
|
| 308 | +?>" /> |
|
| 259 | 309 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 260 | 310 | </p> |
| 261 | 311 | </div> |
@@ -263,11 +313,17 @@ discard block |
||
| 263 | 313 | <div id="here_data"> |
| 264 | 314 | <p> |
| 265 | 315 | <label for="hereappid">Here App_Id</label> |
| 266 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 316 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 317 | + print $globalHereappId; |
|
| 318 | +} |
|
| 319 | +?>" /> |
|
| 267 | 320 | </p> |
| 268 | 321 | <p> |
| 269 | 322 | <label for="hereappcode">Here App_Code</label> |
| 270 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 323 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 324 | + print $globalHereappCode; |
|
| 325 | +} |
|
| 326 | +?>" /> |
|
| 271 | 327 | </p> |
| 272 | 328 | <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> |
| 273 | 329 | </div> |
@@ -275,7 +331,10 @@ discard block |
||
| 275 | 331 | <div id="openweathermap_data"> |
| 276 | 332 | <p> |
| 277 | 333 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 278 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 334 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 335 | + print $globalOpenWeatherMapKey; |
|
| 336 | +} |
|
| 337 | +?>" /> |
|
| 279 | 338 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 280 | 339 | </p> |
| 281 | 340 | </div> |
@@ -304,42 +363,86 @@ discard block |
||
| 304 | 363 | <legend>Coverage area</legend> |
| 305 | 364 | <p> |
| 306 | 365 | <label for="latitudemax">The maximum latitude (north)</label> |
| 307 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 366 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 367 | + print $globalLatitudeMax; |
|
| 368 | +} |
|
| 369 | +?>" /> |
|
| 308 | 370 | </p> |
| 309 | 371 | <p> |
| 310 | 372 | <label for="latitudemin">The minimum latitude (south)</label> |
| 311 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 373 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 374 | + print $globalLatitudeMin; |
|
| 375 | +} |
|
| 376 | +?>" /> |
|
| 312 | 377 | </p> |
| 313 | 378 | <p> |
| 314 | 379 | <label for="longitudemax">The maximum longitude (west)</label> |
| 315 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 380 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 381 | + print $globalLongitudeMax; |
|
| 382 | +} |
|
| 383 | +?>" /> |
|
| 316 | 384 | </p> |
| 317 | 385 | <p> |
| 318 | 386 | <label for="longitudemin">The minimum longitude (east)</label> |
| 319 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 387 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 388 | + print $globalLongitudeMin; |
|
| 389 | +} |
|
| 390 | +?>" /> |
|
| 320 | 391 | </p> |
| 321 | 392 | <p> |
| 322 | 393 | <label for="latitudecenter">The latitude center</label> |
| 323 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 394 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 395 | + print $globalCenterLatitude; |
|
| 396 | +} |
|
| 397 | +?>" /> |
|
| 324 | 398 | </p> |
| 325 | 399 | <p> |
| 326 | 400 | <label for="longitudecenter">The longitude center</label> |
| 327 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 401 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 402 | + print $globalCenterLongitude; |
|
| 403 | +} |
|
| 404 | +?>" /> |
|
| 328 | 405 | </p> |
| 329 | 406 | <p> |
| 330 | 407 | <label for="livezoom">Default Zoom on live map</label> |
| 331 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 408 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 409 | + print $globalLiveZoom; |
|
| 410 | +} else { |
|
| 411 | + print '9'; |
|
| 412 | +} |
|
| 413 | +?>" /> |
|
| 332 | 414 | </p> |
| 333 | 415 | <p> |
| 334 | 416 | <label for="squawk_country">Country for squawk usage</label> |
| 335 | 417 | <select name="squawk_country" id="squawk_country"> |
| 336 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 337 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 338 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 339 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 340 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 341 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 342 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 418 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 419 | + print ' selected '; |
|
| 420 | +} |
|
| 421 | +?>>UK</option> |
|
| 422 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 423 | + print ' selected '; |
|
| 424 | +} |
|
| 425 | +?>>NZ</option> |
|
| 426 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 427 | + print ' selected '; |
|
| 428 | +} |
|
| 429 | +?>>US</option> |
|
| 430 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 431 | + print ' selected '; |
|
| 432 | +} |
|
| 433 | +?>>AU</option> |
|
| 434 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 435 | + print ' selected '; |
|
| 436 | +} |
|
| 437 | +?>>NL</option> |
|
| 438 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 439 | + print ' selected '; |
|
| 440 | +} |
|
| 441 | +?>>FR</option> |
|
| 442 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 443 | + print ' selected '; |
|
| 444 | +} |
|
| 445 | +?>>TR</option> |
|
| 343 | 446 | </select> |
| 344 | 447 | </p> |
| 345 | 448 | </fieldset> |
@@ -348,15 +451,24 @@ discard block |
||
| 348 | 451 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 349 | 452 | <p> |
| 350 | 453 | <label for="latitude">Center latitude</label> |
| 351 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 454 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 455 | + echo $globalDistanceIgnore['latitude']; |
|
| 456 | +} |
|
| 457 | +?>" /> |
|
| 352 | 458 | </p> |
| 353 | 459 | <p> |
| 354 | 460 | <label for="longitude">Center longitude</label> |
| 355 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 461 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 462 | + echo $globalDistanceIgnore['longitude']; |
|
| 463 | +} |
|
| 464 | +?>" /> |
|
| 356 | 465 | </p> |
| 357 | 466 | <p> |
| 358 | 467 | <label for="Distance">Distance (in km)</label> |
| 359 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 468 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 469 | + echo $globalDistanceIgnore['distance']; |
|
| 470 | +} |
|
| 471 | +?>" /> |
|
| 360 | 472 | </p> |
| 361 | 473 | </fieldset> |
| 362 | 474 | <fieldset id="sourceloc"> |
@@ -472,11 +584,17 @@ discard block |
||
| 472 | 584 | <div id="flightaware_data"> |
| 473 | 585 | <p> |
| 474 | 586 | <label for="flightawareusername">FlightAware username</label> |
| 475 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 587 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 588 | + print $globalFlightAwareUsername; |
|
| 589 | +} |
|
| 590 | +?>" /> |
|
| 476 | 591 | </p> |
| 477 | 592 | <p> |
| 478 | 593 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 479 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 594 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 595 | + print $globalFlightAwarePassword; |
|
| 596 | +} |
|
| 597 | +?>" /> |
|
| 480 | 598 | </p> |
| 481 | 599 | </div> |
| 482 | 600 | --> |
@@ -518,7 +636,10 @@ discard block |
||
| 518 | 636 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 519 | 637 | ?> |
| 520 | 638 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 521 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 639 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 640 | + print $source['port']; |
|
| 641 | +} |
|
| 642 | +?>" /></td> |
|
| 522 | 643 | <?php |
| 523 | 644 | } else { |
| 524 | 645 | $hostport = explode(':',$source['host']); |
@@ -537,35 +658,110 @@ discard block |
||
| 537 | 658 | ?> |
| 538 | 659 | <td> |
| 539 | 660 | <select name="format[]" id="format"> |
| 540 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 541 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 542 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 543 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 544 | - <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option> |
|
| 545 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 546 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 547 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 548 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 549 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 550 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 551 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 552 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 553 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 554 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 555 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 556 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 557 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 558 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 559 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 560 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 561 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 661 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 662 | + print 'selected'; |
|
| 663 | +} |
|
| 664 | +?>>Auto</option> |
|
| 665 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 666 | + print 'selected'; |
|
| 667 | +} |
|
| 668 | +?>>SBS</option> |
|
| 669 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 670 | + print 'selected'; |
|
| 671 | +} |
|
| 672 | +?>>TSV</option> |
|
| 673 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 674 | + print 'selected'; |
|
| 675 | +} |
|
| 676 | +?>>Raw</option> |
|
| 677 | + <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') { |
|
| 678 | + print 'selected'; |
|
| 679 | +} |
|
| 680 | +?>>Dump1090 aircraft.json</option> |
|
| 681 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 682 | + print 'selected'; |
|
| 683 | +} |
|
| 684 | +?>>APRS</option> |
|
| 685 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 686 | + print 'selected'; |
|
| 687 | +} |
|
| 688 | +?>>Radarcape deltadb.txt</option> |
|
| 689 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 690 | + print 'selected'; |
|
| 691 | +} |
|
| 692 | +?>>Vatsim</option> |
|
| 693 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 694 | + print 'selected'; |
|
| 695 | +} |
|
| 696 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 697 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 698 | + print 'selected'; |
|
| 699 | +} |
|
| 700 | +?>>Virtual Radar Server TCP</option> |
|
| 701 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 702 | + print 'selected'; |
|
| 703 | +} |
|
| 704 | +?>>phpVMS</option> |
|
| 705 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 706 | + print 'selected'; |
|
| 707 | +} |
|
| 708 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 709 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 710 | + print 'selected'; |
|
| 711 | +} |
|
| 712 | +?>>Virtual Airlines Manager</option> |
|
| 713 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 714 | + print 'selected'; |
|
| 715 | +} |
|
| 716 | +?>>IVAO</option> |
|
| 717 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 718 | + print 'selected'; |
|
| 719 | +} |
|
| 720 | +?>>FlightGear Multiplayer</option> |
|
| 721 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 722 | + print 'selected'; |
|
| 723 | +} |
|
| 724 | +?>>FlightGear Singleplayer</option> |
|
| 725 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 726 | + print 'selected'; |
|
| 727 | +} |
|
| 728 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 729 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 730 | + print 'selected'; |
|
| 731 | +} |
|
| 732 | +?>>ACARS SBS-3 over TCP</option> |
|
| 733 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 734 | + print 'selected'; |
|
| 735 | +} |
|
| 736 | +?>>NMEA AIS over TCP</option> |
|
| 737 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 738 | + print 'selected'; |
|
| 739 | +} |
|
| 740 | +?>>AirWhere website</option> |
|
| 741 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 742 | + print 'selected'; |
|
| 743 | +} |
|
| 744 | +?>>HidnSeek Callback</option> |
|
| 745 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 746 | + print 'selected'; |
|
| 747 | +} |
|
| 748 | +?>>Blitzortung</option> |
|
| 562 | 749 | </select> |
| 563 | 750 | </td> |
| 564 | 751 | <td> |
| 565 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 752 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 753 | + print $source['name']; |
|
| 754 | +} |
|
| 755 | +?>" /> |
|
| 566 | 756 | </td> |
| 567 | - <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> |
|
| 568 | - <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> |
|
| 757 | + <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']) { |
|
| 758 | + print 'checked'; |
|
| 759 | +} |
|
| 760 | +?> /></td> |
|
| 761 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 762 | + print 'checked'; |
|
| 763 | +} |
|
| 764 | +?> /></td> |
|
| 569 | 765 | <td> |
| 570 | 766 | <select name="timezones[]" id="timezones"> |
| 571 | 767 | <?php |
@@ -575,7 +771,9 @@ discard block |
||
| 575 | 771 | print '<option selected>'.$timezones.'</option>'; |
| 576 | 772 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 577 | 773 | print '<option selected>'.$timezones.'</option>'; |
| 578 | - } else print '<option>'.$timezones.'</option>'; |
|
| 774 | + } else { |
|
| 775 | + print '<option>'.$timezones.'</option>'; |
|
| 776 | + } |
|
| 579 | 777 | } |
| 580 | 778 | ?> |
| 581 | 779 | </select> |
@@ -627,7 +825,9 @@ discard block |
||
| 627 | 825 | foreach($timezonelist as $timezones){ |
| 628 | 826 | if ($timezones == 'UTC') { |
| 629 | 827 | print '<option selected>'.$timezones.'</option>'; |
| 630 | - } else print '<option>'.$timezones.'</option>'; |
|
| 828 | + } else { |
|
| 829 | + print '<option>'.$timezones.'</option>'; |
|
| 830 | + } |
|
| 631 | 831 | } |
| 632 | 832 | ?> |
| 633 | 833 | </select> |
@@ -652,11 +852,17 @@ discard block |
||
| 652 | 852 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 653 | 853 | <p> |
| 654 | 854 | <label for="acarshost">ACARS UDP host</label> |
| 655 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 855 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 856 | + print $globalACARSHost; |
|
| 857 | +} |
|
| 858 | +?>" /> |
|
| 656 | 859 | </p> |
| 657 | 860 | <p> |
| 658 | 861 | <label for="acarsport">ACARS UDP port</label> |
| 659 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 862 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 863 | + print $globalACARSPort; |
|
| 864 | +} |
|
| 865 | +?>" /> |
|
| 660 | 866 | </p> |
| 661 | 867 | </fieldset> |
| 662 | 868 | </div> |
@@ -682,17 +888,38 @@ discard block |
||
| 682 | 888 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 683 | 889 | <td> |
| 684 | 890 | <select name="newslang[]"> |
| 685 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 686 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 891 | + <option value="en"<?php if ($lng == 'en') { |
|
| 892 | + print ' selected'; |
|
| 893 | +} |
|
| 894 | +?>>English</option> |
|
| 895 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 896 | + print ' selected'; |
|
| 897 | +} |
|
| 898 | +?>>French</option> |
|
| 687 | 899 | </select> |
| 688 | 900 | </td> |
| 689 | 901 | <td> |
| 690 | 902 | <select name="newstype[]"> |
| 691 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 692 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 693 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 694 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 695 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 903 | + <option value="global"<?php if ($type == 'global') { |
|
| 904 | + print ' selected'; |
|
| 905 | +} |
|
| 906 | +?>>Global</option> |
|
| 907 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 908 | + print ' selected'; |
|
| 909 | +} |
|
| 910 | +?>>Aircraft</option> |
|
| 911 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 912 | + print ' selected'; |
|
| 913 | +} |
|
| 914 | +?>>Marine</option> |
|
| 915 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 916 | + print ' selected'; |
|
| 917 | +} |
|
| 918 | +?>>Tracker</option> |
|
| 919 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 920 | + print ' selected'; |
|
| 921 | +} |
|
| 922 | +?>>Satellite</option> |
|
| 696 | 923 | </select> |
| 697 | 924 | </td> |
| 698 | 925 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -825,13 +1052,19 @@ discard block |
||
| 825 | 1052 | <div id="schedules_options"> |
| 826 | 1053 | <p> |
| 827 | 1054 | <label for="britishairways">British Airways API Key</label> |
| 828 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1055 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1056 | + print $globalBritishAirwaysKey; |
|
| 1057 | +} |
|
| 1058 | +?>" /> |
|
| 829 | 1059 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 830 | 1060 | </p> |
| 831 | 1061 | <!-- |
| 832 | 1062 | <p> |
| 833 | 1063 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 834 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1064 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1065 | + print $globalTransaviaKey; |
|
| 1066 | +} |
|
| 1067 | +?>" /> |
|
| 835 | 1068 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 836 | 1069 | </p> |
| 837 | 1070 | --> |
@@ -840,10 +1073,16 @@ discard block |
||
| 840 | 1073 | <b>Lufthansa API Key</b> |
| 841 | 1074 | <p> |
| 842 | 1075 | <label for="lufthansakey">Key</label> |
| 843 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1076 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1077 | + print $globalLufthansaKey['key']; |
|
| 1078 | +} |
|
| 1079 | +?>" /> |
|
| 844 | 1080 | </p><p> |
| 845 | 1081 | <label for="lufthansasecret">Secret</label> |
| 846 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1082 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1083 | + print $globalLufthansaKey['secret']; |
|
| 1084 | +} |
|
| 1085 | +?>" /> |
|
| 847 | 1086 | </p> |
| 848 | 1087 | </div> |
| 849 | 1088 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -853,11 +1092,17 @@ discard block |
||
| 853 | 1092 | <b>FlightAware API Key</b> |
| 854 | 1093 | <p> |
| 855 | 1094 | <label for="flightawareusername">Username</label> |
| 856 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1095 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1096 | + print $globalFlightAwareUsername; |
|
| 1097 | +} |
|
| 1098 | +?>" /> |
|
| 857 | 1099 | </p> |
| 858 | 1100 | <p> |
| 859 | 1101 | <label for="flightawarepassword">API key</label> |
| 860 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1102 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1103 | + print $globalFlightAwarePassword; |
|
| 1104 | +} |
|
| 1105 | +?>" /> |
|
| 861 | 1106 | </p> |
| 862 | 1107 | </div> |
| 863 | 1108 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -874,16 +1119,28 @@ discard block |
||
| 874 | 1119 | <p> |
| 875 | 1120 | <label for="mapmatchingsource">Map Matching source</label> |
| 876 | 1121 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 877 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 878 | - <option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>OSMR</option> |
|
| 879 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1122 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1123 | + print 'selected="selected" '; |
|
| 1124 | +} |
|
| 1125 | +?>>GraphHopper</option> |
|
| 1126 | + <option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) { |
|
| 1127 | + print 'selected="selected" '; |
|
| 1128 | +} |
|
| 1129 | +?>>OSMR</option> |
|
| 1130 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1131 | + print 'selected="selected" '; |
|
| 1132 | +} |
|
| 1133 | +?>>Mapbox</option> |
|
| 880 | 1134 | </select> |
| 881 | 1135 | <p class="help-block">Mapbox need the API Key defined in map section</p> |
| 882 | 1136 | </p> |
| 883 | 1137 | <br /> |
| 884 | 1138 | <p> |
| 885 | 1139 | <label for="graphhopper">GraphHopper API Key</label> |
| 886 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1140 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1141 | + print $globalGraphHopperKey; |
|
| 1142 | +} |
|
| 1143 | +?>" /> |
|
| 887 | 1144 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 888 | 1145 | </p> |
| 889 | 1146 | </div> |
@@ -901,7 +1158,10 @@ discard block |
||
| 901 | 1158 | </p> |
| 902 | 1159 | <p> |
| 903 | 1160 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 904 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1161 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1162 | + print $globalNOTAMSource; |
|
| 1163 | +} |
|
| 1164 | +?>" /> |
|
| 905 | 1165 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 906 | 1166 | </p> |
| 907 | 1167 | <br /> |
@@ -917,14 +1177,20 @@ discard block |
||
| 917 | 1177 | <div id="metarsrc"> |
| 918 | 1178 | <p> |
| 919 | 1179 | <label for="metarsource">URL of your METAR source</label> |
| 920 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1180 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1181 | + print $globalMETARurl; |
|
| 1182 | +} |
|
| 1183 | +?>" /> |
|
| 921 | 1184 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 922 | 1185 | </p> |
| 923 | 1186 | </div> |
| 924 | 1187 | <br /> |
| 925 | 1188 | <p> |
| 926 | 1189 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 927 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1190 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1191 | + print $globalBitlyAccessToken; |
|
| 1192 | +} |
|
| 1193 | +?>" /> |
|
| 928 | 1194 | </p> |
| 929 | 1195 | <br /> |
| 930 | 1196 | <p> |
@@ -940,11 +1206,26 @@ discard block |
||
| 940 | 1206 | <p> |
| 941 | 1207 | <label for="geoid_source">Geoid Source</label> |
| 942 | 1208 | <select name="geoid_source" id="geoid_source"> |
| 943 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 944 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 945 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 946 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 947 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1209 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1210 | + print ' selected="selected"'; |
|
| 1211 | +} |
|
| 1212 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1213 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1214 | + print ' selected="selected"'; |
|
| 1215 | +} |
|
| 1216 | +?>>EGM96 5' (19MB)</option> |
|
| 1217 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1218 | + print ' selected="selected"'; |
|
| 1219 | +} |
|
| 1220 | +?>>EGM2008 5' (19MB)</option> |
|
| 1221 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1222 | + print ' selected="selected"'; |
|
| 1223 | +} |
|
| 1224 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1225 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1226 | + print ' selected="selected"'; |
|
| 1227 | +} |
|
| 1228 | +?>>EGM2008 1' (470MB)</option> |
|
| 948 | 1229 | </select> |
| 949 | 1230 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 950 | 1231 | </p> |
@@ -966,7 +1247,12 @@ discard block |
||
| 966 | 1247 | </p> |
| 967 | 1248 | <p> |
| 968 | 1249 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 969 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1250 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1251 | + print $globalArchiveMonths; |
|
| 1252 | +} else { |
|
| 1253 | + echo '1'; |
|
| 1254 | +} |
|
| 1255 | +?>" /> |
|
| 970 | 1256 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 971 | 1257 | </p> |
| 972 | 1258 | <p> |
@@ -976,12 +1262,22 @@ discard block |
||
| 976 | 1262 | </p> |
| 977 | 1263 | <p> |
| 978 | 1264 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 979 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1265 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1266 | + print $globalArchiveKeepMonths; |
|
| 1267 | +} else { |
|
| 1268 | + echo '1'; |
|
| 1269 | +} |
|
| 1270 | +?>" /> |
|
| 980 | 1271 | <p class="help-block">0 to disable</p> |
| 981 | 1272 | </p> |
| 982 | 1273 | <p> |
| 983 | 1274 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 984 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1275 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1276 | + print $globalArchiveKeepTrackMonths; |
|
| 1277 | +} else { |
|
| 1278 | + echo '1'; |
|
| 1279 | +} |
|
| 1280 | +?>" /> |
|
| 985 | 1281 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 986 | 1282 | </p> |
| 987 | 1283 | <br /> |
@@ -991,7 +1287,12 @@ discard block |
||
| 991 | 1287 | <p class="help-block">Uncheck if the script is running as cron job. You should always run it as daemon when it's possible.</p> |
| 992 | 1288 | <div id="cronends"> |
| 993 | 1289 | <label for="cronend">Run script for xx seconds</label> |
| 994 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1290 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1291 | + print $globalCronEnd; |
|
| 1292 | +} else { |
|
| 1293 | + print '0'; |
|
| 1294 | +} |
|
| 1295 | +?>" /> |
|
| 995 | 1296 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 996 | 1297 | </div> |
| 997 | 1298 | </p> |
@@ -1044,20 +1345,40 @@ discard block |
||
| 1044 | 1345 | <br /> |
| 1045 | 1346 | <p> |
| 1046 | 1347 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1047 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1348 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1349 | + echo $globalLiveInterval; |
|
| 1350 | +} else { |
|
| 1351 | + echo '200'; |
|
| 1352 | +} |
|
| 1353 | +?>" /> |
|
| 1048 | 1354 | </p> |
| 1049 | 1355 | <p> |
| 1050 | 1356 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1051 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1357 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1358 | + echo $globalMapRefresh; |
|
| 1359 | +} else { |
|
| 1360 | + echo '30'; |
|
| 1361 | +} |
|
| 1362 | +?>" /> |
|
| 1052 | 1363 | </p> |
| 1053 | 1364 | <p> |
| 1054 | 1365 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1055 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1366 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1367 | + echo $globalMapIdleTimeout; |
|
| 1368 | +} else { |
|
| 1369 | + echo '30'; |
|
| 1370 | +} |
|
| 1371 | +?>" /> |
|
| 1056 | 1372 | <p class="help-block">0 to disable</p> |
| 1057 | 1373 | </p> |
| 1058 | 1374 | <p> |
| 1059 | 1375 | <label for="minfetch">HTTP/file source fetch every xxx seconds</label> |
| 1060 | - <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" /> |
|
| 1376 | + <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) { |
|
| 1377 | + echo $globalMinFetch; |
|
| 1378 | +} else { |
|
| 1379 | + echo '20'; |
|
| 1380 | +} |
|
| 1381 | +?>" /> |
|
| 1061 | 1382 | </p> |
| 1062 | 1383 | <p> |
| 1063 | 1384 | <label for="bbox">Only display flights that we can see on screen (bounding box)</label> |
@@ -1071,12 +1392,20 @@ discard block |
||
| 1071 | 1392 | <br /> |
| 1072 | 1393 | <p> |
| 1073 | 1394 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1074 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1395 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1396 | + echo $globalClosestMinDist; |
|
| 1397 | +} else { |
|
| 1398 | + echo '50'; |
|
| 1399 | +} |
|
| 1400 | +?>" /> |
|
| 1075 | 1401 | </p> |
| 1076 | 1402 | <br /> |
| 1077 | 1403 | <p> |
| 1078 | 1404 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1079 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1405 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1406 | + echo $globalAircraftSize; |
|
| 1407 | +} |
|
| 1408 | +?>" /> |
|
| 1080 | 1409 | </p> |
| 1081 | 1410 | <br /> |
| 1082 | 1411 | <p> |
@@ -1095,7 +1424,12 @@ discard block |
||
| 1095 | 1424 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 1096 | 1425 | ?> |
| 1097 | 1426 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1098 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1427 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1428 | + echo $globalAircraftIconColor; |
|
| 1429 | +} else { |
|
| 1430 | + echo '1a3151'; |
|
| 1431 | +} |
|
| 1432 | +?>" /> |
|
| 1099 | 1433 | <?php |
| 1100 | 1434 | if (!is_writable('../cache')) { |
| 1101 | 1435 | ?> |
@@ -1113,14 +1447,27 @@ discard block |
||
| 1113 | 1447 | <p> |
| 1114 | 1448 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1115 | 1449 | <div class="range"> |
| 1116 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1117 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1450 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1451 | + echo $globalAirportZoom; |
|
| 1452 | +} else { |
|
| 1453 | + echo '7'; |
|
| 1454 | +} |
|
| 1455 | +?>" /> |
|
| 1456 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1457 | + echo $globalAirportZoom; |
|
| 1458 | +} else { |
|
| 1459 | + echo '7'; |
|
| 1460 | +} |
|
| 1461 | +?></output> |
|
| 1118 | 1462 | </div> |
| 1119 | 1463 | </p> |
| 1120 | 1464 | <br /> |
| 1121 | 1465 | <p> |
| 1122 | 1466 | <label for="customcss">Custom CSS web path</label> |
| 1123 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1467 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1468 | + echo $globalCustomCSS; |
|
| 1469 | +} |
|
| 1470 | +?>" /> |
|
| 1124 | 1471 | </p> |
| 1125 | 1472 | </fieldset> |
| 1126 | 1473 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1147,8 +1494,12 @@ discard block |
||
| 1147 | 1494 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1148 | 1495 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1149 | 1496 | |
| 1150 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1151 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1497 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1498 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1499 | + } |
|
| 1500 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1501 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1502 | + } |
|
| 1152 | 1503 | |
| 1153 | 1504 | $_SESSION['database_root'] = $dbroot; |
| 1154 | 1505 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1216,15 +1567,23 @@ discard block |
||
| 1216 | 1567 | $source_city = $_POST['source_city']; |
| 1217 | 1568 | $source_country = $_POST['source_country']; |
| 1218 | 1569 | $source_ref = $_POST['source_ref']; |
| 1219 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1220 | - else $source_id = array(); |
|
| 1570 | + if (isset($source_id)) { |
|
| 1571 | + $source_id = $_POST['source_id']; |
|
| 1572 | + } else { |
|
| 1573 | + $source_id = array(); |
|
| 1574 | + } |
|
| 1221 | 1575 | |
| 1222 | 1576 | $sources = array(); |
| 1223 | 1577 | foreach ($source_name as $keys => $name) { |
| 1224 | - 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]); |
|
| 1225 | - 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]); |
|
| 1578 | + if (isset($source_id[$keys])) { |
|
| 1579 | + $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]); |
|
| 1580 | + } else { |
|
| 1581 | + $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]); |
|
| 1582 | + } |
|
| 1583 | + } |
|
| 1584 | + if (count($sources) > 0) { |
|
| 1585 | + $_SESSION['sources'] = $sources; |
|
| 1226 | 1586 | } |
| 1227 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1228 | 1587 | |
| 1229 | 1588 | $newsurl = $_POST['newsurl']; |
| 1230 | 1589 | $newslng = $_POST['newslang']; |
@@ -1237,7 +1596,9 @@ discard block |
||
| 1237 | 1596 | $lng = $newslng[$newskey]; |
| 1238 | 1597 | if (isset($newsfeeds[$type][$lng])) { |
| 1239 | 1598 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1240 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1599 | + } else { |
|
| 1600 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1601 | + } |
|
| 1241 | 1602 | } |
| 1242 | 1603 | } |
| 1243 | 1604 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1261,17 +1622,29 @@ discard block |
||
| 1261 | 1622 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1262 | 1623 | |
| 1263 | 1624 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1264 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1265 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1625 | + if ($globalaircraft == 'aircraft') { |
|
| 1626 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1627 | + } else { |
|
| 1628 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1629 | + } |
|
| 1266 | 1630 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1267 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1268 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1631 | + if ($globaltracker == 'tracker') { |
|
| 1632 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1633 | + } else { |
|
| 1634 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1635 | + } |
|
| 1269 | 1636 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1270 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1271 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1637 | + if ($globalmarine == 'marine') { |
|
| 1638 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1639 | + } else { |
|
| 1640 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1641 | + } |
|
| 1272 | 1642 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1273 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1274 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1643 | + if ($globalsatellite == 'satellite') { |
|
| 1644 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1645 | + } else { |
|
| 1646 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1647 | + } |
|
| 1275 | 1648 | |
| 1276 | 1649 | /* |
| 1277 | 1650 | $globalSBS1Hosts = array(); |
@@ -1293,23 +1666,37 @@ discard block |
||
| 1293 | 1666 | $name = $_POST['name']; |
| 1294 | 1667 | $format = $_POST['format']; |
| 1295 | 1668 | $timezones = $_POST['timezones']; |
| 1296 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1297 | - else $sourcestats = array(); |
|
| 1298 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1299 | - else $noarchive = array(); |
|
| 1669 | + if (isset($_POST['sourcestats'])) { |
|
| 1670 | + $sourcestats = $_POST['sourcestats']; |
|
| 1671 | + } else { |
|
| 1672 | + $sourcestats = array(); |
|
| 1673 | + } |
|
| 1674 | + if (isset($_POST['noarchive'])) { |
|
| 1675 | + $noarchive = $_POST['noarchive']; |
|
| 1676 | + } else { |
|
| 1677 | + $noarchive = array(); |
|
| 1678 | + } |
|
| 1300 | 1679 | $gSources = array(); |
| 1301 | 1680 | $forcepilots = false; |
| 1302 | 1681 | foreach ($host as $key => $h) { |
| 1303 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1304 | - else $cov = 'FALSE'; |
|
| 1305 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1306 | - else $arch = 'FALSE'; |
|
| 1682 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1683 | + $cov = 'TRUE'; |
|
| 1684 | + } else { |
|
| 1685 | + $cov = 'FALSE'; |
|
| 1686 | + } |
|
| 1687 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1688 | + $arch = 'TRUE'; |
|
| 1689 | + } else { |
|
| 1690 | + $arch = 'FALSE'; |
|
| 1691 | + } |
|
| 1307 | 1692 | if (strpos($format[$key],'_callback')) { |
| 1308 | 1693 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1309 | 1694 | } elseif ($h != '' || $name[$key] != '') { |
| 1310 | 1695 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1311 | 1696 | } |
| 1312 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1697 | + if ($format[$key] == 'airwhere') { |
|
| 1698 | + $forcepilots = true; |
|
| 1699 | + } |
|
| 1313 | 1700 | } |
| 1314 | 1701 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1315 | 1702 | |
@@ -1340,7 +1727,9 @@ discard block |
||
| 1340 | 1727 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1341 | 1728 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1342 | 1729 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1343 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1730 | + } else { |
|
| 1731 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1732 | + } |
|
| 1344 | 1733 | |
| 1345 | 1734 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1346 | 1735 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1381,7 +1770,9 @@ discard block |
||
| 1381 | 1770 | |
| 1382 | 1771 | // Create in settings.php keys not yet configurable if not already here |
| 1383 | 1772 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1384 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1773 | + if (!isset($globalDebug)) { |
|
| 1774 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1775 | + } |
|
| 1385 | 1776 | |
| 1386 | 1777 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1387 | 1778 | if ($resetyearstats == 'resetyearstats') { |
@@ -1424,37 +1815,56 @@ discard block |
||
| 1424 | 1815 | } |
| 1425 | 1816 | */ |
| 1426 | 1817 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1427 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1428 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1429 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1430 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1818 | + if ($globalsbs == 'sbs') { |
|
| 1819 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1820 | + } else { |
|
| 1821 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1822 | + } |
|
| 1823 | + if ($globalaprs == 'aprs') { |
|
| 1824 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1825 | + } else { |
|
| 1826 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1827 | + } |
|
| 1431 | 1828 | $va = false; |
| 1432 | 1829 | if ($globalivao == 'ivao') { |
| 1433 | 1830 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1434 | 1831 | $va = true; |
| 1435 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1832 | + } else { |
|
| 1833 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1834 | + } |
|
| 1436 | 1835 | if ($globalvatsim == 'vatsim') { |
| 1437 | 1836 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1438 | 1837 | $va = true; |
| 1439 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1838 | + } else { |
|
| 1839 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1840 | + } |
|
| 1440 | 1841 | if ($globalphpvms == 'phpvms') { |
| 1441 | 1842 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1442 | 1843 | $va = true; |
| 1443 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1844 | + } else { |
|
| 1845 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1846 | + } |
|
| 1444 | 1847 | if ($globalvam == 'vam') { |
| 1445 | 1848 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1446 | 1849 | $va = true; |
| 1447 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1850 | + } else { |
|
| 1851 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1852 | + } |
|
| 1448 | 1853 | if ($va) { |
| 1449 | 1854 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1450 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1855 | + } else { |
|
| 1856 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1857 | + } |
|
| 1451 | 1858 | if ($globalva == 'va' || $va) { |
| 1452 | 1859 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1453 | 1860 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1454 | 1861 | } else { |
| 1455 | 1862 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1456 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1457 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1863 | + if ($forcepilots) { |
|
| 1864 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1865 | + } else { |
|
| 1866 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1867 | + } |
|
| 1458 | 1868 | } |
| 1459 | 1869 | |
| 1460 | 1870 | |
@@ -1677,7 +2087,9 @@ discard block |
||
| 1677 | 2087 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1678 | 2088 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1679 | 2089 | |
| 1680 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2090 | + if (!isset($globalTransaction)) { |
|
| 2091 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2092 | + } |
|
| 1681 | 2093 | |
| 1682 | 2094 | // Set some defaults values... |
| 1683 | 2095 | if (!isset($globalAircraftImageSources)) { |
@@ -1692,15 +2104,23 @@ discard block |
||
| 1692 | 2104 | |
| 1693 | 2105 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1694 | 2106 | |
| 1695 | - if ($error == '') settings::modify_settings($settings); |
|
| 1696 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2107 | + if ($error == '') { |
|
| 2108 | + settings::modify_settings($settings); |
|
| 2109 | + } |
|
| 2110 | + if ($error == '') { |
|
| 2111 | + settings::comment_settings($settings_comment); |
|
| 2112 | + } |
|
| 1697 | 2113 | if ($error != '') { |
| 1698 | 2114 | print '<div class="info column">'.$error.'</div>'; |
| 1699 | 2115 | require('../footer.php'); |
| 1700 | 2116 | exit; |
| 1701 | 2117 | } else { |
| 1702 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1703 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2118 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2119 | + $_SESSION['waypoints'] = 1; |
|
| 2120 | + } |
|
| 2121 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2122 | + $_SESSION['owner'] = 1; |
|
| 2123 | + } |
|
| 1704 | 2124 | if (isset($_POST['createdb'])) { |
| 1705 | 2125 | $_SESSION['install'] = 'database_create'; |
| 1706 | 2126 | } else { |
@@ -1737,10 +2157,18 @@ discard block |
||
| 1737 | 2157 | $popw = false; |
| 1738 | 2158 | foreach ($_SESSION['done'] as $done) { |
| 1739 | 2159 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1740 | - if ($done == 'Create database') $pop = true; |
|
| 1741 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1742 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1743 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2160 | + if ($done == 'Create database') { |
|
| 2161 | + $pop = true; |
|
| 2162 | + } |
|
| 2163 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2164 | + $pop = true; |
|
| 2165 | + } |
|
| 2166 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2167 | + $popi = true; |
|
| 2168 | + } |
|
| 2169 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2170 | + $popw = true; |
|
| 2171 | + } |
|
| 1744 | 2172 | } |
| 1745 | 2173 | if ($pop) { |
| 1746 | 2174 | sleep(5); |
@@ -1751,7 +2179,9 @@ discard block |
||
| 1751 | 2179 | } else if ($popw) { |
| 1752 | 2180 | sleep(5); |
| 1753 | 2181 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1754 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2182 | + } else { |
|
| 2183 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2184 | + } |
|
| 1755 | 2185 | print '</div></ul>'; |
| 1756 | 2186 | print '<div id="error"></div>'; |
| 1757 | 2187 | /* foreach ($_SESSION['done'] as $done) { |