Completed
Push — master ( 222288...2358e7 )
by Yannick
10:39
created
table-output.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
 	} elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){
493 493
 		if ($type == 'aircraft') {
494 494
 			if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) {
495
-			    $spotter_item['squawk'] = '-';
495
+				$spotter_item['squawk'] = '-';
496 496
 			}
497 497
 			if ($spotter_item['image_thumbnail'] != "")
498 498
 			{
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 				print '</td>'."\n";
532 532
 			} else {
533 533
 				print '<td class="aircraft_thumbnail">'."\n";
534
-	       //   	 	print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>';
534
+		   //   	 	print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>';
535 535
 		//}
536 536
 				if (!isset($spotter_item['airline_name']) && !isset($spotter_item['aircraft_name'])) {
537 537
 					print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$globalURL.'/images/placeholder_thumb.png" 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:").' '._("Not available").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n";
Please login to merge, or discard this patch.
Spacing   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 
5 5
 require_once(dirname(__FILE__).'/require/class.Common.php');
6 6
 $Common = new Common();
7
-$showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop');
8
-$showDuration = $Common->multiKeyExists($spotter_array,'duration');
7
+$showRouteStop = $Common->multiKeyExists($spotter_array, 'route_stop');
8
+$showDuration = $Common->multiKeyExists($spotter_array, 'duration');
9 9
 
10 10
 if (!isset($type)) $type = 'aircraft';
11 11
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	}
102 102
 	print '<th class="more"></th>';
103 103
 	print '</thead>';
104
-} else if (strtolower($current_page) == "upcoming"){
104
+} else if (strtolower($current_page) == "upcoming") {
105 105
 	print '<thead>';
106 106
 	if ($_GET['sort'] == "airline_name_asc")
107 107
 	{
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 	*/
153 153
 	print '</thead>';
154
-} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){
154
+} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") {
155 155
 	print '<thead>';
156 156
 	print '<th class="aircraft_thumbnail"></th>';
157 157
 	print '<th class="logo">'._("Airline").'</th>';
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	print '</thead>';
189 189
 } else {
190 190
 
191
-	if ($hide_th_links === true){
191
+	if ($hide_th_links === true) {
192 192
 		print '<thead>';
193 193
 		print '<th class="aircraft_thumbnail"></th>';
194 194
 		if ($type == 'aircraft') {
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 }
416 416
 
417 417
 print '<tbody>'."\n";
418
-foreach($spotter_array as $spotter_item)
418
+foreach ($spotter_array as $spotter_item)
419 419
 {
420 420
 	if (isset($globalTimezone))
421 421
 	{
@@ -450,13 +450,13 @@  discard block
 block discarded – undo
450 450
 						$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
451 451
 					}
452 452
 					if (isset($spotter_item['airline_name'])) {
453
-						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>';
453
+						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>';
454 454
 					} else {
455
-						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>';
455
+						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>';
456 456
 					}
457 457
 				} else {
458 458
 					if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
459
-						$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
459
+						$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
460 460
 					} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
461 461
 					if (isset($spotter_item['airline_name'])) {
462 462
 						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>';
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 			{
476 476
 				print '<td class="aircraft_thumbnail">'."\n";
477 477
 				if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
478
-					$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
478
+					$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
479 479
 				} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
480 480
 				if (isset($spotter_item['airline_name'])) {
481 481
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 				print '</td>'."\n";
490 490
 			}
491 491
 		}
492
-	} elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){
492
+	} elseif (strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed") {
493 493
 		if ($type == 'aircraft') {
494 494
 			if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) {
495 495
 			    $spotter_item['squawk'] = '-';
@@ -506,17 +506,17 @@  discard block
 block discarded – undo
506 506
 						$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
507 507
 					}
508 508
 					if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
509
-						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>';
509
+						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>';
510 510
 					} elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) {
511
-						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>';
511
+						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>';
512 512
 					} elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) {
513
-						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>';
513
+						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>';
514 514
 					} else {
515
-						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>';
515
+						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>';
516 516
 					}
517 517
 				} else {
518 518
 					if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
519
-						$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
519
+						$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
520 520
 					} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
521 521
 					if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
522 522
 						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>';
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 			{
550 550
 				print '<td class="aircraft_thumbnail">'."\n";
551 551
 				if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
552
-					$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
552
+					$image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']);
553 553
 				} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
554 554
 				if (isset($spotter_item['airline_name'])) {
555 555
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
 	}
601 601
 	print '</td>'."\n";
602 602
 	// Aircraft type
603
-	if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){
603
+	if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") {
604 604
 		print '<td class="type">'."\n";
605 605
 		if ($type == 'aircraft') {
606 606
 			if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) {
@@ -643,22 +643,22 @@  discard block
 block discarded – undo
643 643
 			}
644 644
 			if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) {
645 645
 				if ($spotter_item['departure_airport_time'] > 2460) {
646
-					$departure_airport_time = date('H:m',$spotter_item['departure_airport_time']);
647
-				} else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
646
+					$departure_airport_time = date('H:m', $spotter_item['departure_airport_time']);
647
+				} else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2);
648 648
 				if ($spotter_item['real_departure_airport_time'] > 2460) {
649
-					$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
649
+					$real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']);
650 650
 				} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
651 651
 				print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n";
652 652
 			} elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') {
653 653
 				if ($spotter_item['real_departure_airport_time'] > 2460) {
654
-					$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
654
+					$real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']);
655 655
 				} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
656 656
 				print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n";
657 657
 			} elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') {
658 658
 				if ($spotter_item['departure_airport_time'] > 2460) {
659
-					$departure_airport_time = date('H:m',$spotter_item['departure_airport_time']);
659
+					$departure_airport_time = date('H:m', $spotter_item['departure_airport_time']);
660 660
 				} else {
661
-					$departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
661
+					$departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2);
662 662
 				}
663 663
 				print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n";
664 664
 			}
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 						$latitude = $spotter_item['latitude'];
674 674
 						$longitude = $spotter_item['longitude'];
675 675
 					}
676
-					$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude);
676
+					$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude);
677 677
 				} else $distance = '';
678 678
 				if ($distance != '') {
679 679
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
@@ -716,20 +716,20 @@  discard block
 block discarded – undo
716 716
 			}
717 717
 			if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) {
718 718
 				if ($spotter_item['arrival_airport_time'] > 2460) {
719
-					$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
719
+					$arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']);
720 720
 				} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
721 721
 				if ($spotter_item['real_arrival_airport_time'] > 2460) {
722
-					$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
722
+					$real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']);
723 723
 				} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
724 724
 				print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n";
725 725
 			} elseif (isset($spotter_item['real_arrival_airport_time'])) {
726 726
 				if ($spotter_item['real_arrival_airport_time'] > 2460) {
727
-					$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
727
+					$real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']);
728 728
 				} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
729 729
 				print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n";
730 730
 			} elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') {
731 731
 				if ($spotter_item['arrival_airport_time'] > 2460) {
732
-					$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
732
+					$arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']);
733 733
 				} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
734 734
 				print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n";
735 735
 			}
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
 						$latitude = $spotter_item['latitude'];
743 743
 						$longitude = $spotter_item['longitude'];
744 744
 					}
745
-					$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude);
745
+					$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude);
746 746
 				} else $distance = '';
747 747
 				if ($distance != '') {
748 748
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
@@ -775,19 +775,19 @@  discard block
 block discarded – undo
775 775
 				print '<span class="mobile">-</span>'."\n";
776 776
 			} else {
777 777
 				if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) {
778
-					print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n";
779
-					print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n";
778
+					print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n";
779
+					print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n";
780 780
 				} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
781
-					print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n";
782
-					print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n";
781
+					print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n";
782
+					print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n";
783 783
 				} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
784
-					print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n";
785
-					print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n";
784
+					print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n";
785
+					print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n";
786 786
 				}
787 787
 			}
788 788
 			print '</td>'."\n";
789 789
 		}
