@@ -4,8 +4,8 @@ discard block |
||
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 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | } |
140 | 140 | print '<th class="more"></th>'; |
141 | 141 | print '</thead>'; |
142 | -} else if (strtolower($current_page) == "upcoming"){ |
|
142 | +} else if (strtolower($current_page) == "upcoming") { |
|
143 | 143 | print '<thead>'; |
144 | 144 | if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
145 | 145 | if ($_GET['sort'] == "airline_name_asc") |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | } |
194 | 194 | */ |
195 | 195 | print '</thead>'; |
196 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
196 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
197 | 197 | print '<thead>'; |
198 | 198 | print '<th class="aircraft_thumbnail"></th>'; |
199 | 199 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | print '</thead>'; |
231 | 231 | } else { |
232 | 232 | |
233 | - if ($hide_th_links === true){ |
|
233 | + if ($hide_th_links === true) { |
|
234 | 234 | print '<thead>'; |
235 | 235 | print '<th class="aircraft_thumbnail"></th>'; |
236 | 236 | if ($type == 'aircraft') { |
@@ -487,7 +487,7 @@ discard block |
||
487 | 487 | } |
488 | 488 | |
489 | 489 | print '<tbody>'."\n"; |
490 | -foreach($spotter_array as $spotter_item) |
|
490 | +foreach ($spotter_array as $spotter_item) |
|
491 | 491 | { |
492 | 492 | if (isset($globalTimezone)) |
493 | 493 | { |
@@ -522,13 +522,13 @@ discard block |
||
522 | 522 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
523 | 523 | } |
524 | 524 | if (isset($spotter_item['airline_name'])) { |
525 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
525 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
526 | 526 | } else { |
527 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
527 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
528 | 528 | } |
529 | 529 | } else { |
530 | 530 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
531 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
531 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
532 | 532 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
533 | 533 | if (isset($spotter_item['airline_name'])) { |
534 | 534 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | { |
548 | 548 | print '<td class="aircraft_thumbnail">'."\n"; |
549 | 549 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
550 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
550 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
551 | 551 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
552 | 552 | if (isset($spotter_item['airline_name'])) { |
553 | 553 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | { |
566 | 566 | print '<td class="aircraft_thumbnail">'."\n"; |
567 | 567 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
568 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
568 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
569 | 569 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
570 | 570 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
571 | 571 | print '</td>'."\n"; |
@@ -609,7 +609,7 @@ discard block |
||
609 | 609 | print '</td>'."\n"; |
610 | 610 | } |
611 | 611 | } |
612 | - } 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"){ |
|
612 | + } 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") { |
|
613 | 613 | if ($type == 'aircraft') { |
614 | 614 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
615 | 615 | $spotter_item['squawk'] = '-'; |
@@ -626,17 +626,17 @@ discard block |
||
626 | 626 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
627 | 627 | } |
628 | 628 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
629 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
629 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
630 | 630 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
631 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
631 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
632 | 632 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
633 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
633 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
634 | 634 | } else { |
635 | - 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
635 | + 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">© '.$spotter_item['image_copyright'].'</div>'; |
|
636 | 636 | } |
637 | 637 | } else { |
638 | 638 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
639 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
639 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
640 | 640 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
641 | 641 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
642 | 642 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | { |
670 | 670 | print '<td class="aircraft_thumbnail">'."\n"; |
671 | 671 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
672 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
672 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
673 | 673 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
674 | 674 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
675 | 675 | print '</td>'."\n"; |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | { |
684 | 684 | print '<td class="aircraft_thumbnail">'."\n"; |
685 | 685 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
686 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
686 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
687 | 687 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
688 | 688 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
689 | 689 | print '</td>'."\n"; |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | print '</td>'."\n"; |
793 | 793 | } |
794 | 794 | // Aircraft type |
795 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
795 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
796 | 796 | print '<td class="type">'."\n"; |
797 | 797 | if ($type == 'aircraft') { |
798 | 798 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | //print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'._("Not available").'</a></span>'."\n"; |
802 | 802 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
803 | 803 | } else { |
804 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
804 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
805 | 805 | if (count($aircraft_names) == 1) print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a></span>'."\n"; |
806 | 806 | else print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].'</a></span>'."\n"; |
807 | 807 | } |
@@ -845,22 +845,22 @@ discard block |
||
845 | 845 | } |
846 | 846 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
847 | 847 | if ($spotter_item['departure_airport_time'] > 2460) { |
848 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
849 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
848 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
849 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
850 | 850 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
851 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
851 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
852 | 852 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
853 | 853 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
854 | 854 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
855 | 855 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
856 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
856 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
857 | 857 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
858 | 858 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
859 | 859 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
860 | 860 | if ($spotter_item['departure_airport_time'] > 2460) { |
861 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
861 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
862 | 862 | } else { |
863 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
863 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
864 | 864 | } |
865 | 865 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
866 | 866 | } |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | $latitude = $spotter_item['latitude']; |
876 | 876 | $longitude = $spotter_item['longitude']; |
877 | 877 | } |
878 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
878 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
879 | 879 | } else $distance = ''; |
880 | 880 | if ($distance != '') { |
881 | 881 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -918,20 +918,20 @@ discard block |
||
918 | 918 | } |
919 | 919 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
920 | 920 | if ($spotter_item['arrival_airport_time'] > 2460) { |
921 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
921 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
922 | 922 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
923 | 923 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
924 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
924 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
925 | 925 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
926 | 926 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
927 | 927 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
928 | 928 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
929 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
929 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
930 | 930 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
931 | 931 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
932 | 932 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
933 | 933 | if ($spotter_item['arrival_airport_time'] > 2460) { |
934 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
934 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
935 | 935 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
936 | 936 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
937 | 937 | } |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | $latitude = $spotter_item['latitude']; |
945 | 945 | $longitude = $spotter_item['longitude']; |
946 | 946 | } |
947 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
947 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
948 | 948 | } else $distance = ''; |
949 | 949 | if ($distance != '') { |
950 | 950 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -987,19 +987,19 @@ discard block |
||
987 | 987 | print '<span class="mobile">-</span>'."\n"; |
988 | 988 | } else { |
989 | 989 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
990 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
991 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
990 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
991 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
992 | 992 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
993 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
994 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
993 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
994 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
995 | 995 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
996 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
997 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
996 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
997 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
998 | 998 | } |
999 | 999 | } |
1000 | 1000 | print '</td>'."\n"; |
1001 | 1001 | } |
1002 | - if(strtolower($current_page) != "upcoming"){ |
|
1002 | + if (strtolower($current_page) != "upcoming") { |
|
1003 | 1003 | if ($type == 'aircraft') { |
1004 | 1004 | //if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
1005 | 1005 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
@@ -1042,7 +1042,7 @@ discard block |
||
1042 | 1042 | |
1043 | 1043 | if ($showRouteStop) { |
1044 | 1044 | // Route stop |
1045 | - if(strtolower($current_page) != "upcoming"){ |
|
1045 | + if (strtolower($current_page) != "upcoming") { |
|
1046 | 1046 | print '<td class="route_stop">'."\n"; |
1047 | 1047 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
1048 | 1048 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1061,11 +1061,11 @@ discard block |
||
1061 | 1061 | } |
1062 | 1062 | if ($showDuration) { |
1063 | 1063 | // Duration |
1064 | - if(strtolower($current_page) != "upcoming"){ |
|
1064 | + if (strtolower($current_page) != "upcoming") { |
|
1065 | 1065 | print '<td class="duration">'."\n"; |
1066 | 1066 | if (isset($spotter_item['duration'])) { |
1067 | - print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1068 | - print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1067 | + print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1068 | + print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1069 | 1069 | } else { |
1070 | 1070 | print '<span class="nomobile">-</span>'."\n"; |
1071 | 1071 | print '<span class="mobile">-</span>'."\n"; |
@@ -1078,7 +1078,7 @@ discard block |
||
1078 | 1078 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
1079 | 1079 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
1080 | 1080 | print '<td class="message"><p>'."\n"; |
1081 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1081 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1082 | 1082 | print '</p><p class="decode">'; |
1083 | 1083 | $decode_array = json_decode($spotter_item['decode']); |
1084 | 1084 | foreach ($decode_array as $key => $value) { |
@@ -1088,7 +1088,7 @@ discard block |
||
1088 | 1088 | print '</td>'."\n"; |
1089 | 1089 | } else { |
1090 | 1090 | print '<td class="message">'."\n"; |
1091 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1091 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1092 | 1092 | print '</td>'."\n"; |
1093 | 1093 | } |
1094 | 1094 | } |
@@ -1113,7 +1113,7 @@ discard block |
||
1113 | 1113 | } |
1114 | 1114 | print '</td>'."\n"; |
1115 | 1115 | print '<td class="message">'."\n"; |
1116 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1116 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1117 | 1117 | print '</td>'."\n"; |
1118 | 1118 | } |
1119 | 1119 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -1139,7 +1139,7 @@ discard block |
||
1139 | 1139 | print '</td>'."\n"; |
1140 | 1140 | */ |
1141 | 1141 | print '<td class="message">'."\n"; |
1142 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1142 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1143 | 1143 | print '</td>'."\n"; |
1144 | 1144 | } |
1145 | 1145 |
@@ -7,7 +7,9 @@ discard block |
||
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 | { |
@@ -492,7 +494,9 @@ discard block |
||
492 | 494 | if (isset($globalTimezone)) |
493 | 495 | { |
494 | 496 | date_default_timezone_set($globalTimezone); |
495 | - } else date_default_timezone_set('UTC'); |
|
497 | + } else { |
|
498 | + date_default_timezone_set('UTC'); |
|
499 | + } |
|
496 | 500 | if ($showSpecial === true) |
497 | 501 | { |
498 | 502 | print '<tr class="special">'."\n"; |
@@ -507,7 +511,9 @@ discard block |
||
507 | 511 | print '<tr class="active">'; |
508 | 512 | } elseif (isset($spotter_item['spotted_registration'])) { |
509 | 513 | print '<tr class="info">'; |
510 | - } else print '<tr>'; |
|
514 | + } else { |
|
515 | + print '<tr>'; |
|
516 | + } |
|
511 | 517 | } |
512 | 518 | 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") { |
513 | 519 | if ($type == 'aircraft') { |
@@ -515,8 +521,9 @@ discard block |
||
515 | 521 | { |
516 | 522 | print '<td class="aircraft_thumbnail">'."\n"; |
517 | 523 | if ($spotter_item['image_source'] == 'planespotters') { |
518 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
519 | - else { |
|
524 | + if ($spotter_item['image_source_website'] != '') { |
|
525 | + $image_src = $spotter_item['image_source_website']; |
|
526 | + } else { |
|
520 | 527 | $planespotter_url_array = explode("_", $spotter_item['image']); |
521 | 528 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
522 | 529 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -529,7 +536,9 @@ discard block |
||
529 | 536 | } else { |
530 | 537 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
531 | 538 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
532 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
539 | + } else { |
|
540 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
541 | + } |
|
533 | 542 | if (isset($spotter_item['airline_name'])) { |
534 | 543 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
535 | 544 | } else { |
@@ -548,7 +557,9 @@ discard block |
||
548 | 557 | print '<td class="aircraft_thumbnail">'."\n"; |
549 | 558 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
550 | 559 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
551 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
560 | + } else { |
|
561 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
562 | + } |
|
552 | 563 | if (isset($spotter_item['airline_name'])) { |
553 | 564 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
554 | 565 | } else { |
@@ -566,7 +577,9 @@ discard block |
||
566 | 577 | print '<td class="aircraft_thumbnail">'."\n"; |
567 | 578 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
568 | 579 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
569 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
580 | + } else { |
|
581 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
582 | + } |
|
570 | 583 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
571 | 584 | print '</td>'."\n"; |
572 | 585 | } else { |
@@ -619,8 +632,9 @@ discard block |
||
619 | 632 | print '<td class="aircraft_thumbnail">'."\n"; |
620 | 633 | //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>'; |
621 | 634 | if ($spotter_item['image_source'] == 'planespotters') { |
622 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
623 | - else { |
|
635 | + if ($spotter_item['image_source_website'] != '') { |
|
636 | + $image_src = $spotter_item['image_source_website']; |
|
637 | + } else { |
|
624 | 638 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
625 | 639 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
626 | 640 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -637,7 +651,9 @@ discard block |
||
637 | 651 | } else { |
638 | 652 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
639 | 653 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
640 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
654 | + } else { |
|
655 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
656 | + } |
|
641 | 657 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
642 | 658 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
643 | 659 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -670,7 +686,9 @@ discard block |
||
670 | 686 | print '<td class="aircraft_thumbnail">'."\n"; |
671 | 687 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
672 | 688 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
673 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
689 | + } else { |
|
690 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
691 | + } |
|
674 | 692 | 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">© '.$spotter_item['image_copyright'].'</div>'; |
675 | 693 | print '</td>'."\n"; |
676 | 694 | } else { |
@@ -684,7 +702,9 @@ discard block |
||
684 | 702 | print '<td class="aircraft_thumbnail">'."\n"; |
685 | 703 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
686 | 704 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
687 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
705 | + } else { |
|
706 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
707 | + } |
|
688 | 708 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['type'].'" data-content="'._("Type:").' '.$spotter_item['type'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
689 | 709 | print '</td>'."\n"; |
690 | 710 | } else { |
@@ -802,8 +822,11 @@ discard block |
||
802 | 822 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
803 | 823 | } else { |
804 | 824 | $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
805 | - if (count($aircraft_names) == 1) print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a></span>'."\n"; |
|
806 | - else print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].'</a></span>'."\n"; |
|
825 | + if (count($aircraft_names) == 1) { |
|
826 | + print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a></span>'."\n"; |
|
827 | + } else { |
|
828 | + print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'" title="'.$spotter_item['aircraft_name'].'">'.$spotter_item['aircraft_manufacturer'].' '.$aircraft_names[0].'</a></span>'."\n"; |
|
829 | + } |
|
807 | 830 | } |
808 | 831 | print '<span class="mobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
809 | 832 | } elseif ($type == 'marine') { |
@@ -846,15 +869,21 @@ discard block |
||
846 | 869 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
847 | 870 | if ($spotter_item['departure_airport_time'] > 2460) { |
848 | 871 | $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
849 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
872 | + } else { |
|
873 | + $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
874 | + } |
|
850 | 875 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
851 | 876 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
852 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
877 | + } else { |
|
878 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
879 | + } |
|
853 | 880 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
854 | 881 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
855 | 882 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
856 | 883 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
857 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
884 | + } else { |
|
885 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
886 | + } |
|
858 | 887 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
859 | 888 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
860 | 889 | if ($spotter_item['departure_airport_time'] > 2460) { |
@@ -876,7 +905,9 @@ discard block |
||
876 | 905 | $longitude = $spotter_item['longitude']; |
877 | 906 | } |
878 | 907 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
879 | - } else $distance = ''; |
|
908 | + } else { |
|
909 | + $distance = ''; |
|
910 | + } |
|
880 | 911 | if ($distance != '') { |
881 | 912 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
882 | 913 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -903,7 +934,9 @@ discard block |
||
903 | 934 | } else { |
904 | 935 | if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) { |
905 | 936 | 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"; |
906 | - if (!isset($Spotter)) $Spotter = new Spotter(); |
|
937 | + if (!isset($Spotter)) { |
|
938 | + $Spotter = new Spotter(); |
|
939 | + } |
|
907 | 940 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['real_arrival_airport']); |
908 | 941 | 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"; |
909 | 942 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
@@ -919,20 +952,28 @@ discard block |
||
919 | 952 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
920 | 953 | if ($spotter_item['arrival_airport_time'] > 2460) { |
921 | 954 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
922 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
955 | + } else { |
|
956 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
957 | + } |
|
923 | 958 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
924 | 959 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
925 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
960 | + } else { |
|
961 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
962 | + } |
|
926 | 963 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
927 | 964 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
928 | 965 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
929 | 966 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
930 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
967 | + } else { |
|
968 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
969 | + } |
|
931 | 970 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
932 | 971 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
933 | 972 | if ($spotter_item['arrival_airport_time'] > 2460) { |
934 | 973 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
935 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
974 | + } else { |
|
975 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
976 | + } |
|
936 | 977 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
937 | 978 | } |
938 | 979 | if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
@@ -945,7 +986,9 @@ discard block |
||
945 | 986 | $longitude = $spotter_item['longitude']; |
946 | 987 | } |
947 | 988 | $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
948 | - } else $distance = ''; |
|
989 | + } else { |
|
990 | + $distance = ''; |
|
991 | + } |
|
949 | 992 | if ($distance != '') { |
950 | 993 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
951 | 994 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |