Completed
Push — master ( 48e459...9276af )
by Yannick
06:03
created
airport.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	  $limit_start = 0;
14 14
 	  $limit_end = 25;
15 15
 	  $absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
Please login to merge, or discard this patch.
search.php 1 patch
Braces   +116 added lines, -32 removed lines patch added patch discarded remove patch
@@ -26,8 +26,12 @@  discard block
 block discarded – undo
26 26
 	} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
27 27
 		$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00";
28 28
 		$sql_date = $end_date;
29
-	} else $sql_date = '';
30
-} else $sql_date = '';
29
+	} else {
30
+		$sql_date = '';
31
+	}
32
+	} else {
33
+	$sql_date = '';
34
+}
31 35
 
32 36
 if (isset($_GET['highest_altitude'])) {
33 37
 	//for altitude manipulation
@@ -41,8 +45,12 @@  discard block
 block discarded – undo
41 45
 	} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
42 46
 		$start_altitude = $_GET['lowest_altitude'].",60000";
43 47
 		$sql_altitude = $start_altitude;
44
-	} else $sql_altitude = '';
45
-} else $sql_altitude = '';
48
+	} else {
49
+		$sql_altitude = '';
50
+	}
51
+	} else {
52
+	$sql_altitude = '';
53
+}
46 54
 
47 55
 //calculuation for the pagination
48 56
 if(!isset($_GET['limit']))
@@ -60,7 +68,7 @@  discard block
 block discarded – undo
60 68
 		$limit_end = $_GET['number_results'];
61 69
 		$absolute_difference = $_GET['number_results'];
62 70
 	}
63
-}  else {
71
+} else {
64 72
 	$limit_explode = explode(",", $_GET['limit']);
65 73
 	$limit_start = $limit_explode[0];
66 74
 	$limit_end = $limit_explode[1];
@@ -93,10 +101,15 @@  discard block
 block discarded – undo
93 101
 	$origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING);
94 102
 	$dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT);
95 103
 	if ($dist != '') {
96
-		if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934;
97
-		elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852;
104
+		if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') {
105
+			$dist = $dist*1.60934;
106
+		} elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') {
107
+			$dist = $dist*1.852;
108
+		}
109
+	}
110
+	if (!isset($sql_date)) {
111
+		$sql_date = '';
98 112
 	}
99
-	if (!isset($sql_date)) $sql_date = '';
100 113
 	if ($archive == 1) {
101 114
 		$SpotterArchive = new SpotterArchive();
102 115
 		$spotter_array = $SpotterArchive->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist);
@@ -164,7 +177,10 @@  discard block
 block discarded – undo
164 177
 		if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; }
165 178
 		if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; }
166 179
 		if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$_GET['registration'].'</span> '; }
167
-		if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; }
180
+		if (isset($_GET['highlights'])) {
181
+			if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> ';
182
+		}
183
+		}
168 184
 		if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; }
169 185
 		if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; }
170 186
 		if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; }
@@ -275,7 +291,10 @@  discard block
 block discarded – undo
275 291
 			<div class="form-group">
276 292
 				<label class="control-label col-sm-2"><?php echo _("Keywords"); ?></label>
277 293
 				<div class="col-sm-10">
278
-					<input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) print $_GET['q']; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" />
294
+					<input type="text" class="form-control" id="q" name="q" value="<?php if (isset($_GET['q'])) {
295
+	print $_GET['q'];
296
+}
297
+?>" size="10" placeholder="<?php echo _("Keywords"); ?>" />
279 298
 				</div>
280 299
 			</div>
281 300
 		</fieldset>
@@ -290,7 +309,10 @@  discard block
 block discarded – undo
290 309
 					    </select>
291 310
 					</div>
292 311
 				</div>
293
-				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
312
+				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) {
313
+	print $_GET['manufacturer'];
314
+}
315
+?>')</script>
294 316
 				<div class="form-group">
295 317
 					<label class="control-label col-sm-2"><?php echo _("Type"); ?></label>
296 318
 						<div class="col-sm-10">
@@ -299,11 +321,17 @@  discard block
 block discarded – undo
299 321
 							</select>
300 322
 						</div>
301 323
 				</div>
302
-				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
324
+				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) {
325
+	print $_GET['aircraft_icao'];
326
+}
327
+?>');</script>
303 328
 				<div class="form-group">
304 329
 					<label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> 
305 330
 					<div class="col-sm-10">
