Completed
Push — master ( dd5351...9adbe5 )
by Yannick
53:50
created
tsk-geojson.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 		$id = $spotter_item['Waypoint']['@attributes']['id'];
24 24
 		if ($id == 0 || !is_numeric($id)) $id = $j;
25 25
 		$output .= '{"type": "Feature",';
26
-		    $output .= '"id": '.$id.',';
27
-		    $output .= '"properties": {';
26
+			$output .= '"id": '.$id.',';
27
+			$output .= '"properties": {';
28 28
 			$output .= '"type": "'.$spotter_item['@attributes']['type'].'",';
29 29
 			//$output .= '"id": "'.$spotter_item['Waypoint']['@attributes']['id'].'",';
30 30
 			$output .= '"name": "'.$spotter_item['Waypoint']['@attributes']['name'].'",';
@@ -35,31 +35,31 @@  discard block
 block discarded – undo
35 35
 			} elseif ($spotter_item['@attributes']['type'] == 'Finish') {
36 36
 				$output .= '"icon": "/images/tsk/tsk-finish.png"';
37 37
 			} else $output .= '"icon": "/images/tsk/number_'.$id.'.png"';
38
-		    $output .= '},';
39
-		    $output .= '"geometry": {';
38
+			$output .= '},';
39
+			$output .= '"geometry": {';
40 40
 			$output .= '"type": "Point",';
41 41
 			$output .= '"coordinates": [';
42
-			    $output .= $spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'];
42
+				$output .= $spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'];
43 43
 			$output .= ']';
44
-		    $output .= '}';
44
+			$output .= '}';
45 45
 		$output .= '},';
46 46
 		$j++;
47 47
 	}
48 48
 	// Lines
49 49
 	$output .= '{"type": "Feature",';
50
-	    $output .= '"properties": {';
50
+		$output .= '"properties": {';
51 51
 		$output .= '"type": "'.$spotter_array['@attributes']['type'].'"';
52
-	    $output .= '},';
53
-	    $output .= '"geometry": {';
52
+		$output .= '},';
53
+		$output .= '"geometry": {';
54 54
 		$output .= '"type": "LineString",';
55 55
 		$output .= '"coordinates": [';
56 56
 	foreach($spotter_array['Point'] as $spotter_item)
57 57
 	{
58
-			    $output .= '['.$spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'].'],';
58
+				$output .= '['.$spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'].'],';
59 59
 	}
60 60
 	$output  = substr($output, 0, -1);
61 61
 		$output .= ']';
62
-	    $output .= '}';
62
+		$output .= '}';
63 63
 	$output .= '},';
64 64
 	$output  = substr($output, 0, -1);
65 65
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 }
9 9
 header('Content-Type: text/javascript');
10 10
 
11
-$tskfile = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL);
11
+$tskfile = filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL);
12 12
 
13 13
 $spotter_array = $TSK->parse_xml($tskfile);
14 14
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 if (!empty($spotter_array))
17 17
 {	  
18 18
 	$j = 0;
19
-	foreach($spotter_array['Point'] as $spotter_item)
19
+	foreach ($spotter_array['Point'] as $spotter_item)
20 20
 	{
21 21
 		date_default_timezone_set('UTC');
22 22
 		//waypoint plotting
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	    $output .= '"geometry": {';
54 54
 		$output .= '"type": "LineString",';
55 55
 		$output .= '"coordinates": [';
56
-	foreach($spotter_array['Point'] as $spotter_item)
56
+	foreach ($spotter_array['Point'] as $spotter_item)
57 57
 	{
58 58
 			    $output .= '['.$spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'].'],';
59 59
 	}
Please login to merge, or discard this 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.
js/map.2d.js.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 	};
344 344
 
345 345
 <?php
346
-    if (isset($_GET['tsk'])) {
346
+	if (isset($_GET['tsk'])) {
347 347
 ?>
348 348
 	function tskPopup (feature, layer) {
349 349
 		var output = '';
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	};
379 379
 	update_tsk();
380 380
 <?php
381
-    }
381
+	}
382 382
 ?>
