Completed
Branch master (3f174d)
by Yannick
13:43
created
registration-detailed.php 2 patches
Spacing   +7 added lines, -7 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['registration'])){
6
+if (!isset($_GET['registration'])) {
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];
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	$limit_next = $limit_end + $absolute_difference;
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29
-	$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
30
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
29
+	$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
30
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
31 31
 	
32 32
 	$page_url = $globalURL.'/registration/'.$registration;
33 33
 	
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	
41 41
 	if (!empty($spotter_array))
42 42
 	{
43
-		$title = sprintf(_("Detailed View of aircraft with registration %s"),$registration);
43
+		$title = sprintf(_("Detailed View of aircraft with registration %s"), $registration);
44 44
 		require_once('header.php');
45 45
 		print '<div class="info column">';
46 46
 		print '<h1>'.$registration.' - '.$aircraft_array[0]['aircraft_name'].' ('.$aircraft_array[0]['aircraft_icao'].')</h1>';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 		
52 52
 		include('registration-sub-menu.php');
53 53
 		print '<div class="table column">';
54
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of aircraft with the registration <strong>%s</strong>."),$registration).'</p>';
54
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights of aircraft with the registration <strong>%s</strong>."), $registration).'</p>';
55 55
 
56 56
 		include('table-output.php');
57 57
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 
6 6
 if (!isset($_GET['aircraft_type'])) {
7
-        header('Location: '.$globalURL.'/aircraft');
8
-        die();
7
+		header('Location: '.$globalURL.'/aircraft');
8
+		die();
9 9
 }
10 10
 
11 11
 $aircraft_type = filter_input(INPUT_GET,'aircraft_type',FILTER_SANITIZE_STRING);
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
55 55
 	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>';
56 56
 	 $airport_airport_array = $Spotter->countAllArrivalAirportsByAircraft($aircraft_type);
57
-    	?>
57
+		?>
58 58
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
59 59
     	<script>
60 60
     	google.load("visualization", "1", {packages:["geochart"]});
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,24 +8,24 @@  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
 
13 13
 $Spotter = new Spotter();
14
-$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type,"0,1","");
14
+$spotter_array = $Spotter->getSpotterDataByAircraft($aircraft_type, "0,1", "");
15 15
 
16 16
 
17 17
 if (!empty($spotter_array))
18 18
 {
19
-	$title = sprintf(_("Most Common Arrival Airports for %s (%s)"),$spotter_array[0]['aircraft_name'],$spotter_array[0]['aircraft_type']);
19
+	$title = sprintf(_("Most Common Arrival Airports for %s (%s)"), $spotter_array[0]['aircraft_name'], $spotter_array[0]['aircraft_type']);
20 20
 	require_once('header.php');
21 21
 	print '<div class="select-item">';
22 22
 	print '<form action="'.$globalURL.'/aircraft" method="post">';
23 23
 	print '<select name="aircraft_type" class="selectpicker" data-live-search="true">';
24 24
 	print '<option></option>';
25 25
 	$aircraft_types = $Spotter->getAllAircraftTypes();
26
-	foreach($aircraft_types as $aircraft_type)
26
+	foreach ($aircraft_types as $aircraft_type)
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 {
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	include('aircraft-sub-menu.php');
53 53
 	print '<div class="column">';
54 54
 	print '<h2>'._("Most Common Arrival Airports").'</h2>';
55
-	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>';
55
+	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>';
56 56
 	 $airport_airport_array = $Spotter->countAllArrivalAirportsByAircraft($aircraft_type);
57 57
     	?>
58 58
     	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         	["<?php echo _("Airport"); ?>", "<?php echo _("# of times"); ?>"],
69 69
 	<?php
70 70
 	$airport_data = '';
71
-	foreach($airport_airport_array as $airport_item)
71
+	foreach ($airport_airport_array as $airport_item)
72 72
 	{
73 73
 		$name = $airport_item['airport_arrival_city'].', '.$airport_item['airport_arrival_country'].' ('.$airport_item['airport_arrival_icao'].')';
74 74
 		$name = str_replace("'", "", $name);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	print '</thead>';
108 108
 	print '<tbody>';
109 109
 	$i = 1;
110
-	foreach($airport_airport_array as $airport_item)
110
+	foreach ($airport_airport_array as $airport_item)
111 111
 	{
112 112
 		print '<tr>';
113 113
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
ident-statistics-time.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   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
11
-$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
12
-$spotter_array = $Spotter->getSpotterDataByIdent($ident,"0,1", $sort);
10
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
11
+$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
12
+$spotter_array = $Spotter->getSpotterDataByIdent($ident, "0,1", $sort);
13 13
 
14 14
 if (!empty($spotter_array))
15 15
 {
16
-	$title = sprintf(_("Most Common Time of Day of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Time of Day of %s"), $spotter_array[0]['ident']);
17 17
 	require_once('header.php');
18 18
 	print '<div class="info column">';
19 19
 	print '<h1>'.$spotter_array[0]['ident'].'</h1>';
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	include('ident-sub-menu.php');
25 25
 	print '<div class="column">';
26 26
 	print '<h2>'._("Most Common Time of Day").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day of flights with the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 
29 29
 	$hour_array = $Spotter->countAllHoursByIdent($ident);
30 30
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
             var data = google.visualization.arrayToDataTable([
37 37
             	["'._("Hour").'", "'._("# of Flights").'"], ';
38 38
 	$hour_data = '';
39
-	foreach($hour_array as $hour_item)
39
+	foreach ($hour_array as $hour_item)
40 40
 	{
41 41
 		$hour_data .= '[ "'.date("ga", strtotime($hour_item['hour_name'].":00")).'",'.$hour_item['hour_count'].'],';
42 42
 	}
Please login to merge, or discard this patch.
contribute.php 1 patch
Braces   +13 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,21 @@
 block discarded – undo
11 11
     <p>You can contribute to <?php print $globalName; ?> if you have an ADS-B receiver.</p>
12 12
     <h3>You need to : </h3>
13 13
     <ul>
14
-	<li>Create an account on <a href="<?php if (isset($globalContributeLogin)) print $globalContributeLogin.'">'.$globalContributeLogin; else print 'https://login.flightairmap.fr">login.flightairmap.fr'; ?></a></li>
14
+	<li>Create an account on <a href="<?php if (isset($globalContributeLogin)) {
15
+	print $globalContributeLogin.'">'.$globalContributeLogin;
16
+} else {
17
+	print 'https://login.flightairmap.fr">login.flightairmap.fr';
18
+}
19
+?></a></li>
15 20
 	<li>Download dump1090 fork from <a href="https://github.com/Ysurac/dump1090">https://github.com/Ysurac/dump1090</a></li>
16 21
 	<li>Compile zfamup1090 with <em>make zfamup1090</em> (you need to have libcurl installed)</li>
17
-	<li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) print ' --net-zfam-addr '.$globalContributeURL; if (isset($globalContributePort)) print ' --net-zfam-port '.$globalContributePort; ?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li>
22
+	<li>Run zfamup1090 : <em>./zfamup1090 --net-zfam-user YourUsername --net-zfam-pass YourPassword<?php if (isset($globalContributeURL)) {
23
+	print ' --net-zfam-addr '.$globalContributeURL;
24
+}
25
+if (isset($globalContributePort)) {
26
+	print ' --net-zfam-port '.$globalContributePort;
27
+}
28
+?></em> (add <em>--net-bo-ipaddr ipofbeastsource --net-bo-port portofbeastsource</em> if needed, default to 127.0.0.1 and 30005)</li>
18 29
     </ul>
19 30
 </div>
20 31
 <?php
Please login to merge, or discard this patch.
search.php 2 patches
Spacing   +81 added lines, -81 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
 
@@ -286,14 +286,14 @@  discard block
 block discarded – undo
286 286
 						<option></option>
287 287
 					</select>
288 288
 				</div>
289
-				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
289
+				<script type="text/javascript">getSelect('manufacturer','<?php if (isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
290 290
 				<div class="form-group">
291 291
 					<label><?php echo _("Type"); ?></label> 
292 292
 					<select name="aircraft" id="aircrafttypes" class="selectpicker" data-live-search="true">
293 293
 						<option></option>
294 294
 					</select>
295 295
 				</div>
296
-				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
296
+				<script type="text/javascript">getSelect('aircrafttypes','<?php if (isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
297 297
 				<div class="form-group">
298 298
 					<label><?php echo _("Registration"); ?></label> 
299 299
 					<input type="text" name="registration" value="<?php if (isset($_GET['registration'])) print $_GET['registration']; ?>" size="8" />
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 					<input type="text" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $_GET['pilot_name']; ?>" size="15" />
311 311
 				</div>
312 312
 <?php
313
-}else {
313
+} else {
314 314
 ?>
315 315
 				<div class="form-group">
316 316
 					<label><?php echo _("Owner name"); ?></label> 
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 }
321 321
 ?>
322 322
 				<div class="form-group checkbox">
323
-					<div><input type="checkbox" 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>
323
+					<div><input type="checkbox" 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>
324 324
 				</div>
325 325
 			</fieldset>
326 326
 			<fieldset>
@@ -331,23 +331,23 @@  discard block
 block discarded – undo
331 331
 						<option></option>
332 332
 					</select>
333 333
 				</div>
334
-				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
334
+				<script type="text/javascript">getSelect('airlinenames','<?php if (isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
335 335
 				<div class="form-group">
336 336
 					<label><?php echo _("Country"); ?></label> 
337 337
 					<select name="airline_country" id="airlinecountries" class="selectpicker" data-live-search="true">
338 338
 						<option></option>
339 339
 					</select>
340 340
 				</div>
341
-				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
341
+				<script type="text/javascript">getSelect('airlinecountries','<?php if (isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
342 342
 				<div class="form-group">
343 343
 					<label><?php echo _("Callsign"); ?></label> 
344 344
 					<input type="text" name="callsign" value="<?php if (isset($_GET['callsign'])) print $_GET['callsign']; ?>" size="8" />
345 345
 				</div>
346 346
 				<div class="form-group radio">
347
-					<div><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"'; } ?>> <label for="airline_type_all"><?php echo _("All airlines types"); ?></label></div>
348
-					<div><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"'; } ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div>
349
-					<div><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"'; } ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div>
350
-					<div><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"'; } ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div>
347
+					<div><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"'; } ?>> <label for="airline_type_all"><?php echo _("All airlines types"); ?></label></div>
348
+					<div><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"'; } ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div>
349
+					<div><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"'; } ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div>
350
+					<div><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"'; } ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div>
351 351
 				</div>
352 352
 			</fieldset>
353 353
 			<fieldset>
@@ -358,14 +358,14 @@  discard block
 block discarded – undo
358 358
 						<option></option>
359 359
 					</select>
360 360
 				</div>
361
-				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
361
+				<script type="text/javascript">getSelect('airportnames','<?php if (isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
362 362
 				<div class="form-group">
363 363
 					<label><?php echo _("Country"); ?></label> 
364 364
 					<select name="airport_country" id="airportcountries" class="selectpicker" data-live-search="true">
365 365
 						<option></option>
366 366
 					</select>
367 367
 				</div>
368
-				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
368
+				<script type="text/javascript">getSelect('airportcountries','<?php if (isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
369 369
 			</fieldset>
370 370
 			<fieldset>
371 371
 				<legend><?php echo _("Route"); ?></legend>
@@ -375,14 +375,14 @@  discard block
 block discarded – undo
375 375
 						<option></option>
376 376
 					</select>
377 377
 				</div>
378
-				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
378
+				<script type="text/javascript">getSelect('departureairportnames','<?php if (isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
379 379
 				<div class="form-group">
380 380
 					<label><?php echo _("Arrival Airport"); ?></label> 
381 381
 					<select name="arrival_airport_route" id="arrivalairportnames" class="selectpicker" data-live-search="true">
382 382
 						<option></option>
383 383
 					</select>
384 384
 				</div>
385
-				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
385
+				<script type="text/javascript">getSelect('arrivalairportnames','<?php if (isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
386 386
 			</fieldset>
387 387
 			<fieldset>
388 388
 				<legend><?php echo _("Date"); ?></legend>
@@ -432,9 +432,9 @@  discard block
 block discarded – undo
432 432
 					<option></option>
433 433
 <?php
434 434
 $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000);
435
-foreach($altitude_array as $altitude)
435
+foreach ($altitude_array as $altitude)
436 436
 {
437
-	if(isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude)
437
+	if (isset($_GET['lowest_altitude']) && $_GET['lowest_altitude'] == $altitude)
438 438
 	{
439 439
 		print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>';
440 440
 	} else {
@@ -450,9 +450,9 @@  discard block
 block discarded – undo
450 450
 					<option></option>
451 451
 <?php
452 452
 $altitude_array = Array(1000, 5000, 10000, 15000, 20000, 25000, 30000, 35000, 40000, 45000, 50000);
453
-foreach($altitude_array as $altitude)
453
+foreach ($altitude_array as $altitude)
454 454
 {
455
-	if(isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude)
455
+	if (isset($_GET['highest_altitude']) && $_GET['highest_altitude'] == $altitude)
456 456
 	{
457 457
 		print '<option value="'.$altitude.'" selected="selected">'.number_format($altitude).' feet</option>';
458 458
 	} else {
@@ -484,10 +484,10 @@  discard block
 block discarded – undo
484 484
 				<label><?php echo _("Number of Results"); ?></label> 
485 485
 				<select name="number_results">
486 486
 <?php
487
-$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500,  600, 700, 800, 900, 1000);
488
-foreach($number_results_array as $number)
487
+$number_results_array = Array(25, 50, 100, 150, 200, 250, 300, 400, 500, 600, 700, 800, 900, 1000);
488
+foreach ($number_results_array as $number)
489 489
 {
490
-	if(isset($_GET['number_results']) && $_GET['number_results'] == $number)
490
+	if (isset($_GET['number_results']) && $_GET['number_results'] == $number)
491 491
 	{
492 492
 		print '<option value="'.$number.'" selected="selected">'.$number.'</option>';
493 493
 	} else {
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 ?>
504 504
 		<fieldset>
505 505
 			<div class="form-group">
506
-				<label><?php echo sprintf(_("Search in archive (older than %s months)"),$globalArchiveKeepMonths); ?></label>
506
+				<label><?php echo sprintf(_("Search in archive (older than %s months)"), $globalArchiveKeepMonths); ?></label>
507 507
 				<input type="checkbox" name="archive" value="1" />
508 508
 			</div>
509 509
 		</fieldset>
Please login to merge, or discard this patch.
Braces   +112 added lines, -31 removed lines patch added patch discarded remove patch
@@ -26,8 +26,12 @@  discard block
 block discarded – undo
26 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
-	} else $sql_date = '';
30
-} else $sql_date = '';
29
+	} else {
30
+		$sql_date = '';
31
+	}
32
+	} else {
33
+	$sql_date = '';
34
+}
31 35
 
32 36
 if (isset($_GET['highest_altitude'])) {
33 37
 	//for altitude manipulation
@@ -41,8 +45,12 @@  discard block
 block discarded – undo
41 45
 	} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
42 46
 		$start_altitude = $_GET['lowest_altitude'].",60000";
43 47
 		$sql_altitude = $start_altitude;
44
-	} else $sql_altitude = '';
45
-} else $sql_altitude = '';
48
+	} else {
49
+		$sql_altitude = '';
50
+	}
51
+	} else {
52
+	$sql_altitude = '';
53
+}
46 54
 
47 55
 //calculuation for the pagination
48 56
 if(!isset($_GET['limit']))
@@ -60,7 +68,7 @@  discard block
 block discarded – undo
60 68
 		$limit_end = $_GET['number_results'];
61 69
 		$absolute_difference = $_GET['number_results'];
62 70
 	}
63
-}  else {
71
+} else {
64 72
 	$limit_explode = explode(",", $_GET['limit']);
65 73
 	$limit_start = $limit_explode[0];
66 74
 	$limit_end = $limit_explode[1];
@@ -93,10 +101,15 @@  discard block
 block discarded – undo
93 101
 	$origlon = filter_input(INPUT_GET,'origlon',FILTER_SANITIZE_STRING);
94 102
 	$dist = filter_input(INPUT_GET,'dist',FILTER_SANITIZE_NUMBER_INT);
95 103
 	if ($dist != '') {
96
-		if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') $dist = $dist*1.60934;
97
-		elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') $dist = $dist*1.852;
104
+		if (isset($globalDistanceUnit) && $globalDistanceUnit == 'mi') {
105
+			$dist = $dist*1.60934;
106
+		} elseif (isset($globalDistanceUnit) && $globalDistanceUnit == 'nm') {
107
+			$dist = $dist*1.852;
108
+		}
109
+	}
110
+	if (!isset($sql_date)) {
111
+		$sql_date = '';
98 112
 	}
99
-	if (!isset($sql_date)) $sql_date = '';
100 113
 	if ($archive == 1) {
101 114
 		$SpotterArchive = new SpotterArchive();
102 115
 		$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);
@@ -164,7 +177,10 @@  discard block
 block discarded – undo
164 177
 		if (isset($_GET['aircraft']) && $_GET['aircraft'] != ""){ print _("Aircraft:").' <span>'.$_GET['aircraft'].'</span> '; }
165 178
 		if (isset($_GET['manufacturer']) && $_GET['manufacturer'] != ""){ print _("Manufacturer:").' <span>'.$_GET['manufacturer'].'</span> '; }
166 179
 		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> '; }
180
+		if (isset($_GET['highlights'])) {
181
+			if ($_GET['highlights'] == "true"){ print _("Highlights:").' <span>'.$_GET['highlights'].'</span> ';
182
+		}
183
+		}
168 184
 		if (isset($_GET['airline']) && $_GET['airline'] != ""){ print _("Airline:").' <span>'.$_GET['airline'].'</span> '; }
169 185
 		if (isset($_GET['airline_country']) && $_GET['airline_country'] != ""){ print _("Airline country:").' <span>'.$_GET['airline_country'].'</span> '; }
170 186
 		if (isset($_GET['airline_type']) && $_GET['airline_type'] != ""){ print _("Airline type:").' <span>'.$_GET['airline_type'].'</span> '; }
@@ -274,7 +290,10 @@  discard block
 block discarded – undo
274 290
 		<fieldset>
275 291
 			<div class="form-group">
276 292
 				<label><?php echo _("Keywords"); ?></label> 
277
-				<input type="text" id="q" name="q" value="<?php if (isset($_GET['q'])) print $_GET['q']; ?>" size="10" placeholder="<?php echo _("Keywords"); ?>" />
293
+				<input type="text" id="q" name="q" value="<?php if (isset($_GET['q'])) {
294
+	print $_GET['q'];
295
+}
296
+?>" size="10" placeholder="<?php echo _("Keywords"); ?>" />
278 297
 			</div>
279 298
 		</fieldset>
280 299
 		<div class="advanced-form">
@@ -286,41 +305,62 @@  discard block
 block discarded – undo
286 305
 						<option></option>
287 306
 					</select>
288 307
 				</div>
289
-				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) print $_GET['manufacturer']; ?>')</script>
308
+				<script type="text/javascript">getSelect('manufacturer','<?php if(isset($_GET['manufacturer'])) {
309
+	print $_GET['manufacturer'];
310
+}
311
+?>')</script>
290 312
 				<div class="form-group">
291 313
 					<label><?php echo _("Type"); ?></label> 
292 314
 					<select name="aircraft" id="aircrafttypes" class="selectpicker" data-live-search="true">
293 315
 						<option></option>
294 316
 					</select>
295 317
 				</div>
296
-				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) print $_GET['aircraft_icao']; ?>');</script>
318
+				<script type="text/javascript">getSelect('aircrafttypes','<?php if(isset($_GET['aircraft_icao'])) {
319
+	print $_GET['aircraft_icao'];
320
+}
321
+?>');</script>
297 322
 				<div class="form-group">
298 323
 					<label><?php echo _("Registration"); ?></label> 
299
-					<input type="text" name="registration" value="<?php if (isset($_GET['registration'])) print $_GET['registration']; ?>" size="8" />
324
+					<input type="text" name="registration" value="<?php if (isset($_GET['registration'])) {
325
+	print $_GET['registration'];
326
+}
327
+?>" size="8" />
300 328
 				</div>
301 329
 <?php
302 330
 if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) {
303 331
 ?>
304 332
 				<div class="form-group">
305 333
 					<label><?php echo _("Pilot id"); ?></label> 
306
-					<input type="text" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) print $_GET['pilot_id']; ?>" size="15" />
334
+					<input type="text" name="pilot_id" value="<?php if (isset($_GET['pilot_id'])) {
335
+	print $_GET['pilot_id'];
336
+}
337
+?>" size="15" />
307 338
 				</div>
308 339
 				<div class="form-group">
309 340
 					<label><?php echo _("Pilot name"); ?></label> 
310
-					<input type="text" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) print $_GET['pilot_name']; ?>" size="15" />
341
+					<input type="text" name="pilot_name" value="<?php if (isset($_GET['pilot_name'])) {
342
+	print $_GET['pilot_name'];
343
+}
344
+?>" size="15" />
311 345
 				</div>
312 346
 <?php
313
-}else {
347
+} else {
314 348
 ?>
315 349
 				<div class="form-group">
316 350
 					<label><?php echo _("Owner name"); ?></label> 
317
-					<input type="text" name="owner" value="<?php if (isset($_GET['owner'])) print $_GET['owner']; ?>" size="15" />
351
+					<input type="text" name="owner" value="<?php if (isset($_GET['owner'])) {
352
+	print $_GET['owner'];
353
+}
354
+?>" size="15" />
318 355
 				</div>
319 356
 <?php
320 357
 }
