@@ -364,17 +364,17 @@ discard block |
||
| 364 | 364 | </tr> |
| 365 | 365 | |
| 366 | 366 | <?php |
| 367 | - if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 367 | + if (isset($globalDBuser) && isset($globalDBpass) && $globalDBuser != '' && $globalDBpass != '') { |
|
| 368 | 368 | ?> |
| 369 | 369 | <!-- |
| 370 | 370 | <?php |
| 371 | - require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 372 | - $Connection = new Connection(); |
|
| 371 | + require_once(dirname(__FILE__).'/../require/class.Connection.php'); |
|
| 372 | + $Connection = new Connection(); |
|
| 373 | 373 | ?> |
| 374 | 374 | --> |
| 375 | 375 | <?php |
| 376 | 376 | if ($Connection->db != NULL) { |
| 377 | - if ($Connection->tableExists('source_location')) { |
|
| 377 | + if ($Connection->tableExists('source_location')) { |
|
| 378 | 378 | require_once(dirname(__FILE__).'/../require/class.Source.php'); |
| 379 | 379 | $Source = new Source(); |
| 380 | 380 | //$alllocations = $Source->getAllLocationInfo(); |
@@ -394,9 +394,9 @@ discard block |
||
| 394 | 394 | |
| 395 | 395 | <?php |
| 396 | 396 | } |
| 397 | - } |
|
| 397 | + } |
|
| 398 | + } |
|
| 398 | 399 | } |
| 399 | - } |
|
| 400 | 400 | ?> |
| 401 | 401 | |
| 402 | 402 | <tr> |
@@ -506,12 +506,12 @@ discard block |
||
| 506 | 506 | ?> |
| 507 | 507 | <tr> |
| 508 | 508 | <?php |
| 509 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 509 | + if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 510 | 510 | ?> |
| 511 | 511 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 512 | 512 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 513 | 513 | <?php |
| 514 | - } else { |
|
| 514 | + } else { |
|
| 515 | 515 | $hostport = explode(':',$source['host']); |
| 516 | 516 | if (isset($hostport[1])) { |
| 517 | 517 | $host = $hostport[0]; |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | <td><input type="text" name="host[]" id="host" value="<?php print $host; ?>" /></td> |
| 525 | 525 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php print $port; ?>" /></td> |
| 526 | 526 | <?php |
| 527 | - } |
|
| 527 | + } |
|
| 528 | 528 | ?> |
| 529 | 529 | <td> |
| 530 | 530 | <select name="format[]" id="format"> |
@@ -661,9 +661,9 @@ discard block |
||
| 661 | 661 | </thead> |
| 662 | 662 | <tbody> |
| 663 | 663 | <?php |
| 664 | - if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 664 | + if (isset($globalNewsFeeds) && !empty($globalNewsFeeds)) { |
|
| 665 | 665 | foreach ($globalNewsFeeds as $type => $feedslng) { |
| 666 | - foreach ($feedslng as $lng => $feeds) { |
|
| 666 | + foreach ($feedslng as $lng => $feeds) { |
|
| 667 | 667 | foreach ($feeds as $feed) { |
| 668 | 668 | ?> |
| 669 | 669 | <tr> |
@@ -688,9 +688,9 @@ discard block |
||
| 688 | 688 | |
| 689 | 689 | <?php |
| 690 | 690 | } |
| 691 | - } |
|
| 691 | + } |
|
| 692 | + } |
|
| 692 | 693 | } |
| 693 | - } |
|
| 694 | 694 | ?> |
| 695 | 695 | <tr> |
| 696 | 696 | <td><input type="url" name="newsurl[]" /></td> |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | <br /> |
| 1077 | 1077 | <p> |
| 1078 | 1078 | <?php |
| 1079 | - if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1079 | + if (extension_loaded('gd') && function_exists('gd_info')) { |
|
| 1080 | 1080 | ?> |
| 1081 | 1081 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1082 | 1082 | <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
@@ -1086,11 +1086,11 @@ discard block |
||
| 1086 | 1086 | <b>The directory cache is not writable, aircraft icon will not be cached</b> |
| 1087 | 1087 | <?php |
| 1088 | 1088 | } |
| 1089 | - } else { |
|
| 1089 | + } else { |
|
| 1090 | 1090 | ?> |
| 1091 | 1091 | <b>PHP GD is not installed, you can't change color of aircraft icon on map</b> |
| 1092 | 1092 | <?php |
| 1093 | - } |
|
| 1093 | + } |
|
| 1094 | 1094 | ?> |
| 1095 | 1095 | </p> |
| 1096 | 1096 | <br /> |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | </p> |
| 1115 | 1115 | <?php |
| 1116 | 1116 | require('../footer.php'); |
| 1117 | - exit; |
|
| 1117 | + exit; |
|
| 1118 | 1118 | } |
| 1119 | 1119 | // ' |
| 1120 | 1120 | $settings = array(); |
@@ -1205,8 +1205,8 @@ discard block |
||
| 1205 | 1205 | |
| 1206 | 1206 | $sources = array(); |
| 1207 | 1207 | foreach ($source_name as $keys => $name) { |
| 1208 | - 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]); |
|
| 1209 | - 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]); |
|
| 1208 | + 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]); |
|
| 1209 | + 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]); |
|
| 1210 | 1210 | } |
| 1211 | 1211 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1212 | 1212 | |
@@ -1216,13 +1216,13 @@ discard block |
||
| 1216 | 1216 | |
| 1217 | 1217 | $newsfeeds = array(); |
| 1218 | 1218 | foreach($newsurl as $newskey => $url) { |
| 1219 | - if ($url != '') { |
|
| 1219 | + if ($url != '') { |
|
| 1220 | 1220 | $type = $newstype[$newskey]; |
| 1221 | 1221 | $lng = $newslng[$newskey]; |
| 1222 | 1222 | if (isset($newsfeeds[$type][$lng])) { |
| 1223 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1223 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1224 | 1224 | } else $newsfeeds[$type][$lng] = array($url); |
| 1225 | - } |
|
| 1225 | + } |
|
| 1226 | 1226 | } |
| 1227 | 1227 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
| 1228 | 1228 | |
@@ -1663,14 +1663,14 @@ discard block |
||
| 1663 | 1663 | |
| 1664 | 1664 | // Set some defaults values... |
| 1665 | 1665 | if (!isset($globalAircraftImageSources)) { |
| 1666 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1667 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1666 | + $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1667 | + $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1668 | 1668 | } |
| 1669 | 1669 | |
| 1670 | 1670 | if (!isset($globalSchedulesSources)) { |
| 1671 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1672 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1673 | - } |
|
| 1671 | + $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1672 | + $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1673 | + } |
|
| 1674 | 1674 | |
| 1675 | 1675 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1676 | 1676 | |
@@ -1718,21 +1718,21 @@ discard block |
||
| 1718 | 1718 | $popi = false; |
| 1719 | 1719 | $popw = false; |
| 1720 | 1720 | foreach ($_SESSION['done'] as $done) { |
| 1721 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1722 | - if ($done == 'Create database') $pop = true; |
|
| 1723 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1724 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1725 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1721 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1722 | + if ($done == 'Create database') $pop = true; |
|
| 1723 | + if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1724 | + if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1725 | + if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1726 | 1726 | } |
| 1727 | 1727 | if ($pop) { |
| 1728 | - sleep(5); |
|
| 1729 | - print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1728 | + sleep(5); |
|
| 1729 | + print '<li>Create database....<img src="../images/loading.gif" /></li>'; |
|
| 1730 | 1730 | } else if ($popi) { |
| 1731 | - sleep(5); |
|
| 1732 | - print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1731 | + sleep(5); |
|
| 1732 | + print '<li>Create and import tables....<img src="../images/loading.gif" /></li>'; |
|
| 1733 | 1733 | } else if ($popw) { |
| 1734 | - sleep(5); |
|
| 1735 | - print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1734 | + sleep(5); |
|
| 1735 | + print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
|
| 1736 | 1736 | } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
| 1737 | 1737 | print '</div></ul>'; |
| 1738 | 1738 | print '<div id="error"></div>'; |
@@ -1798,7 +1798,7 @@ discard block |
||
| 1798 | 1798 | unset($_COOKIE['install']); |
| 1799 | 1799 | print '<div class="info column"><ul>'; |
| 1800 | 1800 | foreach ($_SESSION['done'] as $done) { |
| 1801 | - print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1801 | + print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
|
| 1802 | 1802 | } |
| 1803 | 1803 | print '<li>Reloading page to check all is now ok....<strong>SUCCESS</strong></li>'; |
| 1804 | 1804 | 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 | } |
@@ -506,13 +506,13 @@ discard block |
||
| 506 | 506 | ?> |
| 507 | 507 | <tr> |
| 508 | 508 | <?php |
| 509 | - if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
|
| 509 | + if (filter_var($source['host'], FILTER_VALIDATE_URL)) { |
|
| 510 | 510 | ?> |
| 511 | 511 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 512 | 512 | <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
| 513 | 513 | <?php |
| 514 | 514 | } else { |
| 515 | - $hostport = explode(':',$source['host']); |
|
| 515 | + $hostport = explode(':', $source['host']); |
|
| 516 | 516 | if (isset($hostport[1])) { |
| 517 | 517 | $host = $hostport[0]; |
| 518 | 518 | $port = $hostport[1]; |
@@ -560,7 +560,7 @@ discard block |
||
| 560 | 560 | <select name="timezones[]" id="timezones"> |
| 561 | 561 | <?php |
| 562 | 562 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 563 | - foreach($timezonelist as $timezones){ |
|
| 563 | + foreach ($timezonelist as $timezones) { |
|
| 564 | 564 | if (isset($source['timezone']) && $source['timezone'] == $timezones) { |
| 565 | 565 | print '<option selected>'.$timezones.'</option>'; |
| 566 | 566 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
@@ -613,7 +613,7 @@ discard block |
||
| 613 | 613 | <select name="timezones[]" id="timezones"> |
| 614 | 614 | <?php |
| 615 | 615 | $timezonelist = DateTimeZone::listIdentifiers(DateTimeZone::ALL); |
| 616 | - foreach($timezonelist as $timezones){ |
|
| 616 | + foreach ($timezonelist as $timezones) { |
|
| 617 | 617 | if ($timezones == 'UTC') { |
| 618 | 618 | print '<option selected>'.$timezones.'</option>'; |
| 619 | 619 | } else print '<option>'.$timezones.'</option>'; |
@@ -1060,7 +1060,7 @@ discard block |
||
| 1060 | 1060 | <br /> |
| 1061 | 1061 | <p> |
| 1062 | 1062 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1063 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1063 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize; ?>" /> |
|
| 1064 | 1064 | </p> |
| 1065 | 1065 | <br /> |
| 1066 | 1066 | <p> |
@@ -1122,14 +1122,14 @@ discard block |
||
| 1122 | 1122 | $error = ''; |
| 1123 | 1123 | |
| 1124 | 1124 | if (isset($_POST['dbtype'])) { |
| 1125 | - $dbtype = filter_input(INPUT_POST,'dbtype',FILTER_SANITIZE_STRING); |
|
| 1126 | - $dbroot = filter_input(INPUT_POST,'dbroot',FILTER_SANITIZE_STRING); |
|
| 1127 | - $dbrootpass = filter_input(INPUT_POST,'dbrootpass',FILTER_SANITIZE_STRING); |
|
| 1128 | - $dbname = filter_input(INPUT_POST,'dbname',FILTER_SANITIZE_STRING); |
|
| 1129 | - $dbuser = filter_input(INPUT_POST,'dbuser',FILTER_SANITIZE_STRING); |
|
| 1130 | - $dbuserpass = filter_input(INPUT_POST,'dbuserpass',FILTER_SANITIZE_STRING); |
|
| 1131 | - $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
|
| 1132 | - $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
|
| 1125 | + $dbtype = filter_input(INPUT_POST, 'dbtype', FILTER_SANITIZE_STRING); |
|
| 1126 | + $dbroot = filter_input(INPUT_POST, 'dbroot', FILTER_SANITIZE_STRING); |
|
| 1127 | + $dbrootpass = filter_input(INPUT_POST, 'dbrootpass', FILTER_SANITIZE_STRING); |
|
| 1128 | + $dbname = filter_input(INPUT_POST, 'dbname', FILTER_SANITIZE_STRING); |
|
| 1129 | + $dbuser = filter_input(INPUT_POST, 'dbuser', FILTER_SANITIZE_STRING); |
|
| 1130 | + $dbuserpass = filter_input(INPUT_POST, 'dbuserpass', FILTER_SANITIZE_STRING); |
|
| 1131 | + $dbhost = filter_input(INPUT_POST, 'dbhost', FILTER_SANITIZE_STRING); |
|
| 1132 | + $dbport = filter_input(INPUT_POST, 'dbport', FILTER_SANITIZE_STRING); |
|
| 1133 | 1133 | |
| 1134 | 1134 | if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
| 1135 | 1135 | if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
@@ -1149,49 +1149,49 @@ discard block |
||
| 1149 | 1149 | } else $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
| 1150 | 1150 | */ |
| 1151 | 1151 | |
| 1152 | - $settings = array_merge($settings,array('globalDBdriver' => $dbtype,'globalDBhost' => $dbhost,'globalDBuser' => $dbuser,'globalDBport' => $dbport,'globalDBpass' => $dbuserpass,'globalDBname' => $dbname)); |
|
| 1152 | + $settings = array_merge($settings, array('globalDBdriver' => $dbtype, 'globalDBhost' => $dbhost, 'globalDBuser' => $dbuser, 'globalDBport' => $dbport, 'globalDBpass' => $dbuserpass, 'globalDBname' => $dbname)); |
|
| 1153 | 1153 | |
| 1154 | - $sitename = filter_input(INPUT_POST,'sitename',FILTER_SANITIZE_STRING); |
|
| 1155 | - $siteurl = filter_input(INPUT_POST,'siteurl',FILTER_SANITIZE_STRING); |
|
| 1156 | - $timezone = filter_input(INPUT_POST,'timezone',FILTER_SANITIZE_STRING); |
|
| 1157 | - $language = filter_input(INPUT_POST,'language',FILTER_SANITIZE_STRING); |
|
| 1158 | - $settings = array_merge($settings,array('globalName' => $sitename,'globalURL' => $siteurl, 'globalTimezone' => $timezone,'globalLanguage' => $language)); |
|
| 1154 | + $sitename = filter_input(INPUT_POST, 'sitename', FILTER_SANITIZE_STRING); |
|
| 1155 | + $siteurl = filter_input(INPUT_POST, 'siteurl', FILTER_SANITIZE_STRING); |
|
| 1156 | + $timezone = filter_input(INPUT_POST, 'timezone', FILTER_SANITIZE_STRING); |
|
| 1157 | + $language = filter_input(INPUT_POST, 'language', FILTER_SANITIZE_STRING); |
|
| 1158 | + $settings = array_merge($settings, array('globalName' => $sitename, 'globalURL' => $siteurl, 'globalTimezone' => $timezone, 'globalLanguage' => $language)); |
|
| 1159 | 1159 | |
| 1160 | - $mapprovider = filter_input(INPUT_POST,'mapprovider',FILTER_SANITIZE_STRING); |
|
| 1161 | - $mapboxid = filter_input(INPUT_POST,'mapboxid',FILTER_SANITIZE_STRING); |
|
| 1162 | - $mapboxtoken = filter_input(INPUT_POST,'mapboxtoken',FILTER_SANITIZE_STRING); |
|
| 1163 | - $googlekey = filter_input(INPUT_POST,'googlekey',FILTER_SANITIZE_STRING); |
|
| 1164 | - $bingkey = filter_input(INPUT_POST,'bingkey',FILTER_SANITIZE_STRING); |
|
| 1165 | - $openweathermapkey = filter_input(INPUT_POST,'openweathermapkey',FILTER_SANITIZE_STRING); |
|
| 1166 | - $mapquestkey = filter_input(INPUT_POST,'mapquestkey',FILTER_SANITIZE_STRING); |
|
| 1167 | - $hereappid = filter_input(INPUT_POST,'hereappid',FILTER_SANITIZE_STRING); |
|
| 1168 | - $hereappcode = filter_input(INPUT_POST,'hereappcode',FILTER_SANITIZE_STRING); |
|
| 1169 | - $settings = array_merge($settings,array('globalMapProvider' => $mapprovider,'globalMapboxId' => $mapboxid,'globalMapboxToken' => $mapboxtoken,'globalGoogleAPIKey' => $googlekey,'globalBingMapKey' => $bingkey,'globalHereappID' => $hereappid,'globalHereappCode' => $hereappcode,'globalMapQuestKey' => $mapquestkey,'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1160 | + $mapprovider = filter_input(INPUT_POST, 'mapprovider', FILTER_SANITIZE_STRING); |
|
| 1161 | + $mapboxid = filter_input(INPUT_POST, 'mapboxid', FILTER_SANITIZE_STRING); |
|
| 1162 | + $mapboxtoken = filter_input(INPUT_POST, 'mapboxtoken', FILTER_SANITIZE_STRING); |
|
| 1163 | + $googlekey = filter_input(INPUT_POST, 'googlekey', FILTER_SANITIZE_STRING); |
|
| 1164 | + $bingkey = filter_input(INPUT_POST, 'bingkey', FILTER_SANITIZE_STRING); |
|
| 1165 | + $openweathermapkey = filter_input(INPUT_POST, 'openweathermapkey', FILTER_SANITIZE_STRING); |
|
| 1166 | + $mapquestkey = filter_input(INPUT_POST, 'mapquestkey', FILTER_SANITIZE_STRING); |
|
| 1167 | + $hereappid = filter_input(INPUT_POST, 'hereappid', FILTER_SANITIZE_STRING); |
|
| 1168 | + $hereappcode = filter_input(INPUT_POST, 'hereappcode', FILTER_SANITIZE_STRING); |
|
| 1169 | + $settings = array_merge($settings, array('globalMapProvider' => $mapprovider, 'globalMapboxId' => $mapboxid, 'globalMapboxToken' => $mapboxtoken, 'globalGoogleAPIKey' => $googlekey, 'globalBingMapKey' => $bingkey, 'globalHereappID' => $hereappid, 'globalHereappCode' => $hereappcode, 'globalMapQuestKey' => $mapquestkey, 'globalOpenWeatherMapKey' => $openweathermapkey)); |
|
| 1170 | 1170 | |
| 1171 | - $latitudemax = filter_input(INPUT_POST,'latitudemax',FILTER_SANITIZE_STRING); |
|
| 1172 | - $latitudemin = filter_input(INPUT_POST,'latitudemin',FILTER_SANITIZE_STRING); |
|
| 1173 | - $longitudemax = filter_input(INPUT_POST,'longitudemax',FILTER_SANITIZE_STRING); |
|
| 1174 | - $longitudemin = filter_input(INPUT_POST,'longitudemin',FILTER_SANITIZE_STRING); |
|
| 1175 | - $livezoom = filter_input(INPUT_POST,'livezoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1176 | - $settings = array_merge($settings,array('globalLatitudeMax' => $latitudemax,'globalLatitudeMin' => $latitudemin,'globalLongitudeMax' => $longitudemax,'globalLongitudeMin' => $longitudemin,'globalLiveZoom' => $livezoom)); |
|
| 1171 | + $latitudemax = filter_input(INPUT_POST, 'latitudemax', FILTER_SANITIZE_STRING); |
|
| 1172 | + $latitudemin = filter_input(INPUT_POST, 'latitudemin', FILTER_SANITIZE_STRING); |
|
| 1173 | + $longitudemax = filter_input(INPUT_POST, 'longitudemax', FILTER_SANITIZE_STRING); |
|
| 1174 | + $longitudemin = filter_input(INPUT_POST, 'longitudemin', FILTER_SANITIZE_STRING); |
|
| 1175 | + $livezoom = filter_input(INPUT_POST, 'livezoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1176 | + $settings = array_merge($settings, array('globalLatitudeMax' => $latitudemax, 'globalLatitudeMin' => $latitudemin, 'globalLongitudeMax' => $longitudemax, 'globalLongitudeMin' => $longitudemin, 'globalLiveZoom' => $livezoom)); |
|
| 1177 | 1177 | |
| 1178 | - $squawk_country = filter_input(INPUT_POST,'squawk_country',FILTER_SANITIZE_STRING); |
|
| 1179 | - $settings = array_merge($settings,array('globalSquawkCountry' => $squawk_country)); |
|
| 1178 | + $squawk_country = filter_input(INPUT_POST, 'squawk_country', FILTER_SANITIZE_STRING); |
|
| 1179 | + $settings = array_merge($settings, array('globalSquawkCountry' => $squawk_country)); |
|
| 1180 | 1180 | |
| 1181 | - $latitudecenter = filter_input(INPUT_POST,'latitudecenter',FILTER_SANITIZE_STRING); |
|
| 1182 | - $longitudecenter = filter_input(INPUT_POST,'longitudecenter',FILTER_SANITIZE_STRING); |
|
| 1183 | - $settings = array_merge($settings,array('globalCenterLatitude' => $latitudecenter,'globalCenterLongitude' => $longitudecenter)); |
|
| 1181 | + $latitudecenter = filter_input(INPUT_POST, 'latitudecenter', FILTER_SANITIZE_STRING); |
|
| 1182 | + $longitudecenter = filter_input(INPUT_POST, 'longitudecenter', FILTER_SANITIZE_STRING); |
|
| 1183 | + $settings = array_merge($settings, array('globalCenterLatitude' => $latitudecenter, 'globalCenterLongitude' => $longitudecenter)); |
|
| 1184 | 1184 | |
| 1185 | - $acars = filter_input(INPUT_POST,'acars',FILTER_SANITIZE_STRING); |
|
| 1185 | + $acars = filter_input(INPUT_POST, 'acars', FILTER_SANITIZE_STRING); |
|
| 1186 | 1186 | if ($acars == 'acars') { |
| 1187 | - $settings = array_merge($settings,array('globalACARS' => 'TRUE')); |
|
| 1187 | + $settings = array_merge($settings, array('globalACARS' => 'TRUE')); |
|
| 1188 | 1188 | } else { |
| 1189 | - $settings = array_merge($settings,array('globalACARS' => 'FALSE')); |
|
| 1189 | + $settings = array_merge($settings, array('globalACARS' => 'FALSE')); |
|
| 1190 | 1190 | } |
| 1191 | 1191 | |
| 1192 | - $flightawareusername = filter_input(INPUT_POST,'flightawareusername',FILTER_SANITIZE_STRING); |
|
| 1193 | - $flightawarepassword = filter_input(INPUT_POST,'flightawarepassword',FILTER_SANITIZE_STRING); |
|
| 1194 | - $settings = array_merge($settings,array('globalFlightAwareUsername' => $flightawareusername,'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1192 | + $flightawareusername = filter_input(INPUT_POST, 'flightawareusername', FILTER_SANITIZE_STRING); |
|
| 1193 | + $flightawarepassword = filter_input(INPUT_POST, 'flightawarepassword', FILTER_SANITIZE_STRING); |
|
| 1194 | + $settings = array_merge($settings, array('globalFlightAwareUsername' => $flightawareusername, 'globalFlightAwarePassword' => $flightawarepassword)); |
|
| 1195 | 1195 | |
| 1196 | 1196 | $source_name = $_POST['source_name']; |
| 1197 | 1197 | $source_latitude = $_POST['source_latitude']; |
@@ -1205,8 +1205,8 @@ discard block |
||
| 1205 | 1205 | |
| 1206 | 1206 | $sources = array(); |
| 1207 | 1207 | foreach ($source_name as $keys => $name) { |
| 1208 | - 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]); |
|
| 1209 | - 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]); |
|
| 1208 | + 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]); |
|
| 1209 | + 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]); |
|
| 1210 | 1210 | } |
| 1211 | 1211 | if (count($sources) > 0) $_SESSION['sources'] = $sources; |
| 1212 | 1212 | |
@@ -1215,16 +1215,16 @@ discard block |
||
| 1215 | 1215 | $newstype = $_POST['newstype']; |
| 1216 | 1216 | |
| 1217 | 1217 | $newsfeeds = array(); |
| 1218 | - foreach($newsurl as $newskey => $url) { |
|
| 1218 | + foreach ($newsurl as $newskey => $url) { |
|
| 1219 | 1219 | if ($url != '') { |
| 1220 | 1220 | $type = $newstype[$newskey]; |
| 1221 | 1221 | $lng = $newslng[$newskey]; |
| 1222 | 1222 | if (isset($newsfeeds[$type][$lng])) { |
| 1223 | - $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
|
| 1223 | + $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng], array($url)); |
|
| 1224 | 1224 | } else $newsfeeds[$type][$lng] = array($url); |
| 1225 | 1225 | } |
| 1226 | 1226 | } |
| 1227 | - $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
|
| 1227 | + $settings = array_merge($settings, array('globalNewsFeeds' => $newsfeeds)); |
|
| 1228 | 1228 | |
| 1229 | 1229 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 1230 | 1230 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1235,27 +1235,27 @@ discard block |
||
| 1235 | 1235 | $sbsurl = $_POST['sbsurl']; |
| 1236 | 1236 | */ |
| 1237 | 1237 | |
| 1238 | - $globalvatsim = filter_input(INPUT_POST,'globalvatsim',FILTER_SANITIZE_STRING); |
|
| 1239 | - $globalva = filter_input(INPUT_POST,'globalva',FILTER_SANITIZE_STRING); |
|
| 1240 | - $globalivao = filter_input(INPUT_POST,'globalivao',FILTER_SANITIZE_STRING); |
|
| 1241 | - $globalphpvms = filter_input(INPUT_POST,'globalphpvms',FILTER_SANITIZE_STRING); |
|
| 1242 | - $globalvam = filter_input(INPUT_POST,'globalvam',FILTER_SANITIZE_STRING); |
|
| 1243 | - $globalsbs = filter_input(INPUT_POST,'globalsbs',FILTER_SANITIZE_STRING); |
|
| 1244 | - $globalaprs = filter_input(INPUT_POST,'globalaprs',FILTER_SANITIZE_STRING); |
|
| 1245 | - $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
|
| 1238 | + $globalvatsim = filter_input(INPUT_POST, 'globalvatsim', FILTER_SANITIZE_STRING); |
|
| 1239 | + $globalva = filter_input(INPUT_POST, 'globalva', FILTER_SANITIZE_STRING); |
|
| 1240 | + $globalivao = filter_input(INPUT_POST, 'globalivao', FILTER_SANITIZE_STRING); |
|
| 1241 | + $globalphpvms = filter_input(INPUT_POST, 'globalphpvms', FILTER_SANITIZE_STRING); |
|
| 1242 | + $globalvam = filter_input(INPUT_POST, 'globalvam', FILTER_SANITIZE_STRING); |
|
| 1243 | + $globalsbs = filter_input(INPUT_POST, 'globalsbs', FILTER_SANITIZE_STRING); |
|
| 1244 | + $globalaprs = filter_input(INPUT_POST, 'globalaprs', FILTER_SANITIZE_STRING); |
|
| 1245 | + $datasource = filter_input(INPUT_POST, 'datasource', FILTER_SANITIZE_STRING); |
|
| 1246 | 1246 | |
| 1247 | - $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
|
| 1248 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1249 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1250 | - $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
|
| 1251 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1252 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1253 | - $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
|
| 1254 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1255 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1256 | - $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
|
| 1257 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1258 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1247 | + $globalaircraft = filter_input(INPUT_POST, 'globalaircraft', FILTER_SANITIZE_STRING); |
|
| 1248 | + if ($globalaircraft == 'aircraft') $settings = array_merge($settings, array('globalAircraft' => 'TRUE')); |
|
| 1249 | + else $settings = array_merge($settings, array('globalAircraft' => 'FALSE')); |
|
| 1250 | + $globaltracker = filter_input(INPUT_POST, 'globaltracker', FILTER_SANITIZE_STRING); |
|
| 1251 | + if ($globaltracker == 'tracker') $settings = array_merge($settings, array('globalTracker' => 'TRUE')); |
|
| 1252 | + else $settings = array_merge($settings, array('globalTracker' => 'FALSE')); |
|
| 1253 | + $globalmarine = filter_input(INPUT_POST, 'globalmarine', FILTER_SANITIZE_STRING); |
|
| 1254 | + if ($globalmarine == 'marine') $settings = array_merge($settings, array('globalMarine' => 'TRUE')); |
|
| 1255 | + else $settings = array_merge($settings, array('globalMarine' => 'FALSE')); |
|
| 1256 | + $globalsatellite = filter_input(INPUT_POST, 'globalsatellite', FILTER_SANITIZE_STRING); |
|
| 1257 | + if ($globalsatellite == 'satellite') $settings = array_merge($settings, array('globalSatellite' => 'TRUE')); |
|
| 1258 | + else $settings = array_merge($settings, array('globalSatellite' => 'FALSE')); |
|
| 1259 | 1259 | |
| 1260 | 1260 | /* |
| 1261 | 1261 | $globalSBS1Hosts = array(); |
@@ -1271,7 +1271,7 @@ discard block |
||
| 1271 | 1271 | } |
| 1272 | 1272 | $settings = array_merge($settings,array('globalSBS1Hosts' => $globalSBS1Hosts)); |
| 1273 | 1273 | */ |
| 1274 | - $settings_comment = array_merge($settings_comment,array('globalSBS1Hosts')); |
|
| 1274 | + $settings_comment = array_merge($settings_comment, array('globalSBS1Hosts')); |
|
| 1275 | 1275 | $host = $_POST['host']; |
| 1276 | 1276 | $port = $_POST['port']; |
| 1277 | 1277 | $name = $_POST['name']; |
@@ -1288,113 +1288,113 @@ discard block |
||
| 1288 | 1288 | else $cov = 'FALSE'; |
| 1289 | 1289 | if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
| 1290 | 1290 | else $arch = 'FALSE'; |
| 1291 | - if (strpos($format[$key],'_callback')) { |
|
| 1292 | - $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
|
| 1291 | + if (strpos($format[$key], '_callback')) { |
|
| 1292 | + $gSources[] = array('host' => $h, 'pass' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'TRUE'); |
|
| 1293 | 1293 | } elseif ($h != '' || $name[$key] != '') { |
| 1294 | - $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
|
| 1294 | + $gSources[] = array('host' => $h, 'port' => $port[$key], 'name' => $name[$key], 'format' => $format[$key], 'sourcestats' => $cov, 'noarchive' => $arch, 'timezone' => $timezones[$key], 'callback' => 'FALSE'); |
|
| 1295 | 1295 | } |
| 1296 | 1296 | if ($format[$key] == 'airwhere') $forcepilots = true; |
| 1297 | 1297 | } |
| 1298 | - $settings = array_merge($settings,array('globalSources' => $gSources)); |
|
| 1298 | + $settings = array_merge($settings, array('globalSources' => $gSources)); |
|
| 1299 | 1299 | |
| 1300 | 1300 | /* |
| 1301 | 1301 | $sbstimeout = filter_input(INPUT_POST,'sbstimeout',FILTER_SANITIZE_NUMBER_INT); |
| 1302 | 1302 | $settings = array_merge($settings,array('globalSourcesTimeOut' => $sbstimeout)); |
| 1303 | 1303 | */ |
| 1304 | - $acarshost = filter_input(INPUT_POST,'acarshost',FILTER_SANITIZE_STRING); |
|
| 1305 | - $acarsport = filter_input(INPUT_POST,'acarsport',FILTER_SANITIZE_NUMBER_INT); |
|
| 1306 | - $settings = array_merge($settings,array('globalACARSHost' => $acarshost,'globalACARSPort' => $acarsport)); |
|
| 1304 | + $acarshost = filter_input(INPUT_POST, 'acarshost', FILTER_SANITIZE_STRING); |
|
| 1305 | + $acarsport = filter_input(INPUT_POST, 'acarsport', FILTER_SANITIZE_NUMBER_INT); |
|
| 1306 | + $settings = array_merge($settings, array('globalACARSHost' => $acarshost, 'globalACARSPort' => $acarsport)); |
|
| 1307 | 1307 | |
| 1308 | - $bitly = filter_input(INPUT_POST,'bitly',FILTER_SANITIZE_STRING); |
|
| 1309 | - $settings = array_merge($settings,array('globalBitlyAccessToken' => $bitly)); |
|
| 1308 | + $bitly = filter_input(INPUT_POST, 'bitly', FILTER_SANITIZE_STRING); |
|
| 1309 | + $settings = array_merge($settings, array('globalBitlyAccessToken' => $bitly)); |
|
| 1310 | 1310 | |
| 1311 | - $customcss = filter_input(INPUT_POST,'customcss',FILTER_SANITIZE_STRING); |
|
| 1312 | - $settings = array_merge($settings,array('globalCustomCSS' => $customcss)); |
|
| 1311 | + $customcss = filter_input(INPUT_POST, 'customcss', FILTER_SANITIZE_STRING); |
|
| 1312 | + $settings = array_merge($settings, array('globalCustomCSS' => $customcss)); |
|
| 1313 | 1313 | |
| 1314 | - $map3dtile = filter_input(INPUT_POST,'map3dtileset',FILTER_SANITIZE_STRING); |
|
| 1315 | - $settings = array_merge($settings,array('globalMap3DTiles' => $map3dtile)); |
|
| 1314 | + $map3dtile = filter_input(INPUT_POST, 'map3dtileset', FILTER_SANITIZE_STRING); |
|
| 1315 | + $settings = array_merge($settings, array('globalMap3DTiles' => $map3dtile)); |
|
| 1316 | 1316 | |
| 1317 | - $notamsource = filter_input(INPUT_POST,'notamsource',FILTER_SANITIZE_STRING); |
|
| 1318 | - $settings = array_merge($settings,array('globalNOTAMSource' => $notamsource)); |
|
| 1319 | - $metarsource = filter_input(INPUT_POST,'metarsource',FILTER_SANITIZE_STRING); |
|
| 1320 | - $settings = array_merge($settings,array('globalMETARurl' => $metarsource)); |
|
| 1317 | + $notamsource = filter_input(INPUT_POST, 'notamsource', FILTER_SANITIZE_STRING); |
|
| 1318 | + $settings = array_merge($settings, array('globalNOTAMSource' => $notamsource)); |
|
| 1319 | + $metarsource = filter_input(INPUT_POST, 'metarsource', FILTER_SANITIZE_STRING); |
|
| 1320 | + $settings = array_merge($settings, array('globalMETARurl' => $metarsource)); |
|
| 1321 | 1321 | |
| 1322 | - $zoilatitude = filter_input(INPUT_POST,'zoilatitude',FILTER_SANITIZE_STRING); |
|
| 1323 | - $zoilongitude = filter_input(INPUT_POST,'zoilongitude',FILTER_SANITIZE_STRING); |
|
| 1324 | - $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
|
| 1322 | + $zoilatitude = filter_input(INPUT_POST, 'zoilatitude', FILTER_SANITIZE_STRING); |
|
| 1323 | + $zoilongitude = filter_input(INPUT_POST, 'zoilongitude', FILTER_SANITIZE_STRING); |
|
| 1324 | + $zoidistance = filter_input(INPUT_POST, 'zoidistance', FILTER_SANITIZE_NUMBER_INT); |
|
| 1325 | 1325 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1326 | - $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
|
| 1327 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1326 | + $settings = array_merge($settings, array('globalDistanceIgnore' => array('latitude' => $zoilatitude, 'longitude' => $zoilongitude, 'distance' => $zoidistance))); |
|
| 1327 | + } else $settings = array_merge($settings, array('globalDistanceIgnore' => array())); |
|
| 1328 | 1328 | |
| 1329 | - $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1330 | - $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
|
| 1331 | - $maprefresh = filter_input(INPUT_POST,'maprefresh',FILTER_SANITIZE_NUMBER_INT); |
|
| 1332 | - $settings = array_merge($settings,array('globalMapRefresh' => $maprefresh)); |
|
| 1333 | - $mapidle = filter_input(INPUT_POST,'mapidle',FILTER_SANITIZE_NUMBER_INT); |
|
| 1334 | - $settings = array_merge($settings,array('globalMapIdleTimeout' => $mapidle)); |
|
| 1335 | - $closestmindist = filter_input(INPUT_POST,'closestmindist',FILTER_SANITIZE_NUMBER_INT); |
|
| 1336 | - $settings = array_merge($settings,array('globalClosestMinDist' => $closestmindist)); |
|
| 1329 | + $refresh = filter_input(INPUT_POST, 'refresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1330 | + $settings = array_merge($settings, array('globalLiveInterval' => $refresh)); |
|
| 1331 | + $maprefresh = filter_input(INPUT_POST, 'maprefresh', FILTER_SANITIZE_NUMBER_INT); |
|
| 1332 | + $settings = array_merge($settings, array('globalMapRefresh' => $maprefresh)); |
|
| 1333 | + $mapidle = filter_input(INPUT_POST, 'mapidle', FILTER_SANITIZE_NUMBER_INT); |
|
| 1334 | + $settings = array_merge($settings, array('globalMapIdleTimeout' => $mapidle)); |
|
| 1335 | + $closestmindist = filter_input(INPUT_POST, 'closestmindist', FILTER_SANITIZE_NUMBER_INT); |
|
| 1336 | + $settings = array_merge($settings, array('globalClosestMinDist' => $closestmindist)); |
|
| 1337 | 1337 | |
| 1338 | - $aircraftsize = filter_input(INPUT_POST,'aircraftsize',FILTER_SANITIZE_NUMBER_INT); |
|
| 1339 | - $settings = array_merge($settings,array('globalAircraftSize' => $aircraftsize)); |
|
| 1338 | + $aircraftsize = filter_input(INPUT_POST, 'aircraftsize', FILTER_SANITIZE_NUMBER_INT); |
|
| 1339 | + $settings = array_merge($settings, array('globalAircraftSize' => $aircraftsize)); |
|
| 1340 | 1340 | |
| 1341 | - $archivemonths = filter_input(INPUT_POST,'archivemonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1342 | - $settings = array_merge($settings,array('globalArchiveMonths' => $archivemonths)); |
|
| 1341 | + $archivemonths = filter_input(INPUT_POST, 'archivemonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1342 | + $settings = array_merge($settings, array('globalArchiveMonths' => $archivemonths)); |
|
| 1343 | 1343 | |
| 1344 | - $archiveyear = filter_input(INPUT_POST,'archiveyear',FILTER_SANITIZE_STRING); |
|
| 1344 | + $archiveyear = filter_input(INPUT_POST, 'archiveyear', FILTER_SANITIZE_STRING); |
|
| 1345 | 1345 | if ($archiveyear == "archiveyear") { |
| 1346 | - $settings = array_merge($settings,array('globalArchiveYear' => 'TRUE')); |
|
| 1346 | + $settings = array_merge($settings, array('globalArchiveYear' => 'TRUE')); |
|
| 1347 | 1347 | } else { |
| 1348 | - $settings = array_merge($settings,array('globalArchiveYear' => 'FALSE')); |
|
| 1348 | + $settings = array_merge($settings, array('globalArchiveYear' => 'FALSE')); |
|
| 1349 | 1349 | } |
| 1350 | - $archivekeepmonths = filter_input(INPUT_POST,'archivekeepmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1351 | - $settings = array_merge($settings,array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1352 | - $archivekeeptrackmonths = filter_input(INPUT_POST,'archivekeeptrackmonths',FILTER_SANITIZE_NUMBER_INT); |
|
| 1353 | - $settings = array_merge($settings,array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1350 | + $archivekeepmonths = filter_input(INPUT_POST, 'archivekeepmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1351 | + $settings = array_merge($settings, array('globalArchiveKeepMonths' => $archivekeepmonths)); |
|
| 1352 | + $archivekeeptrackmonths = filter_input(INPUT_POST, 'archivekeeptrackmonths', FILTER_SANITIZE_NUMBER_INT); |
|
| 1353 | + $settings = array_merge($settings, array('globalArchiveKeepTrackMonths' => $archivekeeptrackmonths)); |
|
| 1354 | 1354 | |
| 1355 | - $britishairways = filter_input(INPUT_POST,'britishairways',FILTER_SANITIZE_STRING); |
|
| 1356 | - $settings = array_merge($settings,array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1357 | - $transavia = filter_input(INPUT_POST,'transavia',FILTER_SANITIZE_STRING); |
|
| 1358 | - $settings = array_merge($settings,array('globalTransaviaKey' => $transavia)); |
|
| 1355 | + $britishairways = filter_input(INPUT_POST, 'britishairways', FILTER_SANITIZE_STRING); |
|
| 1356 | + $settings = array_merge($settings, array('globalBritishAirwaysKey' => $britishairways)); |
|
| 1357 | + $transavia = filter_input(INPUT_POST, 'transavia', FILTER_SANITIZE_STRING); |
|
| 1358 | + $settings = array_merge($settings, array('globalTransaviaKey' => $transavia)); |
|
| 1359 | 1359 | |
| 1360 | - $lufthansakey = filter_input(INPUT_POST,'lufthansakey',FILTER_SANITIZE_STRING); |
|
| 1361 | - $lufthansasecret = filter_input(INPUT_POST,'lufthansasecret',FILTER_SANITIZE_STRING); |
|
| 1362 | - $settings = array_merge($settings,array('globalLufthansaKey' => array('key' => $lufthansakey,'secret' => $lufthansasecret))); |
|
| 1360 | + $lufthansakey = filter_input(INPUT_POST, 'lufthansakey', FILTER_SANITIZE_STRING); |
|
| 1361 | + $lufthansasecret = filter_input(INPUT_POST, 'lufthansasecret', FILTER_SANITIZE_STRING); |
|
| 1362 | + $settings = array_merge($settings, array('globalLufthansaKey' => array('key' => $lufthansakey, 'secret' => $lufthansasecret))); |
|
| 1363 | 1363 | |
| 1364 | 1364 | // Create in settings.php keys not yet configurable if not already here |
| 1365 | 1365 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1366 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1366 | + if (!isset($globalDebug)) $settings = array_merge($settings, array('globalDebug' => 'TRUE')); |
|
| 1367 | 1367 | |
| 1368 | - $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
|
| 1368 | + $resetyearstats = filter_input(INPUT_POST, 'resetyearstats', FILTER_SANITIZE_STRING); |
|
| 1369 | 1369 | if ($resetyearstats == 'resetyearstats') { |
| 1370 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1370 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'TRUE')); |
|
| 1371 | 1371 | } else { |
| 1372 | - $settings = array_merge($settings,array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1372 | + $settings = array_merge($settings, array('globalDeleteLastYearStats' => 'FALSE')); |
|
| 1373 | 1373 | } |
| 1374 | 1374 | |
| 1375 | - $archive = filter_input(INPUT_POST,'archive',FILTER_SANITIZE_STRING); |
|
| 1375 | + $archive = filter_input(INPUT_POST, 'archive', FILTER_SANITIZE_STRING); |
|
| 1376 | 1376 | if ($archive == 'archive') { |
| 1377 | - $settings = array_merge($settings,array('globalArchive' => 'TRUE')); |
|
| 1377 | + $settings = array_merge($settings, array('globalArchive' => 'TRUE')); |
|
| 1378 | 1378 | } else { |
| 1379 | - $settings = array_merge($settings,array('globalArchive' => 'FALSE')); |
|
| 1379 | + $settings = array_merge($settings, array('globalArchive' => 'FALSE')); |
|
| 1380 | 1380 | } |
| 1381 | - $archiveresults = filter_input(INPUT_POST,'archiveresults',FILTER_SANITIZE_STRING); |
|
| 1381 | + $archiveresults = filter_input(INPUT_POST, 'archiveresults', FILTER_SANITIZE_STRING); |
|
| 1382 | 1382 | if ($archiveresults == 'archiveresults') { |
| 1383 | - $settings = array_merge($settings,array('globalArchiveResults' => 'TRUE')); |
|
| 1383 | + $settings = array_merge($settings, array('globalArchiveResults' => 'TRUE')); |
|
| 1384 | 1384 | } else { |
| 1385 | - $settings = array_merge($settings,array('globalArchiveResults' => 'FALSE')); |
|
| 1385 | + $settings = array_merge($settings, array('globalArchiveResults' => 'FALSE')); |
|
| 1386 | 1386 | } |
| 1387 | - $daemon = filter_input(INPUT_POST,'daemon',FILTER_SANITIZE_STRING); |
|
| 1387 | + $daemon = filter_input(INPUT_POST, 'daemon', FILTER_SANITIZE_STRING); |
|
| 1388 | 1388 | if ($daemon == 'daemon') { |
| 1389 | - $settings = array_merge($settings,array('globalDaemon' => 'TRUE')); |
|
| 1389 | + $settings = array_merge($settings, array('globalDaemon' => 'TRUE')); |
|
| 1390 | 1390 | } else { |
| 1391 | - $settings = array_merge($settings,array('globalDaemon' => 'FALSE')); |
|
| 1391 | + $settings = array_merge($settings, array('globalDaemon' => 'FALSE')); |
|
| 1392 | 1392 | } |
| 1393 | - $schedules = filter_input(INPUT_POST,'schedules',FILTER_SANITIZE_STRING); |
|
| 1393 | + $schedules = filter_input(INPUT_POST, 'schedules', FILTER_SANITIZE_STRING); |
|
| 1394 | 1394 | if ($schedules == 'schedules') { |
| 1395 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE')); |
|
| 1395 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE')); |
|
| 1396 | 1396 | } else { |
| 1397 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE')); |
|
| 1397 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE')); |
|
| 1398 | 1398 | } |
| 1399 | 1399 | |
| 1400 | 1400 | /* |
@@ -1405,274 +1405,274 @@ discard block |
||
| 1405 | 1405 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE','globalSBS1' => 'TRUE')); |
| 1406 | 1406 | } |
| 1407 | 1407 | */ |
| 1408 | - $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
|
| 1409 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1410 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1411 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1412 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1408 | + $settings = array_merge($settings, array('globalFlightAware' => 'FALSE')); |
|
| 1409 | + if ($globalsbs == 'sbs') $settings = array_merge($settings, array('globalSBS1' => 'TRUE')); |
|
| 1410 | + else $settings = array_merge($settings, array('globalSBS1' => 'FALSE')); |
|
| 1411 | + if ($globalaprs == 'aprs') $settings = array_merge($settings, array('globalAPRS' => 'TRUE')); |
|
| 1412 | + else $settings = array_merge($settings, array('globalAPRS' => 'FALSE')); |
|
| 1413 | 1413 | $va = false; |
| 1414 | 1414 | if ($globalivao == 'ivao') { |
| 1415 | - $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
|
| 1415 | + $settings = array_merge($settings, array('globalIVAO' => 'TRUE')); |
|
| 1416 | 1416 | $va = true; |
| 1417 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1417 | + } else $settings = array_merge($settings, array('globalIVAO' => 'FALSE')); |
|
| 1418 | 1418 | if ($globalvatsim == 'vatsim') { |
| 1419 | - $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
|
| 1419 | + $settings = array_merge($settings, array('globalVATSIM' => 'TRUE')); |
|
| 1420 | 1420 | $va = true; |
| 1421 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1421 | + } else $settings = array_merge($settings, array('globalVATSIM' => 'FALSE')); |
|
| 1422 | 1422 | if ($globalphpvms == 'phpvms') { |
| 1423 | - $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
|
| 1423 | + $settings = array_merge($settings, array('globalphpVMS' => 'TRUE')); |
|
| 1424 | 1424 | $va = true; |
| 1425 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1425 | + } else $settings = array_merge($settings, array('globalphpVMS' => 'FALSE')); |
|
| 1426 | 1426 | if ($globalvam == 'vam') { |
| 1427 | - $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
|
| 1427 | + $settings = array_merge($settings, array('globalVAM' => 'TRUE')); |
|
| 1428 | 1428 | $va = true; |
| 1429 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1429 | + } else $settings = array_merge($settings, array('globalVAM' => 'FALSE')); |
|
| 1430 | 1430 | if ($va) { |
| 1431 | - $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
|
| 1432 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1431 | + $settings = array_merge($settings, array('globalSchedulesFetch' => 'FALSE', 'globalTranslationFetch' => 'FALSE')); |
|
| 1432 | + } else $settings = array_merge($settings, array('globalSchedulesFetch' => 'TRUE', 'globalTranslationFetch' => 'TRUE')); |
|
| 1433 | 1433 | if ($globalva == 'va' || $va) { |
| 1434 | - $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
|
| 1435 | - $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1434 | + $settings = array_merge($settings, array('globalVA' => 'TRUE')); |
|
| 1435 | + $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1436 | 1436 | } else { |
| 1437 | - $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
| 1438 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1439 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1437 | + $settings = array_merge($settings, array('globalVA' => 'FALSE')); |
|
| 1438 | + if ($forcepilots) $settings = array_merge($settings, array('globalUsePilot' => 'TRUE', 'globalUseOwner' => 'FALSE')); |
|
| 1439 | + else $settings = array_merge($settings, array('globalUsePilot' => 'FALSE', 'globalUseOwner' => 'TRUE')); |
|
| 1440 | 1440 | } |
| 1441 | 1441 | |
| 1442 | 1442 | |
| 1443 | - $mapoffline = filter_input(INPUT_POST,'mapoffline',FILTER_SANITIZE_STRING); |
|
| 1443 | + $mapoffline = filter_input(INPUT_POST, 'mapoffline', FILTER_SANITIZE_STRING); |
|
| 1444 | 1444 | if ($mapoffline == 'mapoffline') { |
| 1445 | - $settings = array_merge($settings,array('globalMapOffline' => 'TRUE')); |
|
| 1445 | + $settings = array_merge($settings, array('globalMapOffline' => 'TRUE')); |
|
| 1446 | 1446 | } else { |
| 1447 | - $settings = array_merge($settings,array('globalMapOffline' => 'FALSE')); |
|
| 1447 | + $settings = array_merge($settings, array('globalMapOffline' => 'FALSE')); |
|
| 1448 | 1448 | } |
| 1449 | - $globaloffline = filter_input(INPUT_POST,'globaloffline',FILTER_SANITIZE_STRING); |
|
| 1449 | + $globaloffline = filter_input(INPUT_POST, 'globaloffline', FILTER_SANITIZE_STRING); |
|
| 1450 | 1450 | if ($globaloffline == 'globaloffline') { |
| 1451 | - $settings = array_merge($settings,array('globalOffline' => 'TRUE')); |
|
| 1451 | + $settings = array_merge($settings, array('globalOffline' => 'TRUE')); |
|
| 1452 | 1452 | } else { |
| 1453 | - $settings = array_merge($settings,array('globalOffline' => 'FALSE')); |
|
| 1453 | + $settings = array_merge($settings, array('globalOffline' => 'FALSE')); |
|
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | - $notam = filter_input(INPUT_POST,'notam',FILTER_SANITIZE_STRING); |
|
| 1456 | + $notam = filter_input(INPUT_POST, 'notam', FILTER_SANITIZE_STRING); |
|
| 1457 | 1457 | if ($notam == 'notam') { |
| 1458 | - $settings = array_merge($settings,array('globalNOTAM' => 'TRUE')); |
|
| 1458 | + $settings = array_merge($settings, array('globalNOTAM' => 'TRUE')); |
|
| 1459 | 1459 | } else { |
| 1460 | - $settings = array_merge($settings,array('globalNOTAM' => 'FALSE')); |
|
| 1460 | + $settings = array_merge($settings, array('globalNOTAM' => 'FALSE')); |
|
| 1461 | 1461 | } |
| 1462 | - $owner = filter_input(INPUT_POST,'owner',FILTER_SANITIZE_STRING); |
|
| 1462 | + $owner = filter_input(INPUT_POST, 'owner', FILTER_SANITIZE_STRING); |
|
| 1463 | 1463 | if ($owner == 'owner') { |
| 1464 | - $settings = array_merge($settings,array('globalOwner' => 'TRUE')); |
|
| 1464 | + $settings = array_merge($settings, array('globalOwner' => 'TRUE')); |
|
| 1465 | 1465 | } else { |
| 1466 | - $settings = array_merge($settings,array('globalOwner' => 'FALSE')); |
|
| 1466 | + $settings = array_merge($settings, array('globalOwner' => 'FALSE')); |
|
| 1467 | 1467 | } |
| 1468 | - $map3d = filter_input(INPUT_POST,'map3d',FILTER_SANITIZE_STRING); |
|
| 1468 | + $map3d = filter_input(INPUT_POST, 'map3d', FILTER_SANITIZE_STRING); |
|
| 1469 | 1469 | if ($map3d == 'map3d') { |
| 1470 | - $settings = array_merge($settings,array('globalMap3D' => 'TRUE')); |
|
| 1470 | + $settings = array_merge($settings, array('globalMap3D' => 'TRUE')); |
|
| 1471 | 1471 | } else { |
| 1472 | - $settings = array_merge($settings,array('globalMap3D' => 'FALSE')); |
|
| 1472 | + $settings = array_merge($settings, array('globalMap3D' => 'FALSE')); |
|
| 1473 | 1473 | } |
| 1474 | - $crash = filter_input(INPUT_POST,'crash',FILTER_SANITIZE_STRING); |
|
| 1474 | + $crash = filter_input(INPUT_POST, 'crash', FILTER_SANITIZE_STRING); |
|
| 1475 | 1475 | if ($crash == 'crash') { |
| 1476 | - $settings = array_merge($settings,array('globalAccidents' => 'TRUE')); |
|
| 1476 | + $settings = array_merge($settings, array('globalAccidents' => 'TRUE')); |
|
| 1477 | 1477 | } else { |
| 1478 | - $settings = array_merge($settings,array('globalAccidents' => 'FALSE')); |
|
| 1478 | + $settings = array_merge($settings, array('globalAccidents' => 'FALSE')); |
|
| 1479 | 1479 | } |
| 1480 | - $fires = filter_input(INPUT_POST,'fires',FILTER_SANITIZE_STRING); |
|
| 1480 | + $fires = filter_input(INPUT_POST, 'fires', FILTER_SANITIZE_STRING); |
|
| 1481 | 1481 | if ($fires == 'fires') { |
| 1482 | - $settings = array_merge($settings,array('globalMapFires' => 'TRUE')); |
|
| 1482 | + $settings = array_merge($settings, array('globalMapFires' => 'TRUE')); |
|
| 1483 | 1483 | } else { |
| 1484 | - $settings = array_merge($settings,array('globalMapFires' => 'FALSE')); |
|
| 1484 | + $settings = array_merge($settings, array('globalMapFires' => 'FALSE')); |
|
| 1485 | 1485 | } |
| 1486 | - $firessupport = filter_input(INPUT_POST,'firessupport',FILTER_SANITIZE_STRING); |
|
| 1486 | + $firessupport = filter_input(INPUT_POST, 'firessupport', FILTER_SANITIZE_STRING); |
|
| 1487 | 1487 | if ($firessupport == 'firessupport') { |
| 1488 | - $settings = array_merge($settings,array('globalFires' => 'TRUE')); |
|
| 1488 | + $settings = array_merge($settings, array('globalFires' => 'TRUE')); |
|
| 1489 | 1489 | } else { |
| 1490 | - $settings = array_merge($settings,array('globalFires' => 'FALSE')); |
|
| 1490 | + $settings = array_merge($settings, array('globalFires' => 'FALSE')); |
|
| 1491 | 1491 | } |
| 1492 | - $mapsatellites = filter_input(INPUT_POST,'mapsatellites',FILTER_SANITIZE_STRING); |
|
| 1492 | + $mapsatellites = filter_input(INPUT_POST, 'mapsatellites', FILTER_SANITIZE_STRING); |
|
| 1493 | 1493 | if ($mapsatellites == 'mapsatellites') { |
| 1494 | - $settings = array_merge($settings,array('globalMapSatellites' => 'TRUE')); |
|
| 1494 | + $settings = array_merge($settings, array('globalMapSatellites' => 'TRUE')); |
|
| 1495 | 1495 | } else { |
| 1496 | - $settings = array_merge($settings,array('globalMapSatellites' => 'FALSE')); |
|
| 1496 | + $settings = array_merge($settings, array('globalMapSatellites' => 'FALSE')); |
|
| 1497 | 1497 | } |
| 1498 | - $map3ddefault = filter_input(INPUT_POST,'map3ddefault',FILTER_SANITIZE_STRING); |
|
| 1498 | + $map3ddefault = filter_input(INPUT_POST, 'map3ddefault', FILTER_SANITIZE_STRING); |
|
| 1499 | 1499 | if ($map3ddefault == 'map3ddefault') { |
| 1500 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'TRUE')); |
|
| 1500 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'TRUE')); |
|
| 1501 | 1501 | } else { |
| 1502 | - $settings = array_merge($settings,array('globalMap3Ddefault' => 'FALSE')); |
|
| 1502 | + $settings = array_merge($settings, array('globalMap3Ddefault' => 'FALSE')); |
|
| 1503 | 1503 | } |
| 1504 | - $map3dliveries = filter_input(INPUT_POST,'map3dliveries',FILTER_SANITIZE_STRING); |
|
| 1504 | + $map3dliveries = filter_input(INPUT_POST, 'map3dliveries', FILTER_SANITIZE_STRING); |
|
| 1505 | 1505 | if ($map3dliveries == 'map3dliveries') { |
| 1506 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'TRUE')); |
|
| 1506 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'TRUE')); |
|
| 1507 | 1507 | } else { |
| 1508 | - $settings = array_merge($settings,array('globalMap3DLiveries' => 'FALSE')); |
|
| 1508 | + $settings = array_merge($settings, array('globalMap3DLiveries' => 'FALSE')); |
|
| 1509 | 1509 | } |
| 1510 | - $translate = filter_input(INPUT_POST,'translate',FILTER_SANITIZE_STRING); |
|
| 1510 | + $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING); |
|
| 1511 | 1511 | if ($translate == 'translate') { |
| 1512 | - $settings = array_merge($settings,array('globalTranslate' => 'TRUE')); |
|
| 1512 | + $settings = array_merge($settings, array('globalTranslate' => 'TRUE')); |
|
| 1513 | 1513 | } else { |
| 1514 | - $settings = array_merge($settings,array('globalTranslate' => 'FALSE')); |
|
| 1514 | + $settings = array_merge($settings, array('globalTranslate' => 'FALSE')); |
|
| 1515 | 1515 | } |
| 1516 | - $realairlines = filter_input(INPUT_POST,'realairlines',FILTER_SANITIZE_STRING); |
|
| 1516 | + $realairlines = filter_input(INPUT_POST, 'realairlines', FILTER_SANITIZE_STRING); |
|
| 1517 | 1517 | if ($realairlines == 'realairlines') { |
| 1518 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'TRUE')); |
|
| 1518 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'TRUE')); |
|
| 1519 | 1519 | } else { |
| 1520 | - $settings = array_merge($settings,array('globalUseRealAirlines' => 'FALSE')); |
|
| 1520 | + $settings = array_merge($settings, array('globalUseRealAirlines' => 'FALSE')); |
|
| 1521 | 1521 | } |
| 1522 | - $estimation = filter_input(INPUT_POST,'estimation',FILTER_SANITIZE_STRING); |
|
| 1522 | + $estimation = filter_input(INPUT_POST, 'estimation', FILTER_SANITIZE_STRING); |
|
| 1523 | 1523 | if ($estimation == 'estimation') { |
| 1524 | - $settings = array_merge($settings,array('globalMapEstimation' => 'TRUE')); |
|
| 1524 | + $settings = array_merge($settings, array('globalMapEstimation' => 'TRUE')); |
|
| 1525 | 1525 | } else { |
| 1526 | - $settings = array_merge($settings,array('globalMapEstimation' => 'FALSE')); |
|
| 1526 | + $settings = array_merge($settings, array('globalMapEstimation' => 'FALSE')); |
|
| 1527 | 1527 | } |
| 1528 | - $metar = filter_input(INPUT_POST,'metar',FILTER_SANITIZE_STRING); |
|
| 1528 | + $metar = filter_input(INPUT_POST, 'metar', FILTER_SANITIZE_STRING); |
|
| 1529 | 1529 | if ($metar == 'metar') { |
| 1530 | - $settings = array_merge($settings,array('globalMETAR' => 'TRUE')); |
|
| 1530 | + $settings = array_merge($settings, array('globalMETAR' => 'TRUE')); |
|
| 1531 | 1531 | } else { |
| 1532 | - $settings = array_merge($settings,array('globalMETAR' => 'FALSE')); |
|
| 1532 | + $settings = array_merge($settings, array('globalMETAR' => 'FALSE')); |
|
| 1533 | 1533 | } |
| 1534 | - $metarcycle = filter_input(INPUT_POST,'metarcycle',FILTER_SANITIZE_STRING); |
|
| 1534 | + $metarcycle = filter_input(INPUT_POST, 'metarcycle', FILTER_SANITIZE_STRING); |
|
| 1535 | 1535 | if ($metarcycle == 'metarcycle') { |
| 1536 | - $settings = array_merge($settings,array('globalMETARcycle' => 'TRUE')); |
|
| 1536 | + $settings = array_merge($settings, array('globalMETARcycle' => 'TRUE')); |
|
| 1537 | 1537 | } else { |
| 1538 | - $settings = array_merge($settings,array('globalMETARcycle' => 'FALSE')); |
|
| 1538 | + $settings = array_merge($settings, array('globalMETARcycle' => 'FALSE')); |
|
| 1539 | 1539 | } |
| 1540 | - $fork = filter_input(INPUT_POST,'fork',FILTER_SANITIZE_STRING); |
|
| 1540 | + $fork = filter_input(INPUT_POST, 'fork', FILTER_SANITIZE_STRING); |
|
| 1541 | 1541 | if ($fork == 'fork') { |
| 1542 | - $settings = array_merge($settings,array('globalFork' => 'TRUE')); |
|
| 1542 | + $settings = array_merge($settings, array('globalFork' => 'TRUE')); |
|
| 1543 | 1543 | } else { |
| 1544 | - $settings = array_merge($settings,array('globalFork' => 'FALSE')); |
|
| 1544 | + $settings = array_merge($settings, array('globalFork' => 'FALSE')); |
|
| 1545 | 1545 | } |
| 1546 | 1546 | |
| 1547 | - $colormap = filter_input(INPUT_POST,'colormap',FILTER_SANITIZE_STRING); |
|
| 1547 | + $colormap = filter_input(INPUT_POST, 'colormap', FILTER_SANITIZE_STRING); |
|
| 1548 | 1548 | if ($colormap == 'colormap') { |
| 1549 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1549 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'TRUE')); |
|
| 1550 | 1550 | } else { |
| 1551 | - $settings = array_merge($settings,array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1551 | + $settings = array_merge($settings, array('globalMapAltitudeColor' => 'FALSE')); |
|
| 1552 | 1552 | } |
| 1553 | 1553 | |
| 1554 | 1554 | if (isset($_POST['aircrafticoncolor'])) { |
| 1555 | - $aircrafticoncolor = filter_input(INPUT_POST,'aircrafticoncolor',FILTER_SANITIZE_STRING); |
|
| 1556 | - $settings = array_merge($settings,array('globalAircraftIconColor' => substr($aircrafticoncolor,1))); |
|
| 1555 | + $aircrafticoncolor = filter_input(INPUT_POST, 'aircrafticoncolor', FILTER_SANITIZE_STRING); |
|
| 1556 | + $settings = array_merge($settings, array('globalAircraftIconColor' => substr($aircrafticoncolor, 1))); |
|
| 1557 | 1557 | } |
| 1558 | 1558 | |
| 1559 | - $airportzoom = filter_input(INPUT_POST,'airportzoom',FILTER_SANITIZE_NUMBER_INT); |
|
| 1560 | - $settings = array_merge($settings,array('globalAirportZoom' => $airportzoom)); |
|
| 1559 | + $airportzoom = filter_input(INPUT_POST, 'airportzoom', FILTER_SANITIZE_NUMBER_INT); |
|
| 1560 | + $settings = array_merge($settings, array('globalAirportZoom' => $airportzoom)); |
|
| 1561 | 1561 | |
| 1562 | - $unitdistance = filter_input(INPUT_POST,'unitdistance',FILTER_SANITIZE_STRING); |
|
| 1563 | - $settings = array_merge($settings,array('globalUnitDistance' => $unitdistance)); |
|
| 1564 | - $unitaltitude = filter_input(INPUT_POST,'unitaltitude',FILTER_SANITIZE_STRING); |
|
| 1565 | - $settings = array_merge($settings,array('globalUnitAltitude' => $unitaltitude)); |
|
| 1566 | - $unitspeed = filter_input(INPUT_POST,'unitspeed',FILTER_SANITIZE_STRING); |
|
| 1567 | - $settings = array_merge($settings,array('globalUnitSpeed' => $unitspeed)); |
|
| 1562 | + $unitdistance = filter_input(INPUT_POST, 'unitdistance', FILTER_SANITIZE_STRING); |
|
| 1563 | + $settings = array_merge($settings, array('globalUnitDistance' => $unitdistance)); |
|
| 1564 | + $unitaltitude = filter_input(INPUT_POST, 'unitaltitude', FILTER_SANITIZE_STRING); |
|
| 1565 | + $settings = array_merge($settings, array('globalUnitAltitude' => $unitaltitude)); |
|
| 1566 | + $unitspeed = filter_input(INPUT_POST, 'unitspeed', FILTER_SANITIZE_STRING); |
|
| 1567 | + $settings = array_merge($settings, array('globalUnitSpeed' => $unitspeed)); |
|
| 1568 | 1568 | |
| 1569 | - $mappopup = filter_input(INPUT_POST,'mappopup',FILTER_SANITIZE_STRING); |
|
| 1569 | + $mappopup = filter_input(INPUT_POST, 'mappopup', FILTER_SANITIZE_STRING); |
|
| 1570 | 1570 | if ($mappopup == 'mappopup') { |
| 1571 | - $settings = array_merge($settings,array('globalMapPopup' => 'TRUE')); |
|
| 1571 | + $settings = array_merge($settings, array('globalMapPopup' => 'TRUE')); |
|
| 1572 | 1572 | } else { |
| 1573 | - $settings = array_merge($settings,array('globalMapPopup' => 'FALSE')); |
|
| 1573 | + $settings = array_merge($settings, array('globalMapPopup' => 'FALSE')); |
|
| 1574 | 1574 | } |
| 1575 | - $airportpopup = filter_input(INPUT_POST,'airportpopup',FILTER_SANITIZE_STRING); |
|
| 1575 | + $airportpopup = filter_input(INPUT_POST, 'airportpopup', FILTER_SANITIZE_STRING); |
|
| 1576 | 1576 | if ($airportpopup == 'airportpopup') { |
| 1577 | - $settings = array_merge($settings,array('globalAirportPopup' => 'TRUE')); |
|
| 1577 | + $settings = array_merge($settings, array('globalAirportPopup' => 'TRUE')); |
|
| 1578 | 1578 | } else { |
| 1579 | - $settings = array_merge($settings,array('globalAirportPopup' => 'FALSE')); |
|
| 1579 | + $settings = array_merge($settings, array('globalAirportPopup' => 'FALSE')); |
|
| 1580 | 1580 | } |
| 1581 | - $maphistory = filter_input(INPUT_POST,'maphistory',FILTER_SANITIZE_STRING); |
|
| 1581 | + $maphistory = filter_input(INPUT_POST, 'maphistory', FILTER_SANITIZE_STRING); |
|
| 1582 | 1582 | if ($maphistory == 'maphistory') { |
| 1583 | - $settings = array_merge($settings,array('globalMapHistory' => 'TRUE')); |
|
| 1583 | + $settings = array_merge($settings, array('globalMapHistory' => 'TRUE')); |
|
| 1584 | 1584 | } else { |
| 1585 | - $settings = array_merge($settings,array('globalMapHistory' => 'FALSE')); |
|
| 1585 | + $settings = array_merge($settings, array('globalMapHistory' => 'FALSE')); |
|
| 1586 | 1586 | } |
| 1587 | - $maptooltip = filter_input(INPUT_POST,'maptooltip',FILTER_SANITIZE_STRING); |
|
| 1587 | + $maptooltip = filter_input(INPUT_POST, 'maptooltip', FILTER_SANITIZE_STRING); |
|
| 1588 | 1588 | if ($maptooltip == 'maptooltip') { |
| 1589 | - $settings = array_merge($settings,array('globalMapTooltip' => 'TRUE')); |
|
| 1589 | + $settings = array_merge($settings, array('globalMapTooltip' => 'TRUE')); |
|
| 1590 | 1590 | } else { |
| 1591 | - $settings = array_merge($settings,array('globalMapTooltip' => 'FALSE')); |
|
| 1591 | + $settings = array_merge($settings, array('globalMapTooltip' => 'FALSE')); |
|
| 1592 | 1592 | } |
| 1593 | - $flightroute = filter_input(INPUT_POST,'flightroute',FILTER_SANITIZE_STRING); |
|
| 1593 | + $flightroute = filter_input(INPUT_POST, 'flightroute', FILTER_SANITIZE_STRING); |
|
| 1594 | 1594 | if ($flightroute == 'flightroute') { |
| 1595 | - $settings = array_merge($settings,array('globalMapRoute' => 'TRUE')); |
|
| 1595 | + $settings = array_merge($settings, array('globalMapRoute' => 'TRUE')); |
|
| 1596 | 1596 | } else { |
| 1597 | - $settings = array_merge($settings,array('globalMapRoute' => 'FALSE')); |
|
| 1597 | + $settings = array_merge($settings, array('globalMapRoute' => 'FALSE')); |
|
| 1598 | 1598 | } |
| 1599 | - $flightremainingroute = filter_input(INPUT_POST,'flightremainingroute',FILTER_SANITIZE_STRING); |
|
| 1599 | + $flightremainingroute = filter_input(INPUT_POST, 'flightremainingroute', FILTER_SANITIZE_STRING); |
|
| 1600 | 1600 | if ($flightremainingroute == 'flightremainingroute') { |
| 1601 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1601 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'TRUE')); |
|
| 1602 | 1602 | } else { |
| 1603 | - $settings = array_merge($settings,array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1603 | + $settings = array_merge($settings, array('globalMapRemainingRoute' => 'FALSE')); |
|
| 1604 | 1604 | } |
| 1605 | - $allflights = filter_input(INPUT_POST,'allflights',FILTER_SANITIZE_STRING); |
|
| 1605 | + $allflights = filter_input(INPUT_POST, 'allflights', FILTER_SANITIZE_STRING); |
|
| 1606 | 1606 | if ($allflights == 'allflights') { |
| 1607 | - $settings = array_merge($settings,array('globalAllFlights' => 'TRUE')); |
|
| 1607 | + $settings = array_merge($settings, array('globalAllFlights' => 'TRUE')); |
|
| 1608 | 1608 | } else { |
| 1609 | - $settings = array_merge($settings,array('globalAllFlights' => 'FALSE')); |
|
| 1609 | + $settings = array_merge($settings, array('globalAllFlights' => 'FALSE')); |
|
| 1610 | 1610 | } |
| 1611 | - $bbox = filter_input(INPUT_POST,'bbox',FILTER_SANITIZE_STRING); |
|
| 1611 | + $bbox = filter_input(INPUT_POST, 'bbox', FILTER_SANITIZE_STRING); |
|
| 1612 | 1612 | if ($bbox == 'bbox') { |
| 1613 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'TRUE')); |
|
| 1613 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'TRUE')); |
|
| 1614 | 1614 | } else { |
| 1615 | - $settings = array_merge($settings,array('globalMapUseBbox' => 'FALSE')); |
|
| 1615 | + $settings = array_merge($settings, array('globalMapUseBbox' => 'FALSE')); |
|
| 1616 | 1616 | } |
| 1617 | - $groundaltitude = filter_input(INPUT_POST,'groundaltitude',FILTER_SANITIZE_STRING); |
|
| 1617 | + $groundaltitude = filter_input(INPUT_POST, 'groundaltitude', FILTER_SANITIZE_STRING); |
|
| 1618 | 1618 | if ($groundaltitude == 'groundaltitude') { |
| 1619 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'TRUE')); |
|
| 1619 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'TRUE')); |
|
| 1620 | 1620 | } else { |
| 1621 | - $settings = array_merge($settings,array('globalGroundAltitude' => 'FALSE')); |
|
| 1621 | + $settings = array_merge($settings, array('globalGroundAltitude' => 'FALSE')); |
|
| 1622 | 1622 | } |
| 1623 | - $waypoints = filter_input(INPUT_POST,'waypoints',FILTER_SANITIZE_STRING); |
|
| 1623 | + $waypoints = filter_input(INPUT_POST, 'waypoints', FILTER_SANITIZE_STRING); |
|
| 1624 | 1624 | if ($waypoints == 'waypoints') { |
| 1625 | - $settings = array_merge($settings,array('globalWaypoints' => 'TRUE')); |
|
| 1625 | + $settings = array_merge($settings, array('globalWaypoints' => 'TRUE')); |
|
| 1626 | 1626 | } else { |
| 1627 | - $settings = array_merge($settings,array('globalWaypoints' => 'FALSE')); |
|
| 1627 | + $settings = array_merge($settings, array('globalWaypoints' => 'FALSE')); |
|
| 1628 | 1628 | } |
| 1629 | - $geoid = filter_input(INPUT_POST,'geoid',FILTER_SANITIZE_STRING); |
|
| 1629 | + $geoid = filter_input(INPUT_POST, 'geoid', FILTER_SANITIZE_STRING); |
|
| 1630 | 1630 | if ($geoid == 'geoid') { |
| 1631 | - $settings = array_merge($settings,array('globalGeoid' => 'TRUE')); |
|
| 1631 | + $settings = array_merge($settings, array('globalGeoid' => 'TRUE')); |
|
| 1632 | 1632 | } else { |
| 1633 | - $settings = array_merge($settings,array('globalGeoid' => 'FALSE')); |
|
| 1633 | + $settings = array_merge($settings, array('globalGeoid' => 'FALSE')); |
|
| 1634 | 1634 | } |
| 1635 | - $geoid_source = filter_input(INPUT_POST,'geoid_source',FILTER_SANITIZE_STRING); |
|
| 1636 | - $settings = array_merge($settings,array('globalGeoidSource' => $geoid_source)); |
|
| 1635 | + $geoid_source = filter_input(INPUT_POST, 'geoid_source', FILTER_SANITIZE_STRING); |
|
| 1636 | + $settings = array_merge($settings, array('globalGeoidSource' => $geoid_source)); |
|
| 1637 | 1637 | |
| 1638 | - $noairlines = filter_input(INPUT_POST,'noairlines',FILTER_SANITIZE_STRING); |
|
| 1638 | + $noairlines = filter_input(INPUT_POST, 'noairlines', FILTER_SANITIZE_STRING); |
|
| 1639 | 1639 | if ($noairlines == 'noairlines') { |
| 1640 | - $settings = array_merge($settings,array('globalNoAirlines' => 'TRUE')); |
|
| 1640 | + $settings = array_merge($settings, array('globalNoAirlines' => 'TRUE')); |
|
| 1641 | 1641 | } else { |
| 1642 | - $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
|
| 1642 | + $settings = array_merge($settings, array('globalNoAirlines' => 'FALSE')); |
|
| 1643 | 1643 | } |
| 1644 | 1644 | |
| 1645 | - $tsk = filter_input(INPUT_POST,'tsk',FILTER_SANITIZE_STRING); |
|
| 1645 | + $tsk = filter_input(INPUT_POST, 'tsk', FILTER_SANITIZE_STRING); |
|
| 1646 | 1646 | if ($tsk == 'tsk') { |
| 1647 | - $settings = array_merge($settings,array('globalTSK' => 'TRUE')); |
|
| 1647 | + $settings = array_merge($settings, array('globalTSK' => 'TRUE')); |
|
| 1648 | 1648 | } else { |
| 1649 | - $settings = array_merge($settings,array('globalTSK' => 'FALSE')); |
|
| 1649 | + $settings = array_merge($settings, array('globalTSK' => 'FALSE')); |
|
| 1650 | 1650 | } |
| 1651 | - $mapmatching = filter_input(INPUT_POST,'mapmatching',FILTER_SANITIZE_STRING); |
|
| 1651 | + $mapmatching = filter_input(INPUT_POST, 'mapmatching', FILTER_SANITIZE_STRING); |
|
| 1652 | 1652 | if ($mapmatching == 'mapmatching') { |
| 1653 | - $settings = array_merge($settings,array('globalMapMatching' => 'TRUE')); |
|
| 1653 | + $settings = array_merge($settings, array('globalMapMatching' => 'TRUE')); |
|
| 1654 | 1654 | } else { |
| 1655 | - $settings = array_merge($settings,array('globalMapMatching' => 'FALSE')); |
|
| 1655 | + $settings = array_merge($settings, array('globalMapMatching' => 'FALSE')); |
|
| 1656 | 1656 | } |
| 1657 | - $mapmatchingsource = filter_input(INPUT_POST,'mapmatchingsource',FILTER_SANITIZE_STRING); |
|
| 1658 | - $settings = array_merge($settings,array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1659 | - $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
|
| 1660 | - $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
|
| 1657 | + $mapmatchingsource = filter_input(INPUT_POST, 'mapmatchingsource', FILTER_SANITIZE_STRING); |
|
| 1658 | + $settings = array_merge($settings, array('globalMapMatchingSource' => $mapmatchingsource)); |
|
| 1659 | + $graphhopper = filter_input(INPUT_POST, 'graphhopper', FILTER_SANITIZE_STRING); |
|
| 1660 | + $settings = array_merge($settings, array('globalGraphHopperKey' => $graphhopper)); |
|
| 1661 | 1661 | |
| 1662 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1662 | + if (!isset($globalTransaction)) $settings = array_merge($settings, array('globalTransaction' => 'TRUE')); |
|
| 1663 | 1663 | |
| 1664 | 1664 | // Set some defaults values... |
| 1665 | 1665 | if (!isset($globalAircraftImageSources)) { |
| 1666 | - $globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters'); |
|
| 1667 | - $settings = array_merge($settings,array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1666 | + $globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters'); |
|
| 1667 | + $settings = array_merge($settings, array('globalAircraftImageSources' => $globalAircraftImageSources)); |
|
| 1668 | 1668 | } |
| 1669 | 1669 | |
| 1670 | 1670 | if (!isset($globalSchedulesSources)) { |
| 1671 | - $globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware'); |
|
| 1672 | - $settings = array_merge($settings,array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1671 | + $globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware'); |
|
| 1672 | + $settings = array_merge($settings, array('globalSchedulesSources' => $globalSchedulesSources)); |
|
| 1673 | 1673 | } |
| 1674 | 1674 | |
| 1675 | - $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
|
| 1675 | + $settings = array_merge($settings, array('globalInstalled' => 'TRUE')); |
|
| 1676 | 1676 | |
| 1677 | 1677 | if ($error == '') settings::modify_settings($settings); |
| 1678 | 1678 | 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,45 +167,72 @@ 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> |
| 190 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 216 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 217 | + print $globalURL; |
|
| 218 | +} |
|
| 219 | +?>" /> |
|
| 191 | 220 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 192 | 221 | </p> |
| 193 | 222 | <p> |
| 194 | 223 | <label for="timezone">Timezone</label> |
| 195 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 224 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 225 | + print $globalTimezone; |
|
| 226 | +} |
|
| 227 | +?>" /> |
|
| 196 | 228 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 197 | 229 | </p> |
| 198 | 230 | <p> |
| 199 | 231 | <label for="language">Language</label> |
| 200 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 232 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 233 | + print $globalLanguage; |
|
| 234 | +} |
|
| 235 | +?>" /> |
|
| 201 | 236 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 202 | 237 | </p> |
| 203 | 238 | </fieldset> |
@@ -218,11 +253,17 @@ discard block |
||
| 218 | 253 | <div id="mapbox_data"> |
| 219 | 254 | <p> |
| 220 | 255 | <label for="mapboxid">Mapbox id</label> |
| 221 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 256 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 257 | + print $globalMapboxId; |
|
| 258 | +} |
|
| 259 | +?>" /> |
|
| 222 | 260 | </p> |
| 223 | 261 | <p> |
| 224 | 262 | <label for="mapboxtoken">Mapbox token</label> |
| 225 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 263 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 264 | + print $globalMapboxToken; |
|
| 265 | +} |
|
| 266 | +?>" /> |
|
| 226 | 267 | </p> |
| 227 | 268 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 228 | 269 | </div> |
@@ -230,7 +271,10 @@ discard block |
||
| 230 | 271 | <div id="google_data"> |
| 231 | 272 | <p> |
| 232 | 273 | <label for="googlekey">Google API key</label> |
| 233 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 274 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 275 | + print $globalGoogleAPIKey; |
|
| 276 | +} |
|
| 277 | +?>" /> |
|
| 234 | 278 | <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> |
| 235 | 279 | </p> |
| 236 | 280 | </div> |
@@ -238,7 +282,10 @@ discard block |
||
| 238 | 282 | <div id="bing_data"> |
| 239 | 283 | <p> |
| 240 | 284 | <label for="bingkey">Bing Map key</label> |
| 241 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 285 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 286 | + print $globalBingMapKey; |
|
| 287 | +} |
|
| 288 | +?>" /> |
|
| 242 | 289 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 243 | 290 | </p> |
| 244 | 291 | </div> |
@@ -246,7 +293,10 @@ discard block |
||
| 246 | 293 | <div id="mapquest_data"> |
| 247 | 294 | <p> |
| 248 | 295 | <label for="mapquestkey">MapQuest key</label> |
| 249 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 296 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 297 | + print $globalMapQuestKey; |
|
| 298 | +} |
|
| 299 | +?>" /> |
|
| 250 | 300 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 251 | 301 | </p> |
| 252 | 302 | </div> |
@@ -254,11 +304,17 @@ discard block |
||
| 254 | 304 | <div id="here_data"> |
| 255 | 305 | <p> |
| 256 | 306 | <label for="hereappid">Here App_Id</label> |
| 257 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 307 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 308 | + print $globalHereappId; |
|
| 309 | +} |
|
| 310 | +?>" /> |
|
| 258 | 311 | </p> |
| 259 | 312 | <p> |
| 260 | 313 | <label for="hereappcode">Here App_Code</label> |
| 261 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 314 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 315 | + print $globalHereappCode; |
|
| 316 | +} |
|
| 317 | +?>" /> |
|
| 262 | 318 | </p> |
| 263 | 319 | <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> |
| 264 | 320 | </div> |
@@ -266,7 +322,10 @@ discard block |
||
| 266 | 322 | <div id="openweathermap_data"> |
| 267 | 323 | <p> |
| 268 | 324 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 269 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 325 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 326 | + print $globalOpenWeatherMapKey; |
|
| 327 | +} |
|
| 328 | +?>" /> |
|
| 270 | 329 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 271 | 330 | </p> |
| 272 | 331 | </div> |
@@ -295,42 +354,86 @@ discard block |
||
| 295 | 354 | <legend>Coverage area</legend> |
| 296 | 355 | <p> |
| 297 | 356 | <label for="latitudemax">The maximum latitude (north)</label> |
| 298 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 357 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 358 | + print $globalLatitudeMax; |
|
| 359 | +} |
|
| 360 | +?>" /> |
|
| 299 | 361 | </p> |
| 300 | 362 | <p> |
| 301 | 363 | <label for="latitudemin">The minimum latitude (south)</label> |
| 302 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 364 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 365 | + print $globalLatitudeMin; |
|
| 366 | +} |
|
| 367 | +?>" /> |
|
| 303 | 368 | </p> |
| 304 | 369 | <p> |
| 305 | 370 | <label for="longitudemax">The maximum longitude (west)</label> |
| 306 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 371 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 372 | + print $globalLongitudeMax; |
|
| 373 | +} |
|
| 374 | +?>" /> |
|
| 307 | 375 | </p> |
| 308 | 376 | <p> |
| 309 | 377 | <label for="longitudemin">The minimum longitude (east)</label> |
| 310 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 378 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 379 | + print $globalLongitudeMin; |
|
| 380 | +} |
|
| 381 | +?>" /> |
|
| 311 | 382 | </p> |
| 312 | 383 | <p> |
| 313 | 384 | <label for="latitudecenter">The latitude center</label> |
| 314 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 385 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 386 | + print $globalCenterLatitude; |
|
| 387 | +} |
|
| 388 | +?>" /> |
|
| 315 | 389 | </p> |
| 316 | 390 | <p> |
| 317 | 391 | <label for="longitudecenter">The longitude center</label> |
| 318 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 392 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 393 | + print $globalCenterLongitude; |
|
| 394 | +} |
|
| 395 | +?>" /> |
|
| 319 | 396 | </p> |
| 320 | 397 | <p> |
| 321 | 398 | <label for="livezoom">Default Zoom on live map</label> |
| 322 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 399 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 400 | + print $globalLiveZoom; |
|
| 401 | +} else { |
|
| 402 | + print '9'; |
|
| 403 | +} |
|
| 404 | +?>" /> |
|
| 323 | 405 | </p> |
| 324 | 406 | <p> |
| 325 | 407 | <label for="squawk_country">Country for squawk usage</label> |
| 326 | 408 | <select name="squawk_country" id="squawk_country"> |
| 327 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 328 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 329 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 330 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 331 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 332 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 333 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 409 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 410 | + print ' selected '; |
|
| 411 | +} |
|
| 412 | +?>>UK</option> |
|
| 413 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 414 | + print ' selected '; |
|
| 415 | +} |
|
| 416 | +?>>NZ</option> |
|
| 417 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 418 | + print ' selected '; |
|
| 419 | +} |
|
| 420 | +?>>US</option> |
|
| 421 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 422 | + print ' selected '; |
|
| 423 | +} |
|
| 424 | +?>>AU</option> |
|
| 425 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 426 | + print ' selected '; |
|
| 427 | +} |
|
| 428 | +?>>NL</option> |
|
| 429 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 430 | + print ' selected '; |
|
| 431 | +} |
|
| 432 | +?>>FR</option> |
|
| 433 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 434 | + print ' selected '; |
|
| 435 | +} |
|
| 436 | +?>>TR</option> |
|
| 334 | 437 | </select> |
| 335 | 438 | </p> |
| 336 | 439 | </fieldset> |
@@ -339,15 +442,24 @@ discard block |
||
| 339 | 442 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 340 | 443 | <p> |
| 341 | 444 | <label for="latitude">Center latitude</label> |
| 342 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 445 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 446 | + echo $globalDistanceIgnore['latitude']; |
|
| 447 | +} |
|
| 448 | +?>" /> |
|
| 343 | 449 | </p> |
| 344 | 450 | <p> |
| 345 | 451 | <label for="longitude">Center longitude</label> |
| 346 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 452 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 453 | + echo $globalDistanceIgnore['longitude']; |
|
| 454 | +} |
|
| 455 | +?>" /> |
|
| 347 | 456 | </p> |
| 348 | 457 | <p> |
| 349 | 458 | <label for="Distance">Distance (in km)</label> |
| 350 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 459 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 460 | + echo $globalDistanceIgnore['distance']; |
|
| 461 | +} |
|
| 462 | +?>" /> |
|
| 351 | 463 | </p> |
| 352 | 464 | </fieldset> |
| 353 | 465 | <fieldset id="sourceloc"> |
@@ -463,11 +575,17 @@ discard block |
||
| 463 | 575 | <div id="flightaware_data"> |
| 464 | 576 | <p> |
| 465 | 577 | <label for="flightawareusername">FlightAware username</label> |
| 466 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 578 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 579 | + print $globalFlightAwareUsername; |
|
| 580 | +} |
|
| 581 | +?>" /> |
|
| 467 | 582 | </p> |
| 468 | 583 | <p> |
| 469 | 584 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 470 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 585 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 586 | + print $globalFlightAwarePassword; |
|
| 587 | +} |
|
| 588 | +?>" /> |
|
| 471 | 589 | </p> |
| 472 | 590 | </div> |
| 473 | 591 | --> |
@@ -509,7 +627,10 @@ discard block |
||
| 509 | 627 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 510 | 628 | ?> |
| 511 | 629 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 512 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 630 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 631 | + print $source['port']; |
|
| 632 | +} |
|
| 633 | +?>" /></td> |
|
| 513 | 634 | <?php |
| 514 | 635 | } else { |
| 515 | 636 | $hostport = explode(':',$source['host']); |
@@ -528,34 +649,106 @@ discard block |
||
| 528 | 649 | ?> |
| 529 | 650 | <td> |
| 530 | 651 | <select name="format[]" id="format"> |
| 531 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 532 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 533 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 534 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 535 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 536 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 537 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 538 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 539 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 540 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 541 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 542 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 543 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 544 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 545 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 546 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 547 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 548 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 549 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 550 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 551 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 652 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 653 | + print 'selected'; |
|
| 654 | +} |
|
| 655 | +?>>Auto</option> |
|
| 656 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 657 | + print 'selected'; |
|
| 658 | +} |
|
| 659 | +?>>SBS</option> |
|
| 660 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 661 | + print 'selected'; |
|
| 662 | +} |
|
| 663 | +?>>TSV</option> |
|
| 664 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 665 | + print 'selected'; |
|
| 666 | +} |
|
| 667 | +?>>Raw</option> |
|
| 668 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 669 | + print 'selected'; |
|
| 670 | +} |
|
| 671 | +?>>APRS</option> |
|
| 672 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 673 | + print 'selected'; |
|
| 674 | +} |
|
| 675 | +?>>Radarcape deltadb.txt</option> |
|
| 676 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 677 | + print 'selected'; |
|
| 678 | +} |
|
| 679 | +?>>Vatsim</option> |
|
| 680 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 681 | + print 'selected'; |
|
| 682 | +} |
|
| 683 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 684 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 685 | + print 'selected'; |
|
| 686 | +} |
|
| 687 | +?>>Virtual Radar Server TCP</option> |
|
| 688 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 689 | + print 'selected'; |
|
| 690 | +} |
|
| 691 | +?>>phpVMS</option> |
|
| 692 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 693 | + print 'selected'; |
|
| 694 | +} |
|
| 695 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 696 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 697 | + print 'selected'; |
|
| 698 | +} |
|
| 699 | +?>>Virtual Airlines Manager</option> |
|
| 700 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 701 | + print 'selected'; |
|
| 702 | +} |
|
| 703 | +?>>IVAO</option> |
|
| 704 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 705 | + print 'selected'; |
|
| 706 | +} |
|
| 707 | +?>>FlightGear Multiplayer</option> |
|
| 708 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 709 | + print 'selected'; |
|
| 710 | +} |
|
| 711 | +?>>FlightGear Singleplayer</option> |
|
| 712 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 713 | + print 'selected'; |
|
| 714 | +} |
|
| 715 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 716 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 717 | + print 'selected'; |
|
| 718 | +} |
|
| 719 | +?>>ACARS SBS-3 over TCP</option> |
|
| 720 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 721 | + print 'selected'; |
|
| 722 | +} |
|
| 723 | +?>>NMEA AIS over TCP</option> |
|
| 724 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 725 | + print 'selected'; |
|
| 726 | +} |
|
| 727 | +?>>AirWhere website</option> |
|
| 728 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 729 | + print 'selected'; |
|
| 730 | +} |
|
| 731 | +?>>HidnSeek Callback</option> |
|
| 732 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 733 | + print 'selected'; |
|
| 734 | +} |
|
| 735 | +?>>Blitzortung</option> |
|
| 552 | 736 | </select> |
| 553 | 737 | </td> |
| 554 | 738 | <td> |
| 555 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 739 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 740 | + print $source['name']; |
|
| 741 | +} |
|
| 742 | +?>" /> |
|
| 556 | 743 | </td> |
| 557 | - <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> |
|
| 558 | - <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> |
|
| 744 | + <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']) { |
|
| 745 | + print 'checked'; |
|
| 746 | +} |
|
| 747 | +?> /></td> |
|
| 748 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 749 | + print 'checked'; |
|
| 750 | +} |
|
| 751 | +?> /></td> |
|
| 559 | 752 | <td> |
| 560 | 753 | <select name="timezones[]" id="timezones"> |
| 561 | 754 | <?php |
@@ -565,7 +758,9 @@ discard block |
||
| 565 | 758 | print '<option selected>'.$timezones.'</option>'; |
| 566 | 759 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 567 | 760 | print '<option selected>'.$timezones.'</option>'; |
| 568 | - } else print '<option>'.$timezones.'</option>'; |
|
| 761 | + } else { |
|
| 762 | + print '<option>'.$timezones.'</option>'; |
|
| 763 | + } |
|
| 569 | 764 | } |
| 570 | 765 | ?> |
| 571 | 766 | </select> |
@@ -616,7 +811,9 @@ discard block |
||
| 616 | 811 | foreach($timezonelist as $timezones){ |
| 617 | 812 | if ($timezones == 'UTC') { |
| 618 | 813 | print '<option selected>'.$timezones.'</option>'; |
| 619 | - } else print '<option>'.$timezones.'</option>'; |
|
| 814 | + } else { |
|
| 815 | + print '<option>'.$timezones.'</option>'; |
|
| 816 | + } |
|
| 620 | 817 | } |
| 621 | 818 | ?> |
| 622 | 819 | </select> |
@@ -640,11 +837,17 @@ discard block |
||
| 640 | 837 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 641 | 838 | <p> |
| 642 | 839 | <label for="acarshost">ACARS UDP host</label> |
| 643 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 840 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 841 | + print $globalACARSHost; |
|
| 842 | +} |
|
| 843 | +?>" /> |
|
| 644 | 844 | </p> |
| 645 | 845 | <p> |
| 646 | 846 | <label for="acarsport">ACARS UDP port</label> |
| 647 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 847 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 848 | + print $globalACARSPort; |
|
| 849 | +} |
|
| 850 | +?>" /> |
|
| 648 | 851 | </p> |
| 649 | 852 | </fieldset> |
| 650 | 853 | </div> |
@@ -670,17 +873,38 @@ discard block |
||
| 670 | 873 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 671 | 874 | <td> |
| 672 | 875 | <select name="newslang[]"> |
| 673 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 674 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 876 | + <option value="en"<?php if ($lng == 'en') { |
|
| 877 | + print ' selected'; |
|
| 878 | +} |
|
| 879 | +?>>English</option> |
|
| 880 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 881 | + print ' selected'; |
|
| 882 | +} |
|
| 883 | +?>>French</option> |
|
| 675 | 884 | </select> |
| 676 | 885 | </td> |
| 677 | 886 | <td> |
| 678 | 887 | <select name="newstype[]"> |
| 679 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 680 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 681 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 682 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 683 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 888 | + <option value="global"<?php if ($type == 'global') { |
|
| 889 | + print ' selected'; |
|
| 890 | +} |
|
| 891 | +?>>Global</option> |
|
| 892 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 893 | + print ' selected'; |
|
| 894 | +} |
|
| 895 | +?>>Aircraft</option> |
|
| 896 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 897 | + print ' selected'; |
|
| 898 | +} |
|
| 899 | +?>>Marine</option> |
|
| 900 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 901 | + print ' selected'; |
|
| 902 | +} |
|
| 903 | +?>>Tracker</option> |
|
| 904 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 905 | + print ' selected'; |
|
| 906 | +} |
|
| 907 | +?>>Satellite</option> |
|
| 684 | 908 | </select> |
| 685 | 909 | </td> |
| 686 | 910 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -813,13 +1037,19 @@ discard block |
||
| 813 | 1037 | <div id="schedules_options"> |
| 814 | 1038 | <p> |
| 815 | 1039 | <label for="britishairways">British Airways API Key</label> |
| 816 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1040 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1041 | + print $globalBritishAirwaysKey; |
|
| 1042 | +} |
|
| 1043 | +?>" /> |
|
| 817 | 1044 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 818 | 1045 | </p> |
| 819 | 1046 | <!-- |
| 820 | 1047 | <p> |
| 821 | 1048 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 822 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1049 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1050 | + print $globalTransaviaKey; |
|
| 1051 | +} |
|
| 1052 | +?>" /> |
|
| 823 | 1053 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 824 | 1054 | </p> |
| 825 | 1055 | --> |
@@ -828,10 +1058,16 @@ discard block |
||
| 828 | 1058 | <b>Lufthansa API Key</b> |
| 829 | 1059 | <p> |
| 830 | 1060 | <label for="lufthansakey">Key</label> |
| 831 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1061 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1062 | + print $globalLufthansaKey['key']; |
|
| 1063 | +} |
|
| 1064 | +?>" /> |
|
| 832 | 1065 | </p><p> |
| 833 | 1066 | <label for="lufthansasecret">Secret</label> |
| 834 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1067 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1068 | + print $globalLufthansaKey['secret']; |
|
| 1069 | +} |
|
| 1070 | +?>" /> |
|
| 835 | 1071 | </p> |
| 836 | 1072 | </div> |
| 837 | 1073 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -841,11 +1077,17 @@ discard block |
||
| 841 | 1077 | <b>FlightAware API Key</b> |
| 842 | 1078 | <p> |
| 843 | 1079 | <label for="flightawareusername">Username</label> |
| 844 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1080 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1081 | + print $globalFlightAwareUsername; |
|
| 1082 | +} |
|
| 1083 | +?>" /> |
|
| 845 | 1084 | </p> |
| 846 | 1085 | <p> |
| 847 | 1086 | <label for="flightawarepassword">API key</label> |
| 848 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1087 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1088 | + print $globalFlightAwarePassword; |
|
| 1089 | +} |
|
| 1090 | +?>" /> |
|
| 849 | 1091 | </p> |
| 850 | 1092 | </div> |
| 851 | 1093 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -862,16 +1104,28 @@ discard block |
||
| 862 | 1104 | <p> |
| 863 | 1105 | <label for="mapmatchingsource">Map Matching source</label> |
| 864 | 1106 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 865 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 866 | - <option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>OSMR</option> |
|
| 867 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1107 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1108 | + print 'selected="selected" '; |
|
| 1109 | +} |
|
| 1110 | +?>>GraphHopper</option> |
|
| 1111 | + <option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) { |
|
| 1112 | + print 'selected="selected" '; |
|
| 1113 | +} |
|
| 1114 | +?>>OSMR</option> |
|
| 1115 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1116 | + print 'selected="selected" '; |
|
| 1117 | +} |
|
| 1118 | +?>>Mapbox</option> |
|
| 868 | 1119 | </select> |
| 869 | 1120 | <p class="help-block">Mapbox need the API Key defined in map section</p> |
| 870 | 1121 | </p> |
| 871 | 1122 | <br /> |
| 872 | 1123 | <p> |
| 873 | 1124 | <label for="graphhopper">GraphHopper API Key</label> |
| 874 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1125 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1126 | + print $globalGraphHopperKey; |
|
| 1127 | +} |
|
| 1128 | +?>" /> |
|
| 875 | 1129 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 876 | 1130 | </p> |
| 877 | 1131 | </div> |
@@ -889,7 +1143,10 @@ discard block |
||
| 889 | 1143 | </p> |
| 890 | 1144 | <p> |
| 891 | 1145 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 892 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1146 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1147 | + print $globalNOTAMSource; |
|
| 1148 | +} |
|
| 1149 | +?>" /> |
|
| 893 | 1150 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 894 | 1151 | </p> |
| 895 | 1152 | <br /> |
@@ -905,14 +1162,20 @@ discard block |
||
| 905 | 1162 | <div id="metarsrc"> |
| 906 | 1163 | <p> |
| 907 | 1164 | <label for="metarsource">URL of your METAR source</label> |
| 908 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1165 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1166 | + print $globalMETARurl; |
|
| 1167 | +} |
|
| 1168 | +?>" /> |
|
| 909 | 1169 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 910 | 1170 | </p> |
| 911 | 1171 | </div> |
| 912 | 1172 | <br /> |
| 913 | 1173 | <p> |
| 914 | 1174 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 915 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1175 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1176 | + print $globalBitlyAccessToken; |
|
| 1177 | +} |
|
| 1178 | +?>" /> |
|
| 916 | 1179 | </p> |
| 917 | 1180 | <br /> |
| 918 | 1181 | <p> |
@@ -928,11 +1191,26 @@ discard block |
||
| 928 | 1191 | <p> |
| 929 | 1192 | <label for="geoid_source">Geoid Source</label> |
| 930 | 1193 | <select name="geoid_source" id="geoid_source"> |
| 931 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 932 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 933 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 934 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 935 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1194 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1195 | + print ' selected="selected"'; |
|
| 1196 | +} |
|
| 1197 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1198 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1199 | + print ' selected="selected"'; |
|
| 1200 | +} |
|
| 1201 | +?>>EGM96 5' (19MB)</option> |
|
| 1202 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1203 | + print ' selected="selected"'; |
|
| 1204 | +} |
|
| 1205 | +?>>EGM2008 5' (19MB)</option> |
|
| 1206 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1207 | + print ' selected="selected"'; |
|
| 1208 | +} |
|
| 1209 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1210 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1211 | + print ' selected="selected"'; |
|
| 1212 | +} |
|
| 1213 | +?>>EGM2008 1' (470MB)</option> |
|
| 936 | 1214 | </select> |
| 937 | 1215 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 938 | 1216 | </p> |
@@ -954,7 +1232,12 @@ discard block |
||
| 954 | 1232 | </p> |
| 955 | 1233 | <p> |
| 956 | 1234 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 957 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1235 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1236 | + print $globalArchiveMonths; |
|
| 1237 | +} else { |
|
| 1238 | + echo '1'; |
|
| 1239 | +} |
|
| 1240 | +?>" /> |
|
| 958 | 1241 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 959 | 1242 | </p> |
| 960 | 1243 | <p> |
@@ -964,12 +1247,22 @@ discard block |
||
| 964 | 1247 | </p> |
| 965 | 1248 | <p> |
| 966 | 1249 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 967 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1250 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1251 | + print $globalArchiveKeepMonths; |
|
| 1252 | +} else { |
|
| 1253 | + echo '1'; |
|
| 1254 | +} |
|
| 1255 | +?>" /> |
|
| 968 | 1256 | <p class="help-block">0 to disable</p> |
| 969 | 1257 | </p> |
| 970 | 1258 | <p> |
| 971 | 1259 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 972 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1260 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1261 | + print $globalArchiveKeepTrackMonths; |
|
| 1262 | +} else { |
|
| 1263 | + echo '1'; |
|
| 1264 | +} |
|
| 1265 | +?>" /> |
|
| 973 | 1266 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 974 | 1267 | </p> |
| 975 | 1268 | <br /> |
@@ -979,7 +1272,12 @@ discard block |
||
| 979 | 1272 | <p class="help-block">Uncheck if the script is running as cron job</p> |
| 980 | 1273 | <div id="cronends"> |
| 981 | 1274 | <label for="cronend">Run script for xx seconds</label> |
| 982 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1275 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1276 | + print $globalCronEnd; |
|
| 1277 | +} else { |
|
| 1278 | + print '0'; |
|
| 1279 | +} |
|
| 1280 | +?>" /> |
|
| 983 | 1281 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 984 | 1282 | </div> |
| 985 | 1283 | </p> |
@@ -1032,15 +1330,30 @@ discard block |
||
| 1032 | 1330 | <br /> |
| 1033 | 1331 | <p> |
| 1034 | 1332 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1035 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1333 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1334 | + echo $globalLiveInterval; |
|
| 1335 | +} else { |
|
| 1336 | + echo '200'; |
|
| 1337 | +} |
|
| 1338 | +?>" /> |
|
| 1036 | 1339 | </p> |
| 1037 | 1340 | <p> |
| 1038 | 1341 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1039 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1342 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1343 | + echo $globalMapRefresh; |
|
| 1344 | +} else { |
|
| 1345 | + echo '30'; |
|
| 1346 | +} |
|
| 1347 | +?>" /> |
|
| 1040 | 1348 | </p> |
| 1041 | 1349 | <p> |
| 1042 | 1350 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1043 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1351 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1352 | + echo $globalMapIdleTimeout; |
|
| 1353 | +} else { |
|
| 1354 | + echo '30'; |
|
| 1355 | +} |
|
| 1356 | +?>" /> |
|
| 1044 | 1357 | <p class="help-block">0 to disable</p> |
| 1045 | 1358 | </p> |
| 1046 | 1359 | <p> |
@@ -1055,12 +1368,20 @@ discard block |
||
| 1055 | 1368 | <br /> |
| 1056 | 1369 | <p> |
| 1057 | 1370 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1058 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1371 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1372 | + echo $globalClosestMinDist; |
|
| 1373 | +} else { |
|
| 1374 | + echo '50'; |
|
| 1375 | +} |
|
| 1376 | +?>" /> |
|
| 1059 | 1377 | </p> |
| 1060 | 1378 | <br /> |
| 1061 | 1379 | <p> |
| 1062 | 1380 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1063 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1381 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1382 | + echo $globalAircraftSize; |
|
| 1383 | +} |
|
| 1384 | +?>" /> |
|
| 1064 | 1385 | </p> |
| 1065 | 1386 | <br /> |
| 1066 | 1387 | <p> |
@@ -1079,7 +1400,12 @@ discard block |
||
| 1079 | 1400 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 1080 | 1401 | ?> |
| 1081 | 1402 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1082 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1403 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1404 | + echo $globalAircraftIconColor; |
|
| 1405 | +} else { |
|
| 1406 | + echo '1a3151'; |
|
| 1407 | +} |
|
| 1408 | +?>" /> |
|
| 1083 | 1409 | <?php |
| 1084 | 1410 | if (!is_writable('../cache')) { |
| 1085 | 1411 | ?> |
@@ -1097,14 +1423,27 @@ discard block |
||
| 1097 | 1423 | <p> |
| 1098 | 1424 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1099 | 1425 | <div class="range"> |
| 1100 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1101 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1426 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1427 | + echo $globalAirportZoom; |
|
| 1428 | +} else { |
|
| 1429 | + echo '7'; |
|
| 1430 | +} |
|
| 1431 | +?>" /> |
|
| 1432 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1433 | + echo $globalAirportZoom; |
|
| 1434 | +} else { |
|
| 1435 | + echo '7'; |
|
| 1436 | +} |
|
| 1437 | +?></output> |
|
| 1102 | 1438 | </div> |
| 1103 | 1439 | </p> |
| 1104 | 1440 | <br /> |
| 1105 | 1441 | <p> |
| 1106 | 1442 | <label for="customcss">Custom CSS web path</label> |
| 1107 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1443 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1444 | + echo $globalCustomCSS; |
|
| 1445 | +} |
|
| 1446 | +?>" /> |
|
| 1108 | 1447 | </p> |
| 1109 | 1448 | </fieldset> |
| 1110 | 1449 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1131,8 +1470,12 @@ discard block |
||
| 1131 | 1470 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1132 | 1471 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1133 | 1472 | |
| 1134 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1135 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1473 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1474 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1475 | + } |
|
| 1476 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1477 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1478 | + } |
|
| 1136 | 1479 | |
| 1137 | 1480 | $_SESSION['database_root'] = $dbroot; |
| 1138 | 1481 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1200,15 +1543,23 @@ discard block |
||
| 1200 | 1543 | $source_city = $_POST['source_city']; |
| 1201 | 1544 | $source_country = $_POST['source_country']; |
| 1202 | 1545 | $source_ref = $_POST['source_ref']; |
| 1203 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1204 | - else $source_id = array(); |
|
| 1546 | + if (isset($source_id)) { |
|
| 1547 | + $source_id = $_POST['source_id']; |
|
| 1548 | + } else { |
|
| 1549 | + $source_id = array(); |
|
| 1550 | + } |
|
| 1205 | 1551 | |
| 1206 | 1552 | $sources = array(); |
| 1207 | 1553 | foreach ($source_name as $keys => $name) { |
| 1208 | - 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]); |
|
| 1209 | - 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]); |
|
| 1554 | + if (isset($source_id[$keys])) { |
|
| 1555 | + $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]); |
|
| 1556 | + } else { |
|
| 1557 | + $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]); |
|
| 1558 | + } |
|
| 1559 | + } |
|
| 1560 | + if (count($sources) > 0) { |
|
| 1561 | + $_SESSION['sources'] = $sources; |
|
| 1210 | 1562 | } |
| 1211 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1212 | 1563 | |
| 1213 | 1564 | $newsurl = $_POST['newsurl']; |
| 1214 | 1565 | $newslng = $_POST['newslang']; |
@@ -1221,7 +1572,9 @@ discard block |
||
| 1221 | 1572 | $lng = $newslng[$newskey]; |
| 1222 | 1573 | if (isset($newsfeeds[$type][$lng])) { |
| 1223 | 1574 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1224 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1575 | + } else { |
|
| 1576 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1577 | + } |
|
| 1225 | 1578 | } |
| 1226 | 1579 | } |
| 1227 | 1580 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1245,17 +1598,29 @@ discard block |
||
| 1245 | 1598 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1246 | 1599 | |
| 1247 | 1600 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1248 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1249 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1601 | + if ($globalaircraft == 'aircraft') { |
|
| 1602 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1603 | + } else { |
|
| 1604 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1605 | + } |
|
| 1250 | 1606 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1251 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1252 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1607 | + if ($globaltracker == 'tracker') { |
|
| 1608 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1609 | + } else { |
|
| 1610 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1611 | + } |
|
| 1253 | 1612 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1254 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1255 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1613 | + if ($globalmarine == 'marine') { |
|
| 1614 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1615 | + } else { |
|
| 1616 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1617 | + } |
|
| 1256 | 1618 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1257 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1258 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1619 | + if ($globalsatellite == 'satellite') { |
|
| 1620 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1621 | + } else { |
|
| 1622 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1623 | + } |
|
| 1259 | 1624 | |
| 1260 | 1625 | /* |
| 1261 | 1626 | $globalSBS1Hosts = array(); |
@@ -1277,23 +1642,37 @@ discard block |
||
| 1277 | 1642 | $name = $_POST['name']; |
| 1278 | 1643 | $format = $_POST['format']; |
| 1279 | 1644 | $timezones = $_POST['timezones']; |
| 1280 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1281 | - else $sourcestats = array(); |
|
| 1282 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1283 | - else $noarchive = array(); |
|
| 1645 | + if (isset($_POST['sourcestats'])) { |
|
| 1646 | + $sourcestats = $_POST['sourcestats']; |
|
| 1647 | + } else { |
|
| 1648 | + $sourcestats = array(); |
|
| 1649 | + } |
|
| 1650 | + if (isset($_POST['noarchive'])) { |
|
| 1651 | + $noarchive = $_POST['noarchive']; |
|
| 1652 | + } else { |
|
| 1653 | + $noarchive = array(); |
|
| 1654 | + } |
|
| 1284 | 1655 | $gSources = array(); |
| 1285 | 1656 | $forcepilots = false; |
| 1286 | 1657 | foreach ($host as $key => $h) { |
| 1287 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1288 | - else $cov = 'FALSE'; |
|
| 1289 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1290 | - else $arch = 'FALSE'; |
|
| 1658 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1659 | + $cov = 'TRUE'; |
|
| 1660 | + } else { |
|
| 1661 | + $cov = 'FALSE'; |
|
| 1662 | + } |
|
| 1663 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1664 | + $arch = 'TRUE'; |
|
| 1665 | + } else { |
|
| 1666 | + $arch = 'FALSE'; |
|
| 1667 | + } |
|
| 1291 | 1668 | if (strpos($format[$key],'_callback')) { |
| 1292 | 1669 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1293 | 1670 | } elseif ($h != '' || $name[$key] != '') { |
| 1294 | 1671 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1295 | 1672 | } |
| 1296 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1673 | + if ($format[$key] == 'airwhere') { |
|
| 1674 | + $forcepilots = true; |
|
| 1675 | + } |
|
| 1297 | 1676 | } |
| 1298 | 1677 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1299 | 1678 | |
@@ -1324,7 +1703,9 @@ discard block |
||
| 1324 | 1703 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1325 | 1704 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1326 | 1705 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1327 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1706 | + } else { |
|
| 1707 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1708 | + } |
|
| 1328 | 1709 | |
| 1329 | 1710 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1330 | 1711 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1363,7 +1744,9 @@ discard block |
||
| 1363 | 1744 | |
| 1364 | 1745 | // Create in settings.php keys not yet configurable if not already here |
| 1365 | 1746 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1366 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1747 | + if (!isset($globalDebug)) { |
|
| 1748 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1749 | + } |
|
| 1367 | 1750 | |
| 1368 | 1751 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1369 | 1752 | if ($resetyearstats == 'resetyearstats') { |
@@ -1406,37 +1789,56 @@ discard block |
||
| 1406 | 1789 | } |
| 1407 | 1790 | */ |
| 1408 | 1791 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1409 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1410 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1411 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1412 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1792 | + if ($globalsbs == 'sbs') { |
|
| 1793 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1794 | + } else { |
|
| 1795 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1796 | + } |
|
| 1797 | + if ($globalaprs == 'aprs') { |
|
| 1798 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1799 | + } else { |
|
| 1800 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1801 | + } |
|
| 1413 | 1802 | $va = false; |
| 1414 | 1803 | if ($globalivao == 'ivao') { |
| 1415 | 1804 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1416 | 1805 | $va = true; |
| 1417 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1806 | + } else { |
|
| 1807 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1808 | + } |
|
| 1418 | 1809 | if ($globalvatsim == 'vatsim') { |
| 1419 | 1810 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1420 | 1811 | $va = true; |
| 1421 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1812 | + } else { |
|
| 1813 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1814 | + } |
|
| 1422 | 1815 | if ($globalphpvms == 'phpvms') { |
| 1423 | 1816 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1424 | 1817 | $va = true; |
| 1425 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1818 | + } else { |
|
| 1819 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1820 | + } |
|
| 1426 | 1821 | if ($globalvam == 'vam') { |
| 1427 | 1822 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1428 | 1823 | $va = true; |
| 1429 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1824 | + } else { |
|
| 1825 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1826 | + } |
|
| 1430 | 1827 | if ($va) { |
| 1431 | 1828 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1432 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1829 | + } else { |
|
| 1830 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1831 | + } |
|
| 1433 | 1832 | if ($globalva == 'va' || $va) { |
| 1434 | 1833 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1435 | 1834 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1436 | 1835 | } else { |
| 1437 | 1836 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1438 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1439 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1837 | + if ($forcepilots) { |
|
| 1838 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1839 | + } else { |
|
| 1840 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1841 | + } |
|
| 1440 | 1842 | } |
| 1441 | 1843 | |
| 1442 | 1844 | |
@@ -1659,7 +2061,9 @@ discard block |
||
| 1659 | 2061 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1660 | 2062 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1661 | 2063 | |
| 1662 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2064 | + if (!isset($globalTransaction)) { |
|
| 2065 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2066 | + } |
|
| 1663 | 2067 | |
| 1664 | 2068 | // Set some defaults values... |
| 1665 | 2069 | if (!isset($globalAircraftImageSources)) { |
@@ -1674,15 +2078,23 @@ discard block |
||
| 1674 | 2078 | |
| 1675 | 2079 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1676 | 2080 | |
| 1677 | - if ($error == '') settings::modify_settings($settings); |
|
| 1678 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2081 | + if ($error == '') { |
|
| 2082 | + settings::modify_settings($settings); |
|
| 2083 | + } |
|
| 2084 | + if ($error == '') { |
|
| 2085 | + settings::comment_settings($settings_comment); |
|
| 2086 | + } |
|
| 1679 | 2087 | if ($error != '') { |
| 1680 | 2088 | print '<div class="info column">'.$error.'</div>'; |
| 1681 | 2089 | require('../footer.php'); |
| 1682 | 2090 | exit; |
| 1683 | 2091 | } else { |
| 1684 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1685 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2092 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2093 | + $_SESSION['waypoints'] = 1; |
|
| 2094 | + } |
|
| 2095 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2096 | + $_SESSION['owner'] = 1; |
|
| 2097 | + } |
|
| 1686 | 2098 | if (isset($_POST['createdb'])) { |
| 1687 | 2099 | $_SESSION['install'] = 'database_create'; |
| 1688 | 2100 | } else { |
@@ -1719,10 +2131,18 @@ discard block |
||
| 1719 | 2131 | $popw = false; |
| 1720 | 2132 | foreach ($_SESSION['done'] as $done) { |
| 1721 | 2133 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1722 | - if ($done == 'Create database') $pop = true; |
|
| 1723 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1724 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1725 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2134 | + if ($done == 'Create database') { |
|
| 2135 | + $pop = true; |
|
| 2136 | + } |
|
| 2137 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2138 | + $pop = true; |
|
| 2139 | + } |
|
| 2140 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2141 | + $popi = true; |
|
| 2142 | + } |
|
| 2143 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2144 | + $popw = true; |
|
| 2145 | + } |
|
| 1726 | 2146 | } |
| 1727 | 2147 | if ($pop) { |
| 1728 | 2148 | sleep(5); |
@@ -1733,7 +2153,9 @@ discard block |
||
| 1733 | 2153 | } else if ($popw) { |
| 1734 | 2154 | sleep(5); |
| 1735 | 2155 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1736 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2156 | + } else { |
|
| 2157 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2158 | + } |
|
| 1737 | 2159 | print '</div></ul>'; |
| 1738 | 2160 | print '<div id="error"></div>'; |
| 1739 | 2161 | /* foreach ($_SESSION['done'] as $done) { |