383 383
 	map.on('moveend', function() {
384 384
 		//if (map.getZoom() > 7) {
@@ -394,10 +394,10 @@  discard block
 block discarded – undo
394 394
 setInterval(function(){update_locationsLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>);
395 395
 
396 396
 <?php
397
-    // Add support for custom json via $globalMapJson
398
-    if (isset($globalMapJson) && is_array($globalMapJson)) {
397
+	// Add support for custom json via $globalMapJson
398
+	if (isset($globalMapJson) && is_array($globalMapJson)) {
399 399
 	foreach ($globalMapJson as $json) {
400
-	    if (isset($json['url'])) {
400
+		if (isset($json['url'])) {
401 401
 ?>
402 402
 update_genLayer('<?php print $json['url']; ?>');
403 403
 <?php
@@ -406,9 +406,9 @@  discard block
 block discarded – undo
406 406
 setInterval(function(){update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>);
407 407
 <?php
408 408
 		}
409
-	    }
409
+		}
410
+	}
410 411
 	}
411
-    }
412 412
 
413 413
 ?>
414 414
 //adds the bootstrap tooltip to the map icons
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 require_once('../require/settings.php');
3 3
 require_once('../require/class.Language.php'); 
4 4
 
5
-setcookie("MapFormat",'2d');
5
+setcookie("MapFormat", '2d');
6 6
 
7 7
 if (!isset($globalOpenWeatherMapKey)) $globalOpenWeatherMapKey = '';
8 8
 // Compressed GeoJson is used if true
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	$lastupd = $_GET['archivespeed']*$archiveupdatetime;
21 21
 	if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate'];
22 22
 	else $enddate = time();
23
-	setcookie("archive_begin",$begindate);
24
-	setcookie("archive_end",$enddate);
25
-	setcookie("archive_update",$lastupd);
26
-	setcookie("archive_speed",$archivespeed);
23
+	setcookie("archive_begin", $begindate);
24
+	setcookie("archive_end", $enddate);
25
+	setcookie("archive_update", $lastupd);
26
+	setcookie("archive_speed", $archivespeed);
27 27
 ?>
28 28
 document.cookie =  'archive_begin=<?php print $begindate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/';
29 29
 document.cookie =  'archive_end=<?php print $enddate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/';
@@ -75,16 +75,16 @@  discard block
 block discarded – undo
75 75
 <?php
76 76
 	}
77 77
 	if (isset($_GET['ident'])) {
78
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
78
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
79 79
 	}
80 80
 	if (isset($_GET['flightaware_id'])) {
81
-		$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
81
+		$flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING);
82 82
 	}
83 83
 	if (isset($_GET['latitude'])) {
84
-		$latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING);
84
+		$latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING);
85 85
 	}
86 86
 	if (isset($_GET['longitude'])) {
87
-		$longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING);
87
+		$longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING);
88 88
 	}
89 89
 ?>
