Completed
Push — master ( 6fd228...599365 )
by Yannick
29:38
created
location-data.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 $Source = new Source();
6 6
 
7 7
 if (isset($_GET['sourceid'])) {
8
-	$sourceid = filter_input(INPUT_GET,'sourceid',FILTER_SANITIZE_NUMBER_INT);
8
+	$sourceid = filter_input(INPUT_GET, 'sourceid', FILTER_SANITIZE_NUMBER_INT);
9 9
 	$source_data = $Source->getLocationInfoById($sourceid);
10 10
 	if (isset($source_data[0])) {
11 11
  ?>
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 print '</div>';
38 38
 
39 39
 if ($spotter_item['city'] != '') print '<div><span>'._("City").'</span>'.$spotter_item['city'].'</div>';
40
-if ($spotter_item['country'] !='') print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>';
41
-print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'],4).', '.round($spotter_item['longitude'],4).'</div>';
40
+if ($spotter_item['country'] != '') print '<div><span>'._("Country").'</span>'.$spotter_item['country'].'</div>';
41
+print '<div><span>'._("Coordinates").'</span>'.round($spotter_item['latitude'], 4).', '.round($spotter_item['longitude'], 4).'</div>';
42 42
 /*
43 43
 if ($spotter_item['atc_range'] > 0) {
44 44
     print '<div><span>'._("Range").'</span>';
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 }
48 48
 */
49 49
 if ($spotter_item['type'] == 'wx') {
50
-	$weather = json_decode($spotter_item['description'],true);
50
+	$weather = json_decode($spotter_item['description'], true);
51 51
 	//print_r($weather);
52 52
 	if (isset($weather['temp'])) print '<div><span>'._("Temperature").'</span>'.$weather['temp'].'°C</div>';
53 53
 	if (isset($weather['pressure'])) print '<div><span>'._("Pressure").'</span>'.$weather['pressure'].'hPa</div>';
Please login to merge, or discard this patch.
location-geojson.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -12,40 +12,40 @@  discard block
 block discarded – undo
12 12
 if (!isset($globalDemo)) {
13 13
 	if (isset($_GET['coord'])) 
14 14
 	{
15
-		$coords = explode(',',$_GET['coord']);
15
+		$coords = explode(',', $_GET['coord']);
16 16
 		if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
17 17
 		    || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) {
18 18
 			//$spotter_array = $Source->getAllLocationInfo();
19
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs',$coords));
19
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs', $coords));
20 20
 		}
21 21
 		if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
22 22
 		    || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) {
23
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx',$coords));
23
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx', $coords));
24 24
 		}
25 25
 		if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
26 26
 		    || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) {
27
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning',$coords));
27
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning', $coords));
28 28
 		}
29 29
 		
30 30
 		if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') 
31 31
 		    || (!isset($_COOKIE['show_Fire']) && (!isset($globalMapFire) || $globalMapFire === TRUE))) {
32
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires',$coords));
32
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('fires', $coords));
33 33
 		}
34 34
 		
35
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType(''));
35
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType(''));
36 36
 	} else {
37 37
 		if ((isset($_COOKIE['show_GroundStation']) && $_COOKIE['show_GroundStation'] == 'true') 
38 38
 		    || (!isset($_COOKIE['show_GroundStation']) && (!isset($globalMapGroundStation) || $globalMapGroundStation === TRUE))) {
39 39
 			//$spotter_array = $Source->getAllLocationInfo();
40
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('gs'));
40
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('gs'));
41 41
 		}
42 42
 		if ((isset($_COOKIE['show_WeatherStation']) && $_COOKIE['show_WeatherStation'] == 'true') 
43 43
 		    || (!isset($_COOKIE['show_WeatherStation']) && (!isset($globalMapWeatherStation) || $globalMapWeatherStation === TRUE))) {
44
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('wx'));
44
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('wx'));
45 45
 		}
46 46
 		if ((isset($_COOKIE['show_Lightning']) && $_COOKIE['show_Lightning'] == 'true') 
47 47
 		    || (!isset($_COOKIE['show_Lightning']) && (!isset($globalMapLightning) || $globalMapLightning === TRUE))) {
48
-			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('lightning'));
48
+			$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType('lightning'));
49 49
 		}
