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