Completed
Push — master ( e02292...8795ac )
by Yannick
09:22 queued 02:55
created
aircraft-statistics-registration.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/aircraft');
8 8
         die();
9 9
 }
10
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
13 13
 
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Aircraft by Registration from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$aircraft_types = $Stats->getAllAircraftTypes();
25 25
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
-	foreach($aircraft_types as $aircrafttype)
26
+	foreach ($aircraft_types as $aircrafttype)
27 27
 	{
28
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
28
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
29 29
 		{
30 30
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
31 31
 		} else {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('aircraft-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Aircraft by Registration").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from aircraft type <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows the most common aircraft by registration of flights from aircraft type <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
55 55
 
56 56
 	$aircraft_array = $Spotter->countAllAircraftRegistrationByAircraft($aircraft_type);
57 57
 	if (!empty($aircraft_array))
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		print '</thead>';
69 69
 		print '<tbody>';
70 70
 		$i = 1;
71
-		foreach($aircraft_array as $aircraft_item)
71
+		foreach ($aircraft_array as $aircraft_item)
72 72
 		{
73 73
 			print '<tr>';
74 74
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-route.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/aircraft');
8 8
         die();
9 9
 }
10
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
10
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
13 13
 
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Routes from %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
17
+	$title = sprintf(_("Most Common Routes from %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
18 18
 	require_once('header.php');
19 19
 	print '<div class="select-item">';
20 20
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
 	$Stats = new Stats();
24 24
 	$aircraft_types = $Stats->getAllAircraftTypes();
25 25
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
-	foreach($aircraft_types as $aircrafttype)
26
+	foreach ($aircraft_types as $aircrafttype)
27 27
 	{
28
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
28
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
29 29
 		{
30 30
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
31 31
 		} else {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('aircraft-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Routes").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows the most common routes from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
55 55
 
56 56
 	$route_array = $Spotter->countAllRoutesByAircraft($aircraft_type);
57 57
 	if (!empty($route_array))
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		print '</thead>';
69 69
 		print '<tbody>';
70 70
 		$i = 1;
71
-		foreach($route_array as $route_item)
71
+		foreach ($route_array as $route_item)
72 72
 		{
73 73
 			print '<tr>';
74 74
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
airport-statistics-time.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
         header('Location: '.$globalURL.'/airport');
8 8
         die();
9 9
 }
10
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
10
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
11 11
 $Spotter = new Spotter();
12
-$spotter_array = $Spotter->getSpotterDataByAirport($airport,"0,1","");
12
+$spotter_array = $Spotter->getSpotterDataByAirport($airport, "0,1", "");
13 13
 $airport_array = $Spotter->getAllAirportInfo($airport);
14 14
 
15 15
 if (!empty($airport_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
17
+	$title = sprintf(_("Most Common Time of Day to/from %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 	$airport_names = $Stats->getAllAirportNames();
26 26
 	if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
27 27
 	ksort($airport_names);
28
-	foreach($airport_names as $airport_name)
28
+	foreach ($airport_names as $airport_name)
29 29
 	{
30
-		if($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 Time of Day").'</h2>';
61
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day 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 time of day to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
62 62
 
63 63
 	$hour_array = $Spotter->countAllHoursByAirport($airport);
64 64
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             var data = google.visualization.arrayToDataTable([
71 71
             	["'._("Hour").'", "'._("# of Flights").'"], ';
72 72
             $hour_data = '';
73
-	foreach($hour_array as $hour_item)
73
+	foreach ($hour_array as $hour_item)
74 74
 	{
75 75
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
76 76
 	}
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
         die();
9 9
 }
10 10
 
11
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
11
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
12 12
 $Spotter = new Spotter();
13
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
13
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
14 14
 
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
18
+	$title = sprintf(_("Most Common Arrival Airports by Country for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
21 21
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26 26
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
27
-	foreach($aircraft_types as $aircrafttype)
27
+	foreach ($aircraft_types as $aircrafttype)
28 28
 	{
29
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
29
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
30 30
 		{
31 31
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
32 32
 		} else {
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	include('aircraft-sub-menu.php');
54 54
 	print '<div class="column">';
55 55
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
56
-  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
56
+  	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
57 57
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByAircraft($aircraft_type);
58 58
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
59 59
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             var data = google.visualization.arrayToDataTable([
65 65
             	["'._("Country").'", "'._("# of times").'"], ';
66 66
         $country_data = '';
67
-	foreach($airport_country_array as $airport_item)
67
+	foreach ($airport_country_array as $airport_item)
68 68
 	{
69 69
 		$country_data .= '[ "'.$airport_item['arrival_airport_country'].'",'.$airport_item['airport_arrival_country_count'].'],';
70 70
 	}
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 		print '</thead>';
98 98
 		print '<tbody>';
99 99
 		$i = 1;
100
-		foreach($airport_country_array as $airport_item)
100
+		foreach ($airport_country_array as $airport_item)
101 101
 		{
102 102
 			print '<tr>';
103 103
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@  discard block
 block discarded – undo
9 9
         die();
10 10
 }
11 11
 
12
-$aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
12
+$aircraft_type = filter_input(INPUT_GET, 'aircraft_type', FILTER_SANITIZE_STRING);
13 13
 
14 14
 $Spotter = new Spotter();
15
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
15
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
16 16
 
17 17
 
18 18
 if (!empty($spotter_array))
19 19
 {
20
-	$title = sprintf(_("Most Common Arrival Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
20
+	$title = sprintf(_("Most Common Arrival Airports for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
21 21
 	require_once('header.php');
22 22
 	print '<div class="select-item">';
23 23
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 	$Stats = new Stats();
27 27
 	$aircraft_types = $Stats->getAllAircraftTypes();
28 28
 	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
29
-	foreach($aircraft_types as $aircrafttype)
29
+	foreach ($aircraft_types as $aircrafttype)
30 30
 	{
31
-		if($aircraft_type == $aircrafttype['aircraft_icao'])
31
+		if ($aircraft_type == $aircrafttype['aircraft_icao'])
32 32
 		{
33 33
 			print '<option value="'.$aircrafttype['aircraft_icao'].'" selected="selected">'.$aircrafttype['aircraft_name'].' ('.$aircrafttype['aircraft_icao'].')</option>';
34 34
 		} else {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	include('aircraft-sub-menu.php');
56 56
 	print '<div class="column">';
57 57
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
58
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s (%s)</strong>."),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']).'</p>';
58
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports of flights from <strong>%s (%s)</strong>."), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']).'</p>';
59 59
 	 $airport_airport_array = $Spotter->countAllArrivalAirportsByAircraft($aircraft_type);
60 60
     	?>
61 61
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         	["<?php echo _("Airport"); ?>", "<?php echo _("# of times"); ?>"],
72 72
 	<?php
73 73
 	$airport_data = '';
74
-	foreach($airport_airport_array as $airport_item)
74
+	foreach ($airport_airport_array as $airport_item)
75 75
 	{
76 76
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
77 77
 		$name = str_replace("'", "", $name);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	print '</thead>';
111 111
 	print '<tbody>';
112 112
 	$i = 1;
113
-	foreach($airport_airport_array as $airport_item)
113
+	foreach ($airport_airport_array as $airport_item)
114 114
 	{
115 115
 		print '<tr>';
116 116
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
atc-geojson.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 	header('Content-disposition: attachment; filename="atc.geojson"');
8 8
 }
9 9
 header('Content-Type: text/javascript');
10
-$ATC=new ATC();
10
+$ATC = new ATC();
11 11
 if (isset($_GET['coord'])) 
12 12
 {
13 13
 	//$coords = explode(',',$_GET['coord']);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $output = '{"type": "FeatureCollection","features": [';
20 20
 if (!empty($spotter_array))
21 21
 {	  
22
-	foreach($spotter_array as $spotter_item)
22
+	foreach ($spotter_array as $spotter_item)
23 23
 	{
24 24
 		date_default_timezone_set('UTC');
25 25
 		//waypoint plotting
Please login to merge, or discard this patch.
search.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
 
17 17
 if (isset($_GET['start_date'])) {
18 18
 	//for the date manipulation into the query
19
-	if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
19
+	if ($_GET['start_date'] != "" && $_GET['end_date'] != "") {
20 20
 		$start_date = $_GET['start_date']." 00:00:00";
21 21
 		$end_date = $_GET['end_date']." 00:00:00";
22 22
 		$sql_date = $start_date.",".$end_date;
23
-	} else if($_GET['start_date'] != ""){
23
+	} else if ($_GET['start_date'] != "") {
24 24
 		$start_date = $_GET['start_date']." 00:00:00";
25 25
 		$sql_date = $start_date;
26
-	} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
26
+	} else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") {
27 27
 		$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date']." 00:00:00";
28 28
 		$sql_date = $end_date;
29 29
 	} else $sql_date = '';
@@ -31,21 +31,21 @@  discard block
 block discarded – undo
31 31
 
32 32
 if (isset($_GET['highest_altitude'])) {
33 33
 	//for altitude manipulation
34
-	if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
34
+	if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") {
35 35
 		$end_altitude = $_GET['highest_altitude'];
36 36
 		$start_altitude = $_GET['lowest_altitude'];
37 37
 		$sql_altitude = $start_altitude.",".$end_altitude;
38
-	} else if($_GET['highest_altitude'] != ""){
38
+	} else if ($_GET['highest_altitude'] != "") {
39 39
 		$end_altitude = $_GET['highest_altitude'];
40 40
 		$sql_altitude = $end_altitude;
41
-	} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
41
+	} else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") {
42 42
 		$start_altitude = $_GET['lowest_altitude'].",60000";
43 43
 		$sql_altitude = $start_altitude;
44 44
 	} else $sql_altitude = '';
45 45
 } else $sql_altitude = '';
46 46
 
47 47
 //calculuation for the pagination
48
-if(!isset($_GET['limit']))
48
+if (!isset($_GET['limit']))
49 49
 {
50 50
 	if (!isset($_GET['number_results']))
51 51
 	{
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 		$limit_end = 25;
54 54
 		$absolute_difference = 25;
55 55
 	} else {
56
-		if ($_GET['number_results'] > 1000){
56
+		if ($_GET['number_results'] > 1000) {
57 57
 			$_GET['number_results'] = 1000;
58 58
 		}
59 59
 		$limit_start = 0;
60 60
 		$limit_end = $_GET['number_results'];
61 61
 		$absolute_difference = $_GET['number_results'];
62 62
 	}
63
-}  else {
63
+} else {
64 64
 	$limit_explode = explode(",", $_GET['limit']);
65 65
 	$limit_start = $limit_explode[0];
66 66
 	$limit_end = $limit_explode[1];
@@ -70,28 +70,28 @@  discard block
 block discarded – undo
70 70
 $limit_previous_1 = $limit_start - $absolute_difference;
71 71
 $limit_previous_2 = $limit_end - $absolute_difference;
72 72
 
73
-if (!empty($_GET)){  
74
-	$q = filter_input(INPUT_GET, 'q',FILTER_SANITIZE_STRING);
75
-	$registration = filter_input(INPUT_GET, 'registration',FILTER_SANITIZE_STRING);
76
-	$aircraft = filter_input(INPUT_GET, 'aircraft',FILTER_SANITIZE_STRING);
77
-	$manufacturer = filter_input(INPUT_GET, 'manufacturer',FILTER_SANITIZE_STRING);
78
-	$highlights = filter_input(INPUT_GET, 'highlights',FILTER_SANITIZE_STRING);
79
-	$airline = filter_input(INPUT_GET, 'airline',FILTER_SANITIZE_STRING);
80
-	$airline_country = filter_input(INPUT_GET, 'airline_country',FILTER_SANITIZE_STRING);
81
-	$airline_type = filter_input(INPUT_GET, 'airline_type',FILTER_SANITIZE_STRING);
82
-	$airport = filter_input(INPUT_GET, 'airport',FILTER_SANITIZE_STRING);
83
-	$airport_country = filter_input(INPUT_GET, 'airport_country',FILTER_SANITIZE_STRING);
84
-	$callsign = filter_input(INPUT_GET, 'callsign',FILTER_SANITIZE_STRING);
85
-	$owner = filter_input(INPUT_GET, 'owner',FILTER_SANITIZE_STRING);
86
-	$pilot_name = filter_input(INPUT_GET, 'pilot_name',FILTER_SANITIZE_STRING);
87
-	$pilot_id = filter_input(INPUT_GET, 'pilot_id',FILTER_SANITIZE_STRING);
88
-	$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route',FILTER_SANITIZE_STRING);
89
-	$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route',FILTER_SANITIZE_STRING);
90
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
91
-	$archive = filter_input(INPUT_GET,'archive',FILTER_SANITIZE_NUMBER_INT);
92
-	$origlat = filter_input(INPUT_GET,'origlat',FILTER_SANITIZE_STRING);
93
-	$origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING);
94
-	$dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT);
73
+if (!empty($_GET)) {  
74
+	$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
75
+	$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
76
+	$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING);
77
+	$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING);
78
+	$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING);
79
+	$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
80
+	$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING);
81
+	$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING);
82
+	$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
83
+	$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING);
84
+	$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING);
85
+	$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING);
86
+	$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING);
87
+	$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING);
88
+	$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING);
89
+	$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING);
90
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
91
+	$archive = filter_input(INPUT_GET, 'archive', FILTER_SANITIZE_NUMBER_INT);
92
+	$origlat = filter_input(INPUT_GET, 'origlat', FILTER_SANITIZE_STRING);
93
+	$origlon = filter_input(INPUT_GET, 'origlon', FILTER_SANITIZE_STRING);
94
+	$dist = filter_input(INPUT_GET, 'dist', FILTER_SANITIZE_NUMBER_INT);
95 95
 	if ($dist != '') {
96 96
 		if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934;
97 97
 		elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852;
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
 	if (!isset($sql_date)) $sql_date = '';
100 100
 	if ($archive == 1) {
101 101
 		$SpotterArchive = new SpotterArchive();
102
-		$spotter_array = $SpotterArchive->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist);
102
+		$spotter_array = $SpotterArchive->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist);
103 103
 	} else {
104
-		$spotter_array = $Spotter->searchSpotterData($q,$registration,$aircraft,strtolower(str_replace("-", " ", $manufacturer)),$highlights,$airline,$airline_country,$airline_type,$airport,$airport_country,$callsign,$departure_airport_route,$arrival_airport_route,$owner,$pilot_id,$pilot_name,$sql_altitude,$sql_date,$limit_start.",".$absolute_difference,$sort,'',$origlat,$origlon,$dist);
104
+		$spotter_array = $Spotter->searchSpotterData($q, $registration, $aircraft, strtolower(str_replace("-", " ", $manufacturer)), $highlights, $airline, $airline_country, $airline_type, $airport, $airport_country, $callsign, $departure_airport_route, $arrival_airport_route, $owner, $pilot_id, $pilot_name, $sql_altitude, $sql_date, $limit_start.",".$absolute_difference, $sort, '', $origlat, $origlon, $dist);
105 105
 	}
106 106
 	 
107 107
 	print '<span class="sub-menu-statistic column mobile">';
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
 	//remove 3D=true parameter
135 135
 	$no3D = str_replace("&3D=true", "", $_SERVER['QUERY_STRING']);
136 136
 	$kmlURL = str_replace("http://", "kml://", $globalURL);
137
-	if (!isset($_GET['3D'])){
137
+	if (!isset($_GET['3D'])) {
138 138
 		print '<li><a href="'.$globalURL.'/search?'.$no3D.'" class="active"><i class="fa fa-table"></i> '._("Table").'</a></li>';
139 139
 	} else {
140 140
 		print '<li><span class="notablet"><a href="'.$globalURL.'/search?'.$no3D.'"><i class="fa fa-table"></i> '._("Table").'</a></span></li>';
141 141
 	}
142
-	if (isset($_GET['3D'])){
142
+	if (isset($_GET['3D'])) {
143 143
 		print '<li><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="active"><i class="fa fa-globe"></i> '._("3D Map").'</a></li>';
144 144
 	} else {
145 145
 		print '<li ><a href="'.$globalURL.'/search?'.$no3D.'&3D=true" class="notablet nomobile"><i class="fa fa-globe"></i> '._("3D Map").'</a><a href="'.$kmlURL.'/search/kml?'.htmlentities($_SERVER['QUERY_STRING']).'" class="tablet mobile"><i class="fa fa-globe"></i> 3D Map</a></li>';
@@ -160,30 +160,30 @@  discard block
 block discarded – undo
160 160
 		print '<div class="column">';
161 161
 		print '<div class="info">';
162 162
 		print '<h1>'._("Search Results for").' ';
163
-		if (isset($_GET['q']) && $_GET['q'] != ""){ print _("Keyword:").' <span>'.$_GET['q'].'</span> '; }
164
-		if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; }
165
-		if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; }
166
-		if (isset($_GET['registration']) && $_GET['registration'] != ""){ print _("Registration:").' <span>'.$_GET['registration'].'</span> '; }
167
-		if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; }
168
-		if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; }
169
-		if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; }
170
-		if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; }
171
-		if (isset($_GET['airport']) && $_GET['airport'] != ""){ print _("Airport:").' <span>'.$_GET['airport'].'</span> '; }
172
-		if (isset($_GET['airport_country']) && $_GET['airport_country'] != ""){ print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; }
173
-		if (isset($_GET['callsign']) && $_GET['callsign'] != ""){ print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; }
174
-		if (isset($_GET['owner']) && $_GET['owner'] != ""){ print _("Owner:").' <span>'.$_GET['owner'].'</span> '; }
175
-		if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != ""){ print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; }
176
-		if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != ""){ print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; }
177
-		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")){ print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; }
178
-		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; }
179
-		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != ""){ print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; }
180
-		if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == ""){ print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; }
181
-		if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; }
182
-		if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != ""){ print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; }
183
-		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == ""){ print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; }
184
-		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; }
185
-		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != ""){ print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; }
186
-		if (isset($_GET['number_results']) && $_GET['number_results'] != ""){ print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; }
163
+		if (isset($_GET['q']) && $_GET['q'] != "") { print _("Keyword:").' <span>'.$_GET['q'].'</span> '; }
164
+		if (isset($_GET['aircraft']) && $_GET['aircraft'] != "") { print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; }
165
+		if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != "") { print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; }
166
+		if (isset($_GET['registration']) && $_GET['registration'] != "") { print _("Registration:").' <span>'.$_GET['registration'].'</span> '; }
167
+		if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print _("Highlights:").' <span>'.$_GET['highlights'].'</span> '; }
168
+		if (isset($_GET['airline']) && $_GET['airline'] != "") { print _("Airline:").' <span>'.$_GET['airline'].'</span> '; }
169
+		if (isset($_GET['airline_country']) && $_GET['airline_country'] != "") { print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; }
170
+		if (isset($_GET['airline_type']) && $_GET['airline_type'] != "") { print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; }
171
+		if (isset($_GET['airport']) && $_GET['airport'] != "") { print _("Airport:").' <span>'.$_GET['airport'].'</span> '; }
172
+		if (isset($_GET['airport_country']) && $_GET['airport_country'] != "") { print _("Airport country:").' <span>'.$_GET['airport_country'].'</span> '; }
173
+		if (isset($_GET['callsign']) && $_GET['callsign'] != "") { print _("Callsign:").' <span>'.$_GET['callsign'].'</span> '; }
174
+		if (isset($_GET['owner']) && $_GET['owner'] != "") { print _("Owner:").' <span>'.$_GET['owner'].'</span> '; }
175
+		if (isset($_GET['pilot_id']) && $_GET['pilot_id'] != "") { print _("Pilot id:").' <span>'.$_GET['pilot_id'].'</span> '; }
176
+		if (isset($_GET['pilot_name']) && $_GET['pilot_name'] != "") { print _("Pilot name:").' <span>'.$_GET['pilot_name'].'</span> '; }
177
+		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && (!isset($_GET['arrival_airport_route']) || $_GET['arrival_airport_route'] == "")) { print _("Route out of:").' <span>'.$_GET['departure_airport_route'].'</span> '; }
178
+		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] == "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route into:").' <span>'.$_GET['arrival_airport_route'].'</span> '; }
179
+		if (isset($_GET['departure_airport_route']) && $_GET['departure_airport_route'] != "" && isset($_GET['arrival_airport_route']) && $_GET['arrival_airport_route'] != "") { print _("Route between:").' <span>'.$_GET['departure_airport_route'].'</span> and <span>'.$_GET['arrival_airport_route'].'</span> '; }
180
+		if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] == "") { print _("Date starting at:").' <span>'.$_GET['start_date'].'</span> '; }
181
+		if (isset($_GET['start_date']) && $_GET['start_date'] == "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date ending at:").' <span>'.$_GET['end_date'].'</span> '; }
182
+		if (isset($_GET['start_date']) && $_GET['start_date'] != "" && isset($_GET['end_date']) && $_GET['end_date'] != "") { print _("Date between:").' <span>'.$_GET['start_date'].'</span> and <span>'.$_GET['end_date'].'</span> '; }
183
+		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == "") { print _("Altitude starting at:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '; }
184
+		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude ending at:").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; }
185
+		if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] != "" && isset($_GET['highest_altitude']) && $_GET['highest_altitude'] != "") { print _("Altitude between:").' <span>'.number_format($_GET['lowest_altitude']).' feet</span> '._("and").' <span>'.number_format($_GET['highest_altitude']).' feet</span> '; }
186
+		if (isset($_GET['number_results']) && $_GET['number_results'] != "") { print _("limit per page:").' <span>'.$_GET['number_results'].'</span> '; }
187 187
 		print '</h1>';