790
-		if(strtolower($current_page) != "upcoming"){
790
+		if (strtolower($current_page) != "upcoming") {
791 791
 			if ($type == 'aircraft') {
792 792
 				if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) {
793 793
 					print '<td class="pilot">'."\n";
@@ -823,7 +823,7 @@  discard block
 block discarded – undo
823 823
 		
824 824
 		if ($showRouteStop) {
825 825
 		// Route stop
826
-			if(strtolower($current_page) != "upcoming"){
826
+			if (strtolower($current_page) != "upcoming") {
827 827
 				print '<td class="route_stop">'."\n";
828 828
 				if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') {
829 829
 					print '<span class="nomobile">-</span>'."\n";
@@ -842,11 +842,11 @@  discard block
 block discarded – undo
842 842
 		}
843 843
 		if ($showDuration) {
844 844
 		// Duration
845
-			if(strtolower($current_page) != "upcoming"){
845
+			if (strtolower($current_page) != "upcoming") {
846 846
 				print '<td class="duration">'."\n";
847 847
 				if (isset($spotter_item['duration'])) {
848
-					print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n";
849
-					print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n";
848
+					print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n";
849
+					print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n";
850 850
 				} else {
851 851
 					print '<span class="nomobile">-</span>'."\n";
852 852
 					print '<span class="mobile">-</span>'."\n";
@@ -859,7 +859,7 @@  discard block
 block discarded – undo
859 859
 	if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") {
860 860
 		if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') {
861 861
 			print '<td class="message"><p>'."\n";
862
-			print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
862
+			print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
863 863
 			print '</p><p class="decode">';
864 864
 			$decode_array = json_decode($spotter_item['decode']);
865 865
 			foreach ($decode_array as $key => $value) {
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
 			print '</td>'."\n";
870 870
 		} else {
871 871
 			print '<td class="message">'."\n";
872
-			print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
872
+			print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
873 873
 			print '</td>'."\n";
874 874
 		}
875 875
 	}
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 		}
895 895
 		print '</td>'."\n";
896 896
 		print '<td class="message">'."\n";
897
-		print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
897
+		print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
898 898
 		print '</td>'."\n";
899 899
 	}
900 900
 	if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") {
@@ -920,7 +920,7 @@  discard block
 block discarded – undo
920 920
 		print '</td>'."\n";
921 921
 		*/
922 922
 		print '<td class="message">'."\n";
923
-		print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']);
923
+		print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']);
924 924
 		print '</td>'."\n";
925 925
 	}
926 926
 
Please login to merge, or discard this patch.
Braces   +57 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,7 +7,9 @@  discard block
 block discarded – undo
7 7
 $showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop');
8 8
 $showDuration = $Common->multiKeyExists($spotter_array,'duration');
9 9
 
10
-if (!isset($type)) $type = 'aircraft';
10
+if (!isset($type)) {
11
+	$type = 'aircraft';
12
+}
11 13
 
12 14
 if (!isset($_GET['sort'])) 
13 15
 {
@@ -420,7 +422,9 @@  discard block
 block discarded – undo
420 422
 	if (isset($globalTimezone))
421 423
 	{
422 424
 		date_default_timezone_set($globalTimezone);
423
-	} else date_default_timezone_set('UTC');
425
+	} else {
426
+		date_default_timezone_set('UTC');
427
+	}
424 428
 	if ($showSpecial === true)
425 429
 	{
426 430
 		print '<tr class="special">'."\n";
@@ -435,7 +439,9 @@  discard block
 block discarded – undo
435 439
 			print '<tr class="active">';
436 440
 		} elseif (isset($spotter_item['spotted_registration'])) {
437 441
 			print '<tr class="info">';
438
-		} else print '<tr>';
442
+		} else {
443
+			print '<tr>';
444
+		}
439 445
 	}
440 446
 	if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive" || strtolower($current_page) == "currently" || strtolower($current_page) == "accident-latest" || strtolower($current_page) == "incident-latest" || strtolower($current_page) == "accident-detailed" || strtolower($current_page) == "incident-detailed") {
441 447
 		if ($type == 'aircraft') {
@@ -443,8 +449,9 @@  discard block
 block discarded – undo
443 449
 			{
444 450
 				print '<td class="aircraft_thumbnail">'."\n";
445 451
 				if ($spotter_item['image_source'] == 'planespotters') {
446
-					if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website'];
447
-					else {
452
+					if ($spotter_item['image_source_website'] != '') {
453
+						$image_src = $spotter_item['image_source_website'];
454
+					} else {
448 455
 						$planespotter_url_array = explode("_", $spotter_item['image']);
449 456
 						$planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]);
450 457
 						$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
@@ -457,7 +464,9 @@  discard block
 block discarded – undo
457 464
 				} else {
458 465
 					if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
459 466
 						$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
460
-					} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
467
+					} else {
468
+						$image_thumbnail = $spotter_item['image_thumbnail'];
469
+					}
461 470
 					if (isset($spotter_item['airline_name'])) {
462 471
 						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>';
463 472
 					} else {
@@ -476,7 +485,9 @@  discard block
 block discarded – undo
476 485
 				print '<td class="aircraft_thumbnail">'."\n";
477 486
 				if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
478 487
 					$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
479
-				} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
488
+				} else {
489
+					$image_thumbnail = $spotter_item['image_thumbnail'];
490
+				}
480 491
 				if (isset($spotter_item['airline_name'])) {
481 492
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
482 493
 				} else {
@@ -499,8 +510,9 @@  discard block
 block discarded – undo
499 510
 				print '<td class="aircraft_thumbnail">'."\n";
500 511
 				//print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$spotter_item['image_thumbnail'].'" alt="Click to see more information about this flight" title="Click to see more information about this flight" width="100px" /></a>';
501 512
 				if ($spotter_item['image_source'] == 'planespotters') {
502
-					if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website'];
503
-					else {
513
+					if ($spotter_item['image_source_website'] != '') {
514
+						$image_src = $spotter_item['image_source_website'];
515
+					} else {
504 516
 						$planespotter_url_array = explode("_", $spotter_array[0]['image']);
505 517
 						$planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]);
506 518
 						$image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id;
@@ -517,7 +529,9 @@  discard block
 block discarded – undo
517 529
 				} else {
518 530
 					if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
519 531
 						$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
520
-					} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
532
+					} else {
533
+						$image_thumbnail = $spotter_item['image_thumbnail'];
534
+					}
521 535
 					if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) {
522 536
 						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>';
523 537
 					} elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) {
@@ -550,7 +564,9 @@  discard block
 block discarded – undo
550 564
 				print '<td class="aircraft_thumbnail">'."\n";
551 565
 				if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') {
552 566
 					$image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']);
553
-				} else 	$image_thumbnail = $spotter_item['image_thumbnail'];
567
+				} else {
568
+					$image_thumbnail = $spotter_item['image_thumbnail'];
569
+				}
554 570
 				if (isset($spotter_item['airline_name'])) {
555 571
 					print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">&copy; '.$spotter_item['image_copyright'].'</div>';
556 572
 				} else {
@@ -644,15 +660,21 @@  discard block
 block discarded – undo
644 660
 			if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) {
645 661
 				if ($spotter_item['departure_airport_time'] > 2460) {
646 662
 					$departure_airport_time = date('H:m',$spotter_item['departure_airport_time']);
647
-				} else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
663
+				} else {
664
+					$departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2);
665
+				}
648 666
 				if ($spotter_item['real_departure_airport_time'] > 2460) {
649 667
 					$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
650
-				} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
668
+				} else {
669
+					$real_departure_airport_time = $spotter_item['real_departure_airport_time'];
670
+				}
651 671
 				print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n";
652 672
 			} elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') {
653 673
 				if ($spotter_item['real_departure_airport_time'] > 2460) {
654 674
 					$real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']);
655
-				} else $real_departure_airport_time = $spotter_item['real_departure_airport_time'];
675
+				} else {
676
+					$real_departure_airport_time = $spotter_item['real_departure_airport_time'];
677
+				}
656 678
 				print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n";
657 679
 			} elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') {
658 680
 				if ($spotter_item['departure_airport_time'] > 2460) {
@@ -674,7 +696,9 @@  discard block
 block discarded – undo
674 696
 						$longitude = $spotter_item['longitude'];
675 697
 					}
676 698
 					$distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude);
677
-				} else $distance = '';
699
+				} else {
700
+					$distance = '';
701
+				}
678 702
 				if ($distance != '') {
679 703
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
680 704
 						echo '<br/><i>'.round($distance*0.539957).' nm</i>';
@@ -701,7 +725,9 @@  discard block
 block discarded – undo
701 725
 			} else {
702 726
 				if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) {
703 727
 					print '<span class="nomobile">Scheduled : <a href="'.$globalURL.'/airport/'.$spotter_item['arrival_airport'].'">'.$spotter_item['arrival_airport_city'].', '.$spotter_item['arrival_airport_country'].' ('.$spotter_item['arrival_airport'].')</a></span>'."\n";
704
-					if (!isset($Spotter)) $Spotter = new Spotter();
728
+					if (!isset($Spotter)) {
729
+						$Spotter = new Spotter();
730
+					}
705 731
 					$arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['real_arrival_airport']);
706 732
 					print '<br /><span class="nomobile">'._("Real:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$arrival_airport_info[0]['city'].','.$arrival_airport_info[0]['country'].' ('.$spotter_item['real_arrival_airport'].')</a></span>'."\n";
707 733
 					print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n";
@@ -717,20 +743,28 @@  discard block
 block discarded – undo
717 743
 			if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) {
718 744
 				if ($spotter_item['arrival_airport_time'] > 2460) {
719 745
 					$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
720
-				} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
746
+				} else {
747
+					$arrival_airport_time = $spotter_item['arrival_airport_time'];
748
+				}
721 749
 				if ($spotter_item['real_arrival_airport_time'] > 2460) {
722 750
 					$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
723
-				} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
751
+				} else {
752
+					$real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
753
+				}
724 754
 				print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n";
