Completed
Push — master ( baa1fe...14925d )
by Yannick
164:26 queued 132:19
created
statistics-callsign.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@  discard block
 block discarded – undo
6 6
 $title = _("Statistics").' - '._("Most common Callsign");
7 7
 
8 8
 if (!isset($filter_name)) $filter_name = '';
9
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
9
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
10 10
 if ($airline_icao == '' && isset($globalFilter)) {
11 11
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
12 12
 }
13
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
14
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
13
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
14
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
15 15
 require_once('header.php');
16 16
 include('statistics-sub-menu.php'); 
17 17
 
@@ -22,10 +22,10 @@  discard block
 block discarded – undo
22 22
 	  </div>
23 23
     	<p>'._("Below are the <strong>Top 10</strong> most common ident/callsigns of all airlines.").'</p>';
24 24
 
25
-$callsign_array = $Stats->countAllCallsigns(true,$airline_icao,$filter_name,$year,$month);
25
+$callsign_array = $Stats->countAllCallsigns(true, $airline_icao, $filter_name, $year, $month);
26 26
 print '<div id="chart" class="chart" width="100%"></div><script>';
27 27
 $callsign_data = '';
28
-foreach($callsign_array as $callsign_item)
28
+foreach ($callsign_array as $callsign_item)
29 29
 {
30 30
 	$callsign_data .= '[ "'.$callsign_item['callsign_icao'].' ('.$callsign_item['airline_name'].')",'.$callsign_item['callsign_icao_count'].'],';
31 31
 }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	print '</thead>';
52 52
 	print '<tbody>';
53 53
 	$i = 1;
54
-	foreach($callsign_array as $callsign_item)
54
+	foreach ($callsign_array as $callsign_item)
55 55
 	{
56 56
 		print '<tr>';
57 57
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/aircraft');
8 8
         die();
9 9
 }
10
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
13 13
 
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Departure Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$aircraft_types = $Stats->getAllAircraftTypes();
25 25
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
-	foreach($aircraft_types as $aircrafttype)
26
+	foreach ($aircraft_types as $aircrafttype)
27 27
 	{
28
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
28
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
29 29
 		{
30 30
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
31 31
 		} else {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('aircraft-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
55 55
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByAircraft($aircraft_type);
56 56
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
57 57
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
60 60
 	print 'var series = [';
61 61
 	$country_data = '';
62
-	foreach($airport_country_array as $airport_item)
62
+	foreach ($airport_country_array as $airport_item)
63 63
 	{
64 64
 		$country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
65 65
 	}
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		print '</thead>';
108 108
 		print '<tbody>';
109 109
 		$i = 1;
110
-		foreach($airport_country_array as $airport_item)
110
+		foreach ($airport_country_array as $airport_item)
111 111
 		{
112 112
 			print '<tr>';
113 113
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport-country.php 1 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
 
11
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
12 12
 $Spotter = new Spotter();
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26 26
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
-	foreach($aircraft_types as $aircrafttype)
27
+	foreach ($aircraft_types as $aircrafttype)
28 28
 	{
29
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
29
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
30 30
 		{
31 31
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32 32
 		} else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	include('aircraft-sub-menu.php');
54 54
 	print '<div class="column">';
55 55
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
56
-  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56
+  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
57 57
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByAircraft($aircraft_type);
58 58
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
59 59
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
62 62
 	print 'var series = [';
63 63
 	$country_data = '';
64
-	foreach($airport_country_array as $airport_item)
64
+	foreach ($airport_country_array as $airport_item)
65 65
 	{
66 66
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
67 67
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		print '</thead>';
110 110
 		print '<tbody>';
111 111
 		$i = 1;
112
-		foreach($airport_country_array as $airport_item)
112
+		foreach ($airport_country_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.
aircraft-statistics-airline-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 	header('Location: '.$globalURL.'/aircraft');
10 10
 	die();
11 11
 }
12
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines by Country from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Airlines by Country from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
     
21 21
 	print '<div class="select-item">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
     	$Stats = new Stats();
26 26
     	$aircraft_types = $Stats->getAllAircraftTypes();
27 27
     	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
28
-    	foreach($aircraft_types as $aircrafttype)
28
+    	foreach ($aircraft_types as $aircrafttype)
29 29
     	{
30
-    		if($aircraft_type == $aircrafttype['aircraft_icao'])
30
+    		if ($aircraft_type == $aircrafttype['aircraft_icao'])
31 31
     		{
32 32
     			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
33 33
     		} else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	include('aircraft-sub-menu.php');
54 54
 	print '<div class="column">';
55 55
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
56
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
57 57
 
58 58
 	$airline_array = $Spotter->countAllAirlineCountriesByAircraft($aircraft_type);
59 59
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
63 63
 	print 'var series = [';
64 64
         $country_data = '';
65
-	foreach($airline_array as $airline_item)
65
+	foreach ($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
68 68
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		print '</thead>';
110 110
 		print '<tbody>';
111 111
 		$i = 1;
112
-		foreach($airline_array as $airline_item)
112
+		foreach ($airline_array as $airline_item)
113 113
 		{
114 114
 			print '<tr>';
115 115
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-airline-country.php 1 patch
Spacing   +8 added lines, -8 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
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
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 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-departure-airport-country.php 1 patch
Spacing   +8 added lines, -8 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
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
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 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-arrival-airport-country.php 1 patch
Spacing   +8 added lines, -8 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
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
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 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.
incident.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once(dirname(__FILE__).'/require/settings.php');
3
-$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING);
3
+$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);
4 4
 if ($date == '') $date = date('Y-m-d');
5 5
 header('Location: '.$globalURL.'/incident/'.$date);
6 6
 ?>
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
date-statistics-departure-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  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
-$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
+$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
9 9
 
10 10
 if (!empty($spotter_array))
11 11
 {
12
-	$title = sprintf(_("Most Common Departure Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Departure Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 
14 14
 	require_once('header.php');
15 15
 	print '<div class="select-item">';
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
28 28
 	print '<br />';
29 29
 	print '<div class="info column">';
30
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
30
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
31 31
 	print '</div>';
32 32
 
33 33
 	include('date-sub-menu.php');
34 34
 	print '<div class="column">';
35 35
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
36
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
36
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37 37
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByDate($date);
38 38
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
39 39
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
42 42
 	print 'var series = [';
43 43
 	$country_data = '';
44
-	foreach($airport_country_array as $airport_item)
44
+	foreach ($airport_country_array as $airport_item)
45 45
 	{
46 46
 		$country_data .= '[ "'.$airport_item['departure_airport_country_iso3'].'",'.$airport_item['airport_departure_country_count'].'],';
47 47
 	}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		print '</thead>';
90 90
 		print '<tbody>';
91 91
 		$i = 1;
92
-		foreach($airport_country_array as $airport_item)
92
+		foreach ($airport_country_array as $airport_item)
93 93
 		{
94 94
 			print '<tr>';
95 95
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.