Completed
Push — master ( 46434e...ad133e )
by Yannick
32:08 queued 16:03
created
require/settings.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 $globalLongitudeMin = '1.0'; //the minimum longitude (east)
43 43
 
44 44
 $globalCenterLatitude = '46.38'; //the latitude center of your coverage area
45
-$globalCenterLongitude = '5.29';//the longitude center of your coverage area
45
+$globalCenterLongitude = '5.29'; //the longitude center of your coverage area
46 46
 
47 47
 $globalLiveZoom = '9'; //default zoom on Live Map
48 48
 $globalAirportZoom = '7'; //default zoom to begin to display airports icons
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 $globalACARS = FALSE;
152 152
 $globalACARSHost = '0.0.0.0'; // Local IP to listen
153 153
 $globalACARSPort = '9999';
154
-$globalACARSArchive = array('10','80','81','82','3F'); // labels of messages to archive
154
+$globalACARSArchive = array('10', '80', '81', '82', '3F'); // labels of messages to archive
155 155
 $globalACARSArchiveKeepMonths = '0';
156 156
 
157 157
 //APRS configuration (for glidernet)
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 //Check by aircraft ICAO if image is not found by registration
249 249
 $globalAircraftImageCheckICAO = TRUE;
250 250
 //Sources for Aircraft image
251
-$globalAircraftImageSources = array('ivaomtl','wikimedia','airportdata','deviantart','flickr','bing','jetphotos','planepictures','planespotters','customsources');
251
+$globalAircraftImageSources = array('ivaomtl', 'wikimedia', 'airportdata', 'deviantart', 'flickr', 'bing', 'jetphotos', 'planepictures', 'planespotters', 'customsources');
252 252
 // Custom source configuration {registration} will be replaced by aircraft registration (exif get copyright from exif data for each pic)
253 253
 // example of config : $globalAircraftImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{registration}.jpg','original' => 'http://myurl/original/{registration}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true);
254 254
 // ************************
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 //Retrieve Image from externals sources
258 258
 $globalMarineImageFetch = TRUE;
259 259
 //Sources for Marine image
260
-$globalMarineImageSources = array('wikimedia','flickr','deviantart','bing','customsources');
260
+$globalMarineImageSources = array('wikimedia', 'flickr', 'deviantart', 'bing', 'customsources');
261 261
 // Custom source configuration {mmsi} will be replaced by vessel mmsi, {name} by it's name (exif get copyright from exif data for each pic)
262 262
 // example of config : $globalMarineImageCustomSources = array('thumbnail' => 'http://pics.myurl.com/thumbnail/{name}.jpg','original' => 'http://myurl/original/{name}.jpg','source_website' => 'https://www.myurl.com', 'source' => 'customsite', 'copyright' => 'myself','exif' => true);
263 263
 // ************************
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 //Retrieve schedules from externals sources (set to FALSE for IVAO or if $globalFork = FALSE)
266 266
 $globalSchedulesFetch = TRUE;
267 267
 //Sources for airline schedule if not official airline site
268
-$globalSchedulesSources = array('flightmapper','costtotravel','flightradar24','flightaware');
268
+$globalSchedulesSources = array('flightmapper', 'costtotravel', 'flightradar24', 'flightaware');
269 269
 
270 270
 //Retrieve translation from external sources (set to FALSE for IVAO)
271 271
 $globalTranslationFetch = TRUE;
Please login to merge, or discard this patch.
import/callback.php 2 patches
Braces   +39 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,15 +27,21 @@  discard block
 block discarded – undo
27 27
 		}
28 28
 	}
29 29
 }
30
-if ($authorize === false) die;
30
+if ($authorize === false) {
31
+	die;
32
+}
31 33
 
32
-if (isset($globalTracker) && $globalTracker) require_once(dirname(__FILE__).'/../require/class.TrackerImport.php');
34
+if (isset($globalTracker) && $globalTracker) {
35
+	require_once(dirname(__FILE__).'/../require/class.TrackerImport.php');
36
+}
33 37
 if (isset($globalMarine) && $globalMarine) {
34 38
 	require_once(dirname(__FILE__).'/../require/class.AIS.php');
35 39
 	require_once(dirname(__FILE__).'/../require/class.MarineImport.php');
36 40
 }
37 41
 
38
-if (!isset($globalDebug)) $globalDebug = FALSE;
42
+if (!isset($globalDebug)) {
43
+	$globalDebug = FALSE;
44
+}
39 45
 
40 46
 // Check if schema is at latest version
41 47
 $Connection = new Connection();
@@ -45,10 +51,16 @@  discard block
 block discarded – undo
45 51
 }
46 52
 
