|
@@ -79,23 +79,23 @@ discard block |
|
|
block discarded – undo |
|
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,39 +138,39 @@ discard block |
|
|
block discarded – undo |
|
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
|
|
- if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
149
|
|
- else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
150
|
|
- } |
|
151
|
|
- $aircraft_data = substr($aircraft_data, 0, -1); |
|
152
|
|
- print 'var series = ['.$aircraft_data.'];'; |
|
153
|
|
- 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);'; |
|
154
|
|
- print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
155
|
|
- print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
156
|
|
- 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":'; |
|
157
|
|
- print 'dataset'; |
|
158
|
|
- 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}}});'; |
|
159
|
|
- print '</script>'; |
|
160
|
|
- } |
|
161
|
|
- ?> |
|
|
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
|
+ if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
|
149
|
+ else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
|
150
|
+ } |
|
|
151
|
+ $aircraft_data = substr($aircraft_data, 0, -1); |
|
|
152
|
+ print 'var series = ['.$aircraft_data.'];'; |
|
|
153
|
+ 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);'; |
|
|
154
|
+ print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
|
155
|
+ print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
|
156
|
+ 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":'; |
|
|
157
|
+ print 'dataset'; |
|
|
158
|
+ 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}}});'; |
|
|
159
|
+ print '</script>'; |
|
|
160
|
+ } |
|
|
161
|
+ ?> |
|
162
|
162
|
<div class="more"> |
|
163
|
163
|
<?php |
|
164
|
|
- if ($year != '' && $month != '') { |
|
165
|
|
- ?> |
|
|
164
|
+ if ($year != '' && $month != '') { |
|
|
165
|
+ ?> |
|
166
|
166
|
<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> |
|
167
|
167
|
<?php |
|
168
|
|
- } else { |
|
169
|
|
- ?> |
|
|
168
|
+ } else { |
|
|
169
|
+ ?> |
|
170
|
170
|
<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> |
|
171
|
171
|
<?php |
|
172
|
|
- } |
|
173
|
|
- ?> |
|
|
172
|
+ } |
|
|
173
|
+ ?> |
|
174
|
174
|
</div> |
|
175
|
175
|
</div> |
|
176
|
176
|
<!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
@@ -223,29 +223,29 @@ discard block |
|
|
block discarded – undo |
|
223
|
223
|
<div class="col-md-6"> |
|
224
|
224
|
<h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
|
225
|
225
|
<?php |
|
226
|
|
- $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
227
|
|
- if (count($marine_array) == 0) print _("No data available"); |
|
228
|
|
- else { |
|
229
|
|
- print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
230
|
|
- $marine_data = ''; |
|
231
|
|
- foreach($marine_array as $marine_item) |
|
232
|
|
- { |
|
233
|
|
- $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
234
|
|
- } |
|
235
|
|
- $marine_data = substr($marine_data, 0, -1); |
|
236
|
|
- print 'var series = ['.$marine_data.'];'; |
|
237
|
|
- 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);'; |
|
238
|
|
- print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
239
|
|
- print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
240
|
|
- 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":'; |
|
241
|
|
- print 'dataset'; |
|
242
|
|
- 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}}});'; |
|
243
|
|
- print '</script>'; |
|
244
|
|
- } |
|
245
|
|
- ?> |
|
|
226
|
+ $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
|
227
|
+ if (count($marine_array) == 0) print _("No data available"); |
|
|
228
|
+ else { |
|
|
229
|
+ print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
|
230
|
+ $marine_data = ''; |
|
|
231
|
+ foreach($marine_array as $marine_item) |
|
|
232
|
+ { |
|
|
233
|
+ $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
|
234
|
+ } |
|
|
235
|
+ $marine_data = substr($marine_data, 0, -1); |
|
|
236
|
+ print 'var series = ['.$marine_data.'];'; |
|
|
237
|
+ 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);'; |
|
|
238
|
+ print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
|
239
|
+ print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
|
240
|
+ 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":'; |
|
|
241
|
+ print 'dataset'; |
|
|
242
|
+ 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}}});'; |
|
|
243
|
+ print '</script>'; |
|
|
244
|
+ } |
|
|
245
|
+ ?> |
|
246
|
246
|
<div class="more"> |
|
247
|
247
|
<?php |
|
248
|
|
- /* |
|
|
248
|
+ /* |
|
249
|
249
|
if ($year != '' && $month != '') { |
|
250
|
250
|
?> |
|
251
|
251
|
<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> |
|
@@ -256,7 +256,7 @@ discard block |
|
|
block discarded – undo |
|
256
|
256
|
<?php |
|
257
|
257
|
} |
|
258
|
258
|
*/ |
|
259
|
|
- ?> |
|
|
259
|
+ ?> |
|
260
|
260
|
</div> |
|
261
|
261
|
</div> |
|
262
|
262
|
<!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
@@ -271,29 +271,29 @@ discard block |
|
|
block discarded – undo |
|
271
|
271
|
<div class="col-md-6"> |
|
272
|
272
|
<h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
|
273
|
273
|
<?php |
|
274
|
|
- $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
275
|
|
- if (count($tracker_array) == 0) print _("No data available"); |
|
276
|
|
- else { |
|
277
|
|
- print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
278
|
|
- $tracker_data = ''; |
|
279
|
|
- foreach($tracker_array as $tracker_item) |
|
280
|
|
- { |
|
281
|
|
- $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
282
|
|
- } |
|
283
|
|
- $tracker_data = substr($tracker_data, 0, -1); |
|
284
|
|
- print 'var series = ['.$tracker_data.'];'; |
|
285
|
|
- 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);'; |
|
286
|
|
- print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
287
|
|
- print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
288
|
|
- 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":'; |
|
289
|
|
- print 'dataset'; |
|
290
|
|
- 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}}});'; |
|
291
|
|
- print '</script>'; |
|
292
|
|
- } |
|
293
|
|
- ?> |
|
|
274
|
+ $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
|
275
|
+ if (count($tracker_array) == 0) print _("No data available"); |
|
|
276
|
+ else { |
|
|
277
|
+ print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
|
278
|
+ $tracker_data = ''; |
|
|
279
|
+ foreach($tracker_array as $tracker_item) |
|
|
280
|
+ { |
|
|
281
|
+ $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
|
282
|
+ } |
|
|
283
|
+ $tracker_data = substr($tracker_data, 0, -1); |
|
|
284
|
+ print 'var series = ['.$tracker_data.'];'; |
|
|
285
|
+ 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);'; |
|
|
286
|
+ print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
|
287
|
+ print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
|
288
|
+ 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":'; |
|
|
289
|
+ print 'dataset'; |
|
|
290
|
+ 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}}});'; |
|
|
291
|
+ print '</script>'; |
|
|
292
|
+ } |
|
|
293
|
+ ?> |
|
294
|
294
|
<div class="more"> |
|
295
|
295
|
<?php |
|
296
|
|
- /* |
|
|
296
|
+ /* |
|
297
|
297
|
if ($year != '' && $month != '') { |
|
298
|
298
|
?> |
|
299
|
299
|
<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> |
|
@@ -304,7 +304,7 @@ discard block |
|
|
block discarded – undo |
|
304
|
304
|
<?php |
|
305
|
305
|
} |
|
306
|
306
|
*/ |
|
307
|
|
- ?> |
|
|
307
|
+ ?> |
|
308
|
308
|
</div> |
|
309
|
309
|
</div> |
|
310
|
310
|
<!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |