@@ -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' ?> --> |