Completed
Push — master ( 699d2e...99c879 )
by Yannick
39:47
created
owner-statistics-departure-airport-country.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.SpotterArchive.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['owner'])) {
7
-        header('Location: '.$globalURL.'/owner');
8
-        die();
7
+		header('Location: '.$globalURL.'/owner');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $SpotterArchive = new SpotterArchive();
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@  discard block
 block discarded – undo
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $SpotterArchive = new SpotterArchive();
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13
-$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING));
14
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13
+$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING));
14
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
15
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
16 16
 $filter = array();
17
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
18
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
18
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
19 19
 $archive = false;
20
-$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
20
+$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
21 21
 if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) {
22 22
 	$archive = true;
23
-	$spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
23
+	$spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
24 24
 }
25 25
 if (!empty($spotter_array))
26 26
 {
27
-	$title = sprintf(_("Most Common Departure Airports by Owner of %s"),$spotter_array[0]['aircraft_owner']);
27
+	$title = sprintf(_("Most Common Departure Airports by Owner of %s"), $spotter_array[0]['aircraft_owner']);
28 28
 	require_once('header.php');
29 29
 	print '<div class="info column">';
30 30
 	print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
@@ -34,11 +34,11 @@  discard block
 block discarded – undo
34 34
 	include('owner-sub-menu.php');
35 35
 	print '<div class="column">';
36 36
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
37
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>';
37
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>';
38 38
 	if ($archive === false) {
39
-		$airport_country_array = $Spotter->countAllDepartureAirportCountriesByOwner($owner,$filter);
39
+		$airport_country_array = $Spotter->countAllDepartureAirportCountriesByOwner($owner, $filter);
40 40
 	} else {
41
-		$airport_country_array = $SpotterArchive->countAllDepartureAirportCountriesByOwner($owner,$filter);
41
+		$airport_country_array = $SpotterArchive->countAllDepartureAirportCountriesByOwner($owner, $filter);
42 42
 	}
43 43
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
44 44
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
47 47
 	print 'var series = [';
48 48
 	$country_data = '';
49
-	foreach($airport_country_array as $airport_item)
49
+	foreach ($airport_country_array as $airport_item)
50 50
 	{
51 51
 		$country_data .= '[ "'.$airport_item['airport_departure_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
52 52
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 		print '</thead>';
94 94
 		print '<tbody>';
95 95
 		$i = 1;
96
-		foreach($airport_country_array as $airport_item)
96
+		foreach ($airport_country_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.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,12 @@
 block discarded – undo
14 14
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15 15
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
16 16
 $filter = array();
17
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
18
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
+if ($year != '') {
18
+	$filter = array_merge($filter,array('year' => $year));
19
+}
20
+if ($month != '') {
21
+	$filter = array_merge($filter,array('month' => $month));
22
+}
19 23
 $archive = false;
20 24
 $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
21 25
 if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) {
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
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.SpotterArchive.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['owner'])) {
7
-        header('Location: '.$globalURL.'/owner');
8
-        die();
7
+		header('Location: '.$globalURL.'/owner');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $SpotterArchive = new SpotterArchive();
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -9,22 +9,22 @@  discard block
 block discarded – undo
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $SpotterArchive = new SpotterArchive();
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
13
-$owner = urldecode(filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING));
14
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13
+$owner = urldecode(filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING));
14
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
15
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
16 16
 $filter = array();
17
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
18
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
18
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
19 19
 $archive = false;
20
-$spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
20
+$spotter_array = $Spotter->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
21 21
 if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) {
22 22
 	$archive = true;
23
-	$spotter_array = $SpotterArchive->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
23
+	$spotter_array = $SpotterArchive->getSpotterDataByOwner($owner, "0,1", $sort, $filter);
24 24
 }
25 25
 if (!empty($spotter_array))
26 26
 {
27
-	$title = sprintf(_("Most Common Airlines of %s"),$spotter_array[0]['aircraft_owner']);
27
+	$title = sprintf(_("Most Common Airlines of %s"), $spotter_array[0]['aircraft_owner']);
28 28
 	require_once('header.php');
29 29
 	print '<div class="info column">';
30 30
 	print '<h1>'.$spotter_array[0]['aircraft_owner'].'</h1>';
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 	include('owner-sub-menu.php');
36 36
 	print '<div class="column">';
37 37
 	print '<h2>'._("Most Common Airlines").'</h2>';
38
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."),$spotter_array[0]['aircraft_owner']).'</p>';
38
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights owned by <strong>%s</strong>."), $spotter_array[0]['aircraft_owner']).'</p>';
39 39
 
40 40
 	if ($archive === false) {
41
-		$airline_array = $Spotter->countAllAirlinesByOwner($owner,$filter);
41
+		$airline_array = $Spotter->countAllAirlinesByOwner($owner, $filter);
42 42
 	} else {
43
-		$airline_array = $SpotterArchive->countAllAirlinesByOwner($owner,$filter);
43
+		$airline_array = $SpotterArchive->countAllAirlinesByOwner($owner, $filter);
44 44
 	}
45 45
 	if (!empty($airline_array))
46 46
 	{
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		print '</thead>';
57 57
 		print '<tbody>';
58 58
 		$i = 1;
59
-		foreach($airline_array as $airline_item)
59
+		foreach ($airline_array as $airline_item)
60 60
 		{
61 61
 			print '<tr>';
62 62
 			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
@@ -14,8 +14,12 @@
 block discarded – undo
14 14
 $year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
15 15
 $month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
16 16
 $filter = array();
17
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
18
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
+if ($year != '') {
18
+	$filter = array_merge($filter,array('year' => $year));
19
+}
20
+if ($month != '') {
21
+	$filter = array_merge($filter,array('month' => $month));
22
+}
19 23
 $archive = false;
20 24
 $spotter_array = $Spotter->getSpotterDataByOwner($owner,"0,1", $sort,$filter);
21 25
 if (empty($spotter_array) && isset($globalArchiveResults) && $globalArchiveResults) {
Please login to merge, or discard this patch.