Completed
Push — master ( dd5351...9adbe5 )
by Yannick
53:50
created
tsk-geojson.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 		date_default_timezone_set('UTC');
22 22
 		//waypoint plotting
23 23
 		$id = $spotter_item['Waypoint']['@attributes']['id'];
24
-		if ($id == 0 || !is_numeric($id)) $id = $j;
24
+		if ($id == 0 || !is_numeric($id)) {
25
+			$id = $j;
26
+		}
25 27
 		$output .= '{"type": "Feature",';
26 28
 		    $output .= '"id": '.$id.',';
27 29
 		    $output .= '"properties": {';
@@ -34,7 +36,9 @@  discard block
 block discarded – undo
34 36
 				$output .= '"icon": "/images/tsk/tsk-start.png"';
35 37
 			} elseif ($spotter_item['@attributes']['type'] == 'Finish') {
36 38
 				$output .= '"icon": "/images/tsk/tsk-finish.png"';
37
-			} else $output .= '"icon": "/images/tsk/number_'.$id.'.png"';
39
+			} else {
40
+				$output .= '"icon": "/images/tsk/number_'.$id.'.png"';
41
+			}
38 42
 		    $output .= '},';
39 43
 		    $output .= '"geometry": {';
40 44
 			$output .= '"type": "Point",';
Please login to merge, or discard this patch.
header.php 1 patch
Braces   +81 added lines, -18 removed lines patch added patch discarded remove patch
@@ -6,10 +6,15 @@  discard block
 block discarded – undo
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'])) {
@@ -201,7 +206,10 @@  discard block
 block discarded – undo
201 206
 <?php
202 207
 //		}
203 208
 ?>
204
-<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) print '&tsk='.$tsk; ?>"></script>
209
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?<?php print time(); ?><?php if (isset($tsk)) {
210
+	print '&tsk='.$tsk;
211
+}
212
+?>"></script>
205 213
 <?php
206 214
 		if (!isset($globalAircraft) || $globalAircraft) {
207 215
 ?>
@@ -246,7 +254,13 @@  discard block
 block discarded – undo
246 254
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
247 255
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
248 256
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
249
-<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>
257
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?ident=<?php print $ident; ?><?php if(isset($latitude)) {
258
+	print '&latitude='.$latitude;
259
+}
260
+?><?php if(isset($longitude)) {
261
+	print '&longitude='.$longitude;
262
+}
263
+?>&<?php print time(); ?>"></script>
250 264
 <?php
251 265
 		if (!isset($type) || $type == 'aircraft') {
252 266
 ?>
@@ -319,7 +333,13 @@  discard block
 block discarded – undo
319 333
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
320 334
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
321 335
 <script src="<?php print $globalURL; ?>/js/map.common.js"></script>
322
-<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>
336
+<script src="<?php print $globalURL; ?>/js/map.2d.js.php?flightaware_id=<?php print $flightaware_id; ?><?php if(isset($latitude)) {
337
+	print '&latitude='.$latitude;
338
+}
339
+?><?php if(isset($longitude)) {
340
+	print '&longitude='.$longitude;
341
+}
342
+?>&<?php print time(); ?>"></script>
323 343
 <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
324 344
 <?php
325 345
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
@@ -400,7 +420,12 @@  discard block
 block discarded – undo
400 420
         <span class="icon-bar"></span>
401 421
       </button>
402 422
       <a href="<?php print $globalURL; ?>/search" class="navbar-toggle navbar-toggle-search"><i class="fa fa-search"></i></a>
403
-      <a class="navbar-brand" href="<?php if ($globalURL == '') print '/'; else print $globalURL; ?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
423
+      <a class="navbar-brand" href="<?php if ($globalURL == '') {
424
+	print '/';
425
+} else {
426
+	print $globalURL;
427
+}
428
+?>"><img src="<?php print $globalURL.$logoURL; ?>" height="30px" /></a>
404 429
     </div>
405 430
     <div class="collapse navbar-collapse">
406 431
 
@@ -455,7 +480,10 @@  discard block
 block discarded – undo
455 480
 	}
456 481
 ?>
457 482
 
458
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
483
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
484
+	echo 'right-';
485
+}
486
+?>caret"></b></a>
459 487
           <ul class="dropdown-menu">
460 488
           	<li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircrafts Types"); ?></a></li>
461 489
 <?php
@@ -526,8 +554,14 @@  discard block
 block discarded – undo
526 554
         </li>
527 555
       	<li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li>
