Completed
Push — master ( 2358e7...48bf48 )
by Yannick
21:19
created
ident-detailed.php 1 patch
Braces   +20 added lines, -7 removed lines patch added patch discarded remove patch
@@ -97,8 +97,12 @@  discard block
 block discarded – undo
97 97
 	{
98 98
 		$title = sprintf(_("Detailed View for %s"),$spotter_array[0]['ident']);
99 99
 		$ident = $spotter_array[0]['ident'];
100
-		if (isset($spotter_array[0]['latitude'])) $latitude = $spotter_array[0]['latitude'];
101
-		if (isset($spotter_array[0]['longitude'])) $longitude = $spotter_array[0]['longitude'];
100
+		if (isset($spotter_array[0]['latitude'])) {
101
+			$latitude = $spotter_array[0]['latitude'];
102
+		}
103
+		if (isset($spotter_array[0]['longitude'])) {
104
+			$longitude = $spotter_array[0]['longitude'];
105
+		}
102 106
 		require_once('header.php');
103 107
 		if (isset($globalArchive) && $globalArchive && $type == 'aircraft') {
104 108
 			// Requirement for altitude graph
@@ -106,7 +110,9 @@  discard block
 block discarded – undo
106 110
 			$all_data = $SpotterArchive->getAltitudeSpeedArchiveSpotterDataById($spotter_array[0]['flightaware_id']);
107 111
 			if (isset($globalTimezone)) {
108 112
 				date_default_timezone_set($globalTimezone);
109
-			} else date_default_timezone_set('UTC');
113
+			} else {
114
+				date_default_timezone_set('UTC');
115
+			}
110 116
 			if (count($all_data) > 0) {
111 117
 				print '<div id="chart6" class="chart" width="100%"></div>
112 118
                     <script> 
@@ -153,13 +159,20 @@  discard block
 block discarded – undo
153 159
 		if (isset($spotter_array[0]['airline_icao'])) {
154 160
 			print '<div><span class="label">'._("Airline").'</span><a href="'.$globalURL.'/airline/'.$spotter_array[0]['airline_icao'].'">'.$spotter_array[0]['airline_name'].'</a></div>'; 
155 161
 		}
156
-		if ($type == 'aircraft') print '<div><span class="label">'._("Flight History").'</span><a href="http://flightaware.com/live/flight/'.$spotter_array[0]['ident'].'" target="_blank">'._("View the Flight History of this callsign").'</a></div>';
162
+		if ($type == 'aircraft') {
163
+			print '<div><span class="label">'._("Flight History").'</span><a href="http://flightaware.com/live/flight/'.$spotter_array[0]['ident'].'" target="_blank">'._("View the Flight History of this callsign").'</a></div>';
164
+		}
157 165
 		print '</div>';
158 166
 	
159
-		if ($type == 'aircraft') include('ident-sub-menu.php');
167
+		if ($type == 'aircraft') {
168
+			include('ident-sub-menu.php');
169
+		}
160 170
 		print '<div class="table column">';
161
-		if ($type == 'aircraft') print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the ident/callsign of <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
162
-		elseif ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels with the ident/callsign of <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
171
+		if ($type == 'aircraft') {
172
+			print '<p>'.sprintf(_("The table below shows the detailed information of all flights with the ident/callsign of <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
173
+		} elseif ($type == 'marine') {
174
+			print '<p>'.sprintf(_("The table below shows the detailed information of all vessels with the ident/callsign of <strong>%s</strong>."),$spotter_array[0]['ident']).'</p>';
175
+		}
163 176
 
164 177
 		include('table-output.php'); 
165 178
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
ident.php 1 patch
Braces   +12 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,13 +1,20 @@
 block discarded – undo
1 1
 <?php
2 2
 require_once(dirname(__FILE__).'/require/settings.php');
3 3
 $ident = '';
4
-if (isset($_POST['ident'])) $ident = filter_input(INPUT_POST,'ident',FILTER_SANITIZE_STRING);
5
-if (isset($_GET['ident'])) $ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
4
+if (isset($_POST['ident'])) {
5
+	$ident = filter_input(INPUT_POST,'ident',FILTER_SANITIZE_STRING);
6
+}
7
+if (isset($_GET['ident'])) {
8
+	$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
9
+}
6 10
 if ($ident != '')
7 11
 {
8
-	if (isset($_GET['marine'])) header('Location: '.$globalURL.'/marine/ident/'.$ident);
9
-	else header('Location: '.$globalURL.'/ident/'.$ident);
10
-} else {
12
+	if (isset($_GET['marine'])) {
13
+		header('Location: '.$globalURL.'/marine/ident/'.$ident);
14
+	} else {
15
+		header('Location: '.$globalURL.'/ident/'.$ident);
16
+	}
17
+	} else {
11 18
 	header('Location: '.$globalURL);
12 19
 }
13 20
 ?>
14 21
\ No newline at end of file
Please login to merge, or discard this patch.