47 53
 if (isset($globalServer) && $globalServer) {
48
-	if ($globalDebug) echo "Using Server Mode\n";
54
+	if ($globalDebug) {
55
+		echo "Using Server Mode\n";
56
+	}
49 57
 	$SI=new SpotterServer();
50
-} else $SI=new SpotterImport($Connection->db);
51
-if (isset($globalTracker) && $globalTracker) $TI = new TrackerImport($Connection->db);
58
+} else {
59
+	$SI=new SpotterImport($Connection->db);
60
+}
61
+if (isset($globalTracker) && $globalTracker) {
62
+	$TI = new TrackerImport($Connection->db);
63
+}
52 64
 if (isset($globalMarine) && $globalMarine) {
53 65
 	$AIS = new AIS();
54 66
 	$MI = new MarineImport($Connection->db);
@@ -57,7 +69,9 @@  discard block
 block discarded – undo
57 69
 date_default_timezone_set('UTC');
58 70
 
59 71
 $buffer = '';
60
-if (isset($_POST)) $buffer = $_POST;
72
+if (isset($_POST)) {
73
+	$buffer = $_POST;
74
+}
61 75
 $data = array();
62 76
 if (isset($buffer['type_event']) && isset($buffer['lat']) && isset($buffer['lon'])) {
63 77
 	$data['ident'] = $buffer['device_id'];
@@ -68,15 +82,27 @@  discard block
 block discarded – undo
68 82
 	//$data['heading'] = $buffer['cap']; // Only N/S/E/W
69 83
 	$data['datetime'] = date('Y-m-d H:i:s',$buffer['timestamp']);
70 84
 	$data['comment'] = '';
71
-	if (isset($buffer['battery']) && $buffer['battery'] != '') $data['comment'] .= 'Battery: '.$buffer['battery'].'% ';
85
+	if (isset($buffer['battery']) && $buffer['battery'] != '') {
86
+		$data['comment'] .= 'Battery: '.$buffer['battery'].'% ';
87
+	}
72 88
 	//if (isset($buffer['snr']) && $buffer['snr'] != '') $data['comment'] .= 'SNR: '.$buffer['snr'].' ';
73
-	if (isset($buffer['temp']) && $buffer['temp'] != '') $data['comment'] .= 'Temperature: '.$buffer['temp'].'°C ';
74
-	if (isset($buffer['press']) && $buffer['press'] != '') $data['comment'] .= 'Pressure: '.$buffer['press'].'hPa ';
89
+	if (isset($buffer['temp']) && $buffer['temp'] != '') {
90
+		$data['comment'] .= 'Temperature: '.$buffer['temp'].'°C ';
91
+	}
92
+	if (isset($buffer['press']) && $buffer['press'] != '') {
93
+		$data['comment'] .= 'Pressure: '.$buffer['press'].'hPa ';
94
+	}
75 95
 	$TI->add($data);
76 96
 	unset($data);
77 97
 }
78
-if (isset($SI)) $SI->checkAll();
79
-if (isset($MI)) $MI->checkAll();
80
-if (isset($TI)) $TI->checkAll();
98
+if (isset($SI)) {
99
+	$SI->checkAll();
100
+}
101
+if (isset($MI)) {
102
+	$MI->checkAll();
103
+}
104
+if (isset($TI)) {
105
+	$TI->checkAll();
106
+}
81 107
 
82 108
 ?>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 require_once(dirname(__FILE__).'/../require/class.Source.php');
10 10
 require_once(dirname(__FILE__).'/../require/class.Connection.php');
11 11
 require_once(dirname(__FILE__).'/../require/class.Common.php');
12
-$Common=new Common();
12
+$Common = new Common();
13 13
 $authorize = false;
14 14
 $params = array();
15 15
 $userip = $Common->getUserIP();
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 			$authorize = true;
21 21
 			break;
22 22
 		}
