Completed
Push — master ( 637022...8149d9 )
by Yannick
55:10 queued 27:13
created
currently.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,21 +4,21 @@  discard block
 block discarded – undo
4 4
 
5 5
 $type = '';
6 6
 if (isset($_GET['marine'])) {
7
-	require_once('require/class.Marine.php');;
7
+	require_once('require/class.Marine.php'); ;
8 8
 	require_once('require/class.MarineLive.php');
9
-	$MarineLive=new MarineLive();
9
+	$MarineLive = new MarineLive();
10 10
 	$type = 'marine';
11 11
 	$page_url = $globalURL.'/marine/currently';
12 12
 } elseif (isset($_GET['tracker'])) {
13
-	require_once('require/class.Tracker.php');;
13
+	require_once('require/class.Tracker.php'); ;
14 14
 	require_once('require/class.TrackerLive.php');
15
-	$TrackerLive=new TrackerLive();
15
+	$TrackerLive = new TrackerLive();
16 16
 	$type = 'tracker';
17 17
 	$page_url = $globalURL.'/tracker/currently';
18 18
 } else {
19
-	require_once('require/class.Spotter.php');;
19
+	require_once('require/class.Spotter.php'); ;
20 20
 	require_once('require/class.SpotterLive.php');
21
-	$SpotterLive=new SpotterLive();
21
+	$SpotterLive = new SpotterLive();
22 22
 	$type = 'aircraft';
23 23
 	$page_url = $globalURL.'/currently';
24 24
 }
@@ -26,12 +26,12 @@  discard block
 block discarded – undo
26 26
 $title = "Current Activity";
27 27
 require_once('header.php');
28 28
 //calculuation for the pagination
29
-if(!isset($_GET['limit']))
29
+if (!isset($_GET['limit']))
30 30
 {
31 31
 	$limit_start = 0;
32 32
 	$limit_end = 25;
33 33
 	$absolute_difference = 25;
34
-}  else {
34
+} else {
35 35
 	$limit_explode = explode(",", $_GET['limit']);
36 36
 	$limit_start = $limit_explode[0];
37 37
 	$limit_end = $limit_explode[1];
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 elseif ($type == 'marine') print '<p>'._("The table below shows the detailed information of all current vessels.").'</p>';
55 55
 elseif ($type == 'tracker') print '<p>'._("The table below shows the detailed information of all current trackers.").'</p>';
56 56
 
57
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
57
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
58 58
 if ($sort != '') {
59 59
 	if ($type == 'aircraft') $spotter_array = $SpotterLive->getLiveSpotterData($limit_start.",".$absolute_difference, $sort);
60 60
 	elseif ($type == 'marine') $spotter_array = $MarineLive->getLiveMarineData($limit_start.",".$absolute_difference, $sort);
Please login to merge, or discard this patch.
date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $type = 'aircraft';
4 4
 if (isset($_GET['marine'])) $type = 'marine';
5 5
 elseif (isset($_GET['tracker'])) $type = 'tracker';
6
-$date = filter_input(INPUT_POST,'date',FILTER_SANITIZE_STRING);
6
+$date = filter_input(INPUT_POST, 'date', FILTER_SANITIZE_STRING);
7 7
 if ($date == '') $date = date('Y-m-d');
8 8
 if ($type == 'marine') header('Location: '.$globalURL.'/marine/date/'.$date);
9 9
 elseif ($type == 'tracker') header('Location: '.$globalURL.'/tracker/date/'.$date);
Please login to merge, or discard this patch.
date-detailed.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -2,34 +2,34 @@  discard block
 block discarded – undo
2 2
 require_once('require/class.Connection.php');
3 3
 require_once('require/class.Language.php');
4 4
 $type = '';
5
-$date = filter_input(INPUT_GET,'date',FILTER_SANITIZE_STRING);
5
+$date = filter_input(INPUT_GET, 'date', FILTER_SANITIZE_STRING);
6 6
 if (isset($_GET['marine'])) {
7
-	require_once('require/class.Marine.php');;
7
+	require_once('require/class.Marine.php'); ;
8 8
 	$Marine = new Marine();
9 9
 	$type = 'marine';
10 10
 	$page_url = $globalURL.'/marine/date/'.$date;
11 11
 } elseif (isset($_GET['tracker'])) {
12
-	require_once('require/class.Tracker.php');;
12
+	require_once('require/class.Tracker.php'); ;
13 13
 	$Tracker = new Tracker();
14 14
 	$type = 'tracker';
15 15
 	$page_url = $globalURL.'/tracker/date/'.$date;
16 16
 } else {
17
-	require_once('require/class.Spotter.php');;
17
+	require_once('require/class.Spotter.php'); ;
18 18
 	$Spotter = new Spotter();
19 19
 	$type = 'aircraft';
20 20
 	$page_url = $globalURL.'/date/'.$date;
21 21
 }
22 22
 
23
-if (!isset($_GET['date'])){
23
+if (!isset($_GET['date'])) {
24 24
 	header('Location: '.$globalURL.'');
25 25
 } else {
26 26
 	//calculuation for the pagination
27
-	if(!isset($_GET['limit']))
27
+	if (!isset($_GET['limit']))
28 28
 	{
29 29
 		$limit_start = 0;
30 30
 		$limit_end = 25;
31 31
 		$absolute_difference = 25;
32
-	}  else {
32
+	} else {
33 33
 		$limit_explode = explode(",", $_GET['limit']);
34 34
 		$limit_start = $limit_explode[0];
35 35
 		$limit_end = $limit_explode[1];
@@ -43,24 +43,24 @@  discard block
 block discarded – undo
43 43
 	$limit_previous_1 = $limit_start - $absolute_difference;
44 44
 	$limit_previous_2 = $limit_end - $absolute_difference;
45 45
 	
46
-	$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
46
+	$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
47 47
 	if ($sort != '') 
48 48
 	{
49
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference, $sort);
50
-		elseif ($type == 'tracker') $spotter_array = $Tracker->getTrackerDataByDate($date,$limit_start.",".$absolute_difference, $sort);
51
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference, $sort);
49
+		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference, $sort);
50
+		elseif ($type == 'tracker') $spotter_array = $Tracker->getTrackerDataByDate($date, $limit_start.",".$absolute_difference, $sort);
51
+		else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference, $sort);
52 52
 	} else {
53
-		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date,$limit_start.",".$absolute_difference);
54
-		elseif ($type == 'tracker') $spotter_array = $Tracker->getTrackerDataByDate($date,$limit_start.",".$absolute_difference);
55
-		else $spotter_array = $Spotter->getSpotterDataByDate($date,$limit_start.",".$absolute_difference);
53
+		if ($type == 'marine') $spotter_array = $Marine->getMarineDataByDate($date, $limit_start.",".$absolute_difference);
54
+		elseif ($type == 'tracker') $spotter_array = $Tracker->getTrackerDataByDate($date, $limit_start.",".$absolute_difference);
55
+		else $spotter_array = $Spotter->getSpotterDataByDate($date, $limit_start.",".$absolute_difference);
56 56
 	}
