@@ -6,12 +6,19 @@ discard block |
||
| 6 | 6 | //gets the page file and stores it in a variable |
| 7 | 7 | $file_path = pathinfo($_SERVER['SCRIPT_NAME']); |
| 8 | 8 | $current_page = $file_path['filename']; |
| 9 | -if ($globalTimezone == '') $globalTimezone = 'UTC'; |
|
| 9 | +if ($globalTimezone == '') { |
|
| 10 | + $globalTimezone = 'UTC'; |
|
| 11 | +} |
|
| 10 | 12 | date_default_timezone_set($globalTimezone); |
| 11 | -if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType']; |
|
| 12 | -else $MapType = $globalMapProvider; |
|
| 13 | +if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') { |
|
| 14 | + $MapType = $_COOKIE['MapType']; |
|
| 15 | +} else { |
|
| 16 | + $MapType = $globalMapProvider; |
|
| 17 | +} |
|
| 13 | 18 | |
| 14 | -if (isset($globalMapOffline) && $globalMapOffline) $MapType = 'offline'; |
|
| 19 | +if (isset($globalMapOffline) && $globalMapOffline) { |
|
| 20 | + $MapType = 'offline'; |
|
| 21 | +} |
|
| 15 | 22 | |
| 16 | 23 | if (isset($_GET['3d'])) { |
| 17 | 24 | setcookie('MapFormat','3d'); |
@@ -210,7 +217,10 @@ discard block |
||
| 210 | 217 | <?php |
| 211 | 218 | } else { |
| 212 | 219 | ?> |
| 213 | -<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script> |
|
| 220 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) { |
|
| 221 | + print '&tsk='.$tsk; |
|
| 222 | +} |
|
| 223 | +?>"></script> |
|
| 214 | 224 | <?php |
| 215 | 225 | } |
| 216 | 226 | if (!isset($globalAircraft) || $globalAircraft) { |
@@ -250,7 +260,13 @@ discard block |
||
| 250 | 260 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 251 | 261 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 252 | 262 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 253 | -<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> |
|
| 263 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
| 264 | + print '&latitude='.$latitude; |
|
| 265 | +} |
|
| 266 | +?><?php if(isset($longitude)) { |
|
| 267 | + print '&longitude='.$longitude; |
|
| 268 | +} |
|
| 269 | +?>&<?php print time(); ?>"></script> |
|
| 254 | 270 | <?php |
| 255 | 271 | if (!isset($type) || $type == 'aircraft') { |
| 256 | 272 | ?> |
@@ -323,7 +339,13 @@ discard block |
||
| 323 | 339 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 324 | 340 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 325 | 341 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 326 | -<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> |
|
| 342 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
| 343 | + print '&latitude='.$latitude; |
|
| 344 | +} |
|
| 345 | +?><?php if(isset($longitude)) { |
|
| 346 | + print '&longitude='.$longitude; |
|
| 347 | +} |
|
| 348 | +?>&<?php print time(); ?>"></script> |
|
| 327 | 349 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
| 328 | 350 | <?php |
| 329 | 351 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -389,7 +411,9 @@ discard block |
||
| 389 | 411 | } |
| 390 | 412 | ?> |
| 391 | 413 | <?php |
| 392 | -if (isset($globalPubHeader)) print $globalPubHeader; |
|
| 414 | +if (isset($globalPubHeader)) { |
|
| 415 | + print $globalPubHeader; |
|
| 416 | +} |
|
| 393 | 417 | ?> |
| 394 | 418 | |
| 395 | 419 | <meta property="og:title" content="<?php print $title; ?> | <?php print $globalName; ?>"/> |
@@ -407,7 +431,12 @@ discard block |
||
| 407 | 431 | <span class="icon-bar"></span> |
| 408 | 432 | </button> |
| 409 | 433 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle search"><i class="fa fa-search"></i></a> |
| 410 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 434 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
| 435 | + print '/'; |
|
| 436 | +} else { |
|
| 437 | + print $globalURL; |
|
| 438 | +} |
|
| 439 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 411 | 440 | </div> |
| 412 | 441 | <div class="collapse navbar-collapse"> |
| 413 | 442 | |
@@ -462,7 +491,10 @@ discard block |
||
| 462 | 491 | } |
| 463 | 492 | ?> |
| 464 | 493 | |
| 465 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 494 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 495 | + echo 'right-'; |
|
| 496 | +} |
|
| 497 | +?>caret"></b></a> |
|
| 466 | 498 | <ul class="dropdown-menu"> |
| 467 | 499 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li> |
| 468 | 500 | <?php |
@@ -533,8 +565,14 @@ discard block |
||
| 533 | 565 | </li> |
| 534 | 566 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
| 535 | 567 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
| 536 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
| 537 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 568 | + <li class="dropdown<?php if ($sub) { |
|
| 569 | + echo '-submenu'; |
|
| 570 | +} |
|
| 571 | +?>"> |
|
| 572 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
| 573 | + echo 'right-'; |
|
| 574 | +} |
|
| 575 | +?>caret"></b></a> |
|
| 538 | 576 | <ul class="dropdown-menu"> |
| 539 | 577 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
| 540 | 578 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -578,7 +616,10 @@ discard block |
||
| 578 | 616 | <?php |
| 579 | 617 | } |
| 580 | 618 | ?> |
| 581 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 619 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 620 | + echo 'right-'; |
|
| 621 | +} |
|
| 622 | +?>caret"></b></a> |
|
| 582 | 623 | <ul class="dropdown-menu"> |
| 583 | 624 | <?php |
| 584 | 625 | if (isset($globalVM) && $globalVM) { |
@@ -628,7 +669,10 @@ discard block |
||
| 628 | 669 | <?php |
| 629 | 670 | } |
| 630 | 671 | ?> |
| 631 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 672 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 673 | + echo 'right-'; |
|
| 674 | +} |
|
| 675 | +?>caret"></b></a> |
|
| 632 | 676 | <ul class="dropdown-menu"> |
| 633 | 677 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
| 634 | 678 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -671,7 +715,10 @@ discard block |
||
| 671 | 715 | ?> |
| 672 | 716 | |
| 673 | 717 | <!-- |
| 674 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 718 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 719 | + echo 'right-'; |
|
| 720 | +} |
|
| 721 | +?>caret"></b></a> |
|
| 675 | 722 | <ul class="dropdown-menu"> |
| 676 | 723 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
| 677 | 724 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -729,9 +776,14 @@ discard block |
||
| 729 | 776 | <?php |
| 730 | 777 | foreach ($alllang as $key => $lang) { |
| 731 | 778 | print '<option value="'.$key.'"'; |
| 732 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 733 | - if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
| 734 | - else print '>'.$lang[0].'</option>'; |
|
| 779 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
| 780 | + print ' selected '; |
|
| 781 | + } |
|
| 782 | + if ($lang[0] == 'Deutsch') { |
|
| 783 | + print '>'.$lang[0].' (βeta)</option>'; |
|
| 784 | + } else { |
|
| 785 | + print '>'.$lang[0].'</option>'; |
|
| 786 | + } |
|
| 735 | 787 | } |
| 736 | 788 | ?> |
| 737 | 789 | </select> |
@@ -879,9 +931,24 @@ discard block |
||
| 879 | 931 | $customid = $globalMapProvider; |
| 880 | 932 | ?> |
| 881 | 933 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
| 882 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
| 883 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 884 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 934 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 935 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 936 | +} else { |
|
| 937 | + print '18'; |
|
| 938 | +} |
|
| 939 | +?>, |
|
| 940 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 941 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 942 | +} else { |
|
| 943 | + print '0'; |
|
| 944 | +} |
|
| 945 | +?>, |
|
| 946 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 947 | + print 'false'; |
|
| 948 | +} else { |
|
| 949 | + print 'true'; |
|
| 950 | +} |
|
| 951 | +?>, |
|
| 885 | 952 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 886 | 953 | }).addTo(map); |
| 887 | 954 | <?php |
@@ -896,7 +963,12 @@ discard block |
||
| 896 | 963 | maxZoom: 5, |
| 897 | 964 | tms : true, |
| 898 | 965 | zindex : 3, |
| 899 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 966 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 967 | + print 'false'; |
|
| 968 | +} else { |
|
| 969 | + print 'true'; |
|
| 970 | +} |
|
| 971 | +?>, |
|
| 900 | 972 | attribution: 'Natural Earth' |
| 901 | 973 | }).addTo(map); |
| 902 | 974 | <?php |
@@ -919,4 +991,7 @@ discard block |
||
| 919 | 991 | |
| 920 | 992 | ?> |
| 921 | 993 | |
| 922 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
| 994 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
| 995 | + print 'index '; |
|
| 996 | +} |
|
| 997 | +?>clear"> |
|