Completed
Push — master ( 46434e...ad133e )
by Yannick
32:08 queued 16:03
created
aircraft.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes();
20 20
 	$previous = null;
21 21
 	print '<div class="alphabet-legend">';
22
-	foreach($aircraft_types as $value) {
22
+	foreach ($aircraft_types as $value) {
23 23
 		//$firstLetter = substr($value['aircraft_name'], 0, 1);
24 24
 		$firstLetter = substr($value['aircraft_manufacturer'], 0, 1);
25
-		if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
25
+		if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
26 26
 		{
27 27
 			if ($previous !== null) print ' | ';
28 28
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
 	}
32 32
 	print '</div>';
33 33
 	$previous = null;
34
-	foreach($aircraft_types as $value) {
34
+	foreach ($aircraft_types as $value) {
35 35
 		//$firstLetter = substr($value['aircraft_name'], 0, 1);
36 36
 		$firstLetter = substr($value['aircraft_manufacturer'], 0, 1);
37 37
 		if ($firstLetter != "")
38 38
 		{
39
-			if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
39
+			if ($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
40 40
 			{
41 41
 				if ($previous !== null) print '</div>';
42 42
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,9 @@  discard block
 block discarded – undo
16 16
 	print '<h1>'._("Aircraft Types").'</h1>';
17 17
 
18 18
 	$aircraft_types = $Stats->getAllAircraftTypes();
19
-	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') $aircraft_types = $Spotter->getAllAircraftTypes();
19
+	if (empty($aircraft_types) || $aircraft_types[0]['aircraft_manufacturer'] == '') {
20
+		$aircraft_types = $Spotter->getAllAircraftTypes();
21
+	}
20 22
 	$previous = null;
21 23
 	print '<div class="alphabet-legend">';
22 24
 	foreach($aircraft_types as $value) {
@@ -24,10 +26,14 @@  discard block
 block discarded – undo
24 26
 		$firstLetter = substr($value['aircraft_manufacturer'], 0, 1);
25 27
 		if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
26 28
 		{
27
-			if ($previous !== null) print ' | ';
29
+			if ($previous !== null) {
30
+				print ' | ';
31
+			}
28 32
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
29 33
 		}
30
-		if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter;
34
+		if ($firstLetter != '(' && $firstLetter != ')') {
35
+			$previous = $firstLetter;
36
+		}
31 37
 	}
32 38
 	print '</div>';
33 39
 	$previous = null;
@@ -38,10 +44,14 @@  discard block
 block discarded – undo
38 44
 		{
39 45
 			if($previous !== $firstLetter && $firstLetter != '(' && $firstLetter != ')')
40 46
 			{
41
-				if ($previous !== null) print '</div>';
47
+				if ($previous !== null) {
48
+					print '</div>';
49
+				}
42 50
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
43 51
 			}
44
-			if ($firstLetter != '(' && $firstLetter != ')') $previous = $firstLetter;
52
+			if ($firstLetter != '(' && $firstLetter != ')') {
53
+				$previous = $firstLetter;
54
+			}
45 55
 			print '<div class="alphabet-item">';
46 56
 			print '<a href="'.$globalURL.'/aircraft/'.$value['aircraft_icao'].'">';
47 57
 			if ($value['aircraft_name'] == '') {
Please login to merge, or discard this patch.
accident-latest.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,12 @@
 block discarded – undo
58 58
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
59 59
 	include('table-output.php');
60 60
 	print '<div class="pagination">';
61
-	if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
62
-	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
61
+	if ($limit_previous_1 >= 0) {
62
+		print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
63
+	}
64
+	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) {
65
+		print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
66
+	}
63 67
 	print '</div>';
64 68
 }
65 69
 print '</div>';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 $page_url = $globalURL.'/accident-latest';
10 10
 
11
-if(!isset($_GET['limit']))
11
+if (!isset($_GET['limit']))
12 12
 {
13 13
 	$limit_start = 0;
14 14
 	$limit_end = 25;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 print '<div class="table column">';
35 35
 print '<p>'._("The table below shows the latest Accidents.").'</p>';
36
-$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'accident');
36
+$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'accident');
37 37
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
38 38
 	include('table-output.php');
39 39
 	print '<div class="pagination">';
Please login to merge, or discard this patch.
statistics-airline-country.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,9 @@
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Stats = new Stats();
6 6
 $title = _("Statistics").' - '._("Most common Airline by Country");
7
-if (!isset($filter_name)) $filter_name = '';
7
+if (!isset($filter_name)) {
8
+	$filter_name = '';
9
+}
8 10
 require_once('header.php');
9 11
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10 12
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Airline by Country");
7 7
 if (!isset($filter_name)) $filter_name = '';
8 8
 require_once('header.php');
9
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
9
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
10
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
11 11
 include('statistics-sub-menu.php'); 
12 12
 
13 13
 print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -18,11 +18,11 @@  discard block
 block discarded – undo
18 18
 	  </div>
19 19
       <p>'._("Below are the <strong>Top 10</strong> countries that an airline belongs to.").'</p>';
20 20
 
21
-$airline_array = $Stats->countAllAirlineCountries(true,$filter_name,$year,$month);
21
+$airline_array = $Stats->countAllAirlineCountries(true, $filter_name, $year, $month);
22 22
 if (count($airline_array) > 0) {
23 23
 print '<div id="chartCountry" class="chart" width="100%"></div><script>';
24 24
 $country_data = '';
25
-foreach($airline_array as $airline_item)
25
+foreach ($airline_array as $airline_item)
26 26
 {
27 27
 	$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
28 28
 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	print '</thead>';
70 70
 	print '<tbody>';
71 71
 	$i = 1;
72
-	foreach($airline_array as $airline_item)
72
+	foreach ($airline_array as $airline_item)
73 73
 	{
74 74
 		print '<tr>';
75 75
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-airline.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
 $Stats = new Stats();
6 6
 $title = _("Statistics").' - '._("Most common Airline");
7 7
 require_once('header.php');
8
-if (!isset($filter_name)) $filter_name = '';
8
+if (!isset($filter_name)) {
9
+	$filter_name = '';
10
+}
9 11
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10 12
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
11 13
 include('statistics-sub-menu.php'); 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Airline");
7 7
 require_once('header.php');
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
10
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
9
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
10
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
11 11
 include('statistics-sub-menu.php'); 
12 12
 
13 13
 print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 	  </div>
18 18
     	<p>'._("Below are the <strong>Top 10</strong> most common airlines.").'</p>';
19 19
 
20
-$airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month);
20
+$airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month);
21 21
 print '<div id="chart" class="chart" width="100%"></div><script>';
22 22
 $airline_data = '';
23
-foreach($airline_array as $airline_item)
23
+foreach ($airline_array as $airline_item)
24 24
 {
25 25
 	$airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],';
26 26
 }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	print '</thead>';
48 48
 	print '<tbody>';
49 49
 	$i = 1;
50
-	foreach($airline_array as $airline_item)
50
+	foreach ($airline_array as $airline_item)
51 51
 	{
52 52
 		print '<tr>';
53 53
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
pilot-statistics-time.php 3 patches
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['pilot'])) {
6
-        header('Location: '.$globalURL.'/pilot');
7
-        die();
6
+		header('Location: '.$globalURL.'/pilot');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Time of Day").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33 33
 
34
-	$hour_array = $Spotter->countAllHoursByPilot($pilot,$filter);
34
+	$hour_array = $Spotter->countAllHoursByPilot($pilot, $filter);
35 35
 	print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
36 36
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
37 37
 	print '<script type="text/javascript" src="'.$globalURL.'/js/c3.min.js"></script>';
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
 	$hour_data = '';
40 40
 	$hour_cnt = '';
41 41
 	$last = 0;
42
-	foreach($hour_array as $hour_item)
42
+	foreach ($hour_array as $hour_item)
43 43
 	{
44
-		while($last != $hour_item['hour_name']) {
44
+		while ($last != $hour_item['hour_name']) {
45 45
 			$hour_data .= '"'.$last.':00",';
46 46
 			$hour_cnt .= '0,';
47 47
 			$last++;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		$hour_cnt .= $hour_item['hour_count'].',';
52 52
 	}
53 53
 	$hour_data = "['x',".substr($hour_data, 0, -1)."]";
54
-	$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]";
54
+	$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]";
55 55
 	print 'c3.generate({
56 56
 	    bindto: "#chartHour",
57 57
 	    data: {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		print '</thead>';
77 77
 		print '<tbody>';
78 78
 		$i = 1;
79
-		foreach($hour_array as $hour_item)
79
+		foreach ($hour_array as $hour_item)
80 80
 		{
81 81
 			print '<tr>';
82 82
 			print '<td>'.$hour_item['hour_name'].':00</td>';
Please login to merge, or discard this patch.
pilot-statistics-registration.php 3 patches
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['pilot'])) {
6
-        header('Location: '.$globalURL.'/pilot');
7
-        die();
6
+		header('Location: '.$globalURL.'/pilot');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Aircraft by Registration of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Aircraft by Registration of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by Registration of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33 33
 
34
-	$aircraft_array = $Spotter->countAllAircraftRegistrationByPilot($pilot,$filter);
34
+	$aircraft_array = $Spotter->countAllAircraftRegistrationByPilot($pilot, $filter);
35 35
 	
36 36
 	if (!empty($aircraft_array))
37 37
 	{
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 		print '</thead>';
48 48
 		print '<tbody>';
49 49
 		$i = 1;
50
-		foreach($aircraft_array as $aircraft_item)
50
+		foreach ($aircraft_array as $aircraft_item)
51 51
 		{
52 52
 			print '<tr>';
53 53
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-airline.php 3 patches
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['pilot'])) {
6
-        header('Location: '.$globalURL.'/pilot');
7
-        die();
6
+		header('Location: '.$globalURL.'/pilot');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Airlines").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33 33
 
34
-	$airline_array = $Spotter->countAllAirlinesByPilot($pilot,$filter);
34
+	$airline_array = $Spotter->countAllAirlinesByPilot($pilot, $filter);
35 35
 	if (!empty($airline_array))
36 36
 	{
37 37
 		print '<div class="table-responsive">';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		print '</thead>';
47 47
 		print '<tbody>';
48 48
 		$i = 1;
49
-		foreach($airline_array as $airline_item)
49
+		foreach ($airline_array as $airline_item)
50 50
 		{
51 51
 			print '<tr>';
52 52
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
pilot-statistics-departure-airport-country.php 3 patches
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['pilot'])) {
6
-        header('Location: '.$globalURL.'/pilot');
7
-        die();
6
+		header('Location: '.$globalURL.'/pilot');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Departure Airports by Owner of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Departure Airports by Owner of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
 	include('pilot-sub-menu.php');
29 29
 	print '<div class="column">';
30 30
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
31
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
31
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
32 32
 
33
-	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($pilot,$filter);
33
+	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByPilot($pilot, $filter);
34 34
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
35 35
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
36 36
 	print '<script type="text/javascript" src="'.$globalURL.'/js/datamaps.world.min.js"></script>';
37 37
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
38 38
 	print 'var series = [';
39 39
 	$country_data = '';
40
-	foreach($airport_country_array as $airport_item)
40
+	foreach ($airport_country_array as $airport_item)
41 41
 	{
42 42
 		$country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
43 43
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		print '</thead>';
85 85
 		print '<tbody>';
86 86
 		$i = 1;
87
-		foreach($airport_country_array as $airport_item)
87
+		foreach ($airport_country_array as $airport_item)
88 88
 		{
89 89
 			print '<tr>';
90 90
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
pilot-statistics-manufacturer.php 3 patches
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['pilot'])) {
6
-        header('Location: '.$globalURL.'/pilot');
7
-        die();
6
+		header('Location: '.$globalURL.'/pilot');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Aircraft Manufacturer of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Aircraft Manufacturer of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33 33
 
34
-	$manufacturers_array = $Spotter->countAllAircraftManufacturerByPilot($pilot,$filter);
34
+	$manufacturers_array = $Spotter->countAllAircraftManufacturerByPilot($pilot, $filter);
35 35
 	if (!empty($manufacturers_array))
36 36
 	{
37 37
 		print '<div class="table-responsive">';
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		print '</thead>';
45 45
 		print '<tbody>';
46 46
 		$i = 1;
47
-		foreach($manufacturers_array as $manufacturer_item)
47
+		foreach ($manufacturers_array as $manufacturer_item)
48 48
 		{
49 49
 			print '<tr>';
50 50
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,12 @@
 block discarded – undo
12 12
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13 13
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
15
+if ($year != '') {
16
+	$filter = array_merge($filter,array('year' => $year));
17
+}
18
+if ($month != '') {
19
+	$filter = array_merge($filter,array('month' => $month));
20
+}
17 21
 $spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
Please login to merge, or discard this patch.