Completed
Push — master ( e17801...597a61 )
by Yannick
25:55
created
airport-statistics-aircraft.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['airport'])) {
7
-        header('Location: '.$globalURL.'/airport');
8
-        die();
7
+		header('Location: '.$globalURL.'/airport');
8
+		die();
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,13 +9,13 @@  discard block
 block discarded – undo
9 9
 }
10 10
 $Spotter = new Spotter();
11 11
 
12
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
13
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
12
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
13
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
14 14
 $airport_array = $Spotter->getAllAirportInfo($airport);
15 15
 
16 16
 if (!empty($airport_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
18
+	$title = sprintf(_("Most Common Aircraft to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/airport" method="post">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 	$airport_names = $Stats->getAllAirportNames();
26 26
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
27 27
 	ksort($airport_names);
28
-	foreach($airport_names as $airport_name)
28
+	foreach ($airport_names as $airport_name)
29 29
 	{
30
-		if($airport == $airport_name['airport_icao'])
30
+		if ($airport == $airport_name['airport_icao'])
31 31
 		{
32 32
 			print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
33 33
 		} else {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	include('airport-sub-menu.php');
59 59
 	print '<div class="column">';
60 60
 	print '<h2>'._("Most Common Aircraft").'</h2>';
61
- 	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
61
+ 	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
62 62
 	
63 63
 	$aircraft_array = $Spotter->countAllAircraftTypesByAirport($airport);
64 64
 	if (!empty($aircraft_array))
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		print '</thead>';
74 74
 		print '<tbody>';
75 75
 		$i = 1;
76
-		foreach($aircraft_array as $aircraft_item)
76
+		foreach ($aircraft_array as $aircraft_item)
77 77
 		{
78 78
 			print '<tr>';
79 79
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$airport_names = $Stats->getAllAirportNames();
26
-	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
26
+	if (empty($airport_names)) {
27
+		$airport_names = $Spotter->getAllAirportNames();
28
+	}
27 29
 	ksort($airport_names);
28 30
 	foreach($airport_names as $airport_name)
29 31
 	{
Please login to merge, or discard this patch.
manufacturer-statistics-arrival-airport.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this 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.
date-statistics-aircraft.php 2 patches
Spacing   +7 added lines, -7 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
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-if (isset($_GET['date'])) $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
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
9 9
 else $spotter_array = array();
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Aircraft on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13
+	$title = sprintf(_("Most Common Aircraft on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
14 14
 	require_once('header.php');
15 15
 	print '<div class="select-item">';
16 16
 	print '<form action="'.$globalURL.'/date" method="post" class="form-inline">';
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 	print '<br />';
29 29
 
30 30
 	print '<div class="info column">';
31
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
31
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
32 32
 	print '</div>';
33 33
 
34 34
 	include('date-sub-menu.php');
35 35
 	print '<div class="column">';
36 36
 	print '<h2>'._("Most Common Aircraft").'</h2>';
37
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
38 38
 	
39 39
 	$aircraft_array = $Spotter->countAllAircraftTypesByDate($date);
40 40
 	if (!empty($aircraft_array))
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		print '</thead>';
50 50
 		print '<tbody>';
51 51
 		$i = 1;
52
-		foreach($aircraft_array as $aircraft_item)
52
+		foreach ($aircraft_array as $aircraft_item)
53 53
 		{
54 54
 			print '<tr>';
55 55
 			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
@@ -5,8 +5,11 @@
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7 7
 $date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
9
-else $spotter_array = array();
8
+if (isset($_GET['date'])) {
9
+	$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
10
+} else {
11
+	$spotter_array = array();
12
+}
10 13
 
11 14
 if (!empty($spotter_array))
12 15
 {
Please login to merge, or discard this patch.
ident-statistics-arrival-airport-country.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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         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 Arrival Airports by Country of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Arrival Airports by Country 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 Arrival Airports by Country").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByIdent($ident);
29 29
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
30 30
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>'; 
33 33
 	print 'var series = [';
34 34
 	$country_data = '';
35
-	foreach($airport_country_array as $airport_item)
35
+	foreach ($airport_country_array as $airport_item)
36 36
 	{
37 37
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
38 38
 	}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 		print '</thead>';
81 81
 		print '<tbody>';
82 82
 		$i = 1;
83
-		foreach($airport_country_array as $airport_item)
83
+		foreach ($airport_country_array as $airport_item)
84 84
 		{
85 85
 			print '<tr>';
86 86
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
accident-detailed.php 2 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,12 @@
 block discarded – undo
58 58
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
59 59
 	include('table-output.php');
60 60
 	print '<div class="pagination">';
61
-	if ($limit_previous_1 >= 0) print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
62
-	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
61
+	if ($limit_previous_1 >= 0) {
62
+		print '<a href="'.$page_url.'/'.$limit_previous_1.','.$limit_previous_2.'">&laquo;'._("Previous Page").'</a>';
63
+	}
64
+	if ($spotter_array[0]['query_number_rows'] == $absolute_difference) {
65
+		print '<a href="'.$page_url.'/'.$limit_end.','.$limit_next.'">'._("Next Page").'&raquo;</a>';
66
+	}
63 67
 	print '</div>';
64 68
 }
65 69
 print '</div>';
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 {
11 11
 	$date = date('Y-m-d');
12 12
 } else {
13
-	$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
13
+	$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
14 14
 }
15 15
 
16
-if(!isset($_GET['limit']))
16
+if (!isset($_GET['limit']))
17 17
 {
18 18
 	$limit_start = 0;
19 19
 	$limit_end = 25;
@@ -48,25 +48,25 @@  discard block
 block discarded – undo
48 48
 print '<br />';
49 49
 
50 50
 print '<div class="info column">';
51
-if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) {
52
-	print '<h1>'.sprintf(_("Accidents from %s"),date("l F j, Y",strtotime($date))).'</h1>';
53
-} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) {
54
-	print '<h1>'.sprintf(_("Accidents from %s"),date("F, Y",strtotime($date))).'</h1>';
55
-} elseif (preg_match('/^[0-9]{4}$/',$date)) {
56
-	print '<h1>'.sprintf(_("Accidents from %s"),$date).'</h1>';
51
+if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) {
52
+	print '<h1>'.sprintf(_("Accidents from %s"), date("l F j, Y", strtotime($date))).'</h1>';
53
+} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) {
54
+	print '<h1>'.sprintf(_("Accidents from %s"), date("F, Y", strtotime($date))).'</h1>';
55
+} elseif (preg_match('/^[0-9]{4}$/', $date)) {
56
+	print '<h1>'.sprintf(_("Accidents from %s"), $date).'</h1>';
57 57
 }
58 58
 print '</div>';
59 59
 
60 60
 print '<div class="table column">';
61 61
 
62
-if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/',$date)) {
63
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>';
64
-} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/',$date)) {
65
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),date("M, Y",strtotime($date))).'</p>';
66
-} elseif (preg_match('/^[0-9]{4}$/',$date)) {
67
-	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."),$date).'</p>';
62
+if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $date)) {
63
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>';
64
+} elseif (preg_match('/^[0-9]{4}-[0-9]{2}$/', $date)) {
65
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), date("M, Y", strtotime($date))).'</p>';
66
+} elseif (preg_match('/^[0-9]{4}$/', $date)) {
67
+	print '<p>'.sprintf(_("The table below shows the Accidents on <strong>%s</strong>."), $date).'</p>';
68 68
 }
69
-$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'accident',$date);
69
+$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'accident', $date);
70 70
 //print_r($spotter_array);
71 71
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
72 72
 	include('table-output.php');
Please login to merge, or discard this patch.
manufacturer-statistics-arrival-airport-country.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@
 block discarded – undo
22 22
 	print '<select name="aircraft_manufacturer" class="selectpicker" data-live-search="true">';
23 23
 	$Stats = new Stats();
24 24
 	$all_manufacturers = $Stats->getAllManufacturers();
25
-	if (empty($all_manufacturers)) $all_manufacturers = $Spotter->getAllManufacturers();
25
+	if (empty($all_manufacturers)) {
26
+		$all_manufacturers = $Spotter->getAllManufacturers();
27
+	}
26 28
 	foreach($all_manufacturers as $all_manufacturer)
27 29
 	{
28 30
 		if($_GET['aircraft_manufacturer'] == strtolower(str_replace(" ", "-", $all_manufacturer['aircraft_manufacturer'])))
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 require_once('require/class.Stats.php');
5 5
 require_once('require/class.Language.php');
6 6
 if (!isset($_GET['aircraft_manufacturer'])) {
7
-        header('Location: '.$globalURL.'/manufacturer');
8
-        die();
7
+		header('Location: '.$globalURL.'/manufacturer');
8
+		die();
9 9
 }
10 10
 
11 11
 $Spotter = new Spotter();
Please login to merge, or discard this 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 by Country from %s"),$manufacturer);
18
+	$title = sprintf(_("Most Common Arrival Airports by Country 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 by Country").'</h2>';
48
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."),$manufacturer).'</p>';
48
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s</strong>."), $manufacturer).'</p>';
49 49
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByManufacturer($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>';
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>'; 
54 54
 	print 'var series = [';
55 55
 	$country_data = '';
56
-	foreach($airport_country_array as $airport_item)
56
+	foreach ($airport_country_array as $airport_item)
57 57
 	{
58 58
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
59 59
 	}
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		print '</thead>';
102 102
 		print '<tbody>';
103 103
 		$i = 1;
104
-		foreach($airport_country_array as $airport_item)
104
+		foreach ($airport_country_array as $airport_item)
105 105
 		{
106 106
 			print '<tr>';
107 107
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
ident-statistics-departure-airport.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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         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 Departure Airports of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Departure Airports 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 Departure Airports").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByIdent($ident);
29 29
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
30 30
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	print '<script>';
34 34
 	print 'var series = [';
35 35
 	$airport_data = '';
36
-	foreach($airport_airport_array as $airport_item)
36
+	foreach ($airport_airport_array as $airport_item)
37 37
 	{
38 38
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_name'].' ('.$airport_item['airport_departure_icao'].')",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
39 39
 	}
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	print '</thead>';
89 89
 	print '<tbody>';
90 90
 	$i = 1;
91
-	foreach($airport_airport_array as $airport_item)
91
+	foreach ($airport_airport_array as $airport_item)
92 92
 	{
93 93
 		print '<tr>';
94 94
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
live-sat-czml.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 
21 21
 $spotter_array = array();
22 22
 if (isset($_COOKIE['sattypes']) && $_COOKIE['sattypes'] != '') {
23
-	$sattypes = explode(',',$_COOKIE['sattypes']);
23
+	$sattypes = explode(',', $_COOKIE['sattypes']);
24 24
 	foreach ($sattypes as $sattype) {
25
-		$spotter_array = array_merge($Satellite->position_all_type($sattype,$timeb-$globalLiveInterval,$timeb),$spotter_array);
25
+		$spotter_array = array_merge($Satellite->position_all_type($sattype, $timeb - $globalLiveInterval, $timeb), $spotter_array);
26 26
 	}
27 27
 }
28 28
 if (isset($_COOKIE['displayiss']) && $_COOKIE['displayiss']) {
29
-	$spotter_array = array_merge($Satellite->position('ISS (ZARYA)',time()-$globalLiveInterval,time()),$spotter_array);
30
-	$spotter_array = array_merge($Satellite->position('TIANGONG 1',time()-$globalLiveInterval,time()),$spotter_array);
31
-	$spotter_array = array_merge($Satellite->position('TIANGONG-2',time()-$globalLiveInterval,time()),$spotter_array);
29
+	$spotter_array = array_merge($Satellite->position('ISS (ZARYA)', time() - $globalLiveInterval, time()), $spotter_array);
30
+	$spotter_array = array_merge($Satellite->position('TIANGONG 1', time() - $globalLiveInterval, time()), $spotter_array);
31
+	$spotter_array = array_merge($Satellite->position('TIANGONG-2', time() - $globalLiveInterval, time()), $spotter_array);
32 32
 }
33
-$spotter_array = array_unique($spotter_array,SORT_REGULAR);
33
+$spotter_array = array_unique($spotter_array, SORT_REGULAR);
34 34
 /*
35 35
 $modelsdb = array();
36 36
 if (file_exists('models/space/space_modelsdb')) {
@@ -54,14 +54,14 @@  discard block
 block discarded – undo
54 54
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "LOOP_STOP","step": "SYSTEM_CLOCK_MULTIPLIER"}';
55 55
 
56 56
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
57
-$output .= ',"clock": {"currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
57
+$output .= ',"clock": {"currentTime" : "'.date("c", time() - $globalLiveInterval).'","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
58 58
 //$output .= ',"clock": {"currentTime" : "%minitime%","multiplier" : 1,"range" : "UNBOUNDED","step": "SYSTEM_CLOCK_MULTIPLIER"}';
59 59
 
60 60
 //	$output .= ',"clock": {"interval" : "'.date("c",time()-$globalLiveInterval).'/'.date("c").'","currentTime" : "'.date("c",time() - $globalLiveInterval).'","multiplier" : 1,"step": "SYSTEM_CLOCK_MULTIPLIER"}';
61 61
 $output .= '},';
62 62
 if (!empty($spotter_array) && is_array($spotter_array))
63 63
 {
64
-	foreach($spotter_array as $spotter_item)
64
+	foreach ($spotter_array as $spotter_item)
65 65
 	{
66 66
 		$j++;
67 67
 		date_default_timezone_set('UTC');
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$orientation = '';
77 77
 			$prev_satname = $spotter_item['name'];
78 78
 			$output .= '{';
79
-			$output .= '"id": "'.trim(str_replace(array('[+]','[-]'),'',$spotter_item['name'])).'",';
79
+			$output .= '"id": "'.trim(str_replace(array('[+]', '[-]'), '', $spotter_item['name'])).'",';
80 80
 			$output .= '"properties": {';
81 81
 			// Not yet supported in CZML with Cesium
82 82
 			$output .= '},';
@@ -114,23 +114,23 @@  discard block
 block discarded – undo
114 114
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubiesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
115 115
 				} elseif ($spotter_item['name'] == 'TERRA') {
116 116
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/terra.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
117
-				} elseif (strpos($spotter_item['name'],'O3B') !== false) {
117
+				} elseif (strpos($spotter_item['name'], 'O3B') !== false) {
118 118
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/o3b.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
119
-				} elseif (strpos($spotter_item['name'],'GLOBALSTAR') !== false) {
119
+				} elseif (strpos($spotter_item['name'], 'GLOBALSTAR') !== false) {
120 120
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/globalstar.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
121
-				} elseif (strpos($spotter_item['name'],'GPS') !== false) {
121
+				} elseif (strpos($spotter_item['name'], 'GPS') !== false) {
122 122
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/gps.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
123
-				} elseif (strpos($spotter_item['name'],'GENESIS') !== false) {
123
+				} elseif (strpos($spotter_item['name'], 'GENESIS') !== false) {
124 124
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/genesis.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
125
-				} elseif (strpos($spotter_item['name'],'OSCAR 7') !== false) {
125
+				} elseif (strpos($spotter_item['name'], 'OSCAR 7') !== false) {
126 126
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/oscar7.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
127
-				} elseif (strpos($spotter_item['name'],'FLOCK') !== false) {
127
+				} elseif (strpos($spotter_item['name'], 'FLOCK') !== false) {
128 128
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/cubesat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
129
-				} elseif (strpos($spotter_item['name'],'PLEIADES') !== false) {
129
+				} elseif (strpos($spotter_item['name'], 'PLEIADES') !== false) {
130 130
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/pleiades.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
131
-				} elseif (strpos($spotter_item['name'],'DUCHIFAT') !== false) {
131
+				} elseif (strpos($spotter_item['name'], 'DUCHIFAT') !== false) {
132 132
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/duchifat.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
133
-				} elseif (strpos($spotter_item['name'],'FORMOSAT-2') !== false) {
133
+				} elseif (strpos($spotter_item['name'], 'FORMOSAT-2') !== false) {
134 134
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/formosat2.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
135 135
 				} elseif ($spotter_item['type'] == 'iridium') {
136 136
 					$output .= '"model": {"gltf" : "'.$globalURL.'/models/space/iridium.glb'.'","scale" : 1.0,"minimumPixelSize": 25,"maximunPixelSize": 300 },';
@@ -152,14 +152,14 @@  discard block
 block discarded – undo
152 152
 	//		$output .= '"epoch" : "'.date("c",strtotime($spotter_item['date'])).'", ';
153 153
 			$output .= '"interpolationAlgorithm":"HERMITE","interpolationDegree":3,';
154 154
 			$output .= '"cartographicDegrees": [';
155
-			$output .= '"'.date("c",$spotter_item['timestamp']).'", ';
155
+			$output .= '"'.date("c", $spotter_item['timestamp']).'", ';
156 156
 			$output .= $spotter_item['longitude'].', ';
157 157
 			$output .= $spotter_item['latitude'].', ';
158 158
 			$output .= $spotter_item['altitude']*1000;
159 159
 			$orientation = '"orientation" : { ';
160 160
 			$orientation .= '"unitQuaternion": [';
161 161
 		} else {
162
-			$output .= ',"'.date("c",$spotter_item['timestamp']).'", ';
162
+			$output .= ',"'.date("c", $spotter_item['timestamp']).'", ';
163 163
 			$output .= $spotter_item['longitude'].', ';
164 164
 			$output .= $spotter_item['latitude'].', ';
165 165
 			$output .= $spotter_item['altitude']*1000;
Please login to merge, or discard this patch.
ident-statistics-aircraft.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['ident'])) {
6
-        header('Location: '.$globalURL.'/ident');
7
-        die();
6
+		header('Location: '.$globalURL.'/ident');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@  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);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12 12
 if ($sort != '') {
13
-	$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
13
+	$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
14 14
 } else {
15
-	$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", '');
15
+	$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", '');
16 16
 }
17 17
 
18 18
 if (!empty($spotter_array))
19 19
 {
20
-	$title = sprintf(_("Most Common Aircraft of %s"),$spotter_array[0]['ident']);
20
+	$title = sprintf(_("Most Common Aircraft of %s"), $spotter_array[0]['ident']);
21 21
 	require_once('header.php');
22 22
 	print '<div class="info column">';
23 23
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	include('ident-sub-menu.php');
29 29
 	print '<div class="column">';
30 30
 	print '<h2>'._("Most Common Aircraft").'</h2>';
31
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
31
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
32 32
 
33 33
 	$aircraft_array = $Spotter->countAllAircraftTypesByIdent($ident);
34 34
 	if (!empty($aircraft_array))
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		print '</thead>';
44 44
 		print '<tbody>';
45 45
 		$i = 1;
46
-		foreach($aircraft_array as $aircraft_item)
46
+		foreach ($aircraft_array as $aircraft_item)
47 47
 		{
48 48
 			print '<tr>';
49 49
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.