Completed
Push — master ( 73f088...7f17b6 )
by Yannick
07:13
created
manufacturer-statistics-arrival-airport-country.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 }
9 9
 
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
11
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Arrival Airports by Country from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Arrival Airports by Country from %s"), $manufacturer);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	print '<option></option>';
24 24
 	$all_manufacturers = $Spotter->getAllManufacturers();
25
-	foreach($all_manufacturers as $all_manufacturer)
25
+	foreach ($all_manufacturers as $all_manufacturer)
26 26
 	{
27
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
27
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28 28
 		{
29 29
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
30 30
 		} else {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	include('manufacturer-sub-menu.php');
44 44
 	print '<div class="column">';
45 45
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
46
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>';
46
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>';
47 47
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($manufacturer);
48 48
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
49 49
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             	["'._("Country").'", "'._("# of times").'"], ';
56 56
 
57 57
 	$country_data = '';
58
-	foreach($airport_country_array as $airport_item)
58
+	foreach ($airport_country_array as $airport_item)
59 59
 	{
60 60
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
61 61
 	}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		print '</thead>';
90 90
 		print '<tbody>';
91 91
 		$i = 1;
92
-		foreach($airport_country_array as $airport_item)
92
+		foreach ($airport_country_array as $airport_item)
93 93
 		{
94 94
 			print '<tr>';
95 95
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['aircraft_manufacturer'])) {
6
-        header('Location: '.$globalURL.'/manufacturer');
7
-        die();
6
+		header('Location: '.$globalURL.'/manufacturer');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
airport-statistics-departure-airport-country.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airport'])) {
6
-        header('Location: '.$globalURL.'/airport');
7
-        die();
6
+		header('Location: '.$globalURL.'/airport');
7
+		die();
8 8
 }
9 9
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
           function drawChart() {
66 66
             var data = google.visualization.arrayToDataTable([
67 67
             	["'._("Country").'", "'._("# of times").'"], ';
68
-            	$country_data = '';
68
+				$country_data = '';
69 69
 	foreach($airport_country_array as $airport_item)
70 70
 	{
71 71
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/airport');
7 7
         die();
8 8
 }
9
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
9
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
16
+	$title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$airport_names = $Spotter->getAllAirportNames();
23 23
 	ksort($airport_names);
24
-	foreach($airport_names as $airport_name)
24
+	foreach ($airport_names as $airport_name)
25 25
 	{
26
-		if($_GET['airport'] == $airport_name['airport_icao'])
26
+		if ($_GET['airport'] == $airport_name['airport_icao'])
27 27
 		{
28 28
 			print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
29 29
 		} else {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	include('airport-sub-menu.php');
55 55
 	print '<div class="column">';
56 56
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
57
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
57
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
58 58
 
59 59
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirport($airport);
60 60
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             var data = google.visualization.arrayToDataTable([
67 67
             	["'._("Country").'", "'._("# of times").'"], ';
68 68
             	$country_data = '';
69
-	foreach($airport_country_array as $airport_item)
69
+	foreach ($airport_country_array as $airport_item)
70 70
 	{
71 71
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
72 72
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		print '</thead>';
101 101
 		print '<tbody>';
102 102
 		$i = 1;
103
-		foreach($airport_country_array as $airport_item)
103
+		foreach ($airport_country_array as $airport_item)
104 104
 		{
105 105
 			print '<tr>';
106 106
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-geojson.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		date_default_timezone_set('UTC');
27 27
 		//waypoint plotting
28 28
 		$output .= '{"type": "Feature",';
29
-		    $output .= '"properties": {';
29
+			$output .= '"properties": {';
30 30
 			$output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",';
31 31
 			$output .= '"city": "'.$spotter_item['city'].'",';
32 32
 			$output .= '"country": "'.$spotter_item['country'].'",';
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
 			$output .= '"homepage": "'.$spotter_item['home_link'].'",';
50 50
 			$output .= '"image_thumb": "'.$spotter_item['image_thumb'].'"';
51 51
 //			$output .= '"photo": "'.$spotter_item['image_thumbnail'].'",';
52
-		    $output .= '},';
53
-		    $output .= '"geometry": {';
52
+			$output .= '},';
53
+			$output .= '"geometry": {';
54 54
 			$output .= '"type": "Point",';
55 55
 			$output .= '"coordinates": [';
56
-			    $output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
56
+				$output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
57 57
 			$output .= ']';
58
-		    $output .= '}';
58
+			$output .= '}';
59 59
 		$output .= '},';
60 60
 	}
61 61
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,27 +11,27 @@
 block discarded – undo
11 11
 
12 12
 if (isset($_GET['coord'])) 
13 13
 {
14
-	$coords = explode(',',$_GET['coord']);
14
+	$coords = explode(',', $_GET['coord']);
15 15
 	$spotter_array = $Spotter->getAllAirportInfobyCoord($coords);
16 16
 } else {
17
-	$spotter_array = $Spotter->getAllAirportInfobyCountry(array('France','Switzerland'));
17
+	$spotter_array = $Spotter->getAllAirportInfobyCountry(array('France', 'Switzerland'));
18 18
 }
19 19
       
20 20
 $output = '{"type": "FeatureCollection","features": [';
21 21
             
22 22
 if (!empty($spotter_array))
23 23
 {	  
24
-	foreach($spotter_array as $spotter_item)
24
+	foreach ($spotter_array as $spotter_item)
25 25
 	{
26 26
 		date_default_timezone_set('UTC');
27 27
 		//waypoint plotting
28 28
 		$output .= '{"type": "Feature",';
29 29
 		    $output .= '"properties": {';
30
-			$output .= '"name": "'.str_replace('"',"'",$spotter_item['name']).'",';
30
+			$output .= '"name": "'.str_replace('"', "'", $spotter_item['name']).'",';
31 31
 			$output .= '"city": "'.$spotter_item['city'].'",';
32 32
 			$output .= '"country": "'.$spotter_item['country'].'",';
33 33
 			$output .= '"altitude": "'.$spotter_item['altitude'].'",';
34
-			$output .= '"popupContent": "'.str_replace('"',"'",$spotter_item['name']).' : '.$spotter_item['city'].', '.$spotter_item['country'].'",';
34
+			$output .= '"popupContent": "'.str_replace('"', "'", $spotter_item['name']).' : '.$spotter_item['city'].', '.$spotter_item['country'].'",';
35 35
 			if ($spotter_item['type'] == 'large_airport') {
36 36
 				$output .= '"icon": "'.$globalURL.'/images/airport.png",';
37 37
 			} elseif ($spotter_item['type'] == 'heliport') {
Please login to merge, or discard this patch.
airline-detailed.php 2 patches
Spacing   +11 added lines, -11 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['airline'])){
6
+if (!isset($_GET['airline'])) {
7 7
 	header('Location: '.$globalURL.'/airline');
8
-} else{
8
+} else {
9 9
 	$Spotter = new Spotter();
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']) || $_GET['limit'] == "")
11
+	if (!isset($_GET['limit']) || $_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];
@@ -27,16 +27,16 @@  discard block
 block discarded – undo
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29 29
 	
30
-	$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
30
+	$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
31 31
 	$page_url = $globalURL.'/airline/'.$airline;
32 32
 	
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
34
-	$spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'],$limit_start.",".$absolute_difference, $sort);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34
+	$spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'], $limit_start.",".$absolute_difference, $sort);
35 35
 	
36 36
 	if (!empty($spotter_array))
37 37
 	{
38 38
 		if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) {
39
-			$title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
39
+			$title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
40 40
 		} else $title = '';
41 41
 		require_once('header.php');
42 42
 	  
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 		print '<select name="airline" class="selectpicker" data-live-search="true">';
46 46
 		print '<option></option>';
47 47
 		$airline_names = $Spotter->getAllAirlineNames();
48
-		foreach($airline_names as $airline_name)
48
+		foreach ($airline_names as $airline_name)
49 49
 		{
50
-			if($_GET['airline'] == $airline_name['airline_icao'])
50
+			if ($_GET['airline'] == $airline_name['airline_icao'])
51 51
 			{
52 52
 				print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
53 53
 			} else {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		include('airline-sub-menu.php');
85 85
 		print '<div class="table column">';
86 86
 		if (isset($spotter_array[0]['airline_name'])) {
87
-			print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
87
+			print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
88 88
 		}
89 89
 
90 90
 		include('table-output.php');  
Please login to merge, or discard this patch.
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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];
@@ -37,7 +37,9 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) {
39 39
 			$title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
40
-		} else $title = '';
40
+		} else {
41
+			$title = '';
42
+		}
41 43
 		require_once('header.php');
42 44
 	  
43 45
 		print '<div class="select-item">';
@@ -73,8 +75,12 @@  discard block
 block discarded – undo
73 75
 			print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['airline_name'].'</div>';
74 76
 			print '<div><span class="label">'._("Country").'</span>'.$spotter_array[0]['airline_country'].'</div>';
75 77
 			print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['airline_icao'].'</div>';
76
-			if (isset($spotter_array[0]['airline_iata'])) print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>';
77
-			if (isset($spotter_array[0]['airline_callsign'])) print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>'; 
78
+			if (isset($spotter_array[0]['airline_iata'])) {
79
+				print '<div><span class="label">'._("IATA").'</span>'.$spotter_array[0]['airline_iata'].'</div>';
80
+			}
81
+			if (isset($spotter_array[0]['airline_callsign'])) {
82
+				print '<div><span class="label">'._("Callsign").'</span>'.$spotter_array[0]['airline_callsign'].'</div>';
83
+			}
78 84
 			print '<div><span class="label">'._("Type").'</span>'.ucwords($spotter_array[0]['airline_type']).'</div>';
79 85
 			print '</div>';
80 86
 		} else {
Please login to merge, or discard this patch.
notam-geojson.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		date_default_timezone_set('UTC');
27 27
 		//waypoint plotting
28 28
 		$output .= '{"type": "Feature",';
29
-		    $output .= '"properties": {';
29
+			$output .= '"properties": {';
30 30
 			$output .= '"ref": "'.$spotter_item['ref'].'",';
31 31
 			$output .= '"title": "'.$spotter_item['title'].'",';
32 32
 			$output .= '"fir": "'.$spotter_item['fir'].'",';
@@ -43,26 +43,26 @@  discard block
 block discarded – undo
43 43
 //			$output .= '"photo": "'.$spotter_item['image_thumbnail'].'",';
44 44
 //			if ($spotter_item['radius'] > 30) $spotter_item['radius'] = 30;
45 45
 			if ($spotter_item['scope'] == 'Airport warning') {
46
-			    $output .= '"color": "#EACC04",';
46
+				$output .= '"color": "#EACC04",';
47 47
 			} elseif ($spotter_item['scope'] == 'Airport/Enroute warning') {
48
-			    $output .= '"color": "#EA7D00",';
48
+				$output .= '"color": "#EA7D00",';
49 49
 			} elseif ($spotter_item['scope'] == 'Navigation warning') {
50
-			    $output .= '"color": "#BBEA00",';
50
+				$output .= '"color": "#BBEA00",';
51 51
 			} else {
52
-			    $output .= '"color": "#FF0000",';
52
+				$output .= '"color": "#FF0000",';
53 53
 			}
54 54
 			$radius = $spotter_item['radius']*1852;
55 55
 			$output .= '"radiusm": "'.$radius.'",';
56 56
 			$output .= '"radiusnm": "'.$spotter_item['radius'].'",';
57 57
 			if ($radius > 25000) $radius = 25000;
58 58
 			$output .= '"radius": "'.$radius.'"';
59
-		    $output .= '},';
60
-		    $output .= '"geometry": {';
59
+			$output .= '},';
60
+			$output .= '"geometry": {';
61 61
 			$output .= '"type": "Point",';
62 62
 			$output .= '"coordinates": [';
63
-			    $output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude'];
63
+				$output .= $spotter_item['center_longitude'].', '.$spotter_item['center_latitude'];
64 64
 			$output .= ']';
65
-		    $output .= '}';
65
+			$output .= '}';
66 66
 		$output .= '},';
67 67
 	}
68 68
 	$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 if (isset($_GET['coord'])) 
12 12
 {
13
-	$coords = explode(',',$_GET['coord']);
13
+	$coords = explode(',', $_GET['coord']);
14 14
 //	$spotter_array = Spotter::getAllNOTAMbyCoord($coords);
15 15
 	$spotter_array = $NOTAM->getAllNOTAM();
16 16
 } else {
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
             
22 22
 if (!empty($spotter_array))
23 23
 {	  
24
-	foreach($spotter_array as $spotter_item)
24
+	foreach ($spotter_array as $spotter_item)
25 25
 	{
26 26
 		date_default_timezone_set('UTC');
27 27
 		//waypoint plotting
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		    $output .= '}';
66 66
 		$output .= '},';
67 67
 	}
68
-	$output  = substr($output, 0, -1);
68
+	$output = substr($output, 0, -1);
69 69
 }
70 70
 $output .= ']}';
71 71
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,9 @@
 block discarded – undo
54 54
 			$radius = $spotter_item['radius']*1852;
55 55
 			$output .= '"radiusm": "'.$radius.'",';
56 56
 			$output .= '"radiusnm": "'.$spotter_item['radius'].'",';
57
-			if ($radius > 25000) $radius = 25000;
57
+			if ($radius > 25000) {
58
+				$radius = 25000;
59
+			}
58 60
 			$output .= '"radius": "'.$radius.'"';
59 61
 		    $output .= '},';
60 62
 		    $output .= '"geometry": {';
Please login to merge, or discard this patch.
statistics-aircraft.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             var data = google.visualization.arrayToDataTable([
23 23
             	["'._("Aircraft").'", "'._("# of times").'"], ';
24 24
 $aircraft_data = '';
25
-foreach($aircraft_array as $aircraft_item)
25
+foreach ($aircraft_array as $aircraft_item)
26 26
 {
27 27
 	$aircraft_data .= '[ "'.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],';
28 28
 }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	print '</thead>';
56 56
 	print '<tbody>';
57 57
 	$i = 1;
58
-	foreach($aircraft_array as $aircraft_item)
58
+	foreach ($aircraft_array as $aircraft_item)
59 59
 	{
60 60
 		print '<tr>';
61 61
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-registration.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/airport');
7 7
         die();
8 8
 }
9
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
9
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
16
+	$title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
17 17
 
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<option></option>';
23 23
 	$airport_names = $Spotter->getAllAirportNames();
24 24
 	ksort($airport_names);
25
-	foreach($airport_names as $airport_name)
25
+	foreach ($airport_names as $airport_name)
26 26
 	{
27
-		if($_GET['airport'] == $airport_name['airport_icao'])
27
+		if ($_GET['airport'] == $airport_name['airport_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
30 30
 		} else {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	include('airport-sub-menu.php');
56 56
 	print '<div class="column">';
57 57
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
58
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
58
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
59 59
 
60 60
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByAirport($airport);
61 61
 	if (!empty($aircraft_array))
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		print '</thead>';
73 73
 		print '<tbody>';
74 74
 		$i = 1;
75
-		foreach($aircraft_array as $aircraft_item)
75
+		foreach ($aircraft_array as $aircraft_item)
76 76
 		{
77 77
 			print '<tr>';
78 78
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airport'])) {
6
-        header('Location: '.$globalURL.'/airport');
7
-        die();
6
+		header('Location: '.$globalURL.'/airport');
7
+		die();
8 8
 }
9 9
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
registration-statistics-departure-airport-country.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7 7
 if (isset($_GET['registration'])) {
8
-	$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
8
+	$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
9 9
 	$spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
10 10
 	$aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
11 11
 } else $spotter_array = array();
12 12
 
13 13
 if (!empty($spotter_array))
14 14
 {
15
-	$title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"),$registration);
15
+	$title = sprintf(_("Most Common Departure Airports by Country of aircraft with registration %s"), $registration);
16 16
 	require_once('header.php');
17 17
 	print '<div class="info column">';
18 18
 	print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('registration-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."),$registration).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights with aircraft registration <strong>%s</strong>."), $registration).'</p>';
28 28
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByRegistration($registration);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
30 30
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 			var data = google.visualization.arrayToDataTable([
36 36
 			    ["'._("Country").'", "'._("# of times").'"], ';
37 37
 	$country_data = '';
38
-	foreach($airport_country_array as $airport_item)
38
+	foreach ($airport_country_array as $airport_item)
39 39
 	{
40 40
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
41 41
 	}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		print '</thead>';
70 70
 		print '<tbody>';
71 71
 		$i = 1;
72
-		foreach($airport_country_array as $airport_item)
72
+		foreach ($airport_country_array as $airport_item)
73 73
 		{
74 74
 			print '<tr>';
75 75
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13 13
 if (isset($_GET['departure_airport']) && isset($_GET['arrival_airport'])) {
14 14
 	$spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort);
15
-} else $spotter_array = array();
15
+} else {
16
+	$spotter_array = array();
17
+}
16 18
   
17 19
 if (!empty($spotter_array))
18 20
 {
Please login to merge, or discard this patch.
manufacturer-statistics-airline.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,16 +6,16 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/manufacturer');
7 7
         die();
8 8
 }
9
-$aircraft_manufacturer = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING);
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
9
+$aircraft_manufacturer = filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $manufacturer = ucwords(str_replace("-", " ", $aircraft_manufacturer));
13 13
 
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
14
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Airlines from %s"), $manufacturer);
19 19
 
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
24 24
 	print '<option></option>';
25 25
 	$all_manufacturers = $Spotter->getAllManufacturers();
26
-	foreach($all_manufacturers as $all_manufacturer)
26
+	foreach ($all_manufacturers as $all_manufacturer)
27 27
 	{
28
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29 29
 		{
30 30
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
31 31
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	include('manufacturer-sub-menu.php');
45 45
 	print '<div class="column">';
46 46
 	print '<h2>'._("Most Common Airlines").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 	$airline_array = $Spotter->countAllAirlinesByManufacturer($manufacturer);
49 49
 	if (!empty($airline_array))
50 50
 	{
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		print '</thead>';
61 61
 		print '<tbody>';
62 62
 		$i = 1;
63
-		foreach($airline_array as $airline_item)
63
+		foreach ($airline_array as $airline_item)
64 64
 		{
65 65
 			print '<tr>';
66 66
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['aircraft_manufacturer'])) {
6
-        header('Location: '.$globalURL.'/manufacturer');
7
-        die();
6
+		header('Location: '.$globalURL.'/manufacturer');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.