@@ -4,11 +4,19 @@ discard block |
||
| 4 | 4 | if (isset($_SESSION['error'])) { |
| 5 | 5 | header('Content-Encoding: none;'); |
| 6 | 6 | echo 'Error : '.$_SESSION['error'].' - Resetting install... You need to fix the problem and run install again.'; |
| 7 | - if (isset($_SESSION['error'])) unset($_SESSION['error']); |
|
| 8 | - if (isset($_SESSION['errorlst'])) unset($_SESSION['errorlst']); |
|
| 9 | - if (isset($_SESSION['next'])) unset($_SESSION['next']); |
|
| 10 | - if (isset($_SESSION['install'])) unset($_SESSION['install']); |
|
| 11 | -} |
|
| 7 | + if (isset($_SESSION['error'])) { |
|
| 8 | + unset($_SESSION['error']); |
|
| 9 | + } |
|
| 10 | + if (isset($_SESSION['errorlst'])) { |
|
| 11 | + unset($_SESSION['errorlst']); |
|
| 12 | + } |
|
| 13 | + if (isset($_SESSION['next'])) { |
|
| 14 | + unset($_SESSION['next']); |
|
| 15 | + } |
|
| 16 | + if (isset($_SESSION['install'])) { |
|
| 17 | + unset($_SESSION['install']); |
|
| 18 | + } |
|
| 19 | + } |
|
| 12 | 20 | /* |
| 13 | 21 | if (isset($_SESSION['errorlst'])) { |
| 14 | 22 | header('Content-Encoding: none;'); |
@@ -159,31 +167,49 @@ discard block |
||
| 159 | 167 | </div> |
| 160 | 168 | <p> |
| 161 | 169 | <label for="dbhost">Database hostname</label> |
| 162 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 170 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 171 | + print $globalDBhost; |
|
| 172 | +} |
|
| 173 | +?>" /> |
|
| 163 | 174 | </p> |
| 164 | 175 | <p> |
| 165 | 176 | <label for="dbport">Database port</label> |
| 166 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 177 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 178 | + print $globalDBport; |
|
| 179 | +} |
|
| 180 | +?>" /> |
|
| 167 | 181 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 168 | 182 | </p> |
| 169 | 183 | <p> |
| 170 | 184 | <label for="dbname">Database name</label> |
| 171 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 185 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 186 | + print $globalDBname; |
|
| 187 | +} |
|
| 188 | +?>" /> |
|
| 172 | 189 | </p> |
| 173 | 190 | <p> |
| 174 | 191 | <label for="dbuser">Database user</label> |
| 175 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 192 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 193 | + print $globalDBuser; |
|
| 194 | +} |
|
| 195 | +?>" /> |
|
| 176 | 196 | </p> |
| 177 | 197 | <p> |
| 178 | 198 | <label for="dbuserpass">Database user password</label> |
| 179 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 199 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 200 | + print $globalDBpass; |
|
| 201 | +} |
|
| 202 | +?>" /> |
|
| 180 | 203 | </p> |
| 181 | 204 | </fieldset> |
| 182 | 205 | <fieldset id="site"> |
| 183 | 206 | <legend>Site configuration</legend> |
| 184 | 207 | <p> |
| 185 | 208 | <label for="sitename">Site name</label> |
| 186 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 209 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 210 | + print $globalName; |
|
| 211 | +} |
|
| 212 | +?>" /> |
|
| 187 | 213 | </p> |
| 188 | 214 | <p> |
| 189 | 215 | <label for="siteurl">Site directory</label> |
@@ -196,18 +222,27 @@ discard block |
||
| 196 | 222 | } |
| 197 | 223 | } |
| 198 | 224 | ?> |
| 199 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 225 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 226 | + print $globalURL; |
|
| 227 | +} |
|
| 228 | +?>" /> |
|
| 200 | 229 | <p class="help-block">ex : <i>/flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 201 | 230 | <p class="help-block">Can be empty</p> |
| 202 | 231 | </p> |
| 203 | 232 | <p> |
| 204 | 233 | <label for="timezone">Timezone</label> |
| 205 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 234 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 235 | + print $globalTimezone; |
|
| 236 | +} |
|
| 237 | +?>" /> |
|
| 206 | 238 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 207 | 239 | </p> |
| 208 | 240 | <p> |
| 209 | 241 | <label for="language">Language</label> |
| 210 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 242 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 243 | + print $globalLanguage; |
|
| 244 | +} |
|
| 245 | +?>" /> |
|
| 211 | 246 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 212 | 247 | </p> |
| 213 | 248 | </fieldset> |
@@ -227,11 +262,17 @@ discard block |
||
| 227 | 262 | <div id="mapbox_data"> |
| 228 | 263 | <p> |
| 229 | 264 | <label for="mapboxid">Mapbox id</label> |
| 230 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 265 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 266 | + print $globalMapboxId; |
|
| 267 | +} |
|
| 268 | +?>" /> |
|
| 231 | 269 | </p> |
| 232 | 270 | <p> |
| 233 | 271 | <label for="mapboxtoken">Mapbox token</label> |
| 234 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 272 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 273 | + print $globalMapboxToken; |
|
| 274 | +} |
|
| 275 | +?>" /> |
|
| 235 | 276 | </p> |
| 236 | 277 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 237 | 278 | </div> |
@@ -239,7 +280,10 @@ discard block |
||
| 239 | 280 | <div id="google_data"> |
| 240 | 281 | <p> |
| 241 | 282 | <label for="googlekey">Google API key</label> |
| 242 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 283 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 284 | + print $globalGoogleAPIKey; |
|
| 285 | +} |
|
| 286 | +?>" /> |
|
| 243 | 287 | <p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p> |
| 244 | 288 | </p> |
| 245 | 289 | </div> |
@@ -247,7 +291,10 @@ discard block |
||
| 247 | 291 | <div id="bing_data"> |
| 248 | 292 | <p> |
| 249 | 293 | <label for="bingkey">Bing Map key</label> |
| 250 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 294 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 295 | + print $globalBingMapKey; |
|
| 296 | +} |
|
| 297 | +?>" /> |
|
| 251 | 298 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 252 | 299 | </p> |
| 253 | 300 | </div> |
@@ -255,7 +302,10 @@ discard block |
||
| 255 | 302 | <div id="mapquest_data"> |
| 256 | 303 | <p> |
| 257 | 304 | <label for="mapquestkey">MapQuest key</label> |
| 258 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 305 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 306 | + print $globalMapQuestKey; |
|
| 307 | +} |
|
| 308 | +?>" /> |
|
| 259 | 309 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 260 | 310 | </p> |
| 261 | 311 | </div> |
@@ -263,11 +313,17 @@ discard block |
||
| 263 | 313 | <div id="here_data"> |
| 264 | 314 | <p> |
| 265 | 315 | <label for="hereappid">Here App_Id</label> |
| 266 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 316 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 317 | + print $globalHereappId; |
|
| 318 | +} |
|
| 319 | +?>" /> |
|
| 267 | 320 | </p> |
| 268 | 321 | <p> |
| 269 | 322 | <label for="hereappcode">Here App_Code</label> |
| 270 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 323 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 324 | + print $globalHereappCode; |
|
| 325 | +} |
|
| 326 | +?>" /> |
|
| 271 | 327 | </p> |
| 272 | 328 | <p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p> |
| 273 | 329 | </div> |
@@ -275,7 +331,10 @@ discard block |
||
| 275 | 331 | <div id="openweathermap_data"> |
| 276 | 332 | <p> |
| 277 | 333 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 278 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 334 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 335 | + print $globalOpenWeatherMapKey; |
|
| 336 | +} |
|
| 337 | +?>" /> |
|
| 279 | 338 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 280 | 339 | </p> |
| 281 | 340 | </div> |
@@ -304,42 +363,86 @@ discard block |
||
| 304 | 363 | <legend>Coverage area</legend> |
| 305 | 364 | <p> |
| 306 | 365 | <label for="latitudemax">The maximum latitude (north)</label> |
| 307 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 366 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 367 | + print $globalLatitudeMax; |
|
| 368 | +} |
|
| 369 | +?>" /> |
|
| 308 | 370 | </p> |
| 309 | 371 | <p> |
| 310 | 372 | <label for="latitudemin">The minimum latitude (south)</label> |
| 311 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 373 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 374 | + print $globalLatitudeMin; |
|
| 375 | +} |
|
| 376 | +?>" /> |
|
| 312 | 377 | </p> |
| 313 | 378 | <p> |
| 314 | 379 | <label for="longitudemax">The maximum longitude (west)</label> |
| 315 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 380 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 381 | + print $globalLongitudeMax; |
|
| 382 | +} |
|
| 383 | +?>" /> |
|
| 316 | 384 | </p> |
| 317 | 385 | <p> |
| 318 | 386 | <label for="longitudemin">The minimum longitude (east)</label> |
| 319 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 387 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 388 | + print $globalLongitudeMin; |
|
| 389 | +} |
|
| 390 | +?>" /> |
|
| 320 | 391 | </p> |
| 321 | 392 | <p> |
| 322 | 393 | <label for="latitudecenter">The latitude center</label> |
| 323 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 394 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 395 | + print $globalCenterLatitude; |
|
| 396 | +} |
|
| 397 | +?>" /> |
|
| 324 | 398 | </p> |
| 325 | 399 | <p> |
| 326 | 400 | <label for="longitudecenter">The longitude center</label> |
| 327 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 401 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 402 | + print $globalCenterLongitude; |
|
| 403 | +} |
|
| 404 | +?>" /> |
|
| 328 | 405 | </p> |
| 329 | 406 | <p> |
| 330 | 407 | <label for="livezoom">Default Zoom on live map</label> |
| 331 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 408 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 409 | + print $globalLiveZoom; |
|
| 410 | +} else { |
|
| 411 | + print '9'; |
|
| 412 | +} |
|
| 413 | +?>" /> |
|
| 332 | 414 | </p> |
| 333 | 415 | <p> |
| 334 | 416 | <label for="squawk_country">Country for squawk usage</label> |
| 335 | 417 | <select name="squawk_country" id="squawk_country"> |
| 336 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 337 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 338 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 339 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 340 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 341 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 342 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 418 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 419 | + print ' selected '; |
|
| 420 | +} |
|
| 421 | +?>>UK</option> |
|
| 422 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 423 | + print ' selected '; |
|
| 424 | +} |
|
| 425 | +?>>NZ</option> |
|
| 426 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 427 | + print ' selected '; |
|
| 428 | +} |
|
| 429 | +?>>US</option> |
|
| 430 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 431 | + print ' selected '; |
|
| 432 | +} |
|
| 433 | +?>>AU</option> |
|
| 434 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 435 | + print ' selected '; |
|
| 436 | +} |
|
| 437 | +?>>NL</option> |
|
| 438 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 439 | + print ' selected '; |
|
| 440 | +} |
|
| 441 | +?>>FR</option> |
|
| 442 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 443 | + print ' selected '; |
|
| 444 | +} |
|
| 445 | +?>>TR</option> |
|
| 343 | 446 | </select> |
| 344 | 447 | </p> |
| 345 | 448 | </fieldset> |
@@ -348,15 +451,24 @@ discard block |
||
| 348 | 451 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 349 | 452 | <p> |
| 350 | 453 | <label for="latitude">Center latitude</label> |
| 351 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 454 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 455 | + echo $globalDistanceIgnore['latitude']; |
|
| 456 | +} |
|
| 457 | +?>" /> |
|
| 352 | 458 | </p> |
| 353 | 459 | <p> |
| 354 | 460 | <label for="longitude">Center longitude</label> |
| 355 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 461 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 462 | + echo $globalDistanceIgnore['longitude']; |
|
| 463 | +} |
|
| 464 | +?>" /> |
|
| 356 | 465 | </p> |
| 357 | 466 | <p> |
| 358 | 467 | <label for="Distance">Distance (in km)</label> |
| 359 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 468 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 469 | + echo $globalDistanceIgnore['distance']; |
|
| 470 | +} |
|
| 471 | +?>" /> |
|
| 360 | 472 | </p> |
| 361 | 473 | </fieldset> |
| 362 | 474 | <fieldset id="sourceloc"> |
@@ -472,11 +584,17 @@ discard block |
||
| 472 | 584 | <div id="flightaware_data"> |
| 473 | 585 | <p> |
| 474 | 586 | <label for="flightawareusername">FlightAware username</label> |
| 475 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 587 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 588 | + print $globalFlightAwareUsername; |
|
| 589 | +} |
|
| 590 | +?>" /> |
|
| 476 | 591 | </p> |
| 477 | 592 | <p> |
| 478 | 593 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 479 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 594 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 595 | + print $globalFlightAwarePassword; |
|
| 596 | +} |
|
| 597 | +?>" /> |
|
| 480 | 598 | </p> |
| 481 | 599 | </div> |
| 482 | 600 | --> |
@@ -518,7 +636,10 @@ discard block |
||
| 518 | 636 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 519 | 637 | ?> |
| 520 | 638 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 521 | - <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 639 | + <td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 640 | + print $source['port']; |
|
| 641 | +} |
|
| 642 | +?>" /></td> |
|
| 522 | 643 | <?php |
| 523 | 644 | } else { |
| 524 | 645 | $hostport = explode(':',$source['host']); |
@@ -537,35 +658,110 @@ discard block |
||
| 537 | 658 | ?> |
| 538 | 659 | <td> |
| 539 | 660 | <select name="format[]" id="format"> |
| 540 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 541 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 542 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 543 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 544 | - <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option> |
|
| 545 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 546 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 547 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 548 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 549 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 550 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 551 | - <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option> |
|
| 552 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 553 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 554 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 555 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 556 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 557 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 558 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 559 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 560 | - <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option> |
|
| 561 | - <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option> |
|
| 661 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 662 | + print 'selected'; |
|
| 663 | +} |
|
| 664 | +?>>Auto</option> |
|
| 665 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 666 | + print 'selected'; |
|
| 667 | +} |
|
| 668 | +?>>SBS</option> |
|
| 669 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 670 | + print 'selected'; |
|
| 671 | +} |
|
| 672 | +?>>TSV</option> |
|
| 673 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 674 | + print 'selected'; |
|
| 675 | +} |
|
| 676 | +?>>Raw</option> |
|
| 677 | + <option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') { |
|
| 678 | + print 'selected'; |
|
| 679 | +} |
|
| 680 | +?>>Dump1090 aircraft.json</option> |
|
| 681 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 682 | + print 'selected'; |
|
| 683 | +} |
|
| 684 | +?>>APRS</option> |
|
| 685 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 686 | + print 'selected'; |
|
| 687 | +} |
|
| 688 | +?>>Radarcape deltadb.txt</option> |
|
| 689 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 690 | + print 'selected'; |
|
| 691 | +} |
|
| 692 | +?>>Vatsim</option> |
|
| 693 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 694 | + print 'selected'; |
|
| 695 | +} |
|
| 696 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 697 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 698 | + print 'selected'; |
|
| 699 | +} |
|
| 700 | +?>>Virtual Radar Server TCP</option> |
|
| 701 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 702 | + print 'selected'; |
|
| 703 | +} |
|
| 704 | +?>>phpVMS</option> |
|
| 705 | + <option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 706 | + print 'selected'; |
|
| 707 | +} |
|
| 708 | +?>>Virtual Airline Operations System (VAOS)</option> |
|
| 709 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 710 | + print 'selected'; |
|
| 711 | +} |
|
| 712 | +?>>Virtual Airlines Manager</option> |
|
| 713 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 714 | + print 'selected'; |
|
| 715 | +} |
|
| 716 | +?>>IVAO</option> |
|
| 717 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 718 | + print 'selected'; |
|
| 719 | +} |
|
| 720 | +?>>FlightGear Multiplayer</option> |
|
| 721 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 722 | + print 'selected'; |
|
| 723 | +} |
|
| 724 | +?>>FlightGear Singleplayer</option> |
|
| 725 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 726 | + print 'selected'; |
|
| 727 | +} |
|
| 728 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 729 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 730 | + print 'selected'; |
|
| 731 | +} |
|
| 732 | +?>>ACARS SBS-3 over TCP</option> |
|
| 733 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 734 | + print 'selected'; |
|
| 735 | +} |
|
| 736 | +?>>NMEA AIS over TCP</option> |
|
| 737 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 738 | + print 'selected'; |
|
| 739 | +} |
|
| 740 | +?>>AirWhere website</option> |
|
| 741 | + <option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') { |
|
| 742 | + print 'selected'; |
|
| 743 | +} |
|
| 744 | +?>>HidnSeek Callback</option> |
|
| 745 | + <option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') { |
|
| 746 | + print 'selected'; |
|
| 747 | +} |
|
| 748 | +?>>Blitzortung</option> |
|
| 562 | 749 | </select> |
| 563 | 750 | </td> |
| 564 | 751 | <td> |
| 565 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 752 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 753 | + print $source['name']; |
|
| 754 | +} |
|
| 755 | +?>" /> |
|
| 566 | 756 | </td> |
| 567 | - <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) print 'checked'; ?> /></td> |
|
| 568 | - <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) print 'checked'; ?> /></td> |
|
| 757 | + <td><input type="checkbox" name="sourcestats[]" id="sourcestats" title="Create statistics for the source like number of messages, distance,..." value="1" <?php if (isset($source['sourcestats']) && $source['sourcestats']) { |
|
| 758 | + print 'checked'; |
|
| 759 | +} |
|
| 760 | +?> /></td> |
|
| 761 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 762 | + print 'checked'; |
|
| 763 | +} |
|
| 764 | +?> /></td> |
|
| 569 | 765 | <td> |
| 570 | 766 | <select name="timezones[]" id="timezones"> |
| 571 | 767 | <?php |
@@ -575,7 +771,9 @@ discard block |
||
| 575 | 771 | print '<option selected>'.$timezones.'</option>'; |
| 576 | 772 | } elseif (!isset($source['timezone']) && $timezones == 'UTC') { |
| 577 | 773 | print '<option selected>'.$timezones.'</option>'; |
| 578 | - } else print '<option>'.$timezones.'</option>'; |
|
| 774 | + } else { |
|
| 775 | + print '<option>'.$timezones.'</option>'; |
|
| 776 | + } |
|
| 579 | 777 | } |
| 580 | 778 | ?> |
| 581 | 779 | </select> |
@@ -627,7 +825,9 @@ discard block |
||
| 627 | 825 | foreach($timezonelist as $timezones){ |
| 628 | 826 | if ($timezones == 'UTC') { |
| 629 | 827 | print '<option selected>'.$timezones.'</option>'; |
| 630 | - } else print '<option>'.$timezones.'</option>'; |
|
| 828 | + } else { |
|
| 829 | + print '<option>'.$timezones.'</option>'; |
|
| 830 | + } |
|
| 631 | 831 | } |
| 632 | 832 | ?> |
| 633 | 833 | </select> |
@@ -652,11 +852,17 @@ discard block |
||
| 652 | 852 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 653 | 853 | <p> |
| 654 | 854 | <label for="acarshost">ACARS UDP host</label> |
| 655 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 855 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 856 | + print $globalACARSHost; |
|
| 857 | +} |
|
| 858 | +?>" /> |
|
| 656 | 859 | </p> |
| 657 | 860 | <p> |
| 658 | 861 | <label for="acarsport">ACARS UDP port</label> |
| 659 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 862 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 863 | + print $globalACARSPort; |
|
| 864 | +} |
|
| 865 | +?>" /> |
|
| 660 | 866 | </p> |
| 661 | 867 | </fieldset> |
| 662 | 868 | </div> |
@@ -682,17 +888,38 @@ discard block |
||
| 682 | 888 | <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td> |
| 683 | 889 | <td> |
| 684 | 890 | <select name="newslang[]"> |
| 685 | - <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option> |
|
| 686 | - <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option> |
|
| 891 | + <option value="en"<?php if ($lng == 'en') { |
|
| 892 | + print ' selected'; |
|
| 893 | +} |
|
| 894 | +?>>English</option> |
|
| 895 | + <option value="fr"<?php if ($lng == 'fr') { |
|
| 896 | + print ' selected'; |
|
| 897 | +} |
|
| 898 | +?>>French</option> |
|
| 687 | 899 | </select> |
| 688 | 900 | </td> |
| 689 | 901 | <td> |
| 690 | 902 | <select name="newstype[]"> |
| 691 | - <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option> |
|
| 692 | - <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option> |
|
| 693 | - <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option> |
|
| 694 | - <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option> |
|
| 695 | - <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option> |
|
| 903 | + <option value="global"<?php if ($type == 'global') { |
|
| 904 | + print ' selected'; |
|
| 905 | +} |
|
| 906 | +?>>Global</option> |
|
| 907 | + <option value="aircraft"<?php if ($type == 'aircraft') { |
|
| 908 | + print ' selected'; |
|
| 909 | +} |
|
| 910 | +?>>Aircraft</option> |
|
| 911 | + <option value="marine"<?php if ($type == 'marine') { |
|
| 912 | + print ' selected'; |
|
| 913 | +} |
|
| 914 | +?>>Marine</option> |
|
| 915 | + <option value="tracker"<?php if ($type == 'tracker') { |
|
| 916 | + print ' selected'; |
|
| 917 | +} |
|
| 918 | +?>>Tracker</option> |
|
| 919 | + <option value="satellite"<?php if ($type == 'Satellite') { |
|
| 920 | + print ' selected'; |
|
| 921 | +} |
|
| 922 | +?>>Satellite</option> |
|
| 696 | 923 | </select> |
| 697 | 924 | </td> |
| 698 | 925 | <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td> |
@@ -825,13 +1052,19 @@ discard block |
||
| 825 | 1052 | <div id="schedules_options"> |
| 826 | 1053 | <p> |
| 827 | 1054 | <label for="britishairways">British Airways API Key</label> |
| 828 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 1055 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 1056 | + print $globalBritishAirwaysKey; |
|
| 1057 | +} |
|
| 1058 | +?>" /> |
|
| 829 | 1059 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 830 | 1060 | </p> |
| 831 | 1061 | <!-- |
| 832 | 1062 | <p> |
| 833 | 1063 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 834 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 1064 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 1065 | + print $globalTransaviaKey; |
|
| 1066 | +} |
|
| 1067 | +?>" /> |
|
| 835 | 1068 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 836 | 1069 | </p> |
| 837 | 1070 | --> |
@@ -840,10 +1073,16 @@ discard block |
||
| 840 | 1073 | <b>Lufthansa API Key</b> |
| 841 | 1074 | <p> |
| 842 | 1075 | <label for="lufthansakey">Key</label> |
| 843 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 1076 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 1077 | + print $globalLufthansaKey['key']; |
|
| 1078 | +} |
|
| 1079 | +?>" /> |
|
| 844 | 1080 | </p><p> |
| 845 | 1081 | <label for="lufthansasecret">Secret</label> |
| 846 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 1082 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 1083 | + print $globalLufthansaKey['secret']; |
|
| 1084 | +} |
|
| 1085 | +?>" /> |
|
| 847 | 1086 | </p> |
| 848 | 1087 | </div> |
| 849 | 1088 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -853,11 +1092,17 @@ discard block |
||
| 853 | 1092 | <b>FlightAware API Key</b> |
| 854 | 1093 | <p> |
| 855 | 1094 | <label for="flightawareusername">Username</label> |
| 856 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 1095 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 1096 | + print $globalFlightAwareUsername; |
|
| 1097 | +} |
|
| 1098 | +?>" /> |
|
| 857 | 1099 | </p> |
| 858 | 1100 | <p> |
| 859 | 1101 | <label for="flightawarepassword">API key</label> |
| 860 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 1102 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 1103 | + print $globalFlightAwarePassword; |
|
| 1104 | +} |
|
| 1105 | +?>" /> |
|
| 861 | 1106 | </p> |
| 862 | 1107 | </div> |
| 863 | 1108 | <p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p> |
@@ -874,10 +1119,22 @@ discard block |
||
| 874 | 1119 | <p> |
| 875 | 1120 | <label for="mapmatchingsource">Map Matching source</label> |
| 876 | 1121 | <select name="mapmatchingsource" id="mapmatchingsource"> |
| 877 | - <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>FlightAirMap Map Matching</option> |
|
| 878 | - <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option> |
|
| 879 | - <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') print 'selected="selected" '; ?>>OSMR</option> |
|
| 880 | - <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option> |
|
| 1122 | + <option value="fam" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'fam') || !isset($globalMatchingSource)) { |
|
| 1123 | + print 'selected="selected" '; |
|
| 1124 | +} |
|
| 1125 | +?>>FlightAirMap Map Matching</option> |
|
| 1126 | + <option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') { |
|
| 1127 | + print 'selected="selected" '; |
|
| 1128 | +} |
|
| 1129 | +?>>GraphHopper</option> |
|
| 1130 | + <option value="osmr" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') { |
|
| 1131 | + print 'selected="selected" '; |
|
| 1132 | +} |
|
| 1133 | +?>>OSMR</option> |
|
| 1134 | + <option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') { |
|
| 1135 | + print 'selected="selected" '; |
|
| 1136 | +} |
|
| 1137 | +?>>Mapbox</option> |
|
| 881 | 1138 | </select> |
| 882 | 1139 | <p class="help-block">Mapbox need the API Key defined in map section.</p> |
| 883 | 1140 | <p class="help-block">FlightAirMap Map Matching is free, without API key but limited to about 100 input points to keep fast results.</p> |
@@ -885,7 +1142,10 @@ discard block |
||
| 885 | 1142 | <br /> |
| 886 | 1143 | <p> |
| 887 | 1144 | <label for="graphhopper">GraphHopper API Key</label> |
| 888 | - <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" /> |
|
| 1145 | + <input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) { |
|
| 1146 | + print $globalGraphHopperKey; |
|
| 1147 | +} |
|
| 1148 | +?>" /> |
|
| 889 | 1149 | <p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p> |
| 890 | 1150 | </p> |
| 891 | 1151 | </div> |
@@ -903,7 +1163,10 @@ discard block |
||
| 903 | 1163 | </p> |
| 904 | 1164 | <p> |
| 905 | 1165 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 906 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 1166 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 1167 | + print $globalNOTAMSource; |
|
| 1168 | +} |
|
| 1169 | +?>" /> |
|
| 907 | 1170 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 908 | 1171 | </p> |
| 909 | 1172 | <br /> |
@@ -919,14 +1182,20 @@ discard block |
||
| 919 | 1182 | <div id="metarsrc"> |
| 920 | 1183 | <p> |
| 921 | 1184 | <label for="metarsource">URL of your METAR source</label> |
| 922 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 1185 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 1186 | + print $globalMETARurl; |
|
| 1187 | +} |
|
| 1188 | +?>" /> |
|
| 923 | 1189 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 924 | 1190 | </p> |
| 925 | 1191 | </div> |
| 926 | 1192 | <br /> |
| 927 | 1193 | <p> |
| 928 | 1194 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 929 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 1195 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 1196 | + print $globalBitlyAccessToken; |
|
| 1197 | +} |
|
| 1198 | +?>" /> |
|
| 930 | 1199 | </p> |
| 931 | 1200 | <br /> |
| 932 | 1201 | <p> |
@@ -942,11 +1211,26 @@ discard block |
||
| 942 | 1211 | <p> |
| 943 | 1212 | <label for="geoid_source">Geoid Source</label> |
| 944 | 1213 | <select name="geoid_source" id="geoid_source"> |
| 945 | - <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option> |
|
| 946 | - <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option> |
|
| 947 | - <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option> |
|
| 948 | - <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option> |
|
| 949 | - <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option> |
|
| 1214 | + <option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') { |
|
| 1215 | + print ' selected="selected"'; |
|
| 1216 | +} |
|
| 1217 | +?>>EGM96 15' (2.1MB)</option> |
|
| 1218 | + <option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') { |
|
| 1219 | + print ' selected="selected"'; |
|
| 1220 | +} |
|
| 1221 | +?>>EGM96 5' (19MB)</option> |
|
| 1222 | + <option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') { |
|
| 1223 | + print ' selected="selected"'; |
|
| 1224 | +} |
|
| 1225 | +?>>EGM2008 5' (19MB)</option> |
|
| 1226 | + <option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') { |
|
| 1227 | + print ' selected="selected"'; |
|
| 1228 | +} |
|
| 1229 | +?>>EGM2008 2.5' (75MB)</option> |
|
| 1230 | + <option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') { |
|
| 1231 | + print ' selected="selected"'; |
|
| 1232 | +} |
|
| 1233 | +?>>EGM2008 1' (470MB)</option> |
|
| 950 | 1234 | </select> |
| 951 | 1235 | <p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p> |
| 952 | 1236 | </p> |
@@ -968,7 +1252,12 @@ discard block |
||
| 968 | 1252 | </p> |
| 969 | 1253 | <p> |
| 970 | 1254 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 971 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" /> |
|
| 1255 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 1256 | + print $globalArchiveMonths; |
|
| 1257 | +} else { |
|
| 1258 | + echo '1'; |
|
| 1259 | +} |
|
| 1260 | +?>" /> |
|
| 972 | 1261 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 973 | 1262 | </p> |
| 974 | 1263 | <p> |
@@ -978,12 +1267,22 @@ discard block |
||
| 978 | 1267 | </p> |
| 979 | 1268 | <p> |
| 980 | 1269 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 981 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" /> |
|
| 1270 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 1271 | + print $globalArchiveKeepMonths; |
|
| 1272 | +} else { |
|
| 1273 | + echo '1'; |
|
| 1274 | +} |
|
| 1275 | +?>" /> |
|
| 982 | 1276 | <p class="help-block">0 to disable</p> |
| 983 | 1277 | </p> |
| 984 | 1278 | <p> |
| 985 | 1279 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 986 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" /> |
|
| 1280 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 1281 | + print $globalArchiveKeepTrackMonths; |
|
| 1282 | +} else { |
|
| 1283 | + echo '1'; |
|
| 1284 | +} |
|
| 1285 | +?>" /> |
|
| 987 | 1286 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 988 | 1287 | </p> |
| 989 | 1288 | <br /> |
@@ -993,7 +1292,12 @@ discard block |
||
| 993 | 1292 | <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> |
| 994 | 1293 | <div id="cronends"> |
| 995 | 1294 | <label for="cronend">Run script for xx seconds</label> |
| 996 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 1295 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 1296 | + print $globalCronEnd; |
|
| 1297 | +} else { |
|
| 1298 | + print '0'; |
|
| 1299 | +} |
|
| 1300 | +?>" /> |
|
| 997 | 1301 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 998 | 1302 | </div> |
| 999 | 1303 | </p> |
@@ -1046,20 +1350,40 @@ discard block |
||
| 1046 | 1350 | <br /> |
| 1047 | 1351 | <p> |
| 1048 | 1352 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 1049 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1353 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1354 | + echo $globalLiveInterval; |
|
| 1355 | +} else { |
|
| 1356 | + echo '200'; |
|
| 1357 | +} |
|
| 1358 | +?>" /> |
|
| 1050 | 1359 | </p> |
| 1051 | 1360 | <p> |
| 1052 | 1361 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 1053 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1362 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1363 | + echo $globalMapRefresh; |
|
| 1364 | +} else { |
|
| 1365 | + echo '30'; |
|
| 1366 | +} |
|
| 1367 | +?>" /> |
|
| 1054 | 1368 | </p> |
| 1055 | 1369 | <p> |
| 1056 | 1370 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 1057 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1371 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1372 | + echo $globalMapIdleTimeout; |
|
| 1373 | +} else { |
|
| 1374 | + echo '30'; |
|
| 1375 | +} |
|
| 1376 | +?>" /> |
|
| 1058 | 1377 | <p class="help-block">0 to disable</p> |
| 1059 | 1378 | </p> |
| 1060 | 1379 | <p> |
| 1061 | 1380 | <label for="minfetch">HTTP/file source fetch every xxx seconds</label> |
| 1062 | - <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" /> |
|
| 1381 | + <input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) { |
|
| 1382 | + echo $globalMinFetch; |
|
| 1383 | +} else { |
|
| 1384 | + echo '20'; |
|
| 1385 | +} |
|
| 1386 | +?>" /> |
|
| 1063 | 1387 | </p> |
| 1064 | 1388 | <p> |
| 1065 | 1389 | <label for="bbox">Only display flights that we can see on screen (bounding box)</label> |
@@ -1073,12 +1397,20 @@ discard block |
||
| 1073 | 1397 | <br /> |
| 1074 | 1398 | <p> |
| 1075 | 1399 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 1076 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1400 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1401 | + echo $globalClosestMinDist; |
|
| 1402 | +} else { |
|
| 1403 | + echo '50'; |
|
| 1404 | +} |
|
| 1405 | +?>" /> |
|
| 1077 | 1406 | </p> |
| 1078 | 1407 | <br /> |
| 1079 | 1408 | <p> |
| 1080 | 1409 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 1081 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1410 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1411 | + echo $globalAircraftSize; |
|
| 1412 | +} |
|
| 1413 | +?>" /> |
|
| 1082 | 1414 | </p> |
| 1083 | 1415 | <br /> |
| 1084 | 1416 | <p> |
@@ -1097,7 +1429,12 @@ discard block |
||
| 1097 | 1429 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 1098 | 1430 | ?> |
| 1099 | 1431 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 1100 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1432 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1433 | + echo $globalAircraftIconColor; |
|
| 1434 | +} else { |
|
| 1435 | + echo '1a3151'; |
|
| 1436 | +} |
|
| 1437 | +?>" /> |
|
| 1101 | 1438 | <?php |
| 1102 | 1439 | if (!is_writable('../cache')) { |
| 1103 | 1440 | ?> |
@@ -1115,14 +1452,27 @@ discard block |
||
| 1115 | 1452 | <p> |
| 1116 | 1453 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 1117 | 1454 | <div class="range"> |
| 1118 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 1119 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1455 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1456 | + echo $globalAirportZoom; |
|
| 1457 | +} else { |
|
| 1458 | + echo '7'; |
|
| 1459 | +} |
|
| 1460 | +?>" /> |
|
| 1461 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1462 | + echo $globalAirportZoom; |
|
| 1463 | +} else { |
|
| 1464 | + echo '7'; |
|
| 1465 | +} |
|
| 1466 | +?></output> |
|
| 1120 | 1467 | </div> |
| 1121 | 1468 | </p> |
| 1122 | 1469 | <br /> |
| 1123 | 1470 | <p> |
| 1124 | 1471 | <label for="customcss">Custom CSS web path</label> |
| 1125 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1472 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1473 | + echo $globalCustomCSS; |
|
| 1474 | +} |
|
| 1475 | +?>" /> |
|
| 1126 | 1476 | </p> |
| 1127 | 1477 | </fieldset> |
| 1128 | 1478 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -1149,8 +1499,12 @@ discard block |
||
| 1149 | 1499 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 1150 | 1500 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 1151 | 1501 | |
| 1152 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1153 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1502 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1503 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1504 | + } |
|
| 1505 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1506 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1507 | + } |
|
| 1154 | 1508 | |
| 1155 | 1509 | $_SESSION['database_root'] = $dbroot; |
| 1156 | 1510 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -1218,15 +1572,23 @@ discard block |
||
| 1218 | 1572 | $source_city = $_POST['source_city']; |
| 1219 | 1573 | $source_country = $_POST['source_country']; |
| 1220 | 1574 | $source_ref = $_POST['source_ref']; |
| 1221 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 1222 | - else $source_id = array(); |
|
| 1575 | + if (isset($source_id)) { |
|
| 1576 | + $source_id = $_POST['source_id']; |
|
| 1577 | + } else { |
|
| 1578 | + $source_id = array(); |
|
| 1579 | + } |
|
| 1223 | 1580 | |
| 1224 | 1581 | $sources = array(); |
| 1225 | 1582 | foreach ($source_name as $keys => $name) { |
| 1226 | - 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]); |
|
| 1227 | - 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]); |
|
| 1583 | + if (isset($source_id[$keys])) { |
|
| 1584 | + $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]); |
|
| 1585 | + } else { |
|
| 1586 | + $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]); |
|
| 1587 | + } |
|
| 1588 | + } |
|
| 1589 | + if (count($sources) > 0) { |
|
| 1590 | + $_SESSION['sources'] = $sources; |
|
| 1228 | 1591 | } |
| 1229 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 1230 | 1592 | |
| 1231 | 1593 | $newsurl = $_POST['newsurl']; |
| 1232 | 1594 | $newslng = $_POST['newslang']; |
@@ -1239,7 +1601,9 @@ discard block |
||
| 1239 | 1601 | $lng = $newslng[$newskey]; |
| 1240 | 1602 | if (isset($newsfeeds[$type][$lng])) { |
| 1241 | 1603 | $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url)); |
| 1242 | - } else $newsfeeds[$type][$lng] = array($url); |
|
| 1604 | + } else { |
|
| 1605 | + $newsfeeds[$type][$lng] = array($url); |
|
| 1606 | + } |
|
| 1243 | 1607 | } |
| 1244 | 1608 | } |
| 1245 | 1609 | $settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds)); |
@@ -1263,17 +1627,29 @@ discard block |
||
| 1263 | 1627 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1264 | 1628 | |
| 1265 | 1629 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1266 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1267 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1630 | + if ($globalaircraft == 'aircraft') { |
|
| 1631 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1632 | + } else { |
|
| 1633 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1634 | + } |
|
| 1268 | 1635 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1269 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1270 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1636 | + if ($globaltracker == 'tracker') { |
|
| 1637 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1638 | + } else { |
|
| 1639 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1640 | + } |
|
| 1271 | 1641 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1272 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1273 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1642 | + if ($globalmarine == 'marine') { |
|
| 1643 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1644 | + } else { |
|
| 1645 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1646 | + } |
|
| 1274 | 1647 | $globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING); |
| 1275 | - if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1276 | - else $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1648 | + if ($globalsatellite == 'satellite') { |
|
| 1649 | + $settings = array_merge($settings,array('globalSatellite' => 'TRUE')); |
|
| 1650 | + } else { |
|
| 1651 | + $settings = array_merge($settings,array('globalSatellite' => 'FALSE')); |
|
| 1652 | + } |
|
| 1277 | 1653 | |
| 1278 | 1654 | /* |
| 1279 | 1655 | $globalSBS1Hosts = array(); |
@@ -1295,23 +1671,37 @@ discard block |
||
| 1295 | 1671 | $name = $_POST['name']; |
| 1296 | 1672 | $format = $_POST['format']; |
| 1297 | 1673 | $timezones = $_POST['timezones']; |
| 1298 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1299 | - else $sourcestats = array(); |
|
| 1300 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1301 | - else $noarchive = array(); |
|
| 1674 | + if (isset($_POST['sourcestats'])) { |
|
| 1675 | + $sourcestats = $_POST['sourcestats']; |
|
| 1676 | + } else { |
|
| 1677 | + $sourcestats = array(); |
|
| 1678 | + } |
|
| 1679 | + if (isset($_POST['noarchive'])) { |
|
| 1680 | + $noarchive = $_POST['noarchive']; |
|
| 1681 | + } else { |
|
| 1682 | + $noarchive = array(); |
|
| 1683 | + } |
|
| 1302 | 1684 | $gSources = array(); |
| 1303 | 1685 | $forcepilots = false; |
| 1304 | 1686 | foreach ($host as $key => $h) { |
| 1305 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1306 | - else $cov = 'FALSE'; |
|
| 1307 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1308 | - else $arch = 'FALSE'; |
|
| 1687 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1688 | + $cov = 'TRUE'; |
|
| 1689 | + } else { |
|
| 1690 | + $cov = 'FALSE'; |
|
| 1691 | + } |
|
| 1692 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1693 | + $arch = 'TRUE'; |
|
| 1694 | + } else { |
|
| 1695 | + $arch = 'FALSE'; |
|
| 1696 | + } |
|
| 1309 | 1697 | if (strpos($format[$key],'_callback')) { |
| 1310 | 1698 | $gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE'); |
| 1311 | 1699 | } elseif ($h != '' || $name[$key] != '') { |
| 1312 | 1700 | $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE'); |
| 1313 | 1701 | } |
| 1314 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1702 | + if ($format[$key] == 'airwhere') { |
|
| 1703 | + $forcepilots = true; |
|
| 1704 | + } |
|
| 1315 | 1705 | } |
| 1316 | 1706 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1317 | 1707 | |
@@ -1342,7 +1732,9 @@ discard block |
||
| 1342 | 1732 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1343 | 1733 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1344 | 1734 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1345 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1735 | + } else { |
|
| 1736 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1737 | + } |
|
| 1346 | 1738 | |
| 1347 | 1739 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1348 | 1740 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1383,7 +1775,9 @@ discard block |
||
| 1383 | 1775 | |
| 1384 | 1776 | // Create in settings.php keys not yet configurable if not already here |
| 1385 | 1777 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1386 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1778 | + if (!isset($globalDebug)) { |
|
| 1779 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1780 | + } |
|
| 1387 | 1781 | |
| 1388 | 1782 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1389 | 1783 | if ($resetyearstats == 'resetyearstats') { |
@@ -1426,37 +1820,56 @@ discard block |
||
| 1426 | 1820 | } |
| 1427 | 1821 | */ |
| 1428 | 1822 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1429 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1430 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1431 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1432 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1823 | + if ($globalsbs == 'sbs') { |
|
| 1824 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1825 | + } else { |
|
| 1826 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1827 | + } |
|
| 1828 | + if ($globalaprs == 'aprs') { |
|
| 1829 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1830 | + } else { |
|
| 1831 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1832 | + } |
|
| 1433 | 1833 | $va = false; |
| 1434 | 1834 | if ($globalivao == 'ivao') { |
| 1435 | 1835 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1436 | 1836 | $va = true; |
| 1437 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1837 | + } else { |
|
| 1838 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1839 | + } |
|
| 1438 | 1840 | if ($globalvatsim == 'vatsim') { |
| 1439 | 1841 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1440 | 1842 | $va = true; |
| 1441 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1843 | + } else { |
|
| 1844 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1845 | + } |
|
| 1442 | 1846 | if ($globalphpvms == 'phpvms') { |
| 1443 | 1847 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1444 | 1848 | $va = true; |
| 1445 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1849 | + } else { |
|
| 1850 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1851 | + } |
|
| 1446 | 1852 | if ($globalvam == 'vam') { |
| 1447 | 1853 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1448 | 1854 | $va = true; |
| 1449 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1855 | + } else { |
|
| 1856 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1857 | + } |
|
| 1450 | 1858 | if ($va) { |
| 1451 | 1859 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1452 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1860 | + } else { |
|
| 1861 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1862 | + } |
|
| 1453 | 1863 | if ($globalva == 'va' || $va) { |
| 1454 | 1864 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1455 | 1865 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1456 | 1866 | } else { |
| 1457 | 1867 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1458 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1459 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1868 | + if ($forcepilots) { |
|
| 1869 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1870 | + } else { |
|
| 1871 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1872 | + } |
|
| 1460 | 1873 | } |
| 1461 | 1874 | |
| 1462 | 1875 | |
@@ -1679,7 +2092,9 @@ discard block |
||
| 1679 | 2092 | $graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING); |
| 1680 | 2093 | $settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper)); |
| 1681 | 2094 | |
| 1682 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2095 | + if (!isset($globalTransaction)) { |
|
| 2096 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 2097 | + } |
|
| 1683 | 2098 | |
| 1684 | 2099 | // Set some defaults values... |
| 1685 | 2100 | if (!isset($globalAircraftImageSources)) { |
@@ -1694,15 +2109,23 @@ discard block |
||
| 1694 | 2109 | |
| 1695 | 2110 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1696 | 2111 | |
| 1697 | - if ($error == '') settings::modify_settings($settings); |
|
| 1698 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 2112 | + if ($error == '') { |
|
| 2113 | + settings::modify_settings($settings); |
|
| 2114 | + } |
|
| 2115 | + if ($error == '') { |
|
| 2116 | + settings::comment_settings($settings_comment); |
|
| 2117 | + } |
|
| 1699 | 2118 | if ($error != '') { |
| 1700 | 2119 | print '<div class="info column">'.$error.'</div>'; |
| 1701 | 2120 | require('../footer.php'); |
| 1702 | 2121 | exit; |
| 1703 | 2122 | } else { |
| 1704 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1705 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 2123 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 2124 | + $_SESSION['waypoints'] = 1; |
|
| 2125 | + } |
|
| 2126 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 2127 | + $_SESSION['owner'] = 1; |
|
| 2128 | + } |
|
| 1706 | 2129 | if (isset($_POST['createdb'])) { |
| 1707 | 2130 | $_SESSION['install'] = 'database_create'; |
| 1708 | 2131 | } else { |
@@ -1739,10 +2162,18 @@ discard block |
||
| 1739 | 2162 | $popw = false; |
| 1740 | 2163 | foreach ($_SESSION['done'] as $done) { |
| 1741 | 2164 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1742 | - if ($done == 'Create database') $pop = true; |
|
| 1743 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1744 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1745 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 2165 | + if ($done == 'Create database') { |
|
| 2166 | + $pop = true; |
|
| 2167 | + } |
|
| 2168 | + if ($_SESSION['install'] == 'database_create') { |
|
| 2169 | + $pop = true; |
|
| 2170 | + } |
|
| 2171 | + if ($_SESSION['install'] == 'database_import') { |
|
| 2172 | + $popi = true; |
|
| 2173 | + } |
|
| 2174 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 2175 | + $popw = true; |
|
| 2176 | + } |
|
| 1746 | 2177 | } |
| 1747 | 2178 | if ($pop) { |
| 1748 | 2179 | sleep(5); |
@@ -1753,7 +2184,9 @@ discard block |
||
| 1753 | 2184 | } else if ($popw) { |
| 1754 | 2185 | sleep(5); |
| 1755 | 2186 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1756 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2187 | + } else { |
|
| 2188 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 2189 | + } |
|
| 1757 | 2190 | print '</div></ul>'; |
| 1758 | 2191 | print '<div id="error"></div>'; |
| 1759 | 2192 | /* foreach ($_SESSION['done'] as $done) { |