@@ -12,10 +12,10 @@ discard block |
||
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | /** |
| 15 | - * Get SQL query part for filter used |
|
| 16 | - * @param Array $filter the filter |
|
| 17 | - * @return Array the SQL part |
|
| 18 | - */ |
|
| 15 | + * Get SQL query part for filter used |
|
| 16 | + * @param Array $filter the filter |
|
| 17 | + * @return Array the SQL part |
|
| 18 | + */ |
|
| 19 | 19 | |
| 20 | 20 | public function getFilter($filter = array(),$where = false,$and = false) { |
| 21 | 21 | global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver; |
@@ -82,14 +82,14 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | - * Executes the SQL statements to get the spotter information |
|
| 86 | - * |
|
| 87 | - * @param String $query the SQL query |
|
| 88 | - * @param Array $params parameter of the query |
|
| 89 | - * @param String $limitQuery the limit query |
|
| 90 | - * @return Array the spotter information |
|
| 91 | - * |
|
| 92 | - */ |
|
| 85 | + * Executes the SQL statements to get the spotter information |
|
| 86 | + * |
|
| 87 | + * @param String $query the SQL query |
|
| 88 | + * @param Array $params parameter of the query |
|
| 89 | + * @param String $limitQuery the limit query |
|
| 90 | + * @return Array the spotter information |
|
| 91 | + * |
|
| 92 | + */ |
|
| 93 | 93 | public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false) |
| 94 | 94 | { |
| 95 | 95 | date_default_timezone_set('UTC'); |
@@ -217,11 +217,11 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | |
| 219 | 219 | /** |
| 220 | - * Gets all the spotter information based on the latest data entry |
|
| 221 | - * |
|
| 222 | - * @return Array the spotter information |
|
| 223 | - * |
|
| 224 | - */ |
|
| 220 | + * Gets all the spotter information based on the latest data entry |
|
| 221 | + * |
|
| 222 | + * @return Array the spotter information |
|
| 223 | + * |
|
| 224 | + */ |
|
| 225 | 225 | public function getLatestMarineData($limit = '', $sort = '', $filter = array()) |
| 226 | 226 | { |
| 227 | 227 | global $global_query; |
@@ -270,11 +270,11 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | /** |
| 273 | - * Gets all the spotter information based on the callsign |
|
| 274 | - * |
|
| 275 | - * @return Array the spotter information |
|
| 276 | - * |
|
| 277 | - */ |
|
| 273 | + * Gets all the spotter information based on the callsign |
|
| 274 | + * |
|
| 275 | + * @return Array the spotter information |
|
| 276 | + * |
|
| 277 | + */ |
|
| 278 | 278 | public function getMarineDataByIdent($ident = '', $limit = '', $sort = '', $filter = array()) |
| 279 | 279 | { |
| 280 | 280 | global $global_query; |
@@ -385,12 +385,12 @@ discard block |
||
| 385 | 385 | |
| 386 | 386 | |
| 387 | 387 | /** |
| 388 | - * Gets all source name |
|
| 389 | - * |
|
| 390 | - * @param String type format of source |
|
| 391 | - * @return Array list of source name |
|
| 392 | - * |
|
| 393 | - */ |
|
| 388 | + * Gets all source name |
|
| 389 | + * |
|
| 390 | + * @param String type format of source |
|
| 391 | + * @return Array list of source name |
|
| 392 | + * |
|
| 393 | + */ |
|
| 394 | 394 | public function getAllSourceName($type = '',$filters = array()) |
| 395 | 395 | { |
| 396 | 396 | $filter_query = $this->getFilter($filters,true,true); |
@@ -420,11 +420,11 @@ discard block |
||
| 420 | 420 | |
| 421 | 421 | |
| 422 | 422 | /** |
| 423 | - * Gets a list of all idents/callsigns |
|
| 424 | - * |
|
| 425 | - * @return Array list of ident/callsign names |
|
| 426 | - * |
|
| 427 | - */ |
|
| 423 | + * Gets a list of all idents/callsigns |
|
| 424 | + * |
|
| 425 | + * @return Array list of ident/callsign names |
|
| 426 | + * |
|
| 427 | + */ |
|
| 428 | 428 | public function getAllIdents($filters = array()) |
| 429 | 429 | { |
| 430 | 430 | $filter_query = $this->getFilter($filters,true,true); |
@@ -448,11 +448,11 @@ discard block |
||
| 448 | 448 | } |
| 449 | 449 | |
| 450 | 450 | /** |
| 451 | - * Gets all info from a mmsi |
|
| 452 | - * |
|
| 453 | - * @return Array ident |
|
| 454 | - * |
|
| 455 | - */ |
|
| 451 | + * Gets all info from a mmsi |
|
| 452 | + * |
|
| 453 | + * @return Array ident |
|
| 454 | + * |
|
| 455 | + */ |
|
| 456 | 456 | public function getIdentity($mmsi) |
| 457 | 457 | { |
| 458 | 458 | $mmsi = filter_var($mmsi,FILTER_SANITIZE_NUMBER_INT); |
@@ -465,9 +465,9 @@ discard block |
||
| 465 | 465 | } |
| 466 | 466 | |
| 467 | 467 | /** |
| 468 | - * Add identity |
|
| 469 | - * |
|
| 470 | - */ |
|
| 468 | + * Add identity |
|
| 469 | + * |
|
| 470 | + */ |
|
| 471 | 471 | public function addIdentity($mmsi,$imo,$ident,$callsign,$type) |
| 472 | 472 | { |
| 473 | 473 | $mmsi = filter_var($mmsi,FILTER_SANITIZE_NUMBER_INT); |
@@ -533,13 +533,13 @@ discard block |
||
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | /** |
| 536 | - * Update ident tracker data |
|
| 537 | - * |
|
| 538 | - * @param String $fammarine_id the ID |
|
| 539 | - * @param String $ident the marine ident |
|
| 540 | - * @return String success or false |
|
| 541 | - * |
|
| 542 | - */ |
|
| 536 | + * Update ident tracker data |
|
| 537 | + * |
|
| 538 | + * @param String $fammarine_id the ID |
|
| 539 | + * @param String $ident the marine ident |
|
| 540 | + * @return String success or false |
|
| 541 | + * |
|
| 542 | + */ |
|
| 543 | 543 | public function updateIdentMarineData($fammarine_id = '', $ident = '',$fromsource = NULL) |
| 544 | 544 | { |
| 545 | 545 | $query = 'UPDATE marine_output SET ident = :ident WHERE fammarine_id = :fammarine_id'; |
@@ -554,19 +554,19 @@ discard block |
||
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | /** |
| 557 | - * Update Status data |
|
| 558 | - * |
|
| 559 | - * @param String $fammarine_id the ID |
|
| 560 | - * @param String $status_id the marine status id |
|
| 561 | - * @param String $status the marine status |
|
| 562 | - * @return String success or false |
|
| 563 | - * |
|
| 564 | - */ |
|
| 557 | + * Update Status data |
|
| 558 | + * |
|
| 559 | + * @param String $fammarine_id the ID |
|
| 560 | + * @param String $status_id the marine status id |
|
| 561 | + * @param String $status the marine status |
|
| 562 | + * @return String success or false |
|
| 563 | + * |
|
| 564 | + */ |
|
| 565 | 565 | public function updateStatusMarineData($fammarine_id = '', $status_id = '',$status = '') |
| 566 | 566 | { |
| 567 | 567 | |
| 568 | 568 | $query = 'UPDATE marine_output SET status = :status, status_id = :status_id WHERE fammarine_id = :fammarine_id'; |
| 569 | - $query_values = array(':fammarine_id' => $fammarine_id,':status' => $status,':status_id' => $status_id); |
|
| 569 | + $query_values = array(':fammarine_id' => $fammarine_id,':status' => $status,':status_id' => $status_id); |
|
| 570 | 570 | |
| 571 | 571 | try { |
| 572 | 572 | $sth = $this->db->prepare($query); |
@@ -579,17 +579,17 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | } |
| 581 | 581 | /** |
| 582 | - * Update latest marine data |
|
| 583 | - * |
|
| 584 | - * @param String $fammarine_id the ID |
|
| 585 | - * @param String $ident the marine ident |
|
| 586 | - * @return String success or false |
|
| 587 | - * |
|
| 588 | - */ |
|
| 582 | + * Update latest marine data |
|
| 583 | + * |
|
| 584 | + * @param String $fammarine_id the ID |
|
| 585 | + * @param String $ident the marine ident |
|
| 586 | + * @return String success or false |
|
| 587 | + * |
|
| 588 | + */ |
|
| 589 | 589 | public function updateLatestMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $groundspeed = NULL, $date = '') |
| 590 | 590 | { |
| 591 | 591 | $query = 'UPDATE marine_output SET ident = :ident, last_latitude = :last_latitude, last_longitude = :last_longitude, last_seen = :last_seen, last_ground_speed = :last_ground_speed WHERE fammarine_id = :fammarine_id'; |
| 592 | - $query_values = array(':fammarine_id' => $fammarine_id,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident); |
|
| 592 | + $query_values = array(':fammarine_id' => $fammarine_id,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident); |
|
| 593 | 593 | |
| 594 | 594 | try { |
| 595 | 595 | $sth = $this->db->prepare($query); |
@@ -603,30 +603,30 @@ discard block |
||
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | /** |
| 606 | - * Adds a new spotter data |
|
| 607 | - * |
|
| 608 | - * @param String $fammarine_id the ID |
|
| 609 | - * @param String $ident the marine ident |
|
| 610 | - * @param String $departure_airport_icao the departure airport |
|
| 611 | - * @param String $arrival_airport_icao the arrival airport |
|
| 612 | - * @param String $latitude latitude of flight |
|
| 613 | - * @param String $longitude latitude of flight |
|
| 614 | - * @param String $waypoints waypoints of flight |
|
| 615 | - * @param String $heading heading of flight |
|
| 616 | - * @param String $groundspeed speed of flight |
|
| 617 | - * @param String $date date of flight |
|
| 618 | - * @param String $departure_airport_time departure time of flight |
|
| 619 | - * @param String $arrival_airport_time arrival time of flight |
|
| 620 | - * @param String $squawk squawk code of flight |
|
| 621 | - * @param String $route_stop route stop of flight |
|
| 622 | - * @param String $highlight highlight or not |
|
| 623 | - * @param String $ModeS ModesS code of flight |
|
| 624 | - * @param String $registration registration code of flight |
|
| 625 | - * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 626 | - * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 627 | - * @param String $verticalrate vertival rate of flight |
|
| 628 | - * @return String success or false |
|
| 629 | - */ |
|
| 606 | + * Adds a new spotter data |
|
| 607 | + * |
|
| 608 | + * @param String $fammarine_id the ID |
|
| 609 | + * @param String $ident the marine ident |
|
| 610 | + * @param String $departure_airport_icao the departure airport |
|
| 611 | + * @param String $arrival_airport_icao the arrival airport |
|
| 612 | + * @param String $latitude latitude of flight |
|
| 613 | + * @param String $longitude latitude of flight |
|
| 614 | + * @param String $waypoints waypoints of flight |
|
| 615 | + * @param String $heading heading of flight |
|
| 616 | + * @param String $groundspeed speed of flight |
|
| 617 | + * @param String $date date of flight |
|
| 618 | + * @param String $departure_airport_time departure time of flight |
|
| 619 | + * @param String $arrival_airport_time arrival time of flight |
|
| 620 | + * @param String $squawk squawk code of flight |
|
| 621 | + * @param String $route_stop route stop of flight |
|
| 622 | + * @param String $highlight highlight or not |
|
| 623 | + * @param String $ModeS ModesS code of flight |
|
| 624 | + * @param String $registration registration code of flight |
|
| 625 | + * @param String $pilot_id pilot id of flight (for virtual airlines) |
|
| 626 | + * @param String $pilot_name pilot name of flight (for virtual airlines) |
|
| 627 | + * @param String $verticalrate vertival rate of flight |
|
| 628 | + * @return String success or false |
|
| 629 | + */ |
|
| 630 | 630 | public function addMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $heading = '', $groundspeed = '', $date = '', $mmsi = '',$type = '',$typeid = '',$imo = '',$callsign = '',$arrival_code = '',$arrival_date = '',$status = '',$statusid = '',$format_source = '', $source_name = '') |
| 631 | 631 | { |
| 632 | 632 | global $globalURL, $globalMarineImageFetch; |
@@ -723,13 +723,13 @@ discard block |
||
| 723 | 723 | unset($Image); |
| 724 | 724 | } |
| 725 | 725 | |
| 726 | - if ($latitude == '' && $longitude == '') { |
|
| 727 | - $latitude = 0; |
|
| 728 | - $longitude = 0; |
|
| 729 | - } |
|
| 730 | - if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 731 | - if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 732 | - if ($arrival_date == '') $arrival_date = NULL; |
|
| 726 | + if ($latitude == '' && $longitude == '') { |
|
| 727 | + $latitude = 0; |
|
| 728 | + $longitude = 0; |
|
| 729 | + } |
|
| 730 | + if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0; |
|
| 731 | + if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0; |
|
| 732 | + if ($arrival_date == '') $arrival_date = NULL; |
|
| 733 | 733 | $query = "INSERT INTO marine_output (fammarine_id, ident, latitude, longitude, heading, ground_speed, date, format_source, source_name, mmsi, type, status,imo,arrival_port_name,arrival_port_date) |
| 734 | 734 | VALUES (:fammarine_id,:ident,:latitude,:longitude,:heading,:speed,:date,:format_source, :source_name,:mmsi,:type,:status,:imo,:arrival_port_name,:arrival_port_date)"; |
| 735 | 735 | |
@@ -740,7 +740,7 @@ discard block |
||
| 740 | 740 | $sth->execute($query_values); |
| 741 | 741 | $this->db = null; |
| 742 | 742 | } catch (PDOException $e) { |
| 743 | - return "error : ".$e->getMessage(); |
|
| 743 | + return "error : ".$e->getMessage(); |
|
| 744 | 744 | } |
| 745 | 745 | |
| 746 | 746 | return "success"; |
@@ -749,11 +749,11 @@ discard block |
||
| 749 | 749 | |
| 750 | 750 | |
| 751 | 751 | /** |
| 752 | - * Gets the aircraft ident within the last hour |
|
| 753 | - * |
|
| 754 | - * @return String the ident |
|
| 755 | - * |
|
| 756 | - */ |
|
| 752 | + * Gets the aircraft ident within the last hour |
|
| 753 | + * |
|
| 754 | + * @return String the ident |
|
| 755 | + * |
|
| 756 | + */ |
|
| 757 | 757 | public function getIdentFromLastHour($ident) |
| 758 | 758 | { |
| 759 | 759 | global $globalDBdriver, $globalTimezone; |
@@ -769,11 +769,11 @@ discard block |
||
| 769 | 769 | AND marine_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS' |
| 770 | 770 | AND marine_output.date < now() AT TIME ZONE 'UTC'"; |
| 771 | 771 | $query_data = array(':ident' => $ident); |
| 772 | - } |
|
| 772 | + } |
|
| 773 | 773 | |
| 774 | 774 | $sth = $this->db->prepare($query); |
| 775 | 775 | $sth->execute($query_data); |
| 776 | - $ident_result=''; |
|
| 776 | + $ident_result=''; |
|
| 777 | 777 | while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 778 | 778 | { |
| 779 | 779 | $ident_result = $row['ident']; |
@@ -784,11 +784,11 @@ discard block |
||
| 784 | 784 | |
| 785 | 785 | |
| 786 | 786 | /** |
| 787 | - * Gets the aircraft data from the last 20 seconds |
|
| 788 | - * |
|
| 789 | - * @return Array the spotter data |
|
| 790 | - * |
|
| 791 | - */ |
|
| 787 | + * Gets the aircraft data from the last 20 seconds |
|
| 788 | + * |
|
| 789 | + * @return Array the spotter data |
|
| 790 | + * |
|
| 791 | + */ |
|
| 792 | 792 | public function getRealTimeData($q = '') |
| 793 | 793 | { |
| 794 | 794 | global $globalDBdriver; |
@@ -826,11 +826,11 @@ discard block |
||
| 826 | 826 | |
| 827 | 827 | |
| 828 | 828 | /** |
| 829 | - * Gets all number of flight over countries |
|
| 830 | - * |
|
| 831 | - * @return Array the airline country list |
|
| 832 | - * |
|
| 833 | - */ |
|
| 829 | + * Gets all number of flight over countries |
|
| 830 | + * |
|
| 831 | + * @return Array the airline country list |
|
| 832 | + * |
|
| 833 | + */ |
|
| 834 | 834 | |
| 835 | 835 | public function countAllMarineOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array()) |
| 836 | 836 | { |
@@ -903,11 +903,11 @@ discard block |
||
| 903 | 903 | |
| 904 | 904 | |
| 905 | 905 | /** |
| 906 | - * Gets all callsigns that have flown over |
|
| 907 | - * |
|
| 908 | - * @return Array the callsign list |
|
| 909 | - * |
|
| 910 | - */ |
|
| 906 | + * Gets all callsigns that have flown over |
|
| 907 | + * |
|
| 908 | + * @return Array the callsign list |
|
| 909 | + * |
|
| 910 | + */ |
|
| 911 | 911 | public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '') |
| 912 | 912 | { |
| 913 | 913 | global $globalDBdriver; |
@@ -974,11 +974,11 @@ discard block |
||
| 974 | 974 | |
| 975 | 975 | |
| 976 | 976 | /** |
| 977 | - * Counts all dates |
|
| 978 | - * |
|
| 979 | - * @return Array the date list |
|
| 980 | - * |
|
| 981 | - */ |
|
| 977 | + * Counts all dates |
|
| 978 | + * |
|
| 979 | + * @return Array the date list |
|
| 980 | + * |
|
| 981 | + */ |
|
| 982 | 982 | public function countAllDates($filters = array()) |
| 983 | 983 | { |
| 984 | 984 | global $globalTimezone, $globalDBdriver; |
@@ -1024,11 +1024,11 @@ discard block |
||
| 1024 | 1024 | |
| 1025 | 1025 | |
| 1026 | 1026 | /** |
| 1027 | - * Counts all dates during the last 7 days |
|
| 1028 | - * |
|
| 1029 | - * @return Array the date list |
|
| 1030 | - * |
|
| 1031 | - */ |
|
| 1027 | + * Counts all dates during the last 7 days |
|
| 1028 | + * |
|
| 1029 | + * @return Array the date list |
|
| 1030 | + * |
|
| 1031 | + */ |
|
| 1032 | 1032 | public function countAllDatesLast7Days($filters = array()) |
| 1033 | 1033 | { |
| 1034 | 1034 | global $globalTimezone, $globalDBdriver; |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | $query .= " GROUP BY date_name |
| 1051 | 1051 | ORDER BY date_name ASC"; |
| 1052 | 1052 | $query_data = array(':offset' => $offset); |
| 1053 | - } |
|
| 1053 | + } |
|
| 1054 | 1054 | |
| 1055 | 1055 | $sth = $this->db->prepare($query); |
| 1056 | 1056 | $sth->execute($query_data); |
@@ -1070,11 +1070,11 @@ discard block |
||
| 1070 | 1070 | } |
| 1071 | 1071 | |
| 1072 | 1072 | /** |
| 1073 | - * Counts all dates during the last month |
|
| 1074 | - * |
|
| 1075 | - * @return Array the date list |
|
| 1076 | - * |
|
| 1077 | - */ |
|
| 1073 | + * Counts all dates during the last month |
|
| 1074 | + * |
|
| 1075 | + * @return Array the date list |
|
| 1076 | + * |
|
| 1077 | + */ |
|
| 1078 | 1078 | public function countAllDatesLastMonth($filters = array()) |
| 1079 | 1079 | { |
| 1080 | 1080 | global $globalTimezone, $globalDBdriver; |
@@ -1096,7 +1096,7 @@ discard block |
||
| 1096 | 1096 | $query .= " GROUP BY date_name |
| 1097 | 1097 | ORDER BY date_name ASC"; |
| 1098 | 1098 | $query_data = array(':offset' => $offset); |
| 1099 | - } |
|
| 1099 | + } |
|
| 1100 | 1100 | |
| 1101 | 1101 | $sth = $this->db->prepare($query); |
| 1102 | 1102 | $sth->execute($query_data); |
@@ -1118,11 +1118,11 @@ discard block |
||
| 1118 | 1118 | |
| 1119 | 1119 | |
| 1120 | 1120 | /** |
| 1121 | - * Counts all month |
|
| 1122 | - * |
|
| 1123 | - * @return Array the month list |
|
| 1124 | - * |
|
| 1125 | - */ |
|
| 1121 | + * Counts all month |
|
| 1122 | + * |
|
| 1123 | + * @return Array the month list |
|
| 1124 | + * |
|
| 1125 | + */ |
|
| 1126 | 1126 | public function countAllMonths($filters = array()) |
| 1127 | 1127 | { |
| 1128 | 1128 | global $globalTimezone, $globalDBdriver; |
@@ -1167,11 +1167,11 @@ discard block |
||
| 1167 | 1167 | |
| 1168 | 1168 | |
| 1169 | 1169 | /** |
| 1170 | - * Counts all dates during the last year |
|
| 1171 | - * |
|
| 1172 | - * @return Array the date list |
|
| 1173 | - * |
|
| 1174 | - */ |
|
| 1170 | + * Counts all dates during the last year |
|
| 1171 | + * |
|
| 1172 | + * @return Array the date list |
|
| 1173 | + * |
|
| 1174 | + */ |
|
| 1175 | 1175 | public function countAllMonthsLastYear($filters) |
| 1176 | 1176 | { |
| 1177 | 1177 | global $globalTimezone, $globalDBdriver; |
@@ -1193,7 +1193,7 @@ discard block |
||
| 1193 | 1193 | $query .= " GROUP BY year_name, month_name |
| 1194 | 1194 | ORDER BY year_name, month_name ASC"; |
| 1195 | 1195 | $query_data = array(':offset' => $offset); |
| 1196 | - } |
|
| 1196 | + } |
|
| 1197 | 1197 | |
| 1198 | 1198 | $sth = $this->db->prepare($query); |
| 1199 | 1199 | $sth->execute($query_data); |
@@ -1216,11 +1216,11 @@ discard block |
||
| 1216 | 1216 | |
| 1217 | 1217 | |
| 1218 | 1218 | /** |
| 1219 | - * Counts all hours |
|
| 1220 | - * |
|
| 1221 | - * @return Array the hour list |
|
| 1222 | - * |
|
| 1223 | - */ |
|
| 1219 | + * Counts all hours |
|
| 1220 | + * |
|
| 1221 | + * @return Array the hour list |
|
| 1222 | + * |
|
| 1223 | + */ |
|
| 1224 | 1224 | public function countAllHours($orderby,$filters = array()) |
| 1225 | 1225 | { |
| 1226 | 1226 | global $globalTimezone, $globalDBdriver; |
@@ -1283,11 +1283,11 @@ discard block |
||
| 1283 | 1283 | |
| 1284 | 1284 | |
| 1285 | 1285 | /** |
| 1286 | - * Counts all hours by date |
|
| 1287 | - * |
|
| 1288 | - * @return Array the hour list |
|
| 1289 | - * |
|
| 1290 | - */ |
|
| 1286 | + * Counts all hours by date |
|
| 1287 | + * |
|
| 1288 | + * @return Array the hour list |
|
| 1289 | + * |
|
| 1290 | + */ |
|
| 1291 | 1291 | public function countAllHoursByDate($date, $filters = array()) |
| 1292 | 1292 | { |
| 1293 | 1293 | global $globalTimezone, $globalDBdriver; |
@@ -1331,11 +1331,11 @@ discard block |
||
| 1331 | 1331 | |
| 1332 | 1332 | |
| 1333 | 1333 | /** |
| 1334 | - * Counts all hours by a ident/callsign |
|
| 1335 | - * |
|
| 1336 | - * @return Array the hour list |
|
| 1337 | - * |
|
| 1338 | - */ |
|
| 1334 | + * Counts all hours by a ident/callsign |
|
| 1335 | + * |
|
| 1336 | + * @return Array the hour list |
|
| 1337 | + * |
|
| 1338 | + */ |
|
| 1339 | 1339 | public function countAllHoursByIdent($ident, $filters = array()) |
| 1340 | 1340 | { |
| 1341 | 1341 | global $globalTimezone, $globalDBdriver; |
@@ -1380,11 +1380,11 @@ discard block |
||
| 1380 | 1380 | |
| 1381 | 1381 | |
| 1382 | 1382 | /** |
| 1383 | - * Counts all vessels |
|
| 1384 | - * |
|
| 1385 | - * @return Integer the number of vessels |
|
| 1386 | - * |
|
| 1387 | - */ |
|
| 1383 | + * Counts all vessels |
|
| 1384 | + * |
|
| 1385 | + * @return Integer the number of vessels |
|
| 1386 | + * |
|
| 1387 | + */ |
|
| 1388 | 1388 | public function countOverallMarine($filters = array(),$year = '',$month = '') |
| 1389 | 1389 | { |
| 1390 | 1390 | global $globalDBdriver; |
@@ -1419,11 +1419,11 @@ discard block |
||
| 1419 | 1419 | } |
| 1420 | 1420 | |
| 1421 | 1421 | /** |
| 1422 | - * Counts all vessel type |
|
| 1423 | - * |
|
| 1424 | - * @return Integer the number of vessels |
|
| 1425 | - * |
|
| 1426 | - */ |
|
| 1422 | + * Counts all vessel type |
|
| 1423 | + * |
|
| 1424 | + * @return Integer the number of vessels |
|
| 1425 | + * |
|
| 1426 | + */ |
|
| 1427 | 1427 | public function countOverallMarineTypes($filters = array(),$year = '',$month = '') |
| 1428 | 1428 | { |
| 1429 | 1429 | global $globalDBdriver; |
@@ -1458,11 +1458,11 @@ discard block |
||
| 1458 | 1458 | |
| 1459 | 1459 | |
| 1460 | 1460 | /** |
| 1461 | - * Counts all hours of today |
|
| 1462 | - * |
|
| 1463 | - * @return Array the hour list |
|
| 1464 | - * |
|
| 1465 | - */ |
|
| 1461 | + * Counts all hours of today |
|
| 1462 | + * |
|
| 1463 | + * @return Array the hour list |
|
| 1464 | + * |
|
| 1465 | + */ |
|
| 1466 | 1466 | public function countAllHoursFromToday($filters = array()) |
| 1467 | 1467 | { |
| 1468 | 1468 | global $globalTimezone, $globalDBdriver; |
@@ -1502,12 +1502,12 @@ discard block |
||
| 1502 | 1502 | } |
| 1503 | 1503 | |
| 1504 | 1504 | |
| 1505 | - /** |
|
| 1506 | - * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 1507 | - * |
|
| 1508 | - * @return Integer the Barrie Spotter ID |
|
| 1505 | + /** |
|
| 1506 | + * Gets the Barrie Spotter ID based on the FlightAware ID |
|
| 1507 | + * |
|
| 1508 | + * @return Integer the Barrie Spotter ID |
|
| 1509 | 1509 | q * |
| 1510 | - */ |
|
| 1510 | + */ |
|
| 1511 | 1511 | public function getMarineIDBasedOnFamMarineID($fammarine_id) |
| 1512 | 1512 | { |
| 1513 | 1513 | $fammarine_id = filter_var($fammarine_id,FILTER_SANITIZE_STRING); |
@@ -1528,13 +1528,13 @@ discard block |
||
| 1528 | 1528 | |
| 1529 | 1529 | |
| 1530 | 1530 | /** |
| 1531 | - * Parses a date string |
|
| 1532 | - * |
|
| 1533 | - * @param String $dateString the date string |
|
| 1534 | - * @param String $timezone the timezone of a user |
|
| 1535 | - * @return Array the time information |
|
| 1536 | - * |
|
| 1537 | - */ |
|
| 1531 | + * Parses a date string |
|
| 1532 | + * |
|
| 1533 | + * @param String $dateString the date string |
|
| 1534 | + * @param String $timezone the timezone of a user |
|
| 1535 | + * @return Array the time information |
|
| 1536 | + * |
|
| 1537 | + */ |
|
| 1538 | 1538 | public function parseDateString($dateString, $timezone = '') |
| 1539 | 1539 | { |
| 1540 | 1540 | $time_array = array(); |
@@ -1567,12 +1567,12 @@ discard block |
||
| 1567 | 1567 | } |
| 1568 | 1568 | |
| 1569 | 1569 | /** |
| 1570 | - * Parses the direction degrees to working |
|
| 1571 | - * |
|
| 1572 | - * @param Float $direction the direction in degrees |
|
| 1573 | - * @return Array the direction information |
|
| 1574 | - * |
|
| 1575 | - */ |
|
| 1570 | + * Parses the direction degrees to working |
|
| 1571 | + * |
|
| 1572 | + * @param Float $direction the direction in degrees |
|
| 1573 | + * @return Array the direction information |
|
| 1574 | + * |
|
| 1575 | + */ |
|
| 1576 | 1576 | public function parseDirection($direction = 0) |
| 1577 | 1577 | { |
| 1578 | 1578 | if ($direction == '') $direction = 0; |
@@ -1651,12 +1651,12 @@ discard block |
||
| 1651 | 1651 | |
| 1652 | 1652 | |
| 1653 | 1653 | /** |
| 1654 | - * Gets Country from latitude/longitude |
|
| 1655 | - * |
|
| 1656 | - * @param Float $latitude latitute of the flight |
|
| 1657 | - * @param Float $longitude longitute of the flight |
|
| 1658 | - * @return String the countrie |
|
| 1659 | - */ |
|
| 1654 | + * Gets Country from latitude/longitude |
|
| 1655 | + * |
|
| 1656 | + * @param Float $latitude latitute of the flight |
|
| 1657 | + * @param Float $longitude longitute of the flight |
|
| 1658 | + * @return String the countrie |
|
| 1659 | + */ |
|
| 1660 | 1660 | public function getCountryFromLatitudeLongitude($latitude,$longitude) |
| 1661 | 1661 | { |
| 1662 | 1662 | global $globalDBdriver, $globalDebug; |
@@ -1693,11 +1693,11 @@ discard block |
||
| 1693 | 1693 | } |
| 1694 | 1694 | |
| 1695 | 1695 | /** |
| 1696 | - * Gets Country from iso2 |
|
| 1697 | - * |
|
| 1698 | - * @param String $iso2 ISO2 country code |
|
| 1699 | - * @return String the countrie |
|
| 1700 | - */ |
|
| 1696 | + * Gets Country from iso2 |
|
| 1697 | + * |
|
| 1698 | + * @param String $iso2 ISO2 country code |
|
| 1699 | + * @return String the countrie |
|
| 1700 | + */ |
|
| 1701 | 1701 | public function getCountryFromISO2($iso2) |
| 1702 | 1702 | { |
| 1703 | 1703 | global $globalDBdriver, $globalDebug; |
@@ -1726,12 +1726,12 @@ discard block |
||
| 1726 | 1726 | |
| 1727 | 1727 | |
| 1728 | 1728 | /** |
| 1729 | - * Gets the short url from bit.ly |
|
| 1730 | - * |
|
| 1731 | - * @param String $url the full url |
|
| 1732 | - * @return String the bit.ly url |
|
| 1733 | - * |
|
| 1734 | - */ |
|
| 1729 | + * Gets the short url from bit.ly |
|
| 1730 | + * |
|
| 1731 | + * @param String $url the full url |
|
| 1732 | + * @return String the bit.ly url |
|
| 1733 | + * |
|
| 1734 | + */ |
|
| 1735 | 1735 | public function getBitlyURL($url) |
| 1736 | 1736 | { |
| 1737 | 1737 | global $globalBitlyAccessToken; |
@@ -1758,11 +1758,11 @@ discard block |
||
| 1758 | 1758 | |
| 1759 | 1759 | |
| 1760 | 1760 | /** |
| 1761 | - * Gets all vessels types that have flown over |
|
| 1762 | - * |
|
| 1763 | - * @return Array the vessel type list |
|
| 1764 | - * |
|
| 1765 | - */ |
|
| 1761 | + * Gets all vessels types that have flown over |
|
| 1762 | + * |
|
| 1763 | + * @return Array the vessel type list |
|
| 1764 | + * |
|
| 1765 | + */ |
|
| 1766 | 1766 | public function countAllMarineTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '') |
| 1767 | 1767 | { |
| 1768 | 1768 | global $globalDBdriver; |
@@ -1827,11 +1827,11 @@ discard block |
||
| 1827 | 1827 | } |
| 1828 | 1828 | |
| 1829 | 1829 | /** |
| 1830 | - * Gets all the tracker information |
|
| 1831 | - * |
|
| 1832 | - * @return Array the tracker information |
|
| 1833 | - * |
|
| 1834 | - */ |
|
| 1830 | + * Gets all the tracker information |
|
| 1831 | + * |
|
| 1832 | + * @return Array the tracker information |
|
| 1833 | + * |
|
| 1834 | + */ |
|
| 1835 | 1835 | public function searchMarineData($q = '', $callsign = '',$mmsi = '', $imo = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '',$filters = array()) |
| 1836 | 1836 | { |
| 1837 | 1837 | global $globalTimezone, $globalDBdriver; |