90 90
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	} else {
113 113
 		if ((isset($globalCenterLatitude) && $globalCenterLatitude != '' && isset($globalCenterLongitude) && $globalCenterLongitude != '') || isset($_COOKIE['lastcentercoord'])) {
114 114
 			if (isset($_COOKIE['lastcentercoord'])) {
115
-				$lastcentercoord = explode(',',$_COOKIE['lastcentercoord']);
115
+				$lastcentercoord = explode(',', $_COOKIE['lastcentercoord']);
116 116
 				$viewcenterlatitude = $lastcentercoord[0];
117 117
 				$viewcenterlongitude = $lastcentercoord[1];
118 118
 				$viewzoom = $lastcentercoord[2];
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	     || navigator.userAgent.match(/BlackBerry/i)
134 134
 	     || navigator.userAgent.match(/Windows Phone/i))
135 135
 	{
136
-		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom-1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>;
136
+		var zoom = <?php if (isset($viewzoom) && $viewzoom == $globalLiveZoom) print $viewzoom - 1; elseif (isset($viewzoom)) print $viewzoom; else print '8'; ?>;
137 137
 	} else {
138 138
 		var zoom = <?php if (isset($viewzoom)) print $viewzoom; else print '9'; ?>;
139 139
 	}
@@ -227,19 +227,19 @@  discard block
 block discarded – undo
227 227
 	map.addLayer(yandexLayer);
228 228
 <?php
229 229
 	} elseif ($MapType == 'Bing-Aerial') {
230
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
230
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
231 231
 ?>
232 232
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'});
233 233
 	map.addLayer(bingLayer);
234 234
 <?php
235 235
 	} elseif ($MapType == 'Bing-Hybrid') {
236
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
236
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
237 237
 ?>
238 238
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'});
239 239
 	map.addLayer(bingLayer);
240 240
 <?php
241 241
 	} elseif ($MapType == 'Bing-Road') {
242
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
242
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
243 243
 ?>
244 244
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'});
245 245
 	map.addLayer(bingLayer);
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 
358 358
 	function update_tsk() {
359 359
 		var bbox = map.getBounds().toBBoxString();
360
-		var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL); ?>",function (data) {
360
+		var tskLayerQuery = $.getJSON("<?php print $globalURL; ?>/tsk-geojson.php?tsk=<?php echo filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL); ?>",function (data) {
361 361
 		    tskLayer = L.geoJson(data,{
362 362
 			onEachFeature: function (feature, layer) {
363 363
 			    tskPopup(feature, layer);
Please login to merge, or discard this patch.
header.php 2 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
 
14 14
 
15 15
 if (isset($_GET['3d'])) {
16
-	setcookie('MapFormat','3d');
16
+	setcookie('MapFormat', '3d');
17 17
 } else if (isset($_GET['2d'])) {
18
-	setcookie('MapFormat','2d');
18
+	setcookie('MapFormat', '2d');
19 19
 }
20 20
 
21 21
 if (isset($_GET['tsk'])) {
22
-	$tsk = filter_input(INPUT_GET,'tsk',FILTER_SANITIZE_URL);
22
+	$tsk = filter_input(INPUT_GET, 'tsk', FILTER_SANITIZE_URL);
23 23
 }
24 24
 
25 25
 if (isset($_POST['archive'])) {
26
-	setcookie('archive','true');
27
-	setcookie('archive_begin',strtotime($_POST['start_date']));
28
-	setcookie('archive_end',strtotime($_POST['end_date']));
29
-	setcookie('archive_speed',$_POST['archivespeed']);
26
+	setcookie('archive', 'true');
27
+	setcookie('archive_begin', strtotime($_POST['start_date']));
28
+	setcookie('archive_end', strtotime($_POST['end_date']));
29
+	setcookie('archive_speed', $_POST['archivespeed']);
30 30
 }
31 31
 if (isset($_POST['noarchive'])) {
32
-	setcookie('archive','false',-1);
33
-	setcookie('archive_begin','',-1);
34
-	setcookie('archive_end','',-1);
35
-	setcookie('archive_speed','',-1);
32
+	setcookie('archive', 'false', -1);
33
+	setcookie('archive_begin', '', -1);
34
+	setcookie('archive_end', '', -1);
35
+	setcookie('archive_speed', '', -1);
36 36
 }
37 37
 // When button "Remove all filters" is clicked
38 38
 if (isset($_POST['removefilters'])) {
39
-	$allfilters = array_filter(array_keys($_COOKIE),function($key) {
40
-	    return strpos($key,'filter_') === 0;
39
+	$allfilters = array_filter(array_keys($_COOKIE), function($key) {
40
+	    return strpos($key, 'filter_') === 0;
41 41
 	});
42 42
 	foreach ($allfilters as $filt) {
43 43
 		unset($_COOKIE[$filt]);
44
-		setcookie($filt,null,-1);
44
+		setcookie($filt, null, -1);
45 45
 	}
46 46
 }
47 47
 ?>
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
247 247
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
248 248
 <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>
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>
250 250
 <?php
251 251
 		if (!isset($type) || $type == 'aircraft') {
252 252
 ?>
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 <script src="<?php print $globalURL; ?>/js/MovingMarker.js"></script>
320 320
 <script src="<?php print $globalURL; ?>/js/jquery.idle.min.js"></script>
321 321
 <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>
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>
323 323
 <script src="<?php print $globalURL; ?>/js/map-aircraft.2d.js.php?flightaware_id=<?php print $flightaware_id; ?>&<?php print time(); ?>"></script>
324 324
 <?php
325 325
 		if (isset($globalGoogleAPIKey) && $globalGoogleAPIKey != '' && ($MapType == 'Google-Roadmap' || $MapType == 'Google-Satellite' || $MapType == 'Google-Hybrid' || $MapType == 'Google-Terrain')) {
@@ -724,8 +724,8 @@  discard block
 block discarded – undo
724 724
 ?>
725 725
       <div class="search">
726 726
       <form action="<?php print $globalURL; ?>/search" method="get">
727
-		<!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != ""){ print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>-->
728
-		<input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != ""){ print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>
727
+		<!--<input type="text" name="q" value="<?php if (isset($GET['q'])) { if ($_GET['q'] != "") { print $_GET['q']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>-->
728
+		<input type="text" name="callsign" value="<?php if (isset($GET['callsign'])) { if ($_GET['callsign'] != "") { print $_GET['callsign']; } else { print _("Search"); } } else { print _("Search"); } ?>" onfocus="if (this.value=='search'){this.value='';}" /><button type="submit"><i class="fa fa-search"></i></button>
729 729
 	</form>
730 730
 	</div>
731 731
   	<div class="social">
@@ -743,7 +743,7 @@  discard block
 block discarded – undo
743 743
 	print '</div>';
744 744
 }
745 745
 
746
-if (strtolower($current_page) =='ident-detailed' || strtolower($current_page) == 'flightid-overview') {
746
+if (strtolower($current_page) == 'ident-detailed' || strtolower($current_page) == 'flightid-overview') {
747 747
 ?>
748 748
     <div class="top-header clear" role="main">
749 749
 <?php
@@ -756,7 +756,7 @@  discard block
 block discarded – undo
756 756
     </div>
757 757
 <?php
758 758
 }
759
-if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false))
759
+if ((strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) || (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false))
760 760
 {
761 761
     ?>
762 762
     <div class="top-header clear" role="main">
@@ -769,15 +769,15 @@  discard block
 block discarded – undo
769 769
         var zoom = 13;
770 770
 //create the map
771 771
 <?php
772
-    if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) {
772
+    if (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($airport_array[0]['latitude'])) {
773 773
 ?>
774 774
   map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom);
775 775
 <?php
776
-    } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) {
776
+    } elseif (strpos(strtolower($current_page), 'airport-') !== false && strpos(strtolower($current_page), 'statistics-') === false) {
777 777
 ?>
778 778
   map = L.map('map', { zoomControl:true });
779 779
 <?php
780
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
780
+    } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) {
781 781
 ?>
782 782
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]);
783 783
     var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map);
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
     var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
786 786
     var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map);
787 787
 <?php
788
-    } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
788
+    } elseif (strpos(strtolower($current_page), 'route-') !== false && strpos(strtolower($current_page), 'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) {
789 789
 ?>
790 790
   map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]);
791 791
 <?php
Please login to merge, or discard this 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.