Completed
Push — master ( f6e401...19913c )
by Yannick
10:24
created
country-statistics-aircraft.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 if (!isset($_GET['country'])) {
6
-        header('Location: '.$globalURL.'/country');
7
-        die();
6
+		header('Location: '.$globalURL.'/country');
7
+		die();
8 8
 }
9 9
 $Spotter = new Spotter();
10 10
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
 $Spotter = new Spotter();
10 10
 
11 11
 $country = ucwords(str_replace("-", " ", $_GET['country']));
12
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
13 13
 $spotter_array = $Spotter->getSpotterDataByCountry($country, "0,1", $sort);
14 14
 
15 15
 if (!empty($spotter_array))
16 16
 {
17
-	$title = sprintf(_("Most Common Aircraft from %s"),$country);
17
+	$title = sprintf(_("Most Common Aircraft from %s"), $country);
18 18
 
19 19
 	require_once('header.php');
20 20
 	print '<div class="select-item">';
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	print '<select name="country" class="selectpicker" data-live-search="true">';
23 23
 	print '<option></option>';
24 24
 	$all_countries = $Spotter->getAllCountries();
25
-	foreach($all_countries as $all_country)
25
+	foreach ($all_countries as $all_country)
26 26
 	{
27
-		if($country == $all_country['country'])
27
+		if ($country == $all_country['country'])
28 28
 		{
29 29
 			print '<option value="'.strtolower(str_replace(" ", "-", $all_country['country'])).'" selected="selected">'.$all_country['country'].'</option>';
30 30
 		} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	if ($_GET['country'] != "NA")
40 40
 	{
41 41
 		print '<div class="info column">';
42
-		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"),$country).'</h1>';
42
+		print '<h1>'.sprintf(_("Airports &amp; Airlines from %s"), $country).'</h1>';
43 43
 		print '</div>';
44 44
 	} else {
45 45
 		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>';
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	include('country-sub-menu.php');
49 49
 	print '<div class="column">';
50 50
 	print '<h2>'._("Most Common Aircraft").'</h2>';
51
-	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."),$country).'</p>';
51
+	print '<p>'.sprintf(_("The statistic below shows the most common aircrafts of flights from <strong>%s</strong>."), $country).'</p>';
52 52
 
53 53
 	$aircraft_array = $Spotter->countAllAircraftTypesByCountry($country);
54 54
 	if (!empty($aircraft_array))
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		print '</thead>';
63 63
 		print '<tbody>';
64 64
 		$i = 1;
65
-		foreach($aircraft_array as $aircraft_item)
65
+		foreach ($aircraft_array as $aircraft_item)
66 66
 		{
67 67
 			print '<tr>';
68 68
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
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
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 		$limit_start = 0;
15 15
 		$limit_end = 25;
16 16
 		$absolute_difference = 25;
17
-	}  else {
17
+	} else {
18 18
 		$limit_explode = explode(",", $_GET['limit']);
19 19
 		$limit_start = $limit_explode[0];
20 20
 		$limit_end = $limit_explode[1];
Please login to merge, or discard this patch.
aircraft-statistics-arrival-airport.php 3 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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@
 block discarded – undo
23 23
 	print '<option></option>';
24 24
 	$Stats = new Stats();
25 25
 	$aircraft_types = $Stats->getAllAircraftTypes();
26
-	if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes();
26
+	if (empty($aircraft_types)) {
27
+		$aircraft_types = $Spotter->getAllAircraftTypes();
28
+	}
27 29
 	foreach($aircraft_types as $aircrafttype)
28 30
 	{
29 31
 		if($aircraft_type == $aircrafttype['aircraft_icao'])
Please login to merge, or discard this 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.
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.
ident-statistics-manufacturer.php 2 patches
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.
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.
footer.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 	<?php
5 5
 	    if (isset($sql_time)) {
6 6
 	?>
7
-	<i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i>
7
+	<i><?php echo _("Page generated in").' '.round($sql_time + $page_time, 2); ?>s (<?php print round($page_time, 2); ?>ms PHP - <?php print round($sql_time, 2); ?>ms SQL)</i>
8 8
 	<br />
9 9
 	<?php
10 10
 	    }
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,12 +6,12 @@
 block discarded – undo
6 6
 </div>
7 7
 <footer class="container">
8 8
 	<?php
9
-	    if (isset($sql_time)) {
9
+		if (isset($sql_time)) {
10 10
 	?>
11 11
 	<i><?php echo _("Page generated in").' '.round($sql_time+$page_time,2); ?>s (<?php print round($page_time,2); ?>ms PHP - <?php print round($sql_time,2); ?>ms SQL)</i>
12 12
 	<br />
13 13
 	<?php
14
-	    }
14
+		}
15 15
 	?>
16 16
 	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
17 17
 </footer>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,10 @@  discard block
 block discarded – undo
1 1
 </section>
2 2
 <div class="pub onmap">
3 3
 <?php
4
-	if (isset($globalPub)) print $globalPub;
5
-?>
4
+	if (isset($globalPub)) {
5
+		print $globalPub;
6
+	}
7
+	?>
6 8
 </div>
7 9
 <footer class="container">
8 10
 	<?php
@@ -13,7 +15,10 @@  discard block
 block discarded – undo
13 15
 	<?php
14 16
 	    }
15 17
 	?>
16
-	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) print $globalURL; ?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
18
+	<span>Developed in Barrie by <a href="http://mtru.nz/" target="_blank">Mario Trunz</a> & at <a href="http://www.zugaina.com" target="_blank">Zugaina</a> by Ycarus</span> - <span><a href="<?php if (isset($globalURL)) {
19
+	print $globalURL;
20
+}
21
+?>/about#source">Source &amp; Credits</a></span> - <span><a href="https://www.flightairmap.fr/" target="_blank">Get source code</a></span>
17 22
 </footer>
18 23
 
19 24
 <div class="notifications bottom-left"></div>
Please login to merge, or discard this patch.
tools-acars.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 $page_url = $globalURL.'/tools-acars';
10 10
 
11
-$message = filter_input(INPUT_POST,'acars_message',FILTER_SANITIZE_STRING);
11
+$message = filter_input(INPUT_POST, 'acars_message', FILTER_SANITIZE_STRING);
12 12
 
13 13
 print '<div class="info column">';
14 14
 print '<h1>'._("Parse ACARS messages").'</h1>';
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 print '<fieldset class="form-group">';
22 22
 print '<label for="acars_message">'._("ACARS Message").'</label>';
23 23
 print '<textarea class="form-control" name="acars_message" id="acars_message" rows="5">';
24
-if ($message != '') print $message;
24
+if ($message != '') {
25
+	print $message;
26
+}
25 27
 print '</textarea>';
26 28
 print '</fieldset>';
27 29
 print '<button type="submit" class="btn btn-primary">Submit</button>';
Please login to merge, or discard this patch.
search-xml.php 3 patches
Indentation   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7
-        //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
-                $start_date = $_GET['start_date'].":00";
10
-                $end_date = $_GET['end_date'].":00";
11
-                $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
13
-                $start_date = $_GET['start_date'].":00";
14
-                $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
-                $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
-                $sql_date = $end_date;
18
-        } else $sql_date = '';
7
+		//for the date manipulation into the query
8
+		if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
9
+				$start_date = $_GET['start_date'].":00";
10
+				$end_date = $_GET['end_date'].":00";
11
+				$sql_date = $start_date.",".$end_date;
12
+		} else if($_GET['start_date'] != ""){
13
+				$start_date = $_GET['start_date'].":00";
14
+				$sql_date = $start_date;
15
+		} else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16
+				$end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17
+				$sql_date = $end_date;
18
+		} else $sql_date = '';
19 19
 } else $sql_date = '';
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22
-        //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
-                $end_altitude = $_GET['highest_altitude'];
25
-                $start_altitude = $_GET['lowest_altitude'];
26
-                $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
28
-                $end_altitude = $_GET['highest_altitude'];
29
-                $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
-                $start_altitude = $_GET['lowest_altitude'].",60000";
32
-                $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
22
+		//for altitude manipulation
23
+		if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
24
+				$end_altitude = $_GET['highest_altitude'];
25
+				$start_altitude = $_GET['lowest_altitude'];
26
+				$sql_altitude = $start_altitude.",".$end_altitude;
27
+		} else if($_GET['highest_altitude'] != ""){
28
+				$end_altitude = $_GET['highest_altitude'];
29
+				$sql_altitude = $end_altitude;
30
+		} else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31
+				$start_altitude = $_GET['lowest_altitude'].",60000";
32
+				$sql_altitude = $start_altitude;
33
+		} else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37 37
 if(!isset($_GET['limit']))
