@@ -131,45 +131,72 @@ discard block |
||
| 131 | 131 | </div> |
| 132 | 132 | <p> |
| 133 | 133 | <label for="dbhost">Database hostname</label> |
| 134 | - <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" /> |
|
| 134 | + <input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) { |
|
| 135 | + print $globalDBhost; |
|
| 136 | +} |
|
| 137 | +?>" /> |
|
| 135 | 138 | </p> |
| 136 | 139 | <p> |
| 137 | 140 | <label for="dbport">Database port</label> |
| 138 | - <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" /> |
|
| 141 | + <input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) { |
|
| 142 | + print $globalDBport; |
|
| 143 | +} |
|
| 144 | +?>" /> |
|
| 139 | 145 | <p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p> |
| 140 | 146 | </p> |
| 141 | 147 | <p> |
| 142 | 148 | <label for="dbname">Database name</label> |
| 143 | - <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" /> |
|
| 149 | + <input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) { |
|
| 150 | + print $globalDBname; |
|
| 151 | +} |
|
| 152 | +?>" /> |
|
| 144 | 153 | </p> |
| 145 | 154 | <p> |
| 146 | 155 | <label for="dbuser">Database user</label> |
| 147 | - <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" /> |
|
| 156 | + <input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) { |
|
| 157 | + print $globalDBuser; |
|
| 158 | +} |
|
| 159 | +?>" /> |
|
| 148 | 160 | </p> |
| 149 | 161 | <p> |
| 150 | 162 | <label for="dbuserpass">Database user password</label> |
| 151 | - <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" /> |
|
| 163 | + <input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) { |
|
| 164 | + print $globalDBpass; |
|
| 165 | +} |
|
| 166 | +?>" /> |
|
| 152 | 167 | </p> |
| 153 | 168 | </fieldset> |
| 154 | 169 | <fieldset id="site"> |
| 155 | 170 | <legend>Site configuration</legend> |
| 156 | 171 | <p> |
| 157 | 172 | <label for="sitename">Site name</label> |
| 158 | - <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" /> |
|
| 173 | + <input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) { |
|
| 174 | + print $globalName; |
|
| 175 | +} |
|
| 176 | +?>" /> |
|
| 159 | 177 | </p> |
| 160 | 178 | <p> |
| 161 | 179 | <label for="siteurl">Site directory</label> |
| 162 | - <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" /> |
|
| 180 | + <input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) { |
|
| 181 | + print $globalURL; |
|
| 182 | +} |
|
| 183 | +?>" /> |
|
| 163 | 184 | <p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p> |
| 164 | 185 | </p> |
| 165 | 186 | <p> |
| 166 | 187 | <label for="timezone">Timezone</label> |
| 167 | - <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" /> |
|
| 188 | + <input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) { |
|
| 189 | + print $globalTimezone; |
|
| 190 | +} |
|
| 191 | +?>" /> |
|
| 168 | 192 | <p class="help-block">ex : UTC, Europe/Paris,...</p> |
| 169 | 193 | </p> |
| 170 | 194 | <p> |
| 171 | 195 | <label for="language">Language</label> |
| 172 | - <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" /> |
|
| 196 | + <input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) { |
|
| 197 | + print $globalLanguage; |
|
| 198 | +} |
|
| 199 | +?>" /> |
|
| 173 | 200 | <p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p> |
| 174 | 201 | </p> |
| 175 | 202 | </fieldset> |
@@ -190,11 +217,17 @@ discard block |
||
| 190 | 217 | <div id="mapbox_data"> |
| 191 | 218 | <p> |
| 192 | 219 | <label for="mapboxid">Mapbox id</label> |
| 193 | - <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" /> |
|
| 220 | + <input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) { |
|
| 221 | + print $globalMapboxId; |
|
| 222 | +} |
|
| 223 | +?>" /> |
|
| 194 | 224 | </p> |
| 195 | 225 | <p> |
| 196 | 226 | <label for="mapboxtoken">Mapbox token</label> |
| 197 | - <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" /> |
|
| 227 | + <input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) { |
|
| 228 | + print $globalMapboxToken; |
|
| 229 | +} |
|
| 230 | +?>" /> |
|
| 198 | 231 | </p> |
| 199 | 232 | <p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p> |
| 200 | 233 | </div> |
@@ -202,7 +235,10 @@ discard block |
||
| 202 | 235 | <div id="google_data"> |
| 203 | 236 | <p> |
| 204 | 237 | <label for="googlekey">Google API key</label> |
| 205 | - <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" /> |
|
| 238 | + <input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) { |
|
| 239 | + print $globalGoogleAPIKey; |
|
| 240 | +} |
|
| 241 | +?>" /> |
|
| 206 | 242 | <p class="help-block">Get a key <a href="https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key">here</a></p> |
| 207 | 243 | </p> |
| 208 | 244 | </div> |
@@ -210,7 +246,10 @@ discard block |
||
| 210 | 246 | <div id="bing_data"> |
| 211 | 247 | <p> |
| 212 | 248 | <label for="bingkey">Bing Map key</label> |
| 213 | - <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" /> |
|
| 249 | + <input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) { |
|
| 250 | + print $globalBingMapKey; |
|
| 251 | +} |
|
| 252 | +?>" /> |
|
| 214 | 253 | <p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p> |
| 215 | 254 | </p> |
| 216 | 255 | </div> |
@@ -218,7 +257,10 @@ discard block |
||
| 218 | 257 | <div id="mapquest_data"> |
| 219 | 258 | <p> |
| 220 | 259 | <label for="mapquestkey">MapQuest key</label> |
| 221 | - <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" /> |
|
| 260 | + <input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) { |
|
| 261 | + print $globalMapQuestKey; |
|
| 262 | +} |
|
| 263 | +?>" /> |
|
| 222 | 264 | <p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p> |
| 223 | 265 | </p> |
| 224 | 266 | </div> |
@@ -226,11 +268,17 @@ discard block |
||
| 226 | 268 | <div id="here_data"> |
| 227 | 269 | <p> |
| 228 | 270 | <label for="hereappid">Here App_Id</label> |
| 229 | - <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" /> |
|
| 271 | + <input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) { |
|
| 272 | + print $globalHereappId; |
|
| 273 | +} |
|
| 274 | +?>" /> |
|
| 230 | 275 | </p> |
| 231 | 276 | <p> |
| 232 | 277 | <label for="hereappcode">Here App_Code</label> |
| 233 | - <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" /> |
|
| 278 | + <input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) { |
|
| 279 | + print $globalHereappCode; |
|
| 280 | +} |
|
| 281 | +?>" /> |
|
| 234 | 282 | </p> |
| 235 | 283 | <p class="help-block">Get a key <a href="https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html">here</a></p> |
| 236 | 284 | </div> |
@@ -238,7 +286,10 @@ discard block |
||
| 238 | 286 | <div id="openweathermap_data"> |
| 239 | 287 | <p> |
| 240 | 288 | <label for="openweathermapkey">OpenWeatherMap key (weather layer)</label> |
| 241 | - <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" /> |
|
| 289 | + <input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) { |
|
| 290 | + print $globalOpenWeatherMapKey; |
|
| 291 | +} |
|
| 292 | +?>" /> |
|
| 242 | 293 | <p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p> |
| 243 | 294 | </p> |
| 244 | 295 | </div> |
@@ -248,42 +299,86 @@ discard block |
||
| 248 | 299 | <legend>Coverage area</legend> |
| 249 | 300 | <p> |
| 250 | 301 | <label for="latitudemax">The maximum latitude (north)</label> |
| 251 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
| 302 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
| 303 | + print $globalLatitudeMax; |
|
| 304 | +} |
|
| 305 | +?>" /> |
|
| 252 | 306 | </p> |
| 253 | 307 | <p> |
| 254 | 308 | <label for="latitudemin">The minimum latitude (south)</label> |
| 255 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
| 309 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
| 310 | + print $globalLatitudeMin; |
|
| 311 | +} |
|
| 312 | +?>" /> |
|
| 256 | 313 | </p> |
| 257 | 314 | <p> |
| 258 | 315 | <label for="longitudemax">The maximum longitude (west)</label> |
| 259 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
| 316 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
| 317 | + print $globalLongitudeMax; |
|
| 318 | +} |
|
| 319 | +?>" /> |
|
| 260 | 320 | </p> |
| 261 | 321 | <p> |
| 262 | 322 | <label for="longitudemin">The minimum longitude (east)</label> |
| 263 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
| 323 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
| 324 | + print $globalLongitudeMin; |
|
| 325 | +} |
|
| 326 | +?>" /> |
|
| 264 | 327 | </p> |
| 265 | 328 | <p> |
| 266 | 329 | <label for="latitudecenter">The latitude center</label> |
| 267 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
| 330 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
| 331 | + print $globalCenterLatitude; |
|
| 332 | +} |
|
| 333 | +?>" /> |
|
| 268 | 334 | </p> |
| 269 | 335 | <p> |
| 270 | 336 | <label for="longitudecenter">The longitude center</label> |
| 271 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
| 337 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
| 338 | + print $globalCenterLongitude; |
|
| 339 | +} |
|
| 340 | +?>" /> |
|
| 272 | 341 | </p> |
| 273 | 342 | <p> |
| 274 | 343 | <label for="livezoom">Default Zoom on live map</label> |
| 275 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
| 344 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
| 345 | + print $globalLiveZoom; |
|
| 346 | +} else { |
|
| 347 | + print '9'; |
|
| 348 | +} |
|
| 349 | +?>" /> |
|
| 276 | 350 | </p> |
| 277 | 351 | <p> |
| 278 | 352 | <label for="squawk_country">Country for squawk usage</label> |
| 279 | 353 | <select name="squawk_country" id="squawk_country"> |
| 280 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
| 281 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
| 282 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
| 283 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
| 284 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
| 285 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
| 286 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
| 354 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
| 355 | + print ' selected '; |
|
| 356 | +} |
|
| 357 | +?>>UK</option> |
|
| 358 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
| 359 | + print ' selected '; |
|
| 360 | +} |
|
| 361 | +?>>NZ</option> |
|
| 362 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
| 363 | + print ' selected '; |
|
| 364 | +} |
|
| 365 | +?>>US</option> |
|
| 366 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
| 367 | + print ' selected '; |
|
| 368 | +} |
|
| 369 | +?>>AU</option> |
|
| 370 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
| 371 | + print ' selected '; |
|
| 372 | +} |
|
| 373 | +?>>NL</option> |
|
| 374 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
| 375 | + print ' selected '; |
|
| 376 | +} |
|
| 377 | +?>>FR</option> |
|
| 378 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
| 379 | + print ' selected '; |
|
| 380 | +} |
|
| 381 | +?>>TR</option> |
|
| 287 | 382 | </select> |
| 288 | 383 | </p> |
| 289 | 384 | </fieldset> |
@@ -292,15 +387,24 @@ discard block |
||
| 292 | 387 | <p><i>Only put in DB flights that are inside a circle</i></p> |
| 293 | 388 | <p> |
| 294 | 389 | <label for="latitude">Center latitude</label> |
| 295 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
| 390 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
| 391 | + echo $globalDistanceIgnore['latitude']; |
|
| 392 | +} |
|
| 393 | +?>" /> |
|
| 296 | 394 | </p> |
| 297 | 395 | <p> |
| 298 | 396 | <label for="longitude">Center longitude</label> |
| 299 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
| 397 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
| 398 | + echo $globalDistanceIgnore['longitude']; |
|
| 399 | +} |
|
| 400 | +?>" /> |
|
| 300 | 401 | </p> |
| 301 | 402 | <p> |
| 302 | 403 | <label for="Distance">Distance (in km)</label> |
| 303 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
| 404 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
| 405 | + echo $globalDistanceIgnore['distance']; |
|
| 406 | +} |
|
| 407 | +?>" /> |
|
| 304 | 408 | </p> |
| 305 | 409 | </fieldset> |
| 306 | 410 | <fieldset id="sourceloc"> |
@@ -409,11 +513,17 @@ discard block |
||
| 409 | 513 | <div id="flightaware_data"> |
| 410 | 514 | <p> |
| 411 | 515 | <label for="flightawareusername">FlightAware username</label> |
| 412 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
| 516 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
| 517 | + print $globalFlightAwareUsername; |
|
| 518 | +} |
|
| 519 | +?>" /> |
|
| 413 | 520 | </p> |
| 414 | 521 | <p> |
| 415 | 522 | <label for="flightawarepassword">FlightAware password/API key</label> |
| 416 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
| 523 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
| 524 | + print $globalFlightAwarePassword; |
|
| 525 | +} |
|
| 526 | +?>" /> |
|
| 417 | 527 | </p> |
| 418 | 528 | </div> |
| 419 | 529 | --> |
@@ -455,7 +565,10 @@ discard block |
||
| 455 | 565 | if (filter_var($source['host'],FILTER_VALIDATE_URL)) { |
| 456 | 566 | ?> |
| 457 | 567 | <td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td> |
| 458 | - <td><input type="number" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td> |
|
| 568 | + <td><input type="number" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) { |
|
| 569 | + print $source['port']; |
|
| 570 | +} |
|
| 571 | +?>" /></td> |
|
| 459 | 572 | <?php |
| 460 | 573 | } else { |
| 461 | 574 | $hostport = explode(':',$source['host']); |
@@ -474,31 +587,94 @@ discard block |
||
| 474 | 587 | ?> |
| 475 | 588 | <td> |
| 476 | 589 | <select name="format[]" id="format"> |
| 477 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
| 478 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
| 479 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
| 480 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
| 481 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
| 482 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
| 483 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
| 484 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
| 485 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
| 486 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
| 487 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
| 488 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
| 489 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
| 490 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
| 491 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 492 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
| 493 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
| 494 | - <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option> |
|
| 590 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
| 591 | + print 'selected'; |
|
| 592 | +} |
|
| 593 | +?>>Auto</option> |
|
| 594 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
| 595 | + print 'selected'; |
|
| 596 | +} |
|
| 597 | +?>>SBS</option> |
|
| 598 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
| 599 | + print 'selected'; |
|
| 600 | +} |
|
| 601 | +?>>TSV</option> |
|
| 602 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
| 603 | + print 'selected'; |
|
| 604 | +} |
|
| 605 | +?>>Raw</option> |
|
| 606 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
| 607 | + print 'selected'; |
|
| 608 | +} |
|
| 609 | +?>>APRS</option> |
|
| 610 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
| 611 | + print 'selected'; |
|
| 612 | +} |
|
| 613 | +?>>Radarcape deltadb.txt</option> |
|
| 614 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
| 615 | + print 'selected'; |
|
| 616 | +} |
|
| 617 | +?>>Vatsim</option> |
|
| 618 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
| 619 | + print 'selected'; |
|
| 620 | +} |
|
| 621 | +?>>Virtual Radar Server AircraftList.json</option> |
|
| 622 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
| 623 | + print 'selected'; |
|
| 624 | +} |
|
| 625 | +?>>Virtual Radar Server TCP</option> |
|
| 626 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
| 627 | + print 'selected'; |
|
| 628 | +} |
|
| 629 | +?>>phpVMS</option> |
|
| 630 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
| 631 | + print 'selected'; |
|
| 632 | +} |
|
| 633 | +?>>Virtual Airlines Manager</option> |
|
| 634 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
| 635 | + print 'selected'; |
|
| 636 | +} |
|
| 637 | +?>>IVAO</option> |
|
| 638 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
| 639 | + print 'selected'; |
|
| 640 | +} |
|
| 641 | +?>>FlightGear Multiplayer</option> |
|
| 642 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
| 643 | + print 'selected'; |
|
| 644 | +} |
|
| 645 | +?>>FlightGear Singleplayer</option> |
|
| 646 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
| 647 | + print 'selected'; |
|
| 648 | +} |
|
| 649 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
| 650 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
| 651 | + print 'selected'; |
|
| 652 | +} |
|
| 653 | +?>>ACARS SBS-3 over TCP</option> |
|
| 654 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
| 655 | + print 'selected'; |
|
| 656 | +} |
|
| 657 | +?>>NMEA AIS over TCP</option> |
|
| 658 | + <option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') { |
|
| 659 | + print 'selected'; |
|
| 660 | +} |
|
| 661 | +?>>AirWhere website</option> |
|
| 495 | 662 | </select> |
| 496 | 663 | </td> |
| 497 | 664 | <td> |
| 498 | - <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /> |
|
| 665 | + <input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
| 666 | + print $source['name']; |
|
| 667 | +} |
|
| 668 | +?>" /> |
|
| 499 | 669 | </td> |
| 500 | - <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> |
|
| 501 | - <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> |
|
| 670 | + <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']) { |
|
| 671 | + print 'checked'; |
|
| 672 | +} |
|
| 673 | +?> /></td> |
|
| 674 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
| 675 | + print 'checked'; |
|
| 676 | +} |
|
| 677 | +?> /></td> |
|
| 502 | 678 | <td> |
| 503 | 679 | <select name="timezone[]" id="timezone"> |
| 504 | 680 | <?php |
@@ -508,7 +684,9 @@ discard block |
||
| 508 | 684 | print '<option selected>'.$timezone.'</option>'; |
| 509 | 685 | } elseif (!isset($source['timezone']) && $timezone == 'UTC') { |
| 510 | 686 | print '<option selected>'.$timezone.'</option>'; |
| 511 | - } else print '<option>'.$timezone.'</option>'; |
|
| 687 | + } else { |
|
| 688 | + print '<option>'.$timezone.'</option>'; |
|
| 689 | + } |
|
| 512 | 690 | } |
| 513 | 691 | ?> |
| 514 | 692 | </select> |
@@ -556,7 +734,9 @@ discard block |
||
| 556 | 734 | foreach($timezonelist as $timezone){ |
| 557 | 735 | if ($timezone == 'UTC') { |
| 558 | 736 | print '<option selected>'.$timezone.'</option>'; |
| 559 | - } else print '<option>'.$timezone.'</option>'; |
|
| 737 | + } else { |
|
| 738 | + print '<option>'.$timezone.'</option>'; |
|
| 739 | + } |
|
| 560 | 740 | } |
| 561 | 741 | ?> |
| 562 | 742 | </select> |
@@ -576,11 +756,17 @@ discard block |
||
| 576 | 756 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
| 577 | 757 | <p> |
| 578 | 758 | <label for="acarshost">ACARS UDP host</label> |
| 579 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
| 759 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
| 760 | + print $globalACARSHost; |
|
| 761 | +} |
|
| 762 | +?>" /> |
|
| 580 | 763 | </p> |
| 581 | 764 | <p> |
| 582 | 765 | <label for="acarsport">ACARS UDP port</label> |
| 583 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
| 766 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
| 767 | + print $globalACARSPort; |
|
| 768 | +} |
|
| 769 | +?>" /> |
|
| 584 | 770 | </p> |
| 585 | 771 | </fieldset> |
| 586 | 772 | </div> |
@@ -660,13 +846,19 @@ discard block |
||
| 660 | 846 | <div id="schedules_options"> |
| 661 | 847 | <p> |
| 662 | 848 | <label for="britishairways">British Airways API Key</label> |
| 663 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
| 849 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
| 850 | + print $globalBritishAirwaysKey; |
|
| 851 | +} |
|
| 852 | +?>" /> |
|
| 664 | 853 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
| 665 | 854 | </p> |
| 666 | 855 | <!-- |
| 667 | 856 | <p> |
| 668 | 857 | <label for="transavia">Transavia Test API Consumer Key</label> |
| 669 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
| 858 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
| 859 | + print $globalTransaviaKey; |
|
| 860 | +} |
|
| 861 | +?>" /> |
|
| 670 | 862 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
| 671 | 863 | </p> |
| 672 | 864 | --> |
@@ -675,10 +867,16 @@ discard block |
||
| 675 | 867 | <b>Lufthansa API Key</b> |
| 676 | 868 | <p> |
| 677 | 869 | <label for="lufthansakey">Key</label> |
| 678 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
| 870 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
| 871 | + print $globalLufthansaKey['key']; |
|
| 872 | +} |
|
| 873 | +?>" /> |
|
| 679 | 874 | </p><p> |
| 680 | 875 | <label for="lufthansasecret">Secret</label> |
| 681 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
| 876 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
| 877 | + print $globalLufthansaKey['secret']; |
|
| 878 | +} |
|
| 879 | +?>" /> |
|
| 682 | 880 | </p> |
| 683 | 881 | </div> |
| 684 | 882 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -698,7 +896,10 @@ discard block |
||
| 698 | 896 | </p> |
| 699 | 897 | <p> |
| 700 | 898 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
| 701 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
| 899 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
| 900 | + print $globalNOTAMSource; |
|
| 901 | +} |
|
| 902 | +?>" /> |
|
| 702 | 903 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
| 703 | 904 | </p> |
| 704 | 905 | <br /> |
@@ -714,14 +915,20 @@ discard block |
||
| 714 | 915 | <div id="metarsrc"> |
| 715 | 916 | <p> |
| 716 | 917 | <label for="metarsource">URL of your METAR source</label> |
| 717 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
| 918 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
| 919 | + print $globalMETARurl; |
|
| 920 | +} |
|
| 921 | +?>" /> |
|
| 718 | 922 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
| 719 | 923 | </p> |
| 720 | 924 | </div> |
| 721 | 925 | <br /> |
| 722 | 926 | <p> |
| 723 | 927 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
| 724 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
| 928 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
| 929 | + print $globalBitlyAccessToken; |
|
| 930 | +} |
|
| 931 | +?>" /> |
|
| 725 | 932 | </p> |
| 726 | 933 | <br /> |
| 727 | 934 | <p> |
@@ -741,7 +948,12 @@ discard block |
||
| 741 | 948 | </p> |
| 742 | 949 | <p> |
| 743 | 950 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
| 744 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
| 951 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
| 952 | + print $globalArchiveMonths; |
|
| 953 | +} else { |
|
| 954 | + echo '0'; |
|
| 955 | +} |
|
| 956 | +?>" /> |
|
| 745 | 957 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
| 746 | 958 | </p> |
| 747 | 959 | <p> |
@@ -751,12 +963,22 @@ discard block |
||
| 751 | 963 | </p> |
| 752 | 964 | <p> |
| 753 | 965 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
| 754 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
| 966 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
| 967 | + print $globalArchiveKeepMonths; |
|
| 968 | +} else { |
|
| 969 | + echo '0'; |
|
| 970 | +} |
|
| 971 | +?>" /> |
|
| 755 | 972 | <p class="help-block">0 to disable</p> |
| 756 | 973 | </p> |
| 757 | 974 | <p> |
| 758 | 975 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
| 759 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
| 976 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
| 977 | + print $globalArchiveKeepTrackMonths; |
|
| 978 | +} else { |
|
| 979 | + echo '0'; |
|
| 980 | +} |
|
| 981 | +?>" /> |
|
| 760 | 982 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
| 761 | 983 | </p> |
| 762 | 984 | <br /> |
@@ -766,7 +988,12 @@ discard block |
||
| 766 | 988 | <p class="help-block">Uncheck if the script is running as cron job</p> |
| 767 | 989 | <div id="cronends"> |
| 768 | 990 | <label for="cronend">Run script for xx seconds</label> |
| 769 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
| 991 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
| 992 | + print $globalCronEnd; |
|
| 993 | +} else { |
|
| 994 | + print '0'; |
|
| 995 | +} |
|
| 996 | +?>" /> |
|
| 770 | 997 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
| 771 | 998 | </div> |
| 772 | 999 | </p> |
@@ -819,15 +1046,30 @@ discard block |
||
| 819 | 1046 | <br /> |
| 820 | 1047 | <p> |
| 821 | 1048 | <label for="refresh">Show flights detected since xxx seconds</label> |
| 822 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
| 1049 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
| 1050 | + echo $globalLiveInterval; |
|
| 1051 | +} else { |
|
| 1052 | + echo '200'; |
|
| 1053 | +} |
|
| 1054 | +?>" /> |
|
| 823 | 1055 | </p> |
| 824 | 1056 | <p> |
| 825 | 1057 | <label for="maprefresh">Live map refresh (in seconds)</label> |
| 826 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
| 1058 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
| 1059 | + echo $globalMapRefresh; |
|
| 1060 | +} else { |
|
| 1061 | + echo '30'; |
|
| 1062 | +} |
|
| 1063 | +?>" /> |
|
| 827 | 1064 | </p> |
| 828 | 1065 | <p> |
| 829 | 1066 | <label for="mapidle">Map idle timeout (in minutes)</label> |
| 830 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
| 1067 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
| 1068 | + echo $globalMapIdleTimeout; |
|
| 1069 | +} else { |
|
| 1070 | + echo '30'; |
|
| 1071 | +} |
|
| 1072 | +?>" /> |
|
| 831 | 1073 | <p class="help-block">0 to disable</p> |
| 832 | 1074 | </p> |
| 833 | 1075 | <p> |
@@ -842,12 +1084,20 @@ discard block |
||
| 842 | 1084 | <br /> |
| 843 | 1085 | <p> |
| 844 | 1086 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
| 845 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
| 1087 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
| 1088 | + echo $globalClosestMinDist; |
|
| 1089 | +} else { |
|
| 1090 | + echo '50'; |
|
| 1091 | +} |
|
| 1092 | +?>" /> |
|
| 846 | 1093 | </p> |
| 847 | 1094 | <br /> |
| 848 | 1095 | <p> |
| 849 | 1096 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
| 850 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
| 1097 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
| 1098 | + echo $globalAircraftSize; |
|
| 1099 | +} |
|
| 1100 | +?>" /> |
|
| 851 | 1101 | </p> |
| 852 | 1102 | <br /> |
| 853 | 1103 | <p> |
@@ -860,7 +1110,12 @@ discard block |
||
| 860 | 1110 | if (extension_loaded('gd') && function_exists('gd_info')) { |
| 861 | 1111 | ?> |
| 862 | 1112 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
| 863 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
| 1113 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
| 1114 | + echo $globalAircraftIconColor; |
|
| 1115 | +} else { |
|
| 1116 | + echo '1a3151'; |
|
| 1117 | +} |
|
| 1118 | +?>" /> |
|
| 864 | 1119 | <?php |
| 865 | 1120 | if (!is_writable('../cache')) { |
| 866 | 1121 | ?> |
@@ -878,14 +1133,27 @@ discard block |
||
| 878 | 1133 | <p> |
| 879 | 1134 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
| 880 | 1135 | <div class="range"> |
| 881 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
| 882 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
| 1136 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
| 1137 | + echo $globalAirportZoom; |
|
| 1138 | +} else { |
|
| 1139 | + echo '7'; |
|
| 1140 | +} |
|
| 1141 | +?>" /> |
|
| 1142 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
| 1143 | + echo $globalAirportZoom; |
|
| 1144 | +} else { |
|
| 1145 | + echo '7'; |
|
| 1146 | +} |
|
| 1147 | +?></output> |
|
| 883 | 1148 | </div> |
| 884 | 1149 | </p> |
| 885 | 1150 | <br /> |
| 886 | 1151 | <p> |
| 887 | 1152 | <label for="customcss">Custom CSS web path</label> |
| 888 | - <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" /> |
|
| 1153 | + <input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) { |
|
| 1154 | + echo $globalCustomCSS; |
|
| 1155 | +} |
|
| 1156 | +?>" /> |
|
| 889 | 1157 | </p> |
| 890 | 1158 | </fieldset> |
| 891 | 1159 | <input type="submit" name="submit" value="Create/Update database & write setup" /> |
@@ -912,8 +1180,12 @@ discard block |
||
| 912 | 1180 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
| 913 | 1181 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
| 914 | 1182 | |
| 915 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
| 916 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1183 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
| 1184 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
| 1185 | + } |
|
| 1186 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
| 1187 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
| 1188 | + } |
|
| 917 | 1189 | |
| 918 | 1190 | $_SESSION['database_root'] = $dbroot; |
| 919 | 1191 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -981,15 +1253,23 @@ discard block |
||
| 981 | 1253 | $source_city = $_POST['source_city']; |
| 982 | 1254 | $source_country = $_POST['source_country']; |
| 983 | 1255 | $source_ref = $_POST['source_ref']; |
| 984 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
| 985 | - else $source_id = array(); |
|
| 1256 | + if (isset($source_id)) { |
|
| 1257 | + $source_id = $_POST['source_id']; |
|
| 1258 | + } else { |
|
| 1259 | + $source_id = array(); |
|
| 1260 | + } |
|
| 986 | 1261 | |
| 987 | 1262 | $sources = array(); |
| 988 | 1263 | foreach ($source_name as $keys => $name) { |
| 989 | - 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]); |
|
| 990 | - 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]); |
|
| 1264 | + if (isset($source_id[$keys])) { |
|
| 1265 | + $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]); |
|
| 1266 | + } else { |
|
| 1267 | + $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]); |
|
| 1268 | + } |
|
| 1269 | + } |
|
| 1270 | + if (count($sources) > 0) { |
|
| 1271 | + $_SESSION['sources'] = $sources; |
|
| 991 | 1272 | } |
| 992 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
| 993 | 1273 | |
| 994 | 1274 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
| 995 | 1275 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -1010,14 +1290,23 @@ discard block |
||
| 1010 | 1290 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
| 1011 | 1291 | |
| 1012 | 1292 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
| 1013 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1014 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1293 | + if ($globalaircraft == 'aircraft') { |
|
| 1294 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
| 1295 | + } else { |
|
| 1296 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
| 1297 | + } |
|
| 1015 | 1298 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
| 1016 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1017 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1299 | + if ($globaltracker == 'tracker') { |
|
| 1300 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
| 1301 | + } else { |
|
| 1302 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
| 1303 | + } |
|
| 1018 | 1304 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
| 1019 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1020 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1305 | + if ($globalmarine == 'marine') { |
|
| 1306 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
| 1307 | + } else { |
|
| 1308 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
| 1309 | + } |
|
| 1021 | 1310 | |
| 1022 | 1311 | /* |
| 1023 | 1312 | $globalSBS1Hosts = array(); |
@@ -1039,19 +1328,35 @@ discard block |
||
| 1039 | 1328 | $name = $_POST['name']; |
| 1040 | 1329 | $format = $_POST['format']; |
| 1041 | 1330 | $timezone = $_POST['timezone']; |
| 1042 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
| 1043 | - else $sourcestats = array(); |
|
| 1044 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
| 1045 | - else $noarchive = array(); |
|
| 1331 | + if (isset($_POST['sourcestats'])) { |
|
| 1332 | + $sourcestats = $_POST['sourcestats']; |
|
| 1333 | + } else { |
|
| 1334 | + $sourcestats = array(); |
|
| 1335 | + } |
|
| 1336 | + if (isset($_POST['noarchive'])) { |
|
| 1337 | + $noarchive = $_POST['noarchive']; |
|
| 1338 | + } else { |
|
| 1339 | + $noarchive = array(); |
|
| 1340 | + } |
|
| 1046 | 1341 | $gSources = array(); |
| 1047 | 1342 | $forcepilots = false; |
| 1048 | 1343 | foreach ($host as $key => $h) { |
| 1049 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
| 1050 | - else $cov = 'FALSE'; |
|
| 1051 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
| 1052 | - else $arch = 'FALSE'; |
|
| 1053 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezone[$key]); |
|
| 1054 | - if ($format[$key] == 'airwhere') $forcepilots = true; |
|
| 1344 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
| 1345 | + $cov = 'TRUE'; |
|
| 1346 | + } else { |
|
| 1347 | + $cov = 'FALSE'; |
|
| 1348 | + } |
|
| 1349 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
| 1350 | + $arch = 'TRUE'; |
|
| 1351 | + } else { |
|
| 1352 | + $arch = 'FALSE'; |
|
| 1353 | + } |
|
| 1354 | + if ($h != '') { |
|
| 1355 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezone[$key]); |
|
| 1356 | + } |
|
| 1357 | + if ($format[$key] == 'airwhere') { |
|
| 1358 | + $forcepilots = true; |
|
| 1359 | + } |
|
| 1055 | 1360 | } |
| 1056 | 1361 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
| 1057 | 1362 | |
@@ -1079,7 +1384,9 @@ discard block |
||
| 1079 | 1384 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
| 1080 | 1385 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
| 1081 | 1386 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
| 1082 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1387 | + } else { |
|
| 1388 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
| 1389 | + } |
|
| 1083 | 1390 | |
| 1084 | 1391 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
| 1085 | 1392 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1118,7 +1425,9 @@ discard block |
||
| 1118 | 1425 | |
| 1119 | 1426 | // Create in settings.php keys not yet configurable if not already here |
| 1120 | 1427 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
| 1121 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1428 | + if (!isset($globalDebug)) { |
|
| 1429 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
| 1430 | + } |
|
| 1122 | 1431 | |
| 1123 | 1432 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
| 1124 | 1433 | if ($resetyearstats == 'resetyearstats') { |
@@ -1155,37 +1464,56 @@ discard block |
||
| 1155 | 1464 | } |
| 1156 | 1465 | */ |
| 1157 | 1466 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
| 1158 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1159 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1160 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1161 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1467 | + if ($globalsbs == 'sbs') { |
|
| 1468 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
| 1469 | + } else { |
|
| 1470 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
| 1471 | + } |
|
| 1472 | + if ($globalaprs == 'aprs') { |
|
| 1473 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
| 1474 | + } else { |
|
| 1475 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
| 1476 | + } |
|
| 1162 | 1477 | $va = false; |
| 1163 | 1478 | if ($globalivao == 'ivao') { |
| 1164 | 1479 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
| 1165 | 1480 | $va = true; |
| 1166 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1481 | + } else { |
|
| 1482 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
| 1483 | + } |
|
| 1167 | 1484 | if ($globalvatsim == 'vatsim') { |
| 1168 | 1485 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
| 1169 | 1486 | $va = true; |
| 1170 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1487 | + } else { |
|
| 1488 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
| 1489 | + } |
|
| 1171 | 1490 | if ($globalphpvms == 'phpvms') { |
| 1172 | 1491 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
| 1173 | 1492 | $va = true; |
| 1174 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1493 | + } else { |
|
| 1494 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
| 1495 | + } |
|
| 1175 | 1496 | if ($globalvam == 'vam') { |
| 1176 | 1497 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
| 1177 | 1498 | $va = true; |
| 1178 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1499 | + } else { |
|
| 1500 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
| 1501 | + } |
|
| 1179 | 1502 | if ($va) { |
| 1180 | 1503 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
| 1181 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1504 | + } else { |
|
| 1505 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
| 1506 | + } |
|
| 1182 | 1507 | if ($globalva == 'va' || $va) { |
| 1183 | 1508 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
| 1184 | 1509 | $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
| 1185 | 1510 | } else { |
| 1186 | 1511 | $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
| 1187 | - if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1188 | - else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1512 | + if ($forcepilots) { |
|
| 1513 | + $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE')); |
|
| 1514 | + } else { |
|
| 1515 | + $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE')); |
|
| 1516 | + } |
|
| 1189 | 1517 | } |
| 1190 | 1518 | |
| 1191 | 1519 | |
@@ -1352,7 +1680,9 @@ discard block |
||
| 1352 | 1680 | $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
| 1353 | 1681 | } |
| 1354 | 1682 | |
| 1355 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1683 | + if (!isset($globalTransaction)) { |
|
| 1684 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
| 1685 | + } |
|
| 1356 | 1686 | |
| 1357 | 1687 | // Set some defaults values... |
| 1358 | 1688 | if (!isset($globalAircraftImageSources)) { |
@@ -1367,15 +1697,23 @@ discard block |
||
| 1367 | 1697 | |
| 1368 | 1698 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
| 1369 | 1699 | |
| 1370 | - if ($error == '') settings::modify_settings($settings); |
|
| 1371 | - if ($error == '') settings::comment_settings($settings_comment); |
|
| 1700 | + if ($error == '') { |
|
| 1701 | + settings::modify_settings($settings); |
|
| 1702 | + } |
|
| 1703 | + if ($error == '') { |
|
| 1704 | + settings::comment_settings($settings_comment); |
|
| 1705 | + } |
|
| 1372 | 1706 | if ($error != '') { |
| 1373 | 1707 | print '<div class="info column">'.$error.'</div>'; |
| 1374 | 1708 | require('../footer.php'); |
| 1375 | 1709 | exit; |
| 1376 | 1710 | } else { |
| 1377 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
| 1378 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
| 1711 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
| 1712 | + $_SESSION['waypoints'] = 1; |
|
| 1713 | + } |
|
| 1714 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
| 1715 | + $_SESSION['owner'] = 1; |
|
| 1716 | + } |
|
| 1379 | 1717 | if (isset($_POST['createdb'])) { |
| 1380 | 1718 | $_SESSION['install'] = 'database_create'; |
| 1381 | 1719 | } else { |
@@ -1416,10 +1754,18 @@ discard block |
||
| 1416 | 1754 | $popw = false; |
| 1417 | 1755 | foreach ($_SESSION['done'] as $done) { |
| 1418 | 1756 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
| 1419 | - if ($done == 'Create database') $pop = true; |
|
| 1420 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
| 1421 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
| 1422 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
| 1757 | + if ($done == 'Create database') { |
|
| 1758 | + $pop = true; |
|
| 1759 | + } |
|
| 1760 | + if ($_SESSION['install'] == 'database_create') { |
|
| 1761 | + $pop = true; |
|
| 1762 | + } |
|
| 1763 | + if ($_SESSION['install'] == 'database_import') { |
|
| 1764 | + $popi = true; |
|
| 1765 | + } |
|
| 1766 | + if ($_SESSION['install'] == 'waypoints') { |
|
| 1767 | + $popw = true; |
|
| 1768 | + } |
|
| 1423 | 1769 | } |
| 1424 | 1770 | if ($pop) { |
| 1425 | 1771 | sleep(5); |
@@ -1430,7 +1776,9 @@ discard block |
||
| 1430 | 1776 | } else if ($popw) { |
| 1431 | 1777 | sleep(5); |
| 1432 | 1778 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
| 1433 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1779 | + } else { |
|
| 1780 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
| 1781 | + } |
|
| 1434 | 1782 | print '</div></ul>'; |
| 1435 | 1783 | print '<div id="error"></div>'; |
| 1436 | 1784 | /* foreach ($_SESSION['done'] as $done) { |