Completed
Push — master ( 46434e...ad133e )
by Yannick
32:08 queued 16:03
created
install/VAM/VAM-json.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,27 +11,27 @@
 block discarded – undo
11 11
 	die();
12 12
 }
13 13
 $query = 'select * from vam_live_flights rc, gvausers gu where gu.gvauser_id = rc.gvauser_id';  
14
-$json_data=array();  
14
+$json_data = array();  
15 15
 $result = $db->query($query);
16 16
 while ($rec = $result->fetch_assoc())
17 17
 {  
18
-	$json_array['gvauser_id']=$rec['gvauser_id']; // users "pilot unique ID" "40"
19
-	$json_array['flight_id']=$rec['flight_id']; // flight_id
20
-	$json_array['pilot_id']=$rec['callsign']; // users pilot_id "VAM500"
21
-	$json_array['callsign']=substr($rec['flight_id'],-7);  // substr icao Flight "AFR524"
22
-	$json_array['pilot_name']=$rec['name'] .' '.$rec['surname'] ;  // Users "name + surname"
23
-	$json_array['plane_type']=$rec['plane_type'];  // type Plane "B739"
24
-	$json_array['departure']=$rec['departure'];  // departure ICAO
25
-	$json_array['arrival']=$rec['arrival'];     // arrival Ident
26
-	$json_array['latitude']=$rec['latitude'];  // return 55.7328860921521
27
-	$json_array['longitude']=$rec['longitude'];  // return 8.87433614409404
28
-	$json_array['altitude']=$rec['altitude'];  // return "147"
29
-	$json_array['heading']=$rec['heading'];  // return "307"
30
-	$json_array['ias']=$rec['ias'];  // return speed "IAS"
31
-	$json_array['gs']=$rec['gs'];  // return speed "GS"
18
+	$json_array['gvauser_id'] = $rec['gvauser_id']; // users "pilot unique ID" "40"
19
+	$json_array['flight_id'] = $rec['flight_id']; // flight_id
20
+	$json_array['pilot_id'] = $rec['callsign']; // users pilot_id "VAM500"
21
+	$json_array['callsign'] = substr($rec['flight_id'], -7); // substr icao Flight "AFR524"
22
+	$json_array['pilot_name'] = $rec['name'].' '.$rec['surname']; // Users "name + surname"
23
+	$json_array['plane_type'] = $rec['plane_type']; // type Plane "B739"
24
+	$json_array['departure'] = $rec['departure']; // departure ICAO
25
+	$json_array['arrival'] = $rec['arrival']; // arrival Ident
26
+	$json_array['latitude'] = $rec['latitude']; // return 55.7328860921521
27
+	$json_array['longitude'] = $rec['longitude']; // return 8.87433614409404
28
+	$json_array['altitude'] = $rec['altitude']; // return "147"
29
+	$json_array['heading'] = $rec['heading']; // return "307"
30
+	$json_array['ias'] = $rec['ias']; // return speed "IAS"
31
+	$json_array['gs'] = $rec['gs']; // return speed "GS"
32 32
 	// $json_array['routes']=$rec['routes'];  // (unusable)
33
-	$json_array['flight_status']=$rec['flight_status'];  // "return Status"
34
-	$json_array['last_update']=$rec['last_update'];  // return "DateTime"
33
+	$json_array['flight_status'] = $rec['flight_status']; // "return Status"
34
+	$json_array['last_update'] = $rec['last_update']; // return "DateTime"
35 35
 	$json_data[] = $json_array;
36 36
  }  
37 37
 echo json_encode($json_data);
Please login to merge, or discard this patch.
atc-geojson.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 	header('Content-disposition: attachment; filename="atc.geojson"');
8 8
 }
9 9
 header('Content-Type: text/javascript');
10
-$ATC=new ATC();
10
+$ATC = new ATC();
11 11
 if (isset($_GET['coord'])) 
12 12
 {
13 13
 	//$coords = explode(',',$_GET['coord']);
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $output = '{"type": "FeatureCollection","features": [';
20 20
 if (!empty($spotter_array))
21 21
 {	  
22
-	foreach($spotter_array as $spotter_item)
22
+	foreach ($spotter_array as $spotter_item)
23 23
 	{
24 24
 		date_default_timezone_set('UTC');
25 25
 		//waypoint plotting
Please login to merge, or discard this patch.
route-detailed.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,17 +3,17 @@  discard block
 block discarded – undo
3 3
 require_once('require/class.Spotter.php');
4 4
 require_once('require/class.Language.php');
5 5
 
6
-if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])){
6
+if (!isset($_GET['departure_airport']) || !isset($_GET['arrival_airport'])) {
7 7
 	header('Location: '.$globalURL.'');
8 8
 } else {
9 9
 	$Spotter = new Spotter();
10 10
 	//calculuation for the pagination
11
-	if(!isset($_GET['limit']))
11
+	if (!isset($_GET['limit']))
12 12
 	{
13 13
 		$limit_start = 0;
14 14
 		$limit_end = 25;
15 15
 		$absolute_difference = 25;
16
-	}  else {
16
+	} else {
17 17
 		$limit_explode = explode(",", $_GET['limit']);
18 18
 		$limit_start = $limit_explode[0];
19 19
 		$limit_end = $limit_explode[1];
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 	$limit_previous_1 = $limit_start - $absolute_difference;
28 28
 	$limit_previous_2 = $limit_end - $absolute_difference;
29 29
 	
30
-	$departure_airport = filter_input(INPUT_GET,'departure_airport',FILTER_SANITIZE_STRING);
31
-	$arrival_airport = filter_input(INPUT_GET,'arrival_airport',FILTER_SANITIZE_STRING);
30
+	$departure_airport = filter_input(INPUT_GET, 'departure_airport', FILTER_SANITIZE_STRING);
31
+	$arrival_airport = filter_input(INPUT_GET, 'arrival_airport', FILTER_SANITIZE_STRING);
32 32
 	$page_url = $globalURL.'/route/'.$departure_airport.'/'.$arrival_airport;
33
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
33
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
34 34
 	if ($sort != '') {
35 35
 		$spotter_array = $Spotter->getSpotterDataByRoute($departure_airport, $arrival_airport, $limit_start.",".$absolute_difference, $sort);
36 36
 	} else {
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
  
40 40
 	if (!empty($spotter_array))
41 41
 	{
42
-		$title = sprintf(_("Detailed View for flights between %s (%s), %s - %s (%s), %s"),$spotter_array[0]['departure_airport_name'],$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['departure_airport_country'],$spotter_array[0]['arrival_airport_name'],$spotter_array[0]['arrival_airport_icao'],$spotter_array[0]['arrival_airport_country']);
42
+		$title = sprintf(_("Detailed View for flights between %s (%s), %s - %s (%s), %s"), $spotter_array[0]['departure_airport_name'], $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['departure_airport_country'], $spotter_array[0]['arrival_airport_name'], $spotter_array[0]['arrival_airport_icao'], $spotter_array[0]['arrival_airport_country']);
43 43
 		require_once('header.php');
44 44
 		print '<div class="info column">';
45 45
 		print '<h1>'._("Flights between").' '.$spotter_array[0]['departure_airport_name'].' ('.$spotter_array[0]['departure_airport_icao'].'), '.$spotter_array[0]['departure_airport_country'].' - '.$spotter_array[0]['arrival_airport_name'].' ('.$spotter_array[0]['arrival_airport_icao'].'), '.$spotter_array[0]['arrival_airport_country'].'</h1>';
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
 		include('route-sub-menu.php');
51 51
 		print '<div class="table column">';
52
-		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."),$spotter_array[0]['departure_airport_icao'],$spotter_array[0]['arrival_airport_icao']).'</p>';
52
+		print '<p>'.sprintf(_("The table below shows the detailed information of all flights that used the route <strong>%s - %s</strong>."), $spotter_array[0]['departure_airport_icao'], $spotter_array[0]['arrival_airport_icao']).'</p>';
53 53
     
54 54
 		include('table-output.php'); 
55 55
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
upcoming.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@  discard block
 block discarded – undo
7 7
 require_once('header.php');
8 8
 
9 9
 //calculuation for the pagination
10
-if(!isset($_GET['limit']))
10
+if (!isset($_GET['limit']))
11 11
 {
12 12
 	$limit_start = 0;
13 13
 	$limit_end = 25;
14 14
 	$absolute_difference = 25;
15
-}  else {
15
+} else {
16 16
 	$limit_explode = explode(",", $_GET['limit']);
17 17
 	$limit_start = $limit_explode[0];
18 18
 	$limit_end = $limit_explode[1];
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 print '<div class="table column">';	
36 36
 print '<p>'._("This page shows all upcoming flights within the next 3 hours calculated using historical data, based on the number of same flights on the current day of the week &amp; current time. This does not take into account real-time delays and other factors.").'</p>';
37 37
 
38
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
38
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
39 39
 if ($sort != '') {
40 40
 	$spotter_array = $Spotter->getUpcomingFlights($limit_start.",".$absolute_difference, $sort);
41 41
 } else {
Please login to merge, or discard this patch.
incident-latest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 $page_url = $globalURL.'/accident-latest';
10 10
 
11
-if(!isset($_GET['limit']))
11
+if (!isset($_GET['limit']))
12 12
 {
13 13
 	$limit_start = 0;
14 14
 	$limit_end = 25;
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 print '<div class="table column">';
36 36
 print '<p>'._("The table below shows the latest Incidents.").'</p>';
37
-$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident');
37
+$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident');
38 38
 //print_r($spotter_array);
39 39
 if (!empty($spotter_array) && $spotter_array[0]['query_number_rows'] != 0) {
40 40
 	include('table-output.php');
Please login to merge, or discard this patch.
incident-detailed.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 {
11 11
 	$date = date('Y-m-d');
12 12
 } else {
13
-	$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
13
+	$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
14 14
 }
15 15
 
16
-if(!isset($_GET['limit']))
16
+if (!isset($_GET['limit']))
17 17
 {
18 18
 	$limit_start = 0;
19 19
 	$limit_end = 25;
@@ -48,12 +48,12 @@  discard block
 block discarded – undo
48 48
 print '<br />';
49 49
 
50 50
 print '<div class="info column">';
51
-print '<h1>'.sprintf(_("Incidents from %s"),date("l F j, Y",strtotime($date))).'</h1>';
51
+print '<h1>'.sprintf(_("Incidents from %s"), date("l F j, Y", strtotime($date))).'</h1>';
52 52
 print '</div>';
53 53
 
54 54
 print '<div class="table column">';
55
-print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."),date("l M j, Y",strtotime($date))).'</p>';
56
-$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference,'incident',$date);
55
+print '<p>'.sprintf(_("The table below shows the Incidents on <strong>%s</strong>."), date("l M j, Y", strtotime($date))).'</p>';
56
+$spotter_array = $Accident->getAccidentData($limit_start.",".$absolute_difference, 'incident', $date);
57 57
 //print_r($spotter_array);
58 58
 if (!empty($spotter_array) && isset($spotter_array[0]['query_number_rows']) && $spotter_array[0]['query_number_rows'] != 0) {
59 59
 	include('table-output.php');
Please login to merge, or discard this patch.
js/map.js.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 require_once('../require/settings.php');
3 3
 require_once('../require/class.Language.php'); 
4 4
 
5
-setcookie("MapFormat",'2d');
5
+setcookie("MapFormat", '2d');
6 6
 
7 7
 // Compressed GeoJson is used if true
8 8
 if (!isset($globalJsonCompress)) $compress = true;
@@ -18,10 +18,10 @@  discard block
 block discarded – undo
18 18
 	$lastupd = $_GET['archivespeed']*$archiveupdatetime;
19 19
 	if (isset($_GET['enddate']) && $_GET['enddate'] != '') $enddate = $_GET['enddate'];
20 20
 	else $enddate = time();
21
-	setcookie("archive_begin",$begindate);
22
-	setcookie("archive_end",$enddate);
23
-	setcookie("archive_update",$lastupd);
24
-	setcookie("archive_speed",$archivespeed);
21
+	setcookie("archive_begin", $begindate);
22
+	setcookie("archive_end", $enddate);
23
+	setcookie("archive_update", $lastupd);
24
+	setcookie("archive_speed", $archivespeed);
25 25
 ?>
26 26
 document.cookie =  'archive_begin=<?php print $begindate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/';
27 27
 document.cookie =  'archive_end=<?php print $enddate; ?>; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/';
@@ -92,16 +92,16 @@  discard block
 block discarded – undo
92 92
 <?php
93 93
 	}
94 94
 	if (isset($_GET['ident'])) {
95
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
95
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
96 96
 	}
97 97
 	if (isset($_GET['flightaware_id'])) {
98
-		$flightaware_id = filter_input(INPUT_GET,'flightaware_id',FILTER_SANITIZE_STRING);
98
+		$flightaware_id = filter_input(INPUT_GET, 'flightaware_id', FILTER_SANITIZE_STRING);
99 99
 	}
100 100
 	if (isset($_GET['latitude'])) {
101
-		$latitude = filter_input(INPUT_GET,'latitude',FILTER_SANITIZE_STRING);
101
+		$latitude = filter_input(INPUT_GET, 'latitude', FILTER_SANITIZE_STRING);
102 102
 	}
103 103
 	if (isset($_GET['longitude'])) {
104
-		$longitude = filter_input(INPUT_GET,'longitude',FILTER_SANITIZE_STRING);
104
+		$longitude = filter_input(INPUT_GET, 'longitude', FILTER_SANITIZE_STRING);
105 105
 	}
106 106
 ?>
107 107
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	     || navigator.userAgent.match(/BlackBerry/i)
137 137
 	     || navigator.userAgent.match(/Windows Phone/i))
138 138
 	{
139
-		var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom-1; else print '8'; ?>;
139
+		var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom - 1; else print '8'; ?>;
140 140
 	} else {
141 141
 		var zoom = <?php if (isset($globalLiveZoom)) print $globalLiveZoom; else print '9'; ?>;
142 142
 	}
@@ -230,19 +230,19 @@  discard block
 block discarded – undo
230 230
 	map.addLayer(yandexLayer);
231 231
 <?php
232 232
 	} elseif ($MapType == 'Bing-Aerial') {
233
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
233
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
234 234
 ?>
235 235
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Aerial'});
236 236
 	map.addLayer(bingLayer);
237 237
 <?php
238 238
 	} elseif ($MapType == 'Bing-Hybrid') {
239
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
239
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
240 240
 ?>
241 241
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'AerialWithLabels'});
242 242
 	map.addLayer(bingLayer);
243 243
 <?php
244 244
 	} elseif ($MapType == 'Bing-Road') {
245
-		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType','OpenStreetMap');
245
+		if (!isset($globalBingMapKey) || $globalBingMapKey == '') setcookie('MapType', 'OpenStreetMap');
246 246
 ?>
247 247
 	var bingLayer = new L.tileLayer.bing({bingMapsKey: '<?php print $globalBingMapKey; ?>',imagerySet: 'Road'});
248 248
 	map.addLayer(bingLayer);
@@ -534,10 +534,10 @@  discard block
 block discarded – undo
534 534
 	};
535 535
 	archive.update = function (props) {
536 536
 		if (typeof props != 'undefined') {
537
-			//this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' +  '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i>  <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>  <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>';
538
-			this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' +  '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>';
537
+			//this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' +  '<b>' + props.archive_date + ' UTC </b>' + '<br/><i class="fa fa-fast-backward" aria-hidden="true"></i> <i class="fa fa-backward" aria-hidden="true"></i>  <a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>  <i class="fa fa-forward" aria-hidden="true"></i> <i class="fa fa-fast-forward" aria-hidden="true"></i>';
538
+			this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' +  '<b>' + props.archive_date + ' UTC </b>' + '<br/><a href="#" onClick="archivePause();"><i class="fa fa-pause" aria-hidden="true"></i></a> <a href="#" onClick="archivePlay();"><i class="fa fa-play" aria-hidden="true"></i></a>';
539 539
 		} else {
540
-			this._div.innerHTML = '<h4><?php echo str_replace("'","\'",_("Archive Date & Time")); ?></h4>' +  '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>';
540
+			this._div.innerHTML = '<h4><?php echo str_replace("'", "\'", _("Archive Date & Time")); ?></h4>' +  '<b><i class="fa fa-spinner fa-pulse fa-2x fa-fw margin-bottom"></i></b>';
541 541
 		}
542 542
 
543 543
 	};
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 <?php
738 738
 		} else {
739 739
 ?>
740
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
740
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
741 741
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
742 742
 <?php
743 743
 		}
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
 			    /*
754 754
 			    shadowUrl: iconURLShadowpath,
755 755
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
756
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
756
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
757 757
 			    */
758 758
 			})
759 759
 		    })
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
 <?php
