Completed
Push — master ( d8c574...a11679 )
by Yannick
07:12
created
table-output.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	}
94 94
 	print '<th class="more"></th>';
95 95
 	print '</thead>';
96
-} else if (strtolower($current_page) == "upcoming"){
96
+} else if (strtolower($current_page) == "upcoming") {
97 97
 	print '<thead>';
98 98
 	if ($_GET['sort'] == "airline_name_asc")
99 99
 	{
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		print '<th class="time"><a href="'.$page_url.'/'.$limit_start.','.$limit_end.'/date_asc">'._("Expected Time").'</a> <i class="fa fa-sort small"></i></th>';
142 142
 	}
143 143
 	print '</thead>';
144
-} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){
144
+} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") {
145 145
 	print '<thead>';
146 146
 	print '<th class="aircraft_thumbnail"></th>';
147 147
 	print '<th class="logo">'._("Airline").'</th>';
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	print '</thead>';
153 153
 } else {
154 154
 
155
-	if ($hide_th_links === true){
155
+	if ($hide_th_links === true) {
156 156
 		print '<thead>';
157 157
 		print '<th class="aircraft_thumbnail"></th>';
158 158
 		if ($_GET['sort'] == "airline_name_asc")
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 }
334 334
 
335 335
 print '<tbody>'."\n";
336
-foreach($spotter_array as $spotter_item)
336
+foreach ($spotter_array as $spotter_item)
337 337
 {
338 338
 	if (isset($globalTimezone))
339 339
 	{
@@ -364,13 +364,13 @@  discard block
 block discarded – undo
364 364
                                         $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
365 365
 				}
366 366
 				if (isset($spotter_item['airline_name'])) {
367
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
367
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
368 368
 				} else {
369
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
369
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
370 370
 				}
371 371
                         } else {
372 372
                     		if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
373
-                    		$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
373
+                    		$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
374 374
                     		} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
375 375
 				if (isset($spotter_item['airline_name'])) {
376 376
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 			print '</td>'."\n";
386 386
 		}
387 387
 	}
388
-	if(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){
388
+	if (strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") {
389 389
 		if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) {
390 390
 		    $spotter_item['squawk'] = '-';
391 391
 		}
@@ -401,17 +401,17 @@  discard block
 block discarded – undo
401 401
                                         $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
402 402
 				}
403 403
 				if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
404
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
404
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
405 405
 				} elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) {
406
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
406
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
407 407
 				} elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) {
408
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
408
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
409 409
 				} else {
410
-					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
410
+					print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
411 411
 				}
412 412
 			} else {
413 413
                     		if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
414
-                    		$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
414
+                    		$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
415 415
                     		} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
416 416
 				if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
417 417
 					print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 	}
471 471
 	print '</td>'."\n";
472 472
 	// Aircraft type
473
-	if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){
473
+	if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") {
474 474
 		print '<td class="type">'."\n";
475 475
 		if (!isset($spotter_item['aircraft_name'])) {
476 476
 			print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'._("Not available").'</a></span>'."\n";
@@ -492,22 +492,22 @@  discard block
 block discarded – undo
492 492
 	}
493 493
 	if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) {
494 494
 		if ($spotter_item['departure_airport_time'] > 2460) {
495
-			$departure_airport_time = date('H:m',$spotter_item['departure_airport_time']);
496
-		} else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
495
+			$departure_airport_time = date('H:m', $spotter_item['departure_airport_time']);
496
+		} else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2);
497 497
 		if ($spotter_item['real_departure_airport_time'] > 2460) {
498
-			$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
498
+			$real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']);
499 499
 		} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
500 500
 		print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n";
501 501
 	} elseif (isset($spotter_item['real_departure_airport_time'])) {
502 502
 		if ($spotter_item['real_departure_airport_time'] > 2460) {
503
-			$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
503
+			$real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']);
504 504
 		} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
505 505
 		print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n";
506 506
 	} elseif (isset($spotter_item['departure_airport_time'])) {
507 507
 		if ($spotter_item['departure_airport_time'] > 2460) {
508
-			$departure_airport_time = date('H:m',$spotter_item['departure_airport_time']);
508
+			$departure_airport_time = date('H:m', $spotter_item['departure_airport_time']);
509 509
 		} else {
510
-			$departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
510
+			$departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2);
511 511
 		}
512 512
 		print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n";
513 513
 	}
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
 			$latitude = $spotter_item['latitude'];
522 522
 			$longitude = $spotter_item['longitude'];
523 523
 		}
