@@ -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;'); |
@@ -114,7 +122,9 @@ discard block |
||
| 114 | 122 | if (count($alllng) != count($availablelng)) { |
| 115 | 123 | $notavailable = array(); |
| 116 | 124 | foreach($alllng as $lng) { |
| 117 | - if (!isset($availablelng[$lng])) $notavailable[] = $lng; |
|
| 125 | + if (!isset($availablelng[$lng])) { |
|
| 126 | + $notavailable[] = $lng; |
|
| 127 | + } |
|
| 118 | 128 | } |
| 119 | 129 | print '<div class="alert alert-warning">The following translation can\'t be used on your system: '.implode(', ',$notavailable).'. You need to add the system locales: <a href="https://github.com/Ysurac/FlightAirMap/wiki/Translation">documentation</a>.</div>'; |
| 120 | 130 | } |
@@ -175,31 +185,49 @@ discard block |
||
| 175 | 185 | </div> |
| 176 | 186 | <p> |
| 177 | 187 | <label for="dbhost">Database hostname</label> |
| 178 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 188 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 189 | + print $globalDBhost; |
|
| 190 | +} |
|
| 191 | +?>" /> |
|
| 179 | 192 | </p> |
| 180 | 193 | <p> |
| 181 | 194 | <label for="dbport">Database port</label> |
| 182 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 195 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 196 | + print $globalDBport; |
|
| 197 | +} |
|
| 198 | +?>" /> |
|
| 183 | 199 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 184 | 200 | </p> |
| 185 | 201 | <p> |
| 186 | 202 | <label for="dbname">Database name</label> |
| 187 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 203 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 204 | + print $globalDBname; |
|
| 205 | +} |
|
| 206 | +?>" /> |
|
| 188 | 207 | </p> |
| 189 | 208 | <p> |
| 190 | 209 | <label for="dbuser">Database user</label> |
| 191 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 210 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 211 | + print $globalDBuser; |
|
| 212 | +} |
|
| 213 | +?>" /> |
|
| 192 | 214 | </p> |
| 193 | 215 | <p> |
| 194 | 216 | <label for="dbuserpass">Database user password</label> |
| 195 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 217 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 218 | + print $globalDBpass; |
|
| 219 | +} |
|
| 220 | +?>" /> |
|
| 196 | 221 | </p> |
| 197 | 222 | </fieldset> |
| 198 | 223 | <fieldset id="site"> |
| 199 | 224 | <legend>Site configuration</legend> |
| 200 | 225 | <p> |
| 201 | 226 | <label for="sitename">Site name</label> |
| 202 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 227 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 228 | + print $globalName; |
|
| 229 | +} |
|
| 230 | +?>" /> |
|
| 203 | 231 | </p> |
| 204 | 232 | <p> |
| 205 | 233 | <label for="siteurl">Site directory</label> |
@@ -212,18 +240,27 @@ discard block |
||
| 212 | 240 | } |
| 213 | 241 | } |
| 214 | 242 | ?> |
| 215 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 243 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 244 | + print $globalURL; |
|
| 245 | +} |
|
| 246 | +?>" /> |
|
| 216 | 247 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 217 | 248 | <p class="help-block">Can be empty</p> |
| 218 | 249 | </p> |
| 219 | 250 | <p> |
| 220 | 251 | <label for="timezone">Timezone</label> |
| 221 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 252 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 253 | + print $globalTimezone; |
|
| 254 | +} |
|
| 255 | +?>" /> |
|
| 222 | 256 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 223 | 257 | </p> |
| 224 | 258 | <p> |
| 225 | 259 | <label for="language">Language</label> |
| 226 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 260 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 261 | + print $globalLanguage; |
|
| 262 | +} |
|
| 263 | +?>" /> |
|
| 227 | 264 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 228 | 265 | </p> |
| 229 | 266 | </fieldset> |
@@ -243,11 +280,17 @@ discard block |
||
| 243 | 280 | <div id="mapbox_data"> |
| 244 | 281 | <p> |
| 245 | 282 | <label for="mapboxid">Mapbox id</label> |
| 246 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 283 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 284 | + print $globalMapboxId; |
|
| 285 | +} |
|
| 286 | +?>" /> |
|
| 247 | 287 | </p> |
| 248 | 288 | <p> |
| 249 | 289 | <label for="mapboxtoken">Mapbox token</label> |
| 250 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 290 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 291 | + print $globalMapboxToken; |
|
| 292 | +} |
|
| 293 | +?>" /> |
|
| 251 | 294 | </p> |
| 252 | 295 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 253 | 296 | </div> |
@@ -255,7 +298,10 @@ discard block |
||
| 255 | 298 | <div id="google_data"> |
| 256 | 299 | <p> |
| 257 | 300 | <label for="googlekey">Google API key</label> |
| 258 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 301 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 302 | + print $globalGoogleAPIKey; |
|
| 303 | +} |
|
| 304 | +?>" /> |
|
| 259 | 305 | <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> |
| 260 | 306 | </p> |
| 261 | 307 | </div> |
@@ -263,7 +309,10 @@ discard block |
||
| 263 | 309 | <div id="bing_data"> |
| 264 | 310 | <p> |
| 265 | 311 | <label for="bingkey">Bing Map key</label> |
| 266 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 312 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 313 | + print $globalBingMapKey; |
|
| 314 | +} |
|
| 315 | +?>" /> |
|
| 267 | 316 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 268 | 317 | </p> |
| 269 | 318 | </div> |
@@ -271,7 +320,10 @@ discard block |
||
| 271 | 320 | <div id="mapquest_data"> |
| 272 | 321 | <p> |
| 273 | 322 | <label for="mapquestkey">MapQuest key</label> |
| 274 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 323 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 324 | + print $globalMapQuestKey; |
|
| 325 | +} |
|
| 326 | +?>" /> |
|
| 275 | 327 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 276 | 328 | </p> |
| 277 | 329 | </div> |
@@ -279,11 +331,17 @@ discard block |
||
| 279 | 331 | <div id="here_data"> |
| 280 | 332 | <p> |
| 281 | 333 | <label for="hereappid">Here App_Id</label> |
| 282 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 334 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 335 | + print $globalHereappId; |
|
| 336 | +} |
|
| 337 | +?>" /> |
|
| 283 | 338 | </p> |
| 284 | 339 | <p> |
| 285 | 340 | <label for="hereappcode">Here App_Code</label> |
| 286 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 341 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 342 | + print $globalHereappCode; |
|
| 343 | +} |
|
| 344 | +?>" /> |
|
| 287 | 345 | </p> |
| 288 | 346 | <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> |
| 289 | 347 | </div> |
@@ -291,7 +349,10 @@ discard block |
||
| 291 | 349 | <div id="openweathermap_data"> |
| 292 | 350 | <p> |
| 293 | 351 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 294 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 352 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 353 | + print $globalOpenWeatherMapKey; |
|
| 354 | +} |
|
| 355 | +?>" /> |
|
| 295 | 356 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 296 | 357 | </p> |
| 297 | 358 | </div> |
@@ -320,42 +381,86 @@ discard block |
||
| 320 | 381 | <legend>Coverage area</legend> |
| 321 | 382 | <p> |
| 322 | 383 | <label for="latitudemax">The maximum latitude (north)</label> |
| 323 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 384 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 385 | + print $globalLatitudeMax; |
|
| 386 | +} |
|
| 387 | +?>" /> |
|
| 324 | 388 | </p> |
| 325 | 389 | <p> |
| 326 | 390 | <label for="latitudemin">The minimum latitude (south)</label> |
| 327 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 391 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 392 | + print $globalLatitudeMin; |
|
| 393 | +} |
|
| 394 | +?>" /> |
|
| 328 | 395 | </p> |
| 329 | 396 | <p> |
| 330 | 397 | <label for="longitudemax">The maximum longitude (west)</label> |
| 331 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 398 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 399 | + print $globalLongitudeMax; |
|
| 400 | +} |
|
| 401 | +?>" /> |
|
| 332 | 402 | </p> |
| 333 | 403 | <p> |
| 334 | 404 | <label for="longitudemin">The minimum longitude (east)</label> |
| 335 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 405 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 406 | + print $globalLongitudeMin; |
|
| 407 | +} |
|
| 408 | +?>" /> |
|
| 336 | 409 | </p> |
| 337 | 410 | <p> |
| 338 | 411 | <label for="latitudecenter">The latitude center</label> |
| 339 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 412 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 413 | + print $globalCenterLatitude; |
|
| 414 | +} |
|
| 415 | +?>" /> |
|
| 340 | 416 | </p> |
| 341 | 417 | <p> |
| 342 | 418 | <label for="longitudecenter">The longitude center</label> |
| 343 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 419 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 420 | + print $globalCenterLongitude; |
|
| 421 | +} |
|
| 422 | +?>" /> |
|
| 344 | 423 | </p> |
| 345 | 424 | <p> |
| 346 | 425 | <label for="livezoom">Default Zoom on live map</label> |
| 347 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 426 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 427 | + print $globalLiveZoom; |
|
| 428 | +} else { |
|
| 429 | + print '9'; |
|
| 430 | +} |
|
| 431 | +?>" /> |
|
| 348 | 432 | </p> |
| 349 | 433 | <p> |
| 350 | 434 | <label for="squawk_country">Country for squawk usage</label> |
| 351 | 435 | <select name="squawk_country" id="squawk_country"> |
| 352 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 353 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 354 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 355 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 356 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 357 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 358 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 436 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 437 | + print ' selected '; |
|
| 438 | +} |
|
| 439 | +?>>UK</option> |
|
| 440 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 441 | + print ' selected '; |
|
| 442 | +} |
|
| 443 | +?>>NZ</option> |
|
| 444 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 445 | + print ' selected '; |
|
| 446 | +} |
|
| 447 | +?>>US</option> |
|
| 448 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 449 | + print ' selected '; |
|
| 450 | +} |
|
| 451 | +?>>AU</option> |
|
| 452 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 453 | + print ' selected '; |
|
| 454 | +} |
|
| 455 | +?>>NL</option> |
|
| 456 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 457 | + print ' selected '; |
|
| 458 | +} |
|
| 459 | +?>>FR</option> |
|
| 460 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 461 | + print ' selected '; |
|
| 462 | +} |
|
| 463 | +?>>TR</option> |
|
| 359 | 464 | </select> |
| 360 | 465 | </p> |
| 361 | 466 | </fieldset> |
@@ -364,15 +469,24 @@ discard block |
||
| 364 | 469 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 365 | 470 | <p> |
| 366 | 471 | <label for="latitude">Center latitude</label> |
| 367 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 472 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 473 | + echo $globalDistanceIgnore['latitude']; |
|
| 474 | +} |
|
| 475 | +?>" /> |
|
| 368 | 476 | </p> |
| 369 | 477 | <p> |
| 370 | 478 | <label for="longitude">Center longitude</label> |
| 371 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 479 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 480 | + echo $globalDistanceIgnore['longitude']; |
|
| 481 | +} |
|
| 482 | +?>" /> |
|
| 372 | 483 | </p> |
| 373 | 484 | <p> |
| 374 | 485 | <label for="Distance">Distance (in km)</label> |
| 375 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 486 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 487 | + echo $globalDistanceIgnore['distance']; |
|
| 488 | +} |
|
| 489 | +?>" /> |
|
| 376 | 490 | </p> |
| 377 | 491 | </fieldset> |
| 378 | 492 | <fieldset id="sourceloc"> |
@@ -495,22 +609,34 @@ discard block |
||
| 495 | 609 | <div id="flightaware_data"> |
| 496 | 610 | <p> |
| 497 | 611 | <label for="flightawareusername">FlightAware username</label> |
| 498 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 612 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 613 | + print $globalFlightAwareUsername; |
|
| 614 | +} |
|
| 615 | +?>" /> |
|
| 499 | 616 | </p> |
| 500 | 617 | <p> |
| 501 | 618 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 502 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 619 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 620 | + print $globalFlightAwarePassword; |
|
| 621 | +} |
|
| 622 | +?>" /> |
|
| 503 | 623 | </p> |
| 504 | 624 | </div> |
| 505 | 625 | --> |
| 506 | 626 | <div id="sailaway_data"> |
| 507 | 627 | <p> |
| 508 | 628 | <label for="sailawayemail">Sailaway email</label> |
| 509 | - <input type="text" name="sailawayemail" id="sailawayemail" value="<?php if (isset($globalSailaway['email'])) print $globalSailaway['email']; ?>" /> |
|
| 629 | + <input type="text" name="sailawayemail" id="sailawayemail" value="<?php if (isset($globalSailaway['email'])) { |
|
| 630 | + print $globalSailaway['email']; |
|
| 631 | +} |
|
| 632 | +?>" /> |
|
| 510 | 633 | </p> |
| 511 | 634 | <p> |
| 512 | 635 | <label for="sailawaypassword">Sailaway password</label> |
| 513 | - <input type="text" name="sailawaypassword" id="sailawaypassword" value="<?php if (isset($globalSailaway['password'])) print $globalSailaway['password']; ?>" /> |
|
| 636 | + <input type="text" name="sailawaypassword" id="sailawaypassword" value="<?php if (isset($globalSailaway['password'])) { |
|
| 637 | + print $globalSailaway['password']; |
|
| 638 | +} |
|
| 639 | +?>" /> |
|
| 514 | 640 | </p> |
| 515 | 641 | </div> |
| 516 | 642 | |
@@ -552,7 +678,10 @@ discard block |
||
| 552 | 678 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 553 | 679 | ?> |
| 554 | 680 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 555 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 681 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 682 | + print $source['port']; |
|
| 683 | +} |
|
| 684 | +?>" /></td> |
|
| 556 | 685 | <?php |
| 557 | 686 | } else { |
| 558 | 687 | $hostport = explode(':',$source['host']); |
@@ -571,37 +700,118 @@ discard block |
||
| 571 | 700 | ?> |
| 572 | 701 | <td> |
| 573 | 702 | <select name="format[]" id="format"> |
| 574 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 575 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 576 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 577 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 578 | - <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option> |
|
| 579 | - <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') print 'selected'; ?>>Planefinder client</option> |
|
| 580 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 581 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 582 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 583 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 584 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 585 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 586 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 587 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 588 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 589 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 590 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 591 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 592 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 593 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 594 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 595 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 596 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 597 | - <option value="sailaway" <?php if (isset($source['format']) && $source['format'] == 'sailaway') print 'selected'; ?>>Sailaway</option> |
|
| 703 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 704 | + print 'selected'; |
|
| 705 | +} |
|
| 706 | +?>>Auto</option> |
|
| 707 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 708 | + print 'selected'; |
|
| 709 | +} |
|
| 710 | +?>>SBS</option> |
|
| 711 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 712 | + print 'selected'; |
|
| 713 | +} |
|
| 714 | +?>>TSV</option> |
|
| 715 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 716 | + print 'selected'; |
|
| 717 | +} |
|
| 718 | +?>>Raw</option> |
|
| 719 | + <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') { |
|
| 720 | + print 'selected'; |
|
| 721 | +} |
|
| 722 | +?>>Dump1090 aircraft.json</option> |
|
| 723 | + <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') { |
|
| 724 | + print 'selected'; |
|
| 725 | +} |
|
| 726 | +?>>Planefinder client</option> |
|
| 727 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 728 | + print 'selected'; |
|
| 729 | +} |
|
| 730 | +?>>APRS</option> |
|
| 731 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 732 | + print 'selected'; |
|
| 733 | +} |
|
| 734 | +?>>Radarcape deltadb.txt</option> |
|
| 735 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 736 | + print 'selected'; |
|
| 737 | +} |
|
| 738 | +?>>Vatsim</option> |
|
| 739 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 740 | + print 'selected'; |
|
| 741 | +} |
|
| 742 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 743 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 744 | + print 'selected'; |
|
| 745 | +} |
|
| 746 | +?>>Virtual Radar Server TCP</option> |
|
| 747 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 748 | + print 'selected'; |
|
| 749 | +} |
|
| 750 | +?>>phpVMS</option> |
|
| 751 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 752 | + print 'selected'; |
|
| 753 | +} |
|
| 754 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 755 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 756 | + print 'selected'; |
|
| 757 | +} |
|
| 758 | +?>>Virtual Airlines Manager</option> |
|
| 759 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 760 | + print 'selected'; |
|
| 761 | +} |
|
| 762 | +?>>IVAO</option> |
|
| 763 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 764 | + print 'selected'; |
|
| 765 | +} |
|
| 766 | +?>>FlightGear Multiplayer</option> |
|
| 767 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 768 | + print 'selected'; |
|
| 769 | +} |
|
| 770 | +?>>FlightGear Singleplayer</option> |
|
| 771 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 772 | + print 'selected'; |
|
| 773 | +} |
|
| 774 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 775 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 776 | + print 'selected'; |
|
| 777 | +} |
|
| 778 | +?>>ACARS SBS-3 over TCP</option> |
|
| 779 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 780 | + print 'selected'; |
|
| 781 | +} |
|
| 782 | +?>>NMEA AIS over TCP</option> |
|
| 783 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 784 | + print 'selected'; |
|
| 785 | +} |
|
| 786 | +?>>AirWhere website</option> |
|
| 787 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 788 | + print 'selected'; |
|
| 789 | +} |
|
| 790 | +?>>HidnSeek Callback</option> |
|
| 791 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 792 | + print 'selected'; |
|
| 793 | +} |
|
| 794 | +?>>Blitzortung</option> |
|
| 795 | + <option value="sailaway" <?php if (isset($source['format']) && $source['format'] == 'sailaway') { |
|
| 796 | + print 'selected'; |
|
| 797 | +} |
|
| 798 | +?>>Sailaway</option> |
|
| 598 | 799 | </select> |
| 599 | 800 | </td> |
| 600 | 801 | <td> |
| 601 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 802 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 803 | + print $source['name']; |
|
| 804 | +} |
|
| 805 | +?>" /> |
|
| 602 | 806 | </td> |
| 603 | - <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> |
|
| 604 | - <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> |
|
| 807 | + <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']) { |
|
| 808 | + print 'checked'; |
|
| 809 | +} |
|
| 810 | +?> /></td> |
|
| 811 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 812 | + print 'checked'; |
|
| 813 | +} |
|
| 814 | +?> /></td> |
|
| 605 | 815 | <td> |
| 606 | 816 | <select name="timezones[]" id="timezones"> |
| 607 | 817 | <?php |
@@ -611,7 +821,9 @@ discard block |
||
| 611 | 821 | print '<option selected>'.$timezones.'</option>'; |
| 612 | 822 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 613 | 823 | print '<option selected>'.$timezones.'</option>'; |
| 614 | - } else print '<option>'.$timezones.'</option>'; |
|
| 824 | + } else { |
|
| 825 | + print '<option>'.$timezones.'</option>'; |
|
| 826 | + } |
|
| 615 | 827 | } |
| 616 | 828 | ?> |
| 617 | 829 | </select> |
@@ -665,7 +877,9 @@ discard block |
||
| 665 | 877 | foreach($timezonelist as $timezones){ |
| 666 | 878 | if ($timezones == 'UTC') { |
| 667 | 879 | print '<option selected>'.$timezones.'</option>'; |
| 668 | - } else print '<option>'.$timezones.'</option>'; |
|
| 880 | + } else { |
|
| 881 | + print '<option>'.$timezones.'</option>'; |
|
| 882 | + } |
|
| 669 | 883 | } |
| 670 | 884 | ?> |
| 671 | 885 | </select> |
@@ -690,11 +904,17 @@ discard block |
||
| 690 | 904 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 691 | 905 | <p> |
| 692 | 906 | <label for="acarshost">ACARS UDP host</label> |
| 693 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 907 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 908 | + print $globalACARSHost; |
|
| 909 | +} |
|
| 910 | +?>" /> |
|
| 694 | 911 | </p> |
| 695 | 912 | <p> |
| 696 | 913 | <label for="acarsport">ACARS UDP port</label> |
| 697 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 914 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 915 | + print $globalACARSPort; |
|
| 916 | +} |
|
| 917 | +?>" /> |
|
| 698 | 918 | </p> |
| 699 | 919 | </fieldset> |
| 700 | 920 | </div> |
@@ -720,17 +940,38 @@ discard block |
||
| 720 | 940 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 721 | 941 | <td> |
| 722 | 942 | <select name="newslang[]"> |
| 723 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 724 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 943 | + <option value="en"<?php if ($lng == 'en') { |
|
| 944 | + print ' selected'; |
|
| 945 | +} |
|
| 946 | +?>>English</option> |
|
| 947 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 948 | + print ' selected'; |
|
| 949 | +} |
|
| 950 | +?>>French</option> |
|
| 725 | 951 | </select> |
| 726 | 952 | </td> |
| 727 | 953 | <td> |
| 728 | 954 | <select name="newstype[]"> |
| 729 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 730 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 731 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 732 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 733 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 955 | + <option value="global"<?php if ($type == 'global') { |
|
| 956 | + print ' selected'; |
|
| 957 | +} |
|
| 958 | +?>>Global</option> |
|
| 959 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 960 | + print ' selected'; |
|
| 961 | +} |
|
| 962 | +?>>Aircraft</option> |
|
| 963 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 964 | + print ' selected'; |
|
| 965 | +} |
|
| 966 | +?>>Marine</option> |
|
| 967 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 968 | + print ' selected'; |
|
| 969 | +} |
|
| 970 | +?>>Tracker</option> |
|
| 971 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 972 | + print ' selected'; |
|
| 973 | +} |
|
| 974 | +?>>Satellite</option> |
|
| 734 | 975 | </select> |
| 735 | 976 | </td> |
| 736 | 977 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -872,13 +1113,19 @@ discard block |
||
| 872 | 1113 | <div id="schedules_options"> |
| 873 | 1114 | <p> |
| 874 | 1115 | <label for="britishairways">British Airways API Key</label> |
| 875 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1116 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1117 | + print $globalBritishAirwaysKey; |
|
| 1118 | +} |
|
| 1119 | +?>" /> |
|
| 876 | 1120 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 877 | 1121 | </p> |
| 878 | 1122 | <!-- |
| 879 | 1123 | <p> |
| 880 | 1124 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 881 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1125 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1126 | + print $globalTransaviaKey; |
|
| 1127 | +} |
|
| 1128 | +?>" /> |
|
| 882 | 1129 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 883 | 1130 | </p> |
| 884 | 1131 | --> |
@@ -887,10 +1134,16 @@ discard block |
||
| 887 | 1134 | <b>Lufthansa API Key</b> |
| 888 | 1135 | <p> |
| 889 | 1136 | <label for="lufthansakey">Key</label> |
| 890 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1137 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1138 | + print $globalLufthansaKey['key']; |
|
| 1139 | +} |
|
| 1140 | +?>" /> |
|
| 891 | 1141 | </p><p> |
| 892 | 1142 | <label for="lufthansasecret">Secret</label> |
| 893 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1143 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1144 | + print $globalLufthansaKey['secret']; |
|
| 1145 | +} |
|
| 1146 | +?>" /> |
|
| 894 | 1147 | </p> |
| 895 | 1148 | </div> |
| 896 | 1149 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -900,11 +1153,17 @@ discard block |
||
| 900 | 1153 | <b>FlightAware API Key</b> |
| 901 | 1154 | <p> |
| 902 | 1155 | <label for="flightawareusername">Username</label> |
| 903 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1156 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1157 | + print $globalFlightAwareUsername; |
|
| 1158 | +} |
|
| 1159 | +?>" /> |
|
| 904 | 1160 | </p> |
| 905 | 1161 | <p> |
| 906 | 1162 | <label for="flightawarepassword">API key</label> |
| 907 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1163 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1164 | + print $globalFlightAwarePassword; |
|
| 1165 | +} |
|
| 1166 | +?>" /> |
|
| 908 | 1167 | </p> |
| 909 | 1168 | </div> |
| 910 | 1169 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -921,10 +1180,22 @@ discard block |
||
| 921 | 1180 | <p> |
| 922 | 1181 | <label for="mapmatchingsource">Map Matching source</label> |
| 923 | 1182 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 924 | - <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>FlightAirMap Map Matching</option> |
|
| 925 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 926 | - <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') print 'selected="selected" '; ?>>OSMR</option> |
|
| 927 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1183 | + <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) { |
|
| 1184 | + print 'selected="selected" '; |
|
| 1185 | +} |
|
| 1186 | +?>>FlightAirMap Map Matching</option> |
|
| 1187 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1188 | + print 'selected="selected" '; |
|
| 1189 | +} |
|
| 1190 | +?>>GraphHopper</option> |
|
| 1191 | + <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') { |
|
| 1192 | + print 'selected="selected" '; |
|
| 1193 | +} |
|
| 1194 | +?>>OSMR</option> |
|
| 1195 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1196 | + print 'selected="selected" '; |
|
| 1197 | +} |
|
| 1198 | +?>>Mapbox</option> |
|
| 928 | 1199 | </select> |
| 929 | 1200 | <p class="help-block">Mapbox need the API Key defined in map section.</p> |
| 930 | 1201 | <p class="help-block">FlightAirMap Map Matching is free, without API key but limited to about 100 input points to keep fast results.</p> |
@@ -932,7 +1203,10 @@ discard block |
||
| 932 | 1203 | <br /> |
| 933 | 1204 | <p> |
| 934 | 1205 | <label for="graphhopper">GraphHopper API Key</label> |
| 935 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1206 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1207 | + print $globalGraphHopperKey; |
|
| 1208 | +} |
|
| 1209 | +?>" /> |
|
| 936 | 1210 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 937 | 1211 | </p> |
| 938 | 1212 | </div> |
@@ -950,7 +1224,10 @@ discard block |
||
| 950 | 1224 | </p> |
| 951 | 1225 | <p> |
| 952 | 1226 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 953 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1227 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1228 | + print $globalNOTAMSource; |
|
| 1229 | +} |
|
| 1230 | +?>" /> |
|
| 954 | 1231 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 955 | 1232 | </p> |
| 956 | 1233 | <br /> |
@@ -966,14 +1243,20 @@ discard block |
||
| 966 | 1243 | <div id="metarsrc"> |
| 967 | 1244 | <p> |
| 968 | 1245 | <label for="metarsource">URL of your METAR source</label> |
| 969 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1246 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1247 | + print $globalMETARurl; |
|
| 1248 | +} |
|
| 1249 | +?>" /> |
|
| 970 | 1250 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 971 | 1251 | </p> |
| 972 | 1252 | </div> |
| 973 | 1253 | <br /> |
| 974 | 1254 | <p> |
| 975 | 1255 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 976 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1256 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1257 | + print $globalBitlyAccessToken; |
|
| 1258 | +} |
|
| 1259 | +?>" /> |
|
| 977 | 1260 | </p> |
| 978 | 1261 | <br /> |
| 979 | 1262 | <p> |
@@ -989,11 +1272,26 @@ discard block |
||
| 989 | 1272 | <p> |
| 990 | 1273 | <label for="geoid_source">Geoid Source</label> |
| 991 | 1274 | <select name="geoid_source" id="geoid_source"> |
| 992 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 993 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 994 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 995 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 996 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1275 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1276 | + print ' selected="selected"'; |
|
| 1277 | +} |
|
| 1278 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1279 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1280 | + print ' selected="selected"'; |
|
| 1281 | +} |
|
| 1282 | +?>>EGM96 5' (19MB)</option> |
|
| 1283 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1284 | + print ' selected="selected"'; |
|
| 1285 | +} |
|
| 1286 | +?>>EGM2008 5' (19MB)</option> |
|
| 1287 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1288 | + print ' selected="selected"'; |
|
| 1289 | +} |
|
| 1290 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1291 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1292 | + print ' selected="selected"'; |
|
| 1293 | +} |
|
| 1294 | +?>>EGM2008 1' (470MB)</option> |
|
| 997 | 1295 | </select> |
| 998 | 1296 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 999 | 1297 | </p> |
@@ -1015,7 +1313,12 @@ discard block |
||
| 1015 | 1313 | </p> |
| 1016 | 1314 | <p> |
| 1017 | 1315 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 1018 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1316 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1317 | + print $globalArchiveMonths; |
|
| 1318 | +} else { |
|
| 1319 | + echo '1'; |
|
| 1320 | +} |
|
| 1321 | +?>" /> |
|
| 1019 | 1322 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 1020 | 1323 | </p> |
| 1021 | 1324 | <p> |
@@ -1025,12 +1328,22 @@ discard block |
||
| 1025 | 1328 | </p> |
| 1026 | 1329 | <p> |
| 1027 | 1330 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 1028 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1331 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1332 | + print $globalArchiveKeepMonths; |
|
| 1333 | +} else { |
|
| 1334 | + echo '1'; |
|
| 1335 | +} |
|
| 1336 | +?>" /> |
|
| 1029 | 1337 | <p class="help-block">0 to disable</p> |
| 1030 | 1338 | </p> |
| 1031 | 1339 | <p> |
| 1032 | 1340 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 1033 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1341 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1342 | + print $globalArchiveKeepTrackMonths; |
|
| 1343 | +} else { |
|
| 1344 | + echo '1'; |
|
| 1345 | +} |
|
| 1346 | +?>" /> |
|
| 1034 | 1347 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 1035 | 1348 | </p> |
| 1036 | 1349 | <br /> |
@@ -1040,7 +1353,12 @@ discard block |
||
| 1040 | 1353 | <p class="help-block">Uncheck if the script is running as cron job. You should always run it as daemon when it's possible.</p> |
| 1041 | 1354 | <div id="cronends"> |
| 1042 | 1355 | <label for="cronend">Run script for xx seconds</label> |
| 1043 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1356 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1357 | + print $globalCronEnd; |
|
| 1358 | +} else { |
|
| 1359 | + print '0'; |
|
| 1360 | +} |
|
| 1361 | +?>" /> |
|
| 1044 | 1362 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 1045 | 1363 | </div> |
| 1046 | 1364 | </p> |
@@ -1099,20 +1417,40 @@ discard block |
||
| 1099 | 1417 | <br /> |
| 1100 | 1418 | <p> |
| 1101 | 1419 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1102 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1420 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1421 | + echo $globalLiveInterval; |
|
| 1422 | +} else { |
|
| 1423 | + echo '200'; |
|
| 1424 | +} |
|
| 1425 | +?>" /> |
|
| 1103 | 1426 | </p> |
| 1104 | 1427 | <p> |
| 1105 | 1428 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1106 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1429 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1430 | + echo $globalMapRefresh; |
|
| 1431 | +} else { |
|
| 1432 | + echo '30'; |
|
| 1433 | +} |
|
| 1434 | +?>" /> |
|
| 1107 | 1435 | </p> |
| 1108 | 1436 | <p> |
| 1109 | 1437 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1110 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1438 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1439 | + echo $globalMapIdleTimeout; |
|
| 1440 | +} else { |
|
| 1441 | + echo '30'; |
|
| 1442 | +} |
|
| 1443 | +?>" /> |
|
| 1111 | 1444 | <p class="help-block">0 to disable</p> |
| 1112 | 1445 | </p> |
| 1113 | 1446 | <p> |
| 1114 | 1447 | <label for="minfetch">HTTP/file source fetch every xxx seconds</label> |
| 1115 | - <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" /> |
|
| 1448 | + <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) { |
|
| 1449 | + echo $globalMinFetch; |
|
| 1450 | +} else { |
|
| 1451 | + echo '20'; |
|
| 1452 | +} |
|
| 1453 | +?>" /> |
|
| 1116 | 1454 | </p> |
| 1117 | 1455 | <p> |
| 1118 | 1456 | <label for="bbox">Only display flights that we can see on screen (bounding box)</label> |
@@ -1126,12 +1464,20 @@ discard block |
||
| 1126 | 1464 | <br /> |
| 1127 | 1465 | <p> |
| 1128 | 1466 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1129 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1467 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1468 | + echo $globalClosestMinDist; |
|
| 1469 | +} else { |
|
| 1470 | + echo '50'; |
|
| 1471 | +} |
|
| 1472 | +?>" /> |
|
| 1130 | 1473 | </p> |
| 1131 | 1474 | <br /> |
| 1132 | 1475 | <p> |
| 1133 | 1476 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1134 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1477 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1478 | + echo $globalAircraftSize; |
|
| 1479 | +} |
|
| 1480 | +?>" /> |
|
| 1135 | 1481 | </p> |
| 1136 | 1482 | <br /> |
| 1137 | 1483 | <p> |
@@ -1150,22 +1496,42 @@ discard block |
||
| 1150 | 1496 | <br /> |
| 1151 | 1497 | <p> |
| 1152 | 1498 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1153 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1499 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1500 | + echo $globalAircraftIconColor; |
|
| 1501 | +} else { |
|
| 1502 | + echo '1a3151'; |
|
| 1503 | +} |
|
| 1504 | +?>" /> |
|
| 1154 | 1505 | </p> |
| 1155 | 1506 | <br /> |
| 1156 | 1507 | <p> |
| 1157 | 1508 | <label for="marineiconcolor">Color of marine icon on map</label> |
| 1158 | - <input type="color" name="marineiconcolor" id="marineiconcolor" value="#<?php if (isset($globalMarineIconColor)) echo $globalMarineIconColor; else echo '1a3151'; ?>" /> |
|
| 1509 | + <input type="color" name="marineiconcolor" id="marineiconcolor" value="#<?php if (isset($globalMarineIconColor)) { |
|
| 1510 | + echo $globalMarineIconColor; |
|
| 1511 | +} else { |
|
| 1512 | + echo '1a3151'; |
|
| 1513 | +} |
|
| 1514 | +?>" /> |
|
| 1159 | 1515 | </p> |
| 1160 | 1516 | <br /> |
| 1161 | 1517 | <p> |
| 1162 | 1518 | <label for="trackericoncolor">Color of tracker icon on map</label> |
| 1163 | - <input type="color" name="trackericoncolor" id="trackericoncolor" value="#<?php if (isset($globalTrackerIconColor)) echo $globalTrackerIconColor; else echo '1a3151'; ?>" /> |
|
| 1519 | + <input type="color" name="trackericoncolor" id="trackericoncolor" value="#<?php if (isset($globalTrackerIconColor)) { |
|
| 1520 | + echo $globalTrackerIconColor; |
|
| 1521 | +} else { |
|
| 1522 | + echo '1a3151'; |
|
| 1523 | +} |
|
| 1524 | +?>" /> |
|
| 1164 | 1525 | </p> |
| 1165 | 1526 | <br /> |
| 1166 | 1527 | <p> |
| 1167 | 1528 | <label for="satelliteiconcolor">Color of satellite icon on map</label> |
| 1168 | - <input type="color" name="satelliteiconcolor" id="satelliteiconcolor" value="#<?php if (isset($globalSatelliteIconColor)) echo $globalSatelliteIconColor; else echo '1a3151'; ?>" /> |
|
| 1529 | + <input type="color" name="satelliteiconcolor" id="satelliteiconcolor" value="#<?php if (isset($globalSatelliteIconColor)) { |
|
| 1530 | + echo $globalSatelliteIconColor; |
|
| 1531 | +} else { |
|
| 1532 | + echo '1a3151'; |
|
| 1533 | +} |
|
| 1534 | +?>" /> |
|
| 1169 | 1535 | </p> |
| 1170 | 1536 | <?php |
| 1171 | 1537 | if (!is_writable('../cache')) { |
@@ -1189,14 +1555,27 @@ discard block |
||
| 1189 | 1555 | <p> |
| 1190 | 1556 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1191 | 1557 | <div class="range"> |
| 1192 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1193 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1558 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1559 | + echo $globalAirportZoom; |
|
| 1560 | +} else { |
|
| 1561 | + echo '7'; |
|
| 1562 | +} |
|
| 1563 | +?>" /> |
|
| 1564 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1565 | + echo $globalAirportZoom; |
|
| 1566 | +} else { |
|
| 1567 | + echo '7'; |
|
| 1568 | +} |
|
| 1569 | +?></output> |
|
| 1194 | 1570 | </div> |
| 1195 | 1571 | </p> |
| 1196 | 1572 | <br /> |
| 1197 | 1573 | <p> |
| 1198 | 1574 | <label for="customcss">Custom CSS web path</label> |
| 1199 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1575 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1576 | + echo $globalCustomCSS; |
|
| 1577 | +} |
|
| 1578 | +?>" /> |
|
| 1200 | 1579 | </p> |
| 1201 | 1580 | </fieldset> |
| 1202 | 1581 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1223,8 +1602,12 @@ discard block |
||
| 1223 | 1602 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1224 | 1603 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1225 | 1604 | |
| 1226 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1227 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1605 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1606 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1607 | + } |
|
| 1608 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1609 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1610 | + } |
|
| 1228 | 1611 | |
| 1229 | 1612 | $_SESSION['database_root'] = $dbroot; |
| 1230 | 1613 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1302,15 +1685,23 @@ discard block |
||
| 1302 | 1685 | $source_city = $_POST['source_city']; |
| 1303 | 1686 | $source_country = $_POST['source_country']; |
| 1304 | 1687 | $source_ref = $_POST['source_ref']; |
| 1305 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1306 | - else $source_id = array(); |
|
| 1688 | + if (isset($source_id)) { |
|
| 1689 | + $source_id = $_POST['source_id']; |
|
| 1690 | + } else { |
|
| 1691 | + $source_id = array(); |
|
| 1692 | + } |
|
| 1307 | 1693 | |
| 1308 | 1694 | $sources = array(); |
| 1309 | 1695 | foreach ($source_name as $keys => $name) { |
| 1310 | - 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]); |
|
| 1311 | - 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]); |
|
| 1696 | + if (isset($source_id[$keys])) { |
|
| 1697 | + $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]); |
|
| 1698 | + } else { |
|
| 1699 | + $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]); |
|
| 1700 | + } |
|
| 1701 | + } |
|
| 1702 | + if (count($sources) > 0) { |
|
| 1703 | + $_SESSION['sources'] = $sources; |
|
| 1312 | 1704 | } |
| 1313 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1314 | 1705 | |
| 1315 | 1706 | $newsurl = $_POST['newsurl']; |
| 1316 | 1707 | $newslng = $_POST['newslang']; |
@@ -1323,7 +1714,9 @@ discard block |
||
| 1323 | 1714 | $lng = $newslng[$newskey]; |
| 1324 | 1715 | if (isset($newsfeeds[$type][$lng])) { |
| 1325 | 1716 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1326 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1717 | + } else { |
|
| 1718 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1719 | + } |
|
| 1327 | 1720 | } |
| 1328 | 1721 | } |
| 1329 | 1722 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1348,17 +1741,29 @@ discard block |
||
| 1348 | 1741 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1349 | 1742 | |
| 1350 | 1743 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1351 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1352 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1744 | + if ($globalaircraft == 'aircraft') { |
|
| 1745 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1746 | + } else { |
|
| 1747 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1748 | + } |
|
| 1353 | 1749 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1354 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1355 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1750 | + if ($globaltracker == 'tracker') { |
|
| 1751 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1752 | + } else { |
|
| 1753 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1754 | + } |
|
| 1356 | 1755 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1357 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1358 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1756 | + if ($globalmarine == 'marine') { |
|
| 1757 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1758 | + } else { |
|
| 1759 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1760 | + } |
|
| 1359 | 1761 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1360 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1361 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1762 | + if ($globalsatellite == 'satellite') { |
|
| 1763 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1764 | + } else { |
|
| 1765 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1766 | + } |
|
| 1362 | 1767 | |
| 1363 | 1768 | /* |
| 1364 | 1769 | $globalSBS1Hosts = array(); |
@@ -1380,23 +1785,37 @@ discard block |
||
| 1380 | 1785 | $name = $_POST['name']; |
| 1381 | 1786 | $format = $_POST['format']; |
| 1382 | 1787 | $timezones = $_POST['timezones']; |
| 1383 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1384 | - else $sourcestats = array(); |
|
| 1385 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1386 | - else $noarchive = array(); |
|
| 1788 | + if (isset($_POST['sourcestats'])) { |
|
| 1789 | + $sourcestats = $_POST['sourcestats']; |
|
| 1790 | + } else { |
|
| 1791 | + $sourcestats = array(); |
|
| 1792 | + } |
|
| 1793 | + if (isset($_POST['noarchive'])) { |
|
| 1794 | + $noarchive = $_POST['noarchive']; |
|
| 1795 | + } else { |
|
| 1796 | + $noarchive = array(); |
|
| 1797 | + } |
|
| 1387 | 1798 | $gSources = array(); |
| 1388 | 1799 | $forcepilots = false; |
| 1389 | 1800 | foreach ($host as $key => $h) { |
| 1390 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1391 | - else $cov = 'FALSE'; |
|
| 1392 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1393 | - else $arch = 'FALSE'; |
|
| 1801 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1802 | + $cov = 'TRUE'; |
|
| 1803 | + } else { |
|
| 1804 | + $cov = 'FALSE'; |
|
| 1805 | + } |
|
| 1806 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1807 | + $arch = 'TRUE'; |
|
| 1808 | + } else { |
|
| 1809 | + $arch = 'FALSE'; |
|
| 1810 | + } |
|
| 1394 | 1811 | if (strpos($format[$key],'_callback')) { |
| 1395 | 1812 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1396 | 1813 | } elseif ($format[$key] != 'auto' || ($h != '' || $name[$key] != '')) { |
| 1397 | 1814 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1398 | 1815 | } |
| 1399 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1816 | + if ($format[$key] == 'airwhere') { |
|
| 1817 | + $forcepilots = true; |
|
| 1818 | + } |
|
| 1400 | 1819 | } |
| 1401 | 1820 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1402 | 1821 | |
@@ -1427,7 +1846,9 @@ discard block |
||
| 1427 | 1846 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1428 | 1847 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1429 | 1848 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1430 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1849 | + } else { |
|
| 1850 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1851 | + } |
|
| 1431 | 1852 | |
| 1432 | 1853 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1433 | 1854 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1468,7 +1889,9 @@ discard block |
||
| 1468 | 1889 | |
| 1469 | 1890 | // Create in settings.php keys not yet configurable if not already here |
| 1470 | 1891 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1471 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1892 | + if (!isset($globalDebug)) { |
|
| 1893 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1894 | + } |
|
| 1472 | 1895 | |
| 1473 | 1896 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1474 | 1897 | if ($resetyearstats == 'resetyearstats') { |
@@ -1511,37 +1934,56 @@ discard block |
||
| 1511 | 1934 | } |
| 1512 | 1935 | */ |
| 1513 | 1936 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1514 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1515 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1516 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1517 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1937 | + if ($globalsbs == 'sbs') { |
|
| 1938 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1939 | + } else { |
|
| 1940 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1941 | + } |
|
| 1942 | + if ($globalaprs == 'aprs') { |
|
| 1943 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1944 | + } else { |
|
| 1945 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1946 | + } |
|
| 1518 | 1947 | $va = false; |
| 1519 | 1948 | if ($globalivao == 'ivao') { |
| 1520 | 1949 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1521 | 1950 | $va = true; |
| 1522 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1951 | + } else { |
|
| 1952 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1953 | + } |
|
| 1523 | 1954 | if ($globalvatsim == 'vatsim') { |
| 1524 | 1955 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1525 | 1956 | $va = true; |
| 1526 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1957 | + } else { |
|
| 1958 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1959 | + } |
|
| 1527 | 1960 | if ($globalphpvms == 'phpvms') { |
| 1528 | 1961 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1529 | 1962 | $va = true; |
| 1530 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1963 | + } else { |
|
| 1964 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1965 | + } |
|
| 1531 | 1966 | if ($globalvam == 'vam') { |
| 1532 | 1967 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1533 | 1968 | $va = true; |
| 1534 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1969 | + } else { |
|
| 1970 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1971 | + } |
|
| 1535 | 1972 | if ($va) { |
| 1536 | 1973 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1537 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1974 | + } else { |
|
| 1975 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1976 | + } |
|
| 1538 | 1977 | if ($globalva == 'va' || $va) { |
| 1539 | 1978 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1540 | 1979 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1541 | 1980 | } else { |
| 1542 | 1981 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1543 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1544 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1982 | + if ($forcepilots) { |
|
| 1983 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1984 | + } else { |
|
| 1985 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1986 | + } |
|
| 1545 | 1987 | } |
| 1546 | 1988 | if ($globalvm == 'vm') { |
| 1547 | 1989 | $settings = array_merge($settings,array('globalVM' => 'TRUE')); |
@@ -1792,7 +2234,9 @@ discard block |
||
| 1792 | 2234 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1793 | 2235 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1794 | 2236 | |
| 1795 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2237 | + if (!isset($globalTransaction)) { |
|
| 2238 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2239 | + } |
|
| 1796 | 2240 | |
| 1797 | 2241 | // Set some defaults values... |
| 1798 | 2242 | if (!isset($globalAircraftImageSources)) { |
@@ -1807,15 +2251,23 @@ discard block |
||
| 1807 | 2251 | |
| 1808 | 2252 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1809 | 2253 | |
| 1810 | - if ($error == '') settings::modify_settings($settings); |
|
| 1811 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2254 | + if ($error == '') { |
|
| 2255 | + settings::modify_settings($settings); |
|
| 2256 | + } |
|
| 2257 | + if ($error == '') { |
|
| 2258 | + settings::comment_settings($settings_comment); |
|
| 2259 | + } |
|
| 1812 | 2260 | if ($error != '') { |
| 1813 | 2261 | print '<div class="info column">'.$error.'</div>'; |
| 1814 | 2262 | require('../footer.php'); |
| 1815 | 2263 | exit; |
| 1816 | 2264 | } else { |
| 1817 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1818 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2265 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2266 | + $_SESSION['waypoints'] = 1; |
|
| 2267 | + } |
|
| 2268 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2269 | + $_SESSION['owner'] = 1; |
|
| 2270 | + } |
|
| 1819 | 2271 | if (isset($_POST['createdb'])) { |
| 1820 | 2272 | $_SESSION['install'] = 'database_create'; |
| 1821 | 2273 | } else { |
@@ -1852,10 +2304,18 @@ discard block |
||
| 1852 | 2304 | $popw = false; |
| 1853 | 2305 | foreach ($_SESSION['done'] as $done) { |
| 1854 | 2306 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1855 | - if ($done == 'Create database') $pop = true; |
|
| 1856 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1857 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1858 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2307 | + if ($done == 'Create database') { |
|
| 2308 | + $pop = true; |
|
| 2309 | + } |
|
| 2310 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2311 | + $pop = true; |
|
| 2312 | + } |
|
| 2313 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2314 | + $popi = true; |
|
| 2315 | + } |
|
| 2316 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2317 | + $popw = true; |
|
| 2318 | + } |
|
| 1859 | 2319 | } |
| 1860 | 2320 | if ($pop) { |
| 1861 | 2321 | sleep(5); |
@@ -1866,7 +2326,9 @@ discard block |
||
| 1866 | 2326 | } else if ($popw) { |
| 1867 | 2327 | sleep(5); |
| 1868 | 2328 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1869 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2329 | + } else { |
|
| 2330 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2331 | + } |
|
| 1870 | 2332 | print '</div></ul>'; |
| 1871 | 2333 | print '<div id="error"></div>'; |
| 1872 | 2334 | /* foreach ($_SESSION['done'] as $done) { |