@@ -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;'); |
@@ -168,31 +176,49 @@ discard block |
||
| 168 | 176 | </div> |
| 169 | 177 | <p> |
| 170 | 178 | <label for="dbhost">Database hostname</label> |
| 171 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 179 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 180 | + print $globalDBhost; |
|
| 181 | +} |
|
| 182 | +?>" /> |
|
| 172 | 183 | </p> |
| 173 | 184 | <p> |
| 174 | 185 | <label for="dbport">Database port</label> |
| 175 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 186 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 187 | + print $globalDBport; |
|
| 188 | +} |
|
| 189 | +?>" /> |
|
| 176 | 190 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 177 | 191 | </p> |
| 178 | 192 | <p> |
| 179 | 193 | <label for="dbname">Database name</label> |
| 180 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 194 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 195 | + print $globalDBname; |
|
| 196 | +} |
|
| 197 | +?>" /> |
|
| 181 | 198 | </p> |
| 182 | 199 | <p> |
| 183 | 200 | <label for="dbuser">Database user</label> |
| 184 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 201 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 202 | + print $globalDBuser; |
|
| 203 | +} |
|
| 204 | +?>" /> |
|
| 185 | 205 | </p> |
| 186 | 206 | <p> |
| 187 | 207 | <label for="dbuserpass">Database user password</label> |
| 188 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 208 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 209 | + print $globalDBpass; |
|
| 210 | +} |
|
| 211 | +?>" /> |
|
| 189 | 212 | </p> |
| 190 | 213 | </fieldset> |
| 191 | 214 | <fieldset id="site"> |
| 192 | 215 | <legend>Site configuration</legend> |
| 193 | 216 | <p> |
| 194 | 217 | <label for="sitename">Site name</label> |
| 195 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 218 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 219 | + print $globalName; |
|
| 220 | +} |
|
| 221 | +?>" /> |
|
| 196 | 222 | </p> |
| 197 | 223 | <p> |
| 198 | 224 | <label for="siteurl">Site directory</label> |
@@ -205,18 +231,27 @@ discard block |
||
| 205 | 231 | } |
| 206 | 232 | } |
| 207 | 233 | ?> |
| 208 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 234 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 235 | + print $globalURL; |
|
| 236 | +} |
|
| 237 | +?>" /> |
|
| 209 | 238 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 210 | 239 | <p class="help-block">Can be empty</p> |
| 211 | 240 | </p> |
| 212 | 241 | <p> |
| 213 | 242 | <label for="timezone">Timezone</label> |
| 214 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 243 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 244 | + print $globalTimezone; |
|
| 245 | +} |
|
| 246 | +?>" /> |
|
| 215 | 247 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 216 | 248 | </p> |
| 217 | 249 | <p> |
| 218 | 250 | <label for="language">Language</label> |
| 219 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 251 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 252 | + print $globalLanguage; |
|
| 253 | +} |
|
| 254 | +?>" /> |
|
| 220 | 255 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 221 | 256 | </p> |
| 222 | 257 | </fieldset> |
@@ -236,11 +271,17 @@ discard block |
||
| 236 | 271 | <div id="mapbox_data"> |
| 237 | 272 | <p> |
| 238 | 273 | <label for="mapboxid">Mapbox id</label> |
| 239 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 274 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 275 | + print $globalMapboxId; |
|
| 276 | +} |
|
| 277 | +?>" /> |
|
| 240 | 278 | </p> |
| 241 | 279 | <p> |
| 242 | 280 | <label for="mapboxtoken">Mapbox token</label> |
| 243 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 281 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 282 | + print $globalMapboxToken; |
|
| 283 | +} |
|
| 284 | +?>" /> |
|
| 244 | 285 | </p> |
| 245 | 286 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 246 | 287 | </div> |
@@ -248,7 +289,10 @@ discard block |
||
| 248 | 289 | <div id="google_data"> |
| 249 | 290 | <p> |
| 250 | 291 | <label for="googlekey">Google API key</label> |
| 251 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 292 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 293 | + print $globalGoogleAPIKey; |
|
| 294 | +} |
|
| 295 | +?>" /> |
|
| 252 | 296 | <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> |
| 253 | 297 | </p> |
| 254 | 298 | </div> |
@@ -256,7 +300,10 @@ discard block |
||
| 256 | 300 | <div id="bing_data"> |
| 257 | 301 | <p> |
| 258 | 302 | <label for="bingkey">Bing Map key</label> |
| 259 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 303 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 304 | + print $globalBingMapKey; |
|
| 305 | +} |
|
| 306 | +?>" /> |
|
| 260 | 307 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 261 | 308 | </p> |
| 262 | 309 | </div> |
@@ -264,7 +311,10 @@ discard block |
||
| 264 | 311 | <div id="mapquest_data"> |
| 265 | 312 | <p> |
| 266 | 313 | <label for="mapquestkey">MapQuest key</label> |
| 267 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 314 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 315 | + print $globalMapQuestKey; |
|
| 316 | +} |
|
| 317 | +?>" /> |
|
| 268 | 318 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 269 | 319 | </p> |
| 270 | 320 | </div> |
@@ -272,11 +322,17 @@ discard block |
||
| 272 | 322 | <div id="here_data"> |
| 273 | 323 | <p> |
| 274 | 324 | <label for="hereappid">Here App_Id</label> |
| 275 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 325 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 326 | + print $globalHereappId; |
|
| 327 | +} |
|
| 328 | +?>" /> |
|
| 276 | 329 | </p> |
| 277 | 330 | <p> |
| 278 | 331 | <label for="hereappcode">Here App_Code</label> |
| 279 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 332 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 333 | + print $globalHereappCode; |
|
| 334 | +} |
|
| 335 | +?>" /> |
|
| 280 | 336 | </p> |
| 281 | 337 | <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> |
| 282 | 338 | </div> |
@@ -284,7 +340,10 @@ discard block |
||
| 284 | 340 | <div id="openweathermap_data"> |
| 285 | 341 | <p> |
| 286 | 342 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 287 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 343 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 344 | + print $globalOpenWeatherMapKey; |
|
| 345 | +} |
|
| 346 | +?>" /> |
|
| 288 | 347 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 289 | 348 | </p> |
| 290 | 349 | </div> |
@@ -313,42 +372,86 @@ discard block |
||
| 313 | 372 | <legend>Coverage area</legend> |
| 314 | 373 | <p> |
| 315 | 374 | <label for="latitudemax">The maximum latitude (north)</label> |
| 316 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 375 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 376 | + print $globalLatitudeMax; |
|
| 377 | +} |
|
| 378 | +?>" /> |
|
| 317 | 379 | </p> |
| 318 | 380 | <p> |
| 319 | 381 | <label for="latitudemin">The minimum latitude (south)</label> |
| 320 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 382 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 383 | + print $globalLatitudeMin; |
|
| 384 | +} |
|
| 385 | +?>" /> |
|
| 321 | 386 | </p> |
| 322 | 387 | <p> |
| 323 | 388 | <label for="longitudemax">The maximum longitude (west)</label> |
| 324 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 389 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 390 | + print $globalLongitudeMax; |
|
| 391 | +} |
|
| 392 | +?>" /> |
|
| 325 | 393 | </p> |
| 326 | 394 | <p> |
| 327 | 395 | <label for="longitudemin">The minimum longitude (east)</label> |
| 328 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 396 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 397 | + print $globalLongitudeMin; |
|
| 398 | +} |
|
| 399 | +?>" /> |
|
| 329 | 400 | </p> |
| 330 | 401 | <p> |
| 331 | 402 | <label for="latitudecenter">The latitude center</label> |
| 332 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 403 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 404 | + print $globalCenterLatitude; |
|
| 405 | +} |
|
| 406 | +?>" /> |
|
| 333 | 407 | </p> |
| 334 | 408 | <p> |
| 335 | 409 | <label for="longitudecenter">The longitude center</label> |
| 336 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 410 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 411 | + print $globalCenterLongitude; |
|
| 412 | +} |
|
| 413 | +?>" /> |
|
| 337 | 414 | </p> |
| 338 | 415 | <p> |
| 339 | 416 | <label for="livezoom">Default Zoom on live map</label> |
| 340 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 417 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 418 | + print $globalLiveZoom; |
|
| 419 | +} else { |
|
| 420 | + print '9'; |
|
| 421 | +} |
|
| 422 | +?>" /> |
|
| 341 | 423 | </p> |
| 342 | 424 | <p> |
| 343 | 425 | <label for="squawk_country">Country for squawk usage</label> |
| 344 | 426 | <select name="squawk_country" id="squawk_country"> |
| 345 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 346 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 347 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 348 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 349 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 350 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 351 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 427 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 428 | + print ' selected '; |
|
| 429 | +} |
|
| 430 | +?>>UK</option> |
|
| 431 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 432 | + print ' selected '; |
|
| 433 | +} |
|
| 434 | +?>>NZ</option> |
|
| 435 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 436 | + print ' selected '; |
|
| 437 | +} |
|
| 438 | +?>>US</option> |
|
| 439 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 440 | + print ' selected '; |
|
| 441 | +} |
|
| 442 | +?>>AU</option> |
|
| 443 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 444 | + print ' selected '; |
|
| 445 | +} |
|
| 446 | +?>>NL</option> |
|
| 447 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 448 | + print ' selected '; |
|
| 449 | +} |
|
| 450 | +?>>FR</option> |
|
| 451 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 452 | + print ' selected '; |
|
| 453 | +} |
|
| 454 | +?>>TR</option> |
|
| 352 | 455 | </select> |
| 353 | 456 | </p> |
| 354 | 457 | </fieldset> |
@@ -357,15 +460,24 @@ discard block |
||
| 357 | 460 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 358 | 461 | <p> |
| 359 | 462 | <label for="latitude">Center latitude</label> |
| 360 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 463 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 464 | + echo $globalDistanceIgnore['latitude']; |
|
| 465 | +} |
|
| 466 | +?>" /> |
|
| 361 | 467 | </p> |
| 362 | 468 | <p> |
| 363 | 469 | <label for="longitude">Center longitude</label> |
| 364 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 470 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 471 | + echo $globalDistanceIgnore['longitude']; |
|
| 472 | +} |
|
| 473 | +?>" /> |
|
| 365 | 474 | </p> |
| 366 | 475 | <p> |
| 367 | 476 | <label for="Distance">Distance (in km)</label> |
| 368 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 477 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 478 | + echo $globalDistanceIgnore['distance']; |
|
| 479 | +} |
|
| 480 | +?>" /> |
|
| 369 | 481 | </p> |
| 370 | 482 | </fieldset> |
| 371 | 483 | <fieldset id="sourceloc"> |
@@ -481,11 +593,17 @@ discard block |
||
| 481 | 593 | <div id="flightaware_data"> |
| 482 | 594 | <p> |
| 483 | 595 | <label for="flightawareusername">FlightAware username</label> |
| 484 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 596 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 597 | + print $globalFlightAwareUsername; |
|
| 598 | +} |
|
| 599 | +?>" /> |
|
| 485 | 600 | </p> |
| 486 | 601 | <p> |
| 487 | 602 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 488 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 603 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 604 | + print $globalFlightAwarePassword; |
|
| 605 | +} |
|
| 606 | +?>" /> |
|
| 489 | 607 | </p> |
| 490 | 608 | </div> |
| 491 | 609 | --> |
@@ -527,7 +645,10 @@ discard block |
||
| 527 | 645 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 528 | 646 | ?> |
| 529 | 647 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 530 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 648 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 649 | + print $source['port']; |
|
| 650 | +} |
|
| 651 | +?>" /></td> |
|
| 531 | 652 | <?php |
| 532 | 653 | } else { |
| 533 | 654 | $hostport = explode(':',$source['host']); |
@@ -546,36 +667,114 @@ discard block |
||
| 546 | 667 | ?> |
| 547 | 668 | <td> |
| 548 | 669 | <select name="format[]" id="format"> |
| 549 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 550 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 551 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 552 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 553 | - <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option> |
|
| 554 | - <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') print 'selected'; ?>>Planefinder client</option> |
|
| 555 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 556 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 557 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 558 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 559 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 560 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 561 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 562 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 563 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 564 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 565 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 566 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 567 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 568 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 569 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 570 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 571 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 670 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 671 | + print 'selected'; |
|
| 672 | +} |
|
| 673 | +?>>Auto</option> |
|
| 674 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 675 | + print 'selected'; |
|
| 676 | +} |
|
| 677 | +?>>SBS</option> |
|
| 678 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 679 | + print 'selected'; |
|
| 680 | +} |
|
| 681 | +?>>TSV</option> |
|
| 682 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 683 | + print 'selected'; |
|
| 684 | +} |
|
| 685 | +?>>Raw</option> |
|
| 686 | + <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') { |
|
| 687 | + print 'selected'; |
|
| 688 | +} |
|
| 689 | +?>>Dump1090 aircraft.json</option> |
|
| 690 | + <option value="planefinderclient" <?php if (isset($source['format']) && $source['format'] == 'planefinderclient') { |
|
| 691 | + print 'selected'; |
|
| 692 | +} |
|
| 693 | +?>>Planefinder client</option> |
|
| 694 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 695 | + print 'selected'; |
|
| 696 | +} |
|
| 697 | +?>>APRS</option> |
|
| 698 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 699 | + print 'selected'; |
|
| 700 | +} |
|
| 701 | +?>>Radarcape deltadb.txt</option> |
|
| 702 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 703 | + print 'selected'; |
|
| 704 | +} |
|
| 705 | +?>>Vatsim</option> |
|
| 706 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 707 | + print 'selected'; |
|
| 708 | +} |
|
| 709 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 710 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 711 | + print 'selected'; |
|
| 712 | +} |
|
| 713 | +?>>Virtual Radar Server TCP</option> |
|
| 714 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 715 | + print 'selected'; |
|
| 716 | +} |
|
| 717 | +?>>phpVMS</option> |
|
| 718 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 719 | + print 'selected'; |
|
| 720 | +} |
|
| 721 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 722 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 723 | + print 'selected'; |
|
| 724 | +} |
|
| 725 | +?>>Virtual Airlines Manager</option> |
|
| 726 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 727 | + print 'selected'; |
|
| 728 | +} |
|
| 729 | +?>>IVAO</option> |
|
| 730 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 731 | + print 'selected'; |
|
| 732 | +} |
|
| 733 | +?>>FlightGear Multiplayer</option> |
|
| 734 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 735 | + print 'selected'; |
|
| 736 | +} |
|
| 737 | +?>>FlightGear Singleplayer</option> |
|
| 738 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 739 | + print 'selected'; |
|
| 740 | +} |
|
| 741 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 742 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 743 | + print 'selected'; |
|
| 744 | +} |
|
| 745 | +?>>ACARS SBS-3 over TCP</option> |
|
| 746 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 747 | + print 'selected'; |
|
| 748 | +} |
|
| 749 | +?>>NMEA AIS over TCP</option> |
|
| 750 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 751 | + print 'selected'; |
|
| 752 | +} |
|
| 753 | +?>>AirWhere website</option> |
|
| 754 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 755 | + print 'selected'; |
|
| 756 | +} |
|
| 757 | +?>>HidnSeek Callback</option> |
|
| 758 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 759 | + print 'selected'; |
|
| 760 | +} |
|
| 761 | +?>>Blitzortung</option> |
|
| 572 | 762 | </select> |
| 573 | 763 | </td> |
| 574 | 764 | <td> |
| 575 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 765 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 766 | + print $source['name']; |
|
| 767 | +} |
|
| 768 | +?>" /> |
|
| 576 | 769 | </td> |
| 577 | - <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> |
|
| 578 | - <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> |
|
| 770 | + <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']) { |
|
| 771 | + print 'checked'; |
|
| 772 | +} |
|
| 773 | +?> /></td> |
|
| 774 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 775 | + print 'checked'; |
|
| 776 | +} |
|
| 777 | +?> /></td> |
|
| 579 | 778 | <td> |
| 580 | 779 | <select name="timezones[]" id="timezones"> |
| 581 | 780 | <?php |
@@ -585,7 +784,9 @@ discard block |
||
| 585 | 784 | print '<option selected>'.$timezones.'</option>'; |
| 586 | 785 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 587 | 786 | print '<option selected>'.$timezones.'</option>'; |
| 588 | - } else print '<option>'.$timezones.'</option>'; |
|
| 787 | + } else { |
|
| 788 | + print '<option>'.$timezones.'</option>'; |
|
| 789 | + } |
|
| 589 | 790 | } |
| 590 | 791 | ?> |
| 591 | 792 | </select> |
@@ -638,7 +839,9 @@ discard block |
||
| 638 | 839 | foreach($timezonelist as $timezones){ |
| 639 | 840 | if ($timezones == 'UTC') { |
| 640 | 841 | print '<option selected>'.$timezones.'</option>'; |
| 641 | - } else print '<option>'.$timezones.'</option>'; |
|
| 842 | + } else { |
|
| 843 | + print '<option>'.$timezones.'</option>'; |
|
| 844 | + } |
|
| 642 | 845 | } |
| 643 | 846 | ?> |
| 644 | 847 | </select> |
@@ -663,11 +866,17 @@ discard block |
||
| 663 | 866 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 664 | 867 | <p> |
| 665 | 868 | <label for="acarshost">ACARS UDP host</label> |
| 666 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 869 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 870 | + print $globalACARSHost; |
|
| 871 | +} |
|
| 872 | +?>" /> |
|
| 667 | 873 | </p> |
| 668 | 874 | <p> |
| 669 | 875 | <label for="acarsport">ACARS UDP port</label> |
| 670 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 876 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 877 | + print $globalACARSPort; |
|
| 878 | +} |
|
| 879 | +?>" /> |
|
| 671 | 880 | </p> |
| 672 | 881 | </fieldset> |
| 673 | 882 | </div> |
@@ -693,17 +902,38 @@ discard block |
||
| 693 | 902 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 694 | 903 | <td> |
| 695 | 904 | <select name="newslang[]"> |
| 696 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 697 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 905 | + <option value="en"<?php if ($lng == 'en') { |
|
| 906 | + print ' selected'; |
|
| 907 | +} |
|
| 908 | +?>>English</option> |
|
| 909 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 910 | + print ' selected'; |
|
| 911 | +} |
|
| 912 | +?>>French</option> |
|
| 698 | 913 | </select> |
| 699 | 914 | </td> |
| 700 | 915 | <td> |
| 701 | 916 | <select name="newstype[]"> |
| 702 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 703 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 704 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 705 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 706 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 917 | + <option value="global"<?php if ($type == 'global') { |
|
| 918 | + print ' selected'; |
|
| 919 | +} |
|
| 920 | +?>>Global</option> |
|
| 921 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 922 | + print ' selected'; |
|
| 923 | +} |
|
| 924 | +?>>Aircraft</option> |
|
| 925 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 926 | + print ' selected'; |
|
| 927 | +} |
|
| 928 | +?>>Marine</option> |
|
| 929 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 930 | + print ' selected'; |
|
| 931 | +} |
|
| 932 | +?>>Tracker</option> |
|
| 933 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 934 | + print ' selected'; |
|
| 935 | +} |
|
| 936 | +?>>Satellite</option> |
|
| 707 | 937 | </select> |
| 708 | 938 | </td> |
| 709 | 939 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -836,13 +1066,19 @@ discard block |
||
| 836 | 1066 | <div id="schedules_options"> |
| 837 | 1067 | <p> |
| 838 | 1068 | <label for="britishairways">British Airways API Key</label> |
| 839 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1069 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1070 | + print $globalBritishAirwaysKey; |
|
| 1071 | +} |
|
| 1072 | +?>" /> |
|
| 840 | 1073 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 841 | 1074 | </p> |
| 842 | 1075 | <!-- |
| 843 | 1076 | <p> |
| 844 | 1077 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 845 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1078 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1079 | + print $globalTransaviaKey; |
|
| 1080 | +} |
|
| 1081 | +?>" /> |
|
| 846 | 1082 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 847 | 1083 | </p> |
| 848 | 1084 | --> |
@@ -851,10 +1087,16 @@ discard block |
||
| 851 | 1087 | <b>Lufthansa API Key</b> |
| 852 | 1088 | <p> |
| 853 | 1089 | <label for="lufthansakey">Key</label> |
| 854 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1090 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1091 | + print $globalLufthansaKey['key']; |
|
| 1092 | +} |
|
| 1093 | +?>" /> |
|
| 855 | 1094 | </p><p> |
| 856 | 1095 | <label for="lufthansasecret">Secret</label> |
| 857 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1096 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1097 | + print $globalLufthansaKey['secret']; |
|
| 1098 | +} |
|
| 1099 | +?>" /> |
|
| 858 | 1100 | </p> |
| 859 | 1101 | </div> |
| 860 | 1102 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -864,11 +1106,17 @@ discard block |
||
| 864 | 1106 | <b>FlightAware API Key</b> |
| 865 | 1107 | <p> |
| 866 | 1108 | <label for="flightawareusername">Username</label> |
| 867 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1109 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1110 | + print $globalFlightAwareUsername; |
|
| 1111 | +} |
|
| 1112 | +?>" /> |
|
| 868 | 1113 | </p> |
| 869 | 1114 | <p> |
| 870 | 1115 | <label for="flightawarepassword">API key</label> |
| 871 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1116 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1117 | + print $globalFlightAwarePassword; |
|
| 1118 | +} |
|
| 1119 | +?>" /> |
|
| 872 | 1120 | </p> |
| 873 | 1121 | </div> |
| 874 | 1122 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -885,10 +1133,22 @@ discard block |
||
| 885 | 1133 | <p> |
| 886 | 1134 | <label for="mapmatchingsource">Map Matching source</label> |
| 887 | 1135 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 888 | - <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>FlightAirMap Map Matching</option> |
|
| 889 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 890 | - <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') print 'selected="selected" '; ?>>OSMR</option> |
|
| 891 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1136 | + <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) { |
|
| 1137 | + print 'selected="selected" '; |
|
| 1138 | +} |
|
| 1139 | +?>>FlightAirMap Map Matching</option> |
|
| 1140 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1141 | + print 'selected="selected" '; |
|
| 1142 | +} |
|
| 1143 | +?>>GraphHopper</option> |
|
| 1144 | + <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') { |
|
| 1145 | + print 'selected="selected" '; |
|
| 1146 | +} |
|
| 1147 | +?>>OSMR</option> |
|
| 1148 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1149 | + print 'selected="selected" '; |
|
| 1150 | +} |
|
| 1151 | +?>>Mapbox</option> |
|
| 892 | 1152 | </select> |
| 893 | 1153 | <p class="help-block">Mapbox need the API Key defined in map section.</p> |
| 894 | 1154 | <p class="help-block">FlightAirMap Map Matching is free, without API key but limited to about 100 input points to keep fast results.</p> |
@@ -896,7 +1156,10 @@ discard block |
||
| 896 | 1156 | <br /> |
| 897 | 1157 | <p> |
| 898 | 1158 | <label for="graphhopper">GraphHopper API Key</label> |
| 899 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1159 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1160 | + print $globalGraphHopperKey; |
|
| 1161 | +} |
|
| 1162 | +?>" /> |
|
| 900 | 1163 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 901 | 1164 | </p> |
| 902 | 1165 | </div> |
@@ -914,7 +1177,10 @@ discard block |
||
| 914 | 1177 | </p> |
| 915 | 1178 | <p> |
| 916 | 1179 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 917 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1180 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1181 | + print $globalNOTAMSource; |
|
| 1182 | +} |
|
| 1183 | +?>" /> |
|
| 918 | 1184 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 919 | 1185 | </p> |
| 920 | 1186 | <br /> |
@@ -930,14 +1196,20 @@ discard block |
||
| 930 | 1196 | <div id="metarsrc"> |
| 931 | 1197 | <p> |
| 932 | 1198 | <label for="metarsource">URL of your METAR source</label> |
| 933 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1199 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1200 | + print $globalMETARurl; |
|
| 1201 | +} |
|
| 1202 | +?>" /> |
|
| 934 | 1203 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 935 | 1204 | </p> |
| 936 | 1205 | </div> |
| 937 | 1206 | <br /> |
| 938 | 1207 | <p> |
| 939 | 1208 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 940 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1209 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1210 | + print $globalBitlyAccessToken; |
|
| 1211 | +} |
|
| 1212 | +?>" /> |
|
| 941 | 1213 | </p> |
| 942 | 1214 | <br /> |
| 943 | 1215 | <p> |
@@ -953,11 +1225,26 @@ discard block |
||
| 953 | 1225 | <p> |
| 954 | 1226 | <label for="geoid_source">Geoid Source</label> |
| 955 | 1227 | <select name="geoid_source" id="geoid_source"> |
| 956 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 957 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 958 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 959 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 960 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1228 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1229 | + print ' selected="selected"'; |
|
| 1230 | +} |
|
| 1231 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1232 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1233 | + print ' selected="selected"'; |
|
| 1234 | +} |
|
| 1235 | +?>>EGM96 5' (19MB)</option> |
|
| 1236 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1237 | + print ' selected="selected"'; |
|
| 1238 | +} |
|
| 1239 | +?>>EGM2008 5' (19MB)</option> |
|
| 1240 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1241 | + print ' selected="selected"'; |
|
| 1242 | +} |
|
| 1243 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1244 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1245 | + print ' selected="selected"'; |
|
| 1246 | +} |
|
| 1247 | +?>>EGM2008 1' (470MB)</option> |
|
| 961 | 1248 | </select> |
| 962 | 1249 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 963 | 1250 | </p> |
@@ -979,7 +1266,12 @@ discard block |
||
| 979 | 1266 | </p> |
| 980 | 1267 | <p> |
| 981 | 1268 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 982 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1269 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1270 | + print $globalArchiveMonths; |
|
| 1271 | +} else { |
|
| 1272 | + echo '1'; |
|
| 1273 | +} |
|
| 1274 | +?>" /> |
|
| 983 | 1275 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 984 | 1276 | </p> |
| 985 | 1277 | <p> |
@@ -989,12 +1281,22 @@ discard block |
||
| 989 | 1281 | </p> |
| 990 | 1282 | <p> |
| 991 | 1283 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 992 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1284 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1285 | + print $globalArchiveKeepMonths; |
|
| 1286 | +} else { |
|
| 1287 | + echo '1'; |
|
| 1288 | +} |
|
| 1289 | +?>" /> |
|
| 993 | 1290 | <p class="help-block">0 to disable</p> |
| 994 | 1291 | </p> |
| 995 | 1292 | <p> |
| 996 | 1293 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 997 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1294 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1295 | + print $globalArchiveKeepTrackMonths; |
|
| 1296 | +} else { |
|
| 1297 | + echo '1'; |
|
| 1298 | +} |
|
| 1299 | +?>" /> |
|
| 998 | 1300 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 999 | 1301 | </p> |
| 1000 | 1302 | <br /> |
@@ -1004,7 +1306,12 @@ discard block |
||
| 1004 | 1306 | <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> |
| 1005 | 1307 | <div id="cronends"> |
| 1006 | 1308 | <label for="cronend">Run script for xx seconds</label> |
| 1007 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1309 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1310 | + print $globalCronEnd; |
|
| 1311 | +} else { |
|
| 1312 | + print '0'; |
|
| 1313 | +} |
|
| 1314 | +?>" /> |
|
| 1008 | 1315 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 1009 | 1316 | </div> |
| 1010 | 1317 | </p> |
@@ -1057,20 +1364,40 @@ discard block |
||
| 1057 | 1364 | <br /> |
| 1058 | 1365 | <p> |
| 1059 | 1366 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1060 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1367 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1368 | + echo $globalLiveInterval; |
|
| 1369 | +} else { |
|
| 1370 | + echo '200'; |
|
| 1371 | +} |
|
| 1372 | +?>" /> |
|
| 1061 | 1373 | </p> |
| 1062 | 1374 | <p> |
| 1063 | 1375 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1064 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1376 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1377 | + echo $globalMapRefresh; |
|
| 1378 | +} else { |
|
| 1379 | + echo '30'; |
|
| 1380 | +} |
|
| 1381 | +?>" /> |
|
| 1065 | 1382 | </p> |
| 1066 | 1383 | <p> |
| 1067 | 1384 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1068 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1385 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1386 | + echo $globalMapIdleTimeout; |
|
| 1387 | +} else { |
|
| 1388 | + echo '30'; |
|
| 1389 | +} |
|
| 1390 | +?>" /> |
|
| 1069 | 1391 | <p class="help-block">0 to disable</p> |
| 1070 | 1392 | </p> |
| 1071 | 1393 | <p> |
| 1072 | 1394 | <label for="minfetch">HTTP/file source fetch every xxx seconds</label> |
| 1073 | - <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" /> |
|
| 1395 | + <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) { |
|
| 1396 | + echo $globalMinFetch; |
|
| 1397 | +} else { |
|
| 1398 | + echo '20'; |
|
| 1399 | +} |
|
| 1400 | +?>" /> |
|
| 1074 | 1401 | </p> |
| 1075 | 1402 | <p> |
| 1076 | 1403 | <label for="bbox">Only display flights that we can see on screen (bounding box)</label> |
@@ -1084,12 +1411,20 @@ discard block |
||
| 1084 | 1411 | <br /> |
| 1085 | 1412 | <p> |
| 1086 | 1413 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1087 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1414 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1415 | + echo $globalClosestMinDist; |
|
| 1416 | +} else { |
|
| 1417 | + echo '50'; |
|
| 1418 | +} |
|
| 1419 | +?>" /> |
|
| 1088 | 1420 | </p> |
| 1089 | 1421 | <br /> |
| 1090 | 1422 | <p> |
| 1091 | 1423 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1092 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1424 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1425 | + echo $globalAircraftSize; |
|
| 1426 | +} |
|
| 1427 | +?>" /> |
|
| 1093 | 1428 | </p> |
| 1094 | 1429 | <br /> |
| 1095 | 1430 | <p> |
@@ -1108,7 +1443,12 @@ discard block |
||
| 1108 | 1443 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 1109 | 1444 | ?> |
| 1110 | 1445 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1111 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1446 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1447 | + echo $globalAircraftIconColor; |
|
| 1448 | +} else { |
|
| 1449 | + echo '1a3151'; |
|
| 1450 | +} |
|
| 1451 | +?>" /> |
|
| 1112 | 1452 | <?php |
| 1113 | 1453 | if (!is_writable('../cache')) { |
| 1114 | 1454 | ?> |
@@ -1126,14 +1466,27 @@ discard block |
||
| 1126 | 1466 | <p> |
| 1127 | 1467 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1128 | 1468 | <div class="range"> |
| 1129 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1130 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1469 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1470 | + echo $globalAirportZoom; |
|
| 1471 | +} else { |
|
| 1472 | + echo '7'; |
|
| 1473 | +} |
|
| 1474 | +?>" /> |
|
| 1475 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1476 | + echo $globalAirportZoom; |
|
| 1477 | +} else { |
|
| 1478 | + echo '7'; |
|
| 1479 | +} |
|
| 1480 | +?></output> |
|
| 1131 | 1481 | </div> |
| 1132 | 1482 | </p> |
| 1133 | 1483 | <br /> |
| 1134 | 1484 | <p> |
| 1135 | 1485 | <label for="customcss">Custom CSS web path</label> |
| 1136 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1486 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1487 | + echo $globalCustomCSS; |
|
| 1488 | +} |
|
| 1489 | +?>" /> |
|
| 1137 | 1490 | </p> |
| 1138 | 1491 | </fieldset> |
| 1139 | 1492 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1160,8 +1513,12 @@ discard block |
||
| 1160 | 1513 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1161 | 1514 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1162 | 1515 | |
| 1163 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1164 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1516 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1517 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1518 | + } |
|
| 1519 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1520 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1521 | + } |
|
| 1165 | 1522 | |
| 1166 | 1523 | $_SESSION['database_root'] = $dbroot; |
| 1167 | 1524 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1229,15 +1586,23 @@ discard block |
||
| 1229 | 1586 | $source_city = $_POST['source_city']; |
| 1230 | 1587 | $source_country = $_POST['source_country']; |
| 1231 | 1588 | $source_ref = $_POST['source_ref']; |
| 1232 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1233 | - else $source_id = array(); |
|
| 1589 | + if (isset($source_id)) { |
|
| 1590 | + $source_id = $_POST['source_id']; |
|
| 1591 | + } else { |
|
| 1592 | + $source_id = array(); |
|
| 1593 | + } |
|
| 1234 | 1594 | |
| 1235 | 1595 | $sources = array(); |
| 1236 | 1596 | foreach ($source_name as $keys => $name) { |
| 1237 | - 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]); |
|
| 1238 | - 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]); |
|
| 1597 | + if (isset($source_id[$keys])) { |
|
| 1598 | + $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]); |
|
| 1599 | + } else { |
|
| 1600 | + $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]); |
|
| 1601 | + } |
|
| 1602 | + } |
|
| 1603 | + if (count($sources) > 0) { |
|
| 1604 | + $_SESSION['sources'] = $sources; |
|
| 1239 | 1605 | } |
| 1240 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1241 | 1606 | |
| 1242 | 1607 | $newsurl = $_POST['newsurl']; |
| 1243 | 1608 | $newslng = $_POST['newslang']; |
@@ -1250,7 +1615,9 @@ discard block |
||
| 1250 | 1615 | $lng = $newslng[$newskey]; |
| 1251 | 1616 | if (isset($newsfeeds[$type][$lng])) { |
| 1252 | 1617 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1253 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1618 | + } else { |
|
| 1619 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1620 | + } |
|
| 1254 | 1621 | } |
| 1255 | 1622 | } |
| 1256 | 1623 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1274,17 +1641,29 @@ discard block |
||
| 1274 | 1641 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1275 | 1642 | |
| 1276 | 1643 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1277 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1278 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1644 | + if ($globalaircraft == 'aircraft') { |
|
| 1645 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1646 | + } else { |
|
| 1647 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1648 | + } |
|
| 1279 | 1649 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1280 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1281 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1650 | + if ($globaltracker == 'tracker') { |
|
| 1651 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1652 | + } else { |
|
| 1653 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1654 | + } |
|
| 1282 | 1655 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1283 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1284 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1656 | + if ($globalmarine == 'marine') { |
|
| 1657 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1658 | + } else { |
|
| 1659 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1660 | + } |
|
| 1285 | 1661 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1286 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1287 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1662 | + if ($globalsatellite == 'satellite') { |
|
| 1663 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1664 | + } else { |
|
| 1665 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1666 | + } |
|
| 1288 | 1667 | |
| 1289 | 1668 | /* |
| 1290 | 1669 | $globalSBS1Hosts = array(); |
@@ -1306,23 +1685,37 @@ discard block |
||
| 1306 | 1685 | $name = $_POST['name']; |
| 1307 | 1686 | $format = $_POST['format']; |
| 1308 | 1687 | $timezones = $_POST['timezones']; |
| 1309 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1310 | - else $sourcestats = array(); |
|
| 1311 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1312 | - else $noarchive = array(); |
|
| 1688 | + if (isset($_POST['sourcestats'])) { |
|
| 1689 | + $sourcestats = $_POST['sourcestats']; |
|
| 1690 | + } else { |
|
| 1691 | + $sourcestats = array(); |
|
| 1692 | + } |
|
| 1693 | + if (isset($_POST['noarchive'])) { |
|
| 1694 | + $noarchive = $_POST['noarchive']; |
|
| 1695 | + } else { |
|
| 1696 | + $noarchive = array(); |
|
| 1697 | + } |
|
| 1313 | 1698 | $gSources = array(); |
| 1314 | 1699 | $forcepilots = false; |
| 1315 | 1700 | foreach ($host as $key => $h) { |
| 1316 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1317 | - else $cov = 'FALSE'; |
|
| 1318 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1319 | - else $arch = 'FALSE'; |
|
| 1701 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1702 | + $cov = 'TRUE'; |
|
| 1703 | + } else { |
|
| 1704 | + $cov = 'FALSE'; |
|
| 1705 | + } |
|
| 1706 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1707 | + $arch = 'TRUE'; |
|
| 1708 | + } else { |
|
| 1709 | + $arch = 'FALSE'; |
|
| 1710 | + } |
|
| 1320 | 1711 | if (strpos($format[$key],'_callback')) { |
| 1321 | 1712 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1322 | 1713 | } elseif ($h != '' || $name[$key] != '') { |
| 1323 | 1714 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1324 | 1715 | } |
| 1325 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1716 | + if ($format[$key] == 'airwhere') { |
|
| 1717 | + $forcepilots = true; |
|
| 1718 | + } |
|
| 1326 | 1719 | } |
| 1327 | 1720 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1328 | 1721 | |
@@ -1353,7 +1746,9 @@ discard block |
||
| 1353 | 1746 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1354 | 1747 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1355 | 1748 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1356 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1749 | + } else { |
|
| 1750 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1751 | + } |
|
| 1357 | 1752 | |
| 1358 | 1753 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1359 | 1754 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1394,7 +1789,9 @@ discard block |
||
| 1394 | 1789 | |
| 1395 | 1790 | // Create in settings.php keys not yet configurable if not already here |
| 1396 | 1791 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1397 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1792 | + if (!isset($globalDebug)) { |
|
| 1793 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1794 | + } |
|
| 1398 | 1795 | |
| 1399 | 1796 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1400 | 1797 | if ($resetyearstats == 'resetyearstats') { |
@@ -1437,37 +1834,56 @@ discard block |
||
| 1437 | 1834 | } |
| 1438 | 1835 | */ |
| 1439 | 1836 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1440 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1441 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1442 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1443 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1837 | + if ($globalsbs == 'sbs') { |
|
| 1838 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1839 | + } else { |
|
| 1840 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1841 | + } |
|
| 1842 | + if ($globalaprs == 'aprs') { |
|
| 1843 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1844 | + } else { |
|
| 1845 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1846 | + } |
|
| 1444 | 1847 | $va = false; |
| 1445 | 1848 | if ($globalivao == 'ivao') { |
| 1446 | 1849 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1447 | 1850 | $va = true; |
| 1448 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1851 | + } else { |
|
| 1852 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1853 | + } |
|
| 1449 | 1854 | if ($globalvatsim == 'vatsim') { |
| 1450 | 1855 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1451 | 1856 | $va = true; |
| 1452 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1857 | + } else { |
|
| 1858 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1859 | + } |
|
| 1453 | 1860 | if ($globalphpvms == 'phpvms') { |
| 1454 | 1861 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1455 | 1862 | $va = true; |
| 1456 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1863 | + } else { |
|
| 1864 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1865 | + } |
|
| 1457 | 1866 | if ($globalvam == 'vam') { |
| 1458 | 1867 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1459 | 1868 | $va = true; |
| 1460 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1869 | + } else { |
|
| 1870 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1871 | + } |
|
| 1461 | 1872 | if ($va) { |
| 1462 | 1873 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1463 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1874 | + } else { |
|
| 1875 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1876 | + } |
|
| 1464 | 1877 | if ($globalva == 'va' || $va) { |
| 1465 | 1878 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1466 | 1879 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1467 | 1880 | } else { |
| 1468 | 1881 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1469 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1470 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1882 | + if ($forcepilots) { |
|
| 1883 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1884 | + } else { |
|
| 1885 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1886 | + } |
|
| 1471 | 1887 | } |
| 1472 | 1888 | |
| 1473 | 1889 | |
@@ -1690,7 +2106,9 @@ discard block |
||
| 1690 | 2106 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1691 | 2107 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1692 | 2108 | |
| 1693 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2109 | + if (!isset($globalTransaction)) { |
|
| 2110 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2111 | + } |
|
| 1694 | 2112 | |
| 1695 | 2113 | // Set some defaults values... |
| 1696 | 2114 | if (!isset($globalAircraftImageSources)) { |
@@ -1705,15 +2123,23 @@ discard block |
||
| 1705 | 2123 | |
| 1706 | 2124 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1707 | 2125 | |
| 1708 | - if ($error == '') settings::modify_settings($settings); |
|
| 1709 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2126 | + if ($error == '') { |
|
| 2127 | + settings::modify_settings($settings); |
|
| 2128 | + } |
|
| 2129 | + if ($error == '') { |
|
| 2130 | + settings::comment_settings($settings_comment); |
|
| 2131 | + } |
|
| 1710 | 2132 | if ($error != '') { |
| 1711 | 2133 | print '<div class="info column">'.$error.'</div>'; |
| 1712 | 2134 | require('../footer.php'); |
| 1713 | 2135 | exit; |
| 1714 | 2136 | } else { |
| 1715 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1716 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2137 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2138 | + $_SESSION['waypoints'] = 1; |
|
| 2139 | + } |
|
| 2140 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2141 | + $_SESSION['owner'] = 1; |
|
| 2142 | + } |
|
| 1717 | 2143 | if (isset($_POST['createdb'])) { |
| 1718 | 2144 | $_SESSION['install'] = 'database_create'; |
| 1719 | 2145 | } else { |
@@ -1750,10 +2176,18 @@ discard block |
||
| 1750 | 2176 | $popw = false; |
| 1751 | 2177 | foreach ($_SESSION['done'] as $done) { |
| 1752 | 2178 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1753 | - if ($done == 'Create database') $pop = true; |
|
| 1754 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1755 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1756 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2179 | + if ($done == 'Create database') { |
|
| 2180 | + $pop = true; |
|
| 2181 | + } |
|
| 2182 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2183 | + $pop = true; |
|
| 2184 | + } |
|
| 2185 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2186 | + $popi = true; |
|
| 2187 | + } |
|
| 2188 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2189 | + $popw = true; |
|
| 2190 | + } |
|
| 1757 | 2191 | } |
| 1758 | 2192 | if ($pop) { |
| 1759 | 2193 | sleep(5); |
@@ -1764,7 +2198,9 @@ discard block |
||
| 1764 | 2198 | } else if ($popw) { |
| 1765 | 2199 | sleep(5); |
| 1766 | 2200 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1767 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2201 | + } else { |
|
| 2202 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2203 | + } |
|
| 1768 | 2204 | print '</div></ul>'; |
| 1769 | 2205 | print '<div id="error"></div>'; |
| 1770 | 2206 | /* foreach ($_SESSION['done'] as $done) { |