Completed
Push — master ( 46434e...ad133e )
by Yannick
32:08 queued 16:03
created
manufacturer-statistics-departure-airport.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
 $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.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  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);
13
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
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
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Departure Airports from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25 25
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
26
-	foreach($all_manufacturers as $all_manufacturer)
26
+	foreach ($all_manufacturers as $all_manufacturer)
27 27
 	{
28
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29 29
 		{
30 30
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
31 31
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	include('manufacturer-sub-menu.php');
45 45
 	print '<div class="column">';
46 46
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer);
49 49
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
50 50
 	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 '<script>';
54 54
 	print 'var series = [';
55 55
 	$airport_data = '';
56
-	foreach($airport_airport_array as $airport_item)
56
+	foreach ($airport_airport_array as $airport_item)
57 57
 	{
58 58
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
59 59
 	}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	print '</thead>';
109 109
 	print '<tbody>';
110 110
 	$i = 1;
111
-	foreach($airport_airport_array as $airport_item)
111
+	foreach ($airport_airport_array as $airport_item)
112 112
 	{
113 113
 		print '<tr>';
114 114
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-departure-airport-country.php 3 patches
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.
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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Departure Airports by Country to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($_GET['airport'] == $airport_name['airport_icao'])
29
+		if ($_GET['airport'] == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	include('airport-sub-menu.php');
58 58
 	print '<div class="column">';
59 59
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
60
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
60
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights to <strong>%s, %s, (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
61 61
 
62 62
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirport($airport);
63 63
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>'; 
67 67
 	print 'var series = [';
68 68
 	$country_data = '';
69
-	foreach($airport_country_array as $airport_item)
69
+	foreach ($airport_country_array as $airport_item)
70 70
 	{
71 71
 		$country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
72 72
 	}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		print '</thead>';
115 115
 		print '<tbody>';
116 116
 		$i = 1;
117
-		foreach($airport_country_array as $airport_item)
117
+		foreach ($airport_country_array as $airport_item)
118 118
 		{
119 119
 			print '<tr>';
120 120
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-departure-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['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
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
@@ -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
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Departure Airports to %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($airport == $airport_name['airport_icao'])
29
+		if ($airport == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	include('airport-sub-menu.php');
57 57
 	print '<div class="column">';
58 58
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
59
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
59
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights to <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
60 60
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAirport($airport);
61 61
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
62 62
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	print '<script>';
66 66
 	print 'var series = [';
67 67
 	$airport_data = '';
68
-	foreach($airport_airport_array as $airport_item)
68
+	foreach ($airport_airport_array as $airport_item)
69 69
 	{
70 70
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
71 71
 	}
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 	print '</thead>';
121 121
 	print '<tbody>';
122 122
 	$i = 1;
123
-	foreach($airport_airport_array as $airport_item)
123
+	foreach ($airport_airport_array as $airport_item)
124 124
 	{
125 125
 		print '<tr>';
126 126
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-airline-country.php 3 patches
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.
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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Airlines by Country to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Airlines by Country to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($airport == $airport_name['airport_icao'])
29
+		if ($airport == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	include('airport-sub-menu.php');
58 58
 	print '<div class="column">';
59 59
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
60
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
60
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
61 61
 
62 62
 	$airline_array = $Spotter->countAllAirlineCountriesByAirport($airport);
63 63
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
67 67
 	print 'var series = [';
68 68
 	$country_data = '';
69
-	foreach($airline_array as $airline_item)
69
+	foreach ($airline_array as $airline_item)
70 70
 	{
71 71
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
72 72
 	}
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 		print '</thead>';
115 115
 		print '<tbody>';
116 116
 		$i = 1;
117
-		foreach($airline_array as $airline_item)
117
+		foreach ($airline_array as $airline_item)
118 118
 		{
119 119
 			print '<tr>';
120 120
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-airline.php 3 patches
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.
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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($airport == $airport_name['airport_icao'])
29
+		if ($airport == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -57,14 +57,14 @@  discard block
 block discarded – undo
57 57
 	include('airport-sub-menu.php');
58 58
 	print '<div class="column">';
59 59
 	print '<h2>'._("Most Common Airlines").'</h2>';
60
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
60
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
61 61
 
62 62
 	$airline_array = $Spotter->countAllAirlinesByAirport($airport);
63 63
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
64 64
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3pie.min.js"></script>';
65 65
 	print '<div id="chart" class="chart" width="100%"></div><script>';
66 66
 	$airline_data = '';
67
-	foreach($airline_array as $airline_item)
67
+	foreach ($airline_array as $airline_item)
68 68
 	{
69 69
 		$airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],';
70 70
 	}
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 		print '</thead>';
92 92
 		print '<tbody>';
93 93
 		$i = 1;
94
-		foreach($airline_array as $airline_item)
94
+		foreach ($airline_array as $airline_item)
95 95
 		{
96 96
 			print '<tr>';
97 97
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-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['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
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
@@ -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
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Arrival Airports from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($airport == $airport_name['airport_icao'])
29
+		if ($airport == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	include('airport-sub-menu.php');
58 58
 	print '<div class="column">';
59 59
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
60
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
60
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
61 61
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByAirport($airport);
62 62
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
63 63
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	print '<script>';
67 67
 	print 'var series = [';
68 68
 	$airport_data = '';
69
-	foreach($airport_airport_array as $airport_item)
69
+	foreach ($airport_airport_array as $airport_item)
70 70
 	{
71 71
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
72 72
 	}
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	print '</thead>';
122 122
 	print '<tbody>';
123 123
 	$i = 1;
124
-	foreach($airport_airport_array as $airport_item)
124
+	foreach ($airport_airport_array as $airport_item)
125 125
 	{
126 126
 		print '<tr>';
127 127
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-arrival-airport-country.php 3 patches
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.
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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Arrival Airports by Country from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Arrival Airports by Country from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$airport_names = $Stats->getAllAirportNames();
25 25
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26 26
 	ksort($airport_names);
27
-	foreach($airport_names as $airport_name)
27
+	foreach ($airport_names as $airport_name)
28 28
 	{
29
-		if($airport == $airport_name['airport_icao'])
29
+		if ($airport == $airport_name['airport_icao'])
30 30
 		{
31 31
 			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>';
32 32
 		} else {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	include('airport-sub-menu.php');
58 58
 	print '<div class="column">';
59 59
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
60
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
60
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
61 61
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByAirport($airport);
62 62
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
63 63
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
66 66
 	print 'var series = [';
67 67
 	$country_data = '';
68
-	foreach($airport_country_array as $airport_item)
68
+	foreach ($airport_country_array as $airport_item)
69 69
 	{
70 70
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
71 71
 	}
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		print '</thead>';
114 114
 		print '<tbody>';
115 115
 		$i = 1;
116
-		foreach($airport_country_array as $airport_item)
116
+		foreach ($airport_country_array as $airport_item)
117 117
 		{
118 118
 			print '<tr>';
119 119
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-route.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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
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
@@ -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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 //$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
13 13
 $airport_array = $Spotter->getAllAirportInfo($airport);
14 14
 
15 15
 if (!empty($airport_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Routes to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Routes to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -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 Routes").'</h2>';
61
-	print '<p>'.sprintf(_("The statistic below shows the most common routes 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 routes to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
62 62
 
63 63
 	$route_array = $Spotter->countAllRoutesByAirport($airport);
64 64
 	if (!empty($route_array))
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		print '</thead>';
75 75
 		print '<tbody>';
76 76
 		$i = 1;
77
-		foreach($route_array as $route_item)
77
+		foreach ($route_array as $route_item)
78 78
 		{
79 79
 			print '<tr>';
80 80
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-registration.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
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
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
@@ -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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16 16
 	//$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
17
-	$title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Aircraft by Registration to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -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($_GET['airport'] == $airport_name['airport_icao'])
30
+		if ($_GET['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 by Registration").'</h2>';
61
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration 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 by registration 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->countAllAircraftRegistrationByAirport($airport);
64 64
 	if (!empty($aircraft_array))
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		print '</thead>';
76 76
 		print '<tbody>';
77 77
 		$i = 1;
78
-		foreach($aircraft_array as $aircraft_item)
78
+		foreach ($aircraft_array as $aircraft_item)
79 79
 		{
80 80
 			print '<tr>';
81 81
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.