188 188
 		print '</div>';
189 189
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 					    </select>
291 291
 					</div>
292 292
 				</div>
293
-				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
293
+				<script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
294 294
 				<div class="form-group">
295 295
 					<label class="control-label col-sm-2"><?php echo _("Type"); ?></label>
296 296
 						<div class="col-sm-10">
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 							</select>
300 300
 						</div>
301 301
 				</div>
302
-				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
302
+				<script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
303 303
 				<div class="form-group">
304 304
 					<label class="control-label col-sm-2"><?php echo _("Registration"); ?></label> 
305 305
 					<div class="col-sm-10">
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 					</div>
323 323
 				</div>
324 324
 <?php
325
-}else {
325
+} else {
326 326
 ?>
327 327
 				<div class="form-group">
328 328
 					<label class="control-label col-sm-2"><?php echo _("Owner name"); ?></label> 
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
 ?>
336 336
 				<div class="form-group">
337 337
 					<div class="col-sm-offset-2 col-sm-10">
338
-					<!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>-->
339
-					<label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true"){ print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label>
338
+					<!--<div><input type="checkbox" class="form-control" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>-->
339
+					<label class="checkbox-inline"><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) if ($_GET['highlights'] == "true") { print 'checked="checked"'; } ?>> <?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label>
340 340
 					</div>
