Completed
Push — master ( f6e401...19913c )
by Yannick
10:24
created
airport.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 if (isset($_POST['airport']))
8 8
 {
9 9
 	header('Location: '.$globalURL.'/airport/'.$_POST['airport']);
10
-} else if (isset($_GET['airport'])){
10
+} else if (isset($_GET['airport'])) {
11 11
 	$Spotter = new Spotter();
12 12
 	//calculuation for the pagination
13
-	if($_GET['limit'] == "")
13
+	if ($_GET['limit'] == "")
14 14
 	{
15 15
 	  $limit_start = 0;
16 16
 	  $limit_end = 25;
17 17
 	  $absolute_difference = 25;
18
-	}  else {
18
+	} else {
19 19
 		$limit_explode = explode(",", $_GET['limit']);
20 20
 		$limit_start = $limit_explode[0];
21 21
 		$limit_end = $limit_explode[1];
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
 	$limit_previous_1 = $limit_start - $absolute_difference;
30 30
 	$limit_previous_2 = $limit_end - $absolute_difference;
31 31
 	
32
-	$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
32
+	$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	$page_url = $globalURL.'/airport/'.$airport;
35
-	$spotter_array = $Spotter->getSpotterDataByAirport($airport,$limit_start.",".$absolute_difference, $sort);
35
+	$spotter_array = $Spotter->getSpotterDataByAirport($airport, $limit_start.",".$absolute_difference, $sort);
36 36
 	$airport_array = $Spotter->getAllAirportInfo($airport);
37 37
 	
38 38
 	if (!empty($airport_array))
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 			$airport_names = $Spotter->getAllAirportNames();
52 52
 		}
53 53
 		ksort($airport_names);
54
-		foreach($airport_names as $airport_name)
54
+		foreach ($airport_names as $airport_name)
55 55
 		{
56
-			if($airport == $airport_name['airport_icao'])
56
+			if ($airport == $airport_name['airport_icao'])
57 57
 			{
58 58
 				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>';
59 59
 			} else {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 		print '<div class="table column">';
87 87
 		if ($airport_array[0]['iata'] != "NA")
88 88
 		{
89
-			print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."),$airport_array[0]['name']).'</p>';
89
+			print '<p>'.sprintf(_("The table below shows the route(s) aircrafts have used to/from <strong>%s</strong>, sorted by the most recent one."), $airport_array[0]['name']).'</p>';
90 90
 		}
91 91
 
92 92
 		include('table-output.php');  
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		print '<p>'._("Sorry, the airport does not exist in this database. :(").'</p>'; 
109 109
 	}
110 110
 } else {
111
-	$Spotter= new Spotter();
111
+	$Spotter = new Spotter();
112 112
 	$Stats = new Stats();
113 113
 	$title = _("Airports");
114 114
 	require_once('header.php');
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
 	ksort($airport_names);
122 122
 	$previous = null;
123 123
 	print '<div class="alphabet-legend">';
124
-	foreach($airport_names as $value) {
124
+	foreach ($airport_names as $value) {
125 125
 		$firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1));
126
-		if($previous !== $firstLetter)
126
+		if ($previous !== $firstLetter)
127 127
 		{
128
-			if ($previous !== null){
128
+			if ($previous !== null) {
129 129
 				print ' | ';
130 130
 			}
131 131
 			print '<a href="#'.$firstLetter.'">'.$firstLetter.'</a>';
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
 	}
135 135
 	print '</div>';
136 136
 	$previous = null;
137
-	foreach($airport_names as $value) {
137
+	foreach ($airport_names as $value) {
138 138
 		$firstLetter = mb_strtoupper(mb_substr($value['airport_city'], 0, 1));
139 139
 		if ($firstLetter != "")
140 140
 		{
141
-			if($previous !== $firstLetter)
141
+			if ($previous !== $firstLetter)
142 142
 			{
143
-				if ($previous !== null){
143
+				if ($previous !== null) {
144 144
 					print '</div>';
145 145
 				}
146 146
 				print '<a name="'.$firstLetter.'"></a><h4 class="alphabet-header">'.$firstLetter.'</h4><div class="alphabet">';
Please login to merge, or discard this patch.
airline-statistics-time.php 1 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.'/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
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Time of Day from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
17
+	$title = sprintf(_("Most Common Time of Day from %s (%s)"), $spotter_array[0]['airline_name'], $spotter_array[0]['airline_icao']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/airline" method="post">';
@@ -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 Time of Day").'</h2>';
66
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
66
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
67 67
 	$hour_array = $Spotter->countAllHoursByAirline($airline);
68 68
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
69 69
 	print '<div id="chartHour" class="chart" width="100%"></div>
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             var data = google.visualization.arrayToDataTable([
75 75
             	["'._("Hour").'", "'._("# of Flights").'"], ';
76 76
         $hour_data = '';
77
-	foreach($hour_array as $hour_item)
77
+	foreach ($hour_array as $hour_item)
78 78
 	{
79 79
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
80 80
 	}
Please login to merge, or discard this patch.
manufacturer-statistics-aircraft.php 1 patch
Spacing   +8 added lines, -8 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("-", " ", 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("-", " ", 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 Aircraft from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Aircraft 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 Aircraft").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 
49 49
 	$aircraft_array = $Spotter->countAllAircraftTypesByManufacturer($manufacturer);
50 50
 	if (!empty($aircraft_array))
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		print '</thead>';
60 60
 		print '<tbody>';
61 61
 		$i = 1;
62
-		foreach($aircraft_array as $aircraft_item)
62
+		foreach ($aircraft_array as $aircraft_item)
63 63
 		{
64 64
 			print '<tr>';
65 65
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-statistics-time.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
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
11
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
12 12
 
13
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
13
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
14
+$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Time of Day from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Time of Day from %s"), $manufacturer);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/manufacturer" method="post">';
@@ -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 Time of Day").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 
49 49
 	$hour_array = $Spotter->countAllHoursByManufacturer($manufacturer);
50 50
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
             var data = google.visualization.arrayToDataTable([
57 57
             	["'._("Hour").'", "'._("# of Flights").'"], ';
58 58
             	$hour_data = '';
59
-	foreach($hour_array as $hour_item)
59
+	foreach ($hour_array as $hour_item)
60 60
 	{
61 61
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
62 62
 	}
Please login to merge, or discard this patch.
install/class.settings.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 		$Common = new Common();
13 13
 		$settings_filename = '../require/settings.php';
14 14
 		$content = file_get_contents($settings_filename);
15
-		$fh = fopen($settings_filename,'w');
15
+		$fh = fopen($settings_filename, 'w');
16 16
 		foreach ($settings as $settingname => $value) {
17 17
 			if ($value == 'TRUE' || $value == 'FALSE') {
18 18
 				$pattern = '/\R\$'.$settingname." = ".'(TRUE|FALSE)'."/";
@@ -79,21 +79,21 @@  discard block
 block discarded – undo
79 79
 				$replace = "\n".'\$'.$settingname." = '".$value."'";
80 80
 			}
81 81
 			$rep_cnt = 0;
82
-			$content = preg_replace($pattern,$replace,$content,1,$rep_cnt);
82
+			$content = preg_replace($pattern, $replace, $content, 1, $rep_cnt);
83 83
 			
84 84
 			/// If setting was a string and is now an array
85 85
 			if ($rep_cnt === 0 && is_array($value)) {
86 86
 				$pattern = '/\R\$'.$settingname." = '".'(.*)'."'/";
87
-				$content = preg_replace($pattern,$replace,$content,1,$rep_cnt);
87
+				$content = preg_replace($pattern, $replace, $content, 1, $rep_cnt);
88 88
 			}
89 89
 			
90 90
 			// If setting is not in settings.php (for update)
91 91
 			if ($rep_cnt === 0) {
92
-				$content = preg_replace('/\?>/',$replace.";\n?>",$content,1,$rep_cnt);
92
+				$content = preg_replace('/\?>/', $replace.";\n?>", $content, 1, $rep_cnt);
93 93
 			}
94 94
 
95 95
 		}
96
-		fwrite($fh,$content);
96
+		fwrite($fh, $content);
97 97
 		fclose($fh);
98 98
 	}
99 99
 
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
 		$Common = new Common();
106 106
 		$settings_filename = '../require/settings.php';
107 107
 		$content = file_get_contents($settings_filename);
108
-		$fh = fopen($settings_filename,'w');
108
+		$fh = fopen($settings_filename, 'w');
109 109
 		foreach ($settings as $settingname) {
110 110
 			$pattern = '/\R\$'.$settingname." = /";
111 111
 			$replace = '//$'.$settingname." = ";
112
-			$content = preg_replace($pattern,$replace,$content);
112
+			$content = preg_replace($pattern, $replace, $content);
113 113
 		}
114
-		fwrite($fh,$content);
114
+		fwrite($fh, $content);
115 115
 		fclose($fh);
116 116
 	}
117 117
 }
Please login to merge, or discard this patch.
airport-statistics-registration.php 1 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
-$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 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.
airline-statistics-route.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 Routes from %s (%s)"),$spotter_array[0]['airline_name'],$spotter_array[0]['airline_icao']);
16
+	$title = sprintf(_("Most Common Routes 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 Routes").'</h2>';
65
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."),$spotter_array[0]['airline_name']).'</p>';
65
+	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s</strong>."), $spotter_array[0]['airline_name']).'</p>';
66 66
 	$route_array = $Spotter->countAllRoutesByAirline($airline);
67 67
 	if (!empty($route_array))
68 68
 	{
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		print '</thead>';
79 79
 		print '<tbody>';
80 80
 		$i = 1;
81
-		foreach($route_array as $route_item)
81
+		foreach ($route_array as $route_item)
82 82
 		{
83 83
 			print '<tr>';
84 84
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-arrival-airport.php 1 patch
Spacing   +9 added lines, -9 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 Arrival Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Arrival Airports 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 Arrival Airports").'</h2>';
36
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports 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 arrival airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37 37
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByDate($date);
38 38
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>
39 39
     	<script>
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         	["'._("Airport").'", "'._("# of times").'"],';
49 49
 
50 50
 	$airport_data = '';
51
-	foreach($airport_airport_array as $airport_item)
51
+	foreach ($airport_airport_array as $airport_item)
52 52
 	{
53 53
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
54 54
 		$name = str_replace("'", "", $name);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	print '</thead>';
88 88
 	print '<tbody>';
89 89
 	$i = 1;
90
-	foreach($airport_airport_array as $airport_item)
90
+	foreach ($airport_airport_array as $airport_item)
91 91
 	{
92 92
 		print '<tr>';
93 93
 		print '<td><strong>'.$i.'</strong></td>';
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	$title = _("Unknown Date");
113 113
 	require_once('header.php');
114 114
 	print '<h1>'._("Error").'</h1>';
115
-	print '<p>'._("Sorry, this date does not exist in this database. :(");'</p>';
115
+	print '<p>'._("Sorry, this date does not exist in this database. :("); '</p>';
116 116
 }
117 117
 
118 118
 require_once('footer.php');
Please login to merge, or discard this patch.
aircraft-statistics-airline.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
         header('Location: '.$globalURL.'/aircraft');
9 9
         die();
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 Airlines from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Airlines from %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 {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	include('aircraft-sub-menu.php');
53 53
 	print '<div class="column">';
54 54
 	print '<h2>'._("Most Common Airlines").'</h2>';
55
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
55
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
56 56
 
57 57
 	$airline_array = $Spotter->countAllAirlinesByAircraft($aircraft_type);
58 58
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		print '</thead>';
71 71
 		print '<tbody>';
72 72
 		$i = 1;
73
-		foreach($airline_array as $airline_item)
73
+		foreach ($airline_array as $airline_item)
74 74
 		{
75 75
 			print '<tr>';
76 76
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.