@@ -4,15 +4,15 @@ 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'); |
|
7 | +$showRouteStop = $Common->multiKeyExists($spotter_array, 'route_stop'); |
|
8 | 8 | if (isset($globalVM) && $globalVM && isset($type) && $type == 'marine') { |
9 | - $showDuration = $Common->multiKeyExists($spotter_array,'race_time'); |
|
10 | - if ($showDuration === false) $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
9 | + $showDuration = $Common->multiKeyExists($spotter_array, 'race_time'); |
|
10 | + if ($showDuration === false) $showDuration = $Common->multiKeyExists($spotter_array, 'duration'); |
|
11 | 11 | } else { |
12 | - $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
12 | + $showDuration = $Common->multiKeyExists($spotter_array, 'duration'); |
|
13 | 13 | } |
14 | 14 | if (isset($globalVM) && $globalVM && isset($type) && $type == 'marine') { |
15 | - $showDistance = $Common->multiKeyExists($spotter_array,'distance'); |
|
15 | + $showDistance = $Common->multiKeyExists($spotter_array, 'distance'); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | print '<th class="more"></th>'; |
180 | 180 | print '</thead>'; |
181 | -} else if (strtolower($current_page) == "upcoming"){ |
|
181 | +} else if (strtolower($current_page) == "upcoming") { |
|
182 | 182 | print '<thead>'; |
183 | 183 | if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
184 | 184 | if ($_GET['sort'] == "airline_name_asc") |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | } |
233 | 233 | */ |
234 | 234 | print '</thead>'; |
235 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
235 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
236 | 236 | print '<thead>'; |
237 | 237 | print '<th class="aircraft_thumbnail"></th>'; |
238 | 238 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | print '</thead>'; |
270 | 270 | } else { |
271 | 271 | |
272 | - if ($hide_th_links === true){ |
|
272 | + if ($hide_th_links === true) { |
|
273 | 273 | print '<thead>'; |
274 | 274 | if ($type == 'marine' && isset($globalVM) && $globalVM) { |
275 | 275 | print '<th class="rank">'._("Rank").'</th>'; |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | } |
589 | 589 | |
590 | 590 | print '<tbody>'."\n"; |
591 | -foreach($spotter_array as $spotter_item) |
|
591 | +foreach ($spotter_array as $spotter_item) |
|
592 | 592 | { |
593 | 593 | if (isset($globalTimezone)) |
594 | 594 | { |
@@ -623,13 +623,13 @@ discard block |
||
623 | 623 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
624 | 624 | } |
625 | 625 | if (isset($spotter_item['airline_name'])) { |
626 | - 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>'; |
|
626 | + 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>'; |
|
627 | 627 | } else { |
628 | - 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>'; |
|
628 | + 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>'; |
|
629 | 629 | } |
630 | 630 | } else { |
631 | 631 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
632 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
632 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
633 | 633 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
634 | 634 | if (isset($spotter_item['airline_name'])) { |
635 | 635 | 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>'; |
@@ -655,7 +655,7 @@ discard block |
||
655 | 655 | { |
656 | 656 | print '<td class="aircraft_thumbnail">'."\n"; |
657 | 657 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
658 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
658 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
659 | 659 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
660 | 660 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
661 | 661 | 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>'; |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | { |
678 | 678 | print '<td class="aircraft_thumbnail">'."\n"; |
679 | 679 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
680 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
680 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
681 | 681 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
682 | 682 | 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>'; |
683 | 683 | print '</td>'."\n"; |
@@ -721,7 +721,7 @@ discard block |
||
721 | 721 | print '</td>'."\n"; |
722 | 722 | } |
723 | 723 | } |
724 | - } 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"){ |
|
724 | + } 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") { |
|
725 | 725 | if ($type == 'aircraft') { |
726 | 726 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
727 | 727 | $spotter_item['squawk'] = '-'; |
@@ -738,17 +738,17 @@ discard block |
||
738 | 738 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
739 | 739 | } |
740 | 740 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
741 | - 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>'; |
|
741 | + 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>'; |
|
742 | 742 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
743 | - 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>'; |
|
743 | + 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>'; |
|
744 | 744 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
745 | - 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>'; |
|
745 | + 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>'; |
|
746 | 746 | } else { |
747 | - 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>'; |
|
747 | + 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>'; |
|
748 | 748 | } |
749 | 749 | } else { |
750 | 750 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
751 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
751 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
752 | 752 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
753 | 753 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
754 | 754 | 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>'; |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | { |
789 | 789 | print '<td class="aircraft_thumbnail">'."\n"; |
790 | 790 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
791 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
791 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
792 | 792 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
793 | 793 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
794 | 794 | 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"; |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | { |
813 | 813 | print '<td class="aircraft_thumbnail">'."\n"; |
814 | 814 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
815 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
815 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
816 | 816 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
817 | 817 | 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>'; |
818 | 818 | print '</td>'."\n"; |
@@ -921,7 +921,7 @@ discard block |
||
921 | 921 | print '</td>'."\n"; |
922 | 922 | } |
923 | 923 | // Aircraft type |
924 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
924 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
925 | 925 | print '<td class="type">'."\n"; |
926 | 926 | if ($type == 'aircraft') { |
927 | 927 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
@@ -930,7 +930,7 @@ discard block |
||
930 | 930 | //print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'._("Not available").'</a></span>'."\n"; |
931 | 931 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
932 | 932 | } else { |
933 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
933 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
934 | 934 | 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"; |
935 | 935 | 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"; |
936 | 936 | } |
@@ -974,22 +974,22 @@ discard block |
||
974 | 974 | } |
975 | 975 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
976 | 976 | if ($spotter_item['departure_airport_time'] > 2460) { |
977 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
978 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
977 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
978 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
979 | 979 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
980 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
980 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
981 | 981 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
982 | 982 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
983 | 983 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
984 | 984 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
985 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
985 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
986 | 986 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
987 | 987 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
988 | 988 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
989 | 989 | if ($spotter_item['departure_airport_time'] > 2460) { |
990 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
990 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
991 | 991 | } else { |
992 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
992 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
993 | 993 | } |
994 | 994 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
995 | 995 | } |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | $latitude = $spotter_item['latitude']; |
1005 | 1005 | $longitude = $spotter_item['longitude']; |
1006 | 1006 | } |
1007 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
1007 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
1008 | 1008 | } else $distance = ''; |
1009 | 1009 | if ($distance != '') { |
1010 | 1010 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -1047,20 +1047,20 @@ discard block |
||
1047 | 1047 | } |
1048 | 1048 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
1049 | 1049 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1050 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
1050 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
1051 | 1051 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
1052 | 1052 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1053 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
1053 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
1054 | 1054 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
1055 | 1055 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
1056 | 1056 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
1057 | 1057 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1058 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
1058 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
1059 | 1059 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
1060 | 1060 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
1061 | 1061 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
1062 | 1062 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1063 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
1063 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
1064 | 1064 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
1065 | 1065 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
1066 | 1066 | } |
@@ -1073,7 +1073,7 @@ discard block |
||
1073 | 1073 | $latitude = $spotter_item['latitude']; |
1074 | 1074 | $longitude = $spotter_item['longitude']; |
1075 | 1075 | } |
1076 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
1076 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
1077 | 1077 | } else $distance = ''; |
1078 | 1078 | if ($distance != '') { |
1079 | 1079 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -1135,19 +1135,19 @@ discard block |
||
1135 | 1135 | print '<span class="mobile">-</span>'."\n"; |
1136 | 1136 | } else { |
1137 | 1137 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
1138 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
1139 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
1138 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
1139 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
1140 | 1140 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
1141 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
1142 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
1141 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
1142 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
1143 | 1143 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1144 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
1145 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
1144 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
1145 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
1146 | 1146 | } |
1147 | 1147 | } |
1148 | 1148 | print '</td>'."\n"; |
1149 | 1149 | } |
1150 | - if(strtolower($current_page) != "upcoming"){ |
|
1150 | + if (strtolower($current_page) != "upcoming") { |
|
1151 | 1151 | if ($type == 'aircraft') { |
1152 | 1152 | //if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
1153 | 1153 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
@@ -1192,14 +1192,14 @@ discard block |
||
1192 | 1192 | if (isset($spotter_item['distance'])) { |
1193 | 1193 | print '<td class="distance">'; |
1194 | 1194 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
1195 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
1196 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
1195 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
1196 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
1197 | 1197 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
1198 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
1199 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
1198 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
1199 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
1200 | 1200 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1201 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
1202 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
1201 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
1202 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
1203 | 1203 | } |
1204 | 1204 | print '</td>'."\n"; |
1205 | 1205 | } else { |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | |
1231 | 1231 | if ($showRouteStop) { |
1232 | 1232 | // Route stop |
1233 | - if(strtolower($current_page) != "upcoming"){ |
|
1233 | + if (strtolower($current_page) != "upcoming") { |
|
1234 | 1234 | print '<td class="route_stop">'."\n"; |
1235 | 1235 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
1236 | 1236 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1253,19 +1253,19 @@ discard block |
||
1253 | 1253 | print '<td class="duration">'."\n"; |
1254 | 1254 | if (isset($spotter_item['race_time'])) { |
1255 | 1255 | if ($spotter_item['race_time'] > 86400) { |
1256 | - print '<span class="nomobile">'.gmdate("z\d. H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1257 | - print '<span class="mobile">'.gmdate("z\d. H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1256 | + print '<span class="nomobile">'.gmdate("z\d. H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1257 | + print '<span class="mobile">'.gmdate("z\d. H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1258 | 1258 | } else { |
1259 | - print '<span class="nomobile">'.gmdate("H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1260 | - print '<span class="mobile">'.gmdate("H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1259 | + print '<span class="nomobile">'.gmdate("H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1260 | + print '<span class="mobile">'.gmdate("H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1261 | 1261 | } |
1262 | 1262 | } elseif (isset($spotter_item['duration'])) { |
1263 | 1263 | if ($spotter_item['duration'] > 86400) { |
1264 | - print '<span class="nomobile">'.gmdate('z\d. H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1265 | - print '<span class="mobile">'.gmdate('z\d. H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1264 | + print '<span class="nomobile">'.gmdate('z\d. H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1265 | + print '<span class="mobile">'.gmdate('z\d. H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1266 | 1266 | } else { |
1267 | - print '<span class="nomobile">'.gmdate('H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1268 | - print '<span class="mobile">'.gmdate('H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1267 | + print '<span class="nomobile">'.gmdate('H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1268 | + print '<span class="mobile">'.gmdate('H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1269 | 1269 | } |
1270 | 1270 | } else { |
1271 | 1271 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1273,11 +1273,11 @@ discard block |
||
1273 | 1273 | } |
1274 | 1274 | print '</td>'."\n"; |
1275 | 1275 | } else { |
1276 | - if(strtolower($current_page) != "upcoming"){ |
|
1276 | + if (strtolower($current_page) != "upcoming") { |
|
1277 | 1277 | print '<td class="duration">'."\n"; |
1278 | 1278 | if (isset($spotter_item['duration'])) { |
1279 | - print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1280 | - print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1279 | + print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1280 | + print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1281 | 1281 | } else { |
1282 | 1282 | print '<span class="nomobile">-</span>'."\n"; |
1283 | 1283 | print '<span class="mobile">-</span>'."\n"; |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
1292 | 1292 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
1293 | 1293 | print '<td class="message"><p>'."\n"; |
1294 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1294 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1295 | 1295 | print '</p><p class="decode">'; |
1296 | 1296 | $decode_array = json_decode($spotter_item['decode']); |
1297 | 1297 | foreach ($decode_array as $key => $value) { |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | print '</td>'."\n"; |
1302 | 1302 | } else { |
1303 | 1303 | print '<td class="message">'."\n"; |
1304 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1304 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1305 | 1305 | print '</td>'."\n"; |
1306 | 1306 | } |
1307 | 1307 | } |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | } |
1327 | 1327 | print '</td>'."\n"; |
1328 | 1328 | print '<td class="message">'."\n"; |
1329 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1329 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1330 | 1330 | print '</td>'."\n"; |
1331 | 1331 | } |
1332 | 1332 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -1352,7 +1352,7 @@ discard block |
||
1352 | 1352 | print '</td>'."\n"; |
1353 | 1353 | */ |
1354 | 1354 | print '<td class="message">'."\n"; |
1355 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1355 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1356 | 1356 | print '</td>'."\n"; |
1357 | 1357 | } |
1358 | 1358 |
@@ -7,8 +7,10 @@ discard block |
||
7 | 7 | $showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop'); |
8 | 8 | if (isset($globalVM) && $globalVM && isset($type) && $type == 'marine') { |
9 | 9 | $showDuration = $Common->multiKeyExists($spotter_array,'race_time'); |
10 | - if ($showDuration === false) $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
11 | -} else { |
|
10 | + if ($showDuration === false) { |
|
11 | + $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
12 | + } |
|
13 | + } else { |
|
12 | 14 | $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
13 | 15 | } |
14 | 16 | if (isset($globalVM) && $globalVM && isset($type) && $type == 'marine') { |
@@ -16,7 +18,9 @@ discard block |
||
16 | 18 | } |
17 | 19 | |
18 | 20 | |
19 | -if (!isset($type)) $type = 'aircraft'; |
|
21 | +if (!isset($type)) { |
|
22 | + $type = 'aircraft'; |
|
23 | +} |
|
20 | 24 | |
21 | 25 | if (!isset($_GET['sort'])) |
22 | 26 | { |
@@ -593,7 +597,9 @@ discard block |
||
593 | 597 | if (isset($globalTimezone)) |
594 | 598 | { |
595 | 599 | date_default_timezone_set($globalTimezone); |
596 | - } else date_default_timezone_set('UTC'); |
|
600 | + } else { |
|
601 | + date_default_timezone_set('UTC'); |
|
602 | + } |
|
597 | 603 | if ($showSpecial === true) |
598 | 604 | { |
599 | 605 | print '<tr class="special">'."\n"; |
@@ -608,7 +614,9 @@ discard block |
||
608 | 614 | print '<tr class="active">'; |
609 | 615 | } elseif (isset($spotter_item['spotted_registration'])) { |
610 | 616 | print '<tr class="info">'; |
611 | - } else print '<tr>'; |
|
617 | + } else { |
|
618 | + print '<tr>'; |
|
619 | + } |
|
612 | 620 | } |
613 | 621 | 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") { |
614 | 622 | if ($type == 'aircraft') { |
@@ -616,8 +624,9 @@ discard block |
||
616 | 624 | { |
617 | 625 | print '<td class="aircraft_thumbnail">'."\n"; |
618 | 626 | if ($spotter_item['image_source'] == 'planespotters') { |
619 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
620 | - else { |
|
627 | + if ($spotter_item['image_source_website'] != '') { |
|
628 | + $image_src = $spotter_item['image_source_website']; |
|
629 | + } else { |
|
621 | 630 | $planespotter_url_array = explode("_", $spotter_item['image']); |
622 | 631 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
623 | 632 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -630,7 +639,9 @@ discard block |
||
630 | 639 | } else { |
631 | 640 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
632 | 641 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
633 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
642 | + } else { |
|
643 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
644 | + } |
|
634 | 645 | if (isset($spotter_item['airline_name'])) { |
635 | 646 | 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>'; |
636 | 647 | } else { |
@@ -656,7 +667,9 @@ discard block |
||
656 | 667 | print '<td class="aircraft_thumbnail">'."\n"; |
657 | 668 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
658 | 669 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
659 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
670 | + } else { |
|
671 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
672 | + } |
|
660 | 673 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
661 | 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>'; |
662 | 675 | } else { |
@@ -678,7 +691,9 @@ discard block |
||
678 | 691 | print '<td class="aircraft_thumbnail">'."\n"; |
679 | 692 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
680 | 693 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
681 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
694 | + } else { |
|
695 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
696 | + } |
|
682 | 697 | 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>'; |
683 | 698 | print '</td>'."\n"; |
684 | 699 | } else { |
@@ -731,8 +746,9 @@ discard block |
||
731 | 746 | print '<td class="aircraft_thumbnail">'."\n"; |
732 | 747 | //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>'; |
733 | 748 | if ($spotter_item['image_source'] == 'planespotters') { |
734 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
735 | - else { |
|
749 | + if ($spotter_item['image_source_website'] != '') { |
|
750 | + $image_src = $spotter_item['image_source_website']; |
|
751 | + } else { |
|
736 | 752 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
737 | 753 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
738 | 754 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -749,7 +765,9 @@ discard block |
||
749 | 765 | } else { |
750 | 766 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
751 | 767 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
752 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
768 | + } else { |
|
769 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
770 | + } |
|
753 | 771 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
754 | 772 | 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>'; |
755 | 773 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -789,13 +807,19 @@ discard block |
||
789 | 807 | print '<td class="aircraft_thumbnail">'."\n"; |
790 | 808 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
791 | 809 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
792 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
810 | + } else { |
|
811 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
812 | + } |
|
793 | 813 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
794 | 814 | 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"; |
795 | - if ($spotter_item['image_copyright'] != '') print '<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
815 | + if ($spotter_item['image_copyright'] != '') { |
|
816 | + print '<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
817 | + } |
|
796 | 818 | } else { |
797 | 819 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['ident'].'" alt="'.$spotter_item['ident'].'" data-content="'._("Ident:").' '.$spotter_item['ident'].'" data-html="true" width="100px" />'."\n"; |
798 | - if ($spotter_item['image_copyright'] != '') print '<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
820 | + if ($spotter_item['image_copyright'] != '') { |
|
821 | + print '<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
822 | + } |
|
799 | 823 | } |
800 | 824 | print '</td>'."\n"; |
801 | 825 | } else { |
@@ -813,7 +837,9 @@ discard block |
||
813 | 837 | print '<td class="aircraft_thumbnail">'."\n"; |
814 | 838 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
815 | 839 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
816 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
840 | + } else { |
|
841 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
842 | + } |
|
817 | 843 | 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>'; |
818 | 844 | print '</td>'."\n"; |
819 | 845 | } else { |
@@ -931,8 +957,11 @@ discard block |
||
931 | 957 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
932 | 958 | } else { |
933 | 959 | $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
934 | - 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"; |
|
935 | - 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"; |
|
960 | + if (count($aircraft_names) == 1) { |
|
961 | + print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_manufacturer'].' '.$spotter_item['aircraft_name'].'</a></span>'."\n"; |
|
962 | + } else { |
|
963 | + 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"; |
|
964 | + } |
|
936 | 965 | } |
937 | 966 | print '<span class="mobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
938 | 967 | } elseif ($type == 'marine') { |
@@ -975,15 +1004,21 @@ discard block |
||
975 | 1004 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
976 | 1005 | if ($spotter_item['departure_airport_time'] > 2460) { |
977 | 1006 | $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
978 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
1007 | + } else { |
|
1008 | + $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
1009 | + } |
|
979 | 1010 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
980 | 1011 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
981 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
1012 | + } else { |
|
1013 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
1014 | + } |
|
982 | 1015 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
983 | 1016 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
984 | 1017 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
985 | 1018 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
986 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
1019 | + } else { |
|
1020 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
1021 | + } |
|
987 | 1022 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
988 | 1023 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
989 | 1024 | if ($spotter_item['departure_airport_time'] > 2460) { |
@@ -1005,7 +1040,9 @@ discard block |
||
1005 | 1040 | $longitude = $spotter_item['longitude']; |
1006 | 1041 | } |
1007 | 1042 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
1008 | - } else $distance = ''; |
|
1043 | + } else { |
|
1044 | + $distance = ''; |
|
1045 | + } |
|
1009 | 1046 | if ($distance != '') { |
1010 | 1047 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1011 | 1048 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -1032,7 +1069,9 @@ discard block |
||
1032 | 1069 | } else { |
1033 | 1070 | if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) { |
1034 | 1071 | 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"; |
1035 | - if (!isset($Spotter)) $Spotter = new Spotter(); |
|
1072 | + if (!isset($Spotter)) { |
|
1073 | + $Spotter = new Spotter(); |
|
1074 | + } |
|
1036 | 1075 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['real_arrival_airport']); |
1037 | 1076 | 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"; |
1038 | 1077 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
@@ -1048,20 +1087,28 @@ discard block |
||
1048 | 1087 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
1049 | 1088 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1050 | 1089 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
1051 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
1090 | + } else { |
|
1091 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
1092 | + } |
|
1052 | 1093 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1053 | 1094 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
1054 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
1095 | + } else { |
|
1096 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
1097 | + } |
|
1055 | 1098 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
1056 | 1099 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
1057 | 1100 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1058 | 1101 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
1059 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
1102 | + } else { |
|
1103 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
1104 | + } |
|
1060 | 1105 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
1061 | 1106 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
1062 | 1107 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1063 | 1108 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
1064 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
1109 | + } else { |
|
1110 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
1111 | + } |
|
1065 | 1112 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
1066 | 1113 | } |
1067 | 1114 | if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
@@ -1074,7 +1121,9 @@ discard block |
||
1074 | 1121 | $longitude = $spotter_item['longitude']; |
1075 | 1122 | } |
1076 | 1123 | $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
1077 | - } else $distance = ''; |
|
1124 | + } else { |
|
1125 | + $distance = ''; |
|
1126 | + } |
|
1078 | 1127 | if ($distance != '') { |
1079 | 1128 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1080 | 1129 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |