@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | // When button "Remove all filters" is clicked |
| 29 | 29 | if (isset($_POST['removefilters'])) { |
| 30 | 30 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
| 31 | - return strpos($key,'filter_') === 0; |
|
| 31 | + return strpos($key,'filter_') === 0; |
|
| 32 | 32 | }); |
| 33 | 33 | foreach ($allfilters as $filt) { |
| 34 | 34 | unset($_COOKIE[$filt]); |
@@ -167,17 +167,17 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | ?> |
| 169 | 169 | <?php |
| 170 | - if (isset($_POST['archive'])) { |
|
| 170 | + if (isset($_POST['archive'])) { |
|
| 171 | 171 | ?> |
| 172 | 172 | <script src="<?php print $globalURL; ?>/js/map.common.js"></script> |
| 173 | 173 | <?php |
| 174 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 174 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 175 | 175 | ?> |
| 176 | 176 | |
| 177 | 177 | <script src="<?php print $globalURL; ?>/js/map.js.php?<?php print time(); ?>&archive&begindate=<?php print strtotime($_POST['start_date']); ?>&enddate=<?php print strtotime($_POST['end_date']); ?>&archivespeed=<?php print $_POST['archivespeed']; ?>"></script> |
| 178 | 178 | <?php |
| 179 | - } |
|
| 180 | - } else { |
|
| 179 | + } |
|
| 180 | + } else { |
|
| 181 | 181 | ?> |
| 182 | 182 | <?php |
| 183 | 183 | /* if (isset($globalBeta) && $globalBeta) { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | ?> |
| 191 | 191 | <?php |
| 192 | - if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 192 | + if ((!isset($_COOKIE['MapFormat']) && (!isset($globalMap3Ddefault) || !$globalMap3Ddefault)) || (isset($_COOKIE['MapFormat']) && $_COOKIE['MapFormat'] != '3d')) { |
|
| 193 | 193 | ?> |
| 194 | 194 | <?php |
| 195 | 195 | // if (isset($globalBeta) && $globalBeta) { |
@@ -216,13 +216,13 @@ discard block |
||
| 216 | 216 | <script src="<?php print $globalURL; ?>/js/map-marine.2d.js.php?<?php print time(); ?>"></script> |
| 217 | 217 | <?php |
| 218 | 218 | } |
| 219 | - } |
|
| 219 | + } |
|
| 220 | 220 | ?> |
| 221 | 221 | <?php |
| 222 | 222 | // } |
| 223 | 223 | ?> |
| 224 | 224 | <?php |
| 225 | - } |
|
| 225 | + } |
|
| 226 | 226 | } |
| 227 | 227 | ?> |
| 228 | 228 | <?php |
@@ -398,24 +398,24 @@ discard block |
||
| 398 | 398 | <ul class="nav navbar-nav"> |
| 399 | 399 | |
| 400 | 400 | <?php |
| 401 | - $sub = false; |
|
| 402 | - if (((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))) || (isset($globalMarine) && $globalMarine === TRUE && isset($globalTracker) && $globalTracker === TRUE)) { |
|
| 401 | + $sub = false; |
|
| 402 | + if (((!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE))) || (isset($globalMarine) && $globalMarine === TRUE && isset($globalTracker) && $globalTracker === TRUE)) { |
|
| 403 | 403 | $sub = true; |
| 404 | - } |
|
| 404 | + } |
|
| 405 | 405 | ?> |
| 406 | 406 | <?php |
| 407 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 407 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 408 | 408 | ?> |
| 409 | 409 | <li class="dropdown"> |
| 410 | 410 | <?php |
| 411 | - if ($sub) { |
|
| 411 | + if ($sub) { |
|
| 412 | 412 | ?> |
| 413 | 413 | <li class="dropdown"> |
| 414 | 414 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Aircrafts"); ?> <b class="caret"></b></a> |
| 415 | 415 | <ul class="dropdown-menu multi-level"> |
| 416 | 416 | <li class="dropdown-submenu"> |
| 417 | 417 | <?php |
| 418 | - } |
|
| 418 | + } |
|
| 419 | 419 | ?> |
| 420 | 420 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Explore"); ?> <b class="<?php if ($sub) echo 'right-'; ?>caret"></b></a> |
| 421 | 421 | <ul class="dropdown-menu"> |
@@ -423,17 +423,17 @@ discard block |
||
| 423 | 423 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
| 424 | 424 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
| 425 | 425 | <?php |
| 426 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 426 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 427 | 427 | ?> |
| 428 | 428 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
| 429 | 429 | <?php |
| 430 | - } |
|
| 431 | - if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 430 | + } |
|
| 431 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 432 | 432 | |
| 433 | 433 | ?> |
| 434 | 434 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
| 435 | 435 | <?php |
| 436 | - } |
|
| 436 | + } |
|
| 437 | 437 | ?> |
| 438 | 438 | <li><hr /></li> |
| 439 | 439 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -441,34 +441,34 @@ discard block |
||
| 441 | 441 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
| 442 | 442 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
| 443 | 443 | <?php |
| 444 | - if ($globalACARS) { |
|
| 445 | - if (isset($globalDemo) && $globalDemo) { |
|
| 446 | - ?> |
|
| 444 | + if ($globalACARS) { |
|
| 445 | + if (isset($globalDemo) && $globalDemo) { |
|
| 446 | + ?> |
|
| 447 | 447 | <li><hr /></li> |
| 448 | 448 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
| 449 | 449 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
| 450 | 450 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
| 451 | 451 | <?php |
| 452 | - } else { |
|
| 453 | - ?> |
|
| 452 | + } else { |
|
| 453 | + ?> |
|
| 454 | 454 | <li><hr /></li> |
| 455 | 455 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
| 456 | 456 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
| 457 | 457 | <?php |
| 458 | - } |
|
| 459 | - } |
|
| 460 | - ?> |
|
| 458 | + } |
|
| 459 | + } |
|
| 460 | + ?> |
|
| 461 | 461 | <?php |
| 462 | - if (isset($globalAccidents) && $globalAccidents) { |
|
| 463 | - ?> |
|
| 462 | + if (isset($globalAccidents) && $globalAccidents) { |
|
| 463 | + ?> |
|
| 464 | 464 | <li><hr /></li> |
| 465 | 465 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
| 466 | 466 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
| 467 | 467 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
| 468 | 468 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
| 469 | 469 | <?php |
| 470 | - } |
|
| 471 | - ?> |
|
| 470 | + } |
|
| 471 | + ?> |
|
| 472 | 472 | <li><hr /></li> |
| 473 | 473 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
| 474 | 474 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
@@ -491,14 +491,14 @@ discard block |
||
| 491 | 491 | </ul> |
| 492 | 492 | <?php |
| 493 | 493 | } |
| 494 | - } |
|
| 494 | + } |
|
| 495 | 495 | ?> |
| 496 | 496 | <?php |
| 497 | - if (isset($globalMarine) && $globalMarine) { |
|
| 497 | + if (isset($globalMarine) && $globalMarine) { |
|
| 498 | 498 | ?> |
| 499 | 499 | <li class="dropdown"> |
| 500 | 500 | <?php |
| 501 | - if ($sub) { |
|
| 501 | + if ($sub) { |
|
| 502 | 502 | ?> |
| 503 | 503 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Vessels"); ?> <b class="caret"></b></a> |
| 504 | 504 | <ul class="dropdown-menu multi-level"> |
@@ -523,14 +523,14 @@ discard block |
||
| 523 | 523 | } |
| 524 | 524 | ?> |
| 525 | 525 | <?php |
| 526 | - } |
|
| 526 | + } |
|
| 527 | 527 | ?> |
| 528 | 528 | <?php |
| 529 | - if (isset($globalTracker) && $globalTracker) { |
|
| 529 | + if (isset($globalTracker) && $globalTracker) { |
|
| 530 | 530 | ?> |
| 531 | 531 | <li class="dropdown"> |
| 532 | 532 | <?php |
| 533 | - if ($sub) { |
|
| 533 | + if ($sub) { |
|
| 534 | 534 | ?> |
| 535 | 535 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
| 536 | 536 | <ul class="dropdown-menu multi-level"> |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | } |
| 556 | 556 | ?> |
| 557 | 557 | <?php |
| 558 | - } |
|
| 558 | + } |
|
| 559 | 559 | ?> |
| 560 | 560 | |
| 561 | 561 | <li class="dropdown"> |
@@ -564,12 +564,12 @@ discard block |
||
| 564 | 564 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
| 565 | 565 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
| 566 | 566 | <?php |
| 567 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 567 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
| 568 | 568 | ?> |
| 569 | 569 | <li><hr /></li> |
| 570 | 570 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
| 571 | 571 | <?php |
| 572 | - } |
|
| 572 | + } |
|
| 573 | 573 | ?> |
| 574 | 574 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
| 575 | 575 | <li><hr /></li> |
@@ -590,14 +590,14 @@ discard block |
||
| 590 | 590 | <form> |
| 591 | 591 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
| 592 | 592 | <?php |
| 593 | - $Language = new Language(); |
|
| 594 | - $alllang = $Language->getLanguages(); |
|
| 595 | - foreach ($alllang as $key => $lang) { |
|
| 596 | - print '<option value="'.$key.'"'; |
|
| 597 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 598 | - print '>'.$lang[0].'</option>'; |
|
| 599 | - } |
|
| 600 | - ?> |
|
| 593 | + $Language = new Language(); |
|
| 594 | + $alllang = $Language->getLanguages(); |
|
| 595 | + foreach ($alllang as $key => $lang) { |
|
| 596 | + print '<option value="'.$key.'"'; |
|
| 597 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
| 598 | + print '>'.$lang[0].'</option>'; |
|
| 599 | + } |
|
| 600 | + ?> |
|
| 601 | 601 | </select> |
| 602 | 602 | </form> |
| 603 | 603 | </div> |
@@ -628,18 +628,18 @@ discard block |
||
| 628 | 628 | ?> |
| 629 | 629 | <div class="top-header clear" role="main"> |
| 630 | 630 | <?php |
| 631 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 631 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
| 632 | 632 | ?> |
| 633 | 633 | <div id="archive-map"></div> |
| 634 | 634 | <?php |
| 635 | - } |
|
| 635 | + } |
|
| 636 | 636 | ?> |
| 637 | 637 | </div> |
| 638 | 638 | <?php |
| 639 | 639 | } |
| 640 | 640 | if ((strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) || (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false)) |
| 641 | 641 | { |
| 642 | - ?> |
|
| 642 | + ?> |
|
| 643 | 643 | <div class="top-header clear" role="main"> |
| 644 | 644 | <div id="map"></div> |
| 645 | 645 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -650,15 +650,15 @@ discard block |
||
| 650 | 650 | var zoom = 13; |
| 651 | 651 | //create the map |
| 652 | 652 | <?php |
| 653 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 653 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
| 654 | 654 | ?> |
| 655 | 655 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
| 656 | 656 | <?php |
| 657 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 657 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
| 658 | 658 | ?> |
| 659 | 659 | map = L.map('map', { zoomControl:true }); |
| 660 | 660 | <?php |
| 661 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 661 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 662 | 662 | ?> |
| 663 | 663 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
| 664 | 664 | var line = L.polyline([[<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>],[<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>]]).addTo(map); |
@@ -666,22 +666,22 @@ discard block |
||
| 666 | 666 | var departure_airport = L.marker([<?php print $spotter_array[0]['departure_airport_latitude']; ?>, <?php print $spotter_array[0]['departure_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/departure_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 667 | 667 | var arrival_airport = L.marker([<?php print $spotter_array[0]['arrival_airport_latitude']; ?>, <?php print $spotter_array[0]['arrival_airport_longitude']; ?>], {icon: L.icon({iconUrl: '<?php print $globalURL; ?>/images/arrival_airport.png',iconSize: [16,18],iconAnchor: [8,16]})}).addTo(map); |
| 668 | 668 | <?php |
| 669 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 669 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude'])) { |
|
| 670 | 670 | ?> |
| 671 | 671 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
| 672 | 672 | <?php |
| 673 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 673 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
| 674 | 674 | ?> |
| 675 | 675 | map = L.map('map', { zoomControl:true }); |
| 676 | 676 | <?php |
| 677 | - } |
|
| 677 | + } |
|
| 678 | 678 | ?> |
| 679 | 679 | //initialize the layer group for the aircrft markers |
| 680 | 680 | var layer_data = L.layerGroup(); |
| 681 | 681 | |
| 682 | 682 | //a few title layers |
| 683 | 683 | <?php |
| 684 | - if ($globalMapProvider == 'Mapbox') { |
|
| 684 | + if ($globalMapProvider == 'Mapbox') { |
|
| 685 | 685 | ?> |
| 686 | 686 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
| 687 | 687 | maxZoom: 18, |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | token : '<?php print $globalMapboxToken; ?>' |
| 693 | 693 | }).addTo(map); |
| 694 | 694 | <?php |
| 695 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 695 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
| 696 | 696 | ?> |
| 697 | 697 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
| 698 | 698 | maxZoom: 18, |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
| 702 | 702 | }).addTo(map); |
| 703 | 703 | <?php |
| 704 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 704 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
| 705 | 705 | ?> |
| 706 | 706 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
| 707 | 707 | maxZoom: 18, |
@@ -710,27 +710,27 @@ discard block |
||
| 710 | 710 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>, Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency"' |
| 711 | 711 | }).addTo(map); |
| 712 | 712 | <?php |
| 713 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 713 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
| 714 | 714 | ?> |
| 715 | 715 | var googleLayer = new L.Google('ROADMAP'); |
| 716 | 716 | map.addLayer(googleLayer); |
| 717 | 717 | <?php |
| 718 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 718 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
| 719 | 719 | ?> |
| 720 | 720 | var googleLayer = new L.Google('SATELLITE'); |
| 721 | 721 | map.addLayer(googleLayer); |
| 722 | 722 | <?php |
| 723 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 723 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
| 724 | 724 | ?> |
| 725 | 725 | var googleLayer = new L.Google('HYBRID'); |
| 726 | 726 | map.addLayer(googleLayer); |
| 727 | 727 | <?php |
| 728 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 728 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
| 729 | 729 | ?> |
| 730 | 730 | var googleLayer = new L.Google('Terrain'); |
| 731 | 731 | map.addLayer(googleLayer); |
| 732 | 732 | <?php |
| 733 | - } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 733 | + } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
| 734 | 734 | $customid = $globalMapProvider; |
| 735 | 735 | ?> |
| 736 | 736 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
@@ -740,8 +740,8 @@ discard block |
||
| 740 | 740 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
| 741 | 741 | }).addTo(map); |
| 742 | 742 | <?php |
| 743 | - //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 744 | - } else { |
|
| 743 | + //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
| 744 | + } else { |
|
| 745 | 745 | ?> |
| 746 | 746 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
| 747 | 747 | maxZoom: 18, |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | }).addTo(map); |
| 751 | 751 | |
| 752 | 752 | <?php |
| 753 | - } |
|
| 753 | + } |
|
| 754 | 754 | ?> |
| 755 | 755 | </script> |
| 756 | 756 | </div> |
@@ -79,24 +79,24 @@ 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($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 82 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
| 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 | - } |
|
| 88 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 89 | - ?> |
|
| 87 | + } |
|
| 88 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
| 89 | + ?> |
|
| 90 | 90 | <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
| 91 | 91 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
| 92 | 92 | <?php |
| 93 | - } |
|
| 94 | - ?> |
|
| 93 | + } |
|
| 94 | + ?> |
|
| 95 | 95 | <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
| 96 | 96 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
| 97 | 97 | <?php |
| 98 | - if ($airline_icao == '') { |
|
| 99 | - ?> |
|
| 98 | + if ($airline_icao == '') { |
|
| 99 | + ?> |
|
| 100 | 100 | <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
| 101 | 101 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
| 102 | 102 | <?php |
@@ -139,39 +139,39 @@ discard block |
||
| 139 | 139 | <div class="col-md-6"> |
| 140 | 140 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
| 141 | 141 | <?php |
| 142 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
| 143 | - if (count($aircraft_array) == 0) print _("No data available"); |
|
| 144 | - else { |
|
| 145 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 146 | - $aircraft_data = ''; |
|
| 147 | - foreach($aircraft_array as $aircraft_item) |
|
| 148 | - { |
|
| 149 | - if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 150 | - else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 151 | - } |
|
| 152 | - $aircraft_data = substr($aircraft_data, 0, -1); |
|
| 153 | - print 'var series = ['.$aircraft_data.'];'; |
|
| 154 | - 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);'; |
|
| 155 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 156 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 157 | - 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":'; |
|
| 158 | - print 'dataset'; |
|
| 159 | - 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}}});'; |
|
| 160 | - print '</script>'; |
|
| 161 | - } |
|
| 162 | - ?> |
|
| 142 | + $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
| 143 | + if (count($aircraft_array) == 0) print _("No data available"); |
|
| 144 | + else { |
|
| 145 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 146 | + $aircraft_data = ''; |
|
| 147 | + foreach($aircraft_array as $aircraft_item) |
|
| 148 | + { |
|
| 149 | + if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 150 | + else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
|
| 151 | + } |
|
| 152 | + $aircraft_data = substr($aircraft_data, 0, -1); |
|
| 153 | + print 'var series = ['.$aircraft_data.'];'; |
|
| 154 | + 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);'; |
|
| 155 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 156 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 157 | + 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":'; |
|
| 158 | + print 'dataset'; |
|
| 159 | + 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}}});'; |
|
| 160 | + print '</script>'; |
|
| 161 | + } |
|
| 162 | + ?> |
|
| 163 | 163 | <div class="more"> |
| 164 | 164 | <?php |
| 165 | - if ($year != '' && $month != '') { |
|
| 166 | - ?> |
|
| 165 | + if ($year != '' && $month != '') { |
|
| 166 | + ?> |
|
| 167 | 167 | <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> |
| 168 | 168 | <?php |
| 169 | - } else { |
|
| 170 | - ?> |
|
| 169 | + } else { |
|
| 170 | + ?> |
|
| 171 | 171 | <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> |
| 172 | 172 | <?php |
| 173 | - } |
|
| 174 | - ?> |
|
| 173 | + } |
|
| 174 | + ?> |
|
| 175 | 175 | </div> |
| 176 | 176 | </div> |
| 177 | 177 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -224,29 +224,29 @@ discard block |
||
| 224 | 224 | <div class="col-md-6"> |
| 225 | 225 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
| 226 | 226 | <?php |
| 227 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
| 228 | - if (count($marine_array) == 0) print _("No data available"); |
|
| 229 | - else { |
|
| 230 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 231 | - $marine_data = ''; |
|
| 232 | - foreach($marine_array as $marine_item) |
|
| 233 | - { |
|
| 234 | - $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
| 235 | - } |
|
| 236 | - $marine_data = substr($marine_data, 0, -1); |
|
| 237 | - print 'var series = ['.$marine_data.'];'; |
|
| 238 | - 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);'; |
|
| 239 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 240 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 241 | - 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":'; |
|
| 242 | - print 'dataset'; |
|
| 243 | - 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}}});'; |
|
| 244 | - print '</script>'; |
|
| 245 | - } |
|
| 246 | - ?> |
|
| 227 | + $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
| 228 | + if (count($marine_array) == 0) print _("No data available"); |
|
| 229 | + else { |
|
| 230 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 231 | + $marine_data = ''; |
|
| 232 | + foreach($marine_array as $marine_item) |
|
| 233 | + { |
|
| 234 | + $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
|
| 235 | + } |
|
| 236 | + $marine_data = substr($marine_data, 0, -1); |
|
| 237 | + print 'var series = ['.$marine_data.'];'; |
|
| 238 | + 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);'; |
|
| 239 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 240 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 241 | + 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":'; |
|
| 242 | + print 'dataset'; |
|
| 243 | + 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}}});'; |
|
| 244 | + print '</script>'; |
|
| 245 | + } |
|
| 246 | + ?> |
|
| 247 | 247 | <div class="more"> |
| 248 | 248 | <?php |
| 249 | - /* |
|
| 249 | + /* |
|
| 250 | 250 | if ($year != '' && $month != '') { |
| 251 | 251 | ?> |
| 252 | 252 | <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> |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | <?php |
| 258 | 258 | } |
| 259 | 259 | */ |
| 260 | - ?> |
|
| 260 | + ?> |
|
| 261 | 261 | </div> |
| 262 | 262 | </div> |
| 263 | 263 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -272,29 +272,29 @@ discard block |
||
| 272 | 272 | <div class="col-md-6"> |
| 273 | 273 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
| 274 | 274 | <?php |
| 275 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
| 276 | - if (count($tracker_array) == 0) print _("No data available"); |
|
| 277 | - else { |
|
| 278 | - print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 279 | - $tracker_data = ''; |
|
| 280 | - foreach($tracker_array as $tracker_item) |
|
| 281 | - { |
|
| 282 | - $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
| 283 | - } |
|
| 284 | - $tracker_data = substr($tracker_data, 0, -1); |
|
| 285 | - print 'var series = ['.$tracker_data.'];'; |
|
| 286 | - 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);'; |
|
| 287 | - print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 288 | - print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 289 | - 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":'; |
|
| 290 | - print 'dataset'; |
|
| 291 | - 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}}});'; |
|
| 292 | - print '</script>'; |
|
| 293 | - } |
|
| 294 | - ?> |
|
| 275 | + $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
| 276 | + if (count($tracker_array) == 0) print _("No data available"); |
|
| 277 | + else { |
|
| 278 | + print '<div id="chart1" class="chart" width="100%"></div><script>'; |
|
| 279 | + $tracker_data = ''; |
|
| 280 | + foreach($tracker_array as $tracker_item) |
|
| 281 | + { |
|
| 282 | + $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
|
| 283 | + } |
|
| 284 | + $tracker_data = substr($tracker_data, 0, -1); |
|
| 285 | + print 'var series = ['.$tracker_data.'];'; |
|
| 286 | + 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);'; |
|
| 287 | + print 'var paletteScale = d3.scale.log().domain([minValue,maxValue]).range(["#e6e6f6","#1a3151"]);'; |
|
| 288 | + print 'series.forEach(function(item){var lab = item[0], value = item[1]; dataset.push({"label":lab,"value":value,"color":paletteScale(value)});});'; |
|
| 289 | + 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":'; |
|
| 290 | + print 'dataset'; |
|
| 291 | + 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}}});'; |
|
| 292 | + print '</script>'; |
|
| 293 | + } |
|
| 294 | + ?> |
|
| 295 | 295 | <div class="more"> |
| 296 | 296 | <?php |
| 297 | - /* |
|
| 297 | + /* |
|
| 298 | 298 | if ($year != '' && $month != '') { |
| 299 | 299 | ?> |
| 300 | 300 | <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> |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | <?php |
| 306 | 306 | } |
| 307 | 307 | */ |
| 308 | - ?> |
|
| 308 | + ?> |
|
| 309 | 309 | </div> |
| 310 | 310 | </div> |
| 311 | 311 | <!-- <?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,31 +74,31 @@ 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 | 82 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 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 | } |
| 88 | 88 | if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
| 89 | 89 | ?> |
| 90 | - <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 91 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 90 | + <span><span class="badge"><?php print number_format($Stats->countOverallOwners($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Owners"); ?></span> |
|
| 91 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 92 | 92 | <?php |
| 93 | 93 | } |
| 94 | 94 | ?> |
| 95 | - <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao,$filter_name,$year,$month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
| 96 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 95 | + <span><span class="badge"><?php print number_format($Stats->countOverallAircrafts($airline_icao, $filter_name, $year, $month)); ?></span> <?php echo _("Aircrafts types"); ?></span> |
|
| 96 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 97 | 97 | <?php |
| 98 | 98 | if ($airline_icao == '') { |
| 99 | 99 | ?> |
| 100 | - <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name,$year,$month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 101 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 100 | + <span><span class="badge"><?php print number_format($Stats->countOverallAirlines($filter_name, $year, $month)); ?></span> <?php echo _("Airlines"); ?></span> |
|
| 101 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 102 | 102 | <?php |
| 103 | 103 | } |
| 104 | 104 | ?> |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | if (!(isset($globalVA) && $globalVA) && !(isset($globalIVAO) && $globalIVAO) && !(isset($globalVATSIM) && $globalVATSIM) && !(isset($globalphpVMS) && $globalphpVMS) && !(isset($globalVAM) && $globalVAM)) { |
| 107 | 107 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 108 | 108 | ?> |
| 109 | - <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name,$year,$month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 110 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 109 | + <span><span class="badge"><?php print number_format($Stats->countOverallMilitaryFlights($filter_name, $year, $month)); ?></span> <?php echo _("Military"); ?></span> |
|
| 110 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 111 | 111 | <?php |
| 112 | 112 | } |
| 113 | 113 | } |
@@ -115,22 +115,22 @@ discard block |
||
| 115 | 115 | <?php |
| 116 | 116 | } elseif ($type == 'marine') { |
| 117 | 117 | ?> |
| 118 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(),$year,$month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 119 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 120 | - <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 121 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 118 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarine(array(), $year, $month)); ?></span> <?php echo _("Vessels"); ?></span> |
|
| 119 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 120 | + <span><span class="badge"><?php print number_format($Marine->countOverallMarineTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 121 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 122 | 122 | <?php |
| 123 | 123 | } elseif ($type == 'tracker') { |
| 124 | 124 | ?> |
| 125 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(),$year,$month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 126 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 127 | - <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(),$year,$month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 128 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 125 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTracker(array(), $year, $month)); ?></span> <?php echo _("Trackers"); ?></span> |
|
| 126 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 127 | + <span><span class="badge"><?php print number_format($Tracker->countOverallTrackerTypes(array(), $year, $month)); ?></span> <?php echo _("Types"); ?></span> |
|
| 128 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 129 | 129 | <?php |
| 130 | 130 | } |
| 131 | 131 | ?> |
| 132 | 132 | </p> |
| 133 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 133 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 134 | 134 | <div class="specific-stats"> |
| 135 | 135 | <?php |
| 136 | 136 | if ($type == 'aircraft') { |
@@ -139,12 +139,12 @@ discard block |
||
| 139 | 139 | <div class="col-md-6"> |
| 140 | 140 | <h2><?php echo _("Top 10 Most Common Aircraft Type"); ?></h2> |
| 141 | 141 | <?php |
| 142 | - $aircraft_array = $Stats->countAllAircraftTypes(true,$airline_icao,$filter_name,$year,$month); |
|
| 142 | + $aircraft_array = $Stats->countAllAircraftTypes(true, $airline_icao, $filter_name, $year, $month); |
|
| 143 | 143 | if (count($aircraft_array) == 0) print _("No data available"); |
| 144 | 144 | else { |
| 145 | 145 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 146 | 146 | $aircraft_data = ''; |
| 147 | - foreach($aircraft_array as $aircraft_item) |
|
| 147 | + foreach ($aircraft_array as $aircraft_item) |
|
| 148 | 148 | { |
| 149 | 149 | if ($aircraft_item['aircraft_manufacturer'] == 'Not Available') $aircraft_data .= '[" ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
| 150 | 150 | else $aircraft_data .= '["'.$aircraft_item['aircraft_manufacturer'].' '.$aircraft_item['aircraft_name'].' ('.$aircraft_item['aircraft_icao'].')",'.$aircraft_item['aircraft_icao_count'].'],'; |
@@ -174,17 +174,17 @@ discard block |
||
| 174 | 174 | ?> |
| 175 | 175 | </div> |
| 176 | 176 | </div> |
| 177 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 177 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 178 | 178 | <?php |
| 179 | 179 | // echo $airline_icao; |
| 180 | 180 | if ($airline_icao == '' || $airline_icao == 'all') { |
| 181 | - $airline_array = $Stats->countAllAirlines(true,$filter_name,$year,$month); |
|
| 181 | + $airline_array = $Stats->countAllAirlines(true, $filter_name, $year, $month); |
|
| 182 | 182 | if (count($airline_array) > 0) { |
| 183 | 183 | print '<div class="col-md-6">'; |
| 184 | 184 | print '<h2>'._("Top 10 Most Common Airline").'</h2>'; |
| 185 | 185 | print '<div id="chart2" class="chart" width="100%"></div><script>'; |
| 186 | 186 | $airline_data = ''; |
| 187 | - foreach($airline_array as $airline_item) |
|
| 187 | + foreach ($airline_array as $airline_item) |
|
| 188 | 188 | { |
| 189 | 189 | $airline_data .= '["'.$airline_item['airline_name'].' ('.$airline_item['airline_icao'].')",'.$airline_item['airline_count'].'],'; |
| 190 | 190 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | } |
| 211 | 211 | ?> |
| 212 | 212 | </div> |
| 213 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 213 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 214 | 214 | <?php |
| 215 | 215 | } |
| 216 | 216 | ?> |
@@ -224,12 +224,12 @@ discard block |
||
| 224 | 224 | <div class="col-md-6"> |
| 225 | 225 | <h2><?php echo _("Top 10 Most Common Vessel Type"); ?></h2> |
| 226 | 226 | <?php |
| 227 | - $marine_array = $Marine->countAllMarineTypes(true,0,'',array(),$year,$month); |
|
| 227 | + $marine_array = $Marine->countAllMarineTypes(true, 0, '', array(), $year, $month); |
|
| 228 | 228 | if (count($marine_array) == 0) print _("No data available"); |
| 229 | 229 | else { |
| 230 | 230 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 231 | 231 | $marine_data = ''; |
| 232 | - foreach($marine_array as $marine_item) |
|
| 232 | + foreach ($marine_array as $marine_item) |
|
| 233 | 233 | { |
| 234 | 234 | $marine_data .= '["'.$marine_item['marine_type'].'",'.$marine_item['marine_type_count'].'],'; |
| 235 | 235 | } |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | ?> |
| 261 | 261 | </div> |
| 262 | 262 | </div> |
| 263 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 263 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 264 | 264 | <!-- </div>--> |
| 265 | 265 | <?php |
| 266 | 266 | } |
@@ -272,12 +272,12 @@ discard block |
||
| 272 | 272 | <div class="col-md-6"> |
| 273 | 273 | <h2><?php echo _("Top 10 Most Common Tracker Type"); ?></h2> |
| 274 | 274 | <?php |
| 275 | - $tracker_array = $Tracker->countAllTrackerTypes(true,0,'',array(),$year,$month); |
|
| 275 | + $tracker_array = $Tracker->countAllTrackerTypes(true, 0, '', array(), $year, $month); |
|
| 276 | 276 | if (count($tracker_array) == 0) print _("No data available"); |
| 277 | 277 | else { |
| 278 | 278 | print '<div id="chart1" class="chart" width="100%"></div><script>'; |
| 279 | 279 | $tracker_data = ''; |
| 280 | - foreach($tracker_array as $tracker_item) |
|
| 280 | + foreach ($tracker_array as $tracker_item) |
|
| 281 | 281 | { |
| 282 | 282 | $tracker_data .= '["'.$tracker_item['tracker_type'].'",'.$tracker_item['tracker_type_count'].'],'; |
| 283 | 283 | } |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | ?> |
| 309 | 309 | </div> |
| 310 | 310 | </div> |
| 311 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 311 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 312 | 312 | <!-- </div>--> |
| 313 | 313 | <?php |
| 314 | 314 | } |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | ?> |
| 319 | 319 | <div class="row column"> |
| 320 | 320 | <?php |
| 321 | - $flightover_array = $Stats->countAllFlightOverCountries(false,$airline_icao,$filter_name,$year,$month); |
|
| 321 | + $flightover_array = $Stats->countAllFlightOverCountries(false, $airline_icao, $filter_name, $year, $month); |
|
| 322 | 322 | //if ((isset($globalVA) && $globalVA) ||(isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS)) { |
| 323 | 323 | if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
| 324 | 324 | if (empty($flightover_array)) { |
@@ -329,12 +329,12 @@ discard block |
||
| 329 | 329 | ?> |
| 330 | 330 | <h2><?php echo _("Top 10 Most Common Pilots"); ?></h2> |
| 331 | 331 | <?php |
| 332 | - $pilot_array = $Stats->countAllPilots(true,$airline_icao,$filter_name,$year,$month); |
|
| 332 | + $pilot_array = $Stats->countAllPilots(true, $airline_icao, $filter_name, $year, $month); |
|
| 333 | 333 | if (count($pilot_array) == 0) print _("No data available"); |
| 334 | 334 | else { |
| 335 | 335 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 336 | 336 | $pilot_data = ''; |
| 337 | - foreach($pilot_array as $pilot_item) |
|
| 337 | + foreach ($pilot_array as $pilot_item) |
|
| 338 | 338 | { |
| 339 | 339 | $pilot_data .= '["'.$pilot_item['pilot_name'].' ('.$pilot_item['pilot_id'].')",'.$pilot_item['pilot_count'].'],'; |
| 340 | 340 | } |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | ?> |
| 357 | 357 | </div> |
| 358 | 358 | |
| 359 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 359 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 360 | 360 | <?php |
| 361 | 361 | } |
| 362 | 362 | // else { |
@@ -365,12 +365,12 @@ discard block |
||
| 365 | 365 | <div class="col-md-6"> |
| 366 | 366 | <h2><?php echo _("Top 10 Most Common Owners"); ?></h2> |
| 367 | 367 | <?php |
| 368 | - $owner_array = $Stats->countAllOwners(true,$airline_icao,$filter_name,$year,$month); |
|
| 368 | + $owner_array = $Stats->countAllOwners(true, $airline_icao, $filter_name, $year, $month); |
|
| 369 | 369 | if (count($owner_array) == 0) print _("No data available"); |
| 370 | 370 | else { |
| 371 | 371 | print '<div id="chart7" class="chart" width="100%"></div><script>'; |
| 372 | 372 | $owner_data = ''; |
| 373 | - foreach($owner_array as $owner_item) |
|
| 373 | + foreach ($owner_array as $owner_item) |
|
| 374 | 374 | { |
| 375 | 375 | $owner_data .= '["'.$owner_item['owner_name'].'",'.$owner_item['owner_count'].'],'; |
| 376 | 376 | } |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | </div> |
| 391 | 391 | </div> |
| 392 | 392 | |
| 393 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 393 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 394 | 394 | <?php |
| 395 | 395 | } |
| 396 | 396 | if (!empty($flightover_array)) { |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 405 | 405 | print 'var series = ['; |
| 406 | 406 | $flightover_data = ''; |
| 407 | - foreach($flightover_array as $flightover_item) |
|
| 407 | + foreach ($flightover_array as $flightover_item) |
|
| 408 | 408 | { |
| 409 | 409 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
| 410 | 410 | } |
@@ -450,7 +450,7 @@ discard block |
||
| 450 | 450 | } |
| 451 | 451 | ?> |
| 452 | 452 | </div> |
| 453 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 453 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 454 | 454 | |
| 455 | 455 | |
| 456 | 456 | </div> |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 471 | 471 | print 'var series = ['; |
| 472 | 472 | $flightover_data = ''; |
| 473 | - foreach($flightover_array as $flightover_item) |
|
| 473 | + foreach ($flightover_array as $flightover_item) |
|
| 474 | 474 | { |
| 475 | 475 | $flightover_data .= '[ "'.$flightover_item['marine_country_iso3'].'",'.$flightover_item['marine_count'].'],'; |
| 476 | 476 | } |
@@ -530,7 +530,7 @@ discard block |
||
| 530 | 530 | print '<div id="chart10" class="chart" width="100%"></div><script>'; |
| 531 | 531 | print 'var series = ['; |
| 532 | 532 | $flightover_data = ''; |
| 533 | - foreach($flightover_array as $flightover_item) |
|
| 533 | + foreach ($flightover_array as $flightover_item) |
|
| 534 | 534 | { |
| 535 | 535 | $flightover_data .= '[ "'.$flightover_item['flight_country_iso3'].'",'.$flightover_item['flight_count'].'],'; |
| 536 | 536 | } |
@@ -583,14 +583,14 @@ discard block |
||
| 583 | 583 | <div class="row column"> |
| 584 | 584 | <div class="col-md-6"> |
| 585 | 585 | <?php |
| 586 | - $airport_airport_array = $Stats->countAllDepartureAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 586 | + $airport_airport_array = $Stats->countAllDepartureAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 587 | 587 | if (count($airport_airport_array) > 0) { |
| 588 | 588 | print '<h2>'._("Top 10 Most Common Departure Airports").'</h2>'; |
| 589 | 589 | print '<div id="chart3" class="chart" width="100%"></div><script>'; |
| 590 | 590 | print "\n"; |
| 591 | 591 | print 'var series = ['; |
| 592 | 592 | $airport_data = ''; |
| 593 | - foreach($airport_airport_array as $airport_item) |
|
| 593 | + foreach ($airport_airport_array as $airport_item) |
|
| 594 | 594 | { |
| 595 | 595 | $airport_data .= '[ "'.$airport_item['airport_departure_icao_count'].'", "'.$airport_item['airport_departure_icao'].'",'.$airport_item['airport_departure_latitude'].','.$airport_item['airport_departure_longitude'].'],'; |
| 596 | 596 | } |
@@ -641,18 +641,18 @@ discard block |
||
| 641 | 641 | } |
| 642 | 642 | ?> |
| 643 | 643 | </div> |
| 644 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 644 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 645 | 645 | |
| 646 | 646 | <div class="col-md-6"> |
| 647 | 647 | <?php |
| 648 | - $airport_airport_array2 = $Stats->countAllArrivalAirports(true,$airline_icao,$filter_name,$year,$month); |
|
| 648 | + $airport_airport_array2 = $Stats->countAllArrivalAirports(true, $airline_icao, $filter_name, $year, $month); |
|
| 649 | 649 | if (count($airport_airport_array2) > 0) { |
| 650 | 650 | print '<h2>'._("Top 10 Most Common Arrival Airports").'</h2>'; |
| 651 | 651 | print '<div id="chart4" class="chart" width="100%"></div><script>'; |
| 652 | 652 | print "\n"; |
| 653 | 653 | print 'var series = ['; |
| 654 | 654 | $airport_data = ''; |
| 655 | - foreach($airport_airport_array2 as $airport_item) |
|
| 655 | + foreach ($airport_airport_array2 as $airport_item) |
|
| 656 | 656 | { |
| 657 | 657 | $airport_data .= '[ "'.$airport_item['airport_arrival_icao_count'].'", "'.$airport_item['airport_arrival_icao'].'",'.$airport_item['airport_arrival_latitude'].','.$airport_item['airport_arrival_longitude'].'],'; |
| 658 | 658 | } |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | ?> |
| 705 | 705 | </div> |
| 706 | 706 | </div> |
| 707 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 707 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 708 | 708 | <?php |
| 709 | 709 | } |
| 710 | 710 | ?> |
@@ -718,19 +718,19 @@ discard block |
||
| 718 | 718 | <div class="col-md-6"> |
| 719 | 719 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 720 | 720 | <?php |
| 721 | - $year_array = $Stats->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
| 721 | + $year_array = $Stats->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
| 722 | 722 | if (count($year_array) == 0) print _("No data available"); |
| 723 | 723 | else { |
| 724 | 724 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 725 | 725 | $year_data = ''; |
| 726 | 726 | $year_cnt = ''; |
| 727 | - foreach($year_array as $year_item) |
|
| 727 | + foreach ($year_array as $year_item) |
|
| 728 | 728 | { |
| 729 | 729 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 730 | 730 | $year_cnt .= $year_item['date_count'].','; |
| 731 | 731 | } |
| 732 | 732 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 733 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 733 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 734 | 734 | print 'c3.generate({ |
| 735 | 735 | bindto: "#chart8", |
| 736 | 736 | data: { x: "x", |
@@ -743,23 +743,23 @@ discard block |
||
| 743 | 743 | <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> |
| 744 | 744 | </div> |
| 745 | 745 | </div> |
| 746 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 746 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 747 | 747 | <div class="col-md-6"> |
| 748 | 748 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 749 | 749 | <?php |
| 750 | - $month_array = $Stats->countAllDatesLastMonth($airline_icao,$filter_name); |
|
| 750 | + $month_array = $Stats->countAllDatesLastMonth($airline_icao, $filter_name); |
|
| 751 | 751 | if (count($month_array) == 0) print _("No data available"); |
| 752 | 752 | else { |
| 753 | 753 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 754 | 754 | $month_data = ''; |
| 755 | 755 | $month_cnt = ''; |
| 756 | - foreach($month_array as $month_item) |
|
| 756 | + foreach ($month_array as $month_item) |
|
| 757 | 757 | { |
| 758 | 758 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 759 | 759 | $month_cnt .= $month_item['date_count'].','; |
| 760 | 760 | } |
| 761 | 761 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 762 | - $month_cnt = "['flights',".substr($month_cnt,0,-1)."]"; |
|
| 762 | + $month_cnt = "['flights',".substr($month_cnt, 0, -1)."]"; |
|
| 763 | 763 | print 'c3.generate({ |
| 764 | 764 | bindto: "#chart9", |
| 765 | 765 | data: { x: "x", |
@@ -772,24 +772,24 @@ discard block |
||
| 772 | 772 | <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> |
| 773 | 773 | </div> |
| 774 | 774 | </div> |
| 775 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 775 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 776 | 776 | |
| 777 | 777 | <div class="col-md-6"> |
| 778 | 778 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 779 | 779 | <?php |
| 780 | - $date_array = $Stats->countAllDatesLast7Days($airline_icao,$filter_name); |
|
| 780 | + $date_array = $Stats->countAllDatesLast7Days($airline_icao, $filter_name); |
|
| 781 | 781 | if (empty($date_array)) print _("No data available"); |
| 782 | 782 | else { |
| 783 | 783 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 784 | 784 | $date_data = ''; |
| 785 | 785 | $date_cnt = ''; |
| 786 | - foreach($date_array as $date_item) |
|
| 786 | + foreach ($date_array as $date_item) |
|
| 787 | 787 | { |
| 788 | 788 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 789 | 789 | $date_cnt .= $date_item['date_count'].','; |
| 790 | 790 | } |
| 791 | 791 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 792 | - $date_cnt = "['flights',".substr($date_cnt,0,-1)."]"; |
|
| 792 | + $date_cnt = "['flights',".substr($date_cnt, 0, -1)."]"; |
|
| 793 | 793 | print 'c3.generate({ |
| 794 | 794 | bindto: "#chart5", |
| 795 | 795 | data: { x: "x", |
@@ -802,23 +802,23 @@ discard block |
||
| 802 | 802 | <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> |
| 803 | 803 | </div> |
| 804 | 804 | </div> |
| 805 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 805 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 806 | 806 | <div class="col-md-6"> |
| 807 | 807 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 808 | 808 | <?php |
| 809 | - $hour_array = $Stats->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 809 | + $hour_array = $Stats->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 810 | 810 | if (empty($hour_array)) print _("No data available"); |
| 811 | 811 | else { |
| 812 | 812 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 813 | 813 | $hour_data = ''; |
| 814 | 814 | $hour_cnt = ''; |
| 815 | - foreach($hour_array as $hour_item) |
|
| 815 | + foreach ($hour_array as $hour_item) |
|
| 816 | 816 | { |
| 817 | 817 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 818 | 818 | $hour_cnt .= $hour_item['hour_count'].','; |
| 819 | 819 | } |
| 820 | 820 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 821 | - $hour_cnt = "['flights',".substr($hour_cnt,0,-1)."]"; |
|
| 821 | + $hour_cnt = "['flights',".substr($hour_cnt, 0, -1)."]"; |
|
| 822 | 822 | print 'c3.generate({ |
| 823 | 823 | bindto: "#chart6", |
| 824 | 824 | data: { |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | <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> |
| 832 | 832 | </div> |
| 833 | 833 | </div> |
| 834 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 834 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 835 | 835 | </div> |
| 836 | 836 | <?php |
| 837 | 837 | } |
@@ -849,19 +849,19 @@ discard block |
||
| 849 | 849 | <div class="col-md-6"> |
| 850 | 850 | <h2><?php echo _("Busiest Months of the last 12 Months"); ?></h2> |
| 851 | 851 | <?php |
| 852 | - $year_array = $Marine->countAllMonthsLastYear(true,$airline_icao,$filter_name); |
|
| 852 | + $year_array = $Marine->countAllMonthsLastYear(true, $airline_icao, $filter_name); |
|
| 853 | 853 | if (count($year_array) == 0) print _("No data available"); |
| 854 | 854 | else { |
| 855 | 855 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 856 | 856 | $year_data = ''; |
| 857 | 857 | $year_cnt = ''; |
| 858 | - foreach($year_array as $year_item) |
|
| 858 | + foreach ($year_array as $year_item) |
|
| 859 | 859 | { |
| 860 | 860 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 861 | 861 | $year_cnt .= $year_item['date_count'].','; |
| 862 | 862 | } |
| 863 | 863 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 864 | - $year_cnt = "['vessels',".substr($year_cnt,0,-1)."]"; |
|
| 864 | + $year_cnt = "['vessels',".substr($year_cnt, 0, -1)."]"; |
|
| 865 | 865 | print 'c3.generate({ |
| 866 | 866 | bindto: "#chart8", |
| 867 | 867 | data: { x: "x", |
@@ -875,23 +875,23 @@ discard block |
||
| 875 | 875 | </div> |
| 876 | 876 | </div> |
| 877 | 877 | |
| 878 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 878 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 879 | 879 | <div class="col-md-6"> |
| 880 | 880 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 881 | 881 | <?php |
| 882 | - $month_array = $Marine->countAllDatesLastMonth($airline_icao,$filter_name); |
|
| 882 | + $month_array = $Marine->countAllDatesLastMonth($airline_icao, $filter_name); |
|
| 883 | 883 | if (count($month_array) == 0) print _("No data available"); |
| 884 | 884 | else { |
| 885 | 885 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 886 | 886 | $month_data = ''; |
| 887 | 887 | $month_cnt = ''; |
| 888 | - foreach($month_array as $month_item) |
|
| 888 | + foreach ($month_array as $month_item) |
|
| 889 | 889 | { |
| 890 | 890 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 891 | 891 | $month_cnt .= $month_item['date_count'].','; |
| 892 | 892 | } |
| 893 | 893 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 894 | - $month_cnt = "['vessels',".substr($month_cnt,0,-1)."]"; |
|
| 894 | + $month_cnt = "['vessels',".substr($month_cnt, 0, -1)."]"; |
|
| 895 | 895 | print 'c3.generate({ |
| 896 | 896 | bindto: "#chart9", |
| 897 | 897 | data: { x: "x", |
@@ -904,24 +904,24 @@ discard block |
||
| 904 | 904 | <a href="<?php print $globalURL; ?>/marine/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 905 | 905 | </div> |
| 906 | 906 | </div> |
| 907 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 907 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 908 | 908 | |
| 909 | 909 | <div class="col-md-6"> |
| 910 | 910 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
| 911 | 911 | <?php |
| 912 | - $date_array = $Marine->countAllDatesLast7Days($airline_icao,$filter_name); |
|
| 912 | + $date_array = $Marine->countAllDatesLast7Days($airline_icao, $filter_name); |
|
| 913 | 913 | if (empty($date_array)) print _("No data available"); |
| 914 | 914 | else { |
| 915 | 915 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 916 | 916 | $date_data = ''; |
| 917 | 917 | $date_cnt = ''; |
| 918 | - foreach($date_array as $date_item) |
|
| 918 | + foreach ($date_array as $date_item) |
|
| 919 | 919 | { |
| 920 | 920 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 921 | 921 | $date_cnt .= $date_item['date_count'].','; |
| 922 | 922 | } |
| 923 | 923 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 924 | - $date_cnt = "['vessels',".substr($date_cnt,0,-1)."]"; |
|
| 924 | + $date_cnt = "['vessels',".substr($date_cnt, 0, -1)."]"; |
|
| 925 | 925 | print 'c3.generate({ |
| 926 | 926 | bindto: "#chart5", |
| 927 | 927 | data: { x: "x", |
@@ -934,23 +934,23 @@ discard block |
||
| 934 | 934 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 935 | 935 | </div> |
| 936 | 936 | </div> |
| 937 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 937 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 938 | 938 | <div class="col-md-6"> |
| 939 | 939 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 940 | 940 | <?php |
| 941 | - $hour_array = $Marine->countAllHours('hour',true,$airline_icao,$filter_name); |
|
| 941 | + $hour_array = $Marine->countAllHours('hour', true, $airline_icao, $filter_name); |
|
| 942 | 942 | if (empty($hour_array)) print _("No data available"); |
| 943 | 943 | else { |
| 944 | 944 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 945 | 945 | $hour_data = ''; |
| 946 | 946 | $hour_cnt = ''; |
| 947 | - foreach($hour_array as $hour_item) |
|
| 947 | + foreach ($hour_array as $hour_item) |
|
| 948 | 948 | { |
| 949 | 949 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 950 | 950 | $hour_cnt .= $hour_item['hour_count'].','; |
| 951 | 951 | } |
| 952 | 952 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 953 | - $hour_cnt = "['vessels',".substr($hour_cnt,0,-1)."]"; |
|
| 953 | + $hour_cnt = "['vessels',".substr($hour_cnt, 0, -1)."]"; |
|
| 954 | 954 | print 'c3.generate({ |
| 955 | 955 | bindto: "#chart6", |
| 956 | 956 | data: { |
@@ -963,7 +963,7 @@ discard block |
||
| 963 | 963 | <a href="<?php print $globalURL; ?>/marine/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 964 | 964 | </div> |
| 965 | 965 | </div> |
| 966 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 966 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 967 | 967 | </div> |
| 968 | 968 | <?php |
| 969 | 969 | } |
@@ -987,13 +987,13 @@ discard block |
||
| 987 | 987 | print '<div id="chart8" class="chart" width="100%"></div><script>'; |
| 988 | 988 | $year_data = ''; |
| 989 | 989 | $year_cnt = ''; |
| 990 | - foreach($year_array as $year_item) |
|
| 990 | + foreach ($year_array as $year_item) |
|
| 991 | 991 | { |
| 992 | 992 | $year_data .= '"'.$year_item['year_name'].'-'.$year_item['month_name'].'-01'.'",'; |
| 993 | 993 | $year_cnt .= $year_item['date_count'].','; |
| 994 | 994 | } |
| 995 | 995 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 996 | - $year_cnt = "['trackers',".substr($year_cnt,0,-1)."]"; |
|
| 996 | + $year_cnt = "['trackers',".substr($year_cnt, 0, -1)."]"; |
|
| 997 | 997 | print 'c3.generate({ |
| 998 | 998 | bindto: "#chart8", |
| 999 | 999 | data: { x: "x", |
@@ -1007,7 +1007,7 @@ discard block |
||
| 1007 | 1007 | </div> |
| 1008 | 1008 | </div> |
| 1009 | 1009 | |
| 1010 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1010 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1011 | 1011 | <div class="col-md-6"> |
| 1012 | 1012 | <h2><?php echo _("Busiest Day in the last Month"); ?></h2> |
| 1013 | 1013 | <?php |
@@ -1017,13 +1017,13 @@ discard block |
||
| 1017 | 1017 | print '<div id="chart9" class="chart" width="100%"></div><script>'; |
| 1018 | 1018 | $month_data = ''; |
| 1019 | 1019 | $month_cnt = ''; |
| 1020 | - foreach($month_array as $month_item) |
|
| 1020 | + foreach ($month_array as $month_item) |
|
| 1021 | 1021 | { |
| 1022 | 1022 | $month_data .= '"'.$month_item['date_name'].'",'; |
| 1023 | 1023 | $month_cnt .= $month_item['date_count'].','; |
| 1024 | 1024 | } |
| 1025 | 1025 | $month_data = "['x',".substr($month_data, 0, -1)."]"; |
| 1026 | - $month_cnt = "['trackers',".substr($month_cnt,0,-1)."]"; |
|
| 1026 | + $month_cnt = "['trackers',".substr($month_cnt, 0, -1)."]"; |
|
| 1027 | 1027 | print 'c3.generate({ |
| 1028 | 1028 | bindto: "#chart9", |
| 1029 | 1029 | data: { x: "x", |
@@ -1036,7 +1036,7 @@ discard block |
||
| 1036 | 1036 | <a href="<?php print $globalURL; ?>/tracker/statistics/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1037 | 1037 | </div> |
| 1038 | 1038 | </div> |
| 1039 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1039 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1040 | 1040 | |
| 1041 | 1041 | <div class="col-md-6"> |
| 1042 | 1042 | <h2><?php echo _("Busiest Day in the last 7 Days"); ?></h2> |
@@ -1047,13 +1047,13 @@ discard block |
||
| 1047 | 1047 | print '<div id="chart5" class="chart" width="100%"></div><script>'; |
| 1048 | 1048 | $date_data = ''; |
| 1049 | 1049 | $date_cnt = ''; |
| 1050 | - foreach($date_array as $date_item) |
|
| 1050 | + foreach ($date_array as $date_item) |
|
| 1051 | 1051 | { |
| 1052 | 1052 | $date_data .= '"'.$date_item['date_name'].'",'; |
| 1053 | 1053 | $date_cnt .= $date_item['date_count'].','; |
| 1054 | 1054 | } |
| 1055 | 1055 | $date_data = "['x',".substr($date_data, 0, -1)."]"; |
| 1056 | - $date_cnt = "['trackers',".substr($date_cnt,0,-1)."]"; |
|
| 1056 | + $date_cnt = "['trackers',".substr($date_cnt, 0, -1)."]"; |
|
| 1057 | 1057 | print 'c3.generate({ |
| 1058 | 1058 | bindto: "#chart5", |
| 1059 | 1059 | data: { x: "x", |
@@ -1066,23 +1066,23 @@ discard block |
||
| 1066 | 1066 | <a href="<?php print $globalURL; ?>/marine/statistics/date" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1067 | 1067 | </div> |
| 1068 | 1068 | </div> |
| 1069 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1069 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1070 | 1070 | <div class="col-md-6"> |
| 1071 | 1071 | <h2><?php echo _("Busiest Time of the Day"); ?></h2> |
| 1072 | 1072 | <?php |
| 1073 | - $hour_array = $Tracker->countAllHours('hour',true); |
|
| 1073 | + $hour_array = $Tracker->countAllHours('hour', true); |
|
| 1074 | 1074 | if (empty($hour_array)) print _("No data available"); |
| 1075 | 1075 | else { |
| 1076 | 1076 | print '<div id="chart6" class="chart" width="100%"></div><script>'; |
| 1077 | 1077 | $hour_data = ''; |
| 1078 | 1078 | $hour_cnt = ''; |
| 1079 | - foreach($hour_array as $hour_item) |
|
| 1079 | + foreach ($hour_array as $hour_item) |
|
| 1080 | 1080 | { |
| 1081 | 1081 | $hour_data .= '"'.$hour_item['hour_name'].':00",'; |
| 1082 | 1082 | $hour_cnt .= $hour_item['hour_count'].','; |
| 1083 | 1083 | } |
| 1084 | 1084 | $hour_data = "[".substr($hour_data, 0, -1)."]"; |
| 1085 | - $hour_cnt = "['trackers',".substr($hour_cnt,0,-1)."]"; |
|
| 1085 | + $hour_cnt = "['trackers',".substr($hour_cnt, 0, -1)."]"; |
|
| 1086 | 1086 | print 'c3.generate({ |
| 1087 | 1087 | bindto: "#chart6", |
| 1088 | 1088 | data: { |
@@ -1095,7 +1095,7 @@ discard block |
||
| 1095 | 1095 | <a href="<?php print $globalURL; ?>/tracker/statistics/time" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1096 | 1096 | </div> |
| 1097 | 1097 | </div> |
| 1098 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1098 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1099 | 1099 | </div> |
| 1100 | 1100 | <?php |
| 1101 | 1101 | } |
@@ -1119,13 +1119,13 @@ discard block |
||
| 1119 | 1119 | print '<div id="chart32" class="chart" width="100%"></div><script>'; |
| 1120 | 1120 | $year_data = ''; |
| 1121 | 1121 | $year_cnt = ''; |
| 1122 | - foreach($year_array as $year_item) |
|
| 1122 | + foreach ($year_array as $year_item) |
|
| 1123 | 1123 | { |
| 1124 | 1124 | $year_data .= '"'.$year_item['year'].'-01-01",'; |
| 1125 | 1125 | $year_cnt .= $year_item['count'].','; |
| 1126 | 1126 | } |
| 1127 | 1127 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1128 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1128 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1129 | 1129 | print 'c3.generate({ |
| 1130 | 1130 | bindto: "#chart32", |
| 1131 | 1131 | data: { x: "x", |
@@ -1138,7 +1138,7 @@ discard block |
||
| 1138 | 1138 | <a href="<?php print $globalURL; ?>/statistics/fatalities/year" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1139 | 1139 | </div> |
| 1140 | 1140 | </div> |
| 1141 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1141 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1142 | 1142 | |
| 1143 | 1143 | <div class="row column"> |
| 1144 | 1144 | <div class="col-md-6"> |
@@ -1150,13 +1150,13 @@ discard block |
||
| 1150 | 1150 | print '<div id="chart33" class="chart" width="100%"></div><script>'; |
| 1151 | 1151 | $year_data = ''; |
| 1152 | 1152 | $year_cnt = ''; |
| 1153 | - foreach($year_array as $year_item) |
|
| 1153 | + foreach ($year_array as $year_item) |
|
| 1154 | 1154 | { |
| 1155 | 1155 | $year_data .= '"'.$year_item['year'].'-'.$year_item['month'].'-01",'; |
| 1156 | 1156 | $year_cnt .= $year_item['count'].','; |
| 1157 | 1157 | } |
| 1158 | 1158 | $year_data = "['x',".substr($year_data, 0, -1)."]"; |
| 1159 | - $year_cnt = "['flights',".substr($year_cnt,0,-1)."]"; |
|
| 1159 | + $year_cnt = "['flights',".substr($year_cnt, 0, -1)."]"; |
|
| 1160 | 1160 | print 'c3.generate({ |
| 1161 | 1161 | bindto: "#chart33", |
| 1162 | 1162 | data: { x: "x", |
@@ -1169,7 +1169,7 @@ discard block |
||
| 1169 | 1169 | <a href="<?php print $globalURL; ?>/statistics/fatalities/month" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
| 1170 | 1170 | </div> |
| 1171 | 1171 | </div> |
| 1172 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1172 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1173 | 1173 | <br/> |
| 1174 | 1174 | <?php |
| 1175 | 1175 | } |
@@ -1185,19 +1185,19 @@ discard block |
||
| 1185 | 1185 | //$polar = $Stats->getStatsSource(date('Y-m-d'),'polar'); |
| 1186 | 1186 | if ($year == '' && $month == '') { |
| 1187 | 1187 | if ($type == 'aircraft') { |
| 1188 | - $polar = $Stats->getStatsSource('polar',date('Y'),date('m'),date('d')); |
|
| 1188 | + $polar = $Stats->getStatsSource('polar', date('Y'), date('m'), date('d')); |
|
| 1189 | 1189 | } elseif ($type == 'marine') { |
| 1190 | - $polar = $Stats->getStatsSource('polar_marine',date('Y'),date('m'),date('d')); |
|
| 1190 | + $polar = $Stats->getStatsSource('polar_marine', date('Y'), date('m'), date('d')); |
|
| 1191 | 1191 | } elseif ($type == 'tracker') { |
| 1192 | - $polar = $Stats->getStatsSource('polar_tracker',date('Y'),date('m'),date('d')); |
|
| 1192 | + $polar = $Stats->getStatsSource('polar_tracker', date('Y'), date('m'), date('d')); |
|
| 1193 | 1193 | } |
| 1194 | 1194 | } else { |
| 1195 | 1195 | if ($type == 'aircraft') { |
| 1196 | - $polar = $Stats->getStatsSource('polar',$year,$month); |
|
| 1196 | + $polar = $Stats->getStatsSource('polar', $year, $month); |
|
| 1197 | 1197 | } elseif ($type == 'marine') { |
| 1198 | - $polar = $Stats->getStatsSource('polar_marine',$year,$month); |
|
| 1198 | + $polar = $Stats->getStatsSource('polar_marine', $year, $month); |
|
| 1199 | 1199 | } elseif ($type == 'tracker') { |
| 1200 | - $polar = $Stats->getStatsSource('polar_tracker',$year,$month); |
|
| 1200 | + $polar = $Stats->getStatsSource('polar_tracker', $year, $month); |
|
| 1201 | 1201 | } |
| 1202 | 1202 | } |
| 1203 | 1203 | if (!empty($polar)) { |
@@ -1206,7 +1206,7 @@ discard block |
||
| 1206 | 1206 | unset($polar_data); |
| 1207 | 1207 | $Spotter = new Spotter(); |
| 1208 | 1208 | $data = json_decode($eachpolar['source_data']); |
| 1209 | - foreach($data as $value => $key) { |
|
| 1209 | + foreach ($data as $value => $key) { |
|
| 1210 | 1210 | $direction = $Spotter->parseDirection(($value*22.5)); |
| 1211 | 1211 | $distance = $key; |
| 1212 | 1212 | $unit = 'km'; |
@@ -1226,7 +1226,7 @@ discard block |
||
| 1226 | 1226 | ?> |
| 1227 | 1227 | <div class="col-md-6"> |
| 1228 | 1228 | <h4><?php print $eachpolar['source_name']; ?></h4> |
| 1229 | - <div id="polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1229 | + <div id="polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>" class="chart" width="100%"></div> |
|
| 1230 | 1230 | <script> |
| 1231 | 1231 | (function() { |
| 1232 | 1232 | var margin = {top: 100, right: 100, bottom: 100, left: 100}, |
@@ -1250,7 +1250,7 @@ discard block |
||
| 1250 | 1250 | color: color, |
| 1251 | 1251 | unit: '<?php echo $unit; ?>' |
| 1252 | 1252 | }; |
| 1253 | - RadarChart("#polar-<?php print str_replace(' ','_',strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1253 | + RadarChart("#polar-<?php print str_replace(' ', '_', strtolower($eachpolar['source_name'])); ?>", data, radarChartOptions); |
|
| 1254 | 1254 | })(); |
| 1255 | 1255 | </script> |
| 1256 | 1256 | </div> |
@@ -1265,19 +1265,19 @@ discard block |
||
| 1265 | 1265 | //$msg = $Stats->getStatsSource(date('Y-m-d'),'msg'); |
| 1266 | 1266 | if ($year == '' && $month == '') { |
| 1267 | 1267 | if ($type == 'aircraft') { |
| 1268 | - $msg = $Stats->getStatsSource('msg',date('Y'),date('m'),date('d')); |
|
| 1268 | + $msg = $Stats->getStatsSource('msg', date('Y'), date('m'), date('d')); |
|
| 1269 | 1269 | } elseif ($type == 'marine') { |
| 1270 | - $msg = $Stats->getStatsSource('msg_marine',date('Y'),date('m'),date('d')); |
|
| 1270 | + $msg = $Stats->getStatsSource('msg_marine', date('Y'), date('m'), date('d')); |
|
| 1271 | 1271 | } elseif ($type == 'tracker') { |
| 1272 | - $msg = $Stats->getStatsSource('msg_tracker',date('Y'),date('m'),date('d')); |
|
| 1272 | + $msg = $Stats->getStatsSource('msg_tracker', date('Y'), date('m'), date('d')); |
|
| 1273 | 1273 | } |
| 1274 | 1274 | } else { |
| 1275 | 1275 | if ($type == 'aircraft') { |
| 1276 | - $msg = $Stats->getStatsSource('msg',$year,$month); |
|
| 1276 | + $msg = $Stats->getStatsSource('msg', $year, $month); |
|
| 1277 | 1277 | } elseif ($type == 'marine') { |
| 1278 | - $msg = $Stats->getStatsSource('msg_marine',$year,$month); |
|
| 1278 | + $msg = $Stats->getStatsSource('msg_marine', $year, $month); |
|
| 1279 | 1279 | } elseif ($type == 'tracker') { |
| 1280 | - $msg = $Stats->getStatsSource('msg_tracker',$year,$month); |
|
| 1280 | + $msg = $Stats->getStatsSource('msg_tracker', $year, $month); |
|
| 1281 | 1281 | } |
| 1282 | 1282 | } |
| 1283 | 1283 | if (!empty($msg)) { |
@@ -1285,13 +1285,13 @@ discard block |
||
| 1285 | 1285 | foreach ($msg as $eachmsg) { |
| 1286 | 1286 | //$eachmsg = $msg[0]; |
| 1287 | 1287 | $data = $eachmsg['source_data']; |
| 1288 | - if ($data > 500) $max = (round(($data+100)/100))*100; |
|
| 1288 | + if ($data > 500) $max = (round(($data + 100)/100))*100; |
|
| 1289 | 1289 | else $max = 500; |
| 1290 | 1290 | ?> |
| 1291 | - <div id="msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1291 | + <div id="msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>" class="col-md-4"></div> |
|
| 1292 | 1292 | <script> |
| 1293 | 1293 | var g = new JustGage({ |
| 1294 | - id: "msg-<?php print str_replace(' ','_',strtolower($eachmsg['source_name'])); ?>", |
|
| 1294 | + id: "msg-<?php print str_replace(' ', '_', strtolower($eachmsg['source_name'])); ?>", |
|
| 1295 | 1295 | value: <?php echo $data; ?>, |
| 1296 | 1296 | min: 0, |
| 1297 | 1297 | max: <?php print $max; ?>, |
@@ -1313,19 +1313,19 @@ discard block |
||
| 1313 | 1313 | //$hist = $Stats->getStatsSource(date('Y-m-d'),'hist'); |
| 1314 | 1314 | if ($year == '' && $month == '') { |
| 1315 | 1315 | if ($type == 'aircraft') { |
| 1316 | - $hist = $Stats->getStatsSource('hist',date('Y'),date('m'),date('d')); |
|
| 1316 | + $hist = $Stats->getStatsSource('hist', date('Y'), date('m'), date('d')); |
|
| 1317 | 1317 | } elseif ($type == 'marine') { |
| 1318 | - $hist = $Stats->getStatsSource('hist_marine',date('Y'),date('m'),date('d')); |
|
| 1318 | + $hist = $Stats->getStatsSource('hist_marine', date('Y'), date('m'), date('d')); |
|
| 1319 | 1319 | } elseif ($type == 'tracker') { |
| 1320 | - $hist = $Stats->getStatsSource('hist_tracker',date('Y'),date('m'),date('d')); |
|
| 1320 | + $hist = $Stats->getStatsSource('hist_tracker', date('Y'), date('m'), date('d')); |
|
| 1321 | 1321 | } |
| 1322 | 1322 | } else { |
| 1323 | 1323 | if ($type == 'aircraft') { |
| 1324 | - $hist = $Stats->getStatsSource('hist',$year,$month); |
|
| 1324 | + $hist = $Stats->getStatsSource('hist', $year, $month); |
|
| 1325 | 1325 | } elseif ($type == 'marine') { |
| 1326 | - $hist = $Stats->getStatsSource('hist_marine',$year,$month); |
|
| 1326 | + $hist = $Stats->getStatsSource('hist_marine', $year, $month); |
|
| 1327 | 1327 | } elseif ($type == 'tracker') { |
| 1328 | - $hist = $Stats->getStatsSource('hist_tracker',$year,$month); |
|
| 1328 | + $hist = $Stats->getStatsSource('hist_tracker', $year, $month); |
|
| 1329 | 1329 | } |
| 1330 | 1330 | } |
| 1331 | 1331 | foreach ($hist as $hists) { |
@@ -1335,7 +1335,7 @@ discard block |
||
| 1335 | 1335 | $source = $hists['source_name']; |
| 1336 | 1336 | $hist_array = json_decode($hists['source_data']); |
| 1337 | 1337 | $unit = 'km'; |
| 1338 | - foreach($hist_array as $distance => $nb) |
|
| 1338 | + foreach ($hist_array as $distance => $nb) |
|
| 1339 | 1339 | { |
| 1340 | 1340 | if ((!isset($_COOKIE['unitdistance']) && isset($globalUnitDistance) && $globalUnitDistance == 'nm') || (isset($_COOKIE['unitdistance']) && $_COOKIE['unitdistance'] == 'nm')) { |
| 1341 | 1341 | $distance = round($distance*0.539957); |
@@ -1356,18 +1356,18 @@ discard block |
||
| 1356 | 1356 | $nb_data = "['flights',".substr($nb_data, 0, -1)."]"; |
| 1357 | 1357 | ?> |
| 1358 | 1358 | <div class="col-md-6"> |
| 1359 | - <h2><?php echo sprintf(_("Distance for %s"),$source); ?></h2> |
|
| 1359 | + <h2><?php echo sprintf(_("Distance for %s"), $source); ?></h2> |
|
| 1360 | 1360 | <?php |
| 1361 | - print '<div id="charthist-'.str_replace(' ','_',strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1361 | + print '<div id="charthist-'.str_replace(' ', '_', strtolower($source)).'" class="chart" width="100%"></div><script>'; |
|
| 1362 | 1362 | print 'c3.generate({ |
| 1363 | - bindto: "#charthist-'.str_replace(' ','_',strtolower($source)).'", |
|
| 1363 | + bindto: "#charthist-'.str_replace(' ', '_', strtolower($source)).'", |
|
| 1364 | 1364 | data: { x: "x", |
| 1365 | 1365 | columns: ['.$distance_data.','.$nb_data.'], types: { flights: "area"}, colors: { flights: "#1a3151"}}, |
| 1366 | 1366 | axis: { x: {label : { text: "Distance in '.$unit.'", position: "outer-right"}}, y: { label: "# of Flights"}},legend: { show: false }});'; |
| 1367 | 1367 | print '</script>'; |
| 1368 | 1368 | ?> |
| 1369 | 1369 | </div> |
| 1370 | - <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
|
| 1370 | + <!-- <?php print 'Time elapsed : '.(microtime(true) - $beginpage).'s' ?> --> |
|
| 1371 | 1371 | <?php |
| 1372 | 1372 | } |
| 1373 | 1373 | ?> |