725 755
 			} elseif (isset($spotter_item['real_arrival_airport_time'])) {
726 756
 				if ($spotter_item['real_arrival_airport_time'] > 2460) {
727 757
 					$real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']);
728
-				} else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
758
+				} else {
759
+					$real_arrival_airport_time = $spotter_item['real_arrival_airport_time'];
760
+				}
729 761
 				print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n";
730 762
 			} elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') {
731 763
 				if ($spotter_item['arrival_airport_time'] > 2460) {
732 764
 					$arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']);
733
-				} else $arrival_airport_time = $spotter_item['arrival_airport_time'];
765
+				} else {
766
+					$arrival_airport_time = $spotter_item['arrival_airport_time'];
767
+				}
734 768
 				print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n";
735 769
 			}
736 770
 			if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') {
@@ -743,7 +777,9 @@  discard block
 block discarded – undo
743 777
 						$longitude = $spotter_item['longitude'];
744 778
 					}
745 779
 					$distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude);
746
-				} else $distance = '';
780
+				} else {
781
+					$distance = '';
782
+				}
747 783
 				if ($distance != '') {
748 784
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
749 785
 						echo '<br/><i>'.round($distance*0.539957).' nm</i>';
Please login to merge, or discard this patch.
latest.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 require_once('header.php');
17 17
 
18 18
 //calculuation for the pagination
19
-if(!isset($_GET['limit']))
19
+if (!isset($_GET['limit']))
20 20
 {
21 21
 	$limit_start = 0;
22 22
 	$limit_end = 25;
23 23
 	$absolute_difference = 25;
24
-}  else {
24
+} else {
25 25
 	$limit_explode = explode(",", $_GET['limit']);
26 26
 	$limit_start = $limit_explode[0];
27 27
 	$limit_end = $limit_explode[1];
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
 if ($type == 'marine') print '<p>'._("The table below shows the detailed information of all recent vessels.").'</p>';
45 45
 else print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>';
46 46
 
47
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
47
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
48 48
 $sql_begin = microtime(true);
49 49
 if ($type == 'marine') {
50 50
 	$spotter_array = $Marine->getLatestMarineData($limit_start.",".$absolute_difference, $sort);
51 51
 } else {
52 52
 	$spotter_array = $Spotter->getLatestSpotterData($limit_start.",".$absolute_difference, $sort);
53 53
 }
54
-$sql_time = microtime(true)-$sql_begin;
54
+$sql_time = microtime(true) - $sql_begin;
55 55
 $page_begin = microtime(true);
56 56
 if (!empty($spotter_array))
57 57
 {
@@ -68,6 +68,6 @@  discard block
 block discarded – undo
68 68
 	print '</div>';
69 69
 	print '</div>';
70 70
 }
71
-$page_time = microtime(true)-$page_begin;
71
+$page_time = microtime(true) - $page_begin;
72 72
 require_once('footer.php');
73 73
 ?>
74 74
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	$limit_start = 0;
22 22
 	$limit_end = 25;
23 23
 	$absolute_difference = 25;
24
-}  else {
24
+} else {
25 25
 	$limit_explode = explode(",", $_GET['limit']);
26 26
 	$limit_start = $limit_explode[0];
27 27
 	$limit_end = $limit_explode[1];
@@ -41,8 +41,11 @@  discard block
 block discarded – undo
41 41
 print '<h1>'._("Latest Activity").'</h1>';
42 42
 print '</div>';
43 43
 print '<div class="table column">';
44
-if ($type == 'marine') print '<p>'._("The table below shows the detailed information of all recent vessels.").'</p>';
45
-else print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>';
44
+if ($type == 'marine') {
45
+	print '<p>'._("The table below shows the detailed information of all recent vessels.").'</p>';
46
+} else {
47
+	print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>';
48
+}
46 49
 
47 50
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
48 51
 $sql_begin = microtime(true);
Please login to merge, or discard this patch.
currently.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,26 +4,26 @@  discard block
 block discarded – undo
4 4
 
5 5
 $type = '';
6 6
 if (isset($_GET['marine'])) {
7
-	require_once('require/class.Marine.php');;
7
+	require_once('require/class.Marine.php'); ;
8 8
 	require_once('require/class.MarineLive.php');
9
-	$MarineLive=new MarineLive();
9
+	$MarineLive = new MarineLive();
10 10
 	$type = 'marine';
11 11
 } else {
12
-	require_once('require/class.Spotter.php');;
12
+	require_once('require/class.Spotter.php'); ;
13 13
 	require_once('require/class.SpotterLive.php');
14
-	$SpotterLive=new SpotterLive();
14
+	$SpotterLive = new SpotterLive();
15 15
 	$type = 'aircraft';
16 16
 }
17 17
 
18 18
 $title = "Current Activity";
19 19
 require_once('header.php');
20 20
 //calculuation for the pagination
21
-if(!isset($_GET['limit']))
21
+if (!isset($_GET['limit']))
22 22
 {
23 23
 	$limit_start = 0;
24 24
 	$limit_end = 25;
25 25
 	$absolute_difference = 25;
26
-}  else {
26
+} else {
27 27
 	$limit_explode = explode(",", $_GET['limit']);
28 28
 	$limit_start = $limit_explode[0];
29 29
 	$limit_end = $limit_explode[1];
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 if ($type == 'aircraft') print '<p>'._("The table below shows the detailed information of all current flights.").'</p>';
48 48
 elseif ($type == 'marine') print '<p>'._("The table below shows the detailed information of all current vessels.").'</p>';
49 49
 
50
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
50
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
51 51
 if ($sort != '') {
52 52
 	if ($type == 'aircraft') $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
53 53
 	elseif ($type == 'marine') $spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference, $sort);
Please login to merge, or discard this patch.
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	$limit_start = 0;
24 24
 	$limit_end = 25;
25 25
 	$absolute_difference = 25;
26
-}  else {
26
+} else {
27 27
 	$limit_explode = explode(",", $_GET['limit']);
28 28
 	$limit_start = $limit_explode[0];
29 29
 	$limit_end = $limit_explode[1];
@@ -44,17 +44,26 @@  discard block
 block discarded – undo
44 44
 print '</div>';
45 45
 
46 46
 print '<div class="table column">';
47
-if ($type == 'aircraft') print '<p>'._("The table below shows the detailed information of all current flights.").'</p>';
48
-elseif ($type == 'marine') print '<p>'._("The table below shows the detailed information of all current vessels.").'</p>';
47
+if ($type == 'aircraft') {
48
+	print '<p>'._("The table below shows the detailed information of all current flights.").'</p>';
49
+} elseif ($type == 'marine') {
50
+	print '<p>'._("The table below shows the detailed information of all current vessels.").'</p>';
51
+}
49 52
 
50 53
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
51 54
 if ($sort != '') {
52
-	if ($type == 'aircraft') $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
53
-	elseif ($type == 'marine') $spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference, $sort);
54
-} else {
55
-	if ($type == 'aircraft') $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference);
56
-	elseif ($type == 'marine') $spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference);
57
-}
55
+	if ($type == 'aircraft') {
56
+		$spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
57
+	} elseif ($type == 'marine') {
58
+		$spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference, $sort);
59
+	}
60
+	} else {
61
+	if ($type == 'aircraft') {
62
+		$spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference);
63
+	} elseif ($type == 'marine') {
64
+		$spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference);
65
+	}
66
+	}
58 67
 
59 68
 if (!empty($spotter_array))
60 69
 {
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +83 added lines, -83 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 <div id="showdetails" class="showdetails"></div>
37 37
 <div id="infobox" class="infobox"><?php if ((isset($globalAircraft) && $globalAircraft) || !isset($globalAircraft)) { ?><div id="aircraft"><h4><?php echo _("Aircrafts Detected"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div><br /><?php }; if (isset($globalMarine) && $globalMarine) { ?><div id="marine"><h4><?php echo _("Vessels Detected"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div><br /><?php }; if (isset($globalTracker) && $globalTracker) { ?><div id="tracker"><h4><?php echo _("Trackers Detected"); ?></h4><br /><i class="fa fa-spinner fa-pulse fa-fw"></i></div><?php } ?></div>
38 38
 <?php
39
-    if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
39
+	if ((!isset($_COOKIE['MapFormat']) && isset($globalMap3Ddefault) && $globalMap3Ddefault) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d')) {
40 40
 
41 41
 ?>
42 42
 <script src="<?php echo $globalURL; ?>/js/map.3d.js.php"></script>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 <script src="<?php echo $globalURL; ?>/js/map-marine.3d.js.php"></script>
57 57
 <?php
58 58
 	}
59
-    }
59
+	}
60 60
 ?>
61 61
 <div id="dialog" title="<?php echo _("Session has timed-out"); ?>">
62 62
   <p><?php echo _("In order to save data consumption web page times out after 30 minutes. Close this dialog to continue."); ?></p>
@@ -70,34 +70,34 @@  discard block
 block discarded – undo
70 70
 	<li><a href="#" onclick="getUserLocation(); return false;" title="<?php echo _("Plot your Location"); ?>"><i class="fa fa-map-marker"></i></a></li>
71 71
 	<li><a href="#" onclick="getCompassDirection(); return false;" title="<?php echo _("Compass Mode"); ?>"><i class="fa fa-compass"></i></a></li>
72 72
 <?php
73
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
73
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
74 74
 	if (isset($globalArchive) && $globalArchive == TRUE) {
75 75
 ?>
76 76
 	<li><a href="#archive" role="tab" title="<?php echo _("Archive"); ?>"><i class="fa fa-archive"></i></a></li>
77 77
 <?php
78 78
 	}
79
-    }
79
+	}
80 80
 ?>
