@@ -79,23 +79,23 @@ discard block |
||
79 | 79 | <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
80 | 80 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
81 | 81 | <?php |
82 | - if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
82 | + if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
83 | 83 | ?> |
84 | 84 | <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
85 | 85 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
86 | 86 | <?php |
87 | - } else { |
|
88 | - ?> |
|
87 | + } else { |
|
88 | + ?> |
|
89 | 89 | <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
90 | 90 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
91 | 91 | <?php |
92 | - } |
|
93 | - ?> |
|
92 | + } |
|
93 | + ?> |
|
94 | 94 | <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
95 | 95 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
96 | 96 | <?php |
97 | - if ($airline_icao == '') { |
|
98 | - ?> |
|
97 | + if ($airline_icao == '') { |
|
98 | + ?> |
|
99 | 99 | <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
100 | 100 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
101 | 101 | <?php |
@@ -138,38 +138,38 @@ discard block |
||
138 | 138 | <div class="col-md-6"> |
139 | 139 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
140 | 140 | <?php |
141 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
142 | - if (count($aircraft_array) == 0) print _("No data available"); |
|
143 | - else { |
|
144 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
145 | - $aircraft_data = ''; |
|
146 | - foreach($aircraft_array as $aircraft_item) |
|
147 | - { |
|
148 | - $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
149 | - } |
|
150 | - $aircraft_data = substr($aircraft_data, 0, -1); |
|
151 | - print 'var series = ['.$aircraft_data.'];'; |
|
152 | - print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
153 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
154 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
155 | - print 'var aircraftype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
156 | - print 'dataset'; |
|
157 | - print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
158 | - print '</script>'; |
|
159 | - } |
|
160 | - ?> |
|
141 | + $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
142 | + if (count($aircraft_array) == 0) print _("No data available"); |
|
143 | + else { |
|
144 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
145 | + $aircraft_data = ''; |
|
146 | + foreach($aircraft_array as $aircraft_item) |
|
147 | + { |
|
148 | + $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
149 | + } |
|
150 | + $aircraft_data = substr($aircraft_data, 0, -1); |
|
151 | + print 'var series = ['.$aircraft_data.'];'; |
|
152 | + print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
153 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
154 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
155 | + print 'var aircraftype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
156 | + print 'dataset'; |
|
157 | + print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
158 | + print '</script>'; |
|
159 | + } |
|
160 | + ?> |
|
161 | 161 | <div class="more"> |
162 | 162 | <?php |
163 | - if ($year != '' && $month != '') { |
|
164 | - ?> |
|
163 | + if ($year != '' && $month != '') { |
|
164 | + ?> |
|
165 | 165 | <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
166 | 166 | <?php |
167 | - } else { |
|
168 | - ?> |
|
167 | + } else { |
|
168 | + ?> |
|
169 | 169 | <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
170 | 170 | <?php |
171 | - } |
|
172 | - ?> |
|
171 | + } |
|
172 | + ?> |
|
173 | 173 | </div> |
174 | 174 | </div> |
175 | 175 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -222,29 +222,29 @@ discard block |
||
222 | 222 | <div class="col-md-6"> |
223 | 223 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
224 | 224 | <?php |
225 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month,$day); |
|
226 | - if (count($marine_array) == 0) print _("No data available"); |
|
227 | - else { |
|
228 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
229 | - $marine_data = ''; |
|
230 | - foreach($marine_array as $marine_item) |
|
231 | - { |
|
232 | - $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
233 | - } |
|
234 | - $marine_data = substr($marine_data, 0, -1); |
|
235 | - print 'var series = ['.$marine_data.'];'; |
|
236 | - print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
237 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
238 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
239 | - print 'var marinetype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
240 | - print 'dataset'; |
|
241 | - print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
242 | - print '</script>'; |
|
243 | - } |
|
244 | - ?> |
|
225 | + $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month,$day); |
|
226 | + if (count($marine_array) == 0) print _("No data available"); |
|
227 | + else { |
|
228 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
229 | + $marine_data = ''; |
|
230 | + foreach($marine_array as $marine_item) |
|
231 | + { |
|
232 | + $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
233 | + } |
|
234 | + $marine_data = substr($marine_data, 0, -1); |
|
235 | + print 'var series = ['.$marine_data.'];'; |
|
236 | + print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
237 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
238 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
239 | + print 'var marinetype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
240 | + print 'dataset'; |
|
241 | + print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
242 | + print '</script>'; |
|
243 | + } |
|
244 | + ?> |
|
245 | 245 | <div class="more"> |
246 | 246 | <?php |
247 | - /* |
|
247 | + /* |
|
248 | 248 | if ($year != '' && $month != '') { |
249 | 249 | ?> |
250 | 250 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | <?php |
256 | 256 | } |
257 | 257 | */ |
258 | - ?> |
|
258 | + ?> |
|
259 | 259 | </div> |
260 | 260 | </div> |
261 | 261 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -270,29 +270,29 @@ discard block |
||
270 | 270 | <div class="col-md-6"> |
271 | 271 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
272 | 272 | <?php |
273 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month,$day); |
|
274 | - if (count($tracker_array) == 0) print _("No data available"); |
|
275 | - else { |
|
276 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
277 | - $tracker_data = ''; |
|
278 | - foreach($tracker_array as $tracker_item) |
|
279 | - { |
|
280 | - $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
281 | - } |
|
282 | - $tracker_data = substr($tracker_data, 0, -1); |
|
283 | - print 'var series = ['.$tracker_data.'];'; |
|
284 | - print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
285 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
286 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
287 | - print 'var trackertype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
288 | - print 'dataset'; |
|
289 | - print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
290 | - print '</script>'; |
|
291 | - } |
|
292 | - ?> |
|
273 | + $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month,$day); |
|
274 | + if (count($tracker_array) == 0) print _("No data available"); |
|
275 | + else { |
|
276 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
277 | + $tracker_data = ''; |
|
278 | + foreach($tracker_array as $tracker_item) |
|
279 | + { |
|
280 | + $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
281 | + } |
|
282 | + $tracker_data = substr($tracker_data, 0, -1); |
|
283 | + print 'var series = ['.$tracker_data.'];'; |
|
284 | + print 'var dataset = [];var onlyValues = series.map(function(obj){ return obj[1]; });var minValue = Math.min.apply(null, onlyValues), maxValue = Math.max.apply(null, onlyValues);'; |
|
285 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
286 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
287 | + print 'var trackertype = new d3pie("chart1",{"header":{"title":{"fontSize":24,"font":"open sans"},"subtitle":{"color":"#999999","fontSize":12,"font":"open sans"},"titleSubtitlePadding":9},"footer":{"color":"#999999","fontSize":10,"font":"open sans","location":"bottom-left"},"size":{"canvasWidth":700,"pieOuterRadius":"60%"},"data":{"sortOrder":"value-desc","content":'; |
|
288 | + print 'dataset'; |
|
289 | + print '},"labels":{"outer":{"pieDistance":32},"inner":{"hideWhenLessThanPercentage":3},"mainLabel":{"fontSize":11},"percentage":{"color":"#ffffff","decimalPlaces":0},"value":{"color":"#adadad","fontSize":11},"lines":{"enabled":true},"truncation":{"enabled":true}},"effects":{"pullOutSegmentOnClick":{"effect":"linear","speed":400,"size":8}},"misc":{"gradient":{"enabled":true,"percentage":100}}});'; |
|
290 | + print '</script>'; |
|
291 | + } |
|
292 | + ?> |
|
293 | 293 | <div class="more"> |
294 | 294 | <?php |
295 | - /* |
|
295 | + /* |
|
296 | 296 | if ($year != '' && $month != '') { |
297 | 297 | ?> |
298 | 298 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | <?php |
304 | 304 | } |
305 | 305 | */ |
306 | - ?> |
|
306 | + ?> |
|
307 | 307 | </div> |
308 | 308 | </div> |
309 | 309 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | if (!isset($filter_name)) $filter_name = ''; |
22 | -$airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
|
22 | +$airline_icao = (string) filter_input(INPUT_GET, 'airline', FILTER_SANITIZE_STRING); |
|
23 | 23 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
24 | 24 | if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
25 | 25 | } |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $title = _("Statistics"); |
35 | 35 | } |
36 | 36 | |
37 | -$year = filter_input(INPUT_GET,'year',FILTER_SANITIZE_NUMBER_INT); |
|
38 | -$month = filter_input(INPUT_GET,'month',FILTER_SANITIZE_NUMBER_INT); |
|
37 | +$year = filter_input(INPUT_GET, 'year', FILTER_SANITIZE_NUMBER_INT); |
|
38 | +$month = filter_input(INPUT_GET, 'month', FILTER_SANITIZE_NUMBER_INT); |
|
39 | 39 | |
40 | 40 | require_once('header.php'); |
41 | 41 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | date_default_timezone_set('UTC'); |
63 | 63 | $lastupdate = strtotime($last_update[0]['value']); |
64 | 64 | if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
65 | - print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
|
65 | + print '<i>Last update: '.date('Y-m-d G:i:s', $lastupdate).'</i>'; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | ?> |
@@ -74,30 +74,30 @@ discard block |
||
74 | 74 | <?php |
75 | 75 | if ($type == 'aircraft') { |
76 | 76 | ?> |
77 | - <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Flights"); ?></span> |
|
78 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
79 | - <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
80 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
77 | + <span><span class="badge"><?php print number_format($Stats->countOverallFlights($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Flights"); ?></span> |
|
78 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
79 | + <span><span class="badge"><?php print number_format($Stats->countOverallArrival($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Arrivals seen"); ?></span> |
|
80 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
81 | 81 | <?php |
82 | - if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
82 | + if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
83 | 83 | ?> |
84 | - <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
85 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
84 | + <span><span class="badge"><?php print number_format($Stats->countOverallPilots($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Pilots"); ?></span> |
|
85 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
86 | 86 | <?php |
87 | 87 | } else { |
88 | 88 | ?> |
89 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
90 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
89 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
90 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
91 | 91 | <?php |
92 | 92 | } |
93 | 93 | ?> |
94 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
95 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
94 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
95 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
96 | 96 | <?php |
97 | 97 | if ($airline_icao == '') { |
98 | 98 | ?> |
99 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
100 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
99 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
100 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
101 | 101 | <?php |
102 | 102 | } |
103 | 103 | ?> |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | if (!(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS)) { |
106 | 106 | if ($airline_icao == '' || $airline_icao == 'all') { |
107 | 107 | ?> |
108 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
109 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
108 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
109 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
110 | 110 | <?php |
111 | 111 | } |
112 | 112 | } |
@@ -114,22 +114,22 @@ discard block |
||
114 | 114 | <?php |
115 | 115 | } elseif ($type == 'marine') { |
116 | 116 | ?> |
117 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(),$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
118 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
119 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
120 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
117 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(), $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
118 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
119 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
120 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
121 | 121 | <?php |
122 | 122 | } elseif ($type == 'tracker') { |
123 | 123 | ?> |
124 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(),$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
125 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
126 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
127 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
124 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(), $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
125 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
126 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
127 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
128 | 128 | <?php |
129 | 129 | } |
130 | 130 | ?> |
131 | 131 | </p> |
132 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
132 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
133 | 133 | <div class="specific-stats"> |
134 | 134 | <?php |
135 | 135 | if ($type == 'aircraft') { |
@@ -138,12 +138,12 @@ discard block |
||
138 | 138 | <div class="col-md-6"> |
139 | 139 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
140 | 140 | <?php |
141 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
141 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
142 | 142 | if (count($aircraft_array) == 0) print _("No data available"); |
143 | 143 | else { |
144 | 144 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
145 | 145 | $aircraft_data = ''; |
146 | - foreach($aircraft_array as $aircraft_item) |
|
146 | + foreach ($aircraft_array as $aircraft_item) |
|
147 | 147 | { |
148 | 148 | $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
149 | 149 | } |
@@ -172,17 +172,17 @@ discard block |
||
172 | 172 | ?> |
173 | 173 | </div> |
174 | 174 | </div> |
175 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
175 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
176 | 176 | <?php |
177 | 177 | // echo $airline_icao; |
178 | 178 | if ($airline_icao == '' || $airline_icao == 'all') { |
179 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
179 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
180 | 180 | if (count($airline_array) > 0) { |
181 | 181 | print '<div class="col-md-6">'; |
182 | 182 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
183 | 183 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
184 | 184 | $airline_data = ''; |
185 | - foreach($airline_array as $airline_item) |
|
185 | + foreach ($airline_array as $airline_item) |
|
186 | 186 | { |
187 | 187 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
188 | 188 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | ?> |
210 | 210 | </div> |
211 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
211 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
212 | 212 | <?php |
213 | 213 | } |
214 | 214 | ?> |
@@ -222,12 +222,12 @@ discard block |
||
222 | 222 | <div class="col-md-6"> |
223 | 223 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
224 | 224 | <?php |
225 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month,$day); |
|
225 | + $marine_array = $Marine->countAllMarineTypes(true, 0, '', array(), $year, $month, $day); |
|
226 | 226 | if (count($marine_array) == 0) print _("No data available"); |
227 | 227 | else { |
228 | 228 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
229 | 229 | $marine_data = ''; |
230 | - foreach($marine_array as $marine_item) |
|
230 | + foreach ($marine_array as $marine_item) |
|
231 | 231 | { |
232 | 232 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
233 | 233 | } |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | ?> |
259 | 259 | </div> |
260 | 260 | </div> |
261 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
261 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
262 | 262 | <!-- </div>--> |
263 | 263 | <?php |
264 | 264 | } |
@@ -270,12 +270,12 @@ discard block |
||
270 | 270 | <div class="col-md-6"> |
271 | 271 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
272 | 272 | <?php |
273 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month,$day); |
|
273 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month, $day); |
|
274 | 274 | if (count($tracker_array) == 0) print _("No data available"); |
275 | 275 | else { |
276 | 276 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
277 | 277 | $tracker_data = ''; |
278 | - foreach($tracker_array as $tracker_item) |
|
278 | + foreach ($tracker_array as $tracker_item) |
|
279 | 279 | { |
280 | 280 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
281 | 281 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | ?> |
307 | 307 | </div> |
308 | 308 | </div> |
309 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
309 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
310 | 310 | <!-- </div>--> |
311 | 311 | <?php |
312 | 312 | } |
@@ -316,8 +316,8 @@ discard block |
||
316 | 316 | ?> |
317 | 317 | <div class="row column"> |
318 | 318 | <?php |
319 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
320 | - if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
319 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
320 | + if ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
|
321 | 321 | if (empty($flightover_array)) { |
322 | 322 | print '<div class="col-md-12">'; |
323 | 323 | } else { |
@@ -326,12 +326,12 @@ discard block |
||
326 | 326 | ?> |
327 | 327 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
328 | 328 | <?php |
329 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
329 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
330 | 330 | if (count($pilot_array) == 0) print _("No data available"); |
331 | 331 | else { |
332 | 332 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
333 | 333 | $pilot_data = ''; |
334 | - foreach($pilot_array as $pilot_item) |
|
334 | + foreach ($pilot_array as $pilot_item) |
|
335 | 335 | { |
336 | 336 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
337 | 337 | } |
@@ -353,19 +353,19 @@ discard block |
||
353 | 353 | ?> |
354 | 354 | </div> |
355 | 355 | |
356 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
356 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
357 | 357 | <?php |
358 | 358 | } else { |
359 | 359 | ?> |
360 | 360 | <div class="col-md-6"> |
361 | 361 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
362 | 362 | <?php |
363 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
363 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
364 | 364 | if (count($owner_array) == 0) print _("No data available"); |
365 | 365 | else { |
366 | 366 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
367 | 367 | $owner_data = ''; |
368 | - foreach($owner_array as $owner_item) |
|
368 | + foreach ($owner_array as $owner_item) |
|
369 | 369 | { |
370 | 370 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
371 | 371 | } |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | </div> |
386 | 386 | </div> |
387 | 387 | |
388 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
388 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
389 | 389 | <?php |
390 | 390 | } |
391 | 391 | if (!empty($flightover_array)) { |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
400 | 400 | print 'var series = ['; |
401 | 401 | $flightover_data = ''; |
402 | - foreach($flightover_array as $flightover_item) |
|
402 | + foreach ($flightover_array as $flightover_item) |
|
403 | 403 | { |
404 | 404 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
405 | 405 | } |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | } |
446 | 446 | ?> |
447 | 447 | </div> |
448 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
448 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
449 | 449 | |
450 | 450 | |
451 | 451 | </div> |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
466 | 466 | print 'var series = ['; |
467 | 467 | $flightover_data = ''; |
468 | - foreach($flightover_array as $flightover_item) |
|
468 | + foreach ($flightover_array as $flightover_item) |
|
469 | 469 | { |
470 | 470 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
471 | 471 | } |
@@ -525,7 +525,7 @@ discard block |
||
525 | 525 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
526 | 526 | print 'var series = ['; |
527 | 527 | $flightover_data = ''; |
528 | - foreach($flightover_array as $flightover_item) |
|
528 | + foreach ($flightover_array as $flightover_item) |
|
529 | 529 | { |
530 | 530 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
531 | 531 | } |
@@ -578,14 +578,14 @@ discard block |
||
578 | 578 | <div class="row column"> |
579 | 579 | <div class="col-md-6"> |
580 | 580 | <?php |
581 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
581 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
582 | 582 | if (count($airport_airport_array) > 0) { |
583 | 583 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
584 | 584 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
585 | 585 | print "\n"; |
586 | 586 | print 'var series = ['; |
587 | 587 | $airport_data = ''; |
588 | - foreach($airport_airport_array as $airport_item) |
|
588 | + foreach ($airport_airport_array as $airport_item) |
|
589 | 589 | { |
590 | 590 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
591 | 591 | } |
@@ -636,18 +636,18 @@ discard block |
||
636 | 636 | } |
637 | 637 | ?> |
638 | 638 | </div> |
639 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
639 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
640 | 640 | |
641 | 641 | <div class="col-md-6"> |
642 | 642 | <?php |
643 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
643 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
644 | 644 | if (count($airport_airport_array2) > 0) { |
645 | 645 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
646 | 646 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
647 | 647 | print "\n"; |
648 | 648 | print 'var series = ['; |
649 | 649 | $airport_data = ''; |
650 | - foreach($airport_airport_array2 as $airport_item) |
|
650 | + foreach ($airport_airport_array2 as $airport_item) |
|
651 | 651 | { |
652 | 652 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
653 | 653 | } |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | ?> |
700 | 700 | </div> |
701 | 701 | </div> |
702 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
702 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
703 | 703 | <?php |
704 | 704 | } |
705 | 705 | ?> |
@@ -713,19 +713,19 @@ discard block |
||
713 | 713 | <div class="col-md-6"> |
714 | 714 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
715 | 715 | <?php |
716 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
716 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
717 | 717 | if (count($year_array) == 0) print _("No data available"); |
718 | 718 | else { |
719 | 719 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
720 | 720 | $year_data = ''; |
721 | 721 | $year_cnt = ''; |
722 | - foreach($year_array as $year_item) |
|
722 | + foreach ($year_array as $year_item) |
|
723 | 723 | { |
724 | 724 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
725 | 725 | $year_cnt .= $year_item['date_count'].','; |
726 | 726 | } |
727 | 727 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
728 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
728 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
729 | 729 | print 'c3.generate({ |
730 | 730 | bindto: "#chart8", |
731 | 731 | data: { x: "x", |
@@ -738,23 +738,23 @@ discard block |
||
738 | 738 | <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
739 | 739 | </div> |
740 | 740 | </div> |
741 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
741 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
742 | 742 | <div class="col-md-6"> |
743 | 743 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
744 | 744 | <?php |
745 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
745 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
746 | 746 | if (count($month_array) == 0) print _("No data available"); |
747 | 747 | else { |
748 | 748 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
749 | 749 | $month_data = ''; |
750 | 750 | $month_cnt = ''; |
751 | - foreach($month_array as $month_item) |
|
751 | + foreach ($month_array as $month_item) |
|
752 | 752 | { |
753 | 753 | $month_data .= '"'.$month_item['date_name'].'",'; |
754 | 754 | $month_cnt .= $month_item['date_count'].','; |
755 | 755 | } |
756 | 756 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
757 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
757 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
758 | 758 | print 'c3.generate({ |
759 | 759 | bindto: "#chart9", |
760 | 760 | data: { x: "x", |
@@ -767,24 +767,24 @@ discard block |
||
767 | 767 | <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
768 | 768 | </div> |
769 | 769 | </div> |
770 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
770 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
771 | 771 | |
772 | 772 | <div class="col-md-6"> |
773 | 773 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
774 | 774 | <?php |
775 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
775 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
776 | 776 | if (empty($date_array)) print _("No data available"); |
777 | 777 | else { |
778 | 778 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
779 | 779 | $date_data = ''; |
780 | 780 | $date_cnt = ''; |
781 | - foreach($date_array as $date_item) |
|
781 | + foreach ($date_array as $date_item) |
|
782 | 782 | { |
783 | 783 | $date_data .= '"'.$date_item['date_name'].'",'; |
784 | 784 | $date_cnt .= $date_item['date_count'].','; |
785 | 785 | } |
786 | 786 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
787 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
787 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
788 | 788 | print 'c3.generate({ |
789 | 789 | bindto: "#chart5", |
790 | 790 | data: { x: "x", |
@@ -797,23 +797,23 @@ discard block |
||
797 | 797 | <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
798 | 798 | </div> |
799 | 799 | </div> |
800 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
800 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
801 | 801 | <div class="col-md-6"> |
802 | 802 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
803 | 803 | <?php |
804 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
804 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
805 | 805 | if (empty($hour_array)) print _("No data available"); |
806 | 806 | else { |
807 | 807 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
808 | 808 | $hour_data = ''; |
809 | 809 | $hour_cnt = ''; |
810 | - foreach($hour_array as $hour_item) |
|
810 | + foreach ($hour_array as $hour_item) |
|
811 | 811 | { |
812 | 812 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
813 | 813 | $hour_cnt .= $hour_item['hour_count'].','; |
814 | 814 | } |
815 | 815 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
816 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
816 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
817 | 817 | print 'c3.generate({ |
818 | 818 | bindto: "#chart6", |
819 | 819 | data: { |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
827 | 827 | </div> |
828 | 828 | </div> |
829 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
829 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
830 | 830 | </div> |
831 | 831 | <?php |
832 | 832 | } |
@@ -844,19 +844,19 @@ discard block |
||
844 | 844 | <div class="col-md-6"> |
845 | 845 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
846 | 846 | <?php |
847 | - $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
847 | + $year_array = $Marine->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
848 | 848 | if (count($year_array) == 0) print _("No data available"); |
849 | 849 | else { |
850 | 850 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
851 | 851 | $year_data = ''; |
852 | 852 | $year_cnt = ''; |
853 | - foreach($year_array as $year_item) |
|
853 | + foreach ($year_array as $year_item) |
|
854 | 854 | { |
855 | 855 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
856 | 856 | $year_cnt .= $year_item['date_count'].','; |
857 | 857 | } |
858 | 858 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
859 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
859 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
860 | 860 | print 'c3.generate({ |
861 | 861 | bindto: "#chart8", |
862 | 862 | data: { x: "x", |
@@ -870,23 +870,23 @@ discard block |
||
870 | 870 | </div> |
871 | 871 | </div> |
872 | 872 | |
873 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
873 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
874 | 874 | <div class="col-md-6"> |
875 | 875 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
876 | 876 | <?php |
877 | - $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
|
877 | + $month_array = $Marine->countAllDatesLastMonth($airline_icao, $filter_name); |
|
878 | 878 | if (count($month_array) == 0) print _("No data available"); |
879 | 879 | else { |
880 | 880 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
881 | 881 | $month_data = ''; |
882 | 882 | $month_cnt = ''; |
883 | - foreach($month_array as $month_item) |
|
883 | + foreach ($month_array as $month_item) |
|
884 | 884 | { |
885 | 885 | $month_data .= '"'.$month_item['date_name'].'",'; |
886 | 886 | $month_cnt .= $month_item['date_count'].','; |
887 | 887 | } |
888 | 888 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
889 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
889 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
890 | 890 | print 'c3.generate({ |
891 | 891 | bindto: "#chart9", |
892 | 892 | data: { x: "x", |
@@ -899,24 +899,24 @@ discard block |
||
899 | 899 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
900 | 900 | </div> |
901 | 901 | </div> |
902 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
902 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
903 | 903 | |
904 | 904 | <div class="col-md-6"> |
905 | 905 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
906 | 906 | <?php |
907 | - $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
|
907 | + $date_array = $Marine->countAllDatesLast7Days($airline_icao, $filter_name); |
|
908 | 908 | if (empty($date_array)) print _("No data available"); |
909 | 909 | else { |
910 | 910 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
911 | 911 | $date_data = ''; |
912 | 912 | $date_cnt = ''; |
913 | - foreach($date_array as $date_item) |
|
913 | + foreach ($date_array as $date_item) |
|
914 | 914 | { |
915 | 915 | $date_data .= '"'.$date_item['date_name'].'",'; |
916 | 916 | $date_cnt .= $date_item['date_count'].','; |
917 | 917 | } |
918 | 918 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
919 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
919 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
920 | 920 | print 'c3.generate({ |
921 | 921 | bindto: "#chart5", |
922 | 922 | data: { x: "x", |
@@ -929,23 +929,23 @@ discard block |
||
929 | 929 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
930 | 930 | </div> |
931 | 931 | </div> |
932 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
932 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
933 | 933 | <div class="col-md-6"> |
934 | 934 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
935 | 935 | <?php |
936 | - $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
|
936 | + $hour_array = $Marine->countAllHours('hour', true, $airline_icao, $filter_name); |
|
937 | 937 | if (empty($hour_array)) print _("No data available"); |
938 | 938 | else { |
939 | 939 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
940 | 940 | $hour_data = ''; |
941 | 941 | $hour_cnt = ''; |
942 | - foreach($hour_array as $hour_item) |
|
942 | + foreach ($hour_array as $hour_item) |
|
943 | 943 | { |
944 | 944 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
945 | 945 | $hour_cnt .= $hour_item['hour_count'].','; |
946 | 946 | } |
947 | 947 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
948 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
948 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
949 | 949 | print 'c3.generate({ |
950 | 950 | bindto: "#chart6", |
951 | 951 | data: { |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
959 | 959 | </div> |
960 | 960 | </div> |
961 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
961 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
962 | 962 | </div> |
963 | 963 | <?php |
964 | 964 | } |
@@ -982,13 +982,13 @@ discard block |
||
982 | 982 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
983 | 983 | $year_data = ''; |
984 | 984 | $year_cnt = ''; |
985 | - foreach($year_array as $year_item) |
|
985 | + foreach ($year_array as $year_item) |
|
986 | 986 | { |
987 | 987 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
988 | 988 | $year_cnt .= $year_item['date_count'].','; |
989 | 989 | } |
990 | 990 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
991 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
991 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
992 | 992 | print 'c3.generate({ |
993 | 993 | bindto: "#chart8", |
994 | 994 | data: { x: "x", |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | </div> |
1003 | 1003 | </div> |
1004 | 1004 | |
1005 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1005 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1006 | 1006 | <div class="col-md-6"> |
1007 | 1007 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1008 | 1008 | <?php |
@@ -1012,13 +1012,13 @@ discard block |
||
1012 | 1012 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1013 | 1013 | $month_data = ''; |
1014 | 1014 | $month_cnt = ''; |
1015 | - foreach($month_array as $month_item) |
|
1015 | + foreach ($month_array as $month_item) |
|
1016 | 1016 | { |
1017 | 1017 | $month_data .= '"'.$month_item['date_name'].'",'; |
1018 | 1018 | $month_cnt .= $month_item['date_count'].','; |
1019 | 1019 | } |
1020 | 1020 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
1021 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
1021 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
1022 | 1022 | print 'c3.generate({ |
1023 | 1023 | bindto: "#chart9", |
1024 | 1024 | data: { x: "x", |
@@ -1031,7 +1031,7 @@ discard block |
||
1031 | 1031 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1032 | 1032 | </div> |
1033 | 1033 | </div> |
1034 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1034 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1035 | 1035 | |
1036 | 1036 | <div class="col-md-6"> |
1037 | 1037 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1042,13 +1042,13 @@ discard block |
||
1042 | 1042 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1043 | 1043 | $date_data = ''; |
1044 | 1044 | $date_cnt = ''; |
1045 | - foreach($date_array as $date_item) |
|
1045 | + foreach ($date_array as $date_item) |
|
1046 | 1046 | { |
1047 | 1047 | $date_data .= '"'.$date_item['date_name'].'",'; |
1048 | 1048 | $date_cnt .= $date_item['date_count'].','; |
1049 | 1049 | } |
1050 | 1050 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
1051 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
1051 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
1052 | 1052 | print 'c3.generate({ |
1053 | 1053 | bindto: "#chart5", |
1054 | 1054 | data: { x: "x", |
@@ -1061,23 +1061,23 @@ discard block |
||
1061 | 1061 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1062 | 1062 | </div> |
1063 | 1063 | </div> |
1064 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1064 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1065 | 1065 | <div class="col-md-6"> |
1066 | 1066 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1067 | 1067 | <?php |
1068 | - $hour_array = $Tracker->countAllHours('hour',true); |
|
1068 | + $hour_array = $Tracker->countAllHours('hour', true); |
|
1069 | 1069 | if (empty($hour_array)) print _("No data available"); |
1070 | 1070 | else { |
1071 | 1071 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1072 | 1072 | $hour_data = ''; |
1073 | 1073 | $hour_cnt = ''; |
1074 | - foreach($hour_array as $hour_item) |
|
1074 | + foreach ($hour_array as $hour_item) |
|
1075 | 1075 | { |
1076 | 1076 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
1077 | 1077 | $hour_cnt .= $hour_item['hour_count'].','; |
1078 | 1078 | } |
1079 | 1079 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
1080 | - $hour_cnt = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
1080 | + $hour_cnt = "['trackers',".substr($hour_cnt, 0, -1)."]"; |
|
1081 | 1081 | print 'c3.generate({ |
1082 | 1082 | bindto: "#chart6", |
1083 | 1083 | data: { |
@@ -1090,7 +1090,7 @@ discard block |
||
1090 | 1090 | <a href="<?php print $globalURL; ?>/tracker/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1091 | 1091 | </div> |
1092 | 1092 | </div> |
1093 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1093 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1094 | 1094 | </div> |
1095 | 1095 | <?php |
1096 | 1096 | } |
@@ -1114,13 +1114,13 @@ discard block |
||
1114 | 1114 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
1115 | 1115 | $year_data = ''; |
1116 | 1116 | $year_cnt = ''; |
1117 | - foreach($year_array as $year_item) |
|
1117 | + foreach ($year_array as $year_item) |
|
1118 | 1118 | { |
1119 | 1119 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
1120 | 1120 | $year_cnt .= $year_item['count'].','; |
1121 | 1121 | } |
1122 | 1122 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1123 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1123 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1124 | 1124 | print 'c3.generate({ |
1125 | 1125 | bindto: "#chart32", |
1126 | 1126 | data: { x: "x", |
@@ -1133,7 +1133,7 @@ discard block |
||
1133 | 1133 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1134 | 1134 | </div> |
1135 | 1135 | </div> |
1136 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1136 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1137 | 1137 | |
1138 | 1138 | <div class="row column"> |
1139 | 1139 | <div class="col-md-6"> |
@@ -1145,13 +1145,13 @@ discard block |
||
1145 | 1145 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
1146 | 1146 | $year_data = ''; |
1147 | 1147 | $year_cnt = ''; |
1148 | - foreach($year_array as $year_item) |
|
1148 | + foreach ($year_array as $year_item) |
|
1149 | 1149 | { |
1150 | 1150 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
1151 | 1151 | $year_cnt .= $year_item['count'].','; |
1152 | 1152 | } |
1153 | 1153 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
1154 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
1154 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
1155 | 1155 | print 'c3.generate({ |
1156 | 1156 | bindto: "#chart33", |
1157 | 1157 | data: { x: "x", |
@@ -1164,7 +1164,7 @@ discard block |
||
1164 | 1164 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
1165 | 1165 | </div> |
1166 | 1166 | </div> |
1167 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1167 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1168 | 1168 | <br/> |
1169 | 1169 | <?php |
1170 | 1170 | } |
@@ -1182,9 +1182,9 @@ discard block |
||
1182 | 1182 | <?php |
1183 | 1183 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
1184 | 1184 | if ($year == '' && $month == '') { |
1185 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
1185 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
1186 | 1186 | } else { |
1187 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
1187 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
1188 | 1188 | } |
1189 | 1189 | if (!empty($polar)) { |
1190 | 1190 | print '<h2>'._("Coverage pattern").'</h2>'; |
@@ -1192,7 +1192,7 @@ discard block |
||
1192 | 1192 | unset($polar_data); |
1193 | 1193 | $Spotter = new Spotter(); |
1194 | 1194 | $data = json_decode($eachpolar['source_data']); |
1195 | - foreach($data as $value => $key) { |
|
1195 | + foreach ($data as $value => $key) { |
|
1196 | 1196 | $direction = $Spotter->parseDirection(($value*22.5)); |
1197 | 1197 | $distance = $key; |
1198 | 1198 | $unit = 'km'; |
@@ -1212,7 +1212,7 @@ discard block |
||
1212 | 1212 | ?> |
1213 | 1213 | <div class="col-md-6"> |
1214 | 1214 | <h4><?php print $eachpolar['source_name']; ?></h4> |
1215 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1215 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
1216 | 1216 | <script> |
1217 | 1217 | (function() { |
1218 | 1218 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1236,7 +1236,7 @@ discard block |
||
1236 | 1236 | color: color, |
1237 | 1237 | unit: '<?php echo $unit; ?>' |
1238 | 1238 | }; |
1239 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1239 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
1240 | 1240 | })(); |
1241 | 1241 | </script> |
1242 | 1242 | </div> |
@@ -1250,22 +1250,22 @@ discard block |
||
1250 | 1250 | <?php |
1251 | 1251 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
1252 | 1252 | if ($year == '' && $month == '') { |
1253 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
1253 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
1254 | 1254 | } else { |
1255 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
1255 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
1256 | 1256 | } |
1257 | 1257 | if (!empty($msg)) { |
1258 | 1258 | print '<h2>'._("Messages received").'</h2>'; |
1259 | 1259 | foreach ($msg as $eachmsg) { |
1260 | 1260 | //$eachmsg = $msg[0]; |
1261 | 1261 | $data = $eachmsg['source_data']; |
1262 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
1262 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
1263 | 1263 | else $max = 500; |
1264 | 1264 | ?> |
1265 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1265 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
1266 | 1266 | <script> |
1267 | 1267 | var g = new JustGage({ |
1268 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
1268 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
1269 | 1269 | value: <?php echo $data; ?>, |
1270 | 1270 | min: 0, |
1271 | 1271 | max: <?php print $max; ?>, |
@@ -1286,9 +1286,9 @@ discard block |
||
1286 | 1286 | <?php |
1287 | 1287 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
1288 | 1288 | if ($year == '' && $month == '') { |
1289 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
1289 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
1290 | 1290 | } else { |
1291 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
1291 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
1292 | 1292 | } |
1293 | 1293 | foreach ($hist as $hists) { |
1294 | 1294 | //$hist_data = ''; |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | $source = $hists['source_name']; |
1298 | 1298 | $hist_array = json_decode($hists['source_data']); |
1299 | 1299 | $unit = 'km'; |
1300 | - foreach($hist_array as $distance => $nb) |
|
1300 | + foreach ($hist_array as $distance => $nb) |
|
1301 | 1301 | { |
1302 | 1302 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
1303 | 1303 | $distance = round($distance*0.539957); |
@@ -1318,18 +1318,18 @@ discard block |
||
1318 | 1318 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
1319 | 1319 | ?> |
1320 | 1320 | <div class="col-md-6"> |
1321 | - <h2><?php echo sprintf(_("Flights Distance for %s"),$source); ?></h2> |
|
1321 | + <h2><?php echo sprintf(_("Flights Distance for %s"), $source); ?></h2> |
|
1322 | 1322 | <?php |
1323 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1323 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
1324 | 1324 | print 'c3.generate({ |
1325 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
1325 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
1326 | 1326 | data: { x: "x", |
1327 | 1327 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
1328 | 1328 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
1329 | 1329 | print '</script>'; |
1330 | 1330 | ?> |
1331 | 1331 | </div> |
1332 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
1332 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
1333 | 1333 | <?php |
1334 | 1334 | } |
1335 | 1335 | ?> |
@@ -18,11 +18,15 @@ discard block |
||
18 | 18 | require_once('require/class.Spotter.php'); |
19 | 19 | } |
20 | 20 | |
21 | -if (!isset($filter_name)) $filter_name = ''; |
|
21 | +if (!isset($filter_name)) { |
|
22 | + $filter_name = ''; |
|
23 | +} |
|
22 | 24 | $airline_icao = (string)filter_input(INPUT_GET,'airline',FILTER_SANITIZE_STRING); |
23 | 25 | if ($type == 'aircraft' && $airline_icao == '' && isset($globalFilter)) { |
24 | - if (isset($globalFilter['airline'])) $airline_icao = $globalFilter['airline'][0]; |
|
25 | -} |
|
26 | + if (isset($globalFilter['airline'])) { |
|
27 | + $airline_icao = $globalFilter['airline'][0]; |
|
28 | + } |
|
29 | + } |
|
26 | 30 | if ($type == 'aircraft' && $airline_icao != '' && $airline_icao != 'all') { |
27 | 31 | $Spotter = new Spotter(); |
28 | 32 | $airline_info = $Spotter->getAllAirlineInfo($airline_icao); |
@@ -53,7 +57,12 @@ discard block |
||
53 | 57 | <script type="text/javascript" src="<?php echo $globalURL; ?>/js/datamaps.world.min.js"></script> |
54 | 58 | <div class="column"> |
55 | 59 | <div class="info"> |
56 | - <h1><?php if (isset($airline_name)) echo _("Statistics for ").$airline_name; else echo _("Statistics"); ?></h1> |
|
60 | + <h1><?php if (isset($airline_name)) { |
|
61 | + echo _("Statistics for ").$airline_name; |
|
62 | +} else { |
|
63 | + echo _("Statistics"); |
|
64 | +} |
|
65 | +?></h1> |
|
57 | 66 | <?php |
58 | 67 | if ($type == 'aircraft') { |
59 | 68 | $last_update = $Stats->getLastStatsUpdate(); |
@@ -61,7 +70,9 @@ discard block |
||
61 | 70 | if (isset($last_update[0]['value'])) { |
62 | 71 | date_default_timezone_set('UTC'); |
63 | 72 | $lastupdate = strtotime($last_update[0]['value']); |
64 | - if (isset($globalTimezone) && $globalTimezone != '') date_default_timezone_set($globalTimezone); |
|
73 | + if (isset($globalTimezone) && $globalTimezone != '') { |
|
74 | + date_default_timezone_set($globalTimezone); |
|
75 | + } |
|
65 | 76 | print '<i>Last update: '.date('Y-m-d G:i:s',$lastupdate).'</i>'; |
66 | 77 | } |
67 | 78 | } |
@@ -139,8 +150,9 @@ discard block |
||
139 | 150 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
140 | 151 | <?php |
141 | 152 | $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
142 | - if (count($aircraft_array) == 0) print _("No data available"); |
|
143 | - else { |
|
153 | + if (count($aircraft_array) == 0) { |
|
154 | + print _("No data available"); |
|
155 | + } else { |
|
144 | 156 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
145 | 157 | $aircraft_data = ''; |
146 | 158 | foreach($aircraft_array as $aircraft_item) |
@@ -162,11 +174,17 @@ discard block |
||
162 | 174 | <?php |
163 | 175 | if ($year != '' && $month != '') { |
164 | 176 | ?> |
165 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
177 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
178 | + echo '/'.$airline_icao; |
|
179 | +} |
|
180 | +?>/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
166 | 181 | <?php |
167 | 182 | } else { |
168 | 183 | ?> |
169 | - <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
184 | + <a href="<?php print $globalURL; ?>/statistics/aircraft<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
185 | + echo '/'.$airline_icao; |
|
186 | +} |
|
187 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
170 | 188 | <?php |
171 | 189 | } |
172 | 190 | ?> |
@@ -197,11 +215,15 @@ discard block |
||
197 | 215 | print '</script>'; |
198 | 216 | if ($year != '' && $month != '') { |
199 | 217 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
200 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
218 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
219 | + echo '/'.$airline_icao; |
|
220 | + } |
|
201 | 221 | print '/'.$year.'/'.$month.'/" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
202 | 222 | } else { |
203 | 223 | print '<div class="more"><a href="'.$globalURL.'/statistics/airline'; |
204 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
224 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
225 | + echo '/'.$airline_icao; |
|
226 | + } |
|
205 | 227 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
206 | 228 | } |
207 | 229 | print '</div>'; |
@@ -223,8 +245,9 @@ discard block |
||
223 | 245 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
224 | 246 | <?php |
225 | 247 | $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month,$day); |
226 | - if (count($marine_array) == 0) print _("No data available"); |
|
227 | - else { |
|
248 | + if (count($marine_array) == 0) { |
|
249 | + print _("No data available"); |
|
250 | + } else { |
|
228 | 251 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
229 | 252 | $marine_data = ''; |
230 | 253 | foreach($marine_array as $marine_item) |
@@ -271,8 +294,9 @@ discard block |
||
271 | 294 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
272 | 295 | <?php |
273 | 296 | $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month,$day); |
274 | - if (count($tracker_array) == 0) print _("No data available"); |
|
275 | - else { |
|
297 | + if (count($tracker_array) == 0) { |
|
298 | + print _("No data available"); |
|
299 | + } else { |
|
276 | 300 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
277 | 301 | $tracker_data = ''; |
278 | 302 | foreach($tracker_array as $tracker_item) |
@@ -327,8 +351,9 @@ discard block |
||
327 | 351 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
328 | 352 | <?php |
329 | 353 | $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
330 | - if (count($pilot_array) == 0) print _("No data available"); |
|
331 | - else { |
|
354 | + if (count($pilot_array) == 0) { |
|
355 | + print _("No data available"); |
|
356 | + } else { |
|
332 | 357 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
333 | 358 | $pilot_data = ''; |
334 | 359 | foreach($pilot_array as $pilot_item) |
@@ -347,7 +372,9 @@ discard block |
||
347 | 372 | } |
348 | 373 | print '<div class="more">'; |
349 | 374 | print '<a href="'.$globalURL.'/statistics/pilot'; |
350 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
375 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
376 | + echo '/'.$airline_icao; |
|
377 | + } |
|
351 | 378 | print'" class="btn btn-default btn" role="button">'._("See full statistic").'»</a>'; |
352 | 379 | print '</div>'; |
353 | 380 | ?> |
@@ -361,8 +388,9 @@ discard block |
||
361 | 388 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
362 | 389 | <?php |
363 | 390 | $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
364 | - if (count($owner_array) == 0) print _("No data available"); |
|
365 | - else { |
|
391 | + if (count($owner_array) == 0) { |
|
392 | + print _("No data available"); |
|
393 | + } else { |
|
366 | 394 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
367 | 395 | $owner_data = ''; |
368 | 396 | foreach($owner_array as $owner_item) |
@@ -381,7 +409,10 @@ discard block |
||
381 | 409 | } |
382 | 410 | ?> |
383 | 411 | <div class="more"> |
384 | - <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
412 | + <a href="<?php print $globalURL; ?>/statistics/owner<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
413 | + echo '/'.$airline_icao; |
|
414 | +} |
|
415 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
385 | 416 | </div> |
386 | 417 | </div> |
387 | 418 | |
@@ -394,8 +425,9 @@ discard block |
||
394 | 425 | <h2><?php echo _("Top 20 Most Common Country a Flight was Over"); ?></h2> |
395 | 426 | <?php |
396 | 427 | //$flightover_array = $Stats->countAllFlightOverCountries(); |
397 | - if (count($flightover_array) == 0) print _("No data available"); |
|
398 | - else { |
|
428 | + if (count($flightover_array) == 0) { |
|
429 | + print _("No data available"); |
|
430 | + } else { |
|
399 | 431 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
400 | 432 | print 'var series = ['; |
401 | 433 | $flightover_data = ''; |
@@ -438,7 +470,10 @@ discard block |
||
438 | 470 | } |
439 | 471 | ?> |
440 | 472 | <div class="more"> |
441 | - <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
473 | + <a href="<?php print $globalURL; ?>/statistics/country<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
474 | + echo '/'.$airline_icao; |
|
475 | +} |
|
476 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
442 | 477 | </div> |
443 | 478 | </div> |
444 | 479 | <?php |
@@ -460,8 +495,9 @@ discard block |
||
460 | 495 | <div class="col-md-6"> |
461 | 496 | <h2><?php echo _("Top 20 Most Common Country a Vessel was inside"); ?></h2> |
462 | 497 | <?php |
463 | - if (count($flightover_array) == 0) print _("No data available"); |
|
464 | - else { |
|
498 | + if (count($flightover_array) == 0) { |
|
499 | + print _("No data available"); |
|
500 | + } else { |
|
465 | 501 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
466 | 502 | print 'var series = ['; |
467 | 503 | $flightover_data = ''; |
@@ -520,8 +556,9 @@ discard block |
||
520 | 556 | <div class="col-md-6"> |
521 | 557 | <h2><?php echo _("Top 20 Most Common Country a Tracker was inside"); ?></h2> |
522 | 558 | <?php |
523 | - if (count($flightover_array) == 0) print _("No data available"); |
|
524 | - else { |
|
559 | + if (count($flightover_array) == 0) { |
|
560 | + print _("No data available"); |
|
561 | + } else { |
|
525 | 562 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
526 | 563 | print 'var series = ['; |
527 | 564 | $flightover_data = ''; |
@@ -631,7 +668,9 @@ discard block |
||
631 | 668 | });"; |
632 | 669 | print '</script>'; |
633 | 670 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-departure'; |
634 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
671 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
672 | + echo '/'.$airline_icao; |
|
673 | + } |
|
635 | 674 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
636 | 675 | } |
637 | 676 | ?> |
@@ -693,7 +732,9 @@ discard block |
||
693 | 732 | });"; |
694 | 733 | print '</script>'; |
695 | 734 | print '<div class="more"><a href="'.$globalURL.'/statistics/airport-arrival'; |
696 | - if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; |
|
735 | + if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
736 | + echo '/'.$airline_icao; |
|
737 | + } |
|
697 | 738 | print '" class="btn btn-default btn" role="button">'._("See full statistic").'»</a></div>'; |
698 | 739 | } |
699 | 740 | ?> |
@@ -714,8 +755,9 @@ discard block |
||
714 | 755 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
715 | 756 | <?php |
716 | 757 | $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
717 | - if (count($year_array) == 0) print _("No data available"); |
|
718 | - else { |
|
758 | + if (count($year_array) == 0) { |
|
759 | + print _("No data available"); |
|
760 | + } else { |
|
719 | 761 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
720 | 762 | $year_data = ''; |
721 | 763 | $year_cnt = ''; |
@@ -735,7 +777,10 @@ discard block |
||
735 | 777 | } |
736 | 778 | ?> |
737 | 779 | <div class="more"> |
738 | - <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
780 | + <a href="<?php print $globalURL; ?>/statistics/year<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
781 | + echo '/'.$airline_icao; |
|
782 | +} |
|
783 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
739 | 784 | </div> |
740 | 785 | </div> |
741 | 786 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -743,8 +788,9 @@ discard block |
||
743 | 788 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
744 | 789 | <?php |
745 | 790 | $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
746 | - if (count($month_array) == 0) print _("No data available"); |
|
747 | - else { |
|
791 | + if (count($month_array) == 0) { |
|
792 | + print _("No data available"); |
|
793 | + } else { |
|
748 | 794 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
749 | 795 | $month_data = ''; |
750 | 796 | $month_cnt = ''; |
@@ -764,7 +810,10 @@ discard block |
||
764 | 810 | } |
765 | 811 | ?> |
766 | 812 | <div class="more"> |
767 | - <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
813 | + <a href="<?php print $globalURL; ?>/statistics/month<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
814 | + echo '/'.$airline_icao; |
|
815 | +} |
|
816 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
768 | 817 | </div> |
769 | 818 | </div> |
770 | 819 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -773,8 +822,9 @@ discard block |
||
773 | 822 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
774 | 823 | <?php |
775 | 824 | $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
776 | - if (empty($date_array)) print _("No data available"); |
|
777 | - else { |
|
825 | + if (empty($date_array)) { |
|
826 | + print _("No data available"); |
|
827 | + } else { |
|
778 | 828 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
779 | 829 | $date_data = ''; |
780 | 830 | $date_cnt = ''; |
@@ -794,7 +844,10 @@ discard block |
||
794 | 844 | } |
795 | 845 | ?> |
796 | 846 | <div class="more"> |
797 | - <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
847 | + <a href="<?php print $globalURL; ?>/statistics/date<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
848 | + echo '/'.$airline_icao; |
|
849 | +} |
|
850 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
798 | 851 | </div> |
799 | 852 | </div> |
800 | 853 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -802,8 +855,9 @@ discard block |
||
802 | 855 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
803 | 856 | <?php |
804 | 857 | $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
805 | - if (empty($hour_array)) print _("No data available"); |
|
806 | - else { |
|
858 | + if (empty($hour_array)) { |
|
859 | + print _("No data available"); |
|
860 | + } else { |
|
807 | 861 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
808 | 862 | $hour_data = ''; |
809 | 863 | $hour_cnt = ''; |
@@ -823,7 +877,10 @@ discard block |
||
823 | 877 | } |
824 | 878 | ?> |
825 | 879 | <div class="more"> |
826 | - <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') echo '/'.$airline_icao; ?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
880 | + <a href="<?php print $globalURL; ?>/statistics/time<?php if (isset($airline_icao) && $airline_icao != '' && $airline_icao != 'all') { |
|
881 | + echo '/'.$airline_icao; |
|
882 | +} |
|
883 | +?>" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
|
827 | 884 | </div> |
828 | 885 | </div> |
829 | 886 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -845,8 +902,9 @@ discard block |
||
845 | 902 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
846 | 903 | <?php |
847 | 904 | $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
848 | - if (count($year_array) == 0) print _("No data available"); |
|
849 | - else { |
|
905 | + if (count($year_array) == 0) { |
|
906 | + print _("No data available"); |
|
907 | + } else { |
|
850 | 908 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
851 | 909 | $year_data = ''; |
852 | 910 | $year_cnt = ''; |
@@ -875,8 +933,9 @@ discard block |
||
875 | 933 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
876 | 934 | <?php |
877 | 935 | $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
878 | - if (count($month_array) == 0) print _("No data available"); |
|
879 | - else { |
|
936 | + if (count($month_array) == 0) { |
|
937 | + print _("No data available"); |
|
938 | + } else { |
|
880 | 939 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
881 | 940 | $month_data = ''; |
882 | 941 | $month_cnt = ''; |
@@ -905,8 +964,9 @@ discard block |
||
905 | 964 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
906 | 965 | <?php |
907 | 966 | $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
908 | - if (empty($date_array)) print _("No data available"); |
|
909 | - else { |
|
967 | + if (empty($date_array)) { |
|
968 | + print _("No data available"); |
|
969 | + } else { |
|
910 | 970 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
911 | 971 | $date_data = ''; |
912 | 972 | $date_cnt = ''; |
@@ -934,8 +994,9 @@ discard block |
||
934 | 994 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
935 | 995 | <?php |
936 | 996 | $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
937 | - if (empty($hour_array)) print _("No data available"); |
|
938 | - else { |
|
997 | + if (empty($hour_array)) { |
|
998 | + print _("No data available"); |
|
999 | + } else { |
|
939 | 1000 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
940 | 1001 | $hour_data = ''; |
941 | 1002 | $hour_cnt = ''; |
@@ -977,8 +1038,9 @@ discard block |
||
977 | 1038 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
978 | 1039 | <?php |
979 | 1040 | $year_array = $Tracker->countAllMonthsLastYear(true); |
980 | - if (count($year_array) == 0) print _("No data available"); |
|
981 | - else { |
|
1041 | + if (count($year_array) == 0) { |
|
1042 | + print _("No data available"); |
|
1043 | + } else { |
|
982 | 1044 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
983 | 1045 | $year_data = ''; |
984 | 1046 | $year_cnt = ''; |
@@ -1007,8 +1069,9 @@ discard block |
||
1007 | 1069 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
1008 | 1070 | <?php |
1009 | 1071 | $month_array = $Tracker->countAllDatesLastMonth(); |
1010 | - if (count($month_array) == 0) print _("No data available"); |
|
1011 | - else { |
|
1072 | + if (count($month_array) == 0) { |
|
1073 | + print _("No data available"); |
|
1074 | + } else { |
|
1012 | 1075 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
1013 | 1076 | $month_data = ''; |
1014 | 1077 | $month_cnt = ''; |
@@ -1037,8 +1100,9 @@ discard block |
||
1037 | 1100 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
1038 | 1101 | <?php |
1039 | 1102 | $date_array = $Tracker->countAllDatesLast7Days(); |
1040 | - if (empty($date_array)) print _("No data available"); |
|
1041 | - else { |
|
1103 | + if (empty($date_array)) { |
|
1104 | + print _("No data available"); |
|
1105 | + } else { |
|
1042 | 1106 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
1043 | 1107 | $date_data = ''; |
1044 | 1108 | $date_cnt = ''; |
@@ -1066,8 +1130,9 @@ discard block |
||
1066 | 1130 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
1067 | 1131 | <?php |
1068 | 1132 | $hour_array = $Tracker->countAllHours('hour',true); |
1069 | - if (empty($hour_array)) print _("No data available"); |
|
1070 | - else { |
|
1133 | + if (empty($hour_array)) { |
|
1134 | + print _("No data available"); |
|
1135 | + } else { |
|
1071 | 1136 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
1072 | 1137 | $hour_data = ''; |
1073 | 1138 | $hour_cnt = ''; |
@@ -1109,8 +1174,9 @@ discard block |
||
1109 | 1174 | <h2><?php echo _("Fatalities by Years"); ?></h2> |
1110 | 1175 | <?php |
1111 | 1176 | $year_array = $Stats->countFatalitiesByYear(); |
1112 | - if (count($year_array) == 0) print _("No data available"); |
|
1113 | - else { |
|
1177 | + if (count($year_array) == 0) { |
|
1178 | + print _("No data available"); |
|
1179 | + } else { |
|
1114 | 1180 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
1115 | 1181 | $year_data = ''; |
1116 | 1182 | $year_cnt = ''; |
@@ -1140,8 +1206,9 @@ discard block |
||
1140 | 1206 | <h2><?php echo _("Fatalities last 12 Months"); ?></h2> |
1141 | 1207 | <?php |
1142 | 1208 | $year_array = $Stats->countFatalitiesLast12Months(); |
1143 | - if (count($year_array) == 0) print _("No data available"); |
|
1144 | - else { |
|
1209 | + if (count($year_array) == 0) { |
|
1210 | + print _("No data available"); |
|
1211 | + } else { |
|
1145 | 1212 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
1146 | 1213 | $year_data = ''; |
1147 | 1214 | $year_cnt = ''; |
@@ -1206,8 +1273,11 @@ discard block |
||
1206 | 1273 | $distance = $distance; |
1207 | 1274 | $unit = 'km'; |
1208 | 1275 | } |
1209 | - if (!isset($polar_data)) $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1210 | - else $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1276 | + if (!isset($polar_data)) { |
|
1277 | + $polar_data = '{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1278 | + } else { |
|
1279 | + $polar_data = $polar_data.',{axis:"'.$direction[0]['direction_shortname'].'",value:'.$key.'}'; |
|
1280 | + } |
|
1211 | 1281 | } |
1212 | 1282 | ?> |
1213 | 1283 | <div class="col-md-6"> |
@@ -1259,9 +1329,12 @@ discard block |
||
1259 | 1329 | foreach ($msg as $eachmsg) { |
1260 | 1330 | //$eachmsg = $msg[0]; |
1261 | 1331 | $data = $eachmsg['source_data']; |
1262 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
1263 | - else $max = 500; |
|
1264 | -?> |
|
1332 | + if ($data > 500) { |
|
1333 | + $max = (round(($data+100)/100))*100; |
|
1334 | + } else { |
|
1335 | + $max = 500; |
|
1336 | + } |
|
1337 | + ?> |
|
1265 | 1338 | <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
1266 | 1339 | <script> |
1267 | 1340 | var g = new JustGage({ |