321 358
 ?>
322 359
 				<div class="form-group checkbox">
323
-					<div><input type="checkbox" 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>
360
+					<div><input type="checkbox" name="highlights" value="true" id="highlights" <?php if (isset($_GET['highlights'])) {
361
+	if ($_GET['highlights'] == "true"){ print 'checked="checked"';
362
+}
363
+} ?>> <label for="highlights"><?php echo _("Include only aircrafts with special highlights (unique liveries, destinations etc.)"); ?></label></div>
324 364
 				</div>
325 365
 			</fieldset>
326 366
 			<fieldset>
@@ -331,23 +371,41 @@  discard block
 block discarded – undo
331 371
 						<option></option>
332 372
 					</select>
333 373
 				</div>
334
-				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) print $_GET['airline']; ?>');</script>
374
+				<script type="text/javascript">getSelect('airlinenames','<?php if(isset($_GET['airline'])) {
375
+	print $_GET['airline'];
376
+}
377
+?>');</script>
335 378
 				<div class="form-group">
336 379
 					<label><?php echo _("Country"); ?></label> 
337 380
 					<select name="airline_country" id="airlinecountries" class="selectpicker" data-live-search="true">
338 381
 						<option></option>
339 382
 					</select>
340 383
 				</div>
341
-				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) print $_GET['airline_country']; ?>');</script>
384
+				<script type="text/javascript">getSelect('airlinecountries','<?php if(isset($_GET['airline_country'])) {
385
+	print $_GET['airline_country'];
386
+}
387
+?>');</script>
342 388
 				<div class="form-group">