341 341
 				</div>
342 342
 			</fieldset>
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 						</select>
351 351
 					</div>
352 352
 				</div>
353
-				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
353
+				<script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
354 354
 				<div class="form-group">
355 355
 					<label class="control-label col-sm-2"><?php echo _("Country"); ?></label> 
356 356
 					<div class="col-sm-10">
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 						</select>
360 360
 					</div>
361 361
 				</div>
362
-				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
362
+				<script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
363 363
 				<div class="form-group">
364 364
 					<label class="control-label col-sm-2"><?php echo _("Callsign"); ?></label> 
365 365
 					<div class="col-sm-10">
@@ -368,10 +368,10 @@  discard block
 block discarded – undo
368 368
 				</div>
369 369
 				<div class="form-group">
370 370
 					<div class="col-sm-offset-2 col-sm-10">
371
-						<label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all"){ print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label>
372
-						<label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label>
373
-						<label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label>
374
-						<label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ( $_GET['airline_type'] == "military"){ print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label>
371
+						<label class="radio-inline"><input type="radio" name="airline_type" value="all" id="airline_type_all" <?php if (!isset($_GET['airline_type']) || $_GET['airline_type'] == "all") { print 'checked="checked"'; } ?>> <?php echo _("All airlines types"); ?></label>
372
+						<label class="radio-inline"><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "passenger") { print 'checked="checked"'; } ?>> <?php echo _("Only Passenger airlines"); ?></label>
373
+						<label class="radio-inline"><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "cargo") { print 'checked="checked"'; } ?>> <?php echo _("Only Cargo airlines"); ?></label>
374
+						<label class="radio-inline"><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) if ($_GET['airline_type'] == "military") { print 'checked="checked"'; } ?>> <?php echo _("Only Military airlines"); ?></label>
375 375
 					</div>
