@@ -7,7 +7,9 @@ discard block |
||
7 | 7 | $showRouteStop = $Common->multiKeyExists($spotter_array,'route_stop'); |
8 | 8 | $showDuration = $Common->multiKeyExists($spotter_array,'duration'); |
9 | 9 | |
10 | -if (!isset($type)) $type = 'aircraft'; |
|
10 | +if (!isset($type)) { |
|
11 | + $type = 'aircraft'; |
|
12 | +} |
|
11 | 13 | |
12 | 14 | if (!isset($_GET['sort'])) |
13 | 15 | { |
@@ -440,7 +442,9 @@ discard block |
||
440 | 442 | if (isset($globalTimezone)) |
441 | 443 | { |
442 | 444 | date_default_timezone_set($globalTimezone); |
443 | - } else date_default_timezone_set('UTC'); |
|
445 | + } else { |
|
446 | + date_default_timezone_set('UTC'); |
|
447 | + } |
|
444 | 448 | if ($showSpecial === true) |
445 | 449 | { |
446 | 450 | print '<tr class="special">'."\n"; |
@@ -455,7 +459,9 @@ discard block |
||
455 | 459 | print '<tr class="active">'; |
456 | 460 | } elseif (isset($spotter_item['spotted_registration'])) { |
457 | 461 | print '<tr class="info">'; |
458 | - } else print '<tr>'; |
|
462 | + } else { |
|
463 | + print '<tr>'; |
|
464 | + } |
|
459 | 465 | } |
460 | 466 | 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") { |
461 | 467 | if ($type == 'aircraft') { |
@@ -463,8 +469,9 @@ discard block |
||
463 | 469 | { |
464 | 470 | print '<td class="aircraft_thumbnail">'."\n"; |
465 | 471 | if ($spotter_item['image_source'] == 'planespotters') { |
466 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
467 | - else { |
|
472 | + if ($spotter_item['image_source_website'] != '') { |
|
473 | + $image_src = $spotter_item['image_source_website']; |
|
474 | + } else { |
|
468 | 475 | $planespotter_url_array = explode("_", $spotter_item['image']); |
469 | 476 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
470 | 477 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -477,7 +484,9 @@ discard block |
||
477 | 484 | } else { |
478 | 485 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
479 | 486 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
480 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
487 | + } else { |
|
488 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
489 | + } |
|
481 | 490 | if (isset($spotter_item['airline_name'])) { |
482 | 491 | 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>'; |
483 | 492 | } else { |
@@ -496,7 +505,9 @@ discard block |
||
496 | 505 | print '<td class="aircraft_thumbnail">'."\n"; |
497 | 506 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
498 | 507 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
499 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
508 | + } else { |
|
509 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
510 | + } |
|
500 | 511 | if (isset($spotter_item['airline_name'])) { |
501 | 512 | 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>'; |
502 | 513 | } else { |
@@ -514,7 +525,9 @@ discard block |
||
514 | 525 | print '<td class="aircraft_thumbnail">'."\n"; |
515 | 526 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
516 | 527 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
517 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
528 | + } else { |
|
529 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
530 | + } |
|
518 | 531 | 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>'; |
519 | 532 | print '</td>'."\n"; |
520 | 533 | } else { |
@@ -565,8 +578,9 @@ discard block |
||
565 | 578 | print '<td class="aircraft_thumbnail">'."\n"; |
566 | 579 | //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>'; |
567 | 580 | if ($spotter_item['image_source'] == 'planespotters') { |
568 | - if ($spotter_item['image_source_website'] != '') $image_src = $spotter_item['image_source_website']; |
|
569 | - else { |
|
581 | + if ($spotter_item['image_source_website'] != '') { |
|
582 | + $image_src = $spotter_item['image_source_website']; |
|
583 | + } else { |
|
570 | 584 | $planespotter_url_array = explode("_", $spotter_array[0]['image']); |
571 | 585 | $planespotter_id = str_replace(".jpg", "", $planespotter_url_array[1]); |
572 | 586 | $image_src = 'https://www.planespotters.net/Aviation_Photos/photo.show?id='.$planespotter_id; |
@@ -583,7 +597,9 @@ discard block |
||
583 | 597 | } else { |
584 | 598 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
585 | 599 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
586 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
600 | + } else { |
|
601 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
602 | + } |
|
587 | 603 | if (!isset($spotter_item['airline_name']) && isset($spotter_item['aircraft_name'])) { |
588 | 604 | 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>'; |
589 | 605 | } elseif (!isset($spotter_item['aircraft_name']) && isset($spotter_item['airline_name'])) { |
@@ -616,7 +632,9 @@ discard block |
||
616 | 632 | print '<td class="aircraft_thumbnail">'."\n"; |
617 | 633 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
618 | 634 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
619 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
635 | + } else { |
|
636 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
637 | + } |
|
620 | 638 | 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>'; |
621 | 639 | print '</td>'."\n"; |
622 | 640 | } else { |
@@ -630,7 +648,9 @@ discard block |
||
630 | 648 | print '<td class="aircraft_thumbnail">'."\n"; |
631 | 649 | if ($spotter_item['image_source'] == 'wikimedia' || $spotter_item['image_source'] == 'devianart' || $spotter_item['image_source'] == 'flickr') { |
632 | 650 | $image_thumbnail = preg_replace("/^http:/i","https:",$spotter_item['image_thumbnail']); |
633 | - } else $image_thumbnail = $spotter_item['image_thumbnail']; |
|
651 | + } else { |
|
652 | + $image_thumbnail = $spotter_item['image_thumbnail']; |
|
653 | + } |
|
634 | 654 | 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>'; |
635 | 655 | print '</td>'."\n"; |
636 | 656 | } else { |
@@ -783,15 +803,21 @@ discard block |
||
783 | 803 | if (isset($spotter_item['departure_airport_time']) && isset($spotter_item['real_departure_airport_time'])) { |
784 | 804 | if ($spotter_item['departure_airport_time'] > 2460) { |
785 | 805 | $departure_airport_time = date('H:m',$spotter_item['departure_airport_time']); |
786 | - } else $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
806 | + } else { |
|
807 | + $departure_airport_time = substr($spotter_item['departure_airport_time'],0,-2).':'.substr($spotter_item['departure_airport_time'],-2); |
|
808 | + } |
|
787 | 809 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
788 | 810 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
789 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
811 | + } else { |
|
812 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
813 | + } |
|
790 | 814 | print '<br /><span class="airport_time">'.$departure_airport_time.' ('.$real_departure_airport_time.')</span>'."\n"; |
791 | 815 | } elseif (isset($spotter_item['real_departure_airport_time']) && $spotter_item['real_departure_airport_time'] != 'NULL') { |
792 | 816 | if ($spotter_item['real_departure_airport_time'] > 2460) { |
793 | 817 | $real_departure_airport_time = date('H:m',$spotter_item['real_departure_airport_time']); |
794 | - } else $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
818 | + } else { |
|
819 | + $real_departure_airport_time = $spotter_item['real_departure_airport_time']; |
|
820 | + } |
|
795 | 821 | print '<br /><span class="airport_time">'.$real_departure_airport_time.'</span>'."\n"; |
796 | 822 | } elseif (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != 'NULL') { |
797 | 823 | if ($spotter_item['departure_airport_time'] > 2460) { |
@@ -813,7 +839,9 @@ discard block |
||
813 | 839 | $longitude = $spotter_item['longitude']; |
814 | 840 | } |
815 | 841 | $distance = $Spotter->getAirportDistance($spotter_item['departure_airport'],$latitude,$longitude); |
816 | - } else $distance = ''; |
|
842 | + } else { |
|
843 | + $distance = ''; |
|
844 | + } |
|
817 | 845 | if ($distance != '') { |
818 | 846 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
819 | 847 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -840,7 +868,9 @@ discard block |
||
840 | 868 | } else { |
841 | 869 | if (isset($spotter_item['real_arrival_airport']) && $spotter_item['real_arrival_airport'] != $spotter_item['arrival_airport']) { |
842 | 870 | 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"; |
843 | - if (!isset($Spotter)) $Spotter = new Spotter(); |
|
871 | + if (!isset($Spotter)) { |
|
872 | + $Spotter = new Spotter(); |
|
873 | + } |
|
844 | 874 | $arrival_airport_info = $Spotter->getAllAirportInfo($spotter_item['real_arrival_airport']); |
845 | 875 | 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"; |
846 | 876 | print '<span class="mobile">'._("Scheduled:").' <a href="'.$globalURL.'/airport/'.$spotter_item['real_arrival_airport'].'">'.$spotter_item['real_arrival_airport'].'</a></span>'."\n"; |
@@ -856,20 +886,28 @@ discard block |
||
856 | 886 | if (isset($spotter_item['arrival_airport_time']) && isset($spotter_item['real_arrival_airport_time'])) { |
857 | 887 | if ($spotter_item['arrival_airport_time'] > 2460) { |
858 | 888 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
859 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
889 | + } else { |
|
890 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
891 | + } |
|
860 | 892 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
861 | 893 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
862 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
894 | + } else { |
|
895 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
896 | + } |
|
863 | 897 | print '<br /><span class="airport_time">'.$spotter_item['arrival_airport_time'].' ('.$spotter_item['real_arrival_airport_time'].')</span>'."\n"; |
864 | 898 | } elseif (isset($spotter_item['real_arrival_airport_time'])) { |
865 | 899 | if ($spotter_item['real_arrival_airport_time'] > 2460) { |
866 | 900 | $real_arrival_airport_time = date('H:m',$spotter_item['real_arrival_airport_time']); |
867 | - } else $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
901 | + } else { |
|
902 | + $real_arrival_airport_time = $spotter_item['real_arrival_airport_time']; |
|
903 | + } |
|
868 | 904 | print '<br /><span class="airport_time">'.$real_arrival_airport_time.'</span>'."\n"; |
869 | 905 | } elseif (isset($spotter_item['arrival_airport_time']) && $spotter_item['arrival_airport_time'] != 'NULL') { |
870 | 906 | if ($spotter_item['arrival_airport_time'] > 2460) { |
871 | 907 | $arrival_airport_time = date('H:m',$spotter_item['arrival_airport_time']); |
872 | - } else $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
908 | + } else { |
|
909 | + $arrival_airport_time = $spotter_item['arrival_airport_time']; |
|
910 | + } |
|
873 | 911 | print '<br /><span class="airport_time">'.$arrival_airport_time.'</span>'."\n"; |
874 | 912 | } |
875 | 913 | if (!isset($spotter_item['real_arrival_airport']) && $spotter_item['arrival_airport'] != 'NA') { |
@@ -882,7 +920,9 @@ discard block |
||
882 | 920 | $longitude = $spotter_item['longitude']; |
883 | 921 | } |
884 | 922 | $distance = $Spotter->getAirportDistance($spotter_item['arrival_airport'],$latitude,$longitude); |
885 | - } else $distance = ''; |
|
923 | + } else { |
|
924 | + $distance = ''; |
|
925 | + } |
|
886 | 926 | if ($distance != '') { |
887 | 927 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
888 | 928 | echo '<br/><i>'.round($distance*0.539957).' nm</i>'; |
@@ -5,8 +5,11 @@ discard block |
||
5 | 5 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
6 | 6 | $current_page = $file_path['filename']; |
7 | 7 | date_default_timezone_set($globalTimezone); |
8 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
9 | -else $MapType = $globalMapProvider; |
|
8 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
9 | + $MapType = $_COOKIE['MapType']; |
|
10 | +} else { |
|
11 | + $MapType = $globalMapProvider; |
|
12 | +} |
|
10 | 13 | if (isset($_GET['3d'])) { |
11 | 14 | setcookie('MapFormat','3d'); |
12 | 15 | } else if (isset($_GET['2d'])) { |
@@ -240,7 +243,13 @@ discard block |
||
240 | 243 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
241 | 244 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
242 | 245 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
243 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
246 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
247 | + print '&latitude='.$latitude; |
|
248 | +} |
|
249 | +?><?php if(isset($longitude)) { |
|
250 | + print '&longitude='.$longitude; |
|
251 | +} |
|
252 | +?>&<?php print time(); ?>"></script> |
|
244 | 253 | <?php |
245 | 254 | if (!isset($type) || $type == 'aircraft') { |
246 | 255 | ?> |
@@ -310,7 +319,13 @@ discard block |
||
310 | 319 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
311 | 320 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
312 | 321 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
313 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) print '&latitude='.$latitude; ?><?php if(isset($longitude)) print '&longitude='.$longitude; ?>&<?php print time(); ?>"></script> |
|
322 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
323 | + print '&latitude='.$latitude; |
|
324 | +} |
|
325 | +?><?php if(isset($longitude)) { |
|
326 | + print '&longitude='.$longitude; |
|
327 | +} |
|
328 | +?>&<?php print time(); ?>"></script> |
|
314 | 329 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
315 | 330 | <?php |
316 | 331 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -384,7 +399,12 @@ discard block |
||
384 | 399 | <span class="icon-bar"></span> |
385 | 400 | </button> |
386 | 401 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
387 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
402 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
403 | + print '/'; |
|
404 | +} else { |
|
405 | + print $globalURL; |
|
406 | +} |
|
407 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
388 | 408 | </div> |
389 | 409 | <div class="collapse navbar-collapse"> |
390 | 410 | |
@@ -410,7 +430,10 @@ discard block |
||
410 | 430 | <?php |
411 | 431 | } |
412 | 432 | ?> |
413 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
433 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
434 | + echo 'right-'; |
|
435 | +} |
|
436 | +?>caret"></b></a> |
|
414 | 437 | <ul class="dropdown-menu"> |
415 | 438 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
416 | 439 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
@@ -467,8 +490,14 @@ discard block |
||
467 | 490 | </li> |
468 | 491 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
469 | 492 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
470 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
471 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
493 | + <li class="dropdown<?php if ($sub) { |
|
494 | + echo '-submenu'; |
|
495 | +} |
|
496 | +?>"> |
|
497 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
498 | + echo 'right-'; |
|
499 | +} |
|
500 | +?>caret"></b></a> |
|
472 | 501 | <ul class="dropdown-menu"> |
473 | 502 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
474 | 503 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -497,7 +526,10 @@ discard block |
||
497 | 526 | <?php |
498 | 527 | } |
499 | 528 | ?> |
500 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
529 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
530 | + echo 'right-'; |
|
531 | +} |
|
532 | +?>caret"></b></a> |
|
501 | 533 | <ul class="dropdown-menu"> |
502 | 534 | <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li> |
503 | 535 | <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -528,7 +560,10 @@ discard block |
||
528 | 560 | <?php |
529 | 561 | } |
530 | 562 | ?> |
531 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
563 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
564 | + echo 'right-'; |
|
565 | +} |
|
566 | +?>caret"></b></a> |
|
532 | 567 | <ul class="dropdown-menu"> |
533 | 568 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
534 | 569 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -577,7 +612,9 @@ discard block |
||
577 | 612 | $alllang = $Language->getLanguages(); |
578 | 613 | foreach ($alllang as $key => $lang) { |
579 | 614 | print '<option value="'.$key.'"'; |
580 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
615 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
616 | + print ' selected '; |
|
617 | + } |
|
581 | 618 | print '>'.$lang[0].'</option>'; |
582 | 619 | } |
583 | 620 | ?> |
@@ -730,4 +767,7 @@ discard block |
||
730 | 767 | |
731 | 768 | ?> |
732 | 769 | |
733 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
770 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
771 | + print 'index '; |
|
772 | +} |
|
773 | +?>clear"> |
@@ -29,7 +29,9 @@ discard block |
||
29 | 29 | if (isset($filter[0]['source'])) { |
30 | 30 | $filters = array_merge($filters,$filter); |
31 | 31 | } |
32 | - if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter); |
|
32 | + if (is_array($globalFilter)) { |
|
33 | + $filter = array_merge($filter,$globalFilter); |
|
34 | + } |
|
33 | 35 | $filter_query_join = ''; |
34 | 36 | $filter_query_where = ''; |
35 | 37 | foreach($filters as $flt) { |
@@ -76,8 +78,11 @@ discard block |
||
76 | 78 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
77 | 79 | $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
78 | 80 | } |
79 | - if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE'; |
|
80 | - elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND'; |
|
81 | + if ($filter_query_where == '' && $where) { |
|
82 | + $filter_query_where = ' WHERE'; |
|
83 | + } elseif ($filter_query_where != '' && $and) { |
|
84 | + $filter_query_where .= ' AND'; |
|
85 | + } |
|
81 | 86 | if ($filter_query_where != '') { |
82 | 87 | $filter_query_where = preg_replace('/^ AND/',' WHERE',$filter_query_where); |
83 | 88 | } |
@@ -119,7 +124,9 @@ discard block |
||
119 | 124 | } |
120 | 125 | } |
121 | 126 | |
122 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
127 | + if (!isset($globalLiveInterval)) { |
|
128 | + $globalLiveInterval = '200'; |
|
129 | + } |
|
123 | 130 | if ($globalDBdriver == 'mysql') { |
124 | 131 | //$query = "SELECT tracker_live.* FROM tracker_live INNER JOIN (SELECT l.famtrackid, max(l.date) as maxdate FROM tracker_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL 30 SECOND) <= l.date GROUP BY l.famtrackid) s on tracker_live.famtrackid = s.famtrackid AND tracker_live.date = s.maxdate"; |
125 | 132 | $query = 'SELECT tracker_live.* FROM tracker_live INNER JOIN (SELECT l.famtrackid, max(l.date) as maxdate FROM tracker_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.famtrackid) s on tracker_live.famtrackid = s.famtrackid AND tracker_live.date = s.maxdate'.$filter_query.$orderby_query; |
@@ -144,7 +151,9 @@ discard block |
||
144 | 151 | |
145 | 152 | $filter_query = $this->getFilter($filter,true,true); |
146 | 153 | |
147 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
154 | + if (!isset($globalLiveInterval)) { |
|
155 | + $globalLiveInterval = '200'; |
|
156 | + } |
|
148 | 157 | if ($globalDBdriver == 'mysql') { |
149 | 158 | $query = 'SELECT tracker_live.ident, tracker_live.type,tracker_live.famtrackid, tracker_live.latitude, tracker_live.longitude, tracker_live.altitude, tracker_live.heading, tracker_live.ground_speed, tracker_live.date, tracker_live.format_source |
150 | 159 | FROM tracker_live INNER JOIN (SELECT l.famtrackid, max(l.date) as maxdate FROM tracker_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.famtrackid) s on tracker_live.famtrackid = s.famtrackid AND tracker_live.date = s.maxdate'.$filter_query." tracker_live.latitude <> 0 AND tracker_live.longitude <> 0"; |
@@ -182,7 +191,9 @@ discard block |
||
182 | 191 | |
183 | 192 | $filter_query = $this->getFilter($filter,true,true); |
184 | 193 | |
185 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
194 | + if (!isset($globalLiveInterval)) { |
|
195 | + $globalLiveInterval = '200'; |
|
196 | + } |
|
186 | 197 | if ($globalDBdriver == 'mysql') { |
187 | 198 | $query = 'SELECT tracker_live.ident, tracker_live.famtrackid,tracker_live.type, tracker_live.latitude, tracker_live.longitude, tracker_live.altitude, tracker_live.heading, tracker_live.ground_speed, tracker_live.date, tracker_live.format_source |
188 | 199 | FROM tracker_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= tracker_live.date AND tracker_live.latitude <> '0' AND tracker_live.longitude <> '0' |
@@ -215,7 +226,9 @@ discard block |
||
215 | 226 | global $globalDBdriver, $globalLiveInterval; |
216 | 227 | $filter_query = $this->getFilter($filter,true,true); |
217 | 228 | |
218 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
229 | + if (!isset($globalLiveInterval)) { |
|
230 | + $globalLiveInterval = '200'; |
|
231 | + } |
|
219 | 232 | if ($globalDBdriver == 'mysql') { |
220 | 233 | $query = 'SELECT COUNT(DISTINCT tracker_live.famtrackid) as nb FROM tracker_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
221 | 234 | } else { |
@@ -243,7 +256,9 @@ discard block |
||
243 | 256 | { |
244 | 257 | global $globalDBdriver, $globalLiveInterval; |
245 | 258 | $Spotter = new Spotter($this->db); |
246 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
259 | + if (!isset($globalLiveInterval)) { |
|
260 | + $globalLiveInterval = '200'; |
|
261 | + } |
|
247 | 262 | $filter_query = $this->getFilter($filter); |
248 | 263 | |
249 | 264 | if (is_array($coord)) { |
@@ -251,7 +266,9 @@ discard block |
||
251 | 266 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
252 | 267 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
253 | 268 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
254 | - } else return array(); |
|
269 | + } else { |
|
270 | + return array(); |
|
271 | + } |
|
255 | 272 | if ($globalDBdriver == 'mysql') { |
256 | 273 | $query = 'SELECT tracker_live.* FROM tracker_live INNER JOIN (SELECT l.famtrackid, max(l.date) as maxdate FROM tracker_live l WHERE DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= l.date GROUP BY l.famtrackid) s on tracker_live.famtrackid = s.famtrackid AND tracker_live.date = s.maxdate AND tracker_live.latitude BETWEEN '.$minlat.' AND '.$maxlat.' AND tracker_live.longitude BETWEEN '.$minlong.' AND '.$maxlong.' GROUP BY tracker_live.famtrackid'.$filter_query; |
257 | 274 | } else { |
@@ -271,7 +288,9 @@ discard block |
||
271 | 288 | { |
272 | 289 | global $globalDBdriver, $globalLiveInterval; |
273 | 290 | $Spotter = new Spotter($this->db); |
274 | - if (!isset($globalLiveInterval)) $globalLiveInterval = '200'; |
|
291 | + if (!isset($globalLiveInterval)) { |
|
292 | + $globalLiveInterval = '200'; |
|
293 | + } |
|
275 | 294 | $filter_query = $this->getFilter($filter); |
276 | 295 | |
277 | 296 | if (is_array($coord)) { |
@@ -279,7 +298,9 @@ discard block |
||
279 | 298 | $minlat = filter_var($coord[1],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
280 | 299 | $maxlong = filter_var($coord[2],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
281 | 300 | $maxlat = filter_var($coord[3],FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION); |
282 | - } else return array(); |
|
301 | + } else { |
|
302 | + return array(); |
|
303 | + } |
|
283 | 304 | if ($globalDBdriver == 'mysql') { |
284 | 305 | $query = 'SELECT tracker_live.ident, tracker_live.famtrackid,tracker_live.type, tracker_live.latitude, tracker_live.longitude, tracker_live.altitude, tracker_live.heading, tracker_live.ground_speed, tracker_live.date, tracker_live.format_source |
285 | 306 | FROM tracker_live'.$filter_query.' DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval." SECOND) <= tracker_live.date AND tracker_live.latitude <> '0' AND tracker_live.longitude <> '0' AND tracker_live.latitude BETWEEN ".$minlat.' AND '.$maxlat.' AND tracker_live.longitude BETWEEN '.$minlong.' AND '.$maxlong." |
@@ -472,11 +493,15 @@ discard block |
||
472 | 493 | //$query = self::$global_query.' WHERE tracker_live.famtrackid = :id ORDER BY date'; |
473 | 494 | if ($globalDBdriver == 'mysql') { |
474 | 495 | $query = 'SELECT tracker_live.* FROM tracker_live WHERE tracker_live.famtrackid = :id'; |
475 | - if ($liveinterval) $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
496 | + if ($liveinterval) { |
|
497 | + $query .= ' AND DATE_SUB(UTC_TIMESTAMP(),INTERVAL '.$globalLiveInterval.' SECOND) <= date'; |
|
498 | + } |
|
476 | 499 | $query .= ' ORDER BY date'; |
477 | 500 | } else { |
478 | 501 | $query = 'SELECT tracker_live.* FROM tracker_live WHERE tracker_live.famtrackid = :id'; |
479 | - if ($liveinterval) $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
502 | + if ($liveinterval) { |
|
503 | + $query .= " AND CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$globalLiveInterval." SECONDS' <= date"; |
|
504 | + } |
|
480 | 505 | $query .= ' ORDER BY date'; |
481 | 506 | } |
482 | 507 | |
@@ -571,7 +596,9 @@ discard block |
||
571 | 596 | $i++; |
572 | 597 | $j++; |
573 | 598 | if ($j == 30) { |
574 | - if ($globalDebug) echo "."; |
|
599 | + if ($globalDebug) { |
|
600 | + echo "."; |
|
601 | + } |
|
575 | 602 | try { |
576 | 603 | |
577 | 604 | $sth = $this->db->prepare(substr($query_delete,0,-1).")"); |
@@ -818,7 +845,9 @@ discard block |
||
818 | 845 | { |
819 | 846 | return false; |
820 | 847 | } |
821 | - } else return ''; |
|
848 | + } else { |
|
849 | + return ''; |
|
850 | + } |
|
822 | 851 | |
823 | 852 | if ($longitude != '') |
824 | 853 | { |
@@ -826,7 +855,9 @@ discard block |
||
826 | 855 | { |
827 | 856 | return false; |
828 | 857 | } |
829 | - } else return ''; |
|
858 | + } else { |
|
859 | + return ''; |
|
860 | + } |
|
830 | 861 | |
831 | 862 | if ($altitude != '') |
832 | 863 | { |
@@ -834,7 +865,9 @@ discard block |
||
834 | 865 | { |
835 | 866 | return false; |
836 | 867 | } |
837 | - } else $altitude = 0; |
|
868 | + } else { |
|
869 | + $altitude = 0; |
|
870 | + } |
|
838 | 871 | |
839 | 872 | if ($heading != '') |
840 | 873 | { |
@@ -842,7 +875,9 @@ discard block |
||
842 | 875 | { |
843 | 876 | return false; |
844 | 877 | } |
845 | - } else $heading = 0; |
|
878 | + } else { |
|
879 | + $heading = 0; |
|
880 | + } |
|
846 | 881 | |
847 | 882 | if ($groundspeed != '') |
848 | 883 | { |
@@ -850,9 +885,13 @@ discard block |
||
850 | 885 | { |
851 | 886 | return false; |
852 | 887 | } |
853 | - } else $groundspeed = 0; |
|
888 | + } else { |
|
889 | + $groundspeed = 0; |
|
890 | + } |
|
854 | 891 | date_default_timezone_set('UTC'); |
855 | - if ($date == '') $date = date("Y-m-d H:i:s", time()); |
|
892 | + if ($date == '') { |
|
893 | + $date = date("Y-m-d H:i:s", time()); |
|
894 | + } |
|
856 | 895 | |
857 | 896 | |
858 | 897 | $famtrackid = filter_var($famtrackid,FILTER_SANITIZE_STRING); |
@@ -868,12 +907,18 @@ discard block |
||
868 | 907 | $comment = filter_var($comment,FILTER_SANITIZE_STRING); |
869 | 908 | $type = filter_var($type,FILTER_SANITIZE_STRING); |
870 | 909 | |
871 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) $groundspeed = 0; |
|
872 | - if ($heading == '' || $Common->isInteger($heading) === false ) $heading = 0; |
|
910 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false ) { |
|
911 | + $groundspeed = 0; |
|
912 | + } |
|
913 | + if ($heading == '' || $Common->isInteger($heading) === false ) { |
|
914 | + $heading = 0; |
|
915 | + } |
|
873 | 916 | |
874 | 917 | $query = ''; |
875 | 918 | if ($globalArchive) { |
876 | - if ($globalDebug) echo '-- Delete previous data -- '; |
|
919 | + if ($globalDebug) { |
|
920 | + echo '-- Delete previous data -- '; |
|
921 | + } |
|
877 | 922 | $query .= 'DELETE FROM tracker_live WHERE famtrackid = :famtrackid;'; |
878 | 923 | } |
879 | 924 | $query .= 'INSERT INTO tracker_live (famtrackid, ident, latitude, longitude, altitude, heading, ground_speed, date, format_source, source_name, over_country, comment, type) |
@@ -888,10 +933,14 @@ discard block |
||
888 | 933 | return "error : ".$e->getMessage(); |
889 | 934 | } |
890 | 935 | if (isset($globalArchive) && $globalArchive && $putinarchive && $noarchive !== true) { |
891 | - if ($globalDebug) echo '(Add to SBS archive : '; |
|
936 | + if ($globalDebug) { |
|
937 | + echo '(Add to SBS archive : '; |
|
938 | + } |
|
892 | 939 | $TrackerArchive = new TrackerArchive($this->db); |
893 | 940 | $result = $TrackerArchive->addTrackerArchiveData($famtrackid, $ident,$latitude, $longitude, $altitude, $heading, $groundspeed, $date, $putinarchive, $comment, $type,$noarchive,$format_source, $source_name, $over_country); |
894 | - if ($globalDebug) echo $result.')'; |
|
941 | + if ($globalDebug) { |
|
942 | + echo $result.')'; |
|
943 | + } |
|
895 | 944 | } |
896 | 945 | |
897 | 946 | return "success"; |
@@ -26,7 +26,9 @@ discard block |
||
26 | 26 | if (isset($filter[0]['source'])) { |
27 | 27 | $filters = array_merge($filters,$filter); |
28 | 28 | } |
29 | - if (is_array($globalFilter)) $filter = array_merge($filter,$globalFilter); |
|
29 | + if (is_array($globalFilter)) { |
|
30 | + $filter = array_merge($filter,$globalFilter); |
|
31 | + } |
|
30 | 32 | $filter_query_join = ''; |
31 | 33 | $filter_query_where = ''; |
32 | 34 | foreach($filters as $flt) { |
@@ -72,8 +74,11 @@ discard block |
||
72 | 74 | if (isset($filter['source_aprs']) && !empty($filter['source_aprs'])) { |
73 | 75 | $filter_query_where .= " AND format_source = 'aprs' AND source_name IN ('".implode("','",$filter['source_aprs'])."')"; |
74 | 76 | } |
75 | - if ($filter_query_where == '' && $where) $filter_query_where = ' WHERE'; |
|
76 | - elseif ($filter_query_where != '' && $and) $filter_query_where .= ' AND'; |
|
77 | + if ($filter_query_where == '' && $where) { |
|
78 | + $filter_query_where = ' WHERE'; |
|
79 | + } elseif ($filter_query_where != '' && $and) { |
|
80 | + $filter_query_where .= ' AND'; |
|
81 | + } |
|
77 | 82 | if ($filter_query_where != '') { |
78 | 83 | $filter_query_where = preg_replace('/^ AND/',' WHERE',$filter_query_where); |
79 | 84 | } |
@@ -591,7 +596,9 @@ discard block |
||
591 | 596 | $additional_query .= "(tracker_archive_output.pilot_name like '%".$q_item."%') OR "; |
592 | 597 | $additional_query .= "(tracker_archive_output.ident like '%".$q_item."%') OR "; |
593 | 598 | $translate = $Translation->ident2icao($q_item); |
594 | - if ($translate != $q_item) $additional_query .= "(tracker_archive_output.ident like '%".$translate."%') OR "; |
|
599 | + if ($translate != $q_item) { |
|
600 | + $additional_query .= "(tracker_archive_output.ident like '%".$translate."%') OR "; |
|
601 | + } |
|
595 | 602 | $additional_query .= "(tracker_archive_output.highlight like '%".$q_item."%')"; |
596 | 603 | $additional_query .= ")"; |
597 | 604 | } |
@@ -809,7 +816,9 @@ discard block |
||
809 | 816 | date_default_timezone_set($globalTimezone); |
810 | 817 | $datetime = new DateTime(); |
811 | 818 | $offset = $datetime->format('P'); |
812 | - } else $offset = '+00:00'; |
|
819 | + } else { |
|
820 | + $offset = '+00:00'; |
|
821 | + } |
|
813 | 822 | |
814 | 823 | |
815 | 824 | if ($date_array[1] != "") |
@@ -1085,9 +1094,13 @@ discard block |
||
1085 | 1094 | $query .= "AND date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
1086 | 1095 | } |
1087 | 1096 | } |
1088 | - if ($sincedate != '') $query .= "AND date > '".$sincedate."' "; |
|
1097 | + if ($sincedate != '') { |
|
1098 | + $query .= "AND date > '".$sincedate."' "; |
|
1099 | + } |
|
1089 | 1100 | $query .= "GROUP BY c.name, c.iso3, c.iso2 ORDER BY nb DESC"; |
1090 | - if ($limit) $query .= " LIMIT 0,10"; |
|
1101 | + if ($limit) { |
|
1102 | + $query .= " LIMIT 0,10"; |
|
1103 | + } |
|
1091 | 1104 | |
1092 | 1105 | |
1093 | 1106 | $sth = $this->db->prepare($query); |
@@ -1131,9 +1144,13 @@ discard block |
||
1131 | 1144 | $query .= "AND s.date < CURRENT_TIMESTAMP AT TIME ZONE 'UTC' - INTERVAL '".$olderthanmonths." MONTHS'"; |
1132 | 1145 | } |
1133 | 1146 | } |
1134 | - if ($sincedate != '') $query .= "AND s.date > '".$sincedate."' "; |
|
1147 | + if ($sincedate != '') { |
|
1148 | + $query .= "AND s.date > '".$sincedate."' "; |
|
1149 | + } |
|
1135 | 1150 | $query .= "GROUP BY o.airline_icao,c.name, c.iso3, c.iso2 ORDER BY nb DESC"; |
1136 | - if ($limit) $query .= " LIMIT 0,10"; |
|
1151 | + if ($limit) { |
|
1152 | + $query .= " LIMIT 0,10"; |
|
1153 | + } |
|
1137 | 1154 | |
1138 | 1155 | |
1139 | 1156 | $sth = $this->db->prepare($query); |