343 389
 					<label><?php echo _("Callsign"); ?></label> 
344
-					<input type="text" name="callsign" value="<?php if (isset($_GET['callsign'])) print $_GET['callsign']; ?>" size="8" />
390
+					<input type="text" name="callsign" value="<?php if (isset($_GET['callsign'])) {
391
+	print $_GET['callsign'];
392
+}
393
+?>" size="8" />
345 394
 				</div>
346 395
 				<div class="form-group radio">
347 396
 					<div><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"'; } ?>> <label for="airline_type_all"><?php echo _("All airlines types"); ?></label></div>
348
-					<div><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"'; } ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div>
349
-					<div><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"'; } ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div>
350
-					<div><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"'; } ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div>
397
+					<div><input type="radio" name="airline_type" value="passenger" id="airline_type_passenger" <?php if (isset($_GET['airline_type'])) {
398
+	if ($_GET['airline_type'] == "passenger"){ print 'checked="checked"';
399
+}
400
+} ?>> <label for="airline_type_passenger"><?php echo _("Only Passenger airlines"); ?></label></div>
401
+					<div><input type="radio" name="airline_type" value="cargo" id="airline_type_cargo" <?php if (isset($_GET['airline_type'])) {
402
+	if ( $_GET['airline_type'] == "cargo"){ print 'checked="checked"';
403
+}
404
+} ?>> <label for="airline_type_cargo"><?php echo _("Only Cargo airlines"); ?></label></div>
405
+					<div><input type="radio" name="airline_type" value="military" id="airline_type_military" <?php if (isset($_GET['airline_type'])) {
406
+	if ( $_GET['airline_type'] == "military"){ print 'checked="checked"';
407
+}
408
+} ?>> <label for="airline_type_military"><?php echo _("Only Military airlines"); ?></label></div>
351 409
 				</div>
