Completed
Push — master ( e17801...597a61 )
by Yannick
25:55
created
airline-statistics-departure-airport-country.php 3 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24
-	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
24
+	if (empty($airline_names)) {
25
+		$airline_names = $Spotter->getAllAirlineNames();
26
+	}
25 27
 	foreach($airline_names as $airline_name)
26 28
 	{
27 29
 		if($airline == $airline_name['airline_icao'])
@@ -43,8 +45,7 @@  discard block
 block discarded – undo
43 45
 			if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif'))
44 46
 			{
45 47
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
46
-			}
47
-			elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48
+			} elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48 49
 			{
49 50
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
50 51
 			}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($airline == $airline_name['airline_icao'])
27
+		if ($airline == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirline($airline);
67 67
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
68 68
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
71 71
 	print 'var series = [';
72 72
 	$country_data = '';
73
-	foreach($airport_country_array as $airport_item)
73
+	foreach ($airport_country_array as $airport_item)
74 74
 	{
75 75
 		$country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
76 76
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		print '</thead>';
118 118
 		print '<tbody>';
119 119
 		$i = 1;
120
-		foreach($airport_country_array as $airport_item)
120
+		foreach ($airport_country_array as $airport_item)
121 121
 		{
122 122
 			print '<tr>';
123 123
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airline'])) {
7
-        header('Location: '.$globalURL.'/airline');
8
-        die();
7
+		header('Location: '.$globalURL.'/airline');
8
+		die();
9 9
 }
10 10
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 	$country_data = substr($country_data, 0, -1);
78 78
 	print $country_data;
79
-        print '];';
80
-        print 'var dataset = {};var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
81
-        print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#EFEFFF","#001830"]);';
82
-        print 'series.forEach(function(item){var iso = item[0], value = item[1]; dataset[iso] = { numberOfThings: value, fillColor: paletteScale(value) };});';
83
-        print 'new Datamap({
79
+		print '];';
80
+		print 'var dataset = {};var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
81
+		print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#EFEFFF","#001830"]);';
82
+		print 'series.forEach(function(item){var iso = item[0], value = item[1]; dataset[iso] = { numberOfThings: value, fillColor: paletteScale(value) };});';
83
+		print 'new Datamap({
84 84
 	    element: document.getElementById("chartCountry"),
85 85
 	    projection: "mercator", // big world map
86 86
 	    fills: { defaultFill: "#F5F5F5" },
Please login to merge, or discard this patch.
airline-statistics-arrival-airport.php 3 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24
-	if (empty($ariline_names)) $airline_names = $Spotter->getAllAirlineNames();
24
+	if (empty($ariline_names)) {
25
+		$airline_names = $Spotter->getAllAirlineNames();
26
+	}
25 27
 	foreach($airline_names as $airline_name)
26 28
 	{
27 29
 		if($_GET['airline'] == $airline_name['airline_icao'])
@@ -43,8 +45,7 @@  discard block
 block discarded – undo
43 45
 		if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif'))
44 46
 		{
45 47
 			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
46
-		}
47
-		elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48
+		} elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48 49
 		{
49 50
 			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
50 51
 		}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airline'])) {
7
-        header('Location: '.$globalURL.'/airline');
8
-        die();
7
+		header('Location: '.$globalURL.'/airline');
8
+		die();
9 9
 }
10 10
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Arrival Airports from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($ariline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($_GET['airline'] == $airline_name['airline_icao'])
27
+		if ($_GET['airline'] == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByAirline($airline);
67 67
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
68 68
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	print '<script>';
72 72
 	print 'var series = [';
73 73
 	$airport_data = '';
74
-	foreach($airport_airport_array as $airport_item)
74
+	foreach ($airport_airport_array as $airport_item)
75 75
 	{
76 76
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
77 77
 	}
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	print '</thead>';
127 127
 	print '<tbody>';
128 128
 	$i = 1;
129
-	foreach($airport_airport_array as $airport_item)
129
+	foreach ($airport_airport_array as $airport_item)
130 130
 	{
131 131
 		print '<tr>';
132 132
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-airline-country.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,9 @@
 block discarded – undo
24 24
     	print '<option></option>';
25 25
     	$Stats = new Stats();
26 26
     	$aircraft_types = $Stats->getAllAircraftTypes();
27
-    	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
+    	if (empty($aircraft_types)) {
28
+    		$aircraft_types = $Spotter->getAllAircraftTypes();
29
+    	}
28 30
     	foreach($aircraft_types as $aircrafttype)
29 31
     	{
30 32
     		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 	header('Location: '.$globalURL.'/aircraft');
10 10
 	die();
11 11
 }
12
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines by Country from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Airlines by Country from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
     
21 21
 	print '<div class="select-item">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
     	$Stats = new Stats();
26 26
     	$aircraft_types = $Stats->getAllAircraftTypes();
27 27
     	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
28
-    	foreach($aircraft_types as $aircrafttype)
28
+    	foreach ($aircraft_types as $aircrafttype)
29 29
     	{
30
-    		if($aircraft_type == $aircrafttype['aircraft_icao'])
30
+    		if ($aircraft_type == $aircrafttype['aircraft_icao'])
31 31
     		{
32 32
     			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
33 33
     		} else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	include('aircraft-sub-menu.php');
54 54
 	print '<div class="column">';
55 55
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
56
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
57 57
 
58 58
 	$airline_array = $Spotter->countAllAirlineCountriesByAircraft($aircraft_type);
59 59
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
63 63
 	print 'var series = [';
64 64
         $country_data = '';
65
-	foreach($airline_array as $airline_item)
65
+	foreach ($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
68 68
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		print '</thead>';
110 110
 		print '<tbody>';
111 111
 		$i = 1;
112
-		foreach($airline_array as $airline_item)
112
+		foreach ($airline_array as $airline_item)
113 113
 		{
114 114
 			print '<tr>';
115 115
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 	print '<div class="select-item">';
22 22
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
23 23
 	print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
24
-    	print '<option></option>';
25
-    	$Stats = new Stats();
26
-    	$aircraft_types = $Stats->getAllAircraftTypes();
27
-    	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
28
-    	foreach($aircraft_types as $aircrafttype)
29
-    	{
30
-    		if($aircraft_type == $aircrafttype['aircraft_icao'])
31
-    		{
32
-    			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
33
-    		} else {
34
-    			print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
35
-    		}
24
+		print '<option></option>';
25
+		$Stats = new Stats();
26
+		$aircraft_types = $Stats->getAllAircraftTypes();
27
+		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
28
+		foreach($aircraft_types as $aircrafttype)
29
+		{
30
+			if($aircraft_type == $aircrafttype['aircraft_icao'])
31
+			{
32
+				print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
33
+			} else {
34
+				print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
35
+			}
36 36
 	}
37 37
 	print '</select>';
38 38
 	print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>';
@@ -61,18 +61,18 @@  discard block
 block discarded – undo
61 61
 	print '<script type="text/javascript" src="'.$globalURL.'/js/datamaps.world.min.js"></script>';
62 62
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
63 63
 	print 'var series = [';
64
-        $country_data = '';
64
+		$country_data = '';
65 65
 	foreach($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
68 68
 	}
69
-        $country_data = substr($country_data, 0, -1);
70
-        print $country_data;
71
-        print '];';
72
-        print 'var dataset = {};var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
73
-        print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#EFEFFF","#001830"]);';
74
-        print 'series.forEach(function(item){var iso = item[0], value = item[1]; dataset[iso] = { numberOfThings: value, fillColor: paletteScale(value) };});';
75
-        print 'new Datamap({
69
+		$country_data = substr($country_data, 0, -1);
70
+		print $country_data;
71
+		print '];';
72
+		print 'var dataset = {};var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);';
73
+		print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#EFEFFF","#001830"]);';
74
+		print 'series.forEach(function(item){var iso = item[0], value = item[1]; dataset[iso] = { numberOfThings: value, fillColor: paletteScale(value) };});';
75
+		print 'new Datamap({
76 76
 	    element: document.getElementById("chartCountry"),
77 77
 	    projection: "mercator", // big world map
78 78
 	    fills: { defaultFill: "#F5F5F5" },
Please login to merge, or discard this patch.
aircraft-detailed.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
 		print '<div class="select-item">';
43 43
 		print '<form action="'.$globalURL.'/aircraft" method="post">';
44 44
 		print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
45
-    		print '<option></option>';
46
-    		$Stats = new Stats();
45
+			print '<option></option>';
46
+			$Stats = new Stats();
47 47
 		$aircraft_types = $Stats->getAllAircraftTypes();
48 48
 		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
49 49
 		foreach($aircraft_types as $aircrafttype)
@@ -54,20 +54,20 @@  discard block
 block discarded – undo
54 54
 			} else {
55 55
 				print '<option value="'.$aircrafttype['aircraft_icao'].'">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
56 56
 			}
57
-    		}
58
-    		print '</select>';
59
-	    	print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>';
57
+			}
58
+			print '</select>';
59
+			print '<button type="submit"><i class="fa fa-angle-double-right"></i></button>';
60 60
 	  	print '</form>';
61 61
 	  	print '</div>';
62 62
 	    
63 63
 		if ($aircraft_type != "NA")
64 64
 		{
65
-	    		print '<div class="info column">';
66
-	      		print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>';
67
-	      		print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>';
68
-	      		print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; 
69
-	      		if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
70
-	    		print '</div>';
65
+				print '<div class="info column">';
66
+		  		print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>';
67
+		  		print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>';
68
+		  		print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; 
69
+		  		if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
70
+				print '</div>';
71 71
 		} else {
72 72
 			print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>';
73 73
 		}
Please login to merge, or discard this patch.
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
@@ -45,7 +45,9 @@  discard block
 block discarded – undo
45 45
     		print '<option></option>';
46 46
     		$Stats = new Stats();
47 47
 		$aircraft_types = $Stats->getAllAircraftTypes();
48
-		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
48
+		if (empty($aircraft_types)) {
49
+			$aircraft_types = $Spotter->getAllAircraftTypes();
50
+		}
49 51
 		foreach($aircraft_types as $aircrafttype)
50 52
 		{
51 53
 			if($aircraft_type == $aircrafttype['aircraft_icao'])
@@ -66,7 +68,9 @@  discard block
 block discarded – undo
66 68
 	      		print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>';
67 69
 	      		print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>';
68 70
 	      		print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; 
69
-	      		if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
71
+	      		if (isset($spotter_array[0]['aircraft_manufacturer'])) {
72
+	      			print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>';
73
+	      		}
70 74
 	    		print '</div>';
71 75
 		} else {
72 76
 			print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>';
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@  discard block
 block discarded – undo
5 5
 require_once('require/class.Language.php');
6 6
 $Spotter = new Spotter();
7 7
 
8
-if (!isset($_GET['aircraft_type'])){
8
+if (!isset($_GET['aircraft_type'])) {
9 9
 	header('Location: '.$globalURL.'/aircraft');
10 10
 } else {
11 11
 	//calculuation for the pagination
12
-	if(!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2)
12
+	if (!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2)
13 13
 	{
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
@@ -28,15 +28,15 @@  discard block
 block discarded – undo
28 28
 	$limit_previous_1 = $limit_start - $absolute_difference;
29 29
 	$limit_previous_2 = $limit_end - $absolute_difference;
30 30
 	
31
-	$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
31
+	$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/aircraft/'.$aircraft_type;
33 33
 	
34
-	$sort = htmlspecialchars(filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING));
35
-	$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,$limit_start.",".$absolute_difference, $sort);
34
+	$sort = htmlspecialchars(filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING));
35
+	$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, $limit_start.",".$absolute_difference, $sort);
36 36
 	
37 37
 	if (!empty($spotter_array))
38 38
 	{
39
-		$title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
39
+		$title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
40 40
 		require_once('header.php');
41 41
 	    
42 42
 		print '<div class="select-item">';
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
     		$Stats = new Stats();
47 47
 		$aircraft_types = $Stats->getAllAircraftTypes();
48 48
 		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
49
-		foreach($aircraft_types as $aircrafttype)
49
+		foreach ($aircraft_types as $aircrafttype)
50 50
 		{
51
-			if($aircraft_type == $aircrafttype['aircraft_icao'])
51
+			if ($aircraft_type == $aircrafttype['aircraft_icao'])
52 52
 			{
53 53
 				print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
54 54
 			} else {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		include('aircraft-sub-menu.php');
76 76
 	        
77 77
 		print '<div class="table column">';
78
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
78
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
79 79
 		  
80 80
 		include('table-output.php');
81 81
 		  
Please login to merge, or discard this patch.
airline-statistics-arrival-airport-country.php 3 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24
-	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
24
+	if (empty($airline_names)) {
25
+		$airline_names = $Spotter->getAllAirlineNames();
26
+	}
25 27
 	foreach($airline_names as $airline_name)
26 28
 	{
27 29
 		if($_GET['airline'] == $airline_name['airline_icao'])
@@ -43,8 +45,7 @@  discard block
 block discarded – undo
43 45
 			if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif'))
44 46
 			{
45 47
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
46
-			}
47
-			elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48
+			} elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48 49
 			{
49 50
 				print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
50 51
 			}
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airline'])) {
7
-        header('Location: '.$globalURL.'/airline');
8
-        die();
7
+		header('Location: '.$globalURL.'/airline');
8
+		die();
9 9
 }
10 10
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Arrival Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($_GET['airline'] == $airline_name['airline_icao'])
27
+		if ($_GET['airline'] == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirline($airline);
67 67
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
68 68
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
71 71
 	print 'var series = [';
72 72
 	$country_data = '';
73
-	foreach($airport_country_array as $airport_item)
73
+	foreach ($airport_country_array as $airport_item)
74 74
 	{
75 75
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
76 76
 	}
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 		print '</thead>';
119 119
 		print '<tbody>';
120 120
 		$i = 1;
121
-		foreach($airport_country_array as $airport_item)
121
+		foreach ($airport_country_array as $airport_item)
122 122
 		{
123 123
 			print '<tr>';
124 124
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airline-statistics-aircraft.php 3 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24
-	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
24
+	if (empty($airline_names)) {
25
+		$airline_names = $Spotter->getAllAirlineNames();
26
+	}
25 27
 	foreach($airline_names as $airline_name)
26 28
 	{
27 29
 		if($airline == $airline_name['airline_icao'])
@@ -43,8 +45,7 @@  discard block
 block discarded – undo
43 45
 		if ($globalIVAO && @getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif'))
44 46
 		{
45 47
 			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.gif" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
46
-		}
47
-		elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48
+		} elseif (@getimagesize($globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png'))
48 49
 		{
49 50
 			print '<img src="'.$globalURL.'/images/airlines/'.$spotter_array[0]['airline_icao'].'.png" alt="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" title="'.$spotter_array[0]['airline_name'].' ('.$spotter_array[0]['airline_icao'].')" class="logo" />';
50 51
 		}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Aircraft from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($airline == $airline_name['airline_icao'])
27
+		if ($airline == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Aircraft").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 
67 67
 	$aircraft_array = $Spotter->countAllAircraftTypesByAirline($airline);
68 68
 	if (!empty($aircraft_array))
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		print '</thead>';
78 78
 		print '<tbody>';
79 79
 		$i = 1;
80
-		foreach($aircraft_array as $aircraft_item)
80
+		foreach ($aircraft_array as $aircraft_item)
81 81
 		{
82 82
 			print '<tr>';
83 83
 			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
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airline'])) {
7
-        header('Location: '.$globalURL.'/airline');
8
-        die();
7
+		header('Location: '.$globalURL.'/airline');
8
+		die();
9 9
 }
10 10
 $airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
aircraft-statistics-airline.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 	header('Location: '.$globalURL.'/aircraft');
9 9
 	die();
10 10
 }
11
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
12 12
 $Spotter = new Spotter();
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Airlines from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26 26
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
-	foreach($aircraft_types as $aircrafttype)
27
+	foreach ($aircraft_types as $aircrafttype)
28 28
 	{
29
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
29
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
30 30
 		{
31 31
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32 32
 		} else {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	include('aircraft-sub-menu.php');
53 53
 	print '<div class="column">';
54 54
 	print '<h2>'._("Most Common Airlines").'</h2>';
55
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
55
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
56 56
 
57 57
 	$airline_array = $Spotter->countAllAirlinesByAircraft($aircraft_type);
58 58
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		print '</thead>';
71 71
 		print '<tbody>';
72 72
 		$i = 1;
73
-		foreach($airline_array as $airline_item)
73
+		foreach ($airline_array as $airline_item)
74 74
 		{
75 75
 			print '<tr>';
76 76
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-route.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/aircraft');
8 8
         die();
9 9
 }
10
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
13 13
 
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$aircraft_types = $Stats->getAllAircraftTypes();
25 25
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
-	foreach($aircraft_types as $aircrafttype)
26
+	foreach ($aircraft_types as $aircrafttype)
27 27
 	{
28
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
28
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
29 29
 		{
30 30
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
31 31
 		} else {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('aircraft-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Routes").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
55 55
 
56 56
 	$route_array = $Spotter->countAllRoutesByAircraft($aircraft_type);
57 57
 	if (!empty($route_array))
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		print '</thead>';
69 69
 		print '<tbody>';
70 70
 		$i = 1;
71
-		foreach($route_array as $route_item)
71
+		foreach ($route_array as $route_item)
72 72
 		{
73 73
 			print '<tr>';
74 74
 			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
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_type'])) {
7
-        header('Location: '.$globalURL.'/aircraft');
8
-        die();
7
+		header('Location: '.$globalURL.'/aircraft');
8
+		die();
9 9
 }
10 10
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport-country.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_type'])) {
7
-        header('Location: '.$globalURL.'/aircraft');
8
-        die();
7
+		header('Location: '.$globalURL.'/aircraft');
8
+		die();
9 9
 }
10 10
 
11 11
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 
11
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
12 12
 $Spotter = new Spotter();
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26 26
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
-	foreach($aircraft_types as $aircrafttype)
27
+	foreach ($aircraft_types as $aircrafttype)
28 28
 	{
29
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
29
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
30 30
 		{
31 31
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32 32
 		} else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	include('aircraft-sub-menu.php');
54 54
 	print '<div class="column">';
55 55
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
56
-  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56
+  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
57 57
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByAircraft($aircraft_type);
58 58
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
59 59
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
62 62
 	print 'var series = [';
63 63
 	$country_data = '';
64
-	foreach($airport_country_array as $airport_item)
64
+	foreach ($airport_country_array as $airport_item)
65 65
 	{
66 66
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
67 67
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		print '</thead>';
110 110
 		print '<tbody>';
111 111
 		$i = 1;
112
-		foreach($airport_country_array as $airport_item)
112
+		foreach ($airport_country_array as $airport_item)
113 113
 		{
114 114
 			print '<tr>';
115 115
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.