@@ -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>'; |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | } |
588 | 588 | |
589 | 589 | print '<tbody>'."\n"; |
590 | -foreach($spotter_array as $spotter_item) |
|
590 | +foreach ($spotter_array as $spotter_item) |
|
591 | 591 | { |
592 | 592 | if (isset($globalTimezone)) |
593 | 593 | { |
@@ -622,13 +622,13 @@ discard block |
||
622 | 622 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
623 | 623 | } |
624 | 624 | if (isset($spotter_item['airline_name'])) { |
625 | - 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>'; |
|
625 | + 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 | 626 | } else { |
627 | - 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>'; |
|
627 | + 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 | 628 | } |
629 | 629 | } else { |
630 | 630 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
631 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
631 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
632 | 632 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
633 | 633 | if (isset($spotter_item['airline_name'])) { |
634 | 634 | 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>'; |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | { |
655 | 655 | print '<td class="aircraft_thumbnail">'."\n"; |
656 | 656 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
657 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
657 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
658 | 658 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
659 | 659 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
660 | 660 | 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>'; |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | { |
677 | 677 | print '<td class="aircraft_thumbnail">'."\n"; |
678 | 678 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
679 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
679 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
680 | 680 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
681 | 681 | 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>'; |
682 | 682 | print '</td>'."\n"; |
@@ -720,7 +720,7 @@ discard block |
||
720 | 720 | print '</td>'."\n"; |
721 | 721 | } |
722 | 722 | } |
723 | - } 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"){ |
|
723 | + } 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 | 724 | if ($type == 'aircraft') { |
725 | 725 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
726 | 726 | $spotter_item['squawk'] = '-'; |
@@ -737,17 +737,17 @@ discard block |
||
737 | 737 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
738 | 738 | } |
739 | 739 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
740 | - 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>'; |
|
740 | + 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 | 741 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
742 | - 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>'; |
|
742 | + 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 | 743 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
744 | - 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>'; |
|
744 | + 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 | 745 | } else { |
746 | - 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>'; |
|
746 | + 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 | 747 | } |
748 | 748 | } else { |
749 | 749 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
750 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
750 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
751 | 751 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
752 | 752 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
753 | 753 | 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>'; |
@@ -787,7 +787,7 @@ discard block |
||
787 | 787 | { |
788 | 788 | print '<td class="aircraft_thumbnail">'."\n"; |
789 | 789 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
790 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
790 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
791 | 791 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
792 | 792 | if (isset($spotter_item['mmsi']) && $spotter_item['mmsi'] != '') { |
793 | 793 | 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"; |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | { |
812 | 812 | print '<td class="aircraft_thumbnail">'."\n"; |
813 | 813 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
814 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
814 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
815 | 815 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
816 | 816 | 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>'; |
817 | 817 | print '</td>'."\n"; |
@@ -920,7 +920,7 @@ discard block |
||
920 | 920 | print '</td>'."\n"; |
921 | 921 | } |
922 | 922 | // Aircraft type |
923 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
923 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
924 | 924 | print '<td class="type">'."\n"; |
925 | 925 | if ($type == 'aircraft') { |
926 | 926 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | //print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'._("Not available").'</a></span>'."\n"; |
930 | 930 | print '<span class="nomobile"><a href="'.$globalURL.'/aircraft/'.$spotter_item['aircraft_type'].'">'.$spotter_item['aircraft_type'].'</a></span>'."\n"; |
931 | 931 | } else { |
932 | - $aircraft_names = explode('/',$spotter_item['aircraft_name']); |
|
932 | + $aircraft_names = explode('/', $spotter_item['aircraft_name']); |
|
933 | 933 | 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"; |
934 | 934 | 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"; |
935 | 935 | } |
@@ -973,22 +973,22 @@ discard block |
||
973 | 973 | } |
974 | 974 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
975 | 975 | if ($spotter_item['departure_airport_time'] > 2460) { |
976 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
977 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
976 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
977 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
978 | 978 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
979 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
979 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
980 | 980 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
981 | 981 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
982 | 982 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
983 | 983 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
984 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
984 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
985 | 985 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
986 | 986 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
987 | 987 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
988 | 988 | if ($spotter_item['departure_airport_time'] > 2460) { |
989 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
989 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
990 | 990 | } else { |
991 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
991 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
992 | 992 | } |
993 | 993 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
994 | 994 | } |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | $latitude = $spotter_item['latitude']; |
1004 | 1004 | $longitude = $spotter_item['longitude']; |
1005 | 1005 | } |
1006 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
1006 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
1007 | 1007 | } else $distance = ''; |
1008 | 1008 | if ($distance != '') { |
1009 | 1009 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -1034,7 +1034,7 @@ discard block |
||
1034 | 1034 | if (!isset($Spotter)) $Spotter = new Spotter(); |
1035 | 1035 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['real_arrival_airport']); |
1036 | 1036 | if (isset($arrival_airport_info[0])) { |
1037 | - 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"; |
|
1037 | + 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 | 1038 | } |
1039 | 1039 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
1040 | 1040 | if (isset($arrival_airport_info[0])) { |
@@ -1050,20 +1050,20 @@ discard block |
||
1050 | 1050 | } |
1051 | 1051 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
1052 | 1052 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1053 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
1053 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
1054 | 1054 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
1055 | 1055 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1056 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
1056 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
1057 | 1057 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
1058 | 1058 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
1059 | 1059 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
1060 | 1060 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
1061 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
1061 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
1062 | 1062 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
1063 | 1063 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
1064 | 1064 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
1065 | 1065 | if ($spotter_item['arrival_airport_time'] > 2460) { |
1066 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
1066 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
1067 | 1067 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
1068 | 1068 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
1069 | 1069 | } |
@@ -1076,7 +1076,7 @@ discard block |
||
1076 | 1076 | $latitude = $spotter_item['latitude']; |
1077 | 1077 | $longitude = $spotter_item['longitude']; |
1078 | 1078 | } |
1079 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
1079 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
1080 | 1080 | } else $distance = ''; |
1081 | 1081 | if ($distance != '') { |
1082 | 1082 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -1138,19 +1138,19 @@ discard block |
||
1138 | 1138 | print '<span class="mobile">-</span>'."\n"; |
1139 | 1139 | } else { |
1140 | 1140 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
1141 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
1142 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
1141 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
1142 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
1143 | 1143 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
1144 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
1145 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
1144 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
1145 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
1146 | 1146 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1147 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
1148 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
1147 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
1148 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
1149 | 1149 | } |
1150 | 1150 | } |
1151 | 1151 | print '</td>'."\n"; |
1152 | 1152 | } |
1153 | - if(strtolower($current_page) != "upcoming"){ |
|
1153 | + if (strtolower($current_page) != "upcoming") { |
|
1154 | 1154 | if ($type == 'aircraft') { |
1155 | 1155 | //if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
1156 | 1156 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
@@ -1195,14 +1195,14 @@ discard block |
||
1195 | 1195 | if (isset($spotter_item['distance'])) { |
1196 | 1196 | print '<td class="distance">'; |
1197 | 1197 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
1198 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
1199 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
1198 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
1199 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
1200 | 1200 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
1201 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
1202 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
1201 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
1202 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
1203 | 1203 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1204 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
1205 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
1204 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
1205 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
1206 | 1206 | } |
1207 | 1207 | print '</td>'."\n"; |
1208 | 1208 | } else { |
@@ -1233,7 +1233,7 @@ discard block |
||
1233 | 1233 | |
1234 | 1234 | if ($showRouteStop) { |
1235 | 1235 | // Route stop |
1236 | - if(strtolower($current_page) != "upcoming"){ |
|
1236 | + if (strtolower($current_page) != "upcoming") { |
|
1237 | 1237 | print '<td class="route_stop">'."\n"; |
1238 | 1238 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
1239 | 1239 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1256,19 +1256,19 @@ discard block |
||
1256 | 1256 | print '<td class="duration">'."\n"; |
1257 | 1257 | if (isset($spotter_item['race_time'])) { |
1258 | 1258 | if ($spotter_item['race_time'] > 86400) { |
1259 | - print '<span class="nomobile">'.gmdate("z\d. H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1260 | - print '<span class="mobile">'.gmdate("z\d. H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1259 | + print '<span class="nomobile">'.gmdate("z\d. H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1260 | + print '<span class="mobile">'.gmdate("z\d. H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1261 | 1261 | } else { |
1262 | - print '<span class="nomobile">'.gmdate("H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1263 | - print '<span class="mobile">'.gmdate("H\h. i\m. s\s.",$spotter_item['race_time']).'</span>'."\n"; |
|
1262 | + print '<span class="nomobile">'.gmdate("H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1263 | + print '<span class="mobile">'.gmdate("H\h. i\m. s\s.", $spotter_item['race_time']).'</span>'."\n"; |
|
1264 | 1264 | } |
1265 | 1265 | } elseif (isset($spotter_item['duration'])) { |
1266 | 1266 | if ($spotter_item['duration'] > 86400) { |
1267 | - print '<span class="nomobile">'.gmdate('z\d. H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1268 | - print '<span class="mobile">'.gmdate('z\d. H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1267 | + print '<span class="nomobile">'.gmdate('z\d. H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1268 | + print '<span class="mobile">'.gmdate('z\d. H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1269 | 1269 | } else { |
1270 | - print '<span class="nomobile">'.gmdate('H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1271 | - print '<span class="mobile">'.gmdate('H\h. i\m. s\s.',$spotter_item['duration']).'</span>'."\n"; |
|
1270 | + print '<span class="nomobile">'.gmdate('H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1271 | + print '<span class="mobile">'.gmdate('H\h. i\m. s\s.', $spotter_item['duration']).'</span>'."\n"; |
|
1272 | 1272 | } |
1273 | 1273 | } else { |
1274 | 1274 | print '<span class="nomobile">-</span>'."\n"; |
@@ -1276,11 +1276,11 @@ discard block |
||
1276 | 1276 | } |
1277 | 1277 | print '</td>'."\n"; |
1278 | 1278 | } else { |
1279 | - if(strtolower($current_page) != "upcoming"){ |
|
1279 | + if (strtolower($current_page) != "upcoming") { |
|
1280 | 1280 | print '<td class="duration">'."\n"; |
1281 | 1281 | if (isset($spotter_item['duration'])) { |
1282 | - print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1283 | - print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
1282 | + print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1283 | + print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
1284 | 1284 | } else { |
1285 | 1285 | print '<span class="nomobile">-</span>'."\n"; |
1286 | 1286 | print '<span class="mobile">-</span>'."\n"; |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
1295 | 1295 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
1296 | 1296 | print '<td class="message"><p>'."\n"; |
1297 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1297 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1298 | 1298 | print '</p><p class="decode">'; |
1299 | 1299 | $decode_array = json_decode($spotter_item['decode']); |
1300 | 1300 | foreach ($decode_array as $key => $value) { |
@@ -1304,7 +1304,7 @@ discard block |
||
1304 | 1304 | print '</td>'."\n"; |
1305 | 1305 | } else { |
1306 | 1306 | print '<td class="message">'."\n"; |
1307 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1307 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1308 | 1308 | print '</td>'."\n"; |
1309 | 1309 | } |
1310 | 1310 | } |
@@ -1329,7 +1329,7 @@ discard block |
||
1329 | 1329 | } |
1330 | 1330 | print '</td>'."\n"; |
1331 | 1331 | print '<td class="message">'."\n"; |
1332 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1332 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1333 | 1333 | print '</td>'."\n"; |
1334 | 1334 | } |
1335 | 1335 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -1355,7 +1355,7 @@ discard block |
||
1355 | 1355 | print '</td>'."\n"; |
1356 | 1356 | */ |
1357 | 1357 | print '<td class="message">'."\n"; |
1358 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
1358 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
1359 | 1359 | print '</td>'."\n"; |
1360 | 1360 | } |
1361 | 1361 |