352 410
 			</fieldset>
353 411
 			<fieldset>
@@ -358,14 +416,20 @@  discard block
 block discarded – undo
358 416
 						<option></option>
359 417
 					</select>
360 418
 				</div>
361
-				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) print $_GET['airport_icao']; ?>');</script>
419
+				<script type="text/javascript">getSelect('airportnames','<?php if(isset($_GET['airport_icao'])) {
420
+	print $_GET['airport_icao'];
421
+}
422
+?>');</script>
362 423
 				<div class="form-group">
363 424
 					<label><?php echo _("Country"); ?></label> 
364 425
 					<select name="airport_country" id="airportcountries" class="selectpicker" data-live-search="true">
365 426
 						<option></option>
366 427
 					</select>
367 428
 				</div>
368
-				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) print $_GET['airport_country']; ?>');</script>
429
+				<script type="text/javascript">getSelect('airportcountries','<?php if(isset($_GET['airport_country'])) {
430
+	print $_GET['airport_country'];
431
+}
432
+?>');</script>
369 433
 			</fieldset>
370 434
 			<fieldset>
371 435
 				<legend><?php echo _("Route"); ?></legend>
@@ -375,21 +439,30 @@  discard block
 block discarded – undo
375 439
 						<option></option>
376 440
 					</select>