524
-		$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude);
524
+		$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude);
525 525
 		if ($distance != '') {
526 526
 		    if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
527 527
 			    echo '<br/><i>'.round($distance*0.539957).' nm</i>';
@@ -561,20 +561,20 @@  discard block
 block discarded – undo
561 561
 	}
562 562
 	if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) {
563 563
 		if ($spotter_item['arrival_airport_time'] > 2460) {
564
-			$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
564
+			$arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']);
565 565
 		} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
566 566
 		if ($spotter_item['real_arrival_airport_time'] > 2460) {
567
-			$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
567
+			$real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']);
568 568
 		} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
569 569
 		print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n";
570 570
 	} elseif (isset($spotter_item['real_arrival_airport_time'])) {
571 571
 		if ($spotter_item['real_arrival_airport_time'] > 2460) {
572
-			$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
572
+			$real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']);
573 573
 		} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
574 574
 		print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n";
575 575
 	} elseif (isset($spotter_item['arrival_airport_time'])) {
576 576
 		if ($spotter_item['arrival_airport_time'] > 2460) {
577
-			$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
577
+			$arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']);
578 578
 		} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
579 579
 		print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n";
580 580
 	}
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 			$latitude = $spotter_item['latitude'];
587 587
 			$longitude = $spotter_item['longitude'];
588 588
 		}
589
-		$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude);
589
+		$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude);
590 590
 		if ($distance != '') {
591 591
 		    if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
592 592
 			    echo '<br/><i>'.round($distance*0.539957).' nm</i>';
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 	}
600 600
 	print '</td>'."\n";
601 601
 	// Route stop
602
-	if(strtolower($current_page) != "upcoming"){
602
+	if (strtolower($current_page) != "upcoming") {
603 603
 		print '<td class="route_stop">'."\n";
604 604
 		if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '') {
605 605
 			print '<span class="nomobile">-</span>'."\n";
@@ -620,22 +620,22 @@  discard block
 block discarded – undo
620 620
 		} else {
621 621
 			//if (!isset($globalUnitDistance) || $globalUnitDistance == 'km') {
622 622
 			if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
623
-				print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n";
624
-				print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n";
623
+				print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n";
624
+				print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n";
625 625
 			//} elseif ($globalUnitDistance == 'mi') {
626 626
 			} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
627
-				print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n";
628
-				print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n";
627
+				print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n";
628
+				print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n";
629 629
 			//} elseif ($globalUnitDistance == 'nm') {
630 630
 			} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
631
-				print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n";
632
-				print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n";
631
+				print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n";
632
+				print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n";
633 633
 			}
634 634
 		}
635 635
 		
636 636
 		print '</td>'."\n";
637 637
 	}