306
-						<input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) print $_GET['registration']; ?>" size="8" />
331
+						<input type="text" class="form-control" name="registration" value="<?php if (isset($_GET['registration'])) {
332
+	print $_GET['registration'];
333
+}
334
+?>" size="8" />
307 335
 					</div>
308 336
 				</div>
309 337
 <?php
@@ -312,22 +340,31 @@  discard block
 block discarded – undo
312 340
 				<div class="form-group">
313 341
 					<label class="control-label col-sm-2"><?php echo _("Pilot id"); ?></label> 
314 342
 					<div class="col-sm-10">
315
-						<input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) print $_GET['pilot_id']; ?>" size="15" />
343
+						<input type="text" class="form-control" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) {
344
+	print $_GET['pilot_id'];
345
+}
346
+?>" size="15" />
316 347
 					</div>
317 348
 				</div>
318 349
 				<div class="form-group">
319 350
 					<label class="control-label col-sm-2"><?php echo _("Pilot name"); ?></label> 
320 351
 					<div class="col-sm-10">
321
-						<input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $_GET['pilot_name']; ?>" size="15" />
352
+						<input type="text" class="form-control" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) {
353
+	print $_GET['pilot_name'];
354
+}
355
+?>" size="15" />
322 356
 					</div>
323 357
 				</div>
324 358
 <?php
325
-}else {
359
+} else {
326 360
 ?>
327 361
 				<div class="form-group">
328 362
 					<label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> 
329 363
 					<div class="col-sm-10">
330
-						<input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) print $_GET['owner']; ?>" size="15" />
364
+						<input type="text" class="form-control" name="owner" value="<?php if (isset($_GET['owner'])) {
365
+	print $_GET['owner'];
366
+}
367
+?>" size="15" />
331 368
 					</div>
332 369
 				</div>
333 370
 <?php
@@ -335,8 +372,14 @@  discard block
 block discarded – undo
335 372
 ?>
336 373
 				<div class="form-group">
337 374
 					<div class="col-sm-offset-2 col-sm-10">
338
-					<!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>-->
339
-					<label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label>
375
+					<!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) {
376
+	if ($_GET['highlights'] == "true"){ print 'checked="checked"';
377
+}
378
+} ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>-->
379
+					<label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) {
380
+	if ($_GET['highlights'] == "true"){ print 'checked="checked"';
381
+}
382
+} ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label>
340 383
 					</div>
341 384
 				</div>
342 385
 			</fieldset>
@@ -350,7 +393,10 @@  discard block
 block discarded – undo
350 393
 						</select>
351 394
 					</div>
352 395
 				</div>
353
-				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
396
+				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) {
397
+	print $_GET['airline'];
398
+}
399
+?>');</script>
354 400
 				<div class="form-group">
355 401
 					<label class="control-label col-sm-2"><?php echo _("Country"); ?></label> 
356 402
 					<div class="col-sm-10">
@@ -359,19 +405,34 @@  discard block
 block discarded – undo
359 405
 						</select>
360 406
 					</div>
361 407
 				</div>
362
-				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
408
+				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) {
409
+	print $_GET['airline_country'];
410
+}
411
+?>');</script>
363 412
 				<div class="form-group">
364 413
 					<label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> 
365 414
 					<div class="col-sm-10">
366
-						<input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) print $_GET['callsign']; ?>" size="8" />
415
+						<input type="text" name="callsign" class="form-control" value="<?php if (isset($_GET['callsign'])) {
416
+	print $_GET['callsign'];
417
+}
418
+?>" size="8" />
367 419
 					</div>
368 420
 				</div>
369 421
 				<div class="form-group">
370 422
 					<div class="col-sm-offset-2 col-sm-10">
371 423
 						<label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label>
372
-						<label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label>
373
-						<label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label>
374
-						<label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label>
424
+						<label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) {
425
+	if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"';
426
+}
427
+} ?>> <?php echo _("Only Passenger airlines"); ?></label>
428
+						<label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) {
429
+	if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"';
430
+}
431
+} ?>> <?php echo _("Only Cargo airlines"); ?></label>
432
+						<label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) {
433
+	if ( $_GET['airline_type'] == "military"){ print 'checked="checked"';
434
+}
435
+} ?>> <?php echo _("Only Military airlines"); ?></label>
375 436
 					</div>
376 437
 				</div>
377 438
 			</fieldset>