23
-		if ($userip != '' && isset($cb['host']) && in_array($userip,explode(',',$cb['host']))) {
23
+		if ($userip != '' && isset($cb['host']) && in_array($userip, explode(',', $cb['host']))) {
24 24
 			$params = $globalSources[$key];
25 25
 			$authorize = true;
26 26
 			break;
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
 if (isset($globalServer) && $globalServer) {
48 48
 	if ($globalDebug) echo "Using Server Mode\n";
49
-	$SI=new SpotterServer();
50
-} else $SI=new SpotterImport($Connection->db);
49
+	$SI = new SpotterServer();
50
+} else $SI = new SpotterImport($Connection->db);
51 51
 if (isset($globalTracker) && $globalTracker) $TI = new TrackerImport($Connection->db);
52 52
 if (isset($globalMarine) && $globalMarine) {
53 53
 	$AIS = new AIS();
54 54
 	$MI = new MarineImport($Connection->db);
55 55
 }
56
-$Source=new Source($Connection->db);
56
+$Source = new Source($Connection->db);
57 57
 date_default_timezone_set('UTC');
58 58
 
59 59
 $buffer = '';
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	$data['altitude'] = round($buffer['altitude']*3.28084);
67 67
 	$data['speed'] = $buffer['speed'];
68 68
 	//$data['heading'] = $buffer['cap']; // Only N/S/E/W
69
-	$data['datetime'] = date('Y-m-d H:i:s',$buffer['timestamp']);
69
+	$data['datetime'] = date('Y-m-d H:i:s', $buffer['timestamp']);
70 70
 	$data['comment'] = '';
71 71
 	if (isset($buffer['battery']) && $buffer['battery'] != '') $data['comment'] .= 'Battery: '.$buffer['battery'].'% ';
72 72
 	//if (isset($buffer['snr']) && $buffer['snr'] != '') $data['comment'] .= 'SNR: '.$buffer['snr'].' ';
Please login to merge, or discard this patch.
tools-geoid.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
 $page_url = $globalURL.'/tools-geoid';
14 14
 
15
-$latitude = filter_input(INPUT_POST,'latitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION);
16
-$longitude = filter_input(INPUT_POST,'longitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION);
17
-$altitude = filter_input(INPUT_POST,'altitude',FILTER_SANITIZE_NUMBER_FLOAT,FILTER_FLAG_ALLOW_FRACTION);
15
+$latitude = filter_input(INPUT_POST, 'latitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
16
+$longitude = filter_input(INPUT_POST, 'longitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
17
+$altitude = filter_input(INPUT_POST, 'altitude', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
18 18
 
19 19
 print '<div class="info column">';
20 20
 print '<h1>'._("Geoid Height Calculator").'</h1>';
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
 
52 52
 if ($latitude != '' && $longitude != '') {
53 53
 	$globalDebug = FALSE;
54
-	$geoid = $GeoidHeight->get($latitude,$longitude);
54
+	$geoid = $GeoidHeight->get($latitude, $longitude);
55 55
 	print '<div class="row">';
56 56
 	print '<div class="col-md-3 col-md-offset-5">';
57 57
 	print '<div class="col-sm-6"><b>Geoid</b></div>';
58 58
 	print '<div class="col-sm-6">'.$geoid.'</div>';
59 59
 	if ($altitude != '') {
60 60
 		print '<div class="col-sm-6"><b>AMSL Elevation</b></div>';
61
-		print '<div class="col-sm-6">'.round($altitude-$geoid,3).'</div>';
61
+		print '<div class="col-sm-6">'.round($altitude - $geoid, 3).'</div>';
62 62
 	}
63 63
 	print '<div class="col-sm-6"><b>Earth Gravity Model</b></div>';
64 64
 	if (isset($globalGeoidSource) && $globalGeoidSource != '') $geoidsource = $globalGeoidSource;
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@  discard block
 block discarded – undo
11 11
 	print '<h1>'._("Geoid Height Calculator").'</h1>';
12 12
 	print '</div>';
13 13
 	print '<p>Not available</p>';
14
-	if (isset($globalDebug) && $globalDebug) echo '<p>'.$e.'</p>';
14
+	if (isset($globalDebug) && $globalDebug) {
15
+		echo '<p>'.$e.'</p>';
16
+	}
15 17
 	require_once('footer.php');
16 18
 	exit();
17 19
 }
@@ -69,8 +71,11 @@  discard block
 block discarded – undo
69 71
 		print '<div class="col-sm-6">'.round($altitude-$geoid,3).'</div>';
70 72
 	}
71 73
 	print '<div class="col-sm-6"><b>Earth Gravity Model</b></div>';
72
-	if (isset($globalGeoidSource) && $globalGeoidSource != '') $geoidsource = $globalGeoidSource;
73
-	else $geoidsource = 'EGM96-15';
74
+	if (isset($globalGeoidSource) && $globalGeoidSource != '') {
75
+		$geoidsource = $globalGeoidSource;
76
+	} else {
77
+		$geoidsource = 'EGM96-15';
78
+	}
74 79
 	print '<div class="col-sm-6">'.$geoidsource.'</div>';
75 80
 	print '</div>';
76 81
 }
Please login to merge, or discard this patch.
flightid-overview.php 2 patches
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@  discard block
 block discarded – undo
48 48
 		$all_data = $SpotterArchive->getAltitudeSpeedArchiveSpotterDataById($spotter_array[0]['flightaware_id']);
49 49
 		if (isset($globalTimezone)) {
50 50
 			date_default_timezone_set($globalTimezone);
51
-		} else date_default_timezone_set('UTC');
51
+		} else {
52
+			date_default_timezone_set('UTC');
53
+		}
52 54
 		
53 55
 		if (is_array($all_data) && count($all_data) > 1) {
54 56
 			print '<br/>';
@@ -327,9 +329,13 @@  discard block
 block discarded – undo
327 329
 			print '<div>';
328 330
 			if (isset($spotter_item['pilot_id']) && $spotter_item['pilot_id'] != "")
329 331
 			{
330
-				if ($spotter_item['format_source'] == 'whazzup') print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>';
331
-				elseif ($spotter_item['format_source'] == 'vatsimtxt') print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>';
332
-				else print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')';
332
+				if ($spotter_item['format_source'] == 'whazzup') {
333
+					print '<a href="https://www.ivao.aero/Member.aspx?ID='.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>';
334
+				} elseif ($spotter_item['format_source'] == 'vatsimtxt') {
335
+					print '<a href="http://www.vataware.com/pilot/'.$spotter_item['pilot_id'].'">'.$spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')</a>';
336
+				} else {
337
+					print $spotter_item['pilot_name'].' ('.$spotter_item['pilot_id'].')';
338
+				}
333 339
 			} else {
334 340
 				if (isset($spotter_item['pilot_name']) && $spotter_item['pilot_name'] != "")
335 341
 				{
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-$id = filter_input(INPUT_GET,'id',FILTER_SANITIZE_STRING);
2
+$id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);
3 3
 if ($id == "")
4 4
 {
5 5
 	header('Location: /');
@@ -16,17 +16,17 @@  discard block
 block discarded – undo
16 16
 
17 17
 if (!empty($spotter_array))
18 18
 {
19
-	if(isset($spotter_array[0]['flightaware_id'])) {
19
+	if (isset($spotter_array[0]['flightaware_id'])) {
20 20
 		$flightaware_id = $spotter_array[0]['flightaware_id'];
21 21
 	}
22
-	if(isset($spotter_array[0]['last_latitude']) && $spotter_array[0]['last_latitude'] != '') {
22
+	if (isset($spotter_array[0]['last_latitude']) && $spotter_array[0]['last_latitude'] != '') {
23 23
 		$latitude = $spotter_array[0]['last_latitude'];
24
-	} elseif(isset($spotter_array[0]['latitude'])) {
24
+	} elseif (isset($spotter_array[0]['latitude'])) {
25 25
 		$latitude = $spotter_array[0]['latitude'];
26 26
 	}
27
-	if(isset($spotter_array[0]['last_longitude']) && $spotter_array[0]['last_longitude'] != '') {
27
+	if (isset($spotter_array[0]['last_longitude']) && $spotter_array[0]['last_longitude'] != '') {
28 28
 		$longitude = $spotter_array[0]['last_longitude'];
29
-	} elseif(isset($spotter_array[0]['longitude'])) {
29
+	} elseif (isset($spotter_array[0]['longitude'])) {
30 30
 		$longitude = $spotter_array[0]['longitude'];
31 31
 	}
32 32
 	
@@ -39,16 +39,16 @@  discard block
 block discarded – undo
39 39
 	}
40 40
 	
41 41
 	$title = '';
42
-	if(isset($spotter_array[0]['ident'])) {
42
+	if (isset($spotter_array[0]['ident'])) {
43 43
 		$title .= $spotter_array[0]['ident'];
44 44
 	}
45
-	if(isset($spotter_array[0]['airline_name'])) {
45
+	if (isset($spotter_array[0]['airline_name'])) {
46 46
 		$title .= ' - '.$spotter_array[0]['airline_name'];
47 47
 	}
48
-	if(isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
48
+	if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
49 49
 		$title .= ' - '.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')';
50 50
 	}
51
-	if(isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') {
51
+	if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA' && $spotter_array[0]['registration'] != 'N/A') {
52 52
 		$title .= ' - '.$spotter_array[0]['registration'];
53 53
 	}
54 54
 	//$facebook_meta_image = $spotter_array[0]['image'];
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 			$altitude_data = '';
69 69
 			$hour_data = '';
70 70
 			$speed_data = '';
71
-			foreach($all_data as $data)
71
+			foreach ($all_data as $data)
72 72
 			{
73 73
 				$hour_data .= '"'.$data['date'].'",';
74 74
 				if (isset($data['real_altitude']) && $data['real_altitude'] != '') {
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 				$speed_data .= $speed.',';
97 97
 			}
98 98
 			$hour_data = "['x',".substr($hour_data, 0, -1)."]";
99
-			$altitude_data = "['altitude',".substr($altitude_data,0,-1)."]";
100
-			$speed_data = "['speed',".substr($speed_data,0,-1)."]";
99
+			$altitude_data = "['altitude',".substr($altitude_data, 0, -1)."]";
100
+			$speed_data = "['speed',".substr($speed_data, 0, -1)."]";
101 101
 			print 'c3.generate({
102 102
 			    bindto: "#chart",
103 103
 			    data: {
@@ -143,16 +143,16 @@  discard block
 block discarded – undo
143 143
 			print '<a href="'.$globalURL.'/airline/'.$spotter_array[0]['airline_icao'].'">'.$spotter_array[0]['airline_name'].'</a> ';
144 144
 		}
145 145
 	}
146
-	if(isset($spotter_array[0]['ident'])) {
146
+	if (isset($spotter_array[0]['ident'])) {
147 147
 		print $spotter_array[0]['ident'];
148 148
 	}
149
-	if(isset($spotter_array[0]['airline_name'])) {
149
+	if (isset($spotter_array[0]['airline_name'])) {
150 150
 		print ' - '.$spotter_array[0]['airline_name'];
151 151
 	}
152
-	if(isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
152
+	if (isset($spotter_array[0]['aircraft_name']) && $spotter_array[0]['aircraft_name'] != 'Not Available') {
153 153
 		print ' - '.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')';
154 154
 	}
155
-	if(isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA') {
155
+	if (isset($spotter_array[0]['registration']) && $spotter_array[0]['registration'] != 'NA') {
156 156
 		print ' - '.$spotter_array[0]['registration'];
157 157
 	}
158 158
 	print '</h1>';
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 print '</div>';
307 307
 */
308 308
 
309
-	foreach($spotter_array as $spotter_item)
309
+	foreach ($spotter_array as $spotter_item)
310 310
 	{
311 311
 		print '<div class="details">';
312 312
 		print '<h3>'._("Flight Information").'</h3>';
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 			if (isset($spotter_item['departure_airport_time']) && $spotter_item['departure_airport_time'] != '') {
407 407
 				if ($spotter_item['departure_airport_time'] > 2460) {
408 408
 					print '<div class="time">';
409
-					print 'at '.date('H:m',$spotter_item['departure_airport_time']);
409
+					print 'at '.date('H:m', $spotter_item['departure_airport_time']);
410 410
 					print '</div>';
411 411
 				} else {
412 412
 					print '<div class="time">';
@@ -556,19 +556,19 @@  discard block
 block discarded – undo
556 556
 			if (count($departure_airport_info) > 0) {
557 557
 				if (isset($spotter_item['last_latitude']) && $spotter_item['last_latitude'] != '') {
558 558
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
559
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'nm').' nm';
559
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'nm').' nm';
560 560
 					} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
561
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'mi').' mi';
561
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'mi').' mi';
562 562
 					} else {
563
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'km').' km';
563
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'km').' km';
564 564
 					}
565 565
 				} else {
566 566
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
567
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'nm').' nm';
567
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'nm').' nm';
568 568
 					} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
569
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'mi').' mi';
569
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'mi').' mi';
570 570
 					} else {
571
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$departure_airport_info[0]['latitude'],$departure_airport_info[0]['longitude'],'km').' km';
571
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $departure_airport_info[0]['latitude'], $departure_airport_info[0]['longitude'], 'km').' km';
572 572
 					}
573 573
 				}
574 574
 			}
@@ -584,19 +584,19 @@  discard block
 block discarded – undo
584 584
 			if (count($arrival_airport_info) > 0) {
585 585
 				if (isset($spotter_item['last_latitude']) && $spotter_item['last_latitude'] != '') {
586 586
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
587
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'nm').' nm';
587
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'nm').' nm';
588 588
 					} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
589
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'mi').' mi';
589
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'mi').' mi';
590 590
 					} else {
591
-						print $Common->distance($spotter_item['last_latitude'],$spotter_item['last_longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'km').' km';
591
+						print $Common->distance($spotter_item['last_latitude'], $spotter_item['last_longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'km').' km';
592 592
 					}
593 593
 				} else {
594 594
 					if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) {
595
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'nm').' nm';
595
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'nm').' nm';
596 596
 					} elseif ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'mi') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'mi')) {
597
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'mi').' mi';
597
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'mi').' mi';
598 598
 					} else {
599
-						print $Common->distance($spotter_item['latitude'],$spotter_item['longitude'],$arrival_airport_info[0]['latitude'],$arrival_airport_info[0]['longitude'],'km').' km';
599
+						print $Common->distance($spotter_item['latitude'], $spotter_item['longitude'], $arrival_airport_info[0]['latitude'], $arrival_airport_info[0]['longitude'], 'km').' km';
600 600
 					}
