@@ -6,10 +6,15 @@ 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 | 19 | |
| 15 | 20 | if (isset($_GET['3d'])) { |
@@ -241,7 +246,13 @@ discard block |
||
| 241 | 246 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 242 | 247 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 243 | 248 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 244 | -<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> |
|
| 249 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) { |
|
| 250 | + print '&latitude='.$latitude; |
|
| 251 | +} |
|
| 252 | +?><?php if(isset($longitude)) { |
|
| 253 | + print '&longitude='.$longitude; |
|
| 254 | +} |
|
| 255 | +?>&<?php print time(); ?>"></script> |
|
| 245 | 256 | <?php |
| 246 | 257 | if (!isset($type) || $type == 'aircraft') { |
| 247 | 258 | ?> |
@@ -314,7 +325,13 @@ discard block |
||
| 314 | 325 | <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script> |
| 315 | 326 | <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script> |
| 316 | 327 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 317 | -<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> |
|
| 328 | +<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) { |
|
| 329 | + print '&latitude='.$latitude; |
|
| 330 | +} |
|
| 331 | +?><?php if(isset($longitude)) { |
|
| 332 | + print '&longitude='.$longitude; |
|
| 333 | +} |
|
| 334 | +?>&<?php print time(); ?>"></script> |
|
| 318 | 335 | <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script> |
| 319 | 336 | <?php |
| 320 | 337 | if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) { |
@@ -395,7 +412,12 @@ discard block |
||
| 395 | 412 | <span class="icon-bar"></span> |
| 396 | 413 | </button> |
| 397 | 414 | <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a> |
| 398 | - <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 415 | + <a class="navbar-brand" href="<?php if ($globalURL == '') { |
|
| 416 | + print '/'; |
|
| 417 | +} else { |
|
| 418 | + print $globalURL; |
|
| 419 | +} |
|
| 420 | +?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a> |
|
| 399 | 421 | </div> |
| 400 | 422 | <div class="collapse navbar-collapse"> |
| 401 | 423 | |
@@ -434,7 +456,10 @@ discard block |
||
| 434 | 456 | <?php |
| 435 | 457 | } |
| 436 | 458 | ?> |
| 437 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 459 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 460 | + echo 'right-'; |
|
| 461 | +} |
|
| 462 | +?>caret"></b></a> |
|
| 438 | 463 | <ul class="dropdown-menu"> |
| 439 | 464 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li> |
| 440 | 465 | <?php |
@@ -505,8 +530,14 @@ discard block |
||
| 505 | 530 | </li> |
| 506 | 531 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
| 507 | 532 | <li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li> |
| 508 | - <li class="dropdown<?php if ($sub) echo '-submenu'; ?>"> |
|
| 509 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 533 | + <li class="dropdown<?php if ($sub) { |
|
| 534 | + echo '-submenu'; |
|
| 535 | +} |
|
| 536 | +?>"> |
|
| 537 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) { |
|
| 538 | + echo 'right-'; |
|
| 539 | +} |
|
| 540 | +?>caret"></b></a> |
|
| 510 | 541 | <ul class="dropdown-menu"> |
| 511 | 542 | <li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li> |
| 512 | 543 | <li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li> |
@@ -542,7 +573,10 @@ discard block |
||
| 542 | 573 | <?php |
| 543 | 574 | } |
| 544 | 575 | ?> |
| 545 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 576 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 577 | + echo 'right-'; |
|
| 578 | +} |
|
| 579 | +?>caret"></b></a> |
|
| 546 | 580 | <ul class="dropdown-menu"> |
| 547 | 581 | <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li> |
| 548 | 582 | <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -575,7 +609,10 @@ discard block |
||
| 575 | 609 | <?php |
| 576 | 610 | } |
| 577 | 611 | ?> |
| 578 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 612 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 613 | + echo 'right-'; |
|
| 614 | +} |
|
| 615 | +?>caret"></b></a> |
|
| 579 | 616 | <ul class="dropdown-menu"> |
| 580 | 617 | <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li> |
| 581 | 618 | <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -609,7 +646,10 @@ discard block |
||
| 609 | 646 | } |
| 610 | 647 | ?> |
| 611 | 648 | <!-- |
| 612 | - <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
|
| 649 | + <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) { |
|
| 650 | + echo 'right-'; |
|
| 651 | +} |
|
| 652 | +?>caret"></b></a> |
|
| 613 | 653 | <ul class="dropdown-menu"> |
| 614 | 654 | <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li> |
| 615 | 655 | <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li> |
@@ -666,7 +706,9 @@ discard block |
||
| 666 | 706 | $alllang = $Language->getLanguages(); |
| 667 | 707 | foreach ($alllang as $key => $lang) { |
| 668 | 708 | print '<option value="'.$key.'"'; |
| 669 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 709 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) { |
|
| 710 | + print ' selected '; |
|
| 711 | + } |
|
| 670 | 712 | print '>'.$lang[0].'</option>'; |
| 671 | 713 | } |
| 672 | 714 | ?> |
@@ -806,9 +848,24 @@ discard block |
||
| 806 | 848 | $customid = $globalMapProvider; |
| 807 | 849 | ?> |
| 808 | 850 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
| 809 | - maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>, |
|
| 810 | - minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>, |
|
| 811 | - noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>, |
|
| 851 | + maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) { |
|
| 852 | + print $globalMapCustomLayer[$customid]['maxZoom']; |
|
| 853 | +} else { |
|
| 854 | + print '18'; |
|
| 855 | +} |
|
| 856 | +?>, |
|
| 857 | + minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) { |
|
| 858 | + print $globalMapCustomLayer[$customid]['minZoom']; |
|
| 859 | +} else { |
|
| 860 | + print '0'; |
|
| 861 | +} |
|
| 862 | +?>, |
|
| 863 | + noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) { |
|
| 864 | + print 'false'; |
|
| 865 | +} else { |
|
| 866 | + print 'true'; |
|
| 867 | +} |
|
| 868 | +?>, |
|
| 812 | 869 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 813 | 870 | }).addTo(map); |
| 814 | 871 | <?php |
@@ -831,4 +888,7 @@ discard block |
||
| 831 | 888 | |
| 832 | 889 | ?> |
| 833 | 890 | |
| 834 | -<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear"> |
|
| 891 | +<section class="container main-content <?php if (strtolower($current_page) == 'index') { |
|
| 892 | + print 'index '; |
|
| 893 | +} |
|
| 894 | +?>clear"> |
|