787 787
 		} else {
788 788
 ?>
789
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
789
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
790 790
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
791 791
 <?php
792 792
 		}
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
 <?php
835 835
 		} else {
836 836
 ?>
837
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
837
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
838 838
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
839 839
 <?php
840 840
 		}
@@ -1460,23 +1460,23 @@  discard block
 block discarded – undo
1460 1460
 	    airs.push(air.value);
1461 1461
 	}
1462 1462
     }
1463
-    document.cookie =  'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"))); ?>; path=/'
1463
+    document.cookie =  'filter_Airlines='+airs.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/'
1464 1464
 }
1465 1465
 function airlinestype(selectObj) {
1466 1466
     var idx = selectObj.selectedIndex;
1467 1467
     var airtype = selectObj.options[idx].value;
1468
-    document.cookie =  'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"))); ?>; path=/'
1468
+    document.cookie =  'filter_airlinestype='+airtype+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/'
1469 1469
 }
1470 1470
 function alliance(selectObj) {
1471 1471
     var idx = selectObj.selectedIndex;
1472 1472
     var alliance = selectObj.options[idx].value;
1473
-    document.cookie =  'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"))); ?>; path=/'
1473
+    document.cookie =  'filter_alliance='+alliance+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/'
1474 1474
 }
1475 1475
 
