Completed
Push — master ( fcdbb2...60e2d7 )
by Yannick
29:41
created
pilot-statistics-arrival-airport.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 Arrival Airports of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Arrival Airports 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,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
33
-	$airport_airport_array = $Spotter->countAllArrivalAirportsByPilot($pilot,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33
+	$airport_airport_array = $Spotter->countAllArrivalAirportsByPilot($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>';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	print '<script>';
39 39
 	print 'var series = [';
40 40
 	$airport_data = '';
41
-	foreach($airport_airport_array as $airport_item)
41
+	foreach ($airport_airport_array as $airport_item)
42 42
 	{
43 43
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
44 44
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	print '</thead>';
94 94
 	print '<tbody>';
95 95
 	$i = 1;
96
-	foreach($airport_airport_array as $airport_item)
96
+	foreach ($airport_airport_array as $airport_item)
97 97
 	{
98 98
 		print '<tr>';
99 99
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
owner-statistics-departure-airport.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['owner'])) {
6
-        header('Location: '.$globalURL.'/owner');
7
-        die();
6
+		header('Location: '.$globalURL.'/owner');
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->getSpotterDataByOwner($owner,"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
-$owner = urldecode(filter_input(INPUT_GET,'owner',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
+$owner = urldecode(filter_input(INPUT_GET, 'owner', 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->getSpotterDataByOwner($owner,"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->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Departure Airports of %s"),$spotter_array[0]['aircraft_owner']);
21
+	$title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['aircraft_owner']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	include('owner-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>';
33
-	$airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>';
33
+	$airport_airport_array = $Spotter->countAllDepartureAirportsByOwner($owner, $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>';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	print '<script>';
39 39
 	print 'var series = [';
40 40
 	$airport_data = '';
41
-	foreach($airport_airport_array as $airport_item)
41
+	foreach ($airport_airport_array as $airport_item)
42 42
 	{
43 43
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
44 44
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	print '</thead>';
94 94
 	print '<tbody>';
95 95
 	$i = 1;
96
-	foreach($airport_airport_array as $airport_item)
96
+	foreach ($airport_airport_array as $airport_item)
97 97
 	{
98 98
 		print '<tr>';
99 99
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
pilot-statistics-arrival-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 Arrival Airports by Country of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Arrival Airports by Country 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,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
33
-	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByPilot($pilot,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33
+	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByPilot($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['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_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-route.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   +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 Routes of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Routes 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 Routes").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common routes from flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33 33
 
34
-	$route_array = $Spotter->countAllRoutesByPilot($pilot,$filter);
34
+	$route_array = $Spotter->countAllRoutesByPilot($pilot, $filter);
35 35
 	if (!empty($route_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($route_array as $route_item)
49
+		foreach ($route_array as $route_item)
50 50
 		{
51 51
 			print '<tr>';
52 52
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
pilot-statistics-departure-airport.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 of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Departure Airports 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,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
33
-	$airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($pilot,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33
+	$airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($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>';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	print '<script>';
39 39
 	print 'var series = [';
40 40
 	$airport_data = '';
41
-	foreach($airport_airport_array as $airport_item)
41
+	foreach ($airport_airport_array as $airport_item)
42 42
 	{
43 43
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
44 44
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	print '</thead>';
94 94
 	print '<tbody>';
95 95
 	$i = 1;
96
-	foreach($airport_airport_array as $airport_item)
96
+	foreach ($airport_airport_array as $airport_item)
97 97
 	{
98 98
 		print '<tr>';
99 99
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
owner-statistics-arrival-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['owner'])) {
6
-        header('Location: '.$globalURL.'/owner');
7
-        die();
6
+		header('Location: '.$globalURL.'/owner');
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->getSpotterDataByOwner($owner,"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
-$owner = urldecode(filter_input(INPUT_GET,'owner',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
+$owner = urldecode(filter_input(INPUT_GET, 'owner', 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->getSpotterDataByOwner($owner,"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->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['aircraft_owner']);
21
+	$title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['aircraft_owner']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
@@ -29,15 +29,15 @@  discard block
 block discarded – undo
29 29
 	include('owner-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>';
33
-	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByOwner($owner,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>';
33
+	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByOwner($owner, $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['airport_arrival_country_iso3'].'",'.$airport_item['airport_arrival_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-aircraft.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['owner'])) {
6
-        header('Location: '.$globalURL.'/owner');
7
-        die();
6
+		header('Location: '.$globalURL.'/owner');
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
 if ($sort != '') {
18 22
 	$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
19 23
 } else {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,22 +7,22 @@  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));
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17 17
 if ($sort != '') {
18
-	$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
18
+	$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
19 19
 } else {
20
-	$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", '',$filter);
20
+	$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", '', $filter);
21 21
 }
22 22
 
23 23
 if (!empty($spotter_array))
24 24
 {
25
-	$title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['pilot_name']);
25
+	$title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['pilot_name']);
26 26
 	require_once('header.php');
27 27
 	print '<div class="info column">';
28 28
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 	include('pilot-sub-menu.php');
34 34
 	print '<div class="column">';
35 35
 	print '<h2>'._("Most Common Aircraft").'</h2>';
36
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
36
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
37 37
 
38
-	$aircraft_array = $Spotter->countAllAircraftTypesByPilot($pilot,$filter);
38
+	$aircraft_array = $Spotter->countAllAircraftTypesByPilot($pilot, $filter);
39 39
 	if (!empty($aircraft_array))
40 40
 	{
41 41
 		print '<div class="table-responsive">';
@@ -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.
owner-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['owner'])) {
6
-        header('Location: '.$globalURL.'/owner');
7
-        die();
6
+		header('Location: '.$globalURL.'/owner');
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->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
18 22
 
19 23
 if (!empty($spotter_array))
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
-$owner = urldecode(filter_input(INPUT_GET,'owner',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
+$owner = urldecode(filter_input(INPUT_GET, 'owner', 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->getSpotterDataByOwner($owner,"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->getSpotterDataByOwner($owner, "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]['aircraft_owner']);
21
+	$title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['aircraft_owner']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	include('owner-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]['aircraft_owner']).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>';
33 33
 
34
-	$airline_array = $Spotter->countAllAirlinesByOwner($owner,$filter);
34
+	$airline_array = $Spotter->countAllAirlinesByOwner($owner, $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.
pilot.php 2 patches
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,9 @@  discard block
 block discarded – undo
31 31
 			}
32 32
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
33 33
 		}
34
-		if ($firstLetter != "'") $previous = $firstLetter;
34
+		if ($firstLetter != "'") {
35
+			$previous = $firstLetter;
36
+		}
35 37
 	}
36 38
 	print '</div>';
37 39
 	$previous = null;
@@ -46,10 +48,15 @@  discard block
 block discarded – undo
46 48
 				}
47 49
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
48 50
 			}
49
-			if ($firstLetter != "'") $previous = $firstLetter;
51
+			if ($firstLetter != "'") {
52
+				$previous = $firstLetter;
53
+			}
50 54
 			print '<div class="alphabet-item">';
51
-			if (isset($value['pilot_id']) && $value['pilot_id'] != '') print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')';
52
-			else print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name'];
55
+			if (isset($value['pilot_id']) && $value['pilot_id'] != '') {
56
+				print '<a href="'.$globalURL.'/pilot/'.$value['pilot_id'].'">'.$value['pilot_name'].' ('.$value['pilot_id'].')';
57
+			} else {
58
+				print '<a href="'.$globalURL.'/pilot/'.$value['pilot_name'].'">'.$value['pilot_name'];
59
+			}
53 60
 			print '</a>';
54 61
 			print '</div>';
55 62
 		}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,10 +7,10 @@  discard block
 block discarded – undo
7 7
 
8 8
 if (isset($_POST['pilot']))
9 9
 {
10
-	header('Location: '.$globalURL.'/pilot/'.filter_input(INPUT_POST,'pilot',FILTER_SANITIZE_STRING));
10
+	header('Location: '.$globalURL.'/pilot/'.filter_input(INPUT_POST, 'pilot', FILTER_SANITIZE_STRING));
11 11
 //} else if (isset($_GET['airport'])){
12 12
 } else {
13
-	$Spotter= new Spotter();
13
+	$Spotter = new Spotter();
14 14
 	$Stats = new Stats();
15 15
 	$Common = new Common();
16 16
 	$title = _("Pilots");
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	//ksort($pilot_names);
25 25
 	$previous = null;
26 26
 	print '<div class="alphabet-legend">';
27
-	foreach($pilot_names as $value) {
27
+	foreach ($pilot_names as $value) {
28 28
 		$firstLetter = strtoupper($Common->replace_mb_substr($value['pilot_name'], 0, 1));
29
-		if($previous !== $firstLetter && $firstLetter != "'")
29
+		if ($previous !== $firstLetter && $firstLetter != "'")
30 30
 		{
31
-			if ($previous !== null){
31
+			if ($previous !== null) {
32 32
 				print ' | ';
33 33
 			}
34 34
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -37,13 +37,13 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 	print '</div>';
39 39
 	$previous = null;
40
-	foreach($pilot_names as $value) {
40
+	foreach ($pilot_names as $value) {
41 41
 		$firstLetter = strtoupper($Common->replace_mb_substr($value['pilot_name'], 0, 1));
42 42
 		if ($firstLetter != "")
43 43
 		{
44
-			if($previous !== $firstLetter && $firstLetter != "'")
44
+			if ($previous !== $firstLetter && $firstLetter != "'")
45 45
 			{
46
-				if ($previous !== null){
46
+				if ($previous !== null) {
47 47
 					print '</div>';
48 48
 				}
49 49
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.