Completed
Push — master ( ca573a...749c97 )
by Yannick
07:32
created
manufacturer-statistics-airline.php 1 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 = filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING);
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$aircraft_manufacturer = 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.
airline-statistics-registration.php 1 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
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 
19 19
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$airline_names = $Stats->getAllAirlineNames();
25 25
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
26
-	foreach($airline_names as $airline_name)
26
+	foreach ($airline_names as $airline_name)
27 27
 	{
28
-		if($airline == $airline_name['airline_icao'])
28
+		if ($airline == $airline_name['airline_icao'])
29 29
 		{
30 30
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
31 31
 		} else {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	include('airline-sub-menu.php');
64 64
 	print '<div class="column">';
65 65
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
66
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
66
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by their registration of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
67 67
 
68 68
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByAirline($airline);
69 69
 	if (!empty($aircraft_array))
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		print '</thead>';
81 81
 		print '<tbody>';
82 82
 		$i = 1;
83
-		foreach($aircraft_array as $aircraft_item)
83
+		foreach ($aircraft_array as $aircraft_item)
84 84
 		{
85 85
 			print '<tr>';
86 86
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
currently.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once('require/class.Connection.php');
3
-require_once('require/class.Spotter.php');;
3
+require_once('require/class.Spotter.php'); ;
4 4
 require_once('require/class.Language.php');
5 5
 require_once('require/class.SpotterLive.php');
6 6
 
7 7
 $title = "Current Activity";
8 8
 require_once('header.php');
9
-$SpotterLive=new SpotterLive();
9
+$SpotterLive = new SpotterLive();
10 10
 //calculuation for the pagination
11
-if(!isset($_GET['limit']))
11
+if (!isset($_GET['limit']))
12 12
 {
13 13
 	$limit_start = 0;
14 14
 	$limit_end = 25;
15 15
 	$absolute_difference = 25;
16
-}  else {
16
+} else {
17 17
 	$limit_explode = explode(",", $_GET['limit']);
18 18
 	$limit_start = $limit_explode[0];
19 19
 	$limit_end = $limit_explode[1];
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 print '<div class="table column">';
37 37
 print '<p>'._("The table below shows the detailed information of all current flights.").'</p>';
38 38
 
39
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
39
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
40 40
 if ($sort != '') {
41 41
 	$spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
42 42
 } else {
Please login to merge, or discard this patch.
airline-statistics-aircraft.php 1 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
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Aircraft from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($airline == $airline_name['airline_icao'])
27
+		if ($airline == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Aircraft").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 
67 67
 	$aircraft_array = $Spotter->countAllAircraftTypesByAirline($airline);
68 68
 	if (!empty($aircraft_array))
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		print '</thead>';
78 78
 		print '<tbody>';
79 79
 		$i = 1;
80
-		foreach($aircraft_array as $aircraft_item)
80
+		foreach ($aircraft_array as $aircraft_item)
81 81
 		{
82 82
 			print '<tr>';
83 83
 			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="https://www.google.com/jsapi"></script>';
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             var data = google.visualization.arrayToDataTable([
70 70
             	["'._("Country").'", "'._("# of times").'"], ';
71 71
             	$country_data = '';
72
-	foreach($airport_country_array as $airport_item)
72
+	foreach ($airport_country_array as $airport_item)
73 73
 	{
74 74
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
75 75
 	}
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		print '</thead>';
104 104
 		print '<tbody>';
105 105
 		$i = 1;
106
-		foreach($airport_country_array as $airport_item)
106
+		foreach ($airport_country_array as $airport_item)
107 107
 		{
108 108
 			print '<tr>';
109 109
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airline-statistics-departure-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airline');
8 8
         die();
9 9
 }
10
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
10
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirline($airline,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirline($airline, "0,1", "");
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Departure Airports by Country from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	$Stats = new Stats();
23 23
 	$airline_names = $Stats->getAllAirlineNames();
24 24
 	if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
25
-	foreach($airline_names as $airline_name)
25
+	foreach ($airline_names as $airline_name)
26 26
 	{
27
-		if($airline == $airline_name['airline_icao'])
27
+		if ($airline == $airline_name['airline_icao'])
28 28
 		{
29 29
 			print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
30 30
 		} else {
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 	include('airline-sub-menu.php');
63 63
 	print '<div class="column">';
64 64
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByAirline($airline);
67 67
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
68 68
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             var data = google.visualization.arrayToDataTable([
74 74
             	["'._("Country").'", "'._("# of times").'"], ';
75 75
             $country_data = '';
76
-	foreach($airport_country_array as $airport_item)
76
+	foreach ($airport_country_array as $airport_item)
77 77
 	{
78 78
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
79 79
 	}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 		print '</thead>';
107 107
 		print '<tbody>';
108 108
 		$i = 1;
109
-		foreach($airport_country_array as $airport_item)
109
+		foreach ($airport_country_array as $airport_item)
110 110
 		{
111 111
 			print '<tr>';
112 112
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airline.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 	print '<div class="column">';
16 16
 	print '<h1>'._("Airlines").'</h1>';
17 17
 	if (isset($_POST['airline_type'])) {
18
-		$airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING);
18
+		$airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING);
19 19
 		//$airline_names = $Spotter->getAllAirlineNames($airline_type);
20 20
 	} else {
21 21
 		//$airline_names = $Spotter->getAllAirlineNames();
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	$Stats = new Stats();
38 38
 	if (isset($_POST['airline_type'])) 
39 39
 	{
40
-		$airline_type = filter_input(INPUT_POST,'airline_type',FILTER_SANITIZE_STRING);
40
+		$airline_type = filter_input(INPUT_POST, 'airline_type', FILTER_SANITIZE_STRING);
41 41
 		//$airline_names = $Stats->getAllAirlineNames($airline_type);
42 42
 		$airline_names = $Spotter->getAllAirlineNames($airline_type);
43 43
 	} else {
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	}
51 51
 	$previous = null;
52 52
 	print '<div class="alphabet-legend">';
53
-	foreach($airline_names as $value) 
53
+	foreach ($airline_names as $value) 
54 54
 	{
55 55
 		//echo $value['airline_name']."\n";
56 56
 		//echo mb_substr($value['airline_name'],0,1).' - '.$value['airline_name']."\n";
57
-		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1),'UTF-8');
58
-		if($previous !== $firstLetter)
57
+		$firstLetter = mb_strtoupper(mb_substr($value['airline_name'], 0, 1), 'UTF-8');
58
+		if ($previous !== $firstLetter)
59 59
 		{
60 60
 			if ($previous !== null) print ' | ';
61 61
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 	}
65 65
 	print '</div>';
66 66
 	$previous = null;
67
-	foreach($airline_names as $value) {
67
+	foreach ($airline_names as $value) {
68 68
 		$firstLetter = strtoupper(substr($value['airline_name'], 0, 1));
69 69
 		if ($firstLetter != "")
70 70
 		{
71
-			if($previous !== $firstLetter)
71
+			if ($previous !== $firstLetter)
72 72
 			{
73 73
 				if ($previous !== null) print '</div>';
74 74
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
airline-detailed.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 
7
-if (!isset($_GET['airline'])){
7
+if (!isset($_GET['airline'])) {
8 8
 	header('Location: '.$globalURL.'/airline');
9
-} else{
9
+} else {
10 10
 	$Spotter = new Spotter();
11 11
 	//calculuation for the pagination
12
-	if(!isset($_GET['limit']) || $_GET['limit'] == "")
12
+	if (!isset($_GET['limit']) || $_GET['limit'] == "")
13 13
 	{
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
@@ -28,16 +28,16 @@  discard block
 block discarded – undo
28 28
 	$limit_previous_1 = $limit_start - $absolute_difference;
29 29
 	$limit_previous_2 = $limit_end - $absolute_difference;
30 30
 	
31
-	$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
31
+	$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/airline/'.$airline;
33 33
 	
34
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
35
-	$spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'],$limit_start.",".$absolute_difference, $sort);
34
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
35
+	$spotter_array = $Spotter->getSpotterDataByAirline($_GET['airline'], $limit_start.",".$absolute_difference, $sort);
36 36
 	
37 37
 	if (!empty($spotter_array))
38 38
 	{
39 39
 		if (isset($spotter_array[0]['airline_name']) && isset($spotter_array[0]['airline_icao'])) {
40
-			$title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
40
+			$title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
41 41
 		} else $title = '';
42 42
 		require_once('header.php');
43 43
 	  
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 		$Stats = new Stats();
49 49
 		$airline_names = $Stats->getAllAirlineNames();
50 50
 		if (empty($airline_names)) $airline_names = $Spotter->getAllAirlineNames();
51
-		foreach($airline_names as $airline_name)
51
+		foreach ($airline_names as $airline_name)
52 52
 		{
53
-			if($_GET['airline'] == $airline_name['airline_icao'])
53
+			if ($_GET['airline'] == $airline_name['airline_icao'])
54 54
 			{
55 55
 				print '<option value="'.$airline_name['airline_icao'].'" selected="selected">'.$airline_name['airline_name'].' ('.$airline_name['airline_icao'].')</option>';
56 56
 			} else {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		include('airline-sub-menu.php');
89 89
 		print '<div class="table column">';
90 90
 		if (isset($spotter_array[0]['airline_name'])) {
91
-			print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
91
+			print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
92 92
 		}
93 93
 
94 94
 		include('table-output.php');  
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 $aircraft_type)
26
+	foreach ($aircraft_types as $aircraft_type)
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="https://www.google.com/jsapi"></script>';
57 57
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Country").'", "'._("# of times").'"], ';
64 64
 	$country_data = '';
65
-	foreach($airport_country_array as $airport_item)
65
+	foreach ($airport_country_array as $airport_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
68 68
 	}
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		print '</thead>';
97 97
 		print '<tbody>';
98 98
 		$i = 1;
99
-		foreach($airport_country_array as $airport_item)
99
+		foreach ($airport_country_array as $airport_item)
100 100
 		{
101 101
 			print '<tr>';
102 102
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.