50 50
 		/*
51 51
 		if ((isset($_COOKIE['show_Fire']) && $_COOKIE['show_Fire'] == 'true') 
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 			$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType('fires'));
54 54
 		}
55 55
 		*/
56
-		$spotter_array = array_merge($spotter_array,$Source->getLocationInfoByType(''));
56
+		$spotter_array = array_merge($spotter_array, $Source->getLocationInfoByType(''));
57 57
 	}
58 58
 }
59 59
 
60 60
 $output = '{"type": "FeatureCollection","features": [';
61 61
 if (!empty($spotter_array) && count($spotter_array) > 0)
62 62
 {
63
-	foreach($spotter_array as $spotter_item)
63
+	foreach ($spotter_array as $spotter_item)
64 64
 	{
65 65
 		date_default_timezone_set('UTC');
66 66
 		//waypoint plotting
@@ -79,8 +79,8 @@  discard block
 block discarded – undo
79 79
 			$output .= '"icon": "'.$globalURL.'/images/'.$spotter_item['logo'].'",';
80 80
 			$output .= '"type": "'.$spotter_item['type'].'",';
81 81
 			if ($spotter_item['type'] == 'wx') {
82
-				$weather = json_decode($spotter_item['description'],true);
83
-				if (isset($weather['temp'])) $output.= '"temp": "'.$weather['temp'].'",';
82
+				$weather = json_decode($spotter_item['description'], true);
83
+				if (isset($weather['temp'])) $output .= '"temp": "'.$weather['temp'].'",';
84 84
 			}
85 85
 			$output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"';
86 86
 		    $output .= '},';
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 		    $output .= '}';
93 93
 		$output .= '},';
94 94
 	}
95
-	$output  = substr($output, 0, -1);
95
+	$output = substr($output, 0, -1);
96 96
 }
97 97
 $output .= ']}';
98 98
 
Please login to merge, or discard this patch.
country-detailed.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-if (!isset($_GET['country'])){
6
+if (!isset($_GET['country'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']))
11
+	if (!isset($_GET['limit']))
12 12
 	{
13 13
 	  $limit_start = 0;
14 14
 	  $limit_end = 25;
15 15
 	  $absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	$country = ucwords(str_replace("-", " ", $_GET['country']));
31 31
 	
32 32
 	$page_url = $globalURL.'/country/'.$_GET['country'];
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	if ($country == 'Na') {
35 35
 		$spotter_array = array();
36 36
 	} else {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 	if (!empty($spotter_array))
45 45
 	{
46
-		$title = sprintf(_("Detailed View for Airports &amp; Airlines from %s"),$country);
46
+		$title = sprintf(_("Detailed View for Airports &amp; Airlines from %s"), $country);
47 47
 
48 48
 		require_once('header.php');
49 49
 		print '<div class="select-item">';
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 		print '<select name="country" class="selectpicker" data-live-search="true">';
52 52
 		print '<option></option>';
53 53
 		$all_countries = $Spotter->getAllCountries();
54
-		foreach($all_countries as $all_country)
54
+		foreach ($all_countries as $all_country)
55 55
 		{
56
-			if($country == $all_country['country'])
56
+			if ($country == $all_country['country'])
57 57
 			{
58 58
 				print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
59 59
 			} else {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		if ($_GET['country'] != "NA")
69 69
 		{
70 70
 			print '<div class="info column">';
71
-			print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
71
+			print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
72 72
 			print '</div>';
73 73
 		} else {
74 74
 			print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
 		include('country-sub-menu.php');
78 78
 		print '<div class="table column">';
79
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure &amp; arrival) OR airlines from <strong>%s</strong>."),$country).'</p>';
79
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure &amp; arrival) OR airlines from <strong>%s</strong>."), $country).'</p>';
80 80
 
81 81
 		include('table-output.php');
82 82
 		print '<div class="pagination">';
Please login to merge, or discard this patch.