Completed
Push — master ( 94d96f...9f9db9 )
by Yannick
29:42
created
install/index.php 1 patch
Braces   +588 added lines, -158 removed lines patch added patch discarded remove patch
@@ -4,11 +4,19 @@  discard block
 block discarded – undo
4 4
 if (isset($_SESSION['error'])) {
5 5
 	header('Content-Encoding: none;');
6 6
 	echo 'Error : '.$_SESSION['error'].' - Resetting install... You need to fix the problem and run install again.';
7
-	if (isset($_SESSION['error'])) unset($_SESSION['error']);
8
-	if (isset($_SESSION['errorlst'])) unset($_SESSION['errorlst']);
9
-	if (isset($_SESSION['next'])) unset($_SESSION['next']);
10
-	if (isset($_SESSION['install'])) unset($_SESSION['install']);
11
-}
7
+	if (isset($_SESSION['error'])) {
8
+		unset($_SESSION['error']);
9
+	}
10
+	if (isset($_SESSION['errorlst'])) {
11
+		unset($_SESSION['errorlst']);
12
+	}
13
+	if (isset($_SESSION['next'])) {
14
+		unset($_SESSION['next']);
15
+	}
16
+	if (isset($_SESSION['install'])) {
17
+		unset($_SESSION['install']);
18
+	}
19
+	}
12 20
 /*
13 21
 if (isset($_SESSION['errorlst'])) {
14 22
 	header('Content-Encoding: none;');
@@ -159,45 +167,72 @@  discard block
 block discarded – undo
159 167
 			</div>
160 168
 			<p>
161 169
 				<label for="dbhost">Database hostname</label>
162
-				<input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) print $globalDBhost; ?>" />
170
+				<input type="text" name="dbhost" id="dbhost" value="<?php if (isset($globalDBhost)) {
171
+	print $globalDBhost;
172
+}
173
+?>" />
163 174
 			</p>
164 175
 			<p>
165 176
 				<label for="dbport">Database port</label>
166
-				<input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) print $globalDBport; ?>" />
177
+				<input type="text" name="dbport" id="dbport" value="<?php if (isset($globalDBport)) {
178
+	print $globalDBport;
179
+}
180
+?>" />
167 181
 				<p class="help-block">Default is 3306 for MariaDB/MySQL, 5432 for PostgreSQL</p>
168 182
 			</p>
169 183
 			<p>
170 184
 				<label for="dbname">Database name</label>
171
-				<input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) print $globalDBname; ?>" />
185
+				<input type="text" name="dbname" id="dbname" value="<?php if (isset($globalDBname)) {
186
+	print $globalDBname;
187
+}
188
+?>" />
172 189
 			</p>
173 190
 			<p>
174 191
 				<label for="dbuser">Database user</label>
175
-				<input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) print $globalDBuser; ?>" />
192
+				<input type="text" name="dbuser" id="dbuser" value="<?php if (isset($globalDBuser)) {
193
+	print $globalDBuser;
194
+}
195
+?>" />
176 196
 			</p>
177 197
 			<p>
178 198
 				<label for="dbuserpass">Database user password</label>
179
-				<input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) print $globalDBpass; ?>" />
199
+				<input type="password" name="dbuserpass" id="dbuserpass" value="<?php if (isset($globalDBpass)) {
200
+	print $globalDBpass;
201
+}
202
+?>" />
180 203
 			</p>
181 204
 		</fieldset>
182 205
 		<fieldset id="site">
183 206
 			<legend>Site configuration</legend>
184 207
 			<p>
185 208
 				<label for="sitename">Site name</label>
186
-				<input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) print $globalName; ?>" />
209
+				<input type="text" name="sitename" id="sitename" value="<?php if (isset($globalName)) {
210
+	print $globalName;
211
+}
212
+?>" />
187 213
 			</p>
188 214
 			<p>
189 215
 				<label for="siteurl">Site directory</label>
190
-				<input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) print $globalURL; ?>" />
216
+				<input type="text" name="siteurl" id="siteurl" value="<?php if (isset($globalURL)) {
217
+	print $globalURL;
218
+}
219
+?>" />
191 220
 				<p class="help-block">Can be null. ex : <i>flightairmap</i> if complete URL is <i>http://toto.com/flightairmap</i></p>
192 221
 			</p>
193 222
 			<p>
194 223
 				<label for="timezone">Timezone</label>
195
-				<input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) print $globalTimezone; ?>" />
224
+				<input type="text" name="timezone" id="timezone" value="<?php if (isset($globalTimezone)) {
225
+	print $globalTimezone;
226
+}
227
+?>" />
196 228
 				<p class="help-block">ex : UTC, Europe/Paris,...</p>
197 229
 			</p>
198 230
 			<p>
199 231
 				<label for="language">Language</label>
200
-				<input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) print $globalLanguage; ?>" />
232
+				<input type="text" name="language" id="language" value="<?php if (isset($globalLanguage)) {
233
+	print $globalLanguage;
234
+}
235
+?>" />
201 236
 				<p class="help-block">Used only when link to wikipedia for now. Can be EN,DE,FR,...</p>
202 237
 			</p>
203 238
 		</fieldset>
@@ -217,11 +252,17 @@  discard block
 block discarded – undo
217 252
 			<div id="mapbox_data">
218 253
 				<p>
219 254
 					<label for="mapboxid">Mapbox id</label>
220
-					<input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) print $globalMapboxId; ?>" />
255
+					<input type="text" name="mapboxid" id="mapboxid" value="<?php if (isset($globalMapboxId)) {
256
+	print $globalMapboxId;
257
+}
258
+?>" />
221 259
 				</p>
222 260
 				<p>
223 261
 					<label for="mapboxtoken">Mapbox token</label>
224
-					<input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) print $globalMapboxToken; ?>" />
262
+					<input type="text" name="mapboxtoken" id="mapboxtoken" value="<?php if (isset($globalMapboxToken)) {
263
+	print $globalMapboxToken;
264
+}
265
+?>" />
225 266
 				</p>
226 267
 				<p class="help-block">Get a key <a href="https://www.mapbox.com/developers/">here</a></p>
227 268
 			</div>
@@ -229,7 +270,10 @@  discard block
 block discarded – undo
229 270
 			<div id="google_data">
230 271
 				<p>
231 272
 					<label for="googlekey">Google API key</label>
232
-					<input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) print $globalGoogleAPIKey; ?>" />
273
+					<input type="text" name="googlekey" id="googlekey" value="<?php if (isset($globalGoogleAPIKey)) {
274
+	print $globalGoogleAPIKey;
275
+}
276
+?>" />
233 277
 					<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>
234 278
 				</p>
235 279
 			</div>
@@ -237,7 +281,10 @@  discard block
 block discarded – undo
237 281
 			<div id="bing_data">
238 282
 				<p>
239 283
 					<label for="bingkey">Bing Map key</label>
240
-					<input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) print $globalBingMapKey; ?>" />
284
+					<input type="text" name="bingkey" id="bingkey" value="<?php if (isset($globalBingMapKey)) {
285
+	print $globalBingMapKey;
286
+}
287
+?>" />
241 288
 					<p class="help-block">Get a key <a href="https://www.bingmapsportal.com/">here</a></p>
242 289
 				</p>
243 290
 			</div>
@@ -245,7 +292,10 @@  discard block
 block discarded – undo
245 292
 			<div id="mapquest_data">
246 293
 				<p>
247 294
 					<label for="mapquestkey">MapQuest key</label>
248
-					<input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) print $globalMapQuestKey; ?>" />
295
+					<input type="text" name="mapquestkey" id="mapquestkey" value="<?php if (isset($globalMapQuestKey)) {
296
+	print $globalMapQuestKey;
297
+}
298
+?>" />
249 299
 					<p class="help-block">Get a key <a href="https://developer.mapquest.com/user/me/apps">here</a></p>
250 300
 				</p>
251 301
 			</div>
@@ -253,11 +303,17 @@  discard block
 block discarded – undo
253 303
 			<div id="here_data">
254 304
 				<p>
255 305
 					<label for="hereappid">Here App_Id</label>
256
-					<input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) print $globalHereappId; ?>" />
306
+					<input type="text" name="hereappid" id="hereappid" value="<?php if (isset($globalHereappId)) {
307
+	print $globalHereappId;
308
+}
309
+?>" />
257 310
 				</p>
258 311
 				<p>
259 312
 					<label for="hereappcode">Here App_Code</label>
260
-					<input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) print $globalHereappCode; ?>" />
313
+					<input type="text" name="hereappcode" id="hereappcode" value="<?php if (isset($globalHereappCode)) {
314
+	print $globalHereappCode;
315
+}
316
+?>" />
261 317
 				</p>
262 318
 				<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>
263 319
 			</div>
@@ -265,7 +321,10 @@  discard block
 block discarded – undo
265 321
 			<div id="openweathermap_data">
266 322
 				<p>
267 323
 					<label for="openweathermapkey">OpenWeatherMap key (weather layer)</label>
268
-					<input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) print $globalOpenWeatherMapKey; ?>" />
324
+					<input type="text" name="openweathermapkey" id="openweathermapkey" value="<?php if (isset($globalOpenWeatherMapKey)) {
325
+	print $globalOpenWeatherMapKey;
326
+}
327
+?>" />
269 328
 					<p class="help-block">Get a key <a href="https://openweathermap.org/">here</a></p>
270 329
 				</p>
271 330
 			</div>
@@ -294,42 +353,86 @@  discard block
 block discarded – undo
294 353
 			<legend>Coverage area</legend>
295 354
 			<p>
296 355
 				<label for="latitudemax">The maximum latitude (north)</label>
297
-				<input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) print $globalLatitudeMax; ?>" />
356
+				<input type="text" name="latitudemax" id="latitudemax" value="<?php if (isset($globalLatitudeMax)) {
357
+	print $globalLatitudeMax;
358
+}
359
+?>" />
298 360
 			</p>
299 361
 			<p>
300 362
 				<label for="latitudemin">The minimum latitude (south)</label>
301
-				<input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) print $globalLatitudeMin; ?>" />
363
+				<input type="text" name="latitudemin" id="latitudemin" value="<?php if (isset($globalLatitudeMin)) {
364
+	print $globalLatitudeMin;
365
+}
366
+?>" />
302 367
 			</p>
303 368
 			<p>
304 369
 				<label for="longitudemax">The maximum longitude (west)</label>
305
-				<input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) print $globalLongitudeMax; ?>" />
370
+				<input type="text" name="longitudemax" id="longitudemax" value="<?php if (isset($globalLongitudeMax)) {
371
+	print $globalLongitudeMax;
372
+}
373
+?>" />
306 374
 			</p>
307 375
 			<p>
308 376
 				<label for="longitudemin">The minimum longitude (east)</label>
309
-				<input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) print $globalLongitudeMin; ?>" />
377
+				<input type="text" name="longitudemin" id="longitudemin" value="<?php if (isset($globalLongitudeMin)) {
378
+	print $globalLongitudeMin;
379
+}
380
+?>" />
310 381
 			</p>
311 382
 			<p>
312 383
 				<label for="latitudecenter">The latitude center</label>
313
-				<input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) print $globalCenterLatitude; ?>" />
384
+				<input type="text" name="latitudecenter" id="latitudecenter" value="<?php if (isset($globalCenterLatitude)) {
385
+	print $globalCenterLatitude;
386
+}
387
+?>" />
314 388
 			</p>
315 389
 			<p>
316 390
 				<label for="longitudecenter">The longitude center</label>
317
-				<input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) print $globalCenterLongitude; ?>" />
391
+				<input type="text" name="longitudecenter" id="longitudecenter" value="<?php if (isset($globalCenterLongitude)) {
392
+	print $globalCenterLongitude;
393
+}
394
+?>" />
318 395
 			</p>
319 396
 			<p>
320 397
 				<label for="livezoom">Default Zoom on live map</label>
321
-				<input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>" />
398
+				<input type="number" name="livezoom" id="livezoom" value="<?php if (isset($globalLiveZoom)) {
399
+	print $globalLiveZoom;
400
+} else {
401
+	print '9';
402
+}
403
+?>" />
322 404
 			</p>
323 405
 			<p>
324 406
 				<label for="squawk_country">Country for squawk usage</label>
325 407
 				<select name="squawk_country" id="squawk_country">
326
-					<option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') print ' selected '; ?>>UK</option>
327
-					<option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') print ' selected '; ?>>NZ</option>
328
-					<option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') print ' selected '; ?>>US</option>
329
-					<option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') print ' selected '; ?>>AU</option>
330
-					<option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') print ' selected '; ?>>NL</option>
331
-					<option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') print ' selected '; ?>>FR</option>
332
-					<option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') print ' selected '; ?>>TR</option>
408
+					<option value="UK"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'UK') {
409
+	print ' selected ';
410
+}
411
+?>>UK</option>
412
+					<option value="NZ"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NZ') {
413
+	print ' selected ';
414
+}
415
+?>>NZ</option>
416
+					<option value="US"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'US') {
417
+	print ' selected ';
418
+}
419
+?>>US</option>
420
+					<option value="AU"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'AU') {
421
+	print ' selected ';
422
+}
423
+?>>AU</option>
424
+					<option value="NL"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'NL') {
425
+	print ' selected ';
426
+}
427
+?>>NL</option>
428
+					<option value="FR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'FR') {
429
+	print ' selected ';
430
+}
431
+?>>FR</option>
432
+					<option value="TR"<?php if (isset($globalSquawkCountry) && $globalSquawkCountry == 'TR') {
433
+	print ' selected ';
434
+}
435
+?>>TR</option>
333 436
 				</select>
334 437
 			</p>
335 438
 		</fieldset>
@@ -338,15 +441,24 @@  discard block
 block discarded – undo
338 441
 			<p><i>Only put in DB flights that are inside a circle</i></p>
339 442
 			<p>
340 443
 				<label for="latitude">Center latitude</label>
341
-				<input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) echo $globalDistanceIgnore['latitude']; ?>" />
444
+				<input type="text" name="zoilatitude" id="latitude" value="<?php if (isset($globalDistanceIgnore['latitude'])) {
445
+	echo $globalDistanceIgnore['latitude'];
446
+}
447
+?>" />
342 448
 			</p>
343 449
 			<p>
344 450
 				<label for="longitude">Center longitude</label>
345
-				<input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) echo $globalDistanceIgnore['longitude']; ?>" />
451
+				<input type="text" name="zoilongitude" id="longitude" value="<?php if (isset($globalDistanceIgnore['longitude'])) {
452
+	echo $globalDistanceIgnore['longitude'];
453
+}
454
+?>" />
346 455
 			</p>
347 456
 			<p>
348 457
 				<label for="Distance">Distance (in km)</label>
349
-				<input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) echo $globalDistanceIgnore['distance']; ?>" />
458
+				<input type="text" name="zoidistance" id="distance" value="<?php if (isset($globalDistanceIgnore['distance'])) {
459
+	echo $globalDistanceIgnore['distance'];
460
+}
461
+?>" />
350 462
 			</p>
351 463
 		</fieldset>
352 464
 		<fieldset id="sourceloc">
@@ -462,11 +574,17 @@  discard block
 block discarded – undo
462 574
 			<div id="flightaware_data">
463 575
 				<p>
464 576
 					<label for="flightawareusername">FlightAware username</label>
465
-					<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" />
577
+					<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) {
578
+	print $globalFlightAwareUsername;
579
+}
580
+?>" />
466 581
 				</p>
467 582
 				<p>
468 583
 					<label for="flightawarepassword">FlightAware password/API key</label>
469
-					<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" />
584
+					<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) {
585
+	print $globalFlightAwarePassword;
586
+}
587
+?>" />
470 588
 				</p>
471 589
 			</div>
472 590
 -->
@@ -508,7 +626,10 @@  discard block
 block discarded – undo
508 626
 								    if (filter_var($source['host'],FILTER_VALIDATE_URL)) {
509 627
 								?>
510 628
 								<td><input type="text" name="host[]" id="host" value="<?php print $source['host']; ?>" /></td>
511
-								<td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) print $source['port']; ?>" /></td>
629
+								<td><input type="text" name="port[]" class="col-xs-2" id="port" value="<?php if (isset($source['port'])) {
630
+	print $source['port'];
631
+}
632
+?>" /></td>
512 633
 								<?php
513 634
 								    } else {
514 635
 									$hostport = explode(':',$source['host']);
@@ -527,35 +648,110 @@  discard block
 block discarded – undo
527 648
 								?>
528 649
 								<td>
529 650
 									<select name="format[]" id="format">
530
-										<option value="auto" <?php if (!isset($source['format'])) print 'selected'; ?>>Auto</option>
531
-										<option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') print 'selected'; ?>>SBS</option>
532
-										<option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') print 'selected'; ?>>TSV</option>
533
-										<option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') print 'selected'; ?>>Raw</option>
534
-										<option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') print 'selected'; ?>>Dump1090 aircraft.json</option>
535
-										<option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') print 'selected'; ?>>APRS</option>
536
-										<option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') print 'selected'; ?>>Radarcape deltadb.txt</option>
537
-										<option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') print 'selected'; ?>>Vatsim</option>
538
-										<option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') print 'selected'; ?>>Virtual Radar Server AircraftList.json</option>
539
-										<option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') print 'selected'; ?>>Virtual Radar Server TCP</option>
540
-										<option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>phpVMS</option>
541
-										<option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') print 'selected'; ?>>Virtual Airline Operations System (VAOS)</option>
542
-										<option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') print 'selected'; ?>>Virtual Airlines Manager</option>
543
-										<option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') print 'selected'; ?>>IVAO</option>
544
-										<option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') print 'selected'; ?>>FlightGear Multiplayer</option>
545
-										<option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') print 'selected'; ?>>FlightGear Singleplayer</option>
546
-										<option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') print 'selected'; ?>>ACARS from acarsdec/acarsdeco2 over UDP</option>
547
-										<option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') print 'selected'; ?>>ACARS SBS-3 over TCP</option>
548
-										<option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') print 'selected'; ?>>NMEA AIS over TCP</option>
549
-										<option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') print 'selected'; ?>>AirWhere website</option>
550
-										<option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') print 'selected'; ?>>HidnSeek Callback</option>
551
-										<option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') print 'selected'; ?>>Blitzortung</option>
651
+										<option value="auto" <?php if (!isset($source['format'])) {
652
+	print 'selected';
653
+}
654
+?>>Auto</option>
655
+										<option value="sbs" <?php if (isset($source['format']) && $source['format'] == 'sbs') {
656
+	print 'selected';
657
+}
658
+?>>SBS</option>
659
+										<option value="tsv" <?php if (isset($source['format']) && $source['format'] == 'tsv') {
660
+	print 'selected';
661
+}
662
+?>>TSV</option>
663
+										<option value="raw" <?php if (isset($source['format']) && $source['format'] == 'raw') {
664
+	print 'selected';
665
+}
666
+?>>Raw</option>
667
+										<option value="aircraftjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftjson') {
668
+	print 'selected';
669
+}
670
+?>>Dump1090 aircraft.json</option>
671
+										<option value="aprs" <?php if (isset($source['format']) && $source['format'] == 'aprs') {
672
+	print 'selected';
673
+}
674
+?>>APRS</option>
675
+										<option value="deltadbtxt" <?php if (isset($source['format']) && $source['format'] == 'deltadbtxt') {
676
+	print 'selected';
677
+}
678
+?>>Radarcape deltadb.txt</option>
679
+										<option value="vatsimtxt" <?php if (isset($source['format']) && $source['format'] == 'vatsimtxt') {
680
+	print 'selected';
681
+}
682
+?>>Vatsim</option>
683
+										<option value="aircraftlistjson" <?php if (isset($source['format']) && $source['format'] == 'aircraftlistjson') {
684
+	print 'selected';
685
+}
686
+?>>Virtual Radar Server AircraftList.json</option>
687
+										<option value="vrstcp" <?php if (isset($source['format']) && $source['format'] == 'vrstcp') {
688
+	print 'selected';
689
+}
690
+?>>Virtual Radar Server TCP</option>
691
+										<option value="phpvmacars" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') {
692
+	print 'selected';
693
+}
694
+?>>phpVMS</option>
695
+										<option value="vaos" <?php if (isset($source['format']) && $source['format'] == 'phpvmacars') {
696
+	print 'selected';
697
+}
698
+?>>Virtual Airline Operations System (VAOS)</option>
699
+										<option value="vam" <?php if (isset($source['format']) && $source['format'] == 'vam') {
700
+	print 'selected';
701
+}
702
+?>>Virtual Airlines Manager</option>
703
+										<option value="whazzup" <?php if (isset($source['format']) && $source['format'] == 'whazzup') {
704
+	print 'selected';
705
+}
706
+?>>IVAO</option>
707
+										<option value="flightgearmp" <?php if (isset($source['format']) && $source['format'] == 'flightgearmp') {
708
+	print 'selected';
709
+}
710
+?>>FlightGear Multiplayer</option>
711
+										<option value="flightgearsp" <?php if (isset($source['format']) && $source['format'] == 'flightgearsp') {
712
+	print 'selected';
713
+}
714
+?>>FlightGear Singleplayer</option>
715
+										<option value="acars" <?php if (isset($source['format']) && $source['format'] == 'acars') {
716
+	print 'selected';
717
+}
718
+?>>ACARS from acarsdec/acarsdeco2 over UDP</option>
719
+										<option value="acarssbs3" <?php if (isset($source['format']) && $source['format'] == 'acarssbs3') {
720
+	print 'selected';
721
+}
722
+?>>ACARS SBS-3 over TCP</option>
723
+										<option value="ais" <?php if (isset($source['format']) && $source['format'] == 'ais') {
724
+	print 'selected';
725
+}
726
+?>>NMEA AIS over TCP</option>
727
+										<option value="airwhere" <?php if (isset($source['format']) && $source['format'] == 'airwhere') {
728
+	print 'selected';
729
+}
730
+?>>AirWhere website</option>
731
+										<option value="hidnseek_callback" <?php if (isset($source['format']) && $source['format'] == 'hidnseek_callback') {
732
+	print 'selected';
733
+}
734
+?>>HidnSeek Callback</option>
735
+										<option value="blitzortung" <?php if (isset($source['format']) && $source['format'] == 'blitzortung') {
736
+	print 'selected';
737
+}
738
+?>>Blitzortung</option>
552 739
 									</select>
553 740
 								</td>
554 741
 								<td>
555
-									<input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) print $source['name']; ?>" />
742
+									<input type="text" name="name[]" id="name" value="<?php if (isset($source['name'])) {
743
+	print $source['name'];
744
+}
745
+?>" />
556 746
 								</td>
557
-								<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>
558
-								<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>
747
+								<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']) {
748
+	print 'checked';
749
+}
750
+?> /></td>
751
+								<td><input type="checkbox" name="noarchive[]" id="noarchive" title="Don't archive this source" value="1" <?php if (isset($source['noarchive']) && $source['noarchive']) {
752
+	print 'checked';
753
+}
754
+?> /></td>
559 755
 								<td>
560 756
 									<select name="timezones[]" id="timezones">
561 757
 								<?php
@@ -565,7 +761,9 @@  discard block
 block discarded – undo
565 761
 											print '<option selected>'.$timezones.'</option>';
566 762
 										} elseif (!isset($source['timezone']) && $timezones == 'UTC') {
567 763
 											print '<option selected>'.$timezones.'</option>';
568
-										} else print '<option>'.$timezones.'</option>';
764
+										} else {
765
+											print '<option>'.$timezones.'</option>';
766
+										}
569 767
 									}
570 768
 								?>
571 769
 									</select>
@@ -617,7 +815,9 @@  discard block
 block discarded – undo
617 815
 									foreach($timezonelist as $timezones){
618 816
 										if ($timezones == 'UTC') {
619 817
 											print '<option selected>'.$timezones.'</option>';
620
-										} else print '<option>'.$timezones.'</option>';
818
+										} else {
819
+											print '<option>'.$timezones.'</option>';
820
+										}
621 821
 									}
622 822
 								?>
623 823
 									</select>
@@ -642,11 +842,17 @@  discard block
 block discarded – undo
642 842
 					<p>Listen UDP server for acarsdec/acarsdeco2/... with <i>daemon-acars.php</i> script</p>
643 843
 					<p>
644 844
 						<label for="acarshost">ACARS UDP host</label>
645
-						<input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) print $globalACARSHost; ?>" />
845
+						<input type="text" name="acarshost" id="acarshost" value="<?php if (isset($globalACARSHost)) {
846
+	print $globalACARSHost;
847
+}
848
+?>" />
646 849
 					</p>
647 850
 					<p>
648 851
 						<label for="acarsport">ACARS UDP port</label>
649
-						<input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) print $globalACARSPort; ?>" />
852
+						<input type="number" name="acarsport" id="acarsport" value="<?php if (isset($globalACARSPort)) {
853
+	print $globalACARSPort;
854
+}
855
+?>" />
650 856
 					</p>
651 857
 				</fieldset>
652 858
 			</div>
@@ -672,17 +878,38 @@  discard block
 block discarded – undo
672 878
 				    <td><input type="url" name="newsurl[]" value="<?php print $feed; ?>"/></td>
673 879
 				    <td>
674 880
 					<select name="newslang[]">
675
-					    <option value="en"<?php if ($lng == 'en') print ' selected'; ?>>English</option>
676
-					    <option value="fr"<?php if ($lng == 'fr') print ' selected'; ?>>French</option>
881
+					    <option value="en"<?php if ($lng == 'en') {
882
+	print ' selected';
883
+}
884
+?>>English</option>
885
+					    <option value="fr"<?php if ($lng == 'fr') {
886
+	print ' selected';
887
+}
888
+?>>French</option>
677 889
 					</select>
678 890
 				    </td>
679 891
 				    <td>
680 892
 					<select name="newstype[]">
681
-					    <option value="global"<?php if ($type == 'global') print ' selected'; ?>>Global</option>
682
-					    <option value="aircraft"<?php if ($type == 'aircraft') print ' selected'; ?>>Aircraft</option>
683
-					    <option value="marine"<?php if ($type == 'marine') print ' selected'; ?>>Marine</option>
684
-					    <option value="tracker"<?php if ($type == 'tracker') print ' selected'; ?>>Tracker</option>
685
-					    <option value="satellite"<?php if ($type == 'Satellite') print ' selected'; ?>>Satellite</option>
893
+					    <option value="global"<?php if ($type == 'global') {
894
+	print ' selected';
895
+}
896
+?>>Global</option>
897
+					    <option value="aircraft"<?php if ($type == 'aircraft') {
898
+	print ' selected';
899
+}
900
+?>>Aircraft</option>
901
+					    <option value="marine"<?php if ($type == 'marine') {
902
+	print ' selected';
903
+}
904
+?>>Marine</option>
905
+					    <option value="tracker"<?php if ($type == 'tracker') {
906
+	print ' selected';
907
+}
908
+?>>Tracker</option>
909
+					    <option value="satellite"<?php if ($type == 'Satellite') {
910
+	print ' selected';
911
+}
912
+?>>Satellite</option>
686 913
 					</select>
687 914
 				    </td>
688 915
 				    <td><input type="button" value="Delete" onclick="deleteRowNews(this)" /> <input type="button" value="Add" onclick="insRowNews()" /></td>
@@ -815,13 +1042,19 @@  discard block
 block discarded – undo
815 1042
 			<div id="schedules_options">
816 1043
 				<p>
817 1044
 					<label for="britishairways">British Airways API Key</label>
818
-					<input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) print $globalBritishAirwaysKey; ?>" />
1045
+					<input type="text" name="britishairways" id="britishairways" value="<?php if (isset($globalBritishAirwaysKey)) {
1046
+	print $globalBritishAirwaysKey;
1047
+}
1048
+?>" />
819 1049
 					<p class="help-block">Register an account on <a href="https://developer.ba.com/">https://developer.ba.com/</a></p>
820 1050
 				</p>
821 1051
 				<!--
822 1052
 				<p>
823 1053
 					<label for="transavia">Transavia Test API Consumer Key</label>
824
-					<input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) print $globalTransaviaKey; ?>" />
1054
+					<input type="text" name="transavia" id="transavia" value="<?php if (isset($globalTransaviaKey)) {
1055
+	print $globalTransaviaKey;
1056
+}
1057
+?>" />
825 1058
 					<p class="help-block">Register an account on <a href="https://developer.transavia.com">https://developer.transavia.com</a></p>
826 1059
 				</p>
827 1060
 				-->
@@ -830,10 +1063,16 @@  discard block
 block discarded – undo
830 1063
 						<b>Lufthansa API Key</b>
831 1064
 						<p>
832 1065
 							<label for="lufthansakey">Key</label>
833
-							<input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) print $globalLufthansaKey['key']; ?>" />
1066
+							<input type="text" name="lufthansakey" id="lufthansakey" value="<?php if (isset($globalLufthansaKey['key'])) {
1067
+	print $globalLufthansaKey['key'];
1068
+}
1069
+?>" />
834 1070
 						</p><p>
835 1071
 							<label for="lufthansasecret">Secret</label>
836
-							<input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) print $globalLufthansaKey['secret']; ?>" />
1072
+							<input type="text" name="lufthansasecret" id="lufthansasecret" value="<?php if (isset($globalLufthansaKey['secret'])) {
1073
+	print $globalLufthansaKey['secret'];
1074
+}
1075
+?>" />
837 1076
 						</p>
838 1077
 					</div>
839 1078
 					<p class="help-block">Register an account on <a href="https://developer.lufthansa.com/page">https://developer.lufthansa.com/page</a></p>
@@ -843,11 +1082,17 @@  discard block
 block discarded – undo
843 1082
 						<b>FlightAware API Key</b>
844 1083
 						<p>
845 1084
 							<label for="flightawareusername">Username</label>
846
-							<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) print $globalFlightAwareUsername; ?>" />
1085
+							<input type="text" name="flightawareusername" id="flightawareusername" value="<?php if (isset($globalFlightAwareUsername)) {
1086
+	print $globalFlightAwareUsername;
1087
+}
1088
+?>" />
847 1089
 						</p>
848 1090
 						<p>
849 1091
 							<label for="flightawarepassword">API key</label>
850
-							<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) print $globalFlightAwarePassword; ?>" />
1092
+							<input type="text" name="flightawarepassword" id="flightawarepassword" value="<?php if (isset($globalFlightAwarePassword)) {
1093
+	print $globalFlightAwarePassword;
1094
+}
1095
+?>" />
851 1096
 						</p>
852 1097
 					</div>
853 1098
 					<p class="help-block">Register an account on <a href="https://www.flightaware.com/">https://www.flightaware.com/</a></p>
@@ -864,16 +1109,28 @@  discard block
 block discarded – undo
864 1109
 				<p>
865 1110
 					<label for="mapmatchingsource">Map Matching source</label>
866 1111
 					<select name="mapmatchingsource" id="mapmatchingsource">
867
-						<option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') print 'selected="selected" '; ?>>GraphHopper</option>
868
-						<option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) print 'selected="selected" '; ?>>OSMR</option>
869
-						<option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') print 'selected="selected" '; ?>>Mapbox</option>
1112
+						<option value="graphhopper" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'graphhopper') {
1113
+	print 'selected="selected" ';
1114
+}
1115
+?>>GraphHopper</option>
1116
+						<option value="osmr" <?php if ((isset($globalMapMatchingSource) && $globalMapMatchingSource == 'osmr') || !isset($globalMatchingSource)) {
1117
+	print 'selected="selected" ';
1118
+}
1119
+?>>OSMR</option>
1120
+						<option value="mapbox" <?php if (isset($globalMapMatchingSource) && $globalMapMatchingSource == 'mapbox') {
1121
+	print 'selected="selected" ';
1122
+}
1123
+?>>Mapbox</option>
870 1124
 					</select>
871 1125
 					<p class="help-block">Mapbox need the API Key defined in map section</p>
872 1126
 				</p>
873 1127
 				<br />
874 1128
 				<p>
875 1129
 					<label for="graphhopper">GraphHopper API Key</label>
876
-					<input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) print $globalGraphHopperKey; ?>" />
1130
+					<input type="text" name="graphhopper" id="graphhopper" value="<?php if (isset($globalGraphHopperKey)) {
1131
+	print $globalGraphHopperKey;
1132
+}
1133
+?>" />
877 1134
 					<p class="help-block">Register an account on <a href="https://www.graphhopper.com/">https://www.graphhopper.com/</a></p>
878 1135
 				</p>
879 1136
 			</div>
@@ -891,7 +1148,10 @@  discard block
 block discarded – undo
891 1148
 			</p>
892 1149
 			<p>
893 1150
 				<label for="notamsource">URL of your feed from notaminfo.com</label>
894
-				<input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) print $globalNOTAMSource; ?>" />
1151
+				<input type="text" name="notamsource" id="notamsource" value="<?php if (isset($globalNOTAMSource)) {
1152
+	print $globalNOTAMSource;
1153
+}
1154
+?>" />
895 1155
 				<p class="help-block">If you want to use world NOTAM from FlightAirMap website, leave it blank</p>
896 1156
 			</p>
897 1157
 			<br />
@@ -907,14 +1167,20 @@  discard block
 block discarded – undo
907 1167
 			<div id="metarsrc">
908 1168
 				<p>
909 1169
 					<label for="metarsource">URL of your METAR source</label>
910
-					<input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) print $globalMETARurl; ?>" />
1170
+					<input type="text" name="metarsource" id="metarsource" value="<?php if (isset($globalMETARurl)) {
1171
+	print $globalMETARurl;
1172
+}
1173
+?>" />
911 1174
 					<p class="help-block">Use {icao} to specify where we replace by airport icao. ex : http://metar.vatsim.net/metar.php?id={icao}</p>
912 1175
 				</p>
913 1176
 			</div>
914 1177
 			<br />
915 1178
 			<p>
916 1179
 				<label for="bitly">Bit.ly access token api (used in search page)</label>
917
-				<input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) print $globalBitlyAccessToken; ?>" />
1180
+				<input type="text" name="bitly" id="bitly" value="<?php if (isset($globalBitlyAccessToken)) {
1181
+	print $globalBitlyAccessToken;
1182
+}
1183
+?>" />
918 1184
 			</p>
919 1185
 			<br />
920 1186
 			<p>
@@ -930,11 +1196,26 @@  discard block
 block discarded – undo
930 1196
 			<p>
931 1197
 				<label for="geoid_source">Geoid Source</label>
932 1198
 				<select name="geoid_source" id="geoid_source">
933
-					<option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') print ' selected="selected"'; ?>>EGM96 15' (2.1MB)</option>
934
-					<option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') print ' selected="selected"'; ?>>EGM96 5' (19MB)</option>
935
-					<option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') print ' selected="selected"'; ?>>EGM2008 5' (19MB)</option>
936
-					<option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') print ' selected="selected"'; ?>>EGM2008 2.5' (75MB)</option>
937
-					<option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') print ' selected="selected"'; ?>>EGM2008 1' (470MB)</option>
1199
+					<option value="egm96-15"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-15') {
1200
+	print ' selected="selected"';
1201
+}
1202
+?>>EGM96 15' (2.1MB)</option>
1203
+					<option value="egm96-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm96-5') {
1204
+	print ' selected="selected"';
1205
+}
1206
+?>>EGM96 5' (19MB)</option>
1207
+					<option value="egm2008-5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-5') {
1208
+	print ' selected="selected"';
1209
+}
1210
+?>>EGM2008 5' (19MB)</option>
1211
+					<option value="egm2008-2_5"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-2_5') {
1212
+	print ' selected="selected"';
1213
+}
1214
+?>>EGM2008 2.5' (75MB)</option>
1215
+					<option value="egm2008-1"<?php if (isset($globalGeoidSource) && $globalGeoidSource == 'egm2008-1') {
1216
+	print ' selected="selected"';
1217
+}
1218
+?>>EGM2008 1' (470MB)</option>
938 1219
 				</select>
939 1220
 				<p class="help-block">The geoid is approximated by an "earth gravity model" (EGM).</p>
940 1221
 			</p>
@@ -956,7 +1237,12 @@  discard block
 block discarded – undo
956 1237
 			</p>
957 1238
 			<p>
958 1239
 				<label for="archivemonths">Generate statistics, delete or put in archive flights older than xx months</label>
959
-				<input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) print $globalArchiveMonths; else echo '1'; ?>" />
1240
+				<input type="number" name="archivemonths" id="archivemonths" value="<?php if (isset($globalArchiveMonths)) {
1241
+	print $globalArchiveMonths;
1242
+} else {
1243
+	echo '1';
1244
+}
1245
+?>" />
960 1246
 				<p class="help-block">0 to disable, delete old flight if <i>Archive all flights data</i> is disabled</p>
961 1247
 			</p>
962 1248
 			<p>
@@ -966,12 +1252,22 @@  discard block
 block discarded – undo
966 1252
 			</p>
967 1253
 			<p>
968 1254
 				<label for="archivekeepmonths">Keep flights data for xx months in archive</label>
969
-				<input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) print $globalArchiveKeepMonths; else echo '1'; ?>" />
1255
+				<input type="number" name="archivekeepmonths" id="archivekeepmonths" value="<?php if (isset($globalArchiveKeepMonths)) {
1256
+	print $globalArchiveKeepMonths;
1257
+} else {
1258
+	echo '1';
1259
+}
1260
+?>" />
970 1261
 				<p class="help-block">0 to disable</p>
971 1262
 			</p>
972 1263
 			<p>
973 1264
 				<label for="archivekeeptrackmonths">Keep flights track data for xx months in archive</label>
974
-				<input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) print $globalArchiveKeepTrackMonths; else echo '1'; ?>" />
1265
+				<input type="number" name="archivekeeptrackmonths" id="archivekeeptrackmonths" value="<?php if (isset($globalArchiveKeepTrackMonths)) {
1266
+	print $globalArchiveKeepTrackMonths;
1267
+} else {
1268
+	echo '1';
1269
+}
1270
+?>" />
975 1271
 				<p class="help-block">0 to disable, should be less or egal to <i>Keep flights data</i> value</p>
976 1272
 			</p>
977 1273
 			<br />
@@ -981,7 +1277,12 @@  discard block
 block discarded – undo
981 1277
 				<p class="help-block">Uncheck if the script is running as cron job. You should always run it as daemon when it's possible.</p>
982 1278
 				<div id="cronends"> 
983 1279
 					<label for="cronend">Run script for xx seconds</label>
984
-					<input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) print $globalCronEnd; else print '0'; ?>" />
1280
+					<input type="number" name="cronend" id="cronend" value="<?php if (isset($globalCronEnd)) {
1281
+	print $globalCronEnd;
1282
+} else {
1283
+	print '0';
1284
+}
1285
+?>" />
985 1286
 					<p class="help-block">Set to 0 to disable. Should be disabled if source is URL.</p>
986 1287
 				</div>
987 1288
 			</p>
@@ -1034,20 +1335,40 @@  discard block
 block discarded – undo
1034 1335
 			<br />
1035 1336
 			<p>
1036 1337
 				<label for="refresh">Show flights detected since xxx seconds</label>
1037
-				<input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) echo $globalLiveInterval; else echo '200'; ?>" />
1338
+				<input type="number" name="refresh" id="refresh" value="<?php if (isset($globalLiveInterval)) {
1339
+	echo $globalLiveInterval;
1340
+} else {
1341
+	echo '200';
1342
+}
1343
+?>" />
1038 1344
 			</p>
1039 1345
 			<p>
1040 1346
 				<label for="maprefresh">Live map refresh (in seconds)</label>
1041
-				<input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) echo $globalMapRefresh; else echo '30'; ?>" />
1347
+				<input type="number" name="maprefresh" id="maprefresh" value="<?php if (isset($globalMapRefresh)) {
1348
+	echo $globalMapRefresh;
1349
+} else {
1350
+	echo '30';
1351
+}
1352
+?>" />
1042 1353
 			</p>
1043 1354
 			<p>
1044 1355
 				<label for="mapidle">Map idle timeout (in minutes)</label>
1045
-				<input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) echo $globalMapIdleTimeout; else echo '30'; ?>" />
1356
+				<input type="number" name="mapidle" id="mapidle" value="<?php if (isset($globalMapIdleTimeout)) {
1357
+	echo $globalMapIdleTimeout;
1358
+} else {
1359
+	echo '30';
1360
+}
1361
+?>" />
1046 1362
 				<p class="help-block">0 to disable</p>
1047 1363
 			</p>
1048 1364
 			<p>
1049 1365
 				<label for="minfetch">HTTP/file source fetch every xxx seconds</label>
1050
-				<input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) echo $globalMinFetch; else echo '20'; ?>" />
1366
+				<input type="number" name="minfetch" id="minfetch" value="<?php if (isset($globalMinFetch)) {
1367
+	echo $globalMinFetch;
1368
+} else {
1369
+	echo '20';
1370
+}
1371
+?>" />
1051 1372
 			</p>
1052 1373
 			<p>
1053 1374
 				<label for="bbox">Only display flights that we can see on screen (bounding box)</label>
@@ -1061,12 +1382,20 @@  discard block
 block discarded – undo
1061 1382
 			<br />
1062 1383
 			<p>
1063 1384
 				<label for="closestmindist">Distance to airport set as arrival (in km)</label>
1064
-				<input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) echo $globalClosestMinDist; else echo '50'; ?>" />
1385
+				<input type="number" name="closestmindist" id="closestmindist" value="<?php if (isset($globalClosestMinDist)) {
1386
+	echo $globalClosestMinDist;
1387
+} else {
1388
+	echo '50';
1389
+}
1390
+?>" />
1065 1391
 			</p>
1066 1392
 			<br />
1067 1393
 			<p>
1068 1394
 				<label for="aircraftsize">Size of aircraft icon on map (default to 30px if zoom > 7 else 15px), empty to default</label>
1069
-				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) echo $globalAircraftSize;?>" />
1395
+				<input type="number" name="aircraftsize" id="aircraftsize" value="<?php if (isset($globalAircraftSize)) {
1396
+	echo $globalAircraftSize;
1397
+}
1398
+?>" />
1070 1399
 			</p>
1071 1400
 			<br />
1072 1401
 			<p>
@@ -1085,7 +1414,12 @@  discard block
 block discarded – undo
1085 1414
 			    if (extension_loaded('gd') && function_exists('gd_info')) {
1086 1415
 			?>
1087 1416
 				<label for="aircrafticoncolor">Color of aircraft icon on map</label>
1088
-				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) echo $globalAircraftIconColor; else echo '1a3151'; ?>" />
1417
+				<input type="color" name="aircrafticoncolor" id="aircrafticoncolor" value="#<?php if (isset($globalAircraftIconColor)) {
1418
+	echo $globalAircraftIconColor;
1419
+} else {
1420
+	echo '1a3151';
1421
+}
1422
+?>" />
1089 1423
 			<?php
1090 1424
 				if (!is_writable('../cache')) {
1091 1425
 			?>
@@ -1103,14 +1437,27 @@  discard block
 block discarded – undo
1103 1437
 			<p>
1104 1438
 				<label for="airportzoom">Zoom level minimum to see airports icons</label>
1105 1439
 				<div class="range">
1106
-					<input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?>" />
1107
-					<output id="range"><?php if (isset($globalAirportZoom)) echo $globalAirportZoom; else echo '7'; ?></output>
1440
+					<input type="range" name="airportzoom" id="airportzoom" value="<?php if (isset($globalAirportZoom)) {
1441
+	echo $globalAirportZoom;
1442
+} else {
1443
+	echo '7';
1444
+}
1445
+?>" />
1446
+					<output id="range"><?php if (isset($globalAirportZoom)) {
1447
+	echo $globalAirportZoom;
1448
+} else {
1449
+	echo '7';
1450
+}
1451
+?></output>
1108 1452
 				</div>
1109 1453
 			</p>
1110 1454
 			<br />
1111 1455
 			<p>
1112 1456
 				<label for="customcss">Custom CSS web path</label>
1113
-				<input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) echo $globalCustomCSS; ?>" />
1457
+				<input type="text" name="customcss" id="customcss" value="<?php if (isset($globalCustomCSS)) {
1458
+	echo $globalCustomCSS;
1459
+}
1460
+?>" />
1114 1461
 			</p>
1115 1462
 		</fieldset>
1116 1463
 		<input type="submit" name="submit" value="Create/Update database & write setup" />
@@ -1137,8 +1484,12 @@  discard block
 block discarded – undo
1137 1484
 	$dbhost = filter_input(INPUT_POST,'dbhost',FILTER_SANITIZE_STRING);
1138 1485
 	$dbport = filter_input(INPUT_POST,'dbport',FILTER_SANITIZE_STRING);
1139 1486
 
1140
-	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) $error .= 'Mysql driver for PDO must be loaded';
1141
-	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) $error .= 'PosgreSQL driver for PDO must be loaded';
1487
+	if ($dbtype == 'mysql' && !extension_loaded('pdo_mysql')) {
1488
+		$error .= 'Mysql driver for PDO must be loaded';
1489
+	}
1490
+	if ($dbtype == 'pgsql' && !extension_loaded('pdo_pgsql')) {
1491
+		$error .= 'PosgreSQL driver for PDO must be loaded';
1492
+	}
1142 1493
 	
1143 1494
 	$_SESSION['database_root'] = $dbroot;
1144 1495
 	$_SESSION['database_rootpass'] = $dbrootpass;
@@ -1206,15 +1557,23 @@  discard block
 block discarded – undo
1206 1557
 	$source_city = $_POST['source_city'];
1207 1558
 	$source_country = $_POST['source_country'];
1208 1559
 	$source_ref = $_POST['source_ref'];
1209
-	if (isset($source_id)) $source_id = $_POST['source_id'];
1210
-	else $source_id = array();
1560
+	if (isset($source_id)) {
1561
+		$source_id = $_POST['source_id'];
1562
+	} else {
1563
+		$source_id = array();
1564
+	}
1211 1565
 	
1212 1566
 	$sources = array();
1213 1567
 	foreach ($source_name as $keys => $name) {
1214
-	    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]);
1215
-	    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]);
1568
+	    if (isset($source_id[$keys])) {
1569
+	    	$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]);
1570
+	    } else {
1571
+	    	$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]);
1572
+	    }
1573
+	}
1574
+	if (count($sources) > 0) {
1575
+		$_SESSION['sources'] = $sources;
1216 1576
 	}
1217
-	if (count($sources) > 0) $_SESSION['sources'] = $sources;
1218 1577
 
1219 1578
 	$newsurl = $_POST['newsurl'];
1220 1579
 	$newslng = $_POST['newslang'];
@@ -1227,7 +1586,9 @@  discard block
 block discarded – undo
1227 1586
 		$lng = $newslng[$newskey];
1228 1587
 		if (isset($newsfeeds[$type][$lng])) {
1229 1588
 		    $newsfeeds[$type][$lng] = array_merge($newsfeeds[$type][$lng],array($url));
1230
-		} else $newsfeeds[$type][$lng] = array($url);
1589
+		} else {
1590
+			$newsfeeds[$type][$lng] = array($url);
1591
+		}
1231 1592
 	    }
1232 1593
 	}
1233 1594
 	$settings = array_merge($settings,array('globalNewsFeeds' => $newsfeeds));
@@ -1251,17 +1612,29 @@  discard block
 block discarded – undo
1251 1612
 	$datasource = filter_input(INPUT_POST,'datasource',FILTER_SANITIZE_STRING);
1252 1613
 
1253 1614
 	$globalaircraft = filter_input(INPUT_POST,'globalaircraft',FILTER_SANITIZE_STRING);
1254
-	if ($globalaircraft == 'aircraft') $settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
1255
-	else $settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
1615
+	if ($globalaircraft == 'aircraft') {
1616
+		$settings = array_merge($settings,array('globalAircraft' => 'TRUE'));
1617
+	} else {
1618
+		$settings = array_merge($settings,array('globalAircraft' => 'FALSE'));
1619
+	}
1256 1620
 	$globaltracker = filter_input(INPUT_POST,'globaltracker',FILTER_SANITIZE_STRING);
1257
-	if ($globaltracker == 'tracker') $settings = array_merge($settings,array('globalTracker' => 'TRUE'));
1258
-	else $settings = array_merge($settings,array('globalTracker' => 'FALSE'));
1621
+	if ($globaltracker == 'tracker') {
1622
+		$settings = array_merge($settings,array('globalTracker' => 'TRUE'));
1623
+	} else {
1624
+		$settings = array_merge($settings,array('globalTracker' => 'FALSE'));
1625
+	}
1259 1626
 	$globalmarine = filter_input(INPUT_POST,'globalmarine',FILTER_SANITIZE_STRING);
1260
-	if ($globalmarine == 'marine') $settings = array_merge($settings,array('globalMarine' => 'TRUE'));
1261
-	else $settings = array_merge($settings,array('globalMarine' => 'FALSE'));
1627
+	if ($globalmarine == 'marine') {
1628
+		$settings = array_merge($settings,array('globalMarine' => 'TRUE'));
1629
+	} else {
1630
+		$settings = array_merge($settings,array('globalMarine' => 'FALSE'));
1631
+	}
1262 1632
 	$globalsatellite = filter_input(INPUT_POST,'globalsatellite',FILTER_SANITIZE_STRING);
1263
-	if ($globalsatellite == 'satellite') $settings = array_merge($settings,array('globalSatellite' => 'TRUE'));
1264
-	else $settings = array_merge($settings,array('globalSatellite' => 'FALSE'));
1633
+	if ($globalsatellite == 'satellite') {
1634
+		$settings = array_merge($settings,array('globalSatellite' => 'TRUE'));
1635
+	} else {
1636
+		$settings = array_merge($settings,array('globalSatellite' => 'FALSE'));
1637
+	}
1265 1638
 
1266 1639
 /*	
1267 1640
 	$globalSBS1Hosts = array();
@@ -1283,23 +1656,37 @@  discard block
 block discarded – undo
1283 1656
 	$name = $_POST['name'];
1284 1657
 	$format = $_POST['format'];
1285 1658
 	$timezones = $_POST['timezones'];
1286
-	if (isset($_POST['sourcestats'])) $sourcestats = $_POST['sourcestats'];
1287
-	else $sourcestats = array();
1288
-	if (isset($_POST['noarchive'])) $noarchive = $_POST['noarchive'];
1289
-	else $noarchive = array();
1659
+	if (isset($_POST['sourcestats'])) {
1660
+		$sourcestats = $_POST['sourcestats'];
1661
+	} else {
1662
+		$sourcestats = array();
1663
+	}
1664
+	if (isset($_POST['noarchive'])) {
1665
+		$noarchive = $_POST['noarchive'];
1666
+	} else {
1667
+		$noarchive = array();
1668
+	}
1290 1669
 	$gSources = array();
1291 1670
 	$forcepilots = false;
1292 1671
 	foreach ($host as $key => $h) {
1293
-		if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) $cov = 'TRUE';
1294
-		else $cov = 'FALSE';
1295
-		if (isset($noarchive[$key]) && $noarchive[$key] == 1) $arch = 'TRUE';
1296
-		else $arch = 'FALSE';
1672
+		if (isset($sourcestats[$key]) && $sourcestats[$key] == 1) {
1673
+			$cov = 'TRUE';
1674
+		} else {
1675
+			$cov = 'FALSE';
1676
+		}
1677
+		if (isset($noarchive[$key]) && $noarchive[$key] == 1) {
1678
+			$arch = 'TRUE';
1679
+		} else {
1680
+			$arch = 'FALSE';
1681
+		}
1297 1682
 		if (strpos($format[$key],'_callback')) {
1298 1683
 			$gSources[] = array('host' => $h, 'pass' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'TRUE');
1299 1684
 		} elseif ($h != '' || $name[$key] != '') {
1300 1685
 			$gSources[] = array('host' => $h, 'port' => $port[$key],'name' => $name[$key],'format' => $format[$key],'sourcestats' => $cov,'noarchive' => $arch,'timezone' => $timezones[$key],'callback' => 'FALSE');
1301 1686
 		}
1302
-		if ($format[$key] == 'airwhere') $forcepilots = true;
1687
+		if ($format[$key] == 'airwhere') {
1688
+			$forcepilots = true;
1689
+		}
1303 1690
 	}
1304 1691
 	$settings = array_merge($settings,array('globalSources' => $gSources));
1305 1692
 
@@ -1330,7 +1717,9 @@  discard block
 block discarded – undo
1330 1717
 	$zoidistance = filter_input(INPUT_POST,'zoidistance',FILTER_SANITIZE_NUMBER_INT);
1331 1718
 	if ($zoilatitude != '' && $zoilongitude != '' && $zoidistance != '') {
1332 1719
 		$settings = array_merge($settings,array('globalDistanceIgnore' => array('latitude' => $zoilatitude,'longitude' => $zoilongitude,'distance' => $zoidistance)));
1333
-	} else $settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1720
+	} else {
1721
+		$settings = array_merge($settings,array('globalDistanceIgnore' => array()));
1722
+	}
1334 1723
 
1335 1724
 	$refresh = filter_input(INPUT_POST,'refresh',FILTER_SANITIZE_NUMBER_INT);
1336 1725
 	$settings = array_merge($settings,array('globalLiveInterval' => $refresh));
@@ -1371,7 +1760,9 @@  discard block
 block discarded – undo
1371 1760
 
1372 1761
 	// Create in settings.php keys not yet configurable if not already here
1373 1762
 	//if (!isset($globalImageBingKey)) $settings = array_merge($settings,array('globalImageBingKey' => ''));
1374
-	if (!isset($globalDebug)) $settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1763
+	if (!isset($globalDebug)) {
1764
+		$settings = array_merge($settings,array('globalDebug' => 'TRUE'));
1765
+	}
1375 1766
 
1376 1767
 	$resetyearstats = filter_input(INPUT_POST,'resetyearstats',FILTER_SANITIZE_STRING);
1377 1768
 	if ($resetyearstats == 'resetyearstats') {
@@ -1414,37 +1805,56 @@  discard block
 block discarded – undo
1414 1805
 	}
1415 1806
 */