376 376
 				</div>
377 377
 			</fieldset>
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 						</select>
386 386
 					</div>
387 387
 				</div>
388
-				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
388
+				<script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
389 389
 				<div class="form-group">
390 390
 					<label class="control-label col-sm-2"><?php echo _("Country"); ?></label> 
391 391
 					<div class="col-sm-10">
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 						</select>
395 395
 					</div>
396 396
 				</div>
397
-				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
397
+				<script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
398 398
 			</fieldset>
399 399
 			<fieldset>
400 400
 				<legend><?php echo _("Route"); ?></legend>
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 						</select>
407 407
 					</div>
408 408
 				</div>
409
-				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
409
+				<script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
410 410
 				<div class="form-group">
411 411
 					<label class="control-label col-sm-2"><?php echo _("Arrival Airport"); ?></label> 
412 412
 					<div class="col-sm-10">
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 						</select>
416 416
 					</div>
417 417
 				</div>
418
-				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
418
+				<script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
419 419
 			</fieldset>
420 420
 			<fieldset>
421 421
 				<legend><?php echo _("Date"); ?></legend>
@@ -469,9 +469,9 @@  discard block
 block discarded – undo
469 469
 						<option></option>
470 470
 <?php
471 471
 $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000);
472
-foreach($altitude_array as $altitude)
472
+foreach ($altitude_array as $altitude)
473 473
 {
474
-	if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude)
474
+	if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude)
475 475
 	{
476 476
 		print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>';
477 477
 	} else {
@@ -489,9 +489,9 @@  discard block
 block discarded – undo
489 489
 					<option></option>
490 490
 <?php
491 491
 $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000);
