@@ -4,8 +4,8 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | require_once(dirname(__FILE__).'/require/class.Common.php'); |
| 6 | 6 | $Common = new Common(); |
| 7 | -$showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop'); |
|
| 8 | -$showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
|
| 7 | +$showRouteStop = $Common->multiKeyExists($spotter_array, 'route_stop'); |
|
| 8 | +$showDuration = $Common->multiKeyExists($spotter_array, 'duration'); |
|
| 9 | 9 | |
| 10 | 10 | if (!isset($type)) $type = 'aircraft'; |
| 11 | 11 | |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | print '<th class="more"></th>'; |
| 103 | 103 | print '</thead>'; |
| 104 | -} else if (strtolower($current_page) == "upcoming"){ |
|
| 104 | +} else if (strtolower($current_page) == "upcoming") { |
|
| 105 | 105 | print '<thead>'; |
| 106 | 106 | if ($_GET['sort'] == "airline_name_asc") |
| 107 | 107 | { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | } |
| 152 | 152 | */ |
| 153 | 153 | print '</thead>'; |
| 154 | -} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive"){ |
|
| 154 | +} else if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
|
| 155 | 155 | print '<thead>'; |
| 156 | 156 | print '<th class="aircraft_thumbnail"></th>'; |
| 157 | 157 | print '<th class="logo">'._("Airline").'</th>'; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | print '</thead>'; |
| 189 | 189 | } else { |
| 190 | 190 | |
| 191 | - if ($hide_th_links === true){ |
|
| 191 | + if ($hide_th_links === true) { |
|
| 192 | 192 | print '<thead>'; |
| 193 | 193 | print '<th class="aircraft_thumbnail"></th>'; |
| 194 | 194 | if ($type == 'aircraft') { |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | } |
| 416 | 416 | |
| 417 | 417 | print '<tbody>'."\n"; |
| 418 | -foreach($spotter_array as $spotter_item) |
|
| 418 | +foreach ($spotter_array as $spotter_item) |
|
| 419 | 419 | { |
| 420 | 420 | if (isset($globalTimezone)) |
| 421 | 421 | { |
@@ -450,13 +450,13 @@ discard block |
||
| 450 | 450 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
| 451 | 451 | } |
| 452 | 452 | if (isset($spotter_item['airline_name'])) { |
| 453 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 453 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 454 | 454 | } else { |
| 455 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 455 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '._("Not available").'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 456 | 456 | } |
| 457 | 457 | } else { |
| 458 | 458 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 459 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 459 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
| 460 | 460 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
| 461 | 461 | if (isset($spotter_item['airline_name'])) { |
| 462 | 462 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Airline:").' '.$spotter_item['airline_name'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | { |
| 476 | 476 | print '<td class="aircraft_thumbnail">'."\n"; |
| 477 | 477 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 478 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 478 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
| 479 | 479 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
| 480 | 480 | if (isset($spotter_item['airline_name'])) { |
| 481 | 481 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | print '</td>'."\n"; |
| 490 | 490 | } |
| 491 | 491 | } |
| 492 | - } elseif(strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed"){ |
|
| 492 | + } elseif (strtolower($current_page) != "currently" && strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive" && strtolower($current_page) != "accident-latest" && strtolower($current_page) != "incident-latest" && strtolower($current_page) != "accident-detailed" && strtolower($current_page) != "incident-detailed") { |
|
| 493 | 493 | if ($type == 'aircraft') { |
| 494 | 494 | if (!isset($spotter_item['squawk']) || $spotter_item['squawk'] == 0) { |
| 495 | 495 | $spotter_item['squawk'] = '-'; |
@@ -506,17 +506,17 @@ discard block |
||
| 506 | 506 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
| 507 | 507 | } |
| 508 | 508 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 509 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 509 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 510 | 510 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
| 511 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 511 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 512 | 512 | } elseif (!isset($spotter_item['aircraft_name']) && !isset($spotter_item['airline_name'])) { |
| 513 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 513 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 514 | 514 | } else { |
| 515 | - print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 515 | + print '<a href="'.$image_src.'"><img src="'.preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']).'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '.$spotter_item['airline_name'].'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '.$spotter_item['airline_name'].'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
|
| 516 | 516 | } |
| 517 | 517 | } else { |
| 518 | 518 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 519 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 519 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
| 520 | 520 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
| 521 | 521 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
| 522 | 522 | print '<a href="'.$globalURL.'/flightid/'.$spotter_item['spotter_id'].'"><img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" alt="'.$spotter_item['registration'].' - '.$spotter_item['aircraft_type'].' - '._("Not available").'" data-content="'._("Registration:").' '.$spotter_item['registration'].'<br />'._("Aircraft:").' '.$spotter_item['aircraft_name'].' ('.$spotter_item['aircraft_type'].')<br />'._("Airline:").' '._("Not available").'<br />'._("Squawk:").' '.$spotter_item['squawk'].'" data-html="true" width="100px" /></a>'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | { |
| 550 | 550 | print '<td class="aircraft_thumbnail">'."\n"; |
| 551 | 551 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
| 552 | - $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
|
| 552 | + $image_thumbnail = preg_replace("/^http:/i", "https:", $spotter_item['image_thumbnail']); |
|
| 553 | 553 | } else $image_thumbnail = $spotter_item['image_thumbnail']; |
| 554 | 554 | if (isset($spotter_item['airline_name'])) { |
| 555 | 555 | print '<img src="'.$image_thumbnail.'" class="img-rounded" data-toggle="popover" title="'.$spotter_item['mmsi'].'" alt="'.$spotter_item['mmsi'].'" data-content="'._("MMSI:").' '.$spotter_item['mmsi'].'" data-html="true" width="100px" />'."\n".'<div class="thumbnail-copyright">© '.$spotter_item['image_copyright'].'</div>'; |
@@ -600,7 +600,7 @@ discard block |
||
| 600 | 600 | } |
| 601 | 601 | print '</td>'."\n"; |
| 602 | 602 | // Aircraft type |
| 603 | - if(strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive"){ |
|
| 603 | + if (strtolower($current_page) != "upcoming" && strtolower($current_page) != "acars-latest" && strtolower($current_page) != "acars-archive") { |
|
| 604 | 604 | print '<td class="type">'."\n"; |
| 605 | 605 | if ($type == 'aircraft') { |
| 606 | 606 | if (!isset($spotter_item['aircraft_type']) && isset($spotter_item['aircraft_name'])) { |
@@ -643,22 +643,22 @@ discard block |
||
| 643 | 643 | } |
| 644 | 644 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
| 645 | 645 | if ($spotter_item['departure_airport_time'] > 2460) { |
| 646 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
| 647 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
| 646 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
| 647 | + } else $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
| 648 | 648 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
| 649 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
| 649 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
| 650 | 650 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
| 651 | 651 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
| 652 | 652 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
| 653 | 653 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
| 654 | - $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
|
| 654 | + $real_departure_airport_time = date('H:m', $spotter_item['real_departure_airport_time']); |
|
| 655 | 655 | } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
| 656 | 656 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
| 657 | 657 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
| 658 | 658 | if ($spotter_item['departure_airport_time'] > 2460) { |
| 659 | - $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
|
| 659 | + $departure_airport_time = date('H:m', $spotter_item['departure_airport_time']); |
|
| 660 | 660 | } else { |
| 661 | - $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
| 661 | + $departure_airport_time = substr($spotter_item['departure_airport_time'], 0, -2).':'.substr($spotter_item['departure_airport_time'], -2); |
|
| 662 | 662 | } |
| 663 | 663 | print '<br /><span class="airport_time">'.$departure_airport_time.'</span>'."\n"; |
| 664 | 664 | } |
@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | $latitude = $spotter_item['latitude']; |
| 674 | 674 | $longitude = $spotter_item['longitude']; |
| 675 | 675 | } |
| 676 | - $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
|
| 676 | + $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'], $latitude, $longitude); |
|
| 677 | 677 | } else $distance = ''; |
| 678 | 678 | if ($distance != '') { |
| 679 | 679 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -716,20 +716,20 @@ discard block |
||
| 716 | 716 | } |
| 717 | 717 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
| 718 | 718 | if ($spotter_item['arrival_airport_time'] > 2460) { |
| 719 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
| 719 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
| 720 | 720 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
| 721 | 721 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
| 722 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
| 722 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
| 723 | 723 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
| 724 | 724 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
| 725 | 725 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
| 726 | 726 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
| 727 | - $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
|
| 727 | + $real_arrival_airport_time = date('H:m', $spotter_item['real_arrival_airport_time']); |
|
| 728 | 728 | } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
| 729 | 729 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
| 730 | 730 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
| 731 | 731 | if ($spotter_item['arrival_airport_time'] > 2460) { |
| 732 | - $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
|
| 732 | + $arrival_airport_time = date('H:m', $spotter_item['arrival_airport_time']); |
|
| 733 | 733 | } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
| 734 | 734 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
| 735 | 735 | } |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | $latitude = $spotter_item['latitude']; |
| 743 | 743 | $longitude = $spotter_item['longitude']; |
| 744 | 744 | } |
| 745 | - $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
|
| 745 | + $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'], $latitude, $longitude); |
|
| 746 | 746 | } else $distance = ''; |
| 747 | 747 | if ($distance != '') { |
| 748 | 748 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
@@ -775,19 +775,19 @@ discard block |
||
| 775 | 775 | print '<span class="mobile">-</span>'."\n"; |
| 776 | 776 | } else { |
| 777 | 777 | if ((!isset($_COOKIE['unitdistance']) && ((isset($globalUnitDistance) && $globalUnitDistance == 'km') || !isset($globalUnitDistance))) || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'km')) { |
| 778 | - print '<span class="nomobile">'.round($spotter_item['distance'],2).' km</span>'."\n"; |
|
| 779 | - print '<span class="mobile">'.round($spotter_item['distance'],2).' km</span><br />'."\n"; |
|
| 778 | + print '<span class="nomobile">'.round($spotter_item['distance'], 2).' km</span>'."\n"; |
|
| 779 | + print '<span class="mobile">'.round($spotter_item['distance'], 2).' km</span><br />'."\n"; |
|
| 780 | 780 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) { |
| 781 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.621371,2).' mi</span>'."\n"; |
|
| 782 | - print '<span class="mobile">'.round($spotter_item['distance']*0.621371,2).' mi</span><br />'."\n"; |
|
| 781 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span>'."\n"; |
|
| 782 | + print '<span class="mobile">'.round($spotter_item['distance']*0.621371, 2).' mi</span><br />'."\n"; |
|
| 783 | 783 | } elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 784 | - print '<span class="nomobile">'.round($spotter_item['distance']*0.539957,2).' nm</span>'."\n"; |
|
| 785 | - print '<span class="mobile">'.round($spotter_item['distance']*0.539957,2).' nm</span><br />'."\n"; |
|
| 784 | + print '<span class="nomobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span>'."\n"; |
|
| 785 | + print '<span class="mobile">'.round($spotter_item['distance']*0.539957, 2).' nm</span><br />'."\n"; |
|
| 786 | 786 | } |
| 787 | 787 | } |
| 788 | 788 | print '</td>'."\n"; |
| 789 | 789 | } |
| 790 | - if(strtolower($current_page) != "upcoming"){ |
|
| 790 | + if (strtolower($current_page) != "upcoming") { |
|
| 791 | 791 | if ($type == 'aircraft') { |
| 792 | 792 | if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
| 793 | 793 | print '<td class="pilot">'."\n"; |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | |
| 824 | 824 | if ($showRouteStop) { |
| 825 | 825 | // Route stop |
| 826 | - if(strtolower($current_page) != "upcoming"){ |
|
| 826 | + if (strtolower($current_page) != "upcoming") { |
|
| 827 | 827 | print '<td class="route_stop">'."\n"; |
| 828 | 828 | if (!isset($spotter_item['route_stop']) || $spotter_item['route_stop'] == '' || $spotter_item['route_stop'] == 'NULL') { |
| 829 | 829 | print '<span class="nomobile">-</span>'."\n"; |
@@ -842,11 +842,11 @@ discard block |
||
| 842 | 842 | } |
| 843 | 843 | if ($showDuration) { |
| 844 | 844 | // Duration |
| 845 | - if(strtolower($current_page) != "upcoming"){ |
|
| 845 | + if (strtolower($current_page) != "upcoming") { |
|
| 846 | 846 | print '<td class="duration">'."\n"; |
| 847 | 847 | if (isset($spotter_item['duration'])) { |
| 848 | - print '<span class="nomobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
| 849 | - print '<span class="mobile">'.gmdate('H:i:s',$spotter_item['duration']).'</span>'."\n"; |
|
| 848 | + print '<span class="nomobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
| 849 | + print '<span class="mobile">'.gmdate('H:i:s', $spotter_item['duration']).'</span>'."\n"; |
|
| 850 | 850 | } else { |
| 851 | 851 | print '<span class="nomobile">-</span>'."\n"; |
| 852 | 852 | print '<span class="mobile">-</span>'."\n"; |
@@ -859,7 +859,7 @@ discard block |
||
| 859 | 859 | if (strtolower($current_page) == "acars-latest" || strtolower($current_page) == "acars-archive") { |
| 860 | 860 | if (isset($spotter_item['decode']) && $spotter_item['decode'] != '') { |
| 861 | 861 | print '<td class="message"><p>'."\n"; |
| 862 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
| 862 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
| 863 | 863 | print '</p><p class="decode">'; |
| 864 | 864 | $decode_array = json_decode($spotter_item['decode']); |
| 865 | 865 | foreach ($decode_array as $key => $value) { |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | print '</td>'."\n"; |
| 870 | 870 | } else { |
| 871 | 871 | print '<td class="message">'."\n"; |
| 872 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
| 872 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
| 873 | 873 | print '</td>'."\n"; |
| 874 | 874 | } |
| 875 | 875 | } |
@@ -894,7 +894,7 @@ discard block |
||
| 894 | 894 | } |
| 895 | 895 | print '</td>'."\n"; |
| 896 | 896 | print '<td class="message">'."\n"; |
| 897 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
| 897 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
| 898 | 898 | print '</td>'."\n"; |
| 899 | 899 | } |
| 900 | 900 | if (strtolower($current_page) == "incident-latest" || strtolower($current_page) == "incident-detailed") { |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | print '</td>'."\n"; |
| 921 | 921 | */ |
| 922 | 922 | print '<td class="message">'."\n"; |
| 923 | - print str_replace(array("\r\n", "\n", "\r"),'<br />',$spotter_item['message']); |
|
| 923 | + print str_replace(array("\r\n", "\n", "\r"), '<br />', $spotter_item['message']); |
|
| 924 | 924 | print '</td>'."\n"; |
| 925 | 925 | } |
| 926 | 926 | |
@@ -16,12 +16,12 @@ discard block |
||
| 16 | 16 | require_once('header.php'); |
| 17 | 17 | |
| 18 | 18 | //calculuation for the pagination |
| 19 | -if(!isset($_GET['limit'])) |
|
| 19 | +if (!isset($_GET['limit'])) |
|
| 20 | 20 | { |
| 21 | 21 | $limit_start = 0; |
| 22 | 22 | $limit_end = 25; |
| 23 | 23 | $absolute_difference = 25; |
| 24 | -} else { |
|
| 24 | +} else { |
|
| 25 | 25 | $limit_explode = explode(",", $_GET['limit']); |
| 26 | 26 | $limit_start = $limit_explode[0]; |
| 27 | 27 | $limit_end = $limit_explode[1]; |
@@ -44,14 +44,14 @@ discard block |
||
| 44 | 44 | if ($type == 'marine') print '<p>'._("The table below shows the detailed information of all recent vessels.").'</p>'; |
| 45 | 45 | else print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>'; |
| 46 | 46 | |
| 47 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 47 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 48 | 48 | $sql_begin = microtime(true); |
| 49 | 49 | if ($type == 'marine') { |
| 50 | 50 | $spotter_array = $Marine->getLatestMarineData($limit_start.",".$absolute_difference, $sort); |
| 51 | 51 | } else { |
| 52 | 52 | $spotter_array = $Spotter->getLatestSpotterData($limit_start.",".$absolute_difference, $sort); |
| 53 | 53 | } |
| 54 | -$sql_time = microtime(true)-$sql_begin; |
|
| 54 | +$sql_time = microtime(true) - $sql_begin; |
|
| 55 | 55 | $page_begin = microtime(true); |
| 56 | 56 | if (!empty($spotter_array)) |
| 57 | 57 | { |
@@ -68,6 +68,6 @@ discard block |
||
| 68 | 68 | print '</div>'; |
| 69 | 69 | print '</div>'; |
| 70 | 70 | } |
| 71 | -$page_time = microtime(true)-$page_begin; |
|
| 71 | +$page_time = microtime(true) - $page_begin; |
|
| 72 | 72 | require_once('footer.php'); |
| 73 | 73 | ?> |
| 74 | 74 | \ No newline at end of file |
@@ -4,26 +4,26 @@ discard block |
||
| 4 | 4 | |
| 5 | 5 | $type = ''; |
| 6 | 6 | if (isset($_GET['marine'])) { |
| 7 | - require_once('require/class.Marine.php');; |
|
| 7 | + require_once('require/class.Marine.php'); ; |
|
| 8 | 8 | require_once('require/class.MarineLive.php'); |
| 9 | - $MarineLive=new MarineLive(); |
|
| 9 | + $MarineLive = new MarineLive(); |
|
| 10 | 10 | $type = 'marine'; |
| 11 | 11 | } else { |
| 12 | - require_once('require/class.Spotter.php');; |
|
| 12 | + require_once('require/class.Spotter.php'); ; |
|
| 13 | 13 | require_once('require/class.SpotterLive.php'); |
| 14 | - $SpotterLive=new SpotterLive(); |
|
| 14 | + $SpotterLive = new SpotterLive(); |
|
| 15 | 15 | $type = 'aircraft'; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | $title = "Current Activity"; |
| 19 | 19 | require_once('header.php'); |
| 20 | 20 | //calculuation for the pagination |
| 21 | -if(!isset($_GET['limit'])) |
|
| 21 | +if (!isset($_GET['limit'])) |
|
| 22 | 22 | { |
| 23 | 23 | $limit_start = 0; |
| 24 | 24 | $limit_end = 25; |
| 25 | 25 | $absolute_difference = 25; |
| 26 | -} else { |
|
| 26 | +} else { |
|
| 27 | 27 | $limit_explode = explode(",", $_GET['limit']); |
| 28 | 28 | $limit_start = $limit_explode[0]; |
| 29 | 29 | $limit_end = $limit_explode[1]; |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | if ($type == 'aircraft') print '<p>'._("The table below shows the detailed information of all current flights.").'</p>'; |
| 48 | 48 | elseif ($type == 'marine') print '<p>'._("The table below shows the detailed information of all current vessels.").'</p>'; |
| 49 | 49 | |
| 50 | -$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 50 | +$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 51 | 51 | if ($sort != '') { |
| 52 | 52 | if ($type == 'aircraft') $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort); |
| 53 | 53 | elseif ($type == 'marine') $spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference, $sort); |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | require_once(dirname(__FILE__).'/require/settings.php'); |
| 3 | 3 | $type = 'aircraft'; |
| 4 | 4 | if (isset($_GET['marine'])) $type = 'marine'; |
| 5 | -$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING); |
|
| 5 | +$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING); |
|
| 6 | 6 | if ($date == '') $date = date('Y-m-d'); |
| 7 | 7 | if ($type == 'marine') header('Location: '.$globalURL.'/marine/date/'.$date); |
| 8 | 8 | else header('Location: '.$globalURL.'/date/'.$date); |
@@ -3,25 +3,25 @@ discard block |
||
| 3 | 3 | require_once('require/class.Language.php'); |
| 4 | 4 | $type = ''; |
| 5 | 5 | if (isset($_GET['marine'])) { |
| 6 | - require_once('require/class.Marine.php');; |
|
| 6 | + require_once('require/class.Marine.php'); ; |
|
| 7 | 7 | $Marine = new Marine(); |
| 8 | 8 | $type = 'marine'; |
| 9 | 9 | } else { |
| 10 | - require_once('require/class.Spotter.php');; |
|
| 10 | + require_once('require/class.Spotter.php'); ; |
|
| 11 | 11 | $Spotter = new Spotter(); |
| 12 | 12 | $type = 'aircraft'; |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | -if (!isset($_GET['date'])){ |
|
| 15 | +if (!isset($_GET['date'])) { |
|
| 16 | 16 | header('Location: '.$globalURL.''); |
| 17 | 17 | } else { |
| 18 | 18 | //calculuation for the pagination |
| 19 | - if(!isset($_GET['limit'])) |
|
| 19 | + if (!isset($_GET['limit'])) |
|
| 20 | 20 | { |
| 21 | 21 | $limit_start = 0; |
| 22 | 22 | $limit_end = 25; |
| 23 | 23 | $absolute_difference = 25; |
| 24 | - } else { |
|
| 24 | + } else { |
|
| 25 | 25 | $limit_explode = explode(",", $_GET['limit']); |
| 26 | 26 | $limit_start = $limit_explode[0]; |
| 27 | 27 | $limit_end = $limit_explode[1]; |
@@ -35,24 +35,24 @@ discard block |
||
| 35 | 35 | $limit_previous_1 = $limit_start - $absolute_difference; |
| 36 | 36 | $limit_previous_2 = $limit_end - $absolute_difference; |
| 37 | 37 | |
| 38 | - $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING); |
|
| 38 | + $date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING); |
|
| 39 | 39 | $page_url = $globalURL.'/date/'.$date; |
| 40 | 40 | |
| 41 | - $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING); |
|
| 41 | + $sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING); |
|
| 42 | 42 | if ($sort != '') |
| 43 | 43 | { |
| 44 | - if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference, $sort); |
|
| 45 | - else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort); |
|
| 44 | + if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference, $sort); |
|
| 45 | + else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference, $sort); |
|
| 46 | 46 | } else { |
| 47 | - if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference); |
|
| 48 | - else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference); |
|
| 47 | + if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference); |
|
| 48 | + else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if (!empty($spotter_array)) |
| 52 | 52 | { |
| 53 | 53 | date_default_timezone_set($globalTimezone); |
| 54 | - if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 55 | - else $title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 54 | + if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 55 | + else $title = sprintf(_("Detailed View for flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))); |
|
| 56 | 56 | |
| 57 | 57 | require_once('header.php'); |
| 58 | 58 | print '<div class="select-item">'; |
@@ -70,14 +70,14 @@ discard block |
||
| 70 | 70 | print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>'; |
| 71 | 71 | print '<br />'; |
| 72 | 72 | print '<div class="info column">'; |
| 73 | - if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 74 | - else print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 73 | + if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 74 | + else print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>'; |
|
| 75 | 75 | print '</div>'; |
| 76 | 76 | |
| 77 | 77 | if ($type == 'aircraft') include('date-sub-menu.php'); |
| 78 | 78 | print '<div class="table column">'; |
| 79 | - if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 80 | - else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 79 | + if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 80 | + else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>'; |
|
| 81 | 81 | |
| 82 | 82 | include('table-output.php'); |
| 83 | 83 | print '<div class="pagination">'; |