1416 1807
 	$settings = array_merge($settings,array('globalFlightAware' => 'FALSE'));
1417
-	if ($globalsbs == 'sbs') $settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1418
-	else $settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1419
-	if ($globalaprs == 'aprs') $settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1420
-	else $settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1808
+	if ($globalsbs == 'sbs') {
1809
+		$settings = array_merge($settings,array('globalSBS1' => 'TRUE'));
1810
+	} else {
1811
+		$settings = array_merge($settings,array('globalSBS1' => 'FALSE'));
1812
+	}
1813
+	if ($globalaprs == 'aprs') {
1814
+		$settings = array_merge($settings,array('globalAPRS' => 'TRUE'));
1815
+	} else {
1816
+		$settings = array_merge($settings,array('globalAPRS' => 'FALSE'));
1817
+	}
1421 1818
 	$va = false;
1422 1819
 	if ($globalivao == 'ivao') {
1423 1820
 		$settings = array_merge($settings,array('globalIVAO' => 'TRUE'));
1424 1821
 		$va = true;
1425
-	} else $settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1822
+	} else {
1823
+		$settings = array_merge($settings,array('globalIVAO' => 'FALSE'));
1824
+	}
1426 1825
 	if ($globalvatsim == 'vatsim') {
1427 1826
 		$settings = array_merge($settings,array('globalVATSIM' => 'TRUE'));
1428 1827
 		$va = true;
1429
-	} else $settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1828
+	} else {
1829
+		$settings = array_merge($settings,array('globalVATSIM' => 'FALSE'));
1830
+	}
1430 1831
 	if ($globalphpvms == 'phpvms') {
1431 1832
 		$settings = array_merge($settings,array('globalphpVMS' => 'TRUE'));
1432 1833
 		$va = true;
1433
-	} else $settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1834
+	} else {
1835
+		$settings = array_merge($settings,array('globalphpVMS' => 'FALSE'));
1836
+	}
1434 1837
 	if ($globalvam == 'vam') {
1435 1838
 		$settings = array_merge($settings,array('globalVAM' => 'TRUE'));
1436 1839
 		$va = true;
1437
-	} else $settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1840
+	} else {
1841
+		$settings = array_merge($settings,array('globalVAM' => 'FALSE'));
1842
+	}
1438 1843
 	if ($va) {
1439 1844
 		$settings = array_merge($settings,array('globalSchedulesFetch' => 'FALSE','globalTranslationFetch' => 'FALSE'));
1440
-	} else $settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1845
+	} else {
1846
+		$settings = array_merge($settings,array('globalSchedulesFetch' => 'TRUE','globalTranslationFetch' => 'TRUE'));
1847
+	}
1441 1848
 	if ($globalva == 'va' || $va) {
1442 1849
 		$settings = array_merge($settings,array('globalVA' => 'TRUE'));
1443 1850
 		$settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE'));
1444 1851
 	} else {
1445 1852
 		$settings = array_merge($settings,array('globalVA' => 'FALSE'));
1446
-		if ($forcepilots) $settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE'));
1447
-		else $settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE'));
1853
+		if ($forcepilots) {
1854
+			$settings = array_merge($settings,array('globalUsePilot' => 'TRUE','globalUseOwner' => 'FALSE'));
1855
+		} else {
1856
+			$settings = array_merge($settings,array('globalUsePilot' => 'FALSE','globalUseOwner' => 'TRUE'));
1857
+		}
1448 1858
 	}