@@ -385,7 +446,10 @@  discard block
 block discarded – undo
385 446
 						</select>
386 447
 					</div>
387 448
 				</div>
388
-				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
449
+				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) {
450
+	print $_GET['airport_icao'];
451
+}
452
+?>');</script>
389 453
 				<div class="form-group">
390 454
 					<label class="control-label col-sm-2"><?php echo _("Country"); ?></label> 
391 455
 					<div class="col-sm-10">
@@ -394,7 +458,10 @@  discard block
 block discarded – undo
394 458
 						</select>
395 459
 					</div>
396 460
 				</div>
397
-				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
461
+				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) {
462
+	print $_GET['airport_country'];
463
+}
464
+?>');</script>
398 465
 			</fieldset>
399 466
 			<fieldset>
400 467
 				<legend><?php echo _("Route"); ?></legend>
@@ -406,7 +473,10 @@  discard block
 block discarded – undo
406 473
 						</select>
407 474
 					</div>
408 475
 				</div>
409
-				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
476
+				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) {
477
+	print $_GET['departure_airport_route'];
478
+}
479
+?>');</script>
410 480
 				<div class="form-group">
411 481
 					<label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> 
412 482
 					<div class="col-sm-10">
@@ -415,7 +485,10 @@  discard block
 block discarded – undo
415 485
 						</select>
416 486
 					</div>
417 487
 				</div>
418
-				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
488
+				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) {
489
+	print $_GET['arrival_airport_route'];
490
+}
491
+?>');</script>
419 492
 			</fieldset>
420 493
 			<fieldset>
421 494
 				<legend><?php echo _("Date"); ?></legend>
@@ -423,7 +496,10 @@  discard block
 block discarded – undo
423 496
 					<label class="control-label col-sm-2"><?php echo _("Start Date"); ?></label>
424 497
 					<div class="col-sm-10">
425 498
 						<div class='input-group date' id='datetimepicker1'>
426
-							<input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) print $_GET['start_date']; ?>" placeholder="<?php echo _("Start Date/Time"); ?>" />
499
+							<input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) {
500
+	print $_GET['start_date'];
501
+}
502
+?>" placeholder="<?php echo _("Start Date/Time"); ?>" />
427 503
 							<span class="input-group-addon">
428 504
 								<span class="glyphicon glyphicon-calendar"></span>
429 505
 							</span>
@@ -434,7 +510,10 @@  discard block
 block discarded – undo
434 510
 					<label class="control-label col-sm-2"><?php echo _("End Date"); ?></label>
435 511
 					<div class="col-sm-10">
436 512
 						<div class='input-group date' id='datetimepicker2'>
437
-						<input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) print $_GET['end_date']; ?>" placeholder="<?php echo _("End Date/Time"); ?>" />
513
+						<input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) {
514
+	print $_GET['end_date'];
515
+}
516
+?>" placeholder="<?php echo _("End Date/Time"); ?>" />
438 517
 						<span class="input-group-addon">
439 518
 							<span class="glyphicon glyphicon-calendar"></span>
440 519
 						</span>
@@ -517,7 +596,12 @@  discard block
 block discarded – undo
517 596
 				</div>
518 597
 			</div>
519 598
 			<div class="form-group">
520
-				<label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label>
599
+				<label class="control-label col-sm-2"><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) {
600
+	print $globalDistanceUnit;
601
+} else {
602
+	print 'km';
603
+}
604
+print ')'; ?></label>
521 605
 				<div class="col-sm-10">
522 606
 					<input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" />
523 607
 				</div>
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
manufacturer-statistics-airline-country.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
manufacturer-detailed.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -47,7 +47,9 @@  discard block
 block discarded – undo
47 47
 		print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
48 48
 		$Stats = new Stats();
49 49
 		$all_manufacturers = $Stats->getAllManufacturers();
50
-		if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
50
+		if (empty($all_manufacturers)) {
51
+			$all_manufacturers = $Spotter->getAllManufacturers();
52
+		}
51 53
 		foreach($all_manufacturers as $all_manufacturer)