81 81
 	<li><a href="#home" role="tab" title="<?php echo _("Layers"); ?>"><i class="fa fa-map"></i></a></li>
82 82
 	<li><a href="#filters" role="tab" title="<?php echo _("Filters"); ?>"><i class="fa fa-filter"></i></a></li>
83 83
 	<li><a href="#settings" role="tab" title="<?php echo _("Settings"); ?>"><i class="fa fa-gears"></i></a></li>
84 84
 <?php
85
-    if (isset($globalMap3D) && $globalMap3D) {
85
+	if (isset($globalMap3D) && $globalMap3D) {
86 86
 	if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
87 87
 ?>
88 88
 	<li><a href="#" onclick="show3D(); return false;" role="tab" title="3D"><b>3D</b></a></li>
89 89
 <?php
90
-        } else {
91
-    	    if (isset($globalMapSatellites) && $globalMapSatellites) {
90
+		} else {
91
+			if (isset($globalMapSatellites) && $globalMapSatellites) {
92 92
 ?>
93 93
 	<li><a href="#satellites" role="tab" title="<?php echo _("Satellites"); ?>"><i class="satellite"></i></a></li>
94 94
 <?php
95
-	    }
95
+		}
96 96
 ?>
97 97
 	<li><a href="#" onclick="show2D(); return false;" role="tab" title="2D"><b>2D</b></a></li>
98 98
 <?php
99 99
 	}
100
-    }
100
+	}
101 101
 ?>
102 102
     </ul>
103 103
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 ?>
172 172
         </div>
173 173
 <?php
174
-    if (isset($globalArchive) && $globalArchive == TRUE) {
174
+	if (isset($globalArchive) && $globalArchive == TRUE) {
175 175
 ?>
176 176
         <div class="sidebar-pane" id="archive">
177 177
 	    <h1 class="sidebar-header"><?php echo _("Playback"); ?> <i>Bêta</i><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 	    </form>
232 232
 	</div>
233 233
 <?php
234
-    }
234
+	}
235 235
 ?>
236 236
         <div class="sidebar-pane" id="settings">
237 237
 	    <h1 class="sidebar-header"><?php echo _("Settings"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -242,56 +242,56 @@  discard block
 block discarded – undo
242 242
 			    <?php
243 243
 				if (!isset($_COOKIE['MapType']) || $_COOKIE['MapType'] == '') $MapType = $globalMapProvider;
244 244
 				else $MapType = $_COOKIE['MapType'];
245
-			    ?>
245
+				?>
246 246
 			    <?php
247 247
 				if (isset($globalBingMapKey) && $globalBingMapKey != '') {
248
-			    ?>
248
+				?>
249 249
 			    <option value="Bing-Aerial"<?php if ($MapType == 'Bing-Aerial') print ' selected'; ?>>Bing-Aerial</option>
250 250
 			    <option value="Bing-Hybrid"<?php if ($MapType == 'Bing-Hybrid') print ' selected'; ?>>Bing-Hybrid</option>
251 251
 			    <option value="Bing-Road"<?php if ($MapType == 'Bing-Road') print ' selected'; ?>>Bing-Road</option>
252 252
 			    <?php
253 253
 				}
254
-			    ?>
254
+				?>
255 255
 			    <?php
256
-			        if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
257
-			    ?>
256
+					if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
257
+				?>
258 258
 			    <?php
259
-				    if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
260
-			    ?>
259
+					if (isset($globalHereappId) && $globalHereappId != '' && isset($globalHereappCode) && $globalHereappCode != '') {
260
+				?>
261 261
 			    <option value="Here-Aerial"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Aerial</option>
262 262
 			    <option value="Here-Hybrid"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Hybrid</option>
263 263
 			    <option value="Here-Road"<?php if ($MapType == 'Here') print ' selected'; ?>>Here-Road</option>
264 264
 			    <?php
265
-				    }
266
-			    ?>
265
+					}
266
+				?>
267 267
 			    <?php
268
-				    if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
269
-			    ?>
268
+					if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '') {
269
+				?>
270 270
 			    <option value="Google-Roadmap"<?php if ($MapType == 'Google-Roadmap') print ' selected'; ?>>Google Roadmap</option>
271 271
 			    <option value="Google-Satellite"<?php if ($MapType == 'Google-Satellite') print ' selected'; ?>>Google Satellite</option>
272 272
 			    <option value="Google-Hybrid"<?php if ($MapType == 'Google-Hybrid') print ' selected'; ?>>Google Hybrid</option>
273 273
 			    <option value="Google-Terrain"<?php if ($MapType == 'Google-Terrain') print ' selected'; ?>>Google Terrain</option>
274 274
 			    <?php
275
-				    }
276
-			    ?>
275
+					}
276
+				?>
277 277
 			    <?php
278
-				    if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
279
-			    ?>
278
+					if (isset($globalMapQuestKey) && $globalMapQuestKey != '') {
279
+				?>
280 280
 			    <option value="MapQuest-OSM"<?php if ($MapType == 'MapQuest-OSM') print ' selected'; ?>>MapQuest-OSM</option>
281 281
 			    <option value="MapQuest-Aerial"<?php if ($MapType == 'MapQuest-Aerial') print ' selected'; ?>>MapQuest-Aerial</option>
282 282
 			    <option value="MapQuest-Hybrid"<?php if ($MapType == 'MapQuest-Hybrid') print ' selected'; ?>>MapQuest-Hybrid</option>
283 283
 			    <?php
284
-				    }
285
-			    ?>
284
+					}
285
+				?>
286 286
 			    <option value="Yandex"<?php if ($MapType == 'Yandex') print ' selected'; ?>>Yandex</option>
287 287
 			    <?php
288 288
 				}
289
-			    ?>
289
+				?>
290 290
 			    <?php
291
-				    if (isset($globalMapboxToken) && $globalMapboxToken != '') {
291
+					if (isset($globalMapboxToken) && $globalMapboxToken != '') {
292 292
 					if (!isset($_COOKIE['MapTypeId'])) $MapBoxId = 'default';
293 293
 					else $MapBoxId = $_COOKIE['MapTypeId'];
294
-			    ?>
294
+				?>
295 295
 			    <option value="Mapbox-default"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'default') print ' selected'; ?>>Mapbox default</option>
296 296
 			    <option value="Mapbox-mapbox.streets"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.streets') print ' selected'; ?>>Mapbox streets</option>
297 297
 			    <option value="Mapbox-mapbox.light"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.light') print ' selected'; ?>>Mapbox light</option>
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 			    <option value="Mapbox-mapbox.pirates"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.pirates') print ' selected'; ?>>Mapbox pirates</option>
306 306
 			    <option value="Mapbox-mapbox.emerald"<?php if ($MapType == 'Mapbox' && $MapBoxId == 'mapbox.emerald') print ' selected'; ?>>Mapbox emerald</option>
307 307
 			    <?php
308
-				    }
309
-			    ?>
308
+					}
309
+				?>
310 310
 			    <option value="OpenStreetMap"<?php if ($MapType == 'OpenStreetMap') print ' selected'; ?>>OpenStreetMap</option>
311 311
 			</select>
312 312
 		    </li>
313 313
 <?php
314
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
314
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
315 315
 ?>
316 316
 		    <li><?php echo _("Type of Terrain:"); ?>
317 317
 			<select  class="selectpicker" onchange="terrainType(this);">
@@ -321,10 +321,10 @@  discard block
 block discarded – undo
321 321
 			</select>
322 322
 		    </li>
323 323
 <?php
324
-    }
324
+	}
325 325
 ?>
326 326
 <?php
327
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
327
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
328 328
 ?>
329 329
 		    
