Completed
Push — master ( 9eb73e...f1c432 )
by Yannick
16:39
created
header.php 1 patch
Braces   +73 added lines, -16 removed lines patch added patch discarded remove patch
@@ -1,13 +1,18 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 require_once('require/class.Connection.php');
4
-if (!isset($Connection)) $Connection = new Connection();
4
+if (!isset($Connection)) {
5
+	$Connection = new Connection();
6
+}
5 7
 //gets the page file and stores it in a variable
6 8
 $file_path = pathinfo($_SERVER['SCRIPT_NAME']);
7 9
 $current_page = $file_path['filename'];
8 10
 date_default_timezone_set($globalTimezone);
9
-if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') $MapType = $_COOKIE['MapType'];
10
-else $MapType = $globalMapProvider;
11
+if (isset($_COOKIE['MapType']) && $_COOKIE['MapType'] != '') {
12
+	$MapType = $_COOKIE['MapType'];
13
+} else {
14
+	$MapType = $globalMapProvider;
15
+}
11 16
 if (isset($_GET['3d'])) {
12 17
 	setcookie('MapFormat','3d');
13 18
 } else if (isset($_GET['2d'])) {
@@ -241,7 +246,13 @@  discard block
 block discarded – undo
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
 ?>
@@ -311,7 +322,13 @@  discard block
 block discarded – undo
311 322
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
312 323
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
313 324
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
314
-<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>
325
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) {
326
+	print '&latitude='.$latitude;
327
+}
328
+?><?php if(isset($longitude)) {
329
+	print '&longitude='.$longitude;
330
+}
331
+?>&<?php print time(); ?>"></script>
315 332
 <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
316 333
 <?php
317 334
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
@@ -393,7 +410,12 @@  discard block
 block discarded – undo
393 410
         <span class="icon-bar"></span>
394 411
       </button>
395 412
       <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a>
396
-      <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
413
+      <a class="navbar-brand" href="<?php if ($globalURL == '') {
414
+	print '/';
415
+} else {
416
+	print $globalURL;
417
+}
418
+?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
397 419
     </div>
398 420
     <div class="collapse navbar-collapse">
399 421
 
@@ -419,7 +441,10 @@  discard block
 block discarded – undo
419 441
 <?php
420 442
     }
421 443
 ?>
422
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
444
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
445
+	echo 'right-';
446
+}
447
+?>caret"></b></a>
423 448
           <ul class="dropdown-menu">
424 449
           	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li>
425 450
 <?php
@@ -490,8 +515,14 @@  discard block
 block discarded – undo
490 515
         </li>
491 516
       	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
492 517
       	<li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li>
493
-        <li class="dropdown<?php if ($sub) echo '-submenu'; ?>">
494
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
518
+        <li class="dropdown<?php if ($sub) {
519
+	echo '-submenu';
520
+}
521
+?>">
522
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) {
523
+	echo 'right-';
524
+}
525
+?>caret"></b></a>
495 526
           <ul class="dropdown-menu">
496 527
           	<li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li>
497 528
           	<li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li>
@@ -520,7 +551,10 @@  discard block
 block discarded – undo
520 551
 <?php
521 552
 	}
522 553
 ?>
523
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
554
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
555
+	echo 'right-';
556
+}
557
+?>caret"></b></a>
524 558
 		<ul class="dropdown-menu">
525 559
 		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
526 560
 		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -552,7 +586,10 @@  discard block
 block discarded – undo
552 586
 <?php
553 587
 	}
554 588
 ?>
555
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
589
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
590
+	echo 'right-';
591
+}
592
+?>caret"></b></a>
556 593
 		<ul class="dropdown-menu">
557 594
 		    <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li>
558 595
 		    <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -608,7 +645,9 @@  discard block
 block discarded – undo
608 645
   		        $alllang = $Language->getLanguages();
609 646
   		        foreach ($alllang as $key => $lang) {
610 647
   		            print '<option value="'.$key.'"';
611
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
648
+  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) {
649
+  		            	print ' selected ';
650
+  		            }
612 651
   		            print '>'.$lang[0].'</option>';
613 652
   		        }
614 653
   		    ?>
@@ -748,9 +787,24 @@  discard block
 block discarded – undo
748 787
 	$customid = $globalMapProvider;
749 788
 ?>
750 789
     L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
751
-        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
752
-        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
753
-        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
790
+        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
791
+	print $globalMapCustomLayer[$customid]['maxZoom'];
792
+} else {
793
+	print '18';
794
+}
795
+?>,
796
+        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
797
+	print $globalMapCustomLayer[$customid]['minZoom'];
798
+} else {
799
+	print '0';
800
+}
801
+?>,
802
+        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
803
+	print 'false';
804
+} else {
805
+	print 'true';
806
+}
807
+?>,
754 808
         attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
755 809
     }).addTo(map);
756 810
 <?php
@@ -773,4 +827,7 @@  discard block
 block discarded – undo
773 827
 
774 828
 ?>
775 829
 
776
-<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
830
+<section class="container main-content <?php if (strtolower($current_page) == 'index') {
831
+	print 'index ';
832
+}
833
+?>clear">
Please login to merge, or discard this patch.
footer.php 1 patch
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,10 @@  discard block
 block discarded – undo
1 1
 </section>
2 2
 <div class="pub onmap">
3 3
 <?php
4
-	if (isset($globalPub)) print $globalPub;
5
-?>
4
+	if (isset($globalPub)) {
5
+		print $globalPub;
6
+	}
7
+	?>
6 8
 </div>
7 9
 <footer class="container">
8 10
 	<?php
@@ -13,7 +15,10 @@  discard block
 block discarded – undo
13 15
 	<?php
14 16
 	    }
15 17
 	?>
16
-	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
18
+	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) {
19
+	print $globalURL;
20
+}
21
+?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
17 22
 </footer>
18 23
 
19 24
 <div class="notifications bottom-left"></div>
Please login to merge, or discard this patch.