1476 1476
 function identfilter() {
1477 1477
     var ident = $('#identfilter').val();
1478 1478
     console.log('Filter with '+ident);
1479
-    document.cookie =  'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1479
+    document.cookie =  'filter_ident='+ident+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1480 1480
 }
1481 1481
 function removefilters() {
1482 1482
     // Get an array of all cookie names (the regex matches what we don't want)
@@ -1498,7 +1498,7 @@  discard block
 block discarded – undo
1498 1498
 	}
1499 1499
     }
1500 1500
     //document.cookie =  'Sources='+sources.join()+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1501
-    document.cookie =  'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"))); ?>; path=/'
1501
+    document.cookie =  'filter_Sources='+sources.join()+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); ?>; path=/'
1502 1502
 }
1503 1503
 
1504 1504
 function show3D() {
@@ -1521,23 +1521,23 @@  discard block
 block discarded – undo
1521 1521
 
1522 1522
 function clickVATSIM(cb) {
1523 1523
     //document.cookie =  'ShowVATSIM='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1524
-    document.cookie =  'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1524
+    document.cookie =  'filter_ShowVATSIM='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1525 1525
 }
1526 1526
 function clickIVAO(cb) {
1527 1527
     //document.cookie =  'ShowIVAO='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1528
-    document.cookie =  'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1528
+    document.cookie =  'filter_ShowIVAO='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1529 1529
 }
1530 1530
 function clickphpVMS(cb) {
1531 1531
     //document.cookie =  'ShowVMS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1532
-    document.cookie =  'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1532
+    document.cookie =  'filter_ShowVMS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1533 1533
 }
1534 1534
 function clickSBS1(cb) {
1535 1535
     //document.cookie =  'ShowSBS1='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1536
-    document.cookie =  'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1536
+    document.cookie =  'filter_ShowSBS1='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1537 1537
 }
1538 1538
 function clickAPRS(cb) {
1539 1539
     //document.cookie =  'ShowAPRS='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
1540
-    document.cookie =  'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T",mktime(0, 0, 0, date("m")  , date("d")+2, date("Y"))); ?>; path=/'
1540
+    document.cookie =  'filter_ShowAPRS='+cb.checked+'; expires=<?php print date("D, j M Y G:i:s T", mktime(0, 0, 0, date("m"), date("d") + 2, date("Y"))); ?>; path=/'
1541 1541
 }
1542 1542
 function clickFlightPopup(cb) {
1543 1543
     document.cookie =  'flightpopup='+cb.checked+'; expires=Thu, 2 Aug 2100 20:47:11 UTC; path=/'
Please login to merge, or discard this patch.
date-statistics-airline.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  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
-if (isset($_GET['date'])) $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
+if (isset($_GET['date'])) $spotter_array = $Spotter->getSpotterDataByDate($date, "0,1", $sort);
10 10
 else $spotter_array = '';
11 11
 
12 12
 if (!empty($spotter_array))
13 13
 {
14
-	$title = sprintf(_("Most Common Airlines on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
14
+	$title = sprintf(_("Most Common Airlines on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
15 15
 
16 16
 	require_once('header.php');
17 17
 	print '<div class="select-item">';
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
30 30
 	print '<br />';
31 31
 	print '<div class="info column">';
32
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
32
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
33 33
 	print '</div>';
34 34
 
35 35
 	include('date-sub-menu.php');
36 36
 	print '<div class="column">';
37 37
 	print '<h2>'._("Most Common Airlines").'</h2>';
38
-	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
38
+	print '<p>'.sprintf(_("The statistic below shows the most common airlines of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
39 39
 
40 40
 	$airline_array = $Spotter->countAllAirlinesByDate($date);
41 41
 	if (!empty($airline_array))
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		print '</thead>';
53 53
 		print '<tbody>';
54 54
 		$i = 1;
55
-		foreach($airline_array as $airline_item)
55
+		foreach ($airline_array as $airline_item)
56 56
 		{
57 57
 			print '<tr>';
58 58
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
date-statistics-manufacturer.php 1 patch
Spacing   +7 added lines, -7 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 Aircraft Manufacturer on %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
12
+	$title = sprintf(_("Most Common Aircraft Manufacturer on %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
13 13
 
14 14
 	require_once('header.php');
15 15
 	print '<div class="select-item">';
@@ -27,13 +27,13 @@  discard block
 block discarded – undo
27 27
 	print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
28 28
 	print '<br />';
29 29
 	print '<div class="info column">';
30
-	print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
30
+	print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
31 31
 	print '</div>';
32 32
 
33 33
 	include('date-sub-menu.php');
34 34
 	print '<div class="column">';
35 35
 	print '<h2>'._("Most Common Aircraft Manufacturer").'</h2>';
36
-	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
36
+	print '<p>'.sprintf(_("The statistic below shows the most common Aircraft Manufacturer of flights on <strong>%s</strong>."), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
37 37
 
38 38
 	$manufacturers_array = $Spotter->countAllAircraftManufacturerByDate($date);
39 39
 	if (!empty($manufacturers_array))
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 		print '</thead>';
49 49
 		print '<tbody>';
50 50
 		$i = 1;
51
-		foreach($manufacturers_array as $manufacturer_item)
51
+		foreach ($manufacturers_array as $manufacturer_item)
52 52
 		{
53 53
 			print '<tr>';
54 54
 			print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.