Completed
Push — master ( 637022...8149d9 )
by Yannick
55:10 queued 27:13
created
manufacturer-statistics-airline.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $aircraft_manufacturer = urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING));
11 11
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/manufacturer');
8 8
         die();
9 9
 }
10
-$aircraft_manufacturer = urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$aircraft_manufacturer = urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 $Spotter = new Spotter();
13 13
 $manufacturer = ucwords(str_replace("-", " ", $aircraft_manufacturer));
14 14
 
15
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
15
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
16 16
 
17 17
 if (!empty($spotter_array))
18 18
 {
19
-	$title = sprintf(_("Most Common Airlines from %s"),$manufacturer);
19
+	$title = sprintf(_("Most Common Airlines from %s"), $manufacturer);
20 20
 
21 21
 	require_once('header.php');
22 22
 	print '<div class="select-item">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 	$Stats = new Stats();
26 26
 	$all_manufacturers = $Stats->getAllManufacturers();
27 27
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
28
-	foreach($all_manufacturers as $all_manufacturer)
28
+	foreach ($all_manufacturers as $all_manufacturer)
29 29
 	{
30
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
30
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
31 31
 		{
32 32
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
33 33
 		} else {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	include('manufacturer-sub-menu.php');
47 47
 	print '<div class="column">';
48 48
 	print '<h2>'._("Most Common Airlines").'</h2>';
49
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."),$manufacturer).'</p>';
49
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s</strong>."), $manufacturer).'</p>';
50 50
 	$airline_array = $Spotter->countAllAirlinesByManufacturer($manufacturer);
51 51
 	if (!empty($airline_array))
52 52
 	{
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		print '</thead>';
63 63
 		print '<tbody>';
64 64
 		$i = 1;
65
-		foreach($airline_array as $airline_item)
65
+		foreach ($airline_array as $airline_item)
66 66
 		{
67 67
 			print '<tr>';
68 68
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
ident-statistics-arrival-airport.php 2 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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  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
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Arrival Airports of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByIdent($ident);
29 29
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
30 30
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	print '<script>';
34 34
 	print 'var series = [';
35 35
 	$airport_data = '';
36
-	foreach($airport_airport_array as $airport_item)
36
+	foreach ($airport_airport_array as $airport_item)
37 37
 	{
38 38
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_name'].' ('.$airport_item['airport_arrival_icao'].')",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
39 39
 	}
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	print '</thead>';
89 89
 	print '<tbody>';
90 90
 	$i = 1;
91
-	foreach($airport_airport_array as $airport_item)
91
+	foreach ($airport_airport_array as $airport_item)
92 92
 	{
93 93
 		print '<tr>';
94 94
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-statistics-route.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
+$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))));
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13 13
 
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
14
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Routes from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Routes from %s"), $manufacturer);
19 19
 
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$all_manufacturers = $Stats->getAllManufacturers();
26 26
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
27
-	foreach($all_manufacturers as $all_manufacturer)
27
+	foreach ($all_manufacturers as $all_manufacturer)
28 28
 	{
29
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
32 32
 		} else {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	include('manufacturer-sub-menu.php');
46 46
 	print '<div class="column">';
47 47
 	print '<h2>'._("Most Common Routes").'</h2>';
48
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$manufacturer).'</p>';
48
+	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $manufacturer).'</p>';
49 49
 
50 50
 	$route_array = $Spotter->countAllRoutesByManufacturer($manufacturer);
51 51
 	if (!empty($route_array))
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		print '</thead>';
63 63
 		print '<tbody>';
64 64
 		$i = 1;
65
-		foreach($route_array as $route_item)
65
+		foreach ($route_array as $route_item)
66 66
 		{
67 67
 			print '<tr>';
68 68
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 $manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))));
Please login to merge, or discard this patch.
airport-statistics-aircraft.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.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$airport_names = $Stats->getAllAirportNames();
26
-	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26
+	if (empty($airport_names)) {
27
+		$airport_names = $Spotter->getAllAirportNames();
28
+	}
27 29
 	ksort($airport_names);