38 38
 {
39
-        if (!isset($_GET['number_results']))
40
-        {
41
-                $limit_start = 0;
42
-                $limit_end = 25;
43
-                $absolute_difference = 25;
44
-        } else {
45
-                if ($_GET['number_results'] > 1000){
46
-                        $_GET['number_results'] = 1000;
47
-                }
48
-                $limit_start = 0;
49
-                $limit_end = $_GET['number_results'];
50
-                $absolute_difference = $_GET['number_results'];
51
-        }
39
+		if (!isset($_GET['number_results']))
40
+		{
41
+				$limit_start = 0;
42
+				$limit_end = 25;
43
+				$absolute_difference = 25;
44
+		} else {
45
+				if ($_GET['number_results'] > 1000){
46
+						$_GET['number_results'] = 1000;
47
+				}
48
+				$limit_start = 0;
49
+				$limit_end = $_GET['number_results'];
50
+				$absolute_difference = $_GET['number_results'];
51
+		}
52 52
 }  else {
53
-        $limit_explode = explode(",", $_GET['limit']);
54
-        $limit_start = $limit_explode[0];
55
-        $limit_end = $limit_explode[1];
53
+		$limit_explode = explode(",", $_GET['limit']);
54
+		$limit_start = $limit_explode[0];
55
+		$limit_end = $limit_explode[1];
56 56
 }
57 57
 
58 58
 $absolute_difference = abs($limit_start - $limit_end);
@@ -89,56 +89,56 @@  discard block
 block discarded – undo
89 89
        
90 90
 $output = '<?xml version="1.0" encoding="UTF-8" ?>';
91 91
   $output .= '<flightairmap>';
92
-    $output .= '<title>'.$globalName.' XML Feed</title>';
93
-    $output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>';
94
-    $output .= '<aircrafts>';
92
+	$output .= '<title>'.$globalName.' XML Feed</title>';
93
+	$output .= '<link>http://'.$_SERVER['HTTP_HOST'].$globalURL.'</link>';
94
+	$output .= '<aircrafts>';
95 95
     
96
-    if (!empty($spotter_array))
96
+	if (!empty($spotter_array))
97 97
 	  {
98
-	    foreach($spotter_array as $spotter_item)
99
-	    {
98
+		foreach($spotter_array as $spotter_item)
99
+		{
100 100
 	    	
101
-            $output .= '<aircraft>';
102
-              $output .= '<id>'.$spotter_item['spotter_id'].'</id>';
103
-		      $output .= '<ident>'.$spotter_item['ident'].'</ident>';
104
-		      $output .= '<registration>'.$spotter_item['registration'].'</registration>';
105
-              $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>';
106
-		      $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>';
107
-              $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>';
108
-              $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>';
109
-		      $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>';
101
+			$output .= '<aircraft>';
102
+			  $output .= '<id>'.$spotter_item['spotter_id'].'</id>';
103
+			  $output .= '<ident>'.$spotter_item['ident'].'</ident>';
104
+			  $output .= '<registration>'.$spotter_item['registration'].'</registration>';
105
+			  $output .= '<aircraft_icao>'.$spotter_item['aircraft_type'].'</aircraft_icao>';
106
+			  $output .= '<aircraft_name>'.$spotter_item['aircraft_name'].'</aircraft_name>';
107
+			  $output .= '<aircraft_manufacturer>'.$spotter_item['aircraft_manufacturer'].'</aircraft_manufacturer>';
108
+			  $output .= '<airline_name>'.$spotter_item['airline_name'].'</airline_name>';
109
+			  $output .= '<airline_icao>'.$spotter_item['airline_icao'].'</airline_icao>';
110 110
 		if (isset($spotter_item['airline_iata'])) {
111
-            	    $output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>';
112
-              }
113
-              $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>';
114
-              if (isset($spotter_item['airline_callsign'])) {
115
-            	$output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>';
116
-              }
117
-              $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>';
118
-              $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>';
119
-		      $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>';  
120
-              $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>';
121
-              $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>';
122
-              $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>';
123
-              $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>';
124
-              $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>';
125
-              $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>';
126
-		      $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>';  
127
-              $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>';
128
-              $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>';
129
-              $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>';
130
-              $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>';
131
-              $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>';
132
-              $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>';
133
-              $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>';
134
-              $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>';
135
-              $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>';
136
-              $output .= '<heading>'.$spotter_item['heading'].'</heading>';
137
-              $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>';
138
-              $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>';
139
-		      $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>';
140
-            $output .= '</aircraft>';
141
-	    }
111
+					$output .= '<airline_iata>'.$spotter_item['airline_iata'].'</airline_iata>';
112
+			  }
113
+			  $output .= '<airline_country>'.$spotter_item['airline_country'].'</airline_country>';
114
+			  if (isset($spotter_item['airline_callsign'])) {
115
+				$output .= '<airline_callsign>'.$spotter_item['airline_callsign'].'</airline_callsign>';
116
+			  }
117
+			  $output .= '<airline_type>'.$spotter_item['airline_type'].'</airline_type>';
118
+			  $output .= '<departure_airport_city>'.$spotter_item['departure_airport_city'].'</departure_airport_city>';
119
+			  $output .= '<departure_airport_country>'.$spotter_item['departure_airport_country'].'</departure_airport_country>';  
120
+			  $output .= '<departure_airport_iata>'.$spotter_item['departure_airport_iata'].'</departure_airport_iata>';
121
+			  $output .= '<departure_airport_icao>'.$spotter_item['departure_airport_icao'].'</departure_airport_icao>';
122
+			  $output .= '<departure_airport_latitude>'.$spotter_item['departure_airport_latitude'].'</departure_airport_latitude>';
123
+			  $output .= '<departure_airport_longitude>'.$spotter_item['departure_airport_longitude'].'</departure_airport_longitude>';
124
+			  $output .= '<departure_airport_altitude>'.$spotter_item['departure_airport_altitude'].'</departure_airport_altitude>';
125
+			  $output .= '<arrival_airport_city>'.$spotter_item['arrival_airport_city'].'</arrival_airport_city>';
126
+			  $output .= '<arrival_airport_country>'.$spotter_item['arrival_airport_country'].'</arrival_airport_country>';  
127
+			  $output .= '<arrival_airport_iata>'.$spotter_item['arrival_airport_iata'].'</arrival_airport_iata>';
128
+			  $output .= '<arrival_airport_icao>'.$spotter_item['arrival_airport_icao'].'</arrival_airport_icao>';
129
+			  $output .= '<arrival_airport_latitude>'.$spotter_item['arrival_airport_latitude'].'</arrival_airport_latitude>';
130
+			  $output .= '<arrival_airport_longitude>'.$spotter_item['arrival_airport_longitude'].'</arrival_airport_longitude>';
131
+			  $output .= '<arrival_airport_altitude>'.$spotter_item['arrival_airport_altitude'].'</arrival_airport_altitude>';
132
+			  $output .= '<latitude>'.$spotter_item['latitude'].'</latitude>';
133
+			  $output .= '<longitude>'.$spotter_item['longitude'].'</longitude>';
134
+			  $output .= '<altitude>'.$spotter_item['altitude'].'</altitude>';
135
+			  $output .= '<ground_speed>'.$spotter_item['ground_speed'].'</ground_speed>';
136
+			  $output .= '<heading>'.$spotter_item['heading'].'</heading>';
137
+			  $output .= '<heading_name>'.$spotter_item['heading_name'].'</heading_name>';
138
+			  $output .= '<waypoints>'.$spotter_item['waypoints'].'</waypoints>';
139
+			  $output .= '<date>'.date("c", strtotime($spotter_item['date_iso_8601'])).'</date>';
140
+			$output .= '</aircraft>';
141
+		}
142 142
 	   }
