Completed
Push — master ( e6c083...dab432 )
by Yannick
31:25
created
aircraft-statistics-registration.php 1 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 Aircraft by Registration from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Aircraft by Registration 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="get">';
@@ -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 Aircraft by Registration").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from aircraft type <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 aircraft by registration of flights from aircraft type <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
55 55
 
56 56
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByAircraft($aircraft_type);
57 57
 	if (!empty($aircraft_array))
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		print '</thead>';
69 69
 		print '<tbody>';
70 70
 		$i = 1;
71
-		foreach($aircraft_array as $aircraft_item)
71
+		foreach ($aircraft_array as $aircraft_item)
72 72
 		{
73 73
 			print '<tr>';
74 74
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-airline-country.php 1 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="get">';
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-statistics-airline.php 1 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="get">';
@@ -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 1 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="get">';
@@ -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.
marine-type-detailed.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -62,12 +62,12 @@
 block discarded – undo
62 62
 	*/
63 63
 		//if ($aircraft_type != "NA")
64 64
 		//{
65
-	    		print '<div class="info column">';
66
-	      		print '<h1>'.$spotter_array[0]['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]['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.
Spacing   +8 added lines, -8 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
 $Marine = new Marine();
7 7
 $type = 'marine';
8
-if (!isset($_GET['type'])){
8
+if (!isset($_GET['type'])) {
9 9
 	header('Location: '.$globalURL.'/');
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,14 +28,14 @@  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
-	$marine_type = filter_input(INPUT_GET,'type',FILTER_SANITIZE_STRING);
31
+	$marine_type = filter_input(INPUT_GET, 'type', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/marine/type/'.$marine_type;
33
-	$sort = htmlspecialchars(filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING));
34
-	$spotter_array = $Marine->getMarineDataByType($marine_type,$limit_start.",".$absolute_difference, $sort);
33
+	$sort = htmlspecialchars(filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING));
34
+	$spotter_array = $Marine->getMarineDataByType($marine_type, $limit_start.",".$absolute_difference, $sort);
35 35
 	
36 36
 	if (!empty($spotter_array))
37 37
 	{
38
-		$title = sprintf(_("Detailed View for %s"),$spotter_array[0]['type']);
38
+		$title = sprintf(_("Detailed View for %s"), $spotter_array[0]['type']);
39 39
 		require_once('header.php');
40 40
 	
41 41
 	/*    
@@ -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 marine of type <strong>%s</strong>."),$spotter_array[0]['type']).'</p>';
78
+		print '<p>'.sprintf(_("The table below shows the detailed information of all marine of type <strong>%s</strong>."), $spotter_array[0]['type']).'</p>';
79 79
 		  
80 80
 		include('table-output.php');
81 81
 		  
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 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];
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport.php 1 patch
Spacing   +8 added lines, -8 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 Departure Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Departure Airports for %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="get">';
@@ -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 {
@@ -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 Departure Airports").'</h2>';
55
-	print '<p>'.sprintf(_("The statistic below shows all departure airports 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 all departure airports of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
56 56
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type);
57 57
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
58 58
 	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 '<script>';
62 62
 	print 'var series = [';
63 63
 	$airport_data = '';
64
-	foreach($airport_airport_array as $airport_item)
64
+	foreach ($airport_airport_array as $airport_item)
65 65
 	{
66 66
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_name'].' ('.$airport_item['airport_departure_icao'].')",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
67 67
 	}
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 	print '</thead>';
117 117
 	print '<tbody>';
118 118
 	$i = 1;
119
-	foreach($airport_airport_array as $airport_item)
119
+	foreach ($airport_airport_array as $airport_item)
120 120
 	{
121 121
 		print '<tr>';
122 122
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-sub-menu.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
 					$Spotter = new Spotter();
29 29
 					$alliances = $Spotter->getAllAllianceNames();
30 30
 					if (!empty($alliances)) {
31
-						foreach($alliances as $alliance) {
32
-							if (isset($airline_icao) && str_replace('_',' ',str_replace('alliance_','',$airline_icao)) == $alliance['alliance']) {
33
-								print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'" selected>'.$alliance['alliance'].'</option>';
31
+						foreach ($alliances as $alliance) {
32
+							if (isset($airline_icao) && str_replace('_', ' ', str_replace('alliance_', '', $airline_icao)) == $alliance['alliance']) {
33
+								print '<option value="alliance_'.str_replace(' ', '_', $alliance['alliance']).'" selected>'.$alliance['alliance'].'</option>';
34 34
 							} else {
35
-								print '<option value="alliance_'.str_replace(' ','_',$alliance['alliance']).'">'.$alliance['alliance'].'</option>';
35
+								print '<option value="alliance_'.str_replace(' ', '_', $alliance['alliance']).'">'.$alliance['alliance'].'</option>';
36 36
 							}
37 37
 						}
38 38
 						print '<option disabled>──────────</option>';
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 					$Stats = new Stats();
41 41
 					if (!isset($filter_name)) $filter_name = '';
42 42
 					$airlines = $Stats->getAllAirlineNames($filter_name);
43
-					foreach($airlines as $airline) {
43
+					foreach ($airlines as $airline) {
44 44
 						if (isset($airline_icao) && $airline_icao == $airline['airline_icao']) {
45 45
 							print '<option value="'.$airline['airline_icao'].'" selected>'.$airline['airline_name'].'</option>';
46 46
 						} else {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	if (!isset($type) || $type == 'aircraft') {
64 64
 ?>
65 65
 		<li class="dropdown">
66
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" >
66
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" >
67 67
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
68 68
 		    </a>
69 69
 		    <ul class="dropdown-menu">
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		    </ul>
75 75
 		</li>
76 76
 		<li class="dropdown">
77
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
77
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#">
78 78
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
79 79
 		    </a>
80 80
 		    <ul class="dropdown-menu" role="menu">
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 		    </ul>
91 91
 		</li>
92 92
 		<li class="dropdown">
93
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
93
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
94 94
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
95 95
 		    </a>
96 96
 		    <ul class="dropdown-menu" role="menu">
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		    </ul>
102 102
 		</li>
103 103
 		<li class="dropdown">
104
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
104
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#">
105 105
 		      <?php echo _("Route"); ?> <span class="caret"></span>
106 106
 		    </a>
107 107
 		    <ul class="dropdown-menu" role="menu">
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 		    </ul>
111 111
 		</li>
112 112
 		<li class="dropdown">
113
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
113
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#">
114 114
 		      <?php echo _("Date &amp; Time"); ?> <span class="caret"></span>
115 115
 		    </a>
116 116
 		    <ul class="dropdown-menu" role="menu">
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 		    if (isset($globalAccidents) && $globalAccidents && (!isset($airline_icao) || $airline_icao == '' || $airline_icao == 'all')) {
123 123
 		?>
124 124
 		<li class="dropdown">
125
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
125
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#">
126 126
 		      <?php echo _("Fatalities"); ?> <span class="caret"></span>
127 127
 		    </a>
128 128
 		    <ul class="dropdown-menu" role="menu">
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 	} elseif ($type == 'marine' || $type == 'tracker') {
138 138
 ?>
139 139
 		<li class="dropdown">
140
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
140
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#">
141 141
 			<?php echo _("Date &amp; Time"); ?> <span class="caret"></span>
142 142
 		    </a>
143 143
 		    <ul class="dropdown-menu" role="menu">
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 	if (!isset($type) || $type == 'aircraft') {
162 162
 ?>
163 163
 		<li class="dropdown">
164
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#" >
164
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-aircraft" || strtolower($current_page) == "statistics-registration" || strtolower($current_page) == "statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#" >
165 165
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
166 166
 		    </a>
167 167
 		    <ul class="dropdown-menu">
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 		    </ul>
173 173
 		</li>
174 174
 		<li class="dropdown">
175
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
175
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airline" || strtolower($current_page) == "statistics-airline-country" || strtolower($current_page) == "statistics-callsign") { print 'active'; } ?>" data-toggle="dropdown" href="#">
176 176
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
177 177
 		    </a>
178 178
 		    <ul class="dropdown-menu" role="menu">
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		    </ul>
189 189
 		</li>
190 190
 		<li class="dropdown">
191
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
191
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-airport-departure" || strtolower($current_page) == "statistics-airport-departure-country" || strtolower($current_page) == "statistics-airport-arrival" || strtolower($current_page) == "statistics-airport-arrival-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
192 192
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
193 193
 		    </a>
194 194
 		    <ul class="dropdown-menu" role="menu">
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		</li>
201 201
 		<!--
202 202
 		<li class="dropdown">
203
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
203
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-route-airport" || strtolower($current_page) == "statistics-route-waypoint") { print 'active'; } ?>" data-toggle="dropdown" href="#">
204 204
 		      <?php echo _("Route"); ?> <span class="caret"></span>
205 205
 		    </a>
206 206
 		    <ul class="dropdown-menu" role="menu">
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 		-->
212 212
 		<!--
213 213
 		<li class="dropdown">
214
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
214
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#">
215 215
 		      <?php echo _("Date &amp; Time"); ?> <span class="caret"></span>
216 216
 		    </a>
217 217
 		    <ul class="dropdown-menu" role="menu">
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		?>
226 226
 		<!--
227 227
 		<li class="dropdown">
228
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
228
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-fatalities-year" || strtolower($current_page) == "statistics-fatalities-month") { print 'active'; } ?>" data-toggle="dropdown" href="#">
229 229
 		      <?php echo _("Fatalities"); ?> <span class="caret"></span>
230 230
 		    </a>
231 231
 		    <ul class="dropdown-menu" role="menu">
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 	} elseif ($type == 'marine' || $type == 'tracker') {
242 242
 ?>
243 243
 		<li class="dropdown">
244
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
244
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "statistics-date" || strtolower($current_page) == "statistics-time") { print 'active'; } ?>" data-toggle="dropdown" href="#">
245 245
 		      <?php echo _("Date &amp; Time"); ?> <span class="caret"></span>
246 246
 		    </a>
247 247
 		    <ul class="dropdown-menu" role="menu">
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport-country.php 1 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="get">';
@@ -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.
statistics-type.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
 
8 8
 $type = 'marine';
9 9
 if (!isset($filter_name)) $filter_name = '';
10
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
11
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
11
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
12 12
 
13 13
 require_once('header.php');
14 14
 
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
 	</div>
21 21
 	<p>'._("Below are the <strong>Top 10</strong> most common vessel types.").'</p>';
22 22
 	  
23
-$type_array = $Marine->countAllMarineTypes(true,0,'',$filter_name,$year,$month);
23
+$type_array = $Marine->countAllMarineTypes(true, 0, '', $filter_name, $year, $month);
24 24
 print '<div id="chart" class="chart" width="100%"></div><script>';
25 25
 $type_data = '';
26
-foreach($type_array as $type_item)
26
+foreach ($type_array as $type_item)
27 27
 {
28 28
 	$type_data .= '["'.$type_item['marine_type'].'",'.$type_item['marine_type_count'].'],';
29 29
 }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	print '</thead>';
49 49
 	print '<tbody>';
50 50
 	$i = 1;
51
-	foreach($type_array as $type_item)
51
+	foreach ($type_array as $type_item)
52 52
 	{
53 53
 		print '<tr>';
54 54
 		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
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Vessel Type");
7 7
 
8 8
 $type = 'marine';
9
-if (!isset($filter_name)) $filter_name = '';
9
+if (!isset($filter_name)) {
10
+	$filter_name = '';
11
+}
10 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
11 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
12 14
 
Please login to merge, or discard this patch.