28 30
 	foreach($airport_names as $airport_name)
29 31
 	{
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 
12
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
12
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
14 14
 $airport_array = $Spotter->getAllAirportInfo($airport);
15 15
 
16 16
 if (!empty($airport_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
18
+	$title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 	$airport_names = $Stats->getAllAirportNames();
26 26
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
27 27
 	ksort($airport_names);
28
-	foreach($airport_names as $airport_name)
28
+	foreach ($airport_names as $airport_name)
29 29
 	{
30
-		if($airport == $airport_name['airport_icao'])
30
+		if ($airport == $airport_name['airport_icao'])
31 31
 		{
32 32
 			print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
33 33
 		} else {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	include('airport-sub-menu.php');
59 59
 	print '<div class="column">';
60 60
 	print '<h2>'._("Most Common Aircraft").'</h2>';
61
- 	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
61
+ 	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
62 62
 	
63 63
 	$aircraft_array = $Spotter->countAllAircraftTypesByAirport($airport);
64 64
 	if (!empty($aircraft_array))
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		print '</thead>';
74 74
 		print '<tbody>';
75 75
 		$i = 1;
76
-		foreach($aircraft_array as $aircraft_item)
76
+		foreach ($aircraft_array as $aircraft_item)
77 77
 		{
78 78
 			print '<tr>';
79 79
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-statistics-arrival-airport.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.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
12
-$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))));
13
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
12
+$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))));
13
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
14
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Arrival Airports from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Arrival Airports from %s"), $manufacturer);
19 19
 
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$all_manufacturers = $Stats->getAllManufacturers();
26 26
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
27
-	foreach($all_manufacturers as $all_manufacturer)
27
+	foreach ($all_manufacturers as $all_manufacturer)
28 28
 	{
29
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
32 32
 		} else {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	include('manufacturer-sub-menu.php');
46 46
 	print '<div class="column">';
47 47
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
48
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$manufacturer).'</p>';
48
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $manufacturer).'</p>';
49 49
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByManufacturer($manufacturer);
50 50
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
51 51
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	print '<script>';
55 55
 	print 'var series = [';
56 56
 	$airport_data = '';
