@@ -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> |
@@ -239,42 +287,86 @@ discard block |
||
239 | 287 | <legend>Coverage area</legend> |
240 | 288 | <p> |
241 | 289 | <label for="latitudemax">The maximum latitude (north)</label> |
242 | - <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" /> |
|
290 | + <input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) { |
|
291 | + print $globalLatitudeMax; |
|
292 | +} |
|
293 | +?>" /> |
|
243 | 294 | </p> |
244 | 295 | <p> |
245 | 296 | <label for="latitudemin">The minimum latitude (south)</label> |
246 | - <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" /> |
|
297 | + <input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) { |
|
298 | + print $globalLatitudeMin; |
|
299 | +} |
|
300 | +?>" /> |
|
247 | 301 | </p> |
248 | 302 | <p> |
249 | 303 | <label for="longitudemax">The maximum longitude (west)</label> |
250 | - <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" /> |
|
304 | + <input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) { |
|
305 | + print $globalLongitudeMax; |
|
306 | +} |
|
307 | +?>" /> |
|
251 | 308 | </p> |
252 | 309 | <p> |
253 | 310 | <label for="longitudemin">The minimum longitude (east)</label> |
254 | - <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" /> |
|
311 | + <input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) { |
|
312 | + print $globalLongitudeMin; |
|
313 | +} |
|
314 | +?>" /> |
|
255 | 315 | </p> |
256 | 316 | <p> |
257 | 317 | <label for="latitudecenter">The latitude center</label> |
258 | - <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" /> |
|
318 | + <input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) { |
|
319 | + print $globalCenterLatitude; |
|
320 | +} |
|
321 | +?>" /> |
|
259 | 322 | </p> |
260 | 323 | <p> |
261 | 324 | <label for="longitudecenter">The longitude center</label> |
262 | - <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" /> |
|
325 | + <input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) { |
|
326 | + print $globalCenterLongitude; |
|
327 | +} |
|
328 | +?>" /> |
|
263 | 329 | </p> |
264 | 330 | <p> |
265 | 331 | <label for="livezoom">Default Zoom on live map</label> |
266 | - <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" /> |
|
332 | + <input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) { |
|
333 | + print $globalLiveZoom; |
|
334 | +} else { |
|
335 | + print '9'; |
|
336 | +} |
|
337 | +?>" /> |
|
267 | 338 | </p> |
268 | 339 | <p> |
269 | 340 | <label for="squawk_country">Country for squawk usage</label> |
270 | 341 | <select name="squawk_country" id="squawk_country"> |
271 | - <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option> |
|
272 | - <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option> |
|
273 | - <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option> |
|
274 | - <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option> |
|
275 | - <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option> |
|
276 | - <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option> |
|
277 | - <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option> |
|
342 | + <option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') { |
|
343 | + print ' selected '; |
|
344 | +} |
|
345 | +?>>UK</option> |
|
346 | + <option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') { |
|
347 | + print ' selected '; |
|
348 | +} |
|
349 | +?>>NZ</option> |
|
350 | + <option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') { |
|
351 | + print ' selected '; |
|
352 | +} |
|
353 | +?>>US</option> |
|
354 | + <option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') { |
|
355 | + print ' selected '; |
|
356 | +} |
|
357 | +?>>AU</option> |
|
358 | + <option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') { |
|
359 | + print ' selected '; |
|
360 | +} |
|
361 | +?>>NL</option> |
|
362 | + <option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') { |
|
363 | + print ' selected '; |
|
364 | +} |
|
365 | +?>>FR</option> |
|
366 | + <option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') { |
|
367 | + print ' selected '; |
|
368 | +} |
|
369 | +?>>TR</option> |
|
278 | 370 | </select> |
279 | 371 | </p> |
280 | 372 | </fieldset> |
@@ -283,15 +375,24 @@ discard block |
||
283 | 375 | <p><i>Only put in DB flights that are inside a circle</i></p> |
284 | 376 | <p> |
285 | 377 | <label for="latitude">Center latitude</label> |
286 | - <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" /> |
|
378 | + <input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) { |
|
379 | + echo $globalDistanceIgnore['latitude']; |
|
380 | +} |
|
381 | +?>" /> |
|
287 | 382 | </p> |
288 | 383 | <p> |
289 | 384 | <label for="longitude">Center longitude</label> |
290 | - <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" /> |
|
385 | + <input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) { |
|
386 | + echo $globalDistanceIgnore['longitude']; |
|
387 | +} |
|
388 | +?>" /> |
|
291 | 389 | </p> |
292 | 390 | <p> |
293 | 391 | <label for="Distance">Distance (in km)</label> |
294 | - <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" /> |
|
392 | + <input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) { |
|
393 | + echo $globalDistanceIgnore['distance']; |
|
394 | +} |
|
395 | +?>" /> |
|
295 | 396 | </p> |
296 | 397 | </fieldset> |
297 | 398 | <fieldset id="sourceloc"> |
@@ -399,11 +500,17 @@ discard block |
||
399 | 500 | <div id="flightaware_data"> |
400 | 501 | <p> |
401 | 502 | <label for="flightawareusername">FlightAware username</label> |
402 | - <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" /> |
|
503 | + <input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) { |
|
504 | + print $globalFlightAwareUsername; |
|
505 | +} |
|
506 | +?>" /> |
|
403 | 507 | </p> |
404 | 508 | <p> |
405 | 509 | <label for="flightawarepassword">FlightAware password/API key</label> |
406 | - <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" /> |
|
510 | + <input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) { |
|
511 | + print $globalFlightAwarePassword; |
|
512 | +} |
|
513 | +?>" /> |
|
407 | 514 | </p> |
408 | 515 | </div> |
409 | 516 | --> |
@@ -463,28 +570,88 @@ discard block |
||
463 | 570 | ?> |
464 | 571 | <td> |
465 | 572 | <select name="format[]" id="format"> |
466 | - <option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option> |
|
467 | - <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option> |
|
468 | - <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option> |
|
469 | - <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option> |
|
470 | - <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option> |
|
471 | - <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option> |
|
472 | - <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option> |
|
473 | - <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option> |
|
474 | - <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option> |
|
475 | - <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option> |
|
476 | - <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option> |
|
477 | - <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option> |
|
478 | - <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option> |
|
479 | - <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option> |
|
480 | - <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
481 | - <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option> |
|
482 | - <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option> |
|
573 | + <option value="auto" <?php if (!isset($source['format'])) { |
|
574 | + print 'selected'; |
|
575 | +} |
|
576 | +?>>Auto</option> |
|
577 | + <option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') { |
|
578 | + print 'selected'; |
|
579 | +} |
|
580 | +?>>SBS</option> |
|
581 | + <option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') { |
|
582 | + print 'selected'; |
|
583 | +} |
|
584 | +?>>TSV</option> |
|
585 | + <option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') { |
|
586 | + print 'selected'; |
|
587 | +} |
|
588 | +?>>Raw</option> |
|
589 | + <option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') { |
|
590 | + print 'selected'; |
|
591 | +} |
|
592 | +?>>APRS</option> |
|
593 | + <option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') { |
|
594 | + print 'selected'; |
|
595 | +} |
|
596 | +?>>Radarcape deltadb.txt</option> |
|
597 | + <option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') { |
|
598 | + print 'selected'; |
|
599 | +} |
|
600 | +?>>Vatsim</option> |
|
601 | + <option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') { |
|
602 | + print 'selected'; |
|
603 | +} |
|
604 | +?>>Virtual Radar Server AircraftList.json</option> |
|
605 | + <option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') { |
|
606 | + print 'selected'; |
|
607 | +} |
|
608 | +?>>Virtual Radar Server TCP</option> |
|
609 | + <option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') { |
|
610 | + print 'selected'; |
|
611 | +} |
|
612 | +?>>phpVMS</option> |
|
613 | + <option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') { |
|
614 | + print 'selected'; |
|
615 | +} |
|
616 | +?>>Virtual Airlines Manager</option> |
|
617 | + <option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') { |
|
618 | + print 'selected'; |
|
619 | +} |
|
620 | +?>>IVAO</option> |
|
621 | + <option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') { |
|
622 | + print 'selected'; |
|
623 | +} |
|
624 | +?>>FlightGear Multiplayer</option> |
|
625 | + <option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') { |
|
626 | + print 'selected'; |
|
627 | +} |
|
628 | +?>>FlightGear Singleplayer</option> |
|
629 | + <option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') { |
|
630 | + print 'selected'; |
|
631 | +} |
|
632 | +?>>ACARS from acarsdec/acarsdeco2 over UDP</option> |
|
633 | + <option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') { |
|
634 | + print 'selected'; |
|
635 | +} |
|
636 | +?>>ACARS SBS-3 over TCP</option> |
|
637 | + <option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') { |
|
638 | + print 'selected'; |
|
639 | +} |
|
640 | +?>>NMEA AIS over TCP</option> |
|
483 | 641 | </select> |
484 | 642 | </td> |
485 | - <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" /></td> |
|
486 | - <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> |
|
487 | - <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> |
|
643 | + <td><input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) { |
|
644 | + print $source['name']; |
|
645 | +} |
|
646 | +?>" /></td> |
|
647 | + <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']) { |
|
648 | + print 'checked'; |
|
649 | +} |
|
650 | +?> /></td> |
|
651 | + <td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) { |
|
652 | + print 'checked'; |
|
653 | +} |
|
654 | +?> /></td> |
|
488 | 655 | <td><input type="button" id="delhost" value="Delete" onclick="deleteRow(this)" /> <input type="button" id="addhost" value="Add" onclick="insRow()" /></td> |
489 | 656 | </tr> |
490 | 657 | <?php |
@@ -533,11 +700,17 @@ discard block |
||
533 | 700 | <p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p> |
534 | 701 | <p> |
535 | 702 | <label for="acarshost">ACARS UDP host</label> |
536 | - <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" /> |
|
703 | + <input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) { |
|
704 | + print $globalACARSHost; |
|
705 | +} |
|
706 | +?>" /> |
|
537 | 707 | </p> |
538 | 708 | <p> |
539 | 709 | <label for="acarsport">ACARS UDP port</label> |
540 | - <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" /> |
|
710 | + <input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) { |
|
711 | + print $globalACARSPort; |
|
712 | +} |
|
713 | +?>" /> |
|
541 | 714 | </p> |
542 | 715 | </fieldset> |
543 | 716 | </div> |
@@ -617,13 +790,19 @@ discard block |
||
617 | 790 | <div id="schedules_options"> |
618 | 791 | <p> |
619 | 792 | <label for="britishairways">British Airways API Key</label> |
620 | - <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" /> |
|
793 | + <input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) { |
|
794 | + print $globalBritishAirwaysKey; |
|
795 | +} |
|
796 | +?>" /> |
|
621 | 797 | <p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p> |
622 | 798 | </p> |
623 | 799 | <!-- |
624 | 800 | <p> |
625 | 801 | <label for="transavia">Transavia Test API Consumer Key</label> |
626 | - <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" /> |
|
802 | + <input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) { |
|
803 | + print $globalTransaviaKey; |
|
804 | +} |
|
805 | +?>" /> |
|
627 | 806 | <p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p> |
628 | 807 | </p> |
629 | 808 | --> |
@@ -632,10 +811,16 @@ discard block |
||
632 | 811 | <b>Lufthansa API Key</b> |
633 | 812 | <p> |
634 | 813 | <label for="lufthansakey">Key</label> |
635 | - <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" /> |
|
814 | + <input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) { |
|
815 | + print $globalLufthansaKey['key']; |
|
816 | +} |
|
817 | +?>" /> |
|
636 | 818 | </p><p> |
637 | 819 | <label for="lufthansasecret">Secret</label> |
638 | - <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" /> |
|
820 | + <input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) { |
|
821 | + print $globalLufthansaKey['secret']; |
|
822 | +} |
|
823 | +?>" /> |
|
639 | 824 | </p> |
640 | 825 | </div> |
641 | 826 | <p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p> |
@@ -655,7 +840,10 @@ discard block |
||
655 | 840 | </p> |
656 | 841 | <p> |
657 | 842 | <label for="notamsource">URL of your feed from notaminfo.com</label> |
658 | - <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" /> |
|
843 | + <input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) { |
|
844 | + print $globalNOTAMSource; |
|
845 | +} |
|
846 | +?>" /> |
|
659 | 847 | <p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p> |
660 | 848 | </p> |
661 | 849 | <br /> |
@@ -671,14 +859,20 @@ discard block |
||
671 | 859 | <div id="metarsrc"> |
672 | 860 | <p> |
673 | 861 | <label for="metarsource">URL of your METAR source</label> |
674 | - <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" /> |
|
862 | + <input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) { |
|
863 | + print $globalMETARurl; |
|
864 | +} |
|
865 | +?>" /> |
|
675 | 866 | <p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p> |
676 | 867 | </p> |
677 | 868 | </div> |
678 | 869 | <br /> |
679 | 870 | <p> |
680 | 871 | <label for="bitly">Bit.ly access token api (used in search page)</label> |
681 | - <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" /> |
|
872 | + <input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) { |
|
873 | + print $globalBitlyAccessToken; |
|
874 | +} |
|
875 | +?>" /> |
|
682 | 876 | </p> |
683 | 877 | <br /> |
684 | 878 | <p> |
@@ -698,7 +892,12 @@ discard block |
||
698 | 892 | </p> |
699 | 893 | <p> |
700 | 894 | <label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label> |
701 | - <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '0'; ?>" /> |
|
895 | + <input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) { |
|
896 | + print $globalArchiveMonths; |
|
897 | +} else { |
|
898 | + echo '0'; |
|
899 | +} |
|
900 | +?>" /> |
|
702 | 901 | <p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p> |
703 | 902 | </p> |
704 | 903 | <p> |
@@ -708,12 +907,22 @@ discard block |
||
708 | 907 | </p> |
709 | 908 | <p> |
710 | 909 | <label for="archivekeepmonths">Keep flights data for xx months in archive</label> |
711 | - <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '0'; ?>" /> |
|
910 | + <input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) { |
|
911 | + print $globalArchiveKeepMonths; |
|
912 | +} else { |
|
913 | + echo '0'; |
|
914 | +} |
|
915 | +?>" /> |
|
712 | 916 | <p class="help-block">0 to disable</p> |
713 | 917 | </p> |
714 | 918 | <p> |
715 | 919 | <label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label> |
716 | - <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '0'; ?>" /> |
|
920 | + <input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) { |
|
921 | + print $globalArchiveKeepTrackMonths; |
|
922 | +} else { |
|
923 | + echo '0'; |
|
924 | +} |
|
925 | +?>" /> |
|
717 | 926 | <p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p> |
718 | 927 | </p> |
719 | 928 | <br /> |
@@ -723,7 +932,12 @@ discard block |
||
723 | 932 | <p class="help-block">Uncheck if the script is running as cron job</p> |
724 | 933 | <div id="cronends"> |
725 | 934 | <label for="cronend">Run script for xx seconds</label> |
726 | - <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" /> |
|
935 | + <input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) { |
|
936 | + print $globalCronEnd; |
|
937 | +} else { |
|
938 | + print '0'; |
|
939 | +} |
|
940 | +?>" /> |
|
727 | 941 | <p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p> |
728 | 942 | </div> |
729 | 943 | </p> |
@@ -768,15 +982,30 @@ discard block |
||
768 | 982 | <br /> |
769 | 983 | <p> |
770 | 984 | <label for="refresh">Show flights detected since xxx seconds</label> |
771 | - <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" /> |
|
985 | + <input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) { |
|
986 | + echo $globalLiveInterval; |
|
987 | +} else { |
|
988 | + echo '200'; |
|
989 | +} |
|
990 | +?>" /> |
|
772 | 991 | </p> |
773 | 992 | <p> |
774 | 993 | <label for="maprefresh">Live map refresh (in seconds)</label> |
775 | - <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" /> |
|
994 | + <input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) { |
|
995 | + echo $globalMapRefresh; |
|
996 | +} else { |
|
997 | + echo '30'; |
|
998 | +} |
|
999 | +?>" /> |
|
776 | 1000 | </p> |
777 | 1001 | <p> |
778 | 1002 | <label for="mapidle">Map idle timeout (in minutes)</label> |
779 | - <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" /> |
|
1003 | + <input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) { |
|
1004 | + echo $globalMapIdleTimeout; |
|
1005 | +} else { |
|
1006 | + echo '30'; |
|
1007 | +} |
|
1008 | +?>" /> |
|
780 | 1009 | <p class="help-block">0 to disable</p> |
781 | 1010 | </p> |
782 | 1011 | <p> |
@@ -786,12 +1015,20 @@ discard block |
||
786 | 1015 | <br /> |
787 | 1016 | <p> |
788 | 1017 | <label for="closestmindist">Distance to airport set as arrival (in km)</label> |
789 | - <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" /> |
|
1018 | + <input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) { |
|
1019 | + echo $globalClosestMinDist; |
|
1020 | +} else { |
|
1021 | + echo '50'; |
|
1022 | +} |
|
1023 | +?>" /> |
|
790 | 1024 | </p> |
791 | 1025 | <br /> |
792 | 1026 | <p> |
793 | 1027 | <label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label> |
794 | - <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" /> |
|
1028 | + <input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) { |
|
1029 | + echo $globalAircraftSize; |
|
1030 | +} |
|
1031 | +?>" /> |
|
795 | 1032 | </p> |
796 | 1033 | <br /> |
797 | 1034 | <p> |
@@ -804,7 +1041,12 @@ discard block |
||
804 | 1041 | if (extension_loaded('gd') && function_exists('gd_info')) { |
805 | 1042 | ?> |
806 | 1043 | <label for="aircrafticoncolor">Color of aircraft icon on map</label> |
807 | - <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" /> |
|
1044 | + <input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) { |
|
1045 | + echo $globalAircraftIconColor; |
|
1046 | +} else { |
|
1047 | + echo '1a3151'; |
|
1048 | +} |
|
1049 | +?>" /> |
|
808 | 1050 | <?php |
809 | 1051 | if (!is_writable('../cache')) { |
810 | 1052 | ?> |
@@ -822,8 +1064,18 @@ discard block |
||
822 | 1064 | <p> |
823 | 1065 | <label for="airportzoom">Zoom level minimum to see airports icons</label> |
824 | 1066 | <div class="range"> |
825 | - <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" /> |
|
826 | - <output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output> |
|
1067 | + <input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) { |
|
1068 | + echo $globalAirportZoom; |
|
1069 | +} else { |
|
1070 | + echo '7'; |
|
1071 | +} |
|
1072 | +?>" /> |
|
1073 | + <output id="range"><?php if (isset($globalAirportZoom)) { |
|
1074 | + echo $globalAirportZoom; |
|
1075 | +} else { |
|
1076 | + echo '7'; |
|
1077 | +} |
|
1078 | +?></output> |
|
827 | 1079 | </div> |
828 | 1080 | </p> |
829 | 1081 | </fieldset> |
@@ -851,8 +1103,12 @@ discard block |
||
851 | 1103 | $dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING); |
852 | 1104 | $dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING); |
853 | 1105 | |
854 | - if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded'; |
|
855 | - if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1106 | + if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) { |
|
1107 | + $error .= 'Mysql driver for PDO must be loaded'; |
|
1108 | + } |
|
1109 | + if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) { |
|
1110 | + $error .= 'PosgreSQL driver for PDO must be loaded'; |
|
1111 | + } |
|
856 | 1112 | |
857 | 1113 | $_SESSION['database_root'] = $dbroot; |
858 | 1114 | $_SESSION['database_rootpass'] = $dbrootpass; |
@@ -919,15 +1175,23 @@ discard block |
||
919 | 1175 | $source_city = $_POST['source_city']; |
920 | 1176 | $source_country = $_POST['source_country']; |
921 | 1177 | $source_ref = $_POST['source_ref']; |
922 | - if (isset($source_id)) $source_id = $_POST['source_id']; |
|
923 | - else $source_id = array(); |
|
1178 | + if (isset($source_id)) { |
|
1179 | + $source_id = $_POST['source_id']; |
|
1180 | + } else { |
|
1181 | + $source_id = array(); |
|
1182 | + } |
|
924 | 1183 | |
925 | 1184 | $sources = array(); |
926 | 1185 | foreach ($source_name as $keys => $name) { |
927 | - 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]); |
|
928 | - 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]); |
|
1186 | + if (isset($source_id[$keys])) { |
|
1187 | + $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]); |
|
1188 | + } else { |
|
1189 | + $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]); |
|
1190 | + } |
|
1191 | + } |
|
1192 | + if (count($sources) > 0) { |
|
1193 | + $_SESSION['sources'] = $sources; |
|
929 | 1194 | } |
930 | - if (count($sources) > 0) $_SESSION['sources'] = $sources; |
|
931 | 1195 | |
932 | 1196 | //$sbshost = filter_input(INPUT_POST,'sbshost',FILTER_SANITIZE_STRING); |
933 | 1197 | //$sbsport = filter_input(INPUT_POST,'sbsport',FILTER_SANITIZE_NUMBER_INT); |
@@ -948,14 +1212,23 @@ discard block |
||
948 | 1212 | $datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING); |
949 | 1213 | |
950 | 1214 | $globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING); |
951 | - if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
952 | - else $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1215 | + if ($globalaircraft == 'aircraft') { |
|
1216 | + $settings = array_merge($settings,array('globalAircraft' => 'TRUE')); |
|
1217 | + } else { |
|
1218 | + $settings = array_merge($settings,array('globalAircraft' => 'FALSE')); |
|
1219 | + } |
|
953 | 1220 | $globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING); |
954 | - if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
955 | - else $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1221 | + if ($globaltracker == 'tracker') { |
|
1222 | + $settings = array_merge($settings,array('globalTracker' => 'TRUE')); |
|
1223 | + } else { |
|
1224 | + $settings = array_merge($settings,array('globalTracker' => 'FALSE')); |
|
1225 | + } |
|
956 | 1226 | $globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING); |
957 | - if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
958 | - else $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1227 | + if ($globalmarine == 'marine') { |
|
1228 | + $settings = array_merge($settings,array('globalMarine' => 'TRUE')); |
|
1229 | + } else { |
|
1230 | + $settings = array_merge($settings,array('globalMarine' => 'FALSE')); |
|
1231 | + } |
|
959 | 1232 | |
960 | 1233 | /* |
961 | 1234 | $globalSBS1Hosts = array(); |
@@ -976,17 +1249,31 @@ discard block |
||
976 | 1249 | $port = $_POST['port']; |
977 | 1250 | $name = $_POST['name']; |
978 | 1251 | $format = $_POST['format']; |
979 | - if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats']; |
|
980 | - else $sourcestats = array(); |
|
981 | - if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive']; |
|
982 | - else $noarchive = array(); |
|
1252 | + if (isset($_POST['sourcestats'])) { |
|
1253 | + $sourcestats = $_POST['sourcestats']; |
|
1254 | + } else { |
|
1255 | + $sourcestats = array(); |
|
1256 | + } |
|
1257 | + if (isset($_POST['noarchive'])) { |
|
1258 | + $noarchive = $_POST['noarchive']; |
|
1259 | + } else { |
|
1260 | + $noarchive = array(); |
|
1261 | + } |
|
983 | 1262 | $gSources = array(); |
984 | 1263 | foreach ($host as $key => $h) { |
985 | - if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE'; |
|
986 | - else $cov = 'FALSE'; |
|
987 | - if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE'; |
|
988 | - else $arch = 'FALSE'; |
|
989 | - if ($h != '') $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch); |
|
1264 | + if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) { |
|
1265 | + $cov = 'TRUE'; |
|
1266 | + } else { |
|
1267 | + $cov = 'FALSE'; |
|
1268 | + } |
|
1269 | + if (isset($noarchive[$key]) && $noarchive[$key] == 1) { |
|
1270 | + $arch = 'TRUE'; |
|
1271 | + } else { |
|
1272 | + $arch = 'FALSE'; |
|
1273 | + } |
|
1274 | + if ($h != '') { |
|
1275 | + $gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch); |
|
1276 | + } |
|
990 | 1277 | } |
991 | 1278 | $settings = array_merge($settings,array('globalSources' => $gSources)); |
992 | 1279 | |
@@ -1011,7 +1298,9 @@ discard block |
||
1011 | 1298 | $zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT); |
1012 | 1299 | if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') { |
1013 | 1300 | $settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance))); |
1014 | - } else $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1301 | + } else { |
|
1302 | + $settings = array_merge($settings,array('globalDistanceIgnore' => array())); |
|
1303 | + } |
|
1015 | 1304 | |
1016 | 1305 | $refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT); |
1017 | 1306 | $settings = array_merge($settings,array('globalLiveInterval' => $refresh)); |
@@ -1050,7 +1339,9 @@ discard block |
||
1050 | 1339 | |
1051 | 1340 | // Create in settings.php keys not yet configurable if not already here |
1052 | 1341 | //if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => '')); |
1053 | - if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1342 | + if (!isset($globalDebug)) { |
|
1343 | + $settings = array_merge($settings,array('globalDebug' => 'TRUE')); |
|
1344 | + } |
|
1054 | 1345 | |
1055 | 1346 | $resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING); |
1056 | 1347 | if ($resetyearstats == 'resetyearstats') { |
@@ -1087,31 +1378,49 @@ discard block |
||
1087 | 1378 | } |
1088 | 1379 | */ |
1089 | 1380 | $settings = array_merge($settings,array('globalFlightAware' => 'FALSE')); |
1090 | - if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1091 | - else $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1092 | - if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1093 | - else $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1381 | + if ($globalsbs == 'sbs') { |
|
1382 | + $settings = array_merge($settings,array('globalSBS1' => 'TRUE')); |
|
1383 | + } else { |
|
1384 | + $settings = array_merge($settings,array('globalSBS1' => 'FALSE')); |
|
1385 | + } |
|
1386 | + if ($globalaprs == 'aprs') { |
|
1387 | + $settings = array_merge($settings,array('globalAPRS' => 'TRUE')); |
|
1388 | + } else { |
|
1389 | + $settings = array_merge($settings,array('globalAPRS' => 'FALSE')); |
|
1390 | + } |
|
1094 | 1391 | if ($globalva == 'va') { |
1095 | 1392 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
1096 | 1393 | $settings = array_merge($settings,array('globalVA' => 'TRUE')); |
1097 | - } else $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
1394 | + } else { |
|
1395 | + $settings = array_merge($settings,array('globalVA' => 'FALSE')); |
|
1396 | + } |
|
1098 | 1397 | if ($globalivao == 'ivao') { |
1099 | 1398 | //$settings = array_merge($settings,array('globalIVAO' => 'TRUE','globalVATSIM' => 'FALSE')); |
1100 | 1399 | $settings = array_merge($settings,array('globalIVAO' => 'TRUE')); |
1101 | - } else $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1400 | + } else { |
|
1401 | + $settings = array_merge($settings,array('globalIVAO' => 'FALSE')); |
|
1402 | + } |
|
1102 | 1403 | if ($globalvatsim == 'vatsim') { |
1103 | 1404 | //$settings = array_merge($settings,array('globalVATSIM' => 'TRUE','globalIVAO' => 'FALSE')); |
1104 | 1405 | $settings = array_merge($settings,array('globalVATSIM' => 'TRUE')); |
1105 | - } else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1406 | + } else { |
|
1407 | + $settings = array_merge($settings,array('globalVATSIM' => 'FALSE')); |
|
1408 | + } |
|
1106 | 1409 | if ($globalphpvms == 'phpvms') { |
1107 | 1410 | $settings = array_merge($settings,array('globalphpVMS' => 'TRUE')); |
1108 | - } else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1411 | + } else { |
|
1412 | + $settings = array_merge($settings,array('globalphpVMS' => 'FALSE')); |
|
1413 | + } |
|
1109 | 1414 | if ($globalvam == 'vam') { |
1110 | 1415 | $settings = array_merge($settings,array('globalVAM' => 'TRUE')); |
1111 | - } else $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1416 | + } else { |
|
1417 | + $settings = array_merge($settings,array('globalVAM' => 'FALSE')); |
|
1418 | + } |
|
1112 | 1419 | if ($globalvatsim == 'vatsim' || $globalivao == 'ivao' || $globalphpvms == 'phpvms') { |
1113 | 1420 | $settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE')); |
1114 | - } else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1421 | + } else { |
|
1422 | + $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE')); |
|
1423 | + } |
|
1115 | 1424 | |
1116 | 1425 | |
1117 | 1426 | |
@@ -1259,7 +1568,9 @@ discard block |
||
1259 | 1568 | $settings = array_merge($settings,array('globalNoAirlines' => 'FALSE')); |
1260 | 1569 | } |
1261 | 1570 | |
1262 | - if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1571 | + if (!isset($globalTransaction)) { |
|
1572 | + $settings = array_merge($settings,array('globalTransaction' => 'TRUE')); |
|
1573 | + } |
|
1263 | 1574 | |
1264 | 1575 | // Set some defaults values... |
1265 | 1576 | if (!isset($globalAircraftImageSources)) { |
@@ -1274,15 +1585,23 @@ discard block |
||
1274 | 1585 | |
1275 | 1586 | $settings = array_merge($settings,array('globalInstalled' => 'TRUE')); |
1276 | 1587 | |
1277 | - if ($error == '') settings::modify_settings($settings); |
|
1278 | - if ($error == '') settings::comment_settings($settings_comment); |
|
1588 | + if ($error == '') { |
|
1589 | + settings::modify_settings($settings); |
|
1590 | + } |
|
1591 | + if ($error == '') { |
|
1592 | + settings::comment_settings($settings_comment); |
|
1593 | + } |
|
1279 | 1594 | if ($error != '') { |
1280 | 1595 | print '<div class="info column">'.$error.'</div>'; |
1281 | 1596 | require('../footer.php'); |
1282 | 1597 | exit; |
1283 | 1598 | } else { |
1284 | - if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1; |
|
1285 | - if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1; |
|
1599 | + if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') { |
|
1600 | + $_SESSION['waypoints'] = 1; |
|
1601 | + } |
|
1602 | + if (isset($_POST['owner']) && $_POST['owner'] == 'owner') { |
|
1603 | + $_SESSION['owner'] = 1; |
|
1604 | + } |
|
1286 | 1605 | if (isset($_POST['createdb'])) { |
1287 | 1606 | $_SESSION['install'] = 'database_create'; |
1288 | 1607 | } else { |
@@ -1323,10 +1642,18 @@ discard block |
||
1323 | 1642 | $popw = false; |
1324 | 1643 | foreach ($_SESSION['done'] as $done) { |
1325 | 1644 | print '<li>'.$done.'....<strong>SUCCESS</strong></li>'; |
1326 | - if ($done == 'Create database') $pop = true; |
|
1327 | - if ($_SESSION['install'] == 'database_create') $pop = true; |
|
1328 | - if ($_SESSION['install'] == 'database_import') $popi = true; |
|
1329 | - if ($_SESSION['install'] == 'waypoints') $popw = true; |
|
1645 | + if ($done == 'Create database') { |
|
1646 | + $pop = true; |
|
1647 | + } |
|
1648 | + if ($_SESSION['install'] == 'database_create') { |
|
1649 | + $pop = true; |
|
1650 | + } |
|
1651 | + if ($_SESSION['install'] == 'database_import') { |
|
1652 | + $popi = true; |
|
1653 | + } |
|
1654 | + if ($_SESSION['install'] == 'waypoints') { |
|
1655 | + $popw = true; |
|
1656 | + } |
|
1330 | 1657 | } |
1331 | 1658 | if ($pop) { |
1332 | 1659 | sleep(5); |
@@ -1337,7 +1664,9 @@ discard block |
||
1337 | 1664 | } else if ($popw) { |
1338 | 1665 | sleep(5); |
1339 | 1666 | print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>'; |
1340 | - } else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1667 | + } else { |
|
1668 | + print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>'; |
|
1669 | + } |
|
1341 | 1670 | print '</div></ul>'; |
1342 | 1671 | print '<div id="error"></div>'; |
1343 | 1672 | /* foreach ($_SESSION['done'] as $done) { |