638
-	if(strtolower($current_page) != "upcoming"){
638
+	if (strtolower($current_page) != "upcoming") {
639 639
 		if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) {
640 640
 			print '<td class="pilot">'."\n";
641 641
 			if ((!isset($spotter_item['pilot_id']) || $spotter_item['pilot_id'] == '') && (!isset($spotter_item['pilot_name']) || $spotter_item['pilot_name'] == '')) {
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
 	if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") {
673 673
 		if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') {
674 674
 			print '<td class="message"><p>'."\n";
675
-			print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
675
+			print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
676 676
 			print '</p><p class="decode">';
677 677
 			$decode_array = json_decode($spotter_item['decode']);
678 678
 			foreach ($decode_array as $key => $value) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 			print '</td>'."\n";
683 683
 		} else {
684 684
 			print '<td class="message">'."\n";
685
-			print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
685
+			print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
686 686
 			print '</td>'."\n";
687 687
 		}
688 688
 	}
Please login to merge, or discard this patch.
airport.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 if (isset($_POST['airport']))
8 8
 {
9 9
 	header('Location: '.$globalURL.'/airport/'.$_POST['airport']);
10
-} else if (isset($_GET['airport'])){
10
+} else if (isset($_GET['airport'])) {
11 11
 	$Spotter = new Spotter();
12 12
 	//calculuation for the pagination
13
-	if($_GET['limit'] == "")
13
+	if ($_GET['limit'] == "")
14 14
 	{
15 15
 	  $limit_start = 0;
16 16
 	  $limit_end = 25;
17 17
 	  $absolute_difference = 25;
18
-	}  else {
18
+	} else {
19 19
 		$limit_explode = explode(",", $_GET['limit']);
20 20
 		$limit_start = $limit_explode[0];
21 21
 		$limit_end = $limit_explode[1];
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 	$limit_previous_1 = $limit_start - $absolute_difference;
30 30
 	$limit_previous_2 = $limit_end - $absolute_difference;
31 31
 	
32
-	$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
32
+	$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	$page_url = $globalURL.'/airport/'.$airport;
35
-	$spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort);
35
+	$spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort);
36 36
 	$airport_array = $Spotter->getAllAirportInfo($airport);
37 37
 	
38 38
 	if (!empty($airport_array))
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 		print '<option></option>';
47 47
 		$airport_names = $Spotter->getAllAirportNames();
48 48
 		ksort($airport_names);
49
-		foreach($airport_names as $airport_name)
49
+		foreach ($airport_names as $airport_name)
50 50
 		{
51
-			if($airport == $airport_name['airport_icao'])
51
+			if ($airport == $airport_name['airport_icao'])
52 52
 			{
53 53
 				print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
54 54
 			} else {
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		print '<div class="table column">';
81 81
 		if ($airport_array[0]['iata'] != "NA")
82 82
 		{
83
-			print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>';
83
+			print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>';
84 84
 		}
85 85
 
86 86
 		include('table-output.php');  
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; 
103 103
 	}
104 104
 } else {
105
-	$Spotter= new Spotter();
105
+	$Spotter = new Spotter();
106 106
 	$Stats = new Stats();
107 107
 	$title = _("Airports");
108 108
 	require_once('header.php');
@@ -113,11 +113,11 @@  discard block
 block discarded – undo
113 113
 	ksort($airport_names);
114 114
 	$previous = null;
115 115
 	print '<div class="alphabet-legend">';
116
-	foreach($airport_names as $value) {
116
+	foreach ($airport_names as $value) {
117 117
 		$firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1));
118
-		if($previous !== $firstLetter)
118
+		if ($previous !== $firstLetter)
119 119
 		{
120
-			if ($previous !== null){
120
+			if ($previous !== null) {
121 121
 				print ' | ';
122 122
 			}
123 123
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
 	}
127 127
 	print '</div>';
128 128
 	$previous = null;
129
-	foreach($airport_names as $value) {
129
+	foreach ($airport_names as $value) {
130 130
 		$firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1));
131 131
 		if ($firstLetter != "")
132 132
 		{
133
-			if($previous !== $firstLetter)
133
+			if ($previous !== $firstLetter)
134 134
 			{
135
-				if ($previous !== null){
135
+				if ($previous !== null) {
136 136
 					print '</div>';
137 137
 				}
138 138
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
statistics-date.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
             	["'._("Date").'", "'._("# of Flights").'"], ';
27 27
 
28 28
 $date_data = '';
29
-foreach($date_array as $date_item)
29
+foreach ($date_array as $date_item)
30 30
 {
31 31
 	$date_data .= '[ "'.date("F j, Y", strtotime($date_item['date_name'])).'",'.$date_item['date_count'].'],';
32 32
 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
       </script>';
53 53
 }
54 54
 if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) {
55
-	print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>';
55
+	print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>';
56 56
 } else {
57 57
 	print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>';
58 58
 }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	print '</thead>';
69 69
 	print '<tbody>';
70 70
 	$i = 1;
71
-	foreach($date_array as $date_item)
71
+	foreach ($date_array as $date_item)
72 72
 	{
73 73
 		print '<tr>';
74 74
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-registration.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(FILTER_GET,'sort',FILTER_SANITIZE_STRING);
7
-$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'],"0,1", $sort);
6
+$sort = filter_input(FILTER_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$spotter_array = $Spotter->getSpotterDataByDate($_GET['date'], "0,1", $sort);
8 8
 
9 9
 if (!empty($spotter_array))
10 10
 {
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
 	print '</div>';
21 21
 
22 22
 	print '<div class="info column">';
23
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
23
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
24 24
 	print '</div>';
25 25
 
26 26
 	include('date-sub-menu.php');
27 27
 	print '<div class="column">';
28 28
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
29
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
29
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
30 30
 
31 31
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByDate($_GET['date']);
32 32
 	if (!empty($aircraft_array))
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		print '</thead>';
44 44
 		print '<tbody>';
45 45
 		$i = 1;
46
-		foreach($aircraft_array as $aircraft_item)
46
+		foreach ($aircraft_array as $aircraft_item)
47 47
 		{
48 48
 			print '<tr>';
49 49
 			print '<td><strong>'.$i.'</strong></td>';
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 				if (isset($aircraft_item['aircraft_type'])) {
54 54
 					print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_type'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:").' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>';
55 55
 				} else {
56
-					print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:");' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>';
56
+					print '<a href="'.$globalURL.'/registration/'.$aircraft_item['registration'].'"><img src="'.$aircraft_item['image_thumbnail'].'" class="img-rounded" data-toggle="popover" title="'.$aircraft_item['registration'].' - '.$aircraft_item['aircraft_icao'].' - '.$aircraft_item['airline_name'].'" alt="'.$aircraft_item['registration'].' - '.$aircraft_item['airline_name'].'" data-content="'._("Registration:").' '.$aircraft_item['registration'].'<br />'._("Aircraft:").' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')<br />'._("Airline:"); ' '.$aircraft_item['airline_name'].'" data-html="true" width="100px" /></a>';
57 57
 				}
58 58
 				print '</td>';
59 59
 			} else {
Please login to merge, or discard this patch.
ident-statistics-departure-airport-country.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports by Country of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Departure Airports by Country of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	include('ident-sub-menu.php');
24 24
 	print '<div class="column">';
25 25
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
26
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
26
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
27 27
 
28 28
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByIdent($ident);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             var data = google.visualization.arrayToDataTable([
36 36
             	["'._("Country").'", "'._("# of times").'"], ';
37 37
 	$country_data = '';
38
-	foreach($airport_country_array as $airport_item)
38
+	foreach ($airport_country_array as $airport_item)
39 39
 	{
40 40
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
41 41
 	}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		print '</thead>';
70 70
 		print '<tbody>';
71 71
 		$i = 1;
72
-		foreach($airport_country_array as $airport_item)
72
+		foreach ($airport_country_array as $airport_item)
73 73
 		{
74 74
 			print '<tr>';
75 75
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		        <div class="form-group">
66 66
 			    <label>From (UTC):</label>
67 67
 		            <div class='input-group date' id='datetimepicker1'>
68
-            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a",$_COOKIE['archive_begin']); ?>" required />
68
+            			<input type='text' name="start_date" class="form-control" value="<?php if (isset($_COOKIE['archive_begin'])) print date("d/m/Y h:i a", $_COOKIE['archive_begin']); ?>" required />
69 69
 		                <span class="input-group-addon">
70 70
             			    <span class="glyphicon glyphicon-calendar"></span>
71 71
 		                </span>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		        <div class="form-group">
75 75
 			    <label>To (UTC):</label>
76 76
 		            <div class='input-group date' id='datetimepicker2'>
77
-		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a",$_COOKIE['archive_end']); ?>" />
77
+		                <input type='text' name="end_date" class="form-control" value="<?php if (isset($_COOKIE['archive_end'])) print date("d/m/Y h:i a", $_COOKIE['archive_end']); ?>" />
78 78
             			<span class="input-group-addon">
79 79
 		                    <span class="glyphicon glyphicon-calendar"></span>
80 80
             			</span>
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
 			<select class="selectpicker" multiple onchange="airlines(this);">
241 241
 			    <?php
242 242
 				$Spotter = new Spotter();
243
-				foreach($Spotter->getAllAirlineNames() as $airline) {
243
+				foreach ($Spotter->getAllAirlineNames() as $airline) {
244 244
 					$airline_name = $airline['airline_name'];
245
-					if (strlen($airline_name) > 30) $airline_name = substr($airline_name,0,30).'...';
246
-					if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'],explode(',',$_COOKIE['Airlines']))) {
245
+					if (strlen($airline_name) > 30) $airline_name = substr($airline_name, 0, 30).'...';
246
+					if (isset($_COOKIE['Airlines']) && in_array($airline['airline_icao'], explode(',', $_COOKIE['Airlines']))) {
247 247
 						echo '<option value="'.$airline['airline_icao'].'" selected>'.$airline_name.'</option>';
248 248
 					} else {
249 249
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
@@ -259,8 +259,8 @@  discard block
 block discarded – undo
259 259
 			<select class="selectpicker" multiple onchange="sources(this);">
260 260
 			    <?php
261 261
 				$Spotter = new Spotter();
262
-				foreach($Spotter->getAllSourceName('aprs') as $source) {
263
-					if (isset($_COOKIE['Sources']) && in_array($source['source_name'],explode(',',$_COOKIE['Sources']))) {
262
+				foreach ($Spotter->getAllSourceName('aprs') as $source) {
263
+					if (isset($_COOKIE['Sources']) && in_array($source['source_name'], explode(',', $_COOKIE['Sources']))) {
264 264
 						echo '<option value="'.$source['source_name'].'" selected>'.$source['source_name'].'</option>';
265 265
 					} else {
266 266
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
Please login to merge, or discard this patch.
country-statistics-arrival-airport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
13 13
 
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Arrival Airports from %s"),$country);
17
+	$title = sprintf(_("Most Common Arrival Airports from %s"), $country);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<select name="country" class="selectpicker" data-live-search="true">';
23 23
 	print '<option></option>';
24 24
 	$all_countries = $Spotter->getAllCountries();
25
-	foreach($all_countries as $all_country)
25
+	foreach ($all_countries as $all_country)
26 26
 	{
27
-		if($country == $all_country['country'])
27
+		if ($country == $all_country['country'])
28 28
 		{
29 29
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
30 30
 		} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	if ($_GET['country'] != "NA")
40 40
 	{
41 41
 		print '<div class="info column">';
42
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
42
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
43 43
 		print '</div>';
44 44
 	} else {
45 45
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	include('country-sub-menu.php');
49 49
 	print '<div class="column">';
50 50
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
51
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports &amp; airlines from <strong>%s</strong>."),$country).'</p>';
51
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights of airports &amp; airlines from <strong>%s</strong>."), $country).'</p>';
52 52
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByCountry($country);
53 53
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
54 54
     	<script>
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         	["'._("Airport").'", "'._("# of times").'"],';
64 64
 
65 65
 	$airport_data = '';
66
-	foreach($airport_airport_array as $airport_item)
66
+	foreach ($airport_airport_array as $airport_item)
67 67
 	{
68 68
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
69 69
 		$name = str_replace("'", "", $name);
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	print '</thead>';
102 102
 	print '<tbody>';
103 103
 	$i = 1;
104
-	foreach($airport_airport_array as $airport_item)
104
+	foreach ($airport_airport_array as $airport_item)
105 105
 	{
106 106
 		print '<tr>';
107 107
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
archive-country.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$country = filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING);
8
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$country = filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING);
8
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
9 9
 
10 10
 $Spotter = new Spotter();
11
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
11
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
12 12
 else $spotter_array = array();
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
16
+	$title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/date" method="post">';
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
 	print '</div>';
25 25
 
26 26
 	print '<div class="info column">';
27
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
27
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
28 28
 	print '</div>';
29 29
 
30 30
 	include('date-sub-menu.php');
31 31
 	print '<div class="column">';
32 32
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
33
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
33
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
34 34
 
35 35
 	$airline_array = $Spotter->countAllAirlineCountriesByDate($date);
36 36
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             var data = google.visualization.arrayToDataTable([
43 43
             	["'._("Country").'", "'._("# of times").'"], ';
44 44
 	$country_data = '';
45
-	foreach($airline_array as $airline_item)
45
+	foreach ($airline_array as $airline_item)
46 46
 	{
47 47
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
48 48
 	}
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		print '</thead>';
77 77
 		print '<tbody>';
78 78
 		$i = 1;
79
-		foreach($airline_array as $airline_item)
79
+		foreach ($airline_array as $airline_item)
80 80
 		{
81 81
 			print '<tr>';
82 82
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
registration-statistics-departure-airport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
7
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
6
+$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
7
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
8 8
 if (isset($_GET['sort'])) $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
9 9
 else $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1");
10 10
 $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 if (!empty($spotter_array))
14 14
 {
15
-	$title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"),$registration);
15
+	$title = sprintf(_("Most Common Departure Airports of aircraft with registration %s"), $registration);
16 16
 	require_once('header.php');
17 17
 
18 18
 	print '<div class="info column">';
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	print '<div class="column">';
27 27
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
28 28
 
29
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>';
29
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>';
30 30
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByRegistration($registration);
31 31
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
32 32
     	<script>
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         var data = google.visualization.arrayToDataTable([ 
41 41
         	["'._("Airport").'", "'._("# of times").'"],';
42 42
 	$airport_data = '';
43
-	foreach($airport_airport_array as $airport_item)
43
+	foreach ($airport_airport_array as $airport_item)
44 44
 	{
45 45
 		$name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')';
46 46
 		$name = str_replace("'", "", $name);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	print '</thead>';
79 79
 	print '<tbody>';
80 80
 	$i = 1;
81
-	foreach($airport_airport_array as $airport_item)
81
+	foreach ($airport_airport_array as $airport_item)
82 82
 	{
83 83
 		print '<tr>';
84 84
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.