143 143
 		 $output .= '</aircrafts>';
144 144
 $output .= '</flightairmap>';
Please login to merge, or discard this patch.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@  discard block
 block discarded – undo
5 5
 $Spotter = new Spotter();
6 6
 if (isset($_GET['start_date'])) {
7 7
         //for the date manipulation into the query
8
-        if($_GET['start_date'] != "" && $_GET['end_date'] != ""){
8
+        if ($_GET['start_date'] != "" && $_GET['end_date'] != "") {
9 9
                 $start_date = $_GET['start_date'].":00";
10 10
                 $end_date = $_GET['end_date'].":00";
11 11
                 $sql_date = $start_date.",".$end_date;
12
-        } else if($_GET['start_date'] != ""){
12
+        } else if ($_GET['start_date'] != "") {
13 13
                 $start_date = $_GET['start_date'].":00";
14 14
                 $sql_date = $start_date;
15
-        } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
15
+        } else if ($_GET['start_date'] == "" && $_GET['end_date'] != "") {
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18 18
         } else $sql_date = '';
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 
21 21
 if (isset($_GET['highest_altitude'])) {
22 22
         //for altitude manipulation
23
-        if($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != ""){
23
+        if ($_GET['highest_altitude'] != "" && $_GET['lowest_altitude'] != "") {
24 24
                 $end_altitude = $_GET['highest_altitude'];
25 25
                 $start_altitude = $_GET['lowest_altitude'];
26 26
                 $sql_altitude = $start_altitude.",".$end_altitude;
27
-        } else if($_GET['highest_altitude'] != ""){
27
+        } else if ($_GET['highest_altitude'] != "") {
28 28
                 $end_altitude = $_GET['highest_altitude'];
29 29
                 $sql_altitude = $end_altitude;
30
-        } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
30
+        } else if ($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != "") {
31 31
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 32
                 $sql_altitude = $start_altitude;
33 33
         } else $sql_altitude = '';
34 34
 } else $sql_altitude = '';
35 35
 
36 36
 //calculuation for the pagination
37
-if(!isset($_GET['limit']))
37
+if (!isset($_GET['limit']))
38 38
 {
39 39
         if (!isset($_GET['number_results']))
40 40
         {
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
                 $limit_end = 25;
43 43
                 $absolute_difference = 25;
44 44
         } else {
45
-                if ($_GET['number_results'] > 1000){
45
+                if ($_GET['number_results'] > 1000) {
46 46
                         $_GET['number_results'] = 1000;
47 47
                 }
48 48
                 $limit_start = 0;
49 49
                 $limit_end = $_GET['number_results'];
50 50
                 $absolute_difference = $_GET['number_results'];
51 51
         }
52
-}  else {
52
+} else {
53 53
         $limit_explode = explode(",", $_GET['limit']);
54 54
         $limit_start = $limit_explode[0];
55 55
         $limit_end = $limit_explode[1];
@@ -69,23 +69,23 @@  discard block
 block discarded – undo
69 69
 
70 70
 if (isset($_GET['sort'])) $sort = $_GET['sort'];
71 71
 else $sort = '';
72
-$q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
73
-$registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
74
-$aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
75
-$manufacturer = filter_input(INPUT_GET,'manufacturer',FILTER_SANITIZE_STRING);
76
-$highlights = filter_input(INPUT_GET,'highlights',FILTER_SANITIZE_STRING);
77
-$airline = filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
78
-$airline_country = filter_input(INPUT_GET,'airline_country',FILTER_SANITIZE_STRING);
79
-$airline_type = filter_input(INPUT_GET,'airline_type',FILTER_SANITIZE_STRING);
80
-$airport = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
81
-$airport_country = filter_input(INPUT_GET,'airport_country',FILTER_SANITIZE_STRING);
82
-$callsign = filter_input(INPUT_GET,'callsign',FILTER_SANITIZE_STRING);
83
-$owner = filter_input(INPUT_GET,'owner',FILTER_SANITIZE_STRING);
84
-$pilot_id = filter_input(INPUT_GET,'pilot_id',FILTER_SANITIZE_STRING);
85
-$pilot_name = filter_input(INPUT_GET,'pilot_name',FILTER_SANITIZE_STRING);
86
-$departure_airport_route = filter_input(INPUT_GET,'departure_airport_route',FILTER_SANITIZE_STRING);
87
-$arrival_airport_route = filter_input(INPUT_GET,'arrival_airport_route',FILTER_SANITIZE_STRING);
88
-$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,'');
72
+$q = filter_input(INPUT_GET, 'q', FILTER_SANITIZE_STRING);
73
+$registration = filter_input(INPUT_GET, 'registratrion', FILTER_SANITIZE_STRING);
74
+$aircraft = filter_input(INPUT_GET, 'aircraft', FILTER_SANITIZE_STRING);
75
+$manufacturer = filter_input(INPUT_GET, 'manufacturer', FILTER_SANITIZE_STRING);
76
+$highlights = filter_input(INPUT_GET, 'highlights', FILTER_SANITIZE_STRING);
77
+$airline = filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
78
+$airline_country = filter_input(INPUT_GET, 'airline_country', FILTER_SANITIZE_STRING);
79
+$airline_type = filter_input(INPUT_GET, 'airline_type', FILTER_SANITIZE_STRING);
80
+$airport = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
81
+$airport_country = filter_input(INPUT_GET, 'airport_country', FILTER_SANITIZE_STRING);
82
+$callsign = filter_input(INPUT_GET, 'callsign', FILTER_SANITIZE_STRING);
83
+$owner = filter_input(INPUT_GET, 'owner', FILTER_SANITIZE_STRING);
84
+$pilot_id = filter_input(INPUT_GET, 'pilot_id', FILTER_SANITIZE_STRING);
85
+$pilot_name = filter_input(INPUT_GET, 'pilot_name', FILTER_SANITIZE_STRING);
86
+$departure_airport_route = filter_input(INPUT_GET, 'departure_airport_route', FILTER_SANITIZE_STRING);
87
+$arrival_airport_route = filter_input(INPUT_GET, 'arrival_airport_route', FILTER_SANITIZE_STRING);
88
+$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, '');
89 89
        
90 90
 $output = '<?xml version="1.0" encoding="UTF-8" ?>';
91 91
   $output .= '<flightairmap>';
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     
96 96
     if (!empty($spotter_array))
97 97
 	  {
98
-	    foreach($spotter_array as $spotter_item)
98
+	    foreach ($spotter_array as $spotter_item)
99 99
 	    {
100 100
 	    	
101 101
             $output .= '<aircraft>';
Please login to merge, or discard this patch.
Braces   +18 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,8 +15,12 @@  discard block
 block discarded – undo
15 15
         } else if($_GET['start_date'] == "" && $_GET['end_date'] != ""){
16 16
                 $end_date = date("Y-m-d H:i:s", strtotime("2014-04-12")).",".$_GET['end_date'].":00";
17 17
                 $sql_date = $end_date;
18
-        } else $sql_date = '';
19
-} else $sql_date = '';
18
+        } else {
19
+        	$sql_date = '';
20
+        }
21
+        } else {
22
+	$sql_date = '';
23
+}
20 24
 