52 54
 		{
53 55
 			if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
require/class.ATC.php 1 patch
Braces   +14 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,20 +20,27 @@  discard block
 block discarded – undo
20 20
 	if (is_array($globalStatsFilters) && isset($globalStatsFilters[$globalFilterName])) {
21 21
 	    if (isset($globalStatsFilters[$globalFilterName][0]['source'])) {
22 22
 		foreach($globalStatsFilters[$globalFilterName] as $source) {
23
-			if (isset($source['source'])) $filter['source'][] = $source['source'];
23
+			if (isset($source['source'])) {
24
+				$filter['source'][] = $source['source'];
25
+			}
24 26
 		}
25 27
 	    } else {
26 28
 		$filter = $globalStatsFilters[$globalFilterName];
27 29
 	    }
28 30
 	}
29
-	if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter);
31
+	if (is_array($globalFilter)) {
32
+		$filter = array_merge($filter,$globalFilter);
33
+	}
30 34
 	$filter_query_join = '';
31 35
 	$filter_query_where = '';
32 36
 	if (isset($filter['source']) && !empty($filter['source'])) {
33 37
 	    $filter_query_where = " WHERE format_source IN ('".implode("','",$filter['source'])."')";
34 38
 	}
35
-	if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE';
36
-	elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND';
39
+	if ($filter_query_where == '' && $where) {
40
+		$filter_query_where = ' WHERE';
41
+	} elseif ($filter_query_where != '' && $and) {
42
+		$filter_query_where .= ' AND';
43
+	}
37 44
 	$filter_query = $filter_query_join.$filter_query_where;
38 45
 	return $filter_query;
39 46
     }
@@ -57,7 +64,9 @@  discard block
 block discarded – undo
57 64
     		$info = str_replace('^','<br />',$info);
58 65
     		$info = str_replace('&amp;sect;','',$info);
59 66
     		$info = str_replace('"','',$info);
60
-    		if ($type == '') $type = NULL;
67
+    		if ($type == '') {
68
+    			$type = NULL;
69
+    		}
61 70
                 $query = "INSERT INTO atc (ident,frequency,latitude,longitude,atc_range,info,atc_lastseen,type,ivao_id,ivao_name,format_source,source_name) VALUES (:ident,:frequency,:latitude,:longitude,:range,:info,:date,:type,:ivao_id,:ivao_name,:format_source,:source_name)";
62 71
                 $query_values = array(':ident' => $ident,':frequency' => $frequency,':latitude' => $latitude,':longitude' => $longitude,':range' => $range,':info' => $info,':date' => $date,':ivao_id' => $ivao_id,':ivao_name' => $ivao_name, ':type' => $type,':format_source' => $format_source,':source_name' => $source_name);
63 72
                  try {
Please login to merge, or discard this patch.
live-santa-czml.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
30 30
 $output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"';
31
-if (!isset($_GET['now'])) $output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"';
31
+if (!isset($_GET['now'])) {
32
+	$output .= ',"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z"';
33
+}
32 34
 $output .= '}';
33 35
 //$output .= ',"clock": {"currentTime" : "'.date("c",time()).'","multiplier" : 300,"range" : "UNBOUNDED","step": "TICK_DEPENDENT"}';
34 36
 //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
@@ -37,7 +39,9 @@  discard block
 block discarded – undo
37 39
 $output .= '},';
38 40
 $output .= '{';
39 41
 $output .= '"id": "santaclaus",';
40
-if (!isset($_GET['now'])) $output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",';
42
+if (!isset($_GET['now'])) {
43
+	$output .= '"interval": "'.date("Y").'-12-24T02:00:00Z/'.date("Y").'-12-25T02:00:00Z",';
44
+}
41 45
 $output .= '"properties": {';
42 46
 // Not yet supported in CZML with Cesium
43 47
 $output .= '},';
Please login to merge, or discard this patch.
acars-archive.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,12 @@
 block discarded – undo
36 36
 if (!empty($spotter_array)) {
37 37
 	include('table-output.php');
38 38
 	print '<div class="pagination">';
39
-	if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
40
-	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
39
+	if ($limit_previous_1 >= 0) {
40
+		print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
41
+	}
42
+	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) {
43
+		print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
44
+	}
41 45
 	print '</div>';
42 46
 }
43 47
 print '</div>';
Please login to merge, or discard this patch.
acars-latest.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,8 +38,12 @@
 block discarded – undo
38 38
 if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) {
39 39
 	include('table-output.php');
40 40
 	print '<div class="pagination">';
41
-	if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
42
-	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
41
+	if ($limit_previous_1 >= 0) {
42
+		print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
43
+	}
44
+	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) {
45
+		print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
46
+	}
43 47
 	print '</div>';
44 48
 }
45 49
 print '</div>';
Please login to merge, or discard this patch.