@@ -11,13 +11,13 @@ discard block |
||
11 | 11 | $Connection = new Connection(); |
12 | 12 | |
13 | 13 | if (!$Connection->tableExists('airspace')) { |
14 | - die; |
|
14 | + die; |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (isset($_GET['coord'])) |
18 | 18 | { |
19 | 19 | $coords = explode(',',$_GET['coord']); |
20 | - if ($globalDBdriver == 'mysql') { |
|
20 | + if ($globalDBdriver == 'mysql') { |
|
21 | 21 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace WHERE ST_Intersects(SHAPE, ST_Envelope(linestring(point(:minlon,:minlat), point(:maxlon,:maxlat))))"; |
22 | 22 | try { |
23 | 23 | $sth = $Connection->db->prepare($query); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | } else { |
40 | - if ($globalDBdriver == 'mysql') { |
|
40 | + if ($globalDBdriver == 'mysql') { |
|
41 | 41 | $query = "SELECT *, ST_AsWKB(SHAPE) AS wkb FROM airspace"; |
42 | 42 | } else { |
43 | 43 | $query = "SELECT *, ST_AsBinary(wkb_geometry,'NDR') AS wkb FROM airspace"; |
@@ -51,8 +51,8 @@ discard block |
||
51 | 51 | } |
52 | 52 | |
53 | 53 | $geojson = array( |
54 | - 'type' => 'FeatureCollection', |
|
55 | - 'features' => array() |
|
54 | + 'type' => 'FeatureCollection', |
|
55 | + 'features' => array() |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | while ($row = $sth->fetch(PDO::FETCH_ASSOC)) |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | } |
116 | 116 | if (isset($properties['type']) && $properties['type'] != '') { |
117 | 117 | $feature = array( |
118 | - 'type' => 'Feature', |
|
119 | - 'geometry' => json_decode($geom->out('json')), |
|
120 | - 'properties' => $properties |
|
118 | + 'type' => 'Feature', |
|
119 | + 'geometry' => json_decode($geom->out('json')), |
|
120 | + 'properties' => $properties |
|
121 | 121 | ); |
122 | 122 | array_push($geojson['features'], $feature); |
123 | 123 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // When button "Remove all filters" is clicked |
39 | 39 | if (isset($_POST['removefilters'])) { |
40 | 40 | $allfilters = array_filter(array_keys($_COOKIE),function($key) { |
41 | - return strpos($key,'filter_') === 0; |
|
41 | + return strpos($key,'filter_') === 0; |
|
42 | 42 | }); |
43 | 43 | foreach ($allfilters as $filt) { |
44 | 44 | unset($_COOKIE[$filt]); |
@@ -404,34 +404,34 @@ discard block |
||
404 | 404 | |
405 | 405 | <ul class="nav navbar-nav"> |
406 | 406 | <?php |
407 | - if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
407 | + if (isset($globalNewsFeeds['global']) && !empty($globalNewsFeeds['global'])) { |
|
408 | 408 | ?> |
409 | 409 | <li><a href="<?php print $globalURL; ?>/news"><?php echo _("News"); ?></a></li> |
410 | 410 | <?php |
411 | - } |
|
411 | + } |
|
412 | 412 | ?> |
413 | 413 | |
414 | 414 | <?php |
415 | - $sub = false; |
|
416 | - if ( |
|
415 | + $sub = false; |
|
416 | + if ( |
|
417 | 417 | ( |
418 | - (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
418 | + (!isset($globalAircraft) || (isset($globalAircraft) && $globalAircraft === TRUE)) && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
419 | 419 | ) || |
420 | 420 | ( |
421 | - isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
421 | + isset($globalMarine) && $globalMarine === TRUE && ((isset($globalTracker) && $globalTracker === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
422 | 422 | ) || |
423 | 423 | ( |
424 | - isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
424 | + isset($globalTracker) && $globalTracker === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalSatellite) && $globalSatellite === TRUE)) |
|
425 | 425 | ) || |
426 | 426 | ( |
427 | - isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
427 | + isset($globalSatellite) && $globalSatellite === TRUE && ((isset($globalMarine) && $globalMarine === TRUE) || (isset($globalTracker) && $globalTracker === TRUE)) |
|
428 | 428 | ) |
429 | - ) { |
|
429 | + ) { |
|
430 | 430 | $sub = true; |
431 | - } |
|
431 | + } |
|
432 | 432 | ?> |
433 | 433 | <?php |
434 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
434 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
435 | 435 | ?> |
436 | 436 | <li class="dropdown"> |
437 | 437 | <?php |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | <ul class="dropdown-menu multi-level"> |
443 | 443 | <li class="dropdown-submenu"> |
444 | 444 | <?php |
445 | - } |
|
445 | + } |
|
446 | 446 | ?> |
447 | 447 | <?php |
448 | 448 | if (isset($globalNewsFeeds['aircraft']) && !empty($globalNewsFeeds['aircraft'])) { |
@@ -457,25 +457,25 @@ discard block |
||
457 | 457 | <ul class="dropdown-menu"> |
458 | 458 | <li><a href="<?php print $globalURL; ?>/aircraft"><?php echo _("Aircraft Types"); ?></a></li> |
459 | 459 | <?php |
460 | - if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
460 | + if (!isset($globalNoAirlines) || $globalNoAirlines === FALSE) { |
|
461 | 461 | ?> |
462 | 462 | <li><a href="<?php print $globalURL; ?>/airline"><?php echo _("Airlines"); ?></a></li> |
463 | 463 | <?php |
464 | - } |
|
464 | + } |
|
465 | 465 | ?> |
466 | 466 | <li><a href="<?php print $globalURL; ?>/airport"><?php echo _("Airports"); ?></a></li> |
467 | 467 | <?php |
468 | - if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
468 | + if ((isset($globalUseOwner) && $globalUseOwner) || (!isset($globalUseOwner) && (!isset($globalVA) || !$globalVA) && (!isset($globalIVAO) || !$globalIVAO) && (!isset($globalVATSIM) || !$globalVATSIM) && (!isset($globalphpVMS) || !$globalphpVMS) && (!isset($globalVAM) || !$globalVAM))) { |
|
469 | 469 | ?> |
470 | 470 | <li><a href="<?php print $globalURL; ?>/owner"><?php echo _("Owners"); ?></a></li> |
471 | 471 | <?php |
472 | - } |
|
473 | - if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
472 | + } |
|
473 | + if ((isset($globalUsePilot) && $globalUsePilot) || !isset($globalUsePilot) && ((isset($globalVA) && $globalVA) || (isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM) || (isset($globalphpVMS) && $globalphpVMS) || (isset($globalVAM) && $globalVAM))) { |
|
474 | 474 | |
475 | 475 | ?> |
476 | 476 | <li><a href="<?php print $globalURL; ?>/pilot"><?php echo _("Pilots"); ?></a></li> |
477 | 477 | <?php |
478 | - } |
|
478 | + } |
|
479 | 479 | ?> |
480 | 480 | <li><hr /></li> |
481 | 481 | <li><a href="<?php print $globalURL; ?>/currently"><?php echo _("Current Activity"); ?></a></li> |
@@ -483,43 +483,43 @@ discard block |
||
483 | 483 | <li><a href="<?php print $globalURL; ?>/date/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Activity"); ?></a></li> |
484 | 484 | <li><a href="<?php print $globalURL; ?>/newest"><?php echo _("Newest by Category"); ?></a></li> |
485 | 485 | <?php |
486 | - if ($globalACARS) { |
|
487 | - if (isset($globalDemo) && $globalDemo) { |
|
488 | - ?> |
|
486 | + if ($globalACARS) { |
|
487 | + if (isset($globalDemo) && $globalDemo) { |
|
488 | + ?> |
|
489 | 489 | <li><hr /></li> |
490 | 490 | <li><i><?php echo _('ACARS data not available publicly'); ?></i></li> |
491 | 491 | <li><a href=""><?php echo _('Latest ACARS messages'); ?></a></li> |
492 | 492 | <li><a href=""><?php echo _('Archive ACARS messages'); ?></a></li> |
493 | 493 | <?php |
494 | - } else { |
|
495 | - ?> |
|
494 | + } else { |
|
495 | + ?> |
|
496 | 496 | <li><hr /></li> |
497 | 497 | <li><a href="<?php print $globalURL; ?>/acars-latest"><?php echo _("Latest ACARS messages"); ?></a></li> |
498 | 498 | <li><a href="<?php print $globalURL; ?>/acars-archive"><?php echo _("Archive ACARS messages"); ?></a></li> |
499 | 499 | <?php |
500 | - } |
|
501 | - } |
|
502 | - ?> |
|
500 | + } |
|
501 | + } |
|
502 | + ?> |
|
503 | 503 | <?php |
504 | - if (isset($globalAccidents) && $globalAccidents) { |
|
505 | - ?> |
|
504 | + if (isset($globalAccidents) && $globalAccidents) { |
|
505 | + ?> |
|
506 | 506 | <li><hr /></li> |
507 | 507 | <li><a href="<?php print $globalURL; ?>/accident-latest"><?php echo _("Latest accident"); ?></a></li> |
508 | 508 | <li><a href="<?php print $globalURL; ?>/accident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Accident"); ?></a></li> |
509 | 509 | <li><a href="<?php print $globalURL; ?>/incident-latest"><?php echo _("Latest incident"); ?></a></li> |
510 | 510 | <li><a href="<?php print $globalURL; ?>/incident/<?php print date("Y-m-d"); ?>"><?php echo _("Today's Incident"); ?></a></li> |
511 | 511 | <?php |
512 | - } |
|
513 | - ?> |
|
512 | + } |
|
513 | + ?> |
|
514 | 514 | <li><hr /></li> |
515 | 515 | <li><a href="<?php print $globalURL; ?>/highlights/table"><?php echo _("Special Highlights"); ?></a></li> |
516 | 516 | <?php |
517 | 517 | if (!isset($globalNoUpcoming) || $globalNoUpcoming === FALSE) { |
518 | - ?> |
|
518 | + ?> |
|
519 | 519 | <li><a href="<?php print $globalURL; ?>/upcoming"><?php echo _("Upcoming Flights"); ?></a></li> |
520 | 520 | <?php |
521 | 521 | } |
522 | - ?> |
|
522 | + ?> |
|
523 | 523 | </ul> |
524 | 524 | </li> |
525 | 525 | <li><a href="<?php print $globalURL; ?>/search"><?php echo _("Search"); ?></a></li> |
@@ -546,14 +546,14 @@ discard block |
||
546 | 546 | </ul> |
547 | 547 | <?php |
548 | 548 | } |
549 | - } |
|
549 | + } |
|
550 | 550 | ?> |
551 | 551 | <?php |
552 | - if (isset($globalMarine) && $globalMarine) { |
|
552 | + if (isset($globalMarine) && $globalMarine) { |
|
553 | 553 | ?> |
554 | 554 | <li class="dropdown"> |
555 | 555 | <?php |
556 | - if ($sub) { |
|
556 | + if ($sub) { |
|
557 | 557 | ?> |
558 | 558 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Marines"); ?> <b class="caret"></b></a> |
559 | 559 | <ul class="dropdown-menu multi-level"> |
@@ -587,14 +587,14 @@ discard block |
||
587 | 587 | } |
588 | 588 | ?> |
589 | 589 | <?php |
590 | - } |
|
590 | + } |
|
591 | 591 | ?> |
592 | 592 | <?php |
593 | - if (isset($globalTracker) && $globalTracker) { |
|
593 | + if (isset($globalTracker) && $globalTracker) { |
|
594 | 594 | ?> |
595 | 595 | <li class="dropdown"> |
596 | 596 | <?php |
597 | - if ($sub) { |
|
597 | + if ($sub) { |
|
598 | 598 | ?> |
599 | 599 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Trackers"); ?> <b class="caret"></b></a> |
600 | 600 | <ul class="dropdown-menu multi-level"> |
@@ -628,14 +628,14 @@ discard block |
||
628 | 628 | } |
629 | 629 | ?> |
630 | 630 | <?php |
631 | - } |
|
631 | + } |
|
632 | 632 | ?> |
633 | 633 | <?php |
634 | - if (isset($globalSatellite) && $globalSatellite) { |
|
634 | + if (isset($globalSatellite) && $globalSatellite) { |
|
635 | 635 | ?> |
636 | 636 | <li class="dropdown"> |
637 | 637 | <?php |
638 | - if ($sub) { |
|
638 | + if ($sub) { |
|
639 | 639 | ?> |
640 | 640 | <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo _("Satellites"); ?> <b class="caret"></b></a> |
641 | 641 | <ul class="dropdown-menu multi-level"> |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | } |
672 | 672 | ?> |
673 | 673 | <?php |
674 | - } |
|
674 | + } |
|
675 | 675 | ?> |
676 | 676 | |
677 | 677 | <li class="dropdown"> |
@@ -680,12 +680,12 @@ discard block |
||
680 | 680 | <li><a href="<?php print $globalURL; ?>/about"><?php echo _("About The Project"); ?></a></li> |
681 | 681 | <li><a href="<?php print $globalURL; ?>/about/export"><?php echo _("Exporting Data"); ?></a></li> |
682 | 682 | <?php |
683 | - if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
683 | + if (!isset($globalAircraft) || $globalAircraft === TRUE) { |
|
684 | 684 | ?> |
685 | 685 | <li><hr /></li> |
686 | 686 | <li><a href="<?php print $globalURL; ?>/about/tv"><?php echo _("Spotter TV"); ?></a></li> |
687 | 687 | <?php |
688 | - } |
|
688 | + } |
|
689 | 689 | ?> |
690 | 690 | <?php if (isset($globalContribute) && $globalContribute) { ?> |
691 | 691 | <li><hr /></li> |
@@ -709,13 +709,13 @@ discard block |
||
709 | 709 | <form> |
710 | 710 | <select class="selectpicker" data-width="120px" onchange="language(this);"> |
711 | 711 | <?php |
712 | - foreach ($alllang as $key => $lang) { |
|
713 | - print '<option value="'.$key.'"'; |
|
714 | - if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
715 | - if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
716 | - else print '>'.$lang[0].'</option>'; |
|
717 | - } |
|
718 | - ?> |
|
712 | + foreach ($alllang as $key => $lang) { |
|
713 | + print '<option value="'.$key.'"'; |
|
714 | + if (isset($_COOKIE['language']) && $_COOKIE['language'] == $key) print ' selected '; |
|
715 | + if ($lang[0] == 'Deutsch') print '>'.$lang[0].' (βeta)</option>'; |
|
716 | + else print '>'.$lang[0].'</option>'; |
|
717 | + } |
|
718 | + ?> |
|
719 | 719 | </select> |
720 | 720 | </form> |
721 | 721 | </div> |
@@ -748,18 +748,18 @@ discard block |
||
748 | 748 | ?> |
749 | 749 | <div class="top-header clear" role="main"> |
750 | 750 | <?php |
751 | - if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
751 | + if (isset($longitude) && isset($latitude) && $longitude != 0 && $latitude != 0) { |
|
752 | 752 | ?> |
753 | 753 | <div id="archive-map"></div> |
754 | 754 | <?php |
755 | - } |
|
755 | + } |
|
756 | 756 | ?> |
757 | 757 | </div> |
758 | 758 | <?php |
759 | 759 | } |
760 | 760 | 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)) |
761 | 761 | { |
762 | - ?> |
|
762 | + ?> |
|
763 | 763 | <div class="top-header clear" role="main"> |
764 | 764 | <div id="map"></div> |
765 | 765 | <link rel="stylesheet" href="<?php print $globalURL; ?>/css/leaflet.css" /> |
@@ -770,15 +770,15 @@ discard block |
||
770 | 770 | var zoom = 13; |
771 | 771 | //create the map |
772 | 772 | <?php |
773 | - if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
773 | + if (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($airport_array[0]['latitude'])) { |
|
774 | 774 | ?> |
775 | 775 | map = L.map('map', { zoomControl:true }).setView([<?php print $airport_array[0]['latitude']; ?>,<?php print $airport_array[0]['longitude']; ?>], zoom); |
776 | 776 | <?php |
777 | - } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
777 | + } elseif (strpos(strtolower($current_page),'airport-') !== false && strpos(strtolower($current_page),'statistics-') === false) { |
|
778 | 778 | ?> |
779 | 779 | map = L.map('map', { zoomControl:true }); |
780 | 780 | <?php |
781 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
781 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && isset($spotter_array[0]['departure_airport_latitude'])) { |
|
782 | 782 | ?> |
783 | 783 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['departure_airport_latitude']; ?>,<?php print $spotter_array[0]['arrival_airport_longitude']; ?>]); |
784 | 784 | 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); |
@@ -786,22 +786,22 @@ discard block |
||
786 | 786 | 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); |
787 | 787 | 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); |
788 | 788 | <?php |
789 | - } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
789 | + } elseif (strpos(strtolower($current_page),'route-') !== false && strpos(strtolower($current_page),'statistics-') === false && !isset($spotter_array[0]['departure_airport_latitude']) && isset($spotter_array[0]['latitude'])) { |
|
790 | 790 | ?> |
791 | 791 | map = L.map('map', { zoomControl:true }).setView([<?php print $spotter_array[0]['latitude']; ?>,<?php print $spotter_array[0]['longitude']; ?>]); |
792 | 792 | <?php |
793 | - } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
793 | + } elseif (!isset($spotter_array[0]['latitude']) && !isset($spotter_array[0]['longitude'])) { |
|
794 | 794 | ?> |
795 | 795 | map = L.map('map', { zoomControl:true }); |
796 | 796 | <?php |
797 | - } |
|
797 | + } |
|
798 | 798 | ?> |
799 | 799 | //initialize the layer group for the aircrft markers |
800 | 800 | var layer_data = L.layerGroup(); |
801 | 801 | |
802 | 802 | //a few title layers |
803 | 803 | <?php |
804 | - if ($globalMapProvider == 'Mapbox') { |
|
804 | + if ($globalMapProvider == 'Mapbox') { |
|
805 | 805 | ?> |
806 | 806 | L.tileLayer('https://{s}.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={token}', { |
807 | 807 | maxZoom: 18, |
@@ -812,14 +812,14 @@ discard block |
||
812 | 812 | token : '<?php print $globalMapboxToken; ?>' |
813 | 813 | }).addTo(map); |
814 | 814 | <?php |
815 | - } elseif ($globalMapProvider == 'Mapbox-GL') { |
|
815 | + } elseif ($globalMapProvider == 'Mapbox-GL') { |
|
816 | 816 | ?> |
817 | 817 | L.mapboxGL({ |
818 | 818 | accessToken: '<?php print $globalMapboxToken; ?>', |
819 | 819 | style: 'mapbox://styles/mapbox/bright-v8' |
820 | 820 | }).addTo(map); |
821 | 821 | <?php |
822 | - } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
822 | + } elseif ($globalMapProvider == 'MapQuest-OSM') { |
|
823 | 823 | ?> |
824 | 824 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.png', { |
825 | 825 | maxZoom: 18, |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | 'Tiles Courtesy of <a href="http://www.mapquest.com">MapQuest</a>' |
829 | 829 | }).addTo(map); |
830 | 830 | <?php |
831 | - } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
831 | + } elseif ($globalMapProvider == 'MapQuest-Aerial') { |
|
832 | 832 | ?> |
833 | 833 | L.tileLayer('http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png', { |
834 | 834 | maxZoom: 18, |
@@ -837,27 +837,27 @@ discard block |
||
837 | 837 | '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"' |
838 | 838 | }).addTo(map); |
839 | 839 | <?php |
840 | - } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
840 | + } elseif ($globalMapProvider == 'Google-Roadmap') { |
|
841 | 841 | ?> |
842 | 842 | var googleLayer = new L.Google('ROADMAP'); |
843 | 843 | map.addLayer(googleLayer); |
844 | 844 | <?php |
845 | - } elseif ($globalMapProvider == 'Google-Satellite') { |
|
845 | + } elseif ($globalMapProvider == 'Google-Satellite') { |
|
846 | 846 | ?> |
847 | 847 | var googleLayer = new L.Google('SATELLITE'); |
848 | 848 | map.addLayer(googleLayer); |
849 | 849 | <?php |
850 | - } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
850 | + } elseif ($globalMapProvider == 'Google-Hybrid') { |
|
851 | 851 | ?> |
852 | 852 | var googleLayer = new L.Google('HYBRID'); |
853 | 853 | map.addLayer(googleLayer); |
854 | 854 | <?php |
855 | - } elseif ($globalMapProvider == 'Google-Terrain') { |
|
855 | + } elseif ($globalMapProvider == 'Google-Terrain') { |
|
856 | 856 | ?> |
857 | 857 | var googleLayer = new L.Google('Terrain'); |
858 | 858 | map.addLayer(googleLayer); |
859 | 859 | <?php |
860 | - } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
860 | + } elseif (isset($globalMapCustomLayer[$globalMapProvider])) { |
|
861 | 861 | $customid = $globalMapProvider; |
862 | 862 | ?> |
863 | 863 | L.tileLayer('<?php print $globalMapCustomLayer[$customid]['url']; ?>/{z}/{x}/{y}.png', { |
@@ -867,7 +867,7 @@ discard block |
||
867 | 867 | attribution: '<?php print $globalMapCustomLayer[$customid]['attribution']; ?>' |
868 | 868 | }).addTo(map); |
869 | 869 | <?php |
870 | - } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) { |
|
870 | + } elseif ($globalMapProvider == 'offline' || (isset($globalMapOffline) && $globalMapOffline === TRUE)) { |
|
871 | 871 | ?> |
872 | 872 | var center = map.getCenter(); |
873 | 873 | map.options.crs = L.CRS.EPSG4326; |
@@ -882,8 +882,8 @@ discard block |
||
882 | 882 | attribution: 'Natural Earth' |
883 | 883 | }).addTo(map); |
884 | 884 | <?php |
885 | - //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
886 | - } else { |
|
885 | + //} elseif ($globalMapProvider == 'OpenStreetMap') { |
|
886 | + } else { |
|
887 | 887 | ?> |
888 | 888 | L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { |
889 | 889 | maxZoom: 18, |
@@ -892,7 +892,7 @@ discard block |
||
892 | 892 | }).addTo(map); |
893 | 893 | |
894 | 894 | <?php |
895 | - } |
|
895 | + } |
|
896 | 896 | ?> |
897 | 897 | </script> |
898 | 898 | </div> |
@@ -50,30 +50,30 @@ discard block |
||
50 | 50 | |
51 | 51 | |
52 | 52 | function quaternionrotate($heading, $attitude = 0, $bank = 0) { |
53 | - // Assuming the angles are in radians. |
|
54 | - $c1 = cos($heading/2); |
|
55 | - $s1 = sin($heading/2); |
|
56 | - $c2 = cos($attitude/2); |
|
57 | - $s2 = sin($attitude/2); |
|
58 | - $c3 = cos($bank/2); |
|
59 | - $s3 = sin($bank/2); |
|
60 | - $c1c2 = $c1*$c2; |
|
61 | - $s1s2 = $s1*$s2; |
|
62 | - $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | - $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | - $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | - $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | - return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
53 | + // Assuming the angles are in radians. |
|
54 | + $c1 = cos($heading/2); |
|
55 | + $s1 = sin($heading/2); |
|
56 | + $c2 = cos($attitude/2); |
|
57 | + $s2 = sin($attitude/2); |
|
58 | + $c3 = cos($bank/2); |
|
59 | + $s3 = sin($bank/2); |
|
60 | + $c1c2 = $c1*$c2; |
|
61 | + $s1s2 = $s1*$s2; |
|
62 | + $w =$c1c2*$c3 - $s1s2*$s3; |
|
63 | + $x =$c1c2*$s3 + $s1s2*$c3; |
|
64 | + $y =$s1*$c2*$c3 + $c1*$s2*$s3; |
|
65 | + $z =$c1*$s2*$c3 - $s1*$c2*$s3; |
|
66 | + return array('x' => $x,'y' => $y,'z' => $z,'w' => $w); |
|
67 | 67 | // return array('x' => '0.0','y' => '-0.931','z' => '0.0','w' => '0.365'); |
68 | 68 | |
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | 72 | if (isset($_GET['download'])) { |
73 | - if ($_GET['download'] == "true") |
|
74 | - { |
|
73 | + if ($_GET['download'] == "true") |
|
74 | + { |
|
75 | 75 | header('Content-disposition: attachment; filename="flightairmap.json"'); |
76 | - } |
|
76 | + } |
|
77 | 77 | } |
78 | 78 | header('Content-Type: text/javascript'); |
79 | 79 | |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
173 | 173 | $coord = explode(',',$_GET['coord']); |
174 | 174 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
175 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
175 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
176 | 176 | $coord = array(); |
177 | 177 | } |
178 | 178 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | if (isset($_GET['coord']) && $_GET['coord'] != '') { |
183 | 183 | $coord = explode(',',$_GET['coord']); |
184 | 184 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
185 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
185 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
186 | 186 | $coord = array(); |
187 | 187 | } |
188 | 188 | } |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (!((isset($_COOKIE['singlemodel']) && $_COOKIE['singlemodel'] == 'true') && (isset($_COOKIE['MapTrack']) && $_COOKIE['MapTrack'] != '')) && isset($_GET['coord']) && $_GET['coord'] != '') { |
193 | 193 | $coord = explode(',',$_GET['coord']); |
194 | 194 | if (!(filter_var($coord[0],FILTER_VALIDATE_FLOAT) && filter_var($coord[1],FILTER_VALIDATE_FLOAT) && filter_var($coord[2],FILTER_VALIDATE_FLOAT) && filter_var($coord[3],FILTER_VALIDATE_FLOAT) |
195 | - && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
195 | + && $coord[0] > -180.0 && $coord[0] < 180.0 && $coord[1] > -90.0 && $coord[1] < 90.0 && $coord[2] > -180.0 && $coord[2] < 180.0 && $coord[3] > -90.0 && $coord[3] < 90.0)) { |
|
196 | 196 | $coord = array(); |
197 | 197 | } |
198 | 198 | } |
@@ -301,10 +301,10 @@ discard block |
||
301 | 301 | $image = "images/placeholder_thumb.png"; |
302 | 302 | } |
303 | 303 | |
304 | - if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
305 | - elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
306 | - elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
307 | - if ($prev_flightaware_id != $id) { |
|
304 | + if (isset($spotter_item['flightaware_id'])) $id = $spotter_item['flightaware_id']; |
|
305 | + elseif (isset($spotter_item['famtrackid'])) $id = $spotter_item['famtrackid']; |
|
306 | + elseif (isset($spotter_item['fammarine_id'])) $id = $spotter_item['fammarine_id']; |
|
307 | + if ($prev_flightaware_id != $id) { |
|
308 | 308 | if ($prev_flightaware_id != '') { |
309 | 309 | /* |
310 | 310 | if ($nblatlong == 1) { |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | $spotter_item['wake_category'] = $aircraft_info[0]['wake_category']; |
385 | 385 | $spotter_item['engine_count'] = $aircraft_info[0]['engine_count']; |
386 | 386 | } else $aircraft_shadow = ''; |
387 | - $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
387 | + $output .= ' "billboard" : {"image" : "'.$globalURL.'/images/aircrafts/new/'.$aircraft_shadow.'","scale" : 0.5'; |
|
388 | 388 | if (isset($_COOKIE['IconColorForce']) && $_COOKIE['IconColorForce'] == 'true' && isset($_COOKIE['IconColor'])) { |
389 | 389 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
390 | 390 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
416 | 416 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
417 | 417 | } |
418 | - $output .= '},'; |
|
418 | + $output .= '},'; |
|
419 | 419 | } elseif (isset($modelsdb[$aircraft_icao]) && $aircraft_icao != '') { |
420 | 420 | $output .= '"model": {"gltf" : "'.$globalURL.'/models/'.$modelsdb[$aircraft_icao].'","scale" : '.$scale.',"minimumPixelSize": '.$minimumpixelsize.''; |
421 | 421 | $output .= ',"heightReference": "'.$heightrelative.'"'; |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | $rgb = $Common->hex2rgb($_COOKIE['IconColor']); |
424 | 424 | $output .= ',"color": {"rgba" : ['.$rgb[0].','.$rgb[1].','.$rgb[2].',255]}'; |
425 | 425 | } |
426 | - $output .= '},'; |
|
426 | + $output .= '},'; |
|
427 | 427 | } elseif ($aircraft_icao != '') { |
428 | 428 | $aircraft_info = $Spotter->getAllAircraftInfo($aircraft_icao); |
429 | 429 | if (isset($aircraft_info[0]['engine_type'])) { |
@@ -575,8 +575,8 @@ discard block |
||
575 | 575 | } |
576 | 576 | } |
577 | 577 | <?php |
578 | - } else { |
|
579 | - ?> |
|
578 | + } else { |
|
579 | + ?> |
|
580 | 580 | if (map.getZoom() > 7) { |
581 | 581 | var style = { |
582 | 582 | "color": "#1a3151", |
@@ -595,7 +595,7 @@ discard block |
||
595 | 595 | layer_tracker_data.addLayer(layer); |
596 | 596 | } |
597 | 597 | <?php |
598 | - } |
|
598 | + } |
|
599 | 599 | ?> |
600 | 600 | } |
601 | 601 | } |
@@ -740,11 +740,11 @@ discard block |
||
740 | 740 | $( document ).ready(function() { |
741 | 741 | map.on('moveend', function() { |
742 | 742 | <?php |
743 | - if (isset($globalMapUseBbox) && $globalMapUseBbox && (!isset($archive) || $archive === false)) { |
|
743 | + if (isset($globalMapUseBbox) && $globalMapUseBbox && (!isset($archive) || $archive === false)) { |
|
744 | 744 | ?> |
745 | 745 | getLiveTrackerData(1); |
746 | 746 | <?php |
747 | - } |
|
747 | + } |
|
748 | 748 | ?> |
749 | 749 | }); |
750 | 750 |
@@ -98,21 +98,21 @@ discard block |
||
98 | 98 | var entityid = entity.id; |
99 | 99 | var lastupdateentity = entity.properties.valueOf('lastupdate')._lastupdate._value; |
100 | 100 | <?php |
101 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
101 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
102 | 102 | ?> |
103 | 103 | if (lastupdateentity != lastupdatetracker) { |
104 | 104 | viewer.dataSources.get(dsn).entities.remove(entity); |
105 | 105 | czmldstracker.entities.removeById(entityid); |
106 | 106 | } |
107 | 107 | <?php |
108 | - } else { |
|
108 | + } else { |
|
109 | 109 | ?> |
110 | 110 | if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
111 | 111 | viewer.dataSources.get(dsn).entities.remove(entity); |
112 | 112 | czmldstracker.entities.removeById(entityid); |
113 | 113 | } |
114 | 114 | <?php |
115 | - } |
|
115 | + } |
|
116 | 116 | ?> |
117 | 117 | } |
118 | 118 | } |
@@ -145,15 +145,15 @@ discard block |
||
145 | 145 | function updateTrackerData() { |
146 | 146 | lastupdatetracker = Date.now(); |
147 | 147 | <?php |
148 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
148 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
149 | 149 | ?> |
150 | 150 | var livetrackerdata = czmldstracker.process('<?php print $globalURL; ?>/live-czml.php?tracker&coord='+bbox()+'&update=' + lastupdatetracker); |
151 | 151 | <?php |
152 | - } else { |
|
152 | + } else { |
|
153 | 153 | ?> |
154 | 154 | var livetrackerdata = czmldstracker.process('<?php print $globalURL; ?>/live-czml.php?tracker&update=' + lastupdatetracker); |
155 | 155 | <?php |
156 | - } |
|
156 | + } |
|
157 | 157 | ?> |
158 | 158 | livetrackerdata.then(function (data) { |
159 | 159 | displayTrackerData(data); |
@@ -209,13 +209,13 @@ discard block |
||
209 | 209 | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
210 | 210 | camera.moveEnd.addEventListener(function() { |
211 | 211 | <?php |
212 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
212 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
213 | 213 | ?> |
214 | 214 | if (typeof archive == 'undefined' || archive == false) { |
215 | 215 | updateTrackerData(); |
216 | 216 | } |
217 | 217 | <?php |
218 | - } |
|
218 | + } |
|
219 | 219 | ?> |
220 | 220 | }); |
221 | 221 |
@@ -289,8 +289,8 @@ discard block |
||
289 | 289 | var entityid = entity.id; |
290 | 290 | var lastupdateentity = entity.properties.lastupdate; |
291 | 291 | <?php |
292 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
293 | - // Remove flights not in latest CZML |
|
292 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
293 | + // Remove flights not in latest CZML |
|
294 | 294 | ?> |
295 | 295 | if (lastupdateentity != lastupdate) { |
296 | 296 | console.log('Remove...'); |
@@ -298,14 +298,14 @@ discard block |
||
298 | 298 | czmlds.entities.removeById(entityid); |
299 | 299 | } |
300 | 300 | <?php |
301 | - } else { |
|
301 | + } else { |
|
302 | 302 | ?> |
303 | 303 | if (parseInt(lastupdateentity) < Math.floor(Date.now()-<?php if (isset($globalMapRefresh)) print $globalMapRefresh*2000; else print '60000'; ?>)) { |
304 | 304 | viewer.dataSources.get(dsn).entities.remove(entity); |
305 | 305 | czmlds.entities.removeById(entityid); |
306 | 306 | } |
307 | 307 | <?php |
308 | - } |
|
308 | + } |
|
309 | 309 | ?> |
310 | 310 | } |
311 | 311 | } |
@@ -762,12 +762,12 @@ discard block |
||
762 | 762 | } |
763 | 763 | |
764 | 764 | <?php |
765 | - if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
765 | + if ((isset($globalIVAO) && $globalIVAO) || (isset($globalVATSIM) && $globalVATSIM)) { |
|
766 | 766 | ?> |
767 | 767 | update_atcLayer(); |
768 | 768 | setInterval(function(){update_atcLayer()},<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
769 | 769 | <?php |
770 | - } |
|
770 | + } |
|
771 | 771 | ?> |
772 | 772 | |
773 | 773 | function iconColor(color) { |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | }; |
386 | 386 | |
387 | 387 | <?php |
388 | - if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
388 | + if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
389 | 389 | ?> |
390 | 390 | function tskPopup (feature, layer) { |
391 | 391 | var output = ''; |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | }; |
421 | 421 | update_tsk(); |
422 | 422 | <?php |
423 | - } |
|
423 | + } |
|
424 | 424 | ?> |
425 | 425 | map.on('moveend', function() { |
426 | 426 | if (map.hasLayer(locationsLayer) == true) { |
@@ -434,10 +434,10 @@ discard block |
||
434 | 434 | setInterval(function(){if (noTimeout) { map.removeLayer(locationsLayer); update_locationsLayer();} },<?php if (isset($globalMapRefresh)) print $globalMapRefresh*1000*2; else print '60000'; ?>); |
435 | 435 | } |
436 | 436 | <?php |
437 | - // Add support for custom json via $globalMapJson |
|
438 | - if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
437 | + // Add support for custom json via $globalMapJson |
|
438 | + if (isset($globalMapJson) && is_array($globalMapJson)) { |
|
439 | 439 | foreach ($globalMapJson as $json) { |
440 | - if (isset($json['url'])) { |
|
440 | + if (isset($json['url'])) { |
|
441 | 441 | ?> |
442 | 442 | update_genLayer('<?php print $json['url']; ?>'); |
443 | 443 | <?php |
@@ -446,9 +446,9 @@ discard block |
||
446 | 446 | setInterval(function(){if (noTimeout) update_genLayer('<?php print $json['url']; ?>')}, <?php print $json['refresh']; ?>); |
447 | 447 | <?php |
448 | 448 | } |
449 | - } |
|
449 | + } |
|
450 | + } |
|
450 | 451 | } |
451 | - } |
|
452 | 452 | |
453 | 453 | ?> |
454 | 454 | //adds the bootstrap tooltip to the map icons |
@@ -10,10 +10,10 @@ discard block |
||
10 | 10 | } |
11 | 11 | |
12 | 12 | /** |
13 | - * Get SQL query part for filter used |
|
14 | - * @param Array $filter the filter |
|
15 | - * @return Array the SQL part |
|
16 | - */ |
|
13 | + * Get SQL query part for filter used |
|
14 | + * @param Array $filter the filter |
|
15 | + * @return Array the SQL part |
|
16 | + */ |
|
17 | 17 | public function getFilter($filter = array(),$where = false,$and = false) { |
18 | 18 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
19 | 19 | $filters = array(); |
@@ -159,11 +159,11 @@ discard block |
||
159 | 159 | |
160 | 160 | |
161 | 161 | /** |
162 | - * Gets all the spotter information based on a particular callsign |
|
163 | - * |
|
164 | - * @return Array the spotter information |
|
165 | - * |
|
166 | - */ |
|
162 | + * Gets all the spotter information based on a particular callsign |
|
163 | + * |
|
164 | + * @return Array the spotter information |
|
165 | + * |
|
166 | + */ |
|
167 | 167 | public function getLastArchiveSpotterDataByIdent($ident) { |
168 | 168 | $Spotter = new Spotter($this->db); |
169 | 169 | date_default_timezone_set('UTC'); |
@@ -179,11 +179,11 @@ discard block |
||
179 | 179 | |
180 | 180 | |
181 | 181 | /** |
182 | - * Gets last the spotter information based on a particular id |
|
183 | - * |
|
184 | - * @return Array the spotter information |
|
185 | - * |
|
186 | - */ |
|
182 | + * Gets last the spotter information based on a particular id |
|
183 | + * |
|
184 | + * @return Array the spotter information |
|
185 | + * |
|
186 | + */ |
|
187 | 187 | public function getLastArchiveSpotterDataById($id) { |
188 | 188 | $Spotter = new Spotter($this->db); |
189 | 189 | date_default_timezone_set('UTC'); |
@@ -209,11 +209,11 @@ discard block |
||
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
212 | - * Gets all the spotter information based on a particular id |
|
213 | - * |
|
214 | - * @return Array the spotter information |
|
215 | - * |
|
216 | - */ |
|
212 | + * Gets all the spotter information based on a particular id |
|
213 | + * |
|
214 | + * @return Array the spotter information |
|
215 | + * |
|
216 | + */ |
|
217 | 217 | public function getAllArchiveSpotterDataById($id) { |
218 | 218 | date_default_timezone_set('UTC'); |
219 | 219 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
@@ -234,11 +234,11 @@ discard block |
||
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
237 | - * Gets coordinate & time spotter information based on a particular id |
|
238 | - * |
|
239 | - * @return Array the spotter information |
|
240 | - * |
|
241 | - */ |
|
237 | + * Gets coordinate & time spotter information based on a particular id |
|
238 | + * |
|
239 | + * @return Array the spotter information |
|
240 | + * |
|
241 | + */ |
|
242 | 242 | public function getCoordArchiveSpotterDataById($id) { |
243 | 243 | date_default_timezone_set('UTC'); |
244 | 244 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
@@ -255,11 +255,11 @@ discard block |
||
255 | 255 | } |
256 | 256 | |
257 | 257 | /** |
258 | - * Gets coordinate & time spotter information based on a particular id |
|
259 | - * |
|
260 | - * @return Array the spotter information |
|
261 | - * |
|
262 | - */ |
|
258 | + * Gets coordinate & time spotter information based on a particular id |
|
259 | + * |
|
260 | + * @return Array the spotter information |
|
261 | + * |
|
262 | + */ |
|
263 | 263 | public function getCoordArchiveSpotterDataByIdDate($id,$begindate,$enddate) { |
264 | 264 | date_default_timezone_set('UTC'); |
265 | 265 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
@@ -277,11 +277,11 @@ discard block |
||
277 | 277 | |
278 | 278 | |
279 | 279 | /** |
280 | - * Gets altitude information based on a particular callsign |
|
281 | - * |
|
282 | - * @return Array the spotter information |
|
283 | - * |
|
284 | - */ |
|
280 | + * Gets altitude information based on a particular callsign |
|
281 | + * |
|
282 | + * @return Array the spotter information |
|
283 | + * |
|
284 | + */ |
|
285 | 285 | public function getAltitudeArchiveSpotterDataByIdent($ident) { |
286 | 286 | |
287 | 287 | date_default_timezone_set('UTC'); |
@@ -302,11 +302,11 @@ discard block |
||
302 | 302 | } |
303 | 303 | |
304 | 304 | /** |
305 | - * Gets altitude information based on a particular id |
|
306 | - * |
|
307 | - * @return Array the spotter information |
|
308 | - * |
|
309 | - */ |
|
305 | + * Gets altitude information based on a particular id |
|
306 | + * |
|
307 | + * @return Array the spotter information |
|
308 | + * |
|
309 | + */ |
|
310 | 310 | public function getAltitudeArchiveSpotterDataById($id) { |
311 | 311 | |
312 | 312 | date_default_timezone_set('UTC'); |
@@ -327,11 +327,11 @@ discard block |
||
327 | 327 | } |
328 | 328 | |
329 | 329 | /** |
330 | - * Gets altitude & speed information based on a particular id |
|
331 | - * |
|
332 | - * @return Array the spotter information |
|
333 | - * |
|
334 | - */ |
|
330 | + * Gets altitude & speed information based on a particular id |
|
331 | + * |
|
332 | + * @return Array the spotter information |
|
333 | + * |
|
334 | + */ |
|
335 | 335 | public function getAltitudeSpeedArchiveSpotterDataById($id) { |
336 | 336 | date_default_timezone_set('UTC'); |
337 | 337 | $id = filter_var($id, FILTER_SANITIZE_STRING); |
@@ -348,11 +348,11 @@ discard block |
||
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
351 | - * Gets altitude information based on a particular callsign |
|
352 | - * |
|
353 | - * @return Array the spotter information |
|
354 | - * |
|
355 | - */ |
|
351 | + * Gets altitude information based on a particular callsign |
|
352 | + * |
|
353 | + * @return Array the spotter information |
|
354 | + * |
|
355 | + */ |
|
356 | 356 | public function getLastAltitudeArchiveSpotterDataByIdent($ident) { |
357 | 357 | date_default_timezone_set('UTC'); |
358 | 358 | $ident = filter_var($ident, FILTER_SANITIZE_STRING); |
@@ -402,11 +402,11 @@ discard block |
||
402 | 402 | } |
403 | 403 | |
404 | 404 | /** |
405 | - * Gets Minimal Live Spotter data |
|
406 | - * |
|
407 | - * @return Array the spotter information |
|
408 | - * |
|
409 | - */ |
|
405 | + * Gets Minimal Live Spotter data |
|
406 | + * |
|
407 | + * @return Array the spotter information |
|
408 | + * |
|
409 | + */ |
|
410 | 410 | public function getMinLiveSpotterData($begindate,$enddate,$filter = array(),$part = 0) { |
411 | 411 | global $globalDBdriver, $globalLiveInterval; |
412 | 412 | date_default_timezone_set('UTC'); |
@@ -466,11 +466,11 @@ discard block |
||
466 | 466 | } |
467 | 467 | |
468 | 468 | /** |
469 | - * Gets Minimal Live Spotter data |
|
470 | - * |
|
471 | - * @return Array the spotter information |
|
472 | - * |
|
473 | - */ |
|
469 | + * Gets Minimal Live Spotter data |
|
470 | + * |
|
471 | + * @return Array the spotter information |
|
472 | + * |
|
473 | + */ |
|
474 | 474 | public function getMinLiveSpotterDataPlayback($begindate,$enddate,$filter = array()) { |
475 | 475 | global $globalDBdriver, $globalLiveInterval; |
476 | 476 | date_default_timezone_set('UTC'); |
@@ -537,11 +537,11 @@ discard block |
||
537 | 537 | } |
538 | 538 | |
539 | 539 | /** |
540 | - * Gets count Live Spotter data |
|
541 | - * |
|
542 | - * @return Array the spotter information |
|
543 | - * |
|
544 | - */ |
|
540 | + * Gets count Live Spotter data |
|
541 | + * |
|
542 | + * @return Array the spotter information |
|
543 | + * |
|
544 | + */ |
|
545 | 545 | public function getLiveSpotterCount($begindate,$enddate,$filter = array()) { |
546 | 546 | global $globalDBdriver, $globalLiveInterval; |
547 | 547 | date_default_timezone_set('UTC'); |
@@ -587,11 +587,11 @@ discard block |
||
587 | 587 | // Spotter_Archive_output |
588 | 588 | |
589 | 589 | /** |
590 | - * Gets all the spotter information |
|
591 | - * |
|
592 | - * @return Array the spotter information |
|
593 | - * |
|
594 | - */ |
|
590 | + * Gets all the spotter information |
|
591 | + * |
|
592 | + * @return Array the spotter information |
|
593 | + * |
|
594 | + */ |
|
595 | 595 | public function searchSpotterData($q = '', $registration = '', $aircraft_icao = '', $aircraft_manufacturer = '', $highlights = '', $airline_icao = '', $airline_country = '', $airline_type = '', $airport = '', $airport_country = '', $callsign = '', $departure_airport_route = '', $arrival_airport_route = '', $owner = '',$pilot_id = '',$pilot_name = '',$altitude = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '', $filters=array()) { |
596 | 596 | global $globalTimezone, $globalDBdriver; |
597 | 597 | require_once(dirname(__FILE__).'/class.Translation.php'); |
@@ -883,11 +883,11 @@ discard block |
||
883 | 883 | } |
884 | 884 | |
885 | 885 | /** |
886 | - * Gets all the spotter information based on the callsign |
|
887 | - * |
|
888 | - * @return Array the spotter information |
|
889 | - * |
|
890 | - */ |
|
886 | + * Gets all the spotter information based on the callsign |
|
887 | + * |
|
888 | + * @return Array the spotter information |
|
889 | + * |
|
890 | + */ |
|
891 | 891 | public function getSpotterDataByIdent($ident = '', $limit = '', $sort = '') { |
892 | 892 | $global_query = "SELECT spotter_archive_output.* FROM spotter_archive_output"; |
893 | 893 | |
@@ -935,11 +935,11 @@ discard block |
||
935 | 935 | |
936 | 936 | |
937 | 937 | /** |
938 | - * Gets all the spotter information based on the owner |
|
939 | - * |
|
940 | - * @return Array the spotter information |
|
941 | - * |
|
942 | - */ |
|
938 | + * Gets all the spotter information based on the owner |
|
939 | + * |
|
940 | + * @return Array the spotter information |
|
941 | + * |
|
942 | + */ |
|
943 | 943 | public function getSpotterDataByOwner($owner = '', $limit = '', $sort = '', $filter = array()) { |
944 | 944 | $global_query = "SELECT spotter_archive_output.* FROM spotter_archive_output"; |
945 | 945 | |
@@ -987,11 +987,11 @@ discard block |
||
987 | 987 | } |
988 | 988 | |
989 | 989 | /** |
990 | - * Gets all the spotter information based on the pilot |
|
991 | - * |
|
992 | - * @return Array the spotter information |
|
993 | - * |
|
994 | - */ |
|
990 | + * Gets all the spotter information based on the pilot |
|
991 | + * |
|
992 | + * @return Array the spotter information |
|
993 | + * |
|
994 | + */ |
|
995 | 995 | public function getSpotterDataByPilot($pilot = '', $limit = '', $sort = '', $filter = array()) { |
996 | 996 | $global_query = "SELECT spotter_archive_output.* FROM spotter_archive_output"; |
997 | 997 | |
@@ -1035,11 +1035,11 @@ discard block |
||
1035 | 1035 | } |
1036 | 1036 | |
1037 | 1037 | /** |
1038 | - * Gets all number of flight over countries |
|
1039 | - * |
|
1040 | - * @return Array the airline country list |
|
1041 | - * |
|
1042 | - */ |
|
1038 | + * Gets all number of flight over countries |
|
1039 | + * |
|
1040 | + * @return Array the airline country list |
|
1041 | + * |
|
1042 | + */ |
|
1043 | 1043 | public function countAllFlightOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '') { |
1044 | 1044 | global $globalDBdriver; |
1045 | 1045 | /* |
@@ -1079,11 +1079,11 @@ discard block |
||
1079 | 1079 | } |
1080 | 1080 | |
1081 | 1081 | /** |
1082 | - * Gets all number of flight over countries |
|
1083 | - * |
|
1084 | - * @return Array the airline country list |
|
1085 | - * |
|
1086 | - */ |
|
1082 | + * Gets all number of flight over countries |
|
1083 | + * |
|
1084 | + * @return Array the airline country list |
|
1085 | + * |
|
1086 | + */ |
|
1087 | 1087 | public function countAllFlightOverCountriesByAirlines($limit = true,$olderthanmonths = 0,$sincedate = '') { |
1088 | 1088 | global $globalDBdriver; |
1089 | 1089 | /* |
@@ -1124,11 +1124,11 @@ discard block |
||
1124 | 1124 | } |
1125 | 1125 | |
1126 | 1126 | /** |
1127 | - * Gets last spotter information based on a particular callsign |
|
1128 | - * |
|
1129 | - * @return Array the spotter information |
|
1130 | - * |
|
1131 | - */ |
|
1127 | + * Gets last spotter information based on a particular callsign |
|
1128 | + * |
|
1129 | + * @return Array the spotter information |
|
1130 | + * |
|
1131 | + */ |
|
1132 | 1132 | public function getDateArchiveSpotterDataById($id,$date) { |
1133 | 1133 | $Spotter = new Spotter($this->db); |
1134 | 1134 | date_default_timezone_set('UTC'); |
@@ -1140,11 +1140,11 @@ discard block |
||
1140 | 1140 | } |
1141 | 1141 | |
1142 | 1142 | /** |
1143 | - * Gets all the spotter information based on a particular callsign |
|
1144 | - * |
|
1145 | - * @return Array the spotter information |
|
1146 | - * |
|
1147 | - */ |
|
1143 | + * Gets all the spotter information based on a particular callsign |
|
1144 | + * |
|
1145 | + * @return Array the spotter information |
|
1146 | + * |
|
1147 | + */ |
|
1148 | 1148 | public function getDateArchiveSpotterDataByIdent($ident,$date) { |
1149 | 1149 | $Spotter = new Spotter($this->db); |
1150 | 1150 | date_default_timezone_set('UTC'); |
@@ -1156,11 +1156,11 @@ discard block |
||
1156 | 1156 | } |
1157 | 1157 | |
1158 | 1158 | /** |
1159 | - * Gets all the spotter information based on the airport |
|
1160 | - * |
|
1161 | - * @return Array the spotter information |
|
1162 | - * |
|
1163 | - */ |
|
1159 | + * Gets all the spotter information based on the airport |
|
1160 | + * |
|
1161 | + * @return Array the spotter information |
|
1162 | + * |
|
1163 | + */ |
|
1164 | 1164 | public function getSpotterDataByAirport($airport = '', $limit = '', $sort = '',$filters = array()) { |
1165 | 1165 | global $global_query; |
1166 | 1166 | $Spotter = new Spotter($this->db); |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | print '<div class="details">'; |
79 | 79 | print '<div><span>'._("Altitude").'</span>'; |
80 | 80 | if (isset($globalGroundAltitude) && $globalGroundAltitude) { |
81 | - try { |
|
81 | + try { |
|
82 | 82 | $groundAltitude = $Elevation->getElevation($spotter_item['latitude'],$spotter_item['longitude']); |
83 | - } catch(Exception $e) { |
|
84 | - } |
|
83 | + } catch(Exception $e) { |
|
84 | + } |
|
85 | 85 | } |
86 | 86 | print '<span class="altitude">'; |
87 | 87 | if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
@@ -91,17 +91,17 @@ discard block |
||
91 | 91 | } |
92 | 92 | print '</span>'; |
93 | 93 | if (isset($groundAltitude) && $groundAltitude < $spotter_item['altitude']*0.3048) { |
94 | - print '<br>'; |
|
95 | - print '<span>'._("Ground Altitude").'</span>'; |
|
96 | - print '<i>'; |
|
97 | - print '<span class="groundaltitude">'; |
|
98 | - if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
94 | + print '<br>'; |
|
95 | + print '<span>'._("Ground Altitude").'</span>'; |
|
96 | + print '<i>'; |
|
97 | + print '<span class="groundaltitude">'; |
|
98 | + if ((!isset($_COOKIE['unitaltitude']) && isset($globalUnitAltitude) && $globalUnitAltitude == 'feet') || (isset($_COOKIE['unitaltitude']) && $_COOKIE['unitaltitude'] == 'feet')) { |
|
99 | 99 | print round($groundAltitude*3.28084).' feet'; |
100 | - } else { |
|
100 | + } else { |
|
101 | 101 | print round($groundAltitude).' m'; |
102 | - } |
|
103 | - print '</span>'; |
|
104 | - print '</i>'; |
|
102 | + } |
|
103 | + print '</span>'; |
|
104 | + print '</i>'; |
|
105 | 105 | } |
106 | 106 | print '</div>'; |
107 | 107 | print '<div><span>'._("Speed").'</span>'; |