330 330
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpopup" value="1" onclick="clickFlightPopup(this)" <?php if (isset($_COOKIE['flightpopup']) && $_COOKIE['flightpopup'] == 'true') print 'checked'; ?> ><?php echo _("Display flight info as popup"); ?></label></div></li>
@@ -332,70 +332,70 @@  discard block
 block discarded – undo
332 332
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightroute" value="1" onclick="clickFlightRoute(this)" <?php if ((isset($_COOKIE['MapRoute']) && $_COOKIE['MapRoute'] == 'true') || !isset($_COOKIE['MapRoute'])) print 'checked'; ?> ><?php echo _("Display flight route on click"); ?></label></div></li>
333 333
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightestimation" value="1" onclick="clickFlightEstimation(this)" <?php if ((isset($_COOKIE['flightestimation']) && $_COOKIE['flightestimation'] == 'true') || (!isset($_COOKIE['flightestimation']) && !isset($globalMapEstimation)) || (!isset($_COOKIE['flightestimation']) && isset($globalMapEstimation) && $globalMapEstimation)) print 'checked'; ?> ><?php echo _("Planes animate between updates"); ?></label></div></li>
334 334
 <?php
335
-    }
335
+	}
336 336
 ?>
337 337
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayairports" value="1" onclick="clickDisplayAirports(this)" <?php if (isset($_COOKIE['displayairports']) && $_COOKIE['displayairports'] == 'true') print 'checked'; ?> ><?php echo _("Display airports on map"); ?></label></div></li>
338 338
 <?php
339
-    if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
339
+	if (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
340 340
 ?>
341 341
 		    <li><div class="checkbox"><label><input type="checkbox" name="displayminimap" value="1" onclick="clickDisplayMinimap(this)" <?php if (!isset($_COOKIE['displayminimap']) || (isset($_COOKIE['displayminimap']) && $_COOKIE['displayminimap'] == 'true')) print 'checked'; ?> ><?php echo _("Show mini-map"); ?></label></div></li>
342 342
 <?php
343
-    }
344
-    if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
343
+	}
344
+	if (time() > mktime(0,0,0,12,1,date("Y")) && time() < mktime(0,0,0,12,31,date("Y"))) {
345 345
 ?>
346 346
 		    <li><div class="checkbox"><label><input type="checkbox" name="displaysanta" value="1" onclick="clickSanta(this)"><i class="fa fa-snowflake-o" aria-hidden="true"></i> <?php echo _("Show Santa Claus now"); ?> <i class="fa fa-snowflake-o" aria-hidden="true"></i></label></div></li>
347 347
 <?php
348
-    }
348
+	}
349 349
 ?>
350 350
 
351 351
 		    <?php
352 352
 			if (function_exists('array_column')) {
353
-			    if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
354
-		    ?>
353
+				if (array_search(TRUE, array_column($globalSources, 'sourcestats')) !== FALSE) {
354
+			?>
355 355
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
356 356
 		    <?php
357
-			    }
357
+				}
358 358
 			} elseif (isset($globalSources)) {
359
-			    $dispolar = false;
360
-			    foreach ($globalSources as $testsource) {
361
-			        if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
362
-			    }
363
-			    if ($dispolar) {
364
-		    ?>
359
+				$dispolar = false;
360
+				foreach ($globalSources as $testsource) {
361
+					if (isset($globalSources['sourcestats']) && $globalSources['sourcestats'] !== FALSE) $dispolar = true;
362
+				}
363
+				if ($dispolar) {
364
+			?>
365 365
 		    <li><div class="checkbox"><label><input type="checkbox" name="flightpolar" value="1" onclick="clickPolar(this)" <?php if ((isset($_COOKIE['polar']) && $_COOKIE['polar'] == 'true')) print 'checked'; ?> ><?php echo _("Display polar on map"); ?></label></div></li>
366 366
 		    <?php
367
-			    }
368
-		        }
369
-		    ?>
367
+				}
368
+				}
369
+			?>
370 370
 <?php
371
-    if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
371
+	if (!isset($_COOKIE['MapFormat']) || $_COOKIE['MapFormat'] != '3d') {
372 372
 ?>
373 373
 
374 374
 		    <?php
375
-		        if (extension_loaded('gd') && function_exists('gd_info')) {
376
-		    ?>
375
+				if (extension_loaded('gd') && function_exists('gd_info')) {
376
+			?>
377 377
 		    <li><input type="checkbox" name="aircraftcoloraltitude" value="1" onclick="iconColorAltitude(this)" <?php if (isset($_COOKIE['IconColorAltitude']) && $_COOKIE['IconColorAltitude'] == 'true') print 'checked'; ?> ><?php echo _("Aircraft icon color based on altitude"); ?></li>
378 378
 		    <?php 
379 379
 			if (!isset($_COOKIE['IconColorAltitude']) || $_COOKIE['IconColorAltitude'] == 'false') {
380
-		    ?>
380
+			?>
381 381
 		    <li><?php echo _("Aircraft icon color:"); ?>
382 382
 			<input type="color" name="aircraftcolor" id="html5colorpicker" onchange="iconColor(aircraftcolor.value);" value="#<?php if (isset($_COOKIE['IconColor'])) print $_COOKIE['IconColor']; elseif (isset($globalAircraftIconColor)) print $globalAircraftIconColor; else print '1a3151'; ?>">
383 383
 		    </li>
384 384
 		    <?php
385
-			    }
386
-		        }
387
-		    ?>
385
+				}
386
+				}
387
+			?>
388 388
 		    <?php
389 389
 			if (isset($globalMarine) && $globalMarine === TRUE) {
390
-			    if (extension_loaded('gd') && function_exists('gd_info')) {
391
-		    ?>
390
+				if (extension_loaded('gd') && function_exists('gd_info')) {
391
+			?>
392 392
 		    <li><?php echo _("Marine icon color:"); ?>
393 393
 			<input type="color" name="marinecolor" id="html5colorpicker" onchange="iconColor(marinecolor.value);" value="#<?php if (isset($_COOKIE['MarineIconColor'])) print $_COOKIE['MarineIconColor']; elseif (isset($globalMarineIconColor)) print $globalMarineIconColor; else print '1a3151'; ?>">
394 394
 		    </li>
395 395
 		    <?php
396
-			    }
397
-		        }
398
-		    ?>
396
+				}
397
+				}
398
+			?>
399 399
 		    <li><?php echo _("Show airport icon at zoom level:"); ?>
400 400
 			<div class="range">
401 401
 			    <input type="range" min="0" max="19" step="1" name="airportzoom" onchange="range.value=value;airportDisplayZoom(airportzoom.value);" value="<?php if (isset($_COOKIE['AirportZoom'])) print $_COOKIE['AirportZoom']; elseif (isset($globalAirportZoom)) print $globalAirportZoom; else print '7'; ?>">
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 			</div>
404 404
 		    </li>
405 405
 <?php
406
-    } elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
406
+	} elseif (isset($_COOKIE['MapFormat']) || $_COOKIE['MapFOrmat'] == '3d') {
407 407
 ?>
408 408
 		    <li><input type="checkbox" name="aircraftcolorforce" value="1" onclick="iconColorForce(this)" <?php if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true') print 'checked'; ?> ><?php echo _("Force Aircraft color"); ?></li>
409 409
 		    <li><?php echo _("Aircraft icon color:"); ?>
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 		    </li>
419 419
 <?php
420 420
 	}
421
-    }
421
+	}
422 422
 ?>
423 423
 		    <li><?php echo _("Distance unit:"); ?>
424 424
 			<select class="selectpicker" onchange="unitdistance(this);">
@@ -451,16 +451,16 @@  discard block
 block discarded – undo
451 451
 		    <ul>
452 452
 		    <?php
453 453
 			if (((isset($globalVATSIM) && $globalVATSIM) || isset($globalIVAO) && $globalIVAO || isset($globalphpVMS) && $globalphpVMS) && (!isset($globalMapVAchoose) || $globalMapVAchoose)) {
454
-		    ?>
454
+			?>
455 455
 			<?php if (isset($globalVATSIM) && $globalVATSIM) { ?><li><input type="checkbox" name="vatsim" value="1" onclick="clickVATSIM(this)" <?php if ((isset($_COOKIE['ShowVATSIM']) && $_COOKIE['ShowVATSIM'] == 'true') || !isset($_COOKIE['ShowVATSIM'])) print 'checked'; ?> ><?php echo _("Display VATSIM data"); ?></li><?php } ?>
456 456
 			<?php if (isset($globalIVAO) && $globalIVAO) { ?><li><input type="checkbox" name="ivao" value="1" onclick="clickIVAO(this)" <?php if ((isset($_COOKIE['ShowIVAO']) && $_COOKIE['ShowIVAO'] == 'true') || !isset($_COOKIE['ShowIVAO'])) print 'checked'; ?> ><?php echo _("Display IVAO data"); ?></li><?php } ?>
457 457
 			<?php if (isset($globalphpVMS) && $globalphpVMS) { ?><li><input type="checkbox" name="phpvms" value="1" onclick="clickphpVMS(this)" <?php if ((isset($_COOKIE['ShowVMS']) && $_COOKIE['ShowVMS'] == 'true') || !isset($_COOKIE['ShowVMS'])) print 'checked'; ?> ><?php echo _("Display phpVMS data"); ?></li><?php } ?>
458 458
 		    <?php
459 459
 			}