1449 1859
 	
1450 1860
 	
@@ -1667,7 +2077,9 @@  discard block
 block discarded – undo
1667 2077
 	$graphhopper = filter_input(INPUT_POST,'graphhopper',FILTER_SANITIZE_STRING);
1668 2078
 	$settings = array_merge($settings,array('globalGraphHopperKey' => $graphhopper));
1669 2079
 
1670
-	if (!isset($globalTransaction)) $settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
2080
+	if (!isset($globalTransaction)) {
2081
+		$settings = array_merge($settings,array('globalTransaction' => 'TRUE'));
2082
+	}
1671 2083
 
1672 2084
 	// Set some defaults values...
1673 2085
 	if (!isset($globalAircraftImageSources)) {
@@ -1682,15 +2094,23 @@  discard block
 block discarded – undo
1682 2094
 
1683 2095
 	$settings = array_merge($settings,array('globalInstalled' => 'TRUE'));
1684 2096
 
1685
-	if ($error == '') settings::modify_settings($settings);
1686
-	if ($error == '') settings::comment_settings($settings_comment);
2097
+	if ($error == '') {
2098
+		settings::modify_settings($settings);
2099
+	}
2100
+	if ($error == '') {
2101
+		settings::comment_settings($settings_comment);
2102
+	}
1687 2103
 	if ($error != '') {
1688 2104
 		print '<div class="info column">'.$error.'</div>';
1689 2105
 		require('../footer.php');
1690 2106
 		exit;
1691 2107
 	} else {
1692
-		if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') $_SESSION['waypoints'] = 1;
1693
-		if (isset($_POST['owner']) && $_POST['owner'] == 'owner') $_SESSION['owner'] = 1;
2108
+		if (isset($_POST['waypoints']) && $_POST['waypoints'] == 'waypoints') {
2109
+			$_SESSION['waypoints'] = 1;
2110
+		}
2111
+		if (isset($_POST['owner']) && $_POST['owner'] == 'owner') {
2112
+			$_SESSION['owner'] = 1;
2113
+		}
1694 2114
 		if (isset($_POST['createdb'])) {
1695 2115
 			$_SESSION['install'] = 'database_create';
1696 2116
 		} else {
@@ -1727,10 +2147,18 @@  discard block
 block discarded – undo
1727 2147
 	$popw = false;
1728 2148
 	foreach ($_SESSION['done'] as $done) {
1729 2149
 	    print '<li>'.$done.'....<strong>SUCCESS</strong></li>';
1730
-	    if ($done == 'Create database') $pop = true;
1731
-	    if ($_SESSION['install'] == 'database_create') $pop = true;
1732
-	    if ($_SESSION['install'] == 'database_import') $popi = true;
1733
-	    if ($_SESSION['install'] == 'waypoints') $popw = true;
2150
+	    if ($done == 'Create database') {
2151
+	    	$pop = true;
2152
+	    }
2153
+	    if ($_SESSION['install'] == 'database_create') {
2154
+	    	$pop = true;
2155
+	    }
2156
+	    if ($_SESSION['install'] == 'database_import') {
2157
+	    	$popi = true;
2158
+	    }
2159
+	    if ($_SESSION['install'] == 'waypoints') {
2160
+	    	$popw = true;
2161
+	    }
1734 2162
 	}
1735 2163
 	if ($pop) {
1736 2164
 	    sleep(5);
@@ -1741,7 +2169,9 @@  discard block
 block discarded – undo
1741 2169
 	} else if ($popw) {
1742 2170
 	    sleep(5);
1743 2171
 	    print '<li>Populate waypoints database....<img src="../images/loading.gif" /></li>';
1744
-	} else print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
2172
+	} else {
2173
+		print '<li>Update schema if needed....<img src="../images/loading.gif" /></li>';
2174
+	}
1745 2175
 	print '</div></ul>';
1746 2176
 	print '<div id="error"></div>';
1747 2177
 /*	foreach ($_SESSION['done'] as $done) {
Please login to merge, or discard this patch.