377 441
 				</div>
378
-				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) print $_GET['departure_airport_route']; ?>');</script>
442
+				<script type="text/javascript">getSelect('departureairportnames','<?php if(isset($_GET['departure_airport_route'])) {
443
+	print $_GET['departure_airport_route'];
444
+}
445
+?>');</script>
379 446
 				<div class="form-group">
380 447
 					<label><?php echo _("Arrival Airport"); ?></label> 
381 448
 					<select name="arrival_airport_route" id="arrivalairportnames" class="selectpicker" data-live-search="true">
382 449
 						<option></option>
383 450
 					</select>
384 451
 				</div>
385
-				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) print $_GET['arrival_airport_route']; ?>');</script>
452
+				<script type="text/javascript">getSelect('arrivalairportnames','<?php if(isset($_GET['arrival_airport_route'])) {
453
+	print $_GET['arrival_airport_route'];
454
+}
455
+?>');</script>
386 456
 			</fieldset>
387 457
 			<fieldset>
388 458
 				<legend><?php echo _("Date"); ?></legend>
389 459
 				<div class="form-group">
390 460
 					<label><?php echo _("Start Date"); ?></label>
391 461
 					<div class='input-group date' id='datetimepicker1'>
392
-						<input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) print $_GET['start_date']; ?>" placeholder="<?php echo _("Start Date/Time"); ?>" />
462
+						<input type='text' name="start_date" class="form-control" value="<?php if (isset($_GET['start_date'])) {
463
+	print $_GET['start_date'];
464
+}
465
+?>" placeholder="<?php echo _("Start Date/Time"); ?>" />
393 466
 						<span class="input-group-addon">