528 556
       	<li><a href="<?php print $globalURL; ?>/statistics"><?php echo _("Statistics"); ?></a></li>
529
-        <li class="dropdown<?php if ($sub) echo '-submenu'; ?>">
530
-          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
557
+        <li class="dropdown<?php if ($sub) {
558
+	echo '-submenu';
559
+}
560
+?>">
561
+          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Tools"); ?> <b class="<?php if ($sub) {
562
+	echo 'right-';
563
+}
564
+?>caret"></b></a>
531 565
           <ul class="dropdown-menu">
532 566
           	<li><a href="<?php print $globalURL; ?>/tools/acars"><?php echo _("ACARS translator"); ?></a></li>
533 567
           	<li><a href="<?php print $globalURL; ?>/tools/metar"><?php echo _("METAR translator"); ?></a></li>
@@ -571,7 +605,10 @@  discard block
 block discarded – undo
571 605
 <?php
572 606
 	}
573 607
 ?>
574
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
608
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
609
+	echo 'right-';
610
+}
611
+?>caret"></b></a>
575 612
 		<ul class="dropdown-menu">
576 613
 		    <li><a href="<?php print $globalURL; ?>/marine/currently"><?php echo _("Current Activity"); ?></a></li>
577 614
 		    <li><a href="<?php print $globalURL; ?>/marine/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -612,7 +649,10 @@  discard block
 block discarded – undo
612 649
 <?php
613 650
 	}
614 651
 ?>
615
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
652
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
653
+	echo 'right-';
654
+}
655
+?>caret"></b></a>
616 656
 		<ul class="dropdown-menu">
617 657
 		    <li><a href="<?php print $globalURL; ?>/tracker/currently"><?php echo _("Current Activity"); ?></a></li>
618 658
 		    <li><a href="<?php print $globalURL; ?>/tracker/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -655,7 +695,10 @@  discard block
 block discarded – undo
655 695
 ?>
656 696
 
657 697
 <!--
658
-		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a>
698
+		<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) {
699
+	echo 'right-';
700
+}
701
+?>caret"></b></a>
659 702
 		<ul class="dropdown-menu">
660 703
 		    <li><a href="<?php print $globalURL; ?>/satellite/currently"><?php echo _("Current Activity"); ?></a></li>
661 704
 		    <li><a href="<?php print $globalURL; ?>/satellite/latest"><?php echo _("Latest Activity"); ?></a></li>
@@ -712,7 +755,9 @@  discard block
 block discarded – undo
712 755
   		        $alllang = $Language->getLanguages();
713 756
   		        foreach ($alllang as $key => $lang) {
714 757
   		            print '<option value="'.$key.'"';
715
-  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected ';
758
+  		            if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) {
759
+  		            	print ' selected ';
760
+  		            }
716 761
   		            print '>'.$lang[0].'</option>';
717 762
   		        }
718 763
   		    ?>
@@ -853,9 +898,24 @@  discard block
 block discarded – undo
853 898
 	$customid = $globalMapProvider;
854 899
 ?>
855 900
     L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', {
856
-        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) print $globalMapCustomLayer[$customid]['maxZoom']; else print '18'; ?>,
857
-        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) print $globalMapCustomLayer[$customid]['minZoom']; else print '0'; ?>,
858
-        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) print 'false'; else print 'true'; ?>,
901
+        maxZoom: <?php if (isset($globalMapCustomLayer[$customid]['maxZoom'])) {
902
+	print $globalMapCustomLayer[$customid]['maxZoom'];
903
+} else {
904
+	print '18';
905
+}
906
+?>,
907
+        minZoom: <?php if (isset($globalMapCustomLayer[$customid]['minZoom'])) {
908
+	print $globalMapCustomLayer[$customid]['minZoom'];
909
+} else {
910
+	print '0';
911
+}
912
+?>,
913
+        noWrap: <?php if (isset($globalMapWrap) && !$globalMapWrap) {
914
+	print 'false';
915
+} else {
916
+	print 'true';
917
+}
918
+?>,
859 919
         attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>'
860 920
     }).addTo(map);
861 921
 <?php
@@ -878,4 +938,7 @@  discard block
 block discarded – undo
878 938
 
879 939
 ?>
880 940
 
881
-<section class="container main-content <?php if (strtolower($current_page) == 'index') print 'index '; ?>clear">
941
+<section class="container main-content <?php if (strtolower($current_page) == 'index') {
942
+	print 'index ';
943
+}
944
+?>clear">
Please login to merge, or discard this patch.