57
-	foreach($airport_airport_array as $airport_item)
57
+	foreach ($airport_airport_array as $airport_item)
58 58
 	{
59 59
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
60 60
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	print '</thead>';
110 110
 	print '<tbody>';
111 111
 	$i = 1;
112
-	foreach($airport_airport_array as $airport_item)
112
+	foreach ($airport_airport_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.
date-statistics-aircraft.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,11 @@
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7 7
 $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
9
-else $spotter_array = array();
8
+if (isset($_GET['date'])) {
9
+	$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
10
+} else {
11
+	$spotter_array = array();
12
+}
10 13
 
11 14
 if (!empty($spotter_array))
12 15
 {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
8
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
9 9
 else $spotter_array = array();
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Aircraft on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13
+	$title = sprintf(_("Most Common Aircraft on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
14 14
 	require_once('header.php');
15 15
 	print '<div class="select-item">';
16 16
 	print '<form action="'.$globalURL.'/date" method="post" class="form-inline">';
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 	print '<br />';
29 29
 
30 30
 	print '<div class="info column">';
31
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
31
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
32 32
 	print '</div>';
33 33
 
34 34
 	include('date-sub-menu.php');
35 35
 	print '<div class="column">';
36 36
 	print '<h2>'._("Most Common Aircraft").'</h2>';
37
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
38 38
 	
39 39
 	$aircraft_array = $Spotter->countAllAircraftTypesByDate($date);
40 40
 	if (!empty($aircraft_array))
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		print '</thead>';
50 50
 		print '<tbody>';
51 51
 		$i = 1;
52
-		foreach($aircraft_array as $aircraft_item)
52
+		foreach ($aircraft_array as $aircraft_item)
53 53
 		{
54 54
 			print '<tr>';
55 55
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
ident-statistics-arrival-airport-country.php 2 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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
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   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  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
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Arrival Airports by Country of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Arrival Airports by Country of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByIdent($ident);
29 29
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
30 30
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>'; 
33 33
 	print 'var series = [';
34 34
 	$country_data = '';
35
-	foreach($airport_country_array as $airport_item)
35
+	foreach ($airport_country_array as $airport_item)
36 36
 	{
37 37
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
38 38
 	}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		print '</thead>';
81 81
 		print '<tbody>';
82 82
 		$i = 1;
83
-		foreach($airport_country_array as $airport_item)
83
+		foreach ($airport_country_array as $airport_item)
84 84
 		{
85 85
 			print '<tr>';
86 86
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
accident-detailed.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   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 {
11 11
 	$date = date('Y-m-d');
12 12
 } else {
13
-	$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
13
+	$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
14 14
 }
15 15
 
16
-if(!isset($_GET['limit']))
16
+if (!isset($_GET['limit']))
17 17
 {
18 18
 	$limit_start = 0;
19 19
 	$limit_end = 25;
@@ -48,25 +48,25 @@  discard block
 block discarded – undo
48 48
 print '<br />';
49 49
 
50 50
 print '<div class="info column">';
51
-if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) {
52
-	print '<h1>'.sprintf(_("Accidents from %s"),date("l F j, Y",strtotime($date))).'</h1>';
53
-} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) {
54
-	print '<h1>'.sprintf(_("Accidents from %s"),date("F, Y",strtotime($date))).'</h1>';
55
-} elseif (preg_match('/^[0-9]{4}$/',$date)) {
56
-	print '<h1>'.sprintf(_("Accidents from %s"),$date).'</h1>';
51
+if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) {
52
+	print '<h1>'.sprintf(_("Accidents from %s"), date("l F j, Y", strtotime($date))).'</h1>';
53
+} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) {
54
+	print '<h1>'.sprintf(_("Accidents from %s"), date("F, Y", strtotime($date))).'</h1>';
55
+} elseif (preg_match('/^[0-9]{4}$/', $date)) {
56
+	print '<h1>'.sprintf(_("Accidents from %s"), $date).'</h1>';
57 57
 }
58 58
 print '</div>';
59 59
 
60 60
 print '<div class="table column">';
61 61
 
62
-if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) {
63
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>';
64
-} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) {
65
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("M, Y",strtotime($date))).'</p>';
66
-} elseif (preg_match('/^[0-9]{4}$/',$date)) {
67
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),$date).'</p>';
62
+if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) {
63
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>';
64
+} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) {
65
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("M, Y", strtotime($date))).'</p>';
66
+} elseif (preg_match('/^[0-9]{4}$/', $date)) {
67
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), $date).'</p>';
68 68
 }
69
-$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'accident',$date);
69
+$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'accident', $date);
70 70
 //print_r($spotter_array);
71 71
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
72 72
 	include('table-output.php');
Please login to merge, or discard this patch.
manufacturer-statistics-arrival-airport-country.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
12
-$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING))));
13
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
12
+$manufacturer = ucwords(str_replace("-", " ", urldecode(filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING))));
13
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
14
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Arrival Airports by Country from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Arrival Airports by Country from %s"), $manufacturer);
19 19
 
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$all_manufacturers = $Stats->getAllManufacturers();
26 26
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
27
-	foreach($all_manufacturers as $all_manufacturer)
27
+	foreach ($all_manufacturers as $all_manufacturer)
28 28
 	{
29
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
32 32
 		} else {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	include('manufacturer-sub-menu.php');
46 46
 	print '<div class="column">';
47 47
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
48
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>';
48
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>';
49 49
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($manufacturer);
50 50
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
51 51
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>'; 
54 54
 	print 'var series = [';
55 55
 	$country_data = '';
56
-	foreach($airport_country_array as $airport_item)
56
+	foreach ($airport_country_array as $airport_item)
57 57
 	{
58 58
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
59 59
 	}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		print '</thead>';
102 102
 		print '<tbody>';
103 103
 		$i = 1;
104
-		foreach($airport_country_array as $airport_item)
104
+		foreach ($airport_country_array as $airport_item)
105 105
 		{
106 106
 			print '<tr>';
107 107
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.