460
-		    ?>
460
+			?>
461 461
 		    <?php
462 462
 			if (!(isset($globalVA) && $globalVA) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS) && isset($globalSBS1) && $globalSBS1 && isset($globalAPRS) && $globalAPRS && (!isset($globalMapchoose) || $globalMapchoose)) {
463
-		    ?>
463
+			?>
464 464
 			<?php if (isset($globalSBS1) && $globalSBS1) { ?>
465 465
 			    <li><div class="checkbox"><label><input type="checkbox" name="sbs" value="1" onclick="clickSBS1(this)" <?php if ((isset($_COOKIE['ShowSBS1']) && $_COOKIE['ShowSBS1'] == 'true') || !isset($_COOKIE['ShowSBS1'])) print 'checked'; ?> ><?php echo _("Display ADS-B data"); ?></label></div></li>
466 466
 			<?php } ?>
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 			<?php } ?>
470 470
 		    <?php
471 471
 			}
472
-		    ?>
472
+			?>
473 473
 		    <li><?php echo _("Display airlines:"); ?>
474 474
 		    <br/>
475 475
 			<select class="selectpicker" multiple onchange="airlines(this);" id="display_airlines">
@@ -489,14 +489,14 @@  discard block
 block discarded – undo
489 489
 						echo '<option value="'.$airline['airline_icao'].'">'.$airline_name.'</option>';
490 490
 					}
491 491
 				}
492
-			    ?>
492
+				?>
493 493
 			</select>
494 494
 		    </li>
495 495
 		    <?php
496 496
 			$Spotter = new Spotter();
497 497
 			$allalliancenames = $Spotter->getAllAllianceNames();
498 498
 			if (!empty($allalliancenames)) {
499
-		    ?>
499
+			?>
500 500
 		    <li><?php echo _("Display alliance:"); ?>
501 501
 		    <br/>
502 502
 			<select class="selectpicker" onchange="alliance(this);" id="display_alliance">
@@ -510,15 +510,15 @@  discard block
 block discarded – undo
510 510
 						echo '<option value="'.$alliance_name.'">'.$alliance_name.'</option>';
511 511
 					}
512 512
 				}
513
-			    ?>
513
+				?>
514 514
 			</select>
515 515
 		    </li>
516 516
 		    <?php
517 517
 			}
518
-		    ?>
518
+			?>
519 519
 		    <?php
520 520
 			if (isset($globalAPRS) && $globalAPRS) {
521
-		    ?>
521
+			?>
522 522
 		    <li><?php echo _("Display APRS sources name:"); ?>
523 523
 			<select class="selectpicker" multiple onchange="sources(this);">
524 524
 			    <?php
@@ -530,15 +530,15 @@  discard block
 block discarded – undo
530 530
 						echo '<option value="'.$source['source_name'].'">'.$source['source_name'].'</option>';
531 531
 					}
532 532
 				}
533
-			    ?>
533
+				?>
534 534
 			</select>
535 535
 		    </li>
536 536
 		    <?php
537 537
 			}
538
-		    ?>
538
+			?>
539 539
 		    <?php
540 540
 			if (!(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalphpVMS) && $globalphpVMS)) {
541
-		    ?>
541
+			?>
542 542
 		    <li><?php echo _("Display airlines of type:"); ?><br/>
543 543
 			<select class="selectpicker" onchange="airlinestype(this);">
544 544
 			    <option value="all"<?php if (!isset($_COOKIE['filter_airlinestype']) || $_COOKIE['filter_airlinestype'] == 'all' || $_COOKIE['filter_airlinestype'] == '') echo ' selected'; ?>><?php echo _("All"); ?></option>
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 		    </li>
550 550
 		    <?php
551 551
 			}
552
-		    ?>
552
+			?>
553 553
 		    <li>
554 554
 			<?php echo _("Display flight with ident:"); ?>
555 555
 			<input type="text" name="identfilter" onchange="identfilter();" id="identfilter" value="<?php if (isset($_COOKIE['filter_ident'])) print $_COOKIE['filter_ident']; ?>" />
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
 	    </form>
563 563
     	</div>
564 564
 <?php
565
-    if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
565
+	if (isset($globalMapSatellites) && $globalMapSatellites && isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] == '3d') {
566 566
 ?>
567 567
         <div class="sidebar-pane" id="satellites">
568 568
 	    <h1 class="sidebar-header"><?php echo _("Satellites"); ?><span class="sidebar-close"><i class="fa fa-caret-left"></i></span></h1>
@@ -602,14 +602,14 @@  discard block
 block discarded – undo
602 602
 						print '<option value="'.$type['tle_type'].'">'.$type_name.'</option>';
603 603
 					}
604 604
 				}
605
-			    ?>
605
+				?>
606 606
 			</select>
607 607
 		    </li>
608 608
 		</ul>
609 609
 	    </form>
610 610
 	</div>
611 611
 <?php
612
-    }
612
+	}
613 613
 ?>
614 614
     </div>
615 615
 </div>
Please login to merge, or discard this patch.
date.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 require_once(dirname(__FILE__).'/require/settings.php');
3 3
 $type = 'aircraft';
4 4
 if (isset($_GET['marine'])) $type = 'marine';
5
-$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING);
5
+$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);
6 6
 if ($date == '') $date = date('Y-m-d');
7 7
 if ($type == 'marine') header('Location: '.$globalURL.'/marine/date/'.$date);
8 8
 else header('Location: '.$globalURL.'/date/'.$date);
Please login to merge, or discard this patch.
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,9 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once(dirname(__FILE__).'/require/settings.php');
3 3
 $type = 'aircraft';
4
-if (isset($_GET['marine'])) $type = 'marine';
4
+if (isset($_GET['marine'])) {
5
+	$type = 'marine';
6
+}
5 7
 $date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING);
6
-if ($date == '') $date = date('Y-m-d');
7
-if ($type == 'marine') header('Location: '.$globalURL.'/marine/date/'.$date);
8
-else header('Location: '.$globalURL.'/date/'.$date);
8
+if ($date == '') {
9
+	$date = date('Y-m-d');
10
+}
11
+if ($type == 'marine') {
12
+	header('Location: '.$globalURL.'/marine/date/'.$date);
13
+} else {
14
+	header('Location: '.$globalURL.'/date/'.$date);
15
+}
9 16
 ?>
10 17
\ No newline at end of file
Please login to merge, or discard this patch.
date-detailed.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -3,25 +3,25 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Language.php');
4 4
 $type = '';
5 5
 if (isset($_GET['marine'])) {
6
-	require_once('require/class.Marine.php');;
6
+	require_once('require/class.Marine.php'); ;
7 7
 	$Marine = new Marine();
8 8
 	$type = 'marine';
9 9
 } else {
10
-	require_once('require/class.Spotter.php');;
10
+	require_once('require/class.Spotter.php'); ;
11 11
 	$Spotter = new Spotter();
12 12
 	$type = 'aircraft';
13 13
 }
14 14
 
15
-if (!isset($_GET['date'])){
15
+if (!isset($_GET['date'])) {
16 16
 	header('Location: '.$globalURL.'');
17 17
 } else {
18 18
 	//calculuation for the pagination
19
-	if(!isset($_GET['limit']))
19
+	if (!isset($_GET['limit']))
20 20
 	{
21 21
 		$limit_start = 0;
22 22
 		$limit_end = 25;
23 23
 		$absolute_difference = 25;
24
-	}  else {
24
+	} else {
25 25
 		$limit_explode = explode(",", $_GET['limit']);
26 26
 		$limit_start = $limit_explode[0];
27 27
 		$limit_end = $limit_explode[1];
@@ -35,24 +35,24 @@  discard block
 block discarded – undo
35 35
 	$limit_previous_1 = $limit_start - $absolute_difference;
36 36
 	$limit_previous_2 = $limit_end - $absolute_difference;
37 37
 	
38
-	$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
38
+	$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
39 39
 	$page_url = $globalURL.'/date/'.$date;
40 40
 	
41
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
41
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
42 42
 	if ($sort != '') 
43 43
 	{
44
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference, $sort);
45
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort);
44
+		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference, $sort);
45
+		else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference, $sort);
46 46
 	} else {
47
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference);
48
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference);
47
+		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference);
48
+		else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference);
49 49
 	}
50 50
 	
51 51
 	if (!empty($spotter_array))
