Completed
Push — master ( 9fb3a8...e3409a )
by Yannick
05:58
created
aircraft-detailed.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,16 +5,16 @@  discard block
 block discarded – undo
5 5
 require_once('require/class.Language.php');
6 6
 $Spotter = new Spotter();
7 7
 
8
-if (!isset($_GET['aircraft_type'])){
8
+if (!isset($_GET['aircraft_type'])) {
9 9
 	header('Location: '.$globalURL.'/aircraft');
10 10
 } else {
11 11
 	//calculuation for the pagination
12
-	if(!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2)
12
+	if (!isset($_GET['limit']) || count(explode(",", $_GET['limit'])) < 2)
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,15 +28,15 @@  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
-	$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
31
+	$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/aircraft/'.$aircraft_type;
33 33
 	
34
-	$sort = htmlspecialchars(filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING));
35
-	$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,$limit_start.",".$absolute_difference, $sort);
34
+	$sort = htmlspecialchars(filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING));
35
+	$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, $limit_start.",".$absolute_difference, $sort);
36 36
 	
37 37
 	if (!empty($spotter_array))
38 38
 	{
39
-		$title = sprintf(_("Detailed View for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
39
+		$title = sprintf(_("Detailed View for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
40 40
 		require_once('header.php');
41 41
 	    
42 42
 		print '<div class="select-item">';
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
     		$Stats = new Stats();
47 47
 		$aircraft_types = $Stats->getAllAircraftTypes();
48 48
 		if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
49
-		foreach($aircraft_types as $aircrafttype)
49
+		foreach ($aircraft_types as $aircrafttype)
50 50
 		{
51
-			if($aircraft_type == $aircrafttype['aircraft_icao'])
51
+			if ($aircraft_type == $aircrafttype['aircraft_icao'])
52 52
 			{
53 53
 				print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_manufacturer'].' '.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
54 54
 			} else {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		include('aircraft-sub-menu.php');
76 76
 	        
77 77
 		print '<div class="table column">';
78
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
78
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
79 79
 		  
80 80
 		include('table-output.php');
81 81
 		  
Please login to merge, or discard this patch.
date-statistics-airline.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 
6 6
 $Spotter = new Spotter();
7
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
8
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
9
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
7
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
8
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
9
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
10 10
 else $spotter_array = '';
11 11
 
12 12
 if (!empty($spotter_array))
13 13
 {
14
-	$title = sprintf(_("Most Common Airlines on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
14
+	$title = sprintf(_("Most Common Airlines on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
15 15
 
16 16
 	require_once('header.php');
17 17
 	print '<div class="select-item">';
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	print '</div>';
24 24
 
25 25
 	print '<div class="info column">';
26
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
26
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
27 27
 	print '</div>';
28 28
 
29 29
 	include('date-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Airlines").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
33 33
 
34 34
 	$airline_array = $Spotter->countAllAirlinesByDate($date);
35 35
 	if (!empty($airline_array))
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		print '</thead>';
47 47
 		print '<tbody>';
48 48
 		$i = 1;
49
-		foreach($airline_array as $airline_item)
49
+		foreach ($airline_array as $airline_item)
50 50
 		{
51 51
 			print '<tr>';
52 52
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,11 @@
 block discarded – undo
6 6
 $Spotter = new Spotter();
7 7
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
8 8
 $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
9
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
10
-else $spotter_array = '';
9
+if (isset($_GET['date'])) {
10
+	$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
11
+} else {
12
+	$spotter_array = '';
13
+}
11 14
 
12 15
 if (!empty($spotter_array))
13 16
 {
Please login to merge, or discard this patch.
date-detailed.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,20 +1,20 @@  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
 
6
-if (!isset($_GET['date'])){
6
+if (!isset($_GET['date'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
10 10
 	
11 11
 	//calculuation for the pagination
12
-	if(!isset($_GET['limit']))
12
+	if (!isset($_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,22 +28,22 @@  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
-	$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
31
+	$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/date/'.$date;
33 33
 	
34
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
34
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
35 35
 	if ($sort != '') 
36 36
 	{
37
-		$spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort);
37
+		$spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference, $sort);
38 38
 	} else {
39
-		$spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference);
39
+		$spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference);
40 40
 	}
41 41
 	
42 42
 	
43 43
 	if (!empty($spotter_array))
44 44
 	{
45 45
 		date_default_timezone_set($globalTimezone);
46
-		$title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
46
+		$title = sprintf(_("Detailed View for flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
47 47
 
48 48
 		require_once('header.php');
49 49
 		print '<div class="select-item">';
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
 		print '</div>';
56 56
 
57 57
 		print '<div class="info column">';
58
-		print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
58
+		print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
59 59
 		print '</div>';
60 60
 
61 61
 		include('date-sub-menu.php');
62 62
 		print '<div class="table column">';
63
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
63
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
64 64
  
65 65
 		include('table-output.php');
66 66
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
country-detailed.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-if (!isset($_GET['country'])){
6
+if (!isset($_GET['country'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
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];
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	$country = ucwords(str_replace("-", " ", $_GET['country']));
31 31
 	
32 32
 	$page_url = $globalURL.'/country/'.$_GET['country'];
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	if ($sort != '') {
35 35
 		$spotter_array = $Spotter->getSpotterDataByCountry($country, $limit_start.",".$absolute_difference, $sort);
36 36
 	} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
 	if (!empty($spotter_array))
41 41
 	{
42
-		$title = sprintf(_("Detailed View for Airports &amp; Airlines from %s"),$country);
42
+		$title = sprintf(_("Detailed View for Airports &amp; Airlines from %s"), $country);
43 43
 
44 44
 		require_once('header.php');
45 45
 		print '<div class="select-item">';
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 		print '<select name="country" class="selectpicker" data-live-search="true">';
48 48
 		print '<option></option>';
49 49
 		$all_countries = $Spotter->getAllCountries();
50
-		foreach($all_countries as $all_country)
50
+		foreach ($all_countries as $all_country)
51 51
 		{
52
-			if($country == $all_country['country'])
52
+			if ($country == $all_country['country'])
53 53
 			{
54 54
 				print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
55 55
 			} else {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 		if ($_GET['country'] != "NA")
65 65
 		{
66 66
 			print '<div class="info column">';
67
-			print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
67
+			print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
68 68
 			print '</div>';
69 69
 		} else {
70 70
 			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>';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 		include('country-sub-menu.php');
74 74
 		print '<div class="table column">';
75
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure &amp; arrival) OR airlines from <strong>%s</strong>."),$country).'</p>';
75
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of airports (both departure &amp; arrival) OR airlines from <strong>%s</strong>."), $country).'</p>';
76 76
 
77 77
 		include('table-output.php');
78 78
 		print '<div class="pagination">';
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">';
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
 	print '</form>';
20 20
 	print '</div>';
21 21
 	print '<div class="info column">';
22
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
22
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
23 23
 	print '</div>';
24 24
 
25 25
 	include('date-sub-menu.php');
26 26
 	print '<div class="column">';
27 27
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
28
-	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>';
28
+	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>';
29 29
 
30 30
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByDate($date);
31 31
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             	["'._("Country").'", "'._("# of times").'"], ';
39 39
 
40 40
 	$country_data = '';
41
-	foreach($airport_country_array as $airport_item)
41
+	foreach ($airport_country_array as $airport_item)
42 42
 	{
43 43
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
44 44
 	}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		print '</thead>';
73 73
 		print '<tbody>';
74 74
 		$i = 1;
75
-		foreach($airport_country_array as $airport_item)
75
+		foreach ($airport_country_array as $airport_item)
76 76
 		{
77 77
 			print '<tr>';
78 78
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-airline-country.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
8 8
 
9 9
 $Spotter = new Spotter();
10
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
10
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
11 11
 else $spotter_array = array();
12 12
 
13 13
 if (!empty($spotter_array))
14 14
 {
15
-	$title = sprintf(_("Most Common Airlines by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
15
+	$title = sprintf(_("Most Common Airlines by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
16 16
 	require_once('header.php');
17 17
 	print '<div class="select-item">';
18 18
 	print '<form action="'.$globalURL.'/date" method="post">';
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
23 23
 	print '</div>';
24 24
 
25 25
 	print '<div class="info column">';
26
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
26
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
27 27
 	print '</div>';
28 28
 
29 29
 	include('date-sub-menu.php');
30 30
 	print '<div class="column">';
31 31
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
32
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
32
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
33 33
 
34 34
 	$airline_array = $Spotter->countAllAirlineCountriesByDate($date);
35 35
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             var data = google.visualization.arrayToDataTable([
42 42
             	["'._("Country").'", "'._("# of times").'"], ';
43 43
 	$country_data = '';
44
-	foreach($airline_array as $airline_item)
44
+	foreach ($airline_array as $airline_item)
45 45
 	{
46 46
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
47 47
 	}
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 		print '</thead>';
76 76
 		print '<tbody>';
77 77
 		$i = 1;
78
-		foreach($airline_array as $airline_item)
78
+		foreach ($airline_array as $airline_item)
79 79
 		{
80 80
 			print '<tr>';
81 81
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,11 @@
 block discarded – undo
8 8
 $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
9 9
 
10 10
 $Spotter = new Spotter();
11
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
12
-else $spotter_array = array();
11
+if (isset($_GET['date'])) {
12
+	$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
13
+} else {
14
+	$spotter_array = array();
15
+}
13 16
 
14 17
 if (!empty($spotter_array))
15 18
 {
Please login to merge, or discard this patch.
date-statistics-departure-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
8
+$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
9 9
 
10 10
 if (!empty($spotter_array))
11 11
 {
12
-	$title = sprintf(_("Most Common Departure Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Departure Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 
14 14
 	require_once('header.php');
15 15
 	print '<div class="select-item">';
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 	print '</div>';
22 22
 
23 23
 	print '<div class="info column">';
24
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
24
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
25 25
 	print '</div>';
26 26
 
27 27
 	include('date-sub-menu.php');
28 28
 	print '<div class="column">';
29 29
 	print '<h2>'._("Most Common Departure Airports by Country").'</h2>';
30
-	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
30
+	print '<p>'.sprintf(_("The statistic below shows all departure airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
31 31
 	$airport_country_array = $Spotter->countAllDepartureAirportCountriesByDate($date);
32 32
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
33 33
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             var data = google.visualization.arrayToDataTable([
39 39
             	["'._("Country").'", "'._("# of times").'"], ';
40 40
 	$country_data = '';
41
-	foreach($airport_country_array as $airport_item)
41
+	foreach ($airport_country_array as $airport_item)
42 42
 	{
43 43
 		$country_data .= '[ "'.$airport_item['departure_airport_country'].'",'.$airport_item['airport_departure_country_count'].'],';
44 44
 	}
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 		print '</thead>';
73 73
 		print '<tbody>';
74 74
 		$i = 1;
75
-		foreach($airport_country_array as $airport_item)
75
+		foreach ($airport_country_array as $airport_item)
76 76
 		{
77 77
 			print '<tr>';
78 78
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-route.php 1 patch
Spacing   +7 added lines, -7 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 Routes on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Routes 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">';
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 	print '</div>';
22 22
 
23 23
 	print '<div class="info column">';
24
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
24
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
25 25
 	print '</div>';
26 26
 
27 27
 	include('date-sub-menu.php');
28 28
 	print '<div class="column">';
29 29
 	print '<h2>'._("Most Common Routes").'</h2>';
30
-	print '<p>'.sprintf(_("The statistic below shows the most common routes on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
30
+	print '<p>'.sprintf(_("The statistic below shows the most common routes on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
31 31
 
32 32
 	$route_array = $Spotter->countAllRoutesByDate($date);
33 33
 	if (!empty($route_array))
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 		print '</thead>';
45 45
 		print '<tbody>';
46 46
 		$i = 1;
47
-		foreach($route_array as $route_item)
47
+		foreach ($route_array as $route_item)
48 48
 		{
49 49
 			print '<tr>';
50 50
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-manufacturer.php 1 patch
Spacing   +7 added lines, -7 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 Aircraft Manufacturer on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Aircraft Manufacturer 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">';
@@ -21,13 +21,13 @@  discard block
 block discarded – undo
21 21
 	print '</div>';
22 22
 
23 23
 	print '<div class="info column">';
24
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
24
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
25 25
 	print '</div>';
26 26
 
27 27
 	include('date-sub-menu.php');
28 28
 	print '<div class="column">';
29 29
 	print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>';
30
-	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
30
+	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
31 31
 
32 32
 	$manufacturers_array = $Spotter->countAllAircraftManufacturerByDate($date);
33 33
 	if (!empty($manufacturers_array))
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 		print '</thead>';
43 43
 		print '<tbody>';
44 44
 		$i = 1;
45
-		foreach($manufacturers_array as $manufacturer_item)
45
+		foreach ($manufacturers_array as $manufacturer_item)
46 46
 		{
47 47
 			print '<tr>';
48 48
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.