21 25
 if (isset($_GET['highest_altitude'])) {
22 26
         //for altitude manipulation
@@ -30,8 +34,12 @@  discard block
 block discarded – undo
30 34
         } else if($_GET['highest_altitude'] == "" && $_GET['lowest_altitude'] != ""){
31 35
                 $start_altitude = $_GET['lowest_altitude'].",60000";
32 36
                 $sql_altitude = $start_altitude;
33
-        } else $sql_altitude = '';
34
-} else $sql_altitude = '';
37
+        } else {
38
+        	$sql_altitude = '';
39
+        }
40
+        } else {
41
+	$sql_altitude = '';
42
+}
35 43
 
36 44
 //calculuation for the pagination
37 45
 if(!isset($_GET['limit']))
@@ -49,7 +57,7 @@  discard block
 block discarded – undo
49 57
                 $limit_end = $_GET['number_results'];
50 58
                 $absolute_difference = $_GET['number_results'];
51 59
         }
52
-}  else {
60
+} else {
53 61
         $limit_explode = explode(",", $_GET['limit']);
54 62
         $limit_start = $limit_explode[0];
55 63
         $limit_end = $limit_explode[1];
@@ -67,8 +75,11 @@  discard block
 block discarded – undo
67 75
 
68 76
 header('Content-Type: application/xml');
69 77
 
70
-if (isset($_GET['sort'])) $sort = $_GET['sort'];
71
-else $sort = '';
78
+if (isset($_GET['sort'])) {
79
+	$sort = $_GET['sort'];
80
+} else {
81
+	$sort = '';
82
+}
72 83
 $q = filter_input(INPUT_GET,'q',FILTER_SANITIZE_STRING);
73 84
 $registration = filter_input(INPUT_GET,'registratrion',FILTER_SANITIZE_STRING);
74 85
 $aircraft = filter_input(INPUT_GET,'aircraft',FILTER_SANITIZE_STRING);
Please login to merge, or discard this patch.