492
-foreach($altitude_array as $altitude)
492
+foreach ($altitude_array as $altitude)
493 493
 {
494
-	if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude)
494
+	if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude)
495 495
 	{
496 496
 		print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>';
497 497
 	} else {
@@ -530,10 +530,10 @@  discard block
 block discarded – undo
530 530
 				<div class="col-sm-10">
531 531
 					<select class="form-control" name="number_results">
532 532
 <?php
533
-$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500,  600, 700, 800, 900, 1000);
534
-foreach($number_results_array as $number)
533
+$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000);
534
+foreach ($number_results_array as $number)
535 535
 {
536
-	if(isset($_GET['number_results']) && $_GET['number_results'] == $number)
536
+	if (isset($_GET['number_results']) && $_GET['number_results'] == $number)
537 537
 	{
538 538
 		print '<option value="'.$number.'" selected="selected">'.$number.'</option>';
539 539
 	} else {
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
 		<fieldset>
552 552
 			<div class="form-group">
553 553
 				<div class="col-sm-offset-2 col-sm-10">
554
-					<label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label>
554
+					<label class="checkbox-inline"><input type="checkbox" name="archive" value="1" /><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label>
555 555
 				</div>
556 556
 			</div>
557 557
 		</fieldset>
Please login to merge, or discard this patch.
space-data.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 <button type="button" class="close">&times;</button>
8 8
 <?php
9 9
 
10
-$sat = filter_input(INPUT_GET,'sat',FILTER_SANITIZE_STRING);
10
+$sat = filter_input(INPUT_GET, 'sat', FILTER_SANITIZE_STRING);
11 11
 $sat = urldecode($sat);
12 12
 
13 13
 if ($sat == 'ISS (ZARYA)') {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	$aircraft_name = 'INTEGRAL';
43 43
 //	$ground_speed = 14970;
44 44
 	$launch_date = '17 October 2002';
45
-} elseif (strpos($sat,'IRIDIUM') !== false) {
45
+} elseif (strpos($sat, 'IRIDIUM') !== false) {
46 46
 	$image = 'https://upload.wikimedia.org/wikipedia/commons/b/b6/Iridium_Satellite.jpg';
47 47
 	$image_copyright = 'Cliff';
48 48
 	$ident = 'Iridium satellite constellation';
@@ -50,22 +50,22 @@  discard block
 block discarded – undo
50 50
 	$aircraft_name = $sat;
51 51
 //	$ground_speed = 14970;
52 52
 //	$launch_date = '29 september 2011';
53
-} elseif (strpos($sat,'ORBCOMM') !== false) {
53
+} elseif (strpos($sat, 'ORBCOMM') !== false) {
54 54
 	$ident = 'Orbcomm';
55 55
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Orbcomm_(satellite)';
56 56
 	$aircraft_name = $sat;
57
-} elseif (strpos($sat,'GLOBALSTAR') !== false) {
57
+} elseif (strpos($sat, 'GLOBALSTAR') !== false) {
58 58
 	$ident = 'Globalstar';
59 59
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/Globalstar';
60 60
 	$aircraft_name = $sat;
61
-} elseif (strpos($sat,'OSCAR 7') !== false) {
61
+} elseif (strpos($sat, 'OSCAR 7') !== false) {
62 62
 	$image = 'https://upload.wikimedia.org/wikipedia/en/a/ad/AMSAT-OSCAR_7.jpg';
63 63
 	$image_copyright = 'Amsat.org';
64 64
 	$ident = 'AMSAT-OSCAR 7';
65 65
 	$aircraft_wiki = 'https://en.wikipedia.org/wiki/AMSAT-OSCAR_7';
66 66
 	$aircraft_name = $sat;
67 67
 	$launch_date = '15 November 1974';
68
-} elseif (strpos($sat,'santaclaus') !== false) {
68
+} elseif (strpos($sat, 'santaclaus') !== false) {
69 69
 	$image = 'https://upload.wikimedia.org/wikipedia/commons/4/49/Jonathan_G_Meath_portrays_Santa_Claus.jpg';
70 70
 	$image_copyright = 'Jonathan G Meath';
71 71
 	$ident = 'Santa Claus';
Please login to merge, or discard this patch.
route-detailed.php 1 patch
Spacing   +8 added lines, -8 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['departure_airport']) || !isset($_GET['arrival_airport'])){
6
+if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])) {
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];
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29 29
 	
30
-	$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING);
31
-	$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
30
+	$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING);
31
+	$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/route/'.$departure_airport.'/'.$arrival_airport;
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->getSpotterDataByRoute($departure_airport, $arrival_airport, $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 flights 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']);
42
+		$title = sprintf(_("Detailed View for flights 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']);
43 43
 		require_once('header.php');
44 44
 		print '<div class="info column">';
45 45
 		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>';
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		include('route-sub-menu.php');
51 51
 		print '<div class="table column">';
52
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."),$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['arrival_airport_icao']).'</p>';
52
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."), $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['arrival_airport_icao']).'</p>';
53 53
     
54 54
 		include('table-output.php'); 
55 55
 		print '<div class="pagination">';
Please login to merge, or discard this patch.