57 57
 	
58 58
 	if (!empty($spotter_array))
59 59
 	{
60 60
 		date_default_timezone_set($globalTimezone);
61
-		if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
62
-		elseif ($type == 'tracker') $title = sprintf(_("Detailed View for trackers from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
63
-		else $title = sprintf(_("Detailed View for flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
61
+		if ($type == 'marine') $title = sprintf(_("Detailed View for vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
62
+		elseif ($type == 'tracker') $title = sprintf(_("Detailed View for trackers from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
63
+		else $title = sprintf(_("Detailed View for flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601'])));
64 64
 
65 65
 		require_once('header.php');
66 66
 		print '<div class="select-item">';
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
 		print '<script type="text/javascript">$(function () { $("#datepicker").datetimepicker({ format: "YYYY-MM-DD", defaultDate: "'.$date.'" }); }); </script>';
79 79
 		print '<br />';
80 80
 		print '<div class="info column">';
81
-		if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
82
-		else print '<h1>'.sprintf(_("Flights from %s"),date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
81
+		if ($type == 'marine') print '<h1>'.sprintf(_("Vessels from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
82
+		else print '<h1>'.sprintf(_("Flights from %s"), date("l F j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</h1>';
83 83
 		print '</div>';
84 84
 
85 85
 		if ($type == 'aircraft') include('date-sub-menu.php');
86 86
 		print '<div class="table column">';
87
-		if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
88
-		elseif ($type == 'tracker') print '<p>'.sprintf(_("The table below shows the detailed information of all trackers on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
89
-		else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."),date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
87
+		if ($type == 'marine') print '<p>'.sprintf(_("The table below shows the detailed information of all vessels on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
88
+		elseif ($type == 'tracker') print '<p>'.sprintf(_("The table below shows the detailed information of all trackers on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
89
+		else print '<p>'.sprintf(_("The table below shows the detailed information of all flights on <strong>%s</strong>."), date("l M j, Y", strtotime($spotter_array[0]['date_iso_8601']))).'</p>';
90 90
  
91 91
 		include('table-output.php');
92 92
 		print '<div class="pagination">';
Please login to merge, or discard this patch.
latest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
 require_once('header.php');
24 24
 
25 25
 //calculuation for the pagination
26
-if(!isset($_GET['limit']))
26
+if (!isset($_GET['limit']))
27 27
 {
28 28
 	$limit_start = 0;
29 29
 	$limit_end = 25;
30 30
 	$absolute_difference = 25;
31
-}  else {
31
+} else {
32 32
 	$limit_explode = explode(",", $_GET['limit']);
33 33
 	$limit_start = $limit_explode[0];
34 34
 	$limit_end = $limit_explode[1];
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 elseif ($type == 'tracker') print '<p>'._("The table below shows the detailed information of all recent trackers.").'</p>';
52 52
 else print '<p>'._("The table below shows the detailed information of all recent flights.").'</p>';
53 53
 
54
-$sort = filter_input(INPUT_GET,'sort',FILTER_SANITIZE_STRING);
54
+$sort = filter_input(INPUT_GET, 'sort', FILTER_SANITIZE_STRING);
55 55
 $sql_begin = microtime(true);
56 56
 if ($type == 'marine') {
57 57
 	$spotter_array = $Marine->getLatestMarineData($limit_start.",".$absolute_difference, $sort);
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 } else {
61 61
 	$spotter_array = $Spotter->getLatestSpotterData($limit_start.",".$absolute_difference, $sort);
62 62
 }
63
-$sql_time = microtime(true)-$sql_begin;
63
+$sql_time = microtime(true) - $sql_begin;
64 64
 $page_begin = microtime(true);
65 65
 if (!empty($spotter_array))
66 66
 {
@@ -77,6 +77,6 @@  discard block
 block discarded – undo
77 77
 	print '</div>';
78 78
 	print '</div>';
79 79
 }
80
-$page_time = microtime(true)-$page_begin;
80
+$page_time = microtime(true) - $page_begin;
81 81
 require_once('footer.php');
82 82
 ?>
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
js/map-marine.2d.js.php 1 patch
Spacing   +7 added lines, -7 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;
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
 
17 17
 <?php
18 18
 	if (isset($_GET['fammarine_id'])) {
19
-		$fammarine_id = filter_input(INPUT_GET,'fammarine_id',FILTER_SANITIZE_STRING);
19
+		$fammarine_id = filter_input(INPUT_GET, 'fammarine_id', FILTER_SANITIZE_STRING);
20 20
 	}
21 21
 	if (isset($_GET['ident'])) {
22
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
22
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
23 23
 	}
24 24
 	if (!isset($ident) && !isset($fammarine_id)) {
25 25
 ?>
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 <?php
183 183
 		} else {
184 184
 ?>
185
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
185
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
186 186
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
187 187
 <?php
188 188
 		}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			    /*
199 199
 			    shadowUrl: iconURLShadowpath,
200 200
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
201
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
201
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
202 202
 			    */
203 203
 			})
204 204
 		    })
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 <?php
232 232
 		} else {
233 233
 ?>
234
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
234
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
235 235
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
236 236
 <?php
237 237
 		}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 <?php
280 280
 		} else {
281 281
 ?>
282
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
282
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
283 283
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
284 284
 <?php
285 285
 		}
Please login to merge, or discard this patch.
js/map-tracker.2d.js.php 1 patch
Spacing   +7 added lines, -7 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;
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
 
18 18
 <?php
19 19
 	if (isset($_GET['famtrackid'])) {
20
-		$famtrackid = filter_input(INPUT_GET,'famtrackid',FILTER_SANITIZE_STRING);
20
+		$famtrackid = filter_input(INPUT_GET, 'famtrackid', FILTER_SANITIZE_STRING);
21 21
 	}
22 22
 	if (isset($_GET['ident'])) {
23
-		$ident = filter_input(INPUT_GET,'ident',FILTER_SANITIZE_STRING);
23
+		$ident = filter_input(INPUT_GET, 'ident', FILTER_SANITIZE_STRING);
24 24
 	}
25 25
 	if (!isset($ident) && !isset($famtrackid)) {
26 26
 ?>
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 <?php
183 183
 		} else {
184 184
 ?>
185
-		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
185
+		    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
186 186
 		    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
187 187
 <?php
188 188
 		}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			    /*
199 199
 			    shadowUrl: iconURLShadowpath,
200 200
 			    shadowSize: [<?php print $globalAircraftSize; ?>, <?php print $globalAircraftSize; ?>],
201
-			    shadowAnchor: [<?php print ($globalAircraftSize/2)+1; ?>, <?php print $globalAircraftSize; ?>]
201
+			    shadowAnchor: [<?php print ($globalAircraftSize/2) + 1; ?>, <?php print $globalAircraftSize; ?>]
202 202
 			    */
203 203
 			})
204 204
 		    })
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 <?php
232 232
 		} else {
233 233
 ?>
234
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
234
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
235 235
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
236 236
 <?php
237 237
 		}
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 <?php
280 280
 		} else {
281 281
 ?>
282
-			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000+20000; ?>+feature.properties.sqt*1000);
282
+			    var movingtime = Math.round(<?php if (isset($archiveupdatetime)) print $archiveupdatetime*1000; else print $globalMapRefresh*1000 + 20000; ?>+feature.properties.sqt*1000);
283 283
 			    return new L.Marker.movingMarker([latLng, feature.properties.nextlatlon],[movingtime],{
284 284
 <?php
285 285
 		}
Please login to merge, or discard this patch.
statistics-month.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	$Tracker = new Tracker();
17 17
 }
18 18
 if (!isset($filter_name)) $filter_name = '';
19
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
19
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
20 20
 if ($airline_icao == '' && isset($globalFilter)) {
21 21
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
22 22
 }
@@ -32,20 +32,20 @@  discard block
 block discarded – undo
32 32
 	  </div>
33 33
       <p>'._("Below is a chart that plots the busiest day during the <strong>last month</strong>.").'</p>';
34 34
 
35
-if ($type == 'aircraft') $date_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name);
35
+if ($type == 'aircraft') $date_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name);
36 36
 elseif ($type == 'marine') $date_array = $Marine->countAllDatesLastMonth();
37 37
 elseif ($type == 'tracker') $date_array = $Tracker->countAllDatesLastMonth();
38 38
 
39 39
 print '<div id="chart" class="chart" width="100%"></div><script>';
40 40
 $month_data = '';
41 41
 $month_cnt = '';
42
-foreach($date_array as $month_item)
42
+foreach ($date_array as $month_item)
43 43
 {
44 44
 	$month_data .= '"'.$month_item['date_name'].'",';
45 45
 	$month_cnt .= $month_item['date_count'].',';
46 46
 }
47 47
 $month_data = "['x',".substr($month_data, 0, -1)."]";
48
-$month_cnt = "['flights',".substr($month_cnt,0,-1)."]";
48
+$month_cnt = "['flights',".substr($month_cnt, 0, -1)."]";
49 49
 print 'c3.generate({
50 50
     bindto: "#chart",
51 51
     data: { x: "x",
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
 //$date_array = $Stats->countAllDates();
57 57
 if (!empty($date_array))
58 58
 {
59
-	foreach($date_array as $key => $row) {
59
+	foreach ($date_array as $key => $row) {
60 60
 		$years[$key] = $row['date_name'];
61 61
 		$counts[$key] = $row['date_count'];
62 62
 	}
63
-	array_multisort($counts,SORT_DESC,$date_array);
63
+	array_multisort($counts, SORT_DESC, $date_array);
64 64
 	print '<div class="table-responsive">';
65 65
 	print '<table class="common-date table-striped">';
66 66
 	print '<thead>';
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
 	print '</thead>';
71 71
 	print '<tbody>';
72 72
 	$i = 1;
73
-	foreach($date_array as $date_item)
73
+	foreach ($date_array as $date_item)
74 74
 	{
75 75
 		print '<tr>';
76 76
 		print '<td><strong>'.$i.'</strong></td>';
77 77
 		print '<td>';
78
-		if ($type == 'aircraft') print '<a href="'.$globalURL.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>';
79
-		else print '<a href="'.$globalURL.'/'.$type.'/date/'.date('Y-m-d',strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>';
78
+		if ($type == 'aircraft') print '<a href="'.$globalURL.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>';
79
+		else print '<a href="'.$globalURL.'/'.$type.'/date/'.date('Y-m-d', strtotime($date_item['date_name'])).'">'.date("l F j, Y", strtotime($date_item['date_name'])).'</a>';
80 80
 		print '</td>';
81 81
 		print '<td>';
82 82
 		print $date_item['date_count'];
Please login to merge, or discard this patch.
statistics-year.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 
20 20
 if (!isset($filter_name)) $filter_name = '';
21
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
21
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
22 22
 if ($airline_icao == '' && isset($globalFilter)) {
23 23
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
24 24
 }
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
 	</div>
34 34
       <p>'._("Below is a chart that plots the busiest month during the <strong>last year</strong>.").'</p>';
35 35
 
36
-if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name);
36
+if ($type == 'aircraft') $date_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name);
37 37
 elseif ($type == 'marine') $date_array = $Marine->countAllMonthsLastYear(true);
38 38
 elseif ($type == 'tracker') $date_array = $Tracker->countAllMonthsLastYear(true);
39 39
 print '<div id="chart" class="chart" width="100%"></div><script>';
40 40
 $year_data = '';
41 41
 $year_cnt = '';
42
-foreach($date_array as $year_item)
42
+foreach ($date_array as $year_item)
43 43
 {
44 44
 	$year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",';
45 45
 	$year_cnt .= $year_item['date_count'].',';
46 46
 }
47 47
 $year_data = "['x',".substr($year_data, 0, -1)."]";
48
-$year_cnt = "['flights',".substr($year_cnt,0,-1)."]";
48
+$year_cnt = "['flights',".substr($year_cnt, 0, -1)."]";
49 49
 print 'c3.generate({
50 50
     bindto: "#chart",
51 51
     data: { x: "x",
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	print '</thead>';
69 69
 	print '<tbody>';
70 70
 	$i = 1;
71
-	foreach($date_array as $date_item)
71
+	foreach ($date_array as $date_item)
72 72
 	{
73 73
 		print '<tr>';
74 74
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.
statistics-date.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 }
18 18
 
19 19
 if (!isset($filter_name)) $filter_name = '';
20
-$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING);
20
+$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING);
21 21
 if ($airline_icao == '' && isset($globalFilter)) {
22 22
     if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0];
23 23
 }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	  </div>
34 34
       <p>'._("Below is a chart that plots the busiest day during the <strong>last 7 days</strong>.").'</p>';
35 35
 
36
-if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name);
36
+if ($type == 'aircraft') $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name);
37 37
 elseif ($type == 'marine') $date_array = $Marine->countAllDatesLast7Days();
38 38
 elseif ($type == 'tracker') $date_array = $Tracker->countAllDatesLast7Days();
39 39
 if (count($date_array) == 0) {
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 print '<div id="chart" class="chart" width="100%"></div><script>';
43 43
 $date_data = '';
44 44
 $date_cnt = '';
45
-foreach($date_array as $date_item)
45
+foreach ($date_array as $date_item)
46 46
 {
47 47
 	$date_data .= '"'.$date_item['date_name'].'",';
48 48
 	$date_cnt .= $date_item['date_count'].',';
49 49
 }
50 50
 $date_data = "['x',".substr($date_data, 0, -1)."]";
51
-$date_cnt = "['flights',".substr($date_cnt,0,-1)."]";
51
+$date_cnt = "['flights',".substr($date_cnt, 0, -1)."]";
52 52
 print 'c3.generate({
53 53
     bindto: "#chart",
54 54
     data: { x: "x",
@@ -57,11 +57,11 @@  discard block
 block discarded – undo
57 57
 print '</script>';
58 58
 }
59 59
 if (isset($globalDBArchiveMonths) && $globalDBArchiveMonths > 0) {
60
-	print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."),$globalDBArchiveMonths).'</p>';
60
+	print '<p>'.sprintf(_("Below are the <strong>Top 10</strong> most busiest dates of last %d month(s)."), $globalDBArchiveMonths).'</p>';
61 61
 } else {
62 62
 	print '<p>'._("Below are the <strong>Top 10</strong> most busiest dates.").'</p>';
63 63
 }
64
-if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao,$filter_name);
64
+if ($type == 'aircraft') $date_array = $Stats->countAllDates($airline_icao, $filter_name);
65 65
 elseif ($type == 'marine') $date_array = $Marine->countAllDates();
66 66
 elseif ($type == 'tracker') $date_array = $Tracker->countAllDates();
67 67
 if (!empty($date_array))
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	print '</thead>';
76 76
 	print '<tbody>';
77 77
 	$i = 1;
78
-	foreach($date_array as $date_item)
78
+	foreach ($date_array as $date_item)
79 79
 	{
80 80
 		print '<tr>';
81 81
 		print '<td><strong>'.$i.'</strong></td>';
Please login to merge, or discard this patch.