601 601
 				}
602 602
 			}
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
 		print '<div class="last-flights">';
617 617
 		print '<h3>'._("Last 5 Flights of this Aircraft").' ('.$registration.')</h3>';
618 618
 		$hide_th_links = true;
619
-		$spotter_array = $Spotter->getSpotterDataByRegistration($registration,"0,5", "");
619
+		$spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,5", "");
620 620
 		include('table-output.php'); 
621 621
 		print '<div class="more">';
622 622
 		print '<a href="'.$globalURL.'/registration/'.$registration.'" class="btn btn-default btn" role="button">See all Flights&raquo;</a>';
Please login to merge, or discard this patch.
airport-detailed.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			$metar_info = $METAR->getMETAR($airport_icao);
49 49
 			//print_r($metar_info);
50 50
 			if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']);
51
-            		//print_r($metar_parse);
51
+					//print_r($metar_parse);
52 52
 		}
53 53
 		
54 54
 		$title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -5,17 +5,17 @@  discard block
 block discarded – undo
5 5
 require_once('require/class.Stats.php');
6 6
 require_once('require/class.METAR.php');
7 7
 
8
-if (!isset($_GET['airport'])){
8
+if (!isset($_GET['airport'])) {
9 9
 	header('Location: '.$globalURL.'/airport');
10 10
 } else {
11 11
 	$Spotter = new Spotter();
12 12
 	//calculation for the pagination
13
-	if(!isset($_GET['limit']))
13
+	if (!isset($_GET['limit']))
14 14
 	{
15 15
 		$limit_start = 0;
16 16
 		$limit_end = 25;
17 17
 		$absolute_difference = 25;
18
-	}  else {
18
+	} else {
19 19
 		$limit_explode = explode(",", $_GET['limit']);
20 20
 		$limit_start = $limit_explode[0];
21 21
 		$limit_end = $limit_explode[1];
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
 	$limit_next = $limit_end + $absolute_difference;
29 29
 	$limit_previous_1 = $limit_start - $absolute_difference;
30 30
 	$limit_previous_2 = $limit_end - $absolute_difference;
31
-	$airport_icao = filter_input(INPUT_GET,'airport',FILTER_SANITIZE_STRING);
31
+	$airport_icao = filter_input(INPUT_GET, 'airport', FILTER_SANITIZE_STRING);
32 32
 	$airport = $airport_icao;
33 33
 	$page_url = $globalURL.'/airport/'.$airport_icao;
34 34
 	
35
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
35
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
36 36
 	$airport_array = $Spotter->getAllAirportInfo($airport_icao);
37 37
 	if (!empty($airport_array))
38 38
 	{
39 39
 		if ($sort != '') {
40
-			$spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, $sort);
40
+			$spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, $sort);
41 41
 		} else {
42
-			$spotter_array = $Spotter->getSpotterDataByAirport($airport_icao,$limit_start.",".$absolute_difference, '');
42
+			$spotter_array = $Spotter->getSpotterDataByAirport($airport_icao, $limit_start.",".$absolute_difference, '');
43 43
 		}
44 44
 		
45 45
 		if (isset($globalMETAR) && $globalMETAR) {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
             		//print_r($metar_parse);
51 51
 		}
52 52
 		
53
-		$title = sprintf(_("Detailed View for %s, %s (%s)"),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']);
53
+		$title = sprintf(_("Detailed View for %s, %s (%s)"), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']);
54 54
 
55 55
 		require_once('header.php');
56 56
 		
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 		$airport_names = $Stats->getAllAirportNames();
63 63
 		if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
64 64
 		ksort($airport_names);
65
-		foreach($airport_names as $airport_name)
65
+		foreach ($airport_names as $airport_name)
66 66
 		{
67
-			if($airport_icao == $airport_name['airport_icao'])
67
+			if ($airport_icao == $airport_name['airport_icao'])
68 68
 			{
69 69
 				print '<option value="'.$airport_name['airport_icao'].'" selected="selected">'.$airport_name['airport_city'].', '.$airport_name['airport_name'].', '.$airport_name['airport_country'].' ('.$airport_name['airport_icao'].')</option>';
70 70
 			} else {
@@ -114,15 +114,15 @@  discard block
 block discarded – undo
114 114
 				$date_data = '';
115 115
 				$departure_data = '';
116 116
 				$arrival_data = '';
117
-				foreach($all_data as $data)
117
+				foreach ($all_data as $data)
118 118
 				{
119 119
 					$date_data .= '"'.$data['date'].'",';
120 120
 					$departure_data .= $data['departure'].',';
121 121
 					$arrival_data .= $data['arrival'].',';
122 122
 				}
123
-				$date_data = "['x',".substr($date_data,0,-1)."]";
124
-				$departure_data = "['departure',".substr($departure_data,0,-1)."]";
125
-				$arrival_data = "['arrival',".substr($arrival_data,0,-1)."]";
123
+				$date_data = "['x',".substr($date_data, 0, -1)."]";
124
+				$departure_data = "['departure',".substr($departure_data, 0, -1)."]";
125
+				$arrival_data = "['arrival',".substr($arrival_data, 0, -1)."]";
126 126
 				print 'c3.generate({
127 127
 				    bindto: "#chart",
128 128
 				    data: {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 					print _("Dew point:").' '.$metar_parse['dew'].' °C'." - ";
180 180
 				}
181 181
 				if (isset($metar_parse['temperature']) && isset($metar_parse['dew'])) {
182
-					$humidity = round(100 * pow((112 - (0.1 * $metar_parse['temperature']) + $metar_parse['dew']) / (112 + (0.9 * $metar_parse['temperature'])), 8),1);
182
+					$humidity = round(100*pow((112 - (0.1*$metar_parse['temperature']) + $metar_parse['dew'])/(112 + (0.9*$metar_parse['temperature'])), 8), 1);
183 183
 					print _("Humidity:").' '.$humidity.'%'." - ";
184 184
 				}
185 185
 				if (isset($metar_parse['QNH'])) {
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 			print '<div class="table column">';
197 197
 			if ($airport_array[0]['iata'] != "NA")
198 198
 			{
199
-				print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."),$airport_array[0]['city'],$airport_array[0]['name'],$airport_array[0]['icao']).'</p>';
199
+				print '<p>'.sprintf(_("The table below shows the detailed information of all flights to/from <strong>%s, %s (%s)</strong>."), $airport_array[0]['city'], $airport_array[0]['name'], $airport_array[0]['icao']).'</p>';
200 200
 			}
201 201
 			include('table-output.php');  
202 202
 			print '<div class="pagination">';
Please login to merge, or discard this patch.
Braces   +22 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		$limit_start = 0;
16 16
 		$limit_end = 25;
17 17
 		$absolute_difference = 25;
18
-	}  else {
18
+	} else {
19 19
 		$limit_explode = explode(",", $_GET['limit']);
20 20
 		$limit_start = $limit_explode[0];
21 21
 		$limit_end = $limit_explode[1];
@@ -46,7 +46,9 @@  discard block
 block discarded – undo
46 46
 			$METAR = new METAR();
47 47
 			$metar_info = $METAR->getMETAR($airport_icao);
48 48
 			//print_r($metar_info);
49
-			if (isset($metar_info[0]['metar'])) $metar_parse = $METAR->parse($metar_info[0]['metar']);
49
+			if (isset($metar_info[0]['metar'])) {
50
+				$metar_parse = $METAR->parse($metar_info[0]['metar']);
51
+			}
50 52
             		//print_r($metar_parse);
51 53
 		}
52 54
 		
@@ -60,7 +62,9 @@  discard block
 block discarded – undo
60 62
 		print '<option></option>';
61 63
 		$Stats = new Stats();
62 64
 		$airport_names = $Stats->getAllAirportNames();
63
-		if (empty($airport_names)) $airport_names = $Spotter->getAllAirportNames();
65
+		if (empty($airport_names)) {
66
+			$airport_names = $Spotter->getAllAirportNames();
67
+		}
64 68
 		ksort($airport_names);
65 69
 		foreach($airport_names as $airport_name)
66 70
 		{
@@ -95,9 +99,15 @@  discard block
 block discarded – undo
95 99
 			print '</div>';
96 100
 			print '<div><span class="label">'._("Coordinates").'</span><a href="http://maps.google.com/maps?z=10&t=k&q='.$airport_array[0]['latitude'].','.$airport_array[0]['longitude'].'" target="_blank">Google Map<i class="fa fa-angle-double-right"></i></a></div>';
97 101
 			print '<div><span class="label">'._("Live Air Traffic").'</span><a href="http://www.liveatc.net/search/?icao='.$airport_array[0]['icao'].'" target="_blank">LiveATC.net<i class="fa fa-angle-double-right"></i></a></div>';
98
-			if (isset($airport_array[0]['home_link']) && $airport_array[0]['home_link'] != '') print '<div><a href="'.$airport_array[0]['home_link'].'"><i class="fa fa-home"></i></a></div>';
99
-			if (isset($airport_array[0]['wikipedia_link']) && $airport_array[0]['wikipedia_link'] != '') print '<div><a href="'.$airport_array[0]['wikipedia_link'].'"><i class="fa fa-wikipedia-w"></i></a></div>';
100
-			if (isset($airport_array[0]['diagram_pdf']) && $airport_array[0]['diagram_pdf'] != '') print '<div><span class="label">'._("Diagram").'</span><a href="'.$airport_array[0]['diagram_pdf'].'" target="_blank">'.$airport_array[0]['icao'].'<i class="fa fa-angle-double-right"></i></a></div>';
102
+			if (isset($airport_array[0]['home_link']) && $airport_array[0]['home_link'] != '') {
103
+				print '<div><a href="'.$airport_array[0]['home_link'].'"><i class="fa fa-home"></i></a></div>';
104
+			}
105
+			if (isset($airport_array[0]['wikipedia_link']) && $airport_array[0]['wikipedia_link'] != '') {
106
+				print '<div><a href="'.$airport_array[0]['wikipedia_link'].'"><i class="fa fa-wikipedia-w"></i></a></div>';
107
+			}
108
+			if (isset($airport_array[0]['diagram_pdf']) && $airport_array[0]['diagram_pdf'] != '') {
109
+				print '<div><span class="label">'._("Diagram").'</span><a href="'.$airport_array[0]['diagram_pdf'].'" target="_blank">'.$airport_array[0]['icao'].'<i class="fa fa-angle-double-right"></i></a></div>';
110
+			}
101 111
 			print '</div>';
102 112
 			
103 113
 			$Stats = new Stats();
@@ -105,7 +115,9 @@  discard block
 block discarded – undo
105 115
 			// Use spotter also
106 116
 			if (isset($globalTimezone)) {
107 117
 				date_default_timezone_set($globalTimezone);
108
-			} else date_default_timezone_set('UTC');
118
+			} else {
119
+				date_default_timezone_set('UTC');
120
+			}
109 121
 			if (count($all_data) > 0) {
110 122
 				print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
111 123
 				print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -211,7 +223,9 @@  discard block
 block discarded – undo
211 223
 			print '</div>';
212 224
 			print '</div>';
213 225
 		} else {
214
-			if (isset($airport_array[0]['image']) && $airport_array[0]['image'] != '') print '<center><img src="'.$airport_array[0]['image'].'" /></center>';
226
+			if (isset($airport_array[0]['image']) && $airport_array[0]['image'] != '') {
227
+				print '<center><img src="'.$airport_array[0]['image'].'" /></center>';
228
+			}
215 229
 			print '<p>'._("Sorry, no flights used the airport in this database.").'</p>'; 
216 230
 		}
217 231
 	} else {
Please login to merge, or discard this patch.
registration-statistics-time.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$registration = filter_input(INPUT_GET,'registration',FILTER_SANITIZE_STRING);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$registration = filter_input(INPUT_GET, 'registration', FILTER_SANITIZE_STRING);
8 8
 $spotter_array = $Spotter->getSpotterDataByRegistration($registration, "0,1", $sort);
9 9
 $aircraft_array = $Spotter->getAircraftInfoByRegistration($registration);
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"),$registration);
13
+	$title = sprintf(_("Most Common Time of Day of aircraft with registration %s"), $registration);
14 14
 	require_once('header.php');
15 15
   
16 16
 	print '<div class="info column">';
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	include('registration-sub-menu.php');
24 24
 	print '<div class="column">';
25 25
 	print '<h2>'._("Most Common Time of Day").'</h2>';
26
-	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."),$registration).'</p>';
26
+	print '<p>'.sprintf(_("The statistic below shows the most common time of day from aircraft with registration <strong>%s</strong>."), $registration).'</p>';
27 27
 
28 28
 	$hour_array = $Spotter->countAllHoursByRegistration($registration);
29 29
 	print '<link href="'.$globalURL.'/css/c3.min.css" rel="stylesheet" type="text/css">';
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 	$hour_data = '';
34 34
 	$hour_cnt = '';
35 35
 	$last = 0;
36
-	foreach($hour_array as $hour_item)
36
+	foreach ($hour_array as $hour_item)
37 37
 	{
38
-		while($last != $hour_item['hour_name']) {
38
+		while ($last != $hour_item['hour_name']) {
39 39
 			$hour_data .= '"'.$last.':00",';
40 40
 			$hour_cnt .= '0,';
41 41
 			$last++;
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		$hour_cnt .= $hour_item['hour_count'].',';
46 46
 	}
47 47
 	$hour_data = "[".substr($hour_data, 0, -1)."]";
48
-	$hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]";
48
+	$hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]";
49 49
 	print 'c3.generate({
50 50
 	    bindto: "#chartHour",
51 51
 	    data: {
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 		print '</thead>';
69 69
 		print '<tbody>';
70 70
 		$i = 1;
71
-		foreach($hour_array as $hour_item)
71
+		foreach ($hour_array as $hour_item)
72 72
 		{
73 73
 			print '<tr>';
74 74
 			print '<td>'.$hour_item['hour_name'].':00</td>';
Please login to merge, or discard this patch.
date-statistics-departure-airport.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@  discard block
 block discarded – undo
4 4
 require_once('require/class.Language.php');
5 5
 
6 6
 $Spotter = new Spotter();
7
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
8
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
9
-$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
7
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
8
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
9
+$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
10 10
 
11 11
 if (!empty($spotter_array))
12 12
 {
13
-	$title = sprintf(_("Most Common Departure Airports on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13
+	$title = sprintf(_("Most Common Departure Airports on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
14 14
 
15 15
 	require_once('header.php');
16 16
 	print '<div class="select-item">';
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
29 29
 	print '<br />';
30 30
 	print '<div class="info column">';
31
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
31
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
32 32
 	print '</div>';
33 33
 
34 34
 	include('date-sub-menu.php');
35 35
 	print '<div class="column">';
36 36
 	print '<h2>'._("Most Common Departure Airports").'</h2>';
37
-	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37
+	print '<p>'.sprintf(_("The statistic below shows all departure airports of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
38 38
 	$airport_airport_array = $Spotter->countAllDepartureAirportsByDate($date);
39 39
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
40 40
 	print '<script type="text/javascript" src="'.$globalURL.'/js/topojson.v2.min.js"></script>';
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	print '<script>';
44 44
 	print 'var series = [';
45 45
 	$airport_data = '';
46
-	foreach($airport_airport_array as $airport_item)
46
+	foreach ($airport_airport_array as $airport_item)
47 47
 	{
48 48
 		$airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],';
49 49
 	}
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	print '</thead>';
99 99
 	print '<tbody>';
100 100
 	$i = 1;
101
-	foreach($airport_airport_array as $airport_item)
101
+	foreach ($airport_airport_array as $airport_item)
102 102
 	{
103 103
 		print '<tr>';
104 104
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
route-statistics-airline-country.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 require_once('require/class.Spotter.php');
9 9
 require_once('require/class.Language.php');
10 10
 $Spotter = new Spotter();
11
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
12
-$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING);
13
-$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
11
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
12
+$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING);
13
+$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING);
14 14
 $spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, "0,1", $sort);
15 15
 
16 16
 if (!empty($spotter_array))
17 17
 {
18
-	$title = sprintf(_("Most Common Airlines by Country between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']);
18
+	$title = sprintf(_("Most Common Airlines by Country between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']);
19 19
 	require_once('header.php');
20 20
 	print '<div class="info column">';
21 21
 	print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>';
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	include('route-sub-menu.php');
27 27
 	print '<div class="column">';
28 28
 	print '<h2>'._("Most Common Airlines by Country").'</h2>';
29
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']).'</p>';
29
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines by Country of origin of flights between <strong>%s (%s), %s</strong> and <strong>%s (%s), %s</strong>."), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']).'</p>';
30 30
 
31 31
 	$airline_array = $Spotter->countAllAirlineCountriesByRoute($departure_airport, $arrival_airport);
32 32
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
36 36
 	print 'var series = [';
37 37
 	$country_data = '';
38
-	foreach($airline_array as $airline_item)
38
+	foreach ($airline_array as $airline_item)
39 39
 	{
40 40
 		$country_data .= '[ "'.$airline_item['airline_country_iso3'].'",'.$airline_item['airline_country_count'].'],';
41 41
 	}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		print '</thead>';
83 83
 		print '<tbody>';
84 84
 		$i = 1;
85
-		foreach($airline_array as $airline_item)
85
+		foreach ($airline_array as $airline_item)
86 86
 		{
87 87
 			print '<tr>';
88 88
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-arrival-airport-country.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,13 +3,13 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 $Spotter = new Spotter();
6
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
7
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
8
-$spotter_array = $Spotter->getSpotterDataByDate($date,"0,1", $sort);
6
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
7
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
8
+$spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
9 9
 
10 10
 if (!empty($spotter_array))
11 11
 {
12
-	$title = sprintf(_("Most Common Arrival Airports by Country on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Arrival Airports by Country on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 	require_once('header.php');
14 14
 	print '<div class="select-item">';
15 15
 	print '<form action="'.$globalURL.'/date" method="post" class="form-inline">';
@@ -26,13 +26,13 @@  discard block
 block discarded – undo
26 26
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
27 27
 	print '<br />';
28 28
 	print '<div class="info column">';
29
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
29
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
30 30
 	print '</div>';
31 31
 
32 32
 	include('date-sub-menu.php');
33 33
 	print '<div class="column">';
34 34
 	print '<h2>'._("Most Common Arrival Airports by Country").'</h2>';
35
-	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
35
+	print '<p>'.sprintf(_("The statistic below shows all arrival airports by Country of origin of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
36 36
 
37 37
 	$airport_country_array = $Spotter->countAllArrivalAirportCountriesByDate($date);
38 38
 	print '<script type="text/javascript" src="'.$globalURL.'/js/d3.min.js"></script>';
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	print '<div id="chartCountry" class="chart" width="100%"></div><script>';
42 42
 	print 'var series = [';
43 43
 	$country_data = '';
44
-	foreach($airport_country_array as $airport_item)
44
+	foreach ($airport_country_array as $airport_item)
45 45
 	{
46 46
 		$country_data .= '[ "'.$airport_item['arrival_airport_country_iso3'].'",'.$airport_item['airport_arrival_country_count'].'],';
47 47
 	}
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 		print '</thead>';
90 90
 		print '<tbody>';
91 91
 		$i = 1;
92
-		foreach($airport_country_array as $airport_item)
92
+		foreach ($airport_country_array as $airport_item)
93 93
 		{
94 94
 			print '<tr>';
95 95
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.