Completed
Push — master ( d8c574...a11679 )
by Yannick
07:12
created
statistics-registration.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
           function drawChart() {
22 22
             var data = google.visualization.arrayToDataTable([
23 23
             	["'._("Aircraft Manufacturer").'", "'._("# of times").'"], ';
24
-            	$registration_data = '';
24
+				$registration_data = '';
25 25
 foreach($registration_array as $registration_item)
26 26
 {
27 27
 	$registration_data .= '[ "'.$registration_item['registration'].' - '.$registration_item['aircraft_name'].' ('.$registration_item['aircraft_icao'].')",'.$registration_item['aircraft_registration_count'].'],';
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
             var data = google.visualization.arrayToDataTable([
23 23
             	["'._("Aircraft Manufacturer").'", "'._("# of times").'"], ';
24 24
             	$registration_data = '';
25
-foreach($registration_array as $registration_item)
25
+foreach ($registration_array as $registration_item)
26 26
 {
27 27
 	$registration_data .= '[ "'.$registration_item['registration'].' - '.$registration_item['aircraft_name'].' ('.$registration_item['aircraft_icao'].')",'.$registration_item['aircraft_registration_count'].'],';
28 28
 }
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	print '</thead>';
58 58
 	print '<tbody>';
59 59
 	$i = 1;
60
-	foreach($registration_array as $registration_item)
60
+	foreach ($registration_array as $registration_item)
61 61
 	{
62 62
 		print '<tr>';
63 63
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-departure-airport.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['aircraft_type'])) {
6
-        header('Location: '.$globalURL.'/aircraft');
7
-        die();
6
+		header('Location: '.$globalURL.'/aircraft');
7
+		die();
8 8
 }
9 9
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
52 52
 	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
53 53
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type);
54
-    	print '
54
+		print '
55 55
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
56 56
     	<script>
57 57
     	google.load("visualization", "1", {packages:["geochart"]});
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     
64 64
         var data = google.visualization.arrayToDataTable([ 
65 65
         	["'._("Airport").'", "'._("# of times").'"],';
66
-        $airport_data = '';
66
+		$airport_data = '';
67 67
 	foreach($airport_airport_array as $airport_item)
68 68
 	{
69 69
 		$name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,23 +6,23 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/aircraft');
7 7
         die();
8 8
 }
9
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
9
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
12 12
 
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Departure Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
16
+	$title = sprintf(_("Most Common Departure Airports for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
20 20
 	print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
21 21
 	print '<option></option>';
22 22
 	$aircraft_types = $Spotter->getAllAircraftTypes();
23
-	foreach($aircraft_types as $aircraft_type)
23
+	foreach ($aircraft_types as $aircraft_type)
24 24
 	{
25
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
25
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
26 26
 		{
27 27
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
28 28
 		} else {
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	include('aircraft-sub-menu.php');
50 50
 	print '<div class="column">';
51 51
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
52
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
52
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
53 53
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByAircraft($aircraft_type);
54 54
     	print '
55 55
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         var data = google.visualization.arrayToDataTable([ 
65 65
         	["'._("Airport").'", "'._("# of times").'"],';
66 66
         $airport_data = '';
67
-	foreach($airport_airport_array as $airport_item)
67
+	foreach ($airport_airport_array as $airport_item)
68 68
 	{
69 69
 		$name = $airport_item['airport_departure_city'].', '.$airport_item['airport_departure_country'].' ('.$airport_item['airport_departure_icao'].')';
70 70
 		$name = str_replace("'", "", $name);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	print '</thead>';
104 104
 	print '<tbody>';
105 105
 	$i = 1;
106
-	foreach($airport_airport_array as $airport_item)
106
+	foreach ($airport_airport_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.
country-sub-menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 </span>
4 4
 <div class="sub-menu sub-menu-container">
5 5
 	<ul class="nav nav-pills">
6
-		<li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
6
+		<li><a href="<?php print $globalURL; ?>/country/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
7 7
 		<li class="dropdown">
8
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
8
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-aircraft" || strtolower($current_page) == "country-statistics-registration" || strtolower($current_page) == "country-statistics-manufacturer") { print 'active'; } ?>" data-toggle="dropdown" href="#">
9 9
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
10 10
 		    </a>
11 11
 		    <ul class="dropdown-menu" role="menu">
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		    </ul>
16 16
 		</li>
17 17
 		<li class="dropdown">
18
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
18
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-airline" || strtolower($current_page) == "country-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
19 19
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
20 20
 		    </a>
21 21
 		    <ul class="dropdown-menu" role="menu">
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 		    </ul>
25 25
 		</li>
26 26
 		<li class="dropdown">
27
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
27
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "country-statistics-departure-airport" || strtolower($current_page) == "country-statistics-departure-airport-country" || strtolower($current_page) == "country-statistics-arrival-airport" || strtolower($current_page) == "country-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
28 28
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
29 29
 		    </a>
30 30
 		    <ul class="dropdown-menu" role="menu">
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 			  <li><a href="<?php print $globalURL; ?>/country/statistics/arrival-airport-country/<?php print $country; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li>
35 35
 		    </ul>
36 36
 		</li>
37
-		<li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
-		<li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
37
+		<li><a href="<?php print $globalURL; ?>/country/statistics/route/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
38
+		<li><a href="<?php print $globalURL; ?>/country/statistics/time/<?php print $country; ?>" <?php if (strtolower($current_page) == "country-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
39 39
 	</ul>
40 40
 </div>
41 41
\ No newline at end of file
Please login to merge, or discard this patch.
airport-statistics-airline.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['airport'])) {
6
-        header('Location: '.$globalURL.'/airport');
7
-        die();
6
+		header('Location: '.$globalURL.'/airport');
7
+		die();
8 8
 }
9 9
 $airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
           function drawChart() {
66 66
             var data = google.visualization.arrayToDataTable([
67 67
             	["'._("Aircraft").'", "'._("# of times").'"], ';
68
-            	$airline_data = '';
68
+				$airline_data = '';
69 69
 	foreach($airline_array as $airline_item)
70 70
 	{
71 71
 		$airline_data .= '[ "'.$airline_item['airline_name'].'",'.$airline_item['airline_count'].'],';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,14 +6,14 @@  discard block
 block discarded – undo
6 6
         header('Location: '.$globalURL.'/airport');
7 7
         die();
8 8
 }
9
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
9
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
10 10
 $Spotter = new Spotter();
11
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
11
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
12 12
 $airport_array = $Spotter->getAllAirportInfo($airport);
13 13
 
14 14
 if (!empty($airport_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
16
+	$title = sprintf(_("Most Common Airlines to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="select-item">';
19 19
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 	print '<option></option>';
22 22
 	$airport_names = $Spotter->getAllAirportNames();
23 23
 	ksort($airport_names);
24
-	foreach($airport_names as $airport_name)
24
+	foreach ($airport_names as $airport_name)
25 25
 	{
26
-		if($airport == $airport_name['airport_icao'])
26
+		if ($airport == $airport_name['airport_icao'])
27 27
 		{
28 28
 			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>';
29 29
 		} else {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	include('airport-sub-menu.php');
55 55
 	print '<div class="column">';
56 56
 	print '<h2>'._("Most Common Airlines").'</h2>';
57
-	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>';
57
+	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>';
58 58
 
59 59
 	$airline_array = $Spotter->countAllAirlinesByAirport($airport);
60 60
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             var data = google.visualization.arrayToDataTable([
67 67
             	["'._("Aircraft").'", "'._("# of times").'"], ';
68 68
             	$airline_data = '';
69
-	foreach($airline_array as $airline_item)
69
+	foreach ($airline_array as $airline_item)
70 70
 	{
71 71
 		$airline_data .= '[ "'.$airline_item['airline_name'].'",'.$airline_item['airline_count'].'],';
72 72
 	}
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		print '</thead>';
103 103
 		print '<tbody>';
104 104
 		$i = 1;
105
-		foreach($airline_array as $airline_item)
105
+		foreach ($airline_array as $airline_item)
106 106
 		{
107 107
 			print '<tr>';
108 108
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
registration-statistics-time.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
           function drawChart() {
35 35
             var data = google.visualization.arrayToDataTable([
36 36
             	["'._("Hour").'", "'._("# of Flights").'"], ';
37
-            	$hour_data = '';
37
+				$hour_data = '';
38 38
 	foreach($hour_array as $hour_item)
39 39
 	{
40 40
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
8 8
 $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
9 9
 $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"),$registration);
13
+	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"), $registration);
14 14
 	require_once('header.php');
15 15
   
16 16
 	print '<div class="info column">';
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	include('registration-sub-menu.php');
24 24
 	print '<div class="column">';
25 25
 	print '<h2>'._("Most Common Time of Day").'</h2>';
26
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."),$registration).'</p>';
26
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."), $registration).'</p>';
27 27
 
28 28
 	$hour_array = $Spotter->countAllHoursByRegistration($registration);
29 29
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
             var data = google.visualization.arrayToDataTable([
36 36
             	["'._("Hour").'", "'._("# of Flights").'"], ';
37 37
             	$hour_data = '';
38
-	foreach($hour_array as $hour_item)
38
+	foreach ($hour_array as $hour_item)
39 39
 	{
40 40
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
41 41
 	}
Please login to merge, or discard this patch.
country-statistics-registration.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 if (isset($_GET['sort'])) {
13 13
 	$spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
14 14
 } else {
@@ -17,16 +17,16 @@  discard block
 block discarded – undo
17 17
 
18 18
 if (!empty($spotter_array))
19 19
 {
20
-	$title = sprintf(_("Most Common Aircraft by registration from %s"),$country);
20
+	$title = sprintf(_("Most Common Aircraft by registration from %s"), $country);
21 21
 	require_once('header.php');
22 22
 	print '<div class="select-item">';
23 23
 	print '<form action="'.$globalURL.'/country" method="post">';
24 24
 	print '<select name="country" class="selectpicker" data-live-search="true">';
25 25
 	print '<option></option>';
26 26
 	$all_countries = $Spotter->getAllCountries();
27
-	foreach($all_countries as $all_country)
27
+	foreach ($all_countries as $all_country)
28 28
 	{
29
-		if($country == $all_country['country'])
29
+		if ($country == $all_country['country'])
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
32 32
 		} else {
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	if ($_GET['country'] != "NA")
42 42
 	{
43 43
 		print '<div class="info column">';
44
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
44
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
45 45
 		print '</div>';
46 46
 	} else {
47 47
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 	include('country-sub-menu.php');
51 51
 	print '<div class="column">';
52 52
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
53
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."),$country).'</p>';
53
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of airlines or departure/arrival airports from <strong>%s</strong>."), $country).'</p>';
54 54
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByCountry($country);
55 55
 	if (!empty($aircraft_array))
56 56
 	{
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 		print '</thead>';
66 66
 		print '<tbody>';
67 67
 		$i = 1;
68
-		foreach($aircraft_array as $aircraft_item)
68
+		foreach ($aircraft_array as $aircraft_item)
69 69
 		{
70 70
 			print '<tr>';
71 71
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-sub-menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@  discard block
 block discarded – undo
3 3
 </span>
4 4
 <div class="sub-menu sub-menu-container">
5 5
 	<ul class="nav nav-pills">
6
-		<li><a href="<?php print $globalURL; ?>/manufacturer/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed"){ print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
6
+		<li><a href="<?php print $globalURL; ?>/manufacturer/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-detailed") { print 'class="active"'; } ?>><?php echo _("Detailed"); ?></a></li>
7 7
 		<li class="dropdown">
8
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
8
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-aircraft" || strtolower($current_page) == "manufacturer-statistics-registration") { print 'active'; } ?>" data-toggle="dropdown" href="#">
9 9
 		      <?php echo _("Aircraft"); ?> <span class="caret"></span>
10 10
 		    </a>
11 11
 		    <ul class="dropdown-menu" role="menu">
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 		    </ul>
15 15
 		</li>
16 16
 		<li class="dropdown">
17
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
17
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-airline" || strtolower($current_page) == "manufacturer-statistics-airline-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
18 18
 		      <?php echo _("Airline"); ?> <span class="caret"></span>
19 19
 		    </a>
20 20
 		    <ul class="dropdown-menu" role="menu">
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 		    </ul>
24 24
 		</li>
25 25
 		<li class="dropdown">
26
-		    <a class="dropdown-toggle <?php if(strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country"){ print 'active'; } ?>" data-toggle="dropdown" href="#">
26
+		    <a class="dropdown-toggle <?php if (strtolower($current_page) == "manufacturer-statistics-departure-airport" || strtolower($current_page) == "manufacturer-statistics-departure-airport-country" || strtolower($current_page) == "manufacturer-statistics-arrival-airport" || strtolower($current_page) == "manufacturer-statistics-arrival-airport-country") { print 'active'; } ?>" data-toggle="dropdown" href="#">
27 27
 		      <?php echo _("Airport"); ?> <span class="caret"></span>
28 28
 		    </a>
29 29
 		    <ul class="dropdown-menu" role="menu">
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			  <li><a href="<?php print $globalURL; ?>/manufacturer/statistics/arrival-airport-country/<?php print $_GET['aircraft_manufacturer']; ?>"><?php echo _("Arrival Airport by Country"); ?></a></li>
34 34
 		    </ul>
35 35
 		</li>
36
-		<li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route"){ print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
37
-		<li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time"){ print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
36
+		<li><a href="<?php print $globalURL; ?>/manufacturer/statistics/route/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-route") { print 'class="active"'; } ?>><?php echo _("Route"); ?></a></li>
37
+		<li><a href="<?php print $globalURL; ?>/manufacturer/statistics/time/<?php print $_GET['aircraft_manufacturer']; ?>" <?php if (strtolower($current_page) == "manufacturer-statistics-time") { print 'class="active"'; } ?>><?php echo _("Time"); ?></a></li>
38 38
 	</ul>
39 39
 </div>
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
route-statistics-aircraft.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
 require_once('require/class.Connection.php');
8 8
 require_once('require/class.Spotter.php');
9 9
 require_once('require/class.Language.php');
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12 12
 $spotter_array = $Spotter->getSpotterDataByRoute($_GET['departure_airport'], $_GET['arrival_airport'], "0,1", $sort);
13 13
   
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Aircraft between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']);
16
+	$title = sprintf(_("Most Common Aircraft between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('route-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Aircraft").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>';
28 28
 
29 29
 	$aircraft_array = $Spotter->countAllAircraftTypesByRoute($_GET['departure_airport'], $_GET['arrival_airport']);
30 30
 	if (!empty($aircraft_array))
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		print '</thead>';
40 40
 		print '<tbody>';
41 41
 		$i = 1;
42
-		foreach($aircraft_array as $aircraft_item)
42
+		foreach ($aircraft_array as $aircraft_item)
43 43
 		{
44 44
 			print '<tr>';
45 45
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
route.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 
6 6
 if ($_POST['departure_airport'] != "" || $_POST['arrival_airport'])
7 7
 {
8
-	$departure_airport = filter_input(INPUT_POST,'departure_airport',FILTER_SANITIZE_STRING);
9
-	$arrival_airport = filter_input(INPUT_POST,'arrival_airport',FILTER_SANITIZE_STRING);
8
+	$departure_airport = filter_input(INPUT_POST, 'departure_airport', FILTER_SANITIZE_STRING);
9
+	$arrival_airport = filter_input(INPUT_POST, 'arrival_airport', FILTER_SANITIZE_STRING);
10 10
 	header('Location: '.$globalURL.'/route/'.$departure_airport.'/'.$arrival_airport);
11 11
 } else {
12 12
 	header('Location: '.$globalURL);
Please login to merge, or discard this patch.