52 52
 	{
53 53
 		date_default_timezone_set($globalTimezone);
54
-		if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
55
-		else $title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
54
+		if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
55
+		else $title = sprintf(_("Detailed View for flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
56 56
 
57 57
 		require_once('header.php');
58 58
 		print '<div class="select-item">';
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 		print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
71 71
 		print '<br />';
72 72
 		print '<div class="info column">';
73
-		if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
74
-		else print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
73
+		if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
74
+		else print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
75 75
 		print '</div>';
76 76
 
77 77
 		if ($type == 'aircraft') include('date-sub-menu.php');
78 78
 		print '<div class="table column">';
79
-		if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
80
-		else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
79
+		if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
80
+		else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
81 81
  
82 82
 		include('table-output.php');
83 83
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
Braces   +29 added lines, -12 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		$limit_start = 0;
22 22
 		$limit_end = 25;
23 23
 		$absolute_difference = 25;
24
-	}  else {
24
+	} else {
25 25
 		$limit_explode = explode(",", $_GET['limit']);
26 26
 		$limit_start = $limit_explode[0];
27 27
 		$limit_end = $limit_explode[1];
@@ -41,18 +41,27 @@  discard block
 block discarded – undo
41 41
 	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
42 42
 	if ($sort != '') 
43 43
 	{
44
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference, $sort);
45
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort);
44
+		if ($type == 'marine') {
45
+			$spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference, $sort);
46
+		} else {
47
+			$spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort);
48
+		}
46 49
 	} else {
47
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference);
48
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference);
50
+		if ($type == 'marine') {
51
+			$spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference);
52
+		} else {
53
+			$spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference);
54
+		}
49 55
 	}
50 56
 	
51 57
 	if (!empty($spotter_array))
52 58
 	{
53 59
 		date_default_timezone_set($globalTimezone);
54
-		if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
55
-		else $title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
60
+		if ($type == 'marine') {
61
+			$title = sprintf(_("Detailed View for vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
62
+		} else {
63
+			$title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
64
+		}
56 65
 
57 66
 		require_once('header.php');
58 67
 		print '<div class="select-item">';
@@ -70,14 +79,22 @@  discard block
 block discarded – undo
70 79
 		print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
71 80
 		print '<br />';
72 81
 		print '<div class="info column">';
73
-		if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
74
-		else print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
82
+		if ($type == 'marine') {
83
+			print '<h1>'.sprintf(_("Vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
84
+		} else {
85
+			print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
86
+		}
75 87
 		print '</div>';
76 88
 
77
-		if ($type == 'aircraft') include('date-sub-menu.php');
89
+		if ($type == 'aircraft') {
90
+			include('date-sub-menu.php');
91
+		}
78 92
 		print '<div class="table column">';
79
-		if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
80
-		else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
93
+		if ($type == 'marine') {
94
+			print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
95
+		} else {
96
+			print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
97
+		}
81 98
  
82 99
 		include('table-output.php');
83 100
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
header.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 // When button "Remove all filters" is clicked
29 29
 if (isset($_POST['removefilters'])) {
30 30
 	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
31
-	    return strpos($key,'filter_') === 0;
31
+		return strpos($key,'filter_') === 0;
32 32
 	});
33 33
 	foreach ($allfilters as $filt) {
34 34
 		unset($_COOKIE[$filt]);
@@ -168,17 +168,17 @@  discard block
 block discarded – undo
168 168
 	}
169 169
 ?>
170 170
 <?php 
171
-    if (isset($_POST['archive'])) {
171
+	if (isset($_POST['archive'])) {
172 172
 ?>
173 173
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
174 174
 <?php 
175
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
175
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
176 176
 ?>
177 177
 
178 178
 <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script>
179 179
 <?php    
180
-	    }
181
-    } else {
180
+		}
181
+	} else {
182 182
 ?>
183 183
 <?php
184 184
 /*	if (isset($globalBeta) && $globalBeta) {
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 */
191 191
 ?>
192 192
 <?php 
193
-	    if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
193
+		if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) {
194 194
 ?>
195 195
 <?php
196 196
 //		if (isset($globalBeta) && $globalBeta) {
@@ -217,13 +217,13 @@  discard block
 block discarded – undo
217 217
 <script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>"></script>
218 218
 <?php
219 219
 		}
220
-	    }
220
+		}
221 221
 ?>
222 222
 <?php
223 223
 //	}
224 224
 ?>
225 225
 <?php
226
-    }
226
+	}
227 227
 }
228 228
 ?>
229 229
 <?php
@@ -376,24 +376,24 @@  discard block
 block discarded – undo
376 376
       <ul class="nav navbar-nav">
377 377
 
378 378
 <?php 
379
-    $sub = false;
380
-    if ((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && (isset($globalMarine) && $globalMarine === TRUE)) {
379
+	$sub = false;
380
+	if ((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && (isset($globalMarine) && $globalMarine === TRUE)) {
381 381
 	$sub = true;
382
-    }
382
+	}
383 383
 ?>
384 384
 <?php
385
-    if (!isset($globalAircraft) || $globalAircraft === TRUE) {
385
+	if (!isset($globalAircraft) || $globalAircraft === TRUE) {
386 386
 ?>
387 387
     <li class="dropdown">
388 388
 <?php
389
-    if ($sub) {
389
+	if ($sub) {
390 390
 ?>
391 391
       	<li class="dropdown">
392 392
           <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircrafts"); ?> <b class="caret"></b></a>
393 393
 	<ul class="dropdown-menu multi-level">
394 394
       	<li class="dropdown-submenu">
395 395
 <?php
396
-    }
396
+	}
397 397
 ?>
398 398
           <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
399 399
           <ul class="dropdown-menu">
@@ -401,15 +401,15 @@  discard block
 block discarded – undo
401 401
 			<li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li>
402 402
 			<li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li>
403 403
 <?php
404
-    if ((!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM)) {
404
+	if ((!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM)) {
405 405
 ?>
406 406
 			<li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li>
407 407
 <?php
408
-    } else {
408
+	} else {
409 409
 ?>
410 410
 			<li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li>
411 411
 <?php
412
-    }
412
+	}
413 413
 ?>
414 414
 			<li><hr /></li>
415 415
             <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li>
@@ -417,34 +417,34 @@  discard block
 block discarded – undo
417 417
             <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li>
418 418
             <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li>
419 419
             <?php
420
-        	if ($globalACARS) {
421
-        	    if (isset($globalDemo) && $globalDemo) {
422
-    	    ?>
420
+			if ($globalACARS) {
421
+				if (isset($globalDemo) && $globalDemo) {
422
+			?>
423 423
             <li><hr /></li>
424 424
             <li><i><?php echo _('ACARS data not available publicly'); ?></i></li>
425 425
             <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li>
426 426
             <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li>
427 427
             <?php
428
-        	    } else {
429
-    	    ?>
428
+				} else {
429
+			?>
430 430
             <li><hr /></li>
431 431
             <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li>
432 432
             <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li>
433 433
             <?php
434
-        	    }
435
-        	}
436
-    	    ?>
434
+				}
435
+			}
436
+			?>
437 437
     	    <?php
438
-    	        if (isset($globalAccidents) && $globalAccidents) {
439
-    	    ?>
438
+				if (isset($globalAccidents) && $globalAccidents) {
439
+			?>
440 440
             <li><hr /></li>
441 441
             <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li>
442 442
             <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li>
443 443
             <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li>
444 444
             <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li>
445 445
             <?php
446
-        	}
447
-    	    ?>
446
+			}
447
+			?>
448 448
             <li><hr /></li>
449 449
             <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li>
450 450
             <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li>
@@ -467,14 +467,14 @@  discard block
 block discarded – undo
467 467
     </ul>
468 468
 <?php
469 469
 	}
470
-    }
470
+	}
471 471
 ?>
472 472
 <?php
473
-    if (isset($globalMarine) && $globalMarine) {
473
+	if (isset($globalMarine) && $globalMarine) {
474 474
 ?>
475 475
     <li class="dropdown">
476 476
 <?php
477
-        if ($sub) {
477
+		if ($sub) {
478 478
 ?>
479 479
     <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Vessels"); ?> <b class="caret"></b></a>
480 480
 	<ul class="dropdown-menu multi-level">
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 	}
499 499
 ?>
500 500
 <?php
501
-    }
501
+	}
502 502
 ?>
503 503
 
504 504
         <li class="dropdown">
@@ -527,14 +527,14 @@  discard block
 block discarded – undo
527 527
   	    <form>
528 528
   		<select class="selectpicker" data-width="120px" onchange="language(this);">
529 529
   		    <?php
530
-  		        $Language = new Language();
531
-  		        $alllang = $Language->getLanguages();
532
-  		        foreach ($alllang as $key => $lang) {
533
-  		            print '<option value="'.$key.'"';
534
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
535
-  		            print '>'.$lang[0].'</option>';
536
-  		        }
537
-  		    ?>
530
+  				$Language = new Language();
531
+  				$alllang = $Language->getLanguages();
532
+  				foreach ($alllang as $key => $lang) {
533
+  					print '<option value="'.$key.'"';
534
+  					if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
535
+  					print '>'.$lang[0].'</option>';
536
+  				}
537
+  			?>
538 538
   		</select>
539 539
   	    </form>
540 540
   	</div>
@@ -565,18 +565,18 @@  discard block
 block discarded – undo
565 565
 ?>
566 566
     <div class="top-header clear" role="main">
567 567
 <?php
568
-    if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
568
+	if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) {
569 569
 ?>
570 570
     <div id="archive-map"></div>
571 571
 <?php
572
-    }
572
+	}
573 573
 ?>