394 467
 							<span class="glyphicon glyphicon-calendar"></span>
395 468
 						</span>
@@ -398,7 +471,10 @@  discard block
 block discarded – undo
398 471
 				<div class="form-group">
399 472
 					<label><?php echo _("End Date"); ?></label>
400 473
 					<div class='input-group date' id='datetimepicker2'>
401
-						<input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) print $_GET['end_date']; ?>" placeholder="<?php echo _("End Date/Time"); ?>" />
474
+						<input type='text' name="end_date" class="form-control" value="<?php if (isset($_GET['end_date'])) {
475
+	print $_GET['end_date'];
476
+}
477
+?>" placeholder="<?php echo _("End Date/Time"); ?>" />
402 478
 						<span class="input-group-addon">
403 479
 							<span class="glyphicon glyphicon-calendar"></span>
404 480
 						</span>
@@ -474,7 +550,12 @@  discard block
 block discarded – undo
474 550
 				<input type="text" name="origlon" class="form-control" placeholder="<?php echo _("Center point longitude"); ?>" />
475 551
 			</div>
476 552
 			<div class="form-group">
477
-				<label><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) print $globalDistanceUnit; else print 'km'; print ')'; ?></label>
553
+				<label><?php echo _("Distance").' ('; if (isset($globalDistanceUnit)) {
554
+	print $globalDistanceUnit;
555
+} else {
556
+	print 'km';
557
+}
558
+print ')'; ?></label>
478 559
 				<input type="text" name="dist" class="form-control" placeholder="<?php echo _("Distance from center point"); ?>" />
