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