574 574
     </div>
575 575
 <?php
576 576
 }
577 577
 if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false))
578 578
 {
579
-    ?>
579
+	?>
580 580
     <div class="top-header clear" role="main">
581 581
         <div id="map"></div>
582 582
 	<link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" />
@@ -587,15 +587,15 @@  discard block
 block discarded – undo
587 587
         var zoom = 13;
588 588
 //create the map
589 589
 <?php
590
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
590
+	if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
591 591
 ?>
592 592
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
593 593
 <?php
594
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
594
+	} elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
595 595
 ?>
596 596
   map = L.map('map', { zoomControl:true });
597 597
 <?php
598
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
598
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
599 599
 ?>
600 600
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
601 601
     var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map);
@@ -603,22 +603,22 @@  discard block
 block discarded – undo
603 603
     var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
604 604
     var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
605 605
 <?php
606
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
606
+	} elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) {
607 607
 ?>
608 608
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
609 609
 <?php
610
-    } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
610
+	} elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) {
611 611
 ?>
612 612
   map = L.map('map', { zoomControl:true });
613 613
 <?php
614
-    }
614
+	}
615 615
 ?>
616 616
   //initialize the layer group for the aircrft markers
617 617
   var layer_data = L.layerGroup();
618 618
 
619 619
   //a few title layers
620 620
 <?php
621
-    if ($globalMapProvider == 'Mapbox') {
621
+	if ($globalMapProvider == 'Mapbox') {
622 622
 ?>
623 623
   L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', {
624 624
     maxZoom: 18,
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
     token : '<?php print $globalMapboxToken; ?>'
630 630
   }).addTo(map);
631 631
 <?php
632
-    } elseif ($globalMapProvider == 'OpenStreetMap') {
632
+	} elseif ($globalMapProvider == 'OpenStreetMap') {
633 633
 ?>
634 634
   L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
635 635
     maxZoom: 18,
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
       '<a href="http://www.openstreetmap.org/copyright">Open Database Licence</a>'
638 638
   }).addTo(map);
639 639
 <?php
640
-    } elseif ($globalMapProvider == 'MapQuest-OSM') {
640
+	} elseif ($globalMapProvider == 'MapQuest-OSM') {
641 641
 ?>
642 642
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', {
643 643
     maxZoom: 18,
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>'
647 647
   }).addTo(map);
648 648
 <?php
649
-    } elseif ($globalMapProvider == 'MapQuest-Aerial') {
649
+	} elseif ($globalMapProvider == 'MapQuest-Aerial') {
650 650
 ?>
651 651
   L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', {
652 652
     maxZoom: 18,
@@ -655,27 +655,27 @@  discard block
 block discarded – undo
655 655
       'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"'
656 656
   }).addTo(map);
657 657
 <?php
658
-    } elseif ($globalMapProvider == 'Google-Roadmap') {
658
+	} elseif ($globalMapProvider == 'Google-Roadmap') {
659 659
 ?>
660 660
     var googleLayer = new L.Google('ROADMAP');
661 661
     map.addLayer(googleLayer);
662 662
 <?php
663
-    } elseif ($globalMapProvider == 'Google-Satellite') {
663
+	} elseif ($globalMapProvider == 'Google-Satellite') {
664 664
 ?>
665 665
     var googleLayer = new L.Google('SATELLITE');
666 666
     map.addLayer(googleLayer);
667 667
 <?php
668
-    } elseif ($globalMapProvider == 'Google-Hybrid') {
668
+	} elseif ($globalMapProvider == 'Google-Hybrid') {
669 669
 ?>
670 670
     var googleLayer = new L.Google('HYBRID');
671 671
     map.addLayer(googleLayer);
672 672
 <?php
673
-    } elseif ($globalMapProvider == 'Google-Terrain') {
673
+	} elseif ($globalMapProvider == 'Google-Terrain') {
674 674
 ?>
675 675
     var googleLayer = new L.Google('Terrain');
676 676
     map.addLayer(googleLayer);
677 677
 <?php
678
-    }
678
+	}
679 679
 ?>
680 680
         </script>
681 681
     </div>
Please login to merge, or discard this patch.
Braces   +48 added lines, -11 removed lines patch added patch discarded remove patch
@@ -5,8 +5,11 @@  discard block
 block discarded – undo
5 5
 $file_path = pathinfo($_SERVER['SCRIPT_NAME']);
6 6
 $current_page = $file_path['filename'];
7 7
 date_default_timezone_set($globalTimezone);
8
-if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType'];
9
-else $MapType = $globalMapProvider;
8
+if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') {
9
+	$MapType = $_COOKIE['MapType'];
10
+} else {
11
+	$MapType = $globalMapProvider;
12
+}
10 13
 if (isset($_GET['3d'])) {
11 14
 	setcookie('MapFormat','3d');
12 15
 } else if (isset($_GET['2d'])) {
@@ -241,7 +244,13 @@  discard block
 block discarded – undo
241 244
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
242 245
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
243 246
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
244
-<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
247
+<script src="<?php print $globalURL; ?>/js/map.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) {
248
+	print '&latitude='.$latitude;
249
+}
250
+?><?php if(isset($longitude)) {
251
+	print '&longitude='.$longitude;
252
+}
253
+?>&<?php print time(); ?>"></script>
245 254
 <?php
246 255
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
247 256
 ?>
@@ -296,7 +305,13 @@  discard block
 block discarded – undo
296 305
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
297 306
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
298 307
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
299
-<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script>
308
+<script src="<?php print $globalURL; ?>/js/map.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) {
309
+	print '&latitude='.$latitude;
310
+}
311
+?><?php if(isset($longitude)) {
312
+	print '&longitude='.$longitude;
313
+}
314
+?>&<?php print time(); ?>"></script>
300 315
 <?php
301 316
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
302 317
 ?>
@@ -369,7 +384,12 @@  discard block
 block discarded – undo
369 384
         <span class="icon-bar"></span>
370 385
       </button>
371 386
       <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a>
372
-      <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
387
+      <a class="navbar-brand" href="<?php if ($globalURL == '') {
388
+	print '/';
389
+} else {
390
+	print $globalURL;
391
+}
392
+?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
373 393
     </div>
374 394
     <div class="collapse navbar-collapse">
375 395
 
@@ -395,7 +415,10 @@  discard block
 block discarded – undo
395 415
 <?php
396 416
     }
397 417
 ?>
398
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
418
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
419
+	echo 'right-';
420
+}
421
+?>caret"></b></a>
399 422
           <ul class="dropdown-menu">
400 423
           	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li>
401 424
 			<li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li>
@@ -452,8 +475,14 @@  discard block
 block discarded – undo
452 475
         </li>
453 476
       	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
454 477
       	<li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li>
455
-        <li class="dropdown<?php if ($sub) echo '-submenu'; ?>">
456
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
478
+        <li class="dropdown<?php if ($sub) {
479
+	echo '-submenu';
480
+}
481
+?>">
482
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) {
483
+	echo 'right-';
484
+}
485
+?>caret"></b></a>
457 486
           <ul class="dropdown-menu">
458 487
           	<li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li>
459 488
           	<li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li>
@@ -482,7 +511,10 @@  discard block
 block discarded – undo
482 511
 <?php
483 512
 	}
484 513
 ?>
485
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
514
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
515
+	echo 'right-';
516
+}
517
+?>caret"></b></a>
486 518
 		<ul class="dropdown-menu">
487 519
 		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
488 520
 		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -531,7 +563,9 @@  discard block
 block discarded – undo
531 563
   		        $alllang = $Language->getLanguages();
532 564
   		        foreach ($alllang as $key => $lang) {
533 565
   		            print '<option value="'.$key.'"';
534
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
566
+  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) {
567
+  		            	print ' selected ';
568
+  		            }
535 569
   		            print '>'.$lang[0].'</option>';
536 570
   		        }
537 571
   		    ?>
@@ -684,4 +718,7 @@  discard block
 block discarded – undo
684 718
 
685 719
 ?>
686 720
 
687
-<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
721
+<section class="container main-content <?php if (strtolower($current_page) == 'index') {
722
+	print 'index ';
723
+}
724
+?>clear">
Please login to merge, or discard this patch.