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