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