Completed
Push — master ( 7f80fe...90f8d8 )
by Yannick
08:33
created
ident-statistics-time.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Time of Day").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$hour_array = $Spotter->countAllHoursByIdent($ident);
29 29
 	print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
30 30
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 	$hour_data = '';
34 34
 	$hour_cnt = '';
35 35
 	$last = 0;
36
-	foreach($hour_array as $hour_item)
36
+	foreach ($hour_array as $hour_item)
37 37
 	{
38
-		while($last != $hour_item['hour_name']) {
38
+		while ($last != $hour_item['hour_name']) {
39 39
 			$hour_data .= '"'.$last.':00",';
40 40
 			$hour_cnt .= '0,';
41 41
 			$last++;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		$hour_cnt .= $hour_item['hour_count'].',';
46 46
 	}
47 47
 	$hour_data = "['x',".substr($hour_data, 0, -1)."]";
48
-	$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]";
48
+	$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]";
49 49
 	print 'c3.generate({
50 50
 	    bindto: "#chartHour",
51 51
 	    data: {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 		print '</thead>';
71 71
 		print '<tbody>';
72 72
 		$i = 1;
73
-		foreach($hour_array as $hour_item)
73
+		foreach ($hour_array as $hour_item)
74 74
 		{
75 75
 			print '<tr>';
76 76
 			print '<td>'.$hour_item['hour_name'].':00</td>';
Please login to merge, or discard this patch.
route-statistics-airline-country.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
 require_once('require/class.Spotter.php');
9 9
 require_once('require/class.Language.php');
10 10
 $Spotter = new Spotter();
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING);
13
-$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING);
13
+$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING);
14 14
 $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines by Country 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']);