479 560
 			</div>
480 561
 		</fieldset>
Please login to merge, or discard this patch.
country-statistics-airline-country.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 $country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
           function drawChart() {
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Country").'", "'._("# of times").'"], ';
64
-            	$country_data = '';
64
+				$country_data = '';
65 65
 	foreach($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@  discard block
 block discarded – undo
7 7
         die();
8 8
 }
9 9
 $Spotter = new Spotter();
10
-$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET,'country',FILTER_SANITIZE_STRING)));
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
10
+$country = ucwords(str_replace("-", " ", filter_input(INPUT_GET, 'country', FILTER_SANITIZE_STRING)));
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12 12
 
13 13
 if (isset($_GET['sort'])) {
14 14
 	$spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
@@ -18,16 +18,16 @@  discard block
 block discarded – undo
18 18
 
19 19
 if (!empty($spotter_array))
20 20
 {
21
-	$title = sprintf(_("Most Common Airlines by Country of %s"),$country);
21
+	$title = sprintf(_("Most Common Airlines by Country of %s"), $country);
22 22
 	require_once('header.php');
23 23
 	print '<div class="select-item">';
24 24
 	print '<form action="'.$globalURL.'/country" method="post">';
25 25
 	print '<select name="country" class="selectpicker" data-live-search="true">';
26 26
 	print '<option></option>';
27 27
 	$all_countries = $Spotter->getAllCountries();
28
-	foreach($all_countries as $all_country)
28
+	foreach ($all_countries as $all_country)
29 29
 	{
30
-		if($country == $all_country['country'])
30
+		if ($country == $all_country['country'])
31 31
 		{
32 32
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
33 33
 		} else {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	if ($_GET['country'] != "NA")
43 43
 	{
44 44
 		print '<div class="info column">';
45
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
45
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
46 46
 		print '</div>';
47 47
 	} else {
48 48
 		print '<div class="alert alert-warning">'._("This special country profile shows all flights that do <u>not</u> have a country of a airline or departure/arrival airport associated with them.").'</div>';
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	include('country-sub-menu.php');
52 52
 	print '<div class="column">';
53 53
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
54
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports &amp; airlines of <strong>%s</strong>."),$country).'</p>';
54
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights from airports &amp; airlines of <strong>%s</strong>."), $country).'</p>';
55 55
 	$airline_array = $Spotter->countAllAirlineCountriesByCountry($country);
56 56
 	print '<script type="text/javascript" src="https://www.google.com/jsapi"></script>';
57 57
 	print '<div id="chartCountry" class="chart" width="100%"></div>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             var data = google.visualization.arrayToDataTable([
63 63
             	["'._("Country").'", "'._("# of times").'"], ';
64 64
             	$country_data = '';
65
-	foreach($airline_array as $airline_item)
65
+	foreach ($airline_array as $airline_item)
66 66
 	{
67 67
 		$country_data .= '[ "'.$airline_item['airline_country'].'",'.$airline_item['airline_country_count'].'],';
68 68
 	}
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		print '</thead>';
97 97
 		print '<tbody>';
98 98
 		$i = 1;
99
-		foreach($airline_array as $airline_item)
99
+		foreach ($airline_array as $airline_item)
100 100
 		{
101 101
 			print '<tr>';
102 102
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
atc-geojson.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 		date_default_timezone_set('UTC');
26 26
 		//waypoint plotting
27 27
 		$output .= '{"type": "Feature",';
28
-		    $output .= '"properties": {';
28
+			$output .= '"properties": {';
29 29
 			$output .= '"ident": "'.$spotter_item['ident'].'",';
30 30
 			$output .= '"frequency": "'.$spotter_item['frequency'].'",';
31 31
 			$radius = $spotter_item['atc_range']*100;
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 			$output .= '"ivao_name": "'.$spotter_item['ivao_name'].'",';
35 35
 			$output .= '"info": "'.$spotter_item['info'].'",';
36 36
 			$output .= '"type": "'.$spotter_item['type'].'"';
37
-		    $output .= '},';
38
-		    $output .= '"geometry": {';
37
+			$output .= '},';
38
+			$output .= '"geometry": {';
39 39
 			$output .= '"type": "Point",';
40 40
 			$output .= '"coordinates": [';
41
-			    $output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
41
+				$output .= $spotter_item['longitude'].', '.$spotter_item['latitude'];
42 42
 			$output .= ']';
43
-		    $output .= '}';
43
+			$output .= '}';
44 44
 		$output .= '},';
45 45
 	}
46 46
 	$output  = substr($output, 0, -1);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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']);
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
             
21 21
 if (!empty($spotter_array))
22 22
 {	  
23
-	foreach($spotter_array as $spotter_item)
23
+	foreach ($spotter_array as $spotter_item)
24 24
 	{
25 25
 		date_default_timezone_set('UTC');
26 26
 		//waypoint plotting
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		    $output .= '}';
44 44
 		$output .= '},';
45 45
 	}
46
-	$output  = substr($output, 0, -1);
46
+	$output = substr($output, 0, -1);
47 47
 }
48 48
 $output .= ']}';
49 49
 
Please login to merge, or discard this patch.
currently.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,19 +1,19 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 require_once('require/class.Connection.php');
3
-require_once('require/class.Spotter.php');;
3
+require_once('require/class.Spotter.php'); ;
4 4
 require_once('require/class.Language.php');
5 5
 require_once('require/class.SpotterLive.php');
6 6
 
7 7
 $title = "Current Activity";
8 8
 require_once('header.php');
9
-$SpotterLive=new SpotterLive();
9
+$SpotterLive = new SpotterLive();
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];
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 print '<div class="table column">';
37 37
 print '<p>'._("The table below shows the detailed information of all current flights.").'</p>';
38 38
 
39
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
39
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
40 40
 if (isset($_GET['sort'])) {
41 41
 	$spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
42 42
 } else {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
ident-statistics-manufacturer.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   +6 added lines, -6 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 Aircraft Manufacturer of %s"),$spotter_array[0]['ident']);
16
+	$title = sprintf(_("Most Common Aircraft Manufacturer 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 Aircraft Manufacturer").'</h2>';
27
-	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
27
+	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights using the ident/callsign <strong>%s</strong>."), $spotter_array[0]['ident']).'</p>';
28 28
 
29 29
 	$manufacturers_array = $Spotter->countAllAircraftManufacturerByIdent($ident);
30 30
 	if (!empty($manufacturers_array))
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		print '</thead>';
40 40
 		print '<tbody>';
41 41
 		$i = 1;
42
-		foreach($manufacturers_array as $manufacturer_item)
42
+		foreach ($manufacturers_array as $manufacturer_item)
43 43
 		{
44 44
 			print '<tr>';
45 45
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.