18
+	$title = sprintf(_("Most Common Airlines by Country 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']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="info column">';
21 21
 	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>';
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	include('route-sub-menu.php');
27 27
 	print '<div class="column">';
28 28
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
29
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin 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>';
29
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin 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>';
30 30
 
31 31
 	$airline_array = $Spotter->countAllAirlineCountriesByRoute($departure_airport, $arrival_airport);
32 32
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
36 36
 	print 'var series = [';
37 37
 	$country_data = '';
38
-	foreach($airline_array as $airline_item)
38
+	foreach ($airline_array as $airline_item)
39 39
 	{
40 40
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
41 41
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		print '</thead>';
83 83
 		print '<tbody>';
84 84
 		$i = 1;
85
-		foreach($airline_array as $airline_item)
85
+		foreach ($airline_array as $airline_item)
86 86
 		{
87 87
 			print '<tr>';
88 88
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-arrival-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 Arrival Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Arrival Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 	require_once('header.php');
14 14
 	print '<div class="select-item">';
15 15
 	print '<form action="'.$globalURL.'/date" method="post" class="form-inline">';
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
27 27
 	print '<br />';
28 28
 	print '<div class="info column">';
29
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
29
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
30 30
 	print '</div>';
31 31
 
32 32
 	include('date-sub-menu.php');
33 33
 	print '<div class="column">';
34 34
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
35
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
35
+	print '<p>'.sprintf(_("The statistic below shows all arrival 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 36
 
37 37
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByDate($date);
38 38
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.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['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_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.
manufacturer-statistics-departure-airport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", 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 Departure Airports from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Departure Airports from %s"), $manufacturer);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25 25
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
26
-	foreach($all_manufacturers as $all_manufacturer)
26
+	foreach ($all_manufacturers as $all_manufacturer)
27 27
 	{
28
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
28
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29 29
 		{
30 30
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
31 31
 		} else {
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	include('manufacturer-sub-menu.php');
45 45
 	print '<div class="column">';
46 46
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByManufacturer($manufacturer);
49 49
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
50 50
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	print '<script>';
54 54
 	print 'var series = [';
55 55
 	$airport_data = '';
56
-	foreach($airport_airport_array as $airport_item)
56
+	foreach ($airport_airport_array as $airport_item)
57 57
 	{
58 58
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
59 59
 	}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	print '</thead>';
109 109
 	print '<tbody>';
110 110
 	$i = 1;
111
-	foreach($airport_airport_array as $airport_item)
111
+	foreach ($airport_airport_array as $airport_item)
112 112
 	{
113 113
 		print '<tr>';
114 114
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
manufacturer-statistics-airline-country.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 $Spotter = new Spotter();
11
-$manufacturer = ucwords(str_replace("-", " ", 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 Airlines by Country from %s"),$manufacturer);
17
+	$title = sprintf(_("Most Common Airlines by Country 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 Airlines by Country").'</h2>';
47
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>';
47
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>';
48 48
 	$airline_array = $Spotter->countAllAirlineCountriesByManufacturer($manufacturer);
49 49
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
50 50
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
53 53
 	print 'var series = [';
54 54
 	$country_data = '';
55
-	foreach($airline_array as $airline_item)
55
+	foreach ($airline_array as $airline_item)
56 56
 	{
57 57
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
58 58
 	}
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		print '</thead>';
100 100
 		print '<tbody>';
101 101
 		$i = 1;
102
-		foreach($airline_array as $airline_item)
102
+		foreach ($airline_array as $airline_item)
103 103
 		{
104 104
 			print '<tr>';
105 105
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-time.php 1 patch
Spacing   +10 added lines, -10 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 Time of Day on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Time of Day on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 	require_once('header.php');
14 14
 	print '<div class="select-item">';
15 15
 	print '<form action="'.$globalURL.'/date" method="post" class="form-inline">';
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
27 27
 	print '<br />';
28 28
 	print '<div class="info column">';
29
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
29
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
30 30
 	print '</div>';
31 31
 
32 32
 	include('date-sub-menu.php');
33 33
 	print '<div class="column">';
34 34
 	print '<h2>'._("Most Common Time of Day").'</h2>';
35
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
35
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
36 36
 
37 37
 	$hour_array = $Spotter->countAllHoursByDate($date);
38 38
 	print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 	$hour_data = '';
43 43
 	$hour_cnt = '';
44 44
 	$last = 0;
45
-	foreach($hour_array as $hour_item)
45
+	foreach ($hour_array as $hour_item)
46 46
 	{
47
-		while($last != $hour_item['hour_name']) {
47
+		while ($last != $hour_item['hour_name']) {
48 48
 			$hour_data .= '"'.$last.':00",';
49 49
 			$hour_cnt .= '0,';
50 50
 			$last++;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 		$hour_cnt .= $hour_item['hour_count'].',';
55 55
 	}
56 56
 	$hour_data = "['x',".substr($hour_data, 0, -1)."]";
57
-	$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]";
57
+	$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]";
58 58
 	print 'c3.generate({
59 59
 	    bindto: "#chartHour",
60 60
 	    data: {
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		print '</thead>';
80 80
 		print '<tbody>';
81 81
 		$i = 1;
82
-		foreach($hour_array as $hour_item)
82
+		foreach ($hour_array as $hour_item)
83 83
 		{
84 84
 			print '<tr>';
85 85
 			print '<td>'.$hour_item['hour_name'].':00</td>';
Please login to merge, or discard this patch.
manufacturer-statistics-arrival-airport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
12
-$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'aircraft_manufacturer',FILTER_SANITIZE_STRING)));
13
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
14
-$spotter_array = $Spotter->getSpotterDataByManufacturer($manufacturer,"0,1", $sort);
12
+$manufacturer = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'aircraft_manufacturer', FILTER_SANITIZE_STRING)));
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 Arrival Airports from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Arrival Airports from %s"), $manufacturer);
19 19
 
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$all_manufacturers = $Stats->getAllManufacturers();
26 26
 	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
27
-	foreach($all_manufacturers as $all_manufacturer)
27
+	foreach ($all_manufacturers as $all_manufacturer)
28 28
 	{
29
-		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
29
+		if ($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
30 30
 		{
31 31
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])).'" selected="selected">'.$all_manufacturer['aircraft_manufacturer'].'</option>';
32 32
 		} else {
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	include('manufacturer-sub-menu.php');
46 46
 	print '<div class="column">';
47 47
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
48
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."),$manufacturer).'</p>';
48
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s</strong>."), $manufacturer).'</p>';
49 49
 	$airport_airport_array = $Spotter->countAllArrivalAirportsByManufacturer($manufacturer);
50 50
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
51 51
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	print '<script>';
55 55
 	print 'var series = [';
56 56
 	$airport_data = '';
57
-	foreach($airport_airport_array as $airport_item)
57
+	foreach ($airport_airport_array as $airport_item)
58 58
 	{
59 59
 		$airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],';
60 60
 	}
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	print '</thead>';
110 110
 	print '<tbody>';
111 111
 	$i = 1;
112
-	foreach($airport_airport_array as $airport_item)
112
+	foreach ($airport_airport_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.
airline-statistics-time.php 1 patch
Spacing   +10 added lines, -10 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 '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
69 69
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
 	$hour_data = '';
73 73
 	$hour_cnt = '';
74 74
 	$last = 0;
75
-	foreach($hour_array as $hour_item)
75
+	foreach ($hour_array as $hour_item)
76 76
 	{
77
-		while($last != $hour_item['hour_name']) {
77
+		while ($last != $hour_item['hour_name']) {
78 78
 			$hour_data .= '"'.$last.':00",';
79 79
 			$hour_cnt .= '0,';
80 80
 			$last++;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		$hour_cnt .= $hour_item['hour_count'].',';
85 85
 	}
86 86
 	$hour_data = "[".substr($hour_data, 0, -1)."]";
87
-	$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]";
87
+	$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]";
88 88
 	print 'c3.generate({
89 89
 	    bindto: "#chartHour",
90 90
 	    data: {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 		print '</thead>';
105 105
 		print '<tbody>';
106 106
 		$i = 1;
107
-		foreach($hour_array as $hour_item)
107
+		foreach ($hour_array as $hour_item)
108 108
 		{
109 109
 			print '<tr>';
110 110
 			print '<td>'.$hour_item['hour_name'].':00</td>';
Please login to merge, or discard this patch.
pilot-statistics-departure-airport.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,18 +7,18 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$pilot = filter_input(INPUT_GET,'pilot',FILTER_SANITIZE_STRING);
12
-$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT);
13
-$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$pilot = filter_input(INPUT_GET, 'pilot', FILTER_SANITIZE_STRING);
12
+$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT);
13
+$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT);
14 14
 $filter = array();
15
-if ($year != '') $filter = array_merge($filter,array('year' => $year));
16
-if ($month != '') $filter = array_merge($filter,array('month' => $month));
17
-$spotter_array = $Spotter->getSpotterDataByPilot($pilot,"0,1", $sort,$filter);
15
+if ($year != '') $filter = array_merge($filter, array('year' => $year));
16
+if ($month != '') $filter = array_merge($filter, array('month' => $month));
17
+$spotter_array = $Spotter->getSpotterDataByPilot($pilot, "0,1", $sort, $filter);
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Departure Airports of %s"),$spotter_array[0]['pilot_name']);
21
+	$title = sprintf(_("Most Common Departure Airports of %s"), $spotter_array[0]['pilot_name']);
22 22
 	require_once('header.php');
23 23
 	print '<div class="info column">';
24 24
 	print '<h1>'.$spotter_array[0]['pilot_name'].'</h1>';
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	include('pilot-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."),$spotter_array[0]['pilot_name']).'</p>';
33
-	$airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($pilot,$filter);
32
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights piloted by <strong>%s</strong>."), $spotter_array[0]['pilot_name']).'</p>';
33
+	$airport_airport_array = $Spotter->countAllDepartureAirportsByPilot($pilot, $filter);
34 34
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
35 35
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
36 36
 	print '<script type="text/javascript" src="'.$globalURL.'/js/datamaps.world.min.js"></script>';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	print '<script>';
39 39
 	print 'var series = [';
40 40
 	$airport_data = '';
41
-	foreach($airport_airport_array as $airport_item)
41
+	foreach ($airport_airport_array as $airport_item)
42 42
 	{
43 43
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
44 44
 	}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	print '</thead>';
94 94
 	print '<tbody>';
95 95
 	$i = 1;
96
-	foreach($airport_airport_array as $airport_item)
96
+	foreach ($airport_airport_array as $airport_item)
97 97
 	{
98 98
 		print '<tr>';
99 99
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.