Completed
Push — master ( e2bc06...df777b )
by Yannick
29:51
created
require/class.Tracker.php 1 patch
Indentation   +210 added lines, -210 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@  discard block
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	/**
17
-	* Get SQL query part for filter used
18
-	* @param Array $filter the filter
19
-	* @return Array the SQL part
20
-	*/
17
+	 * Get SQL query part for filter used
18
+	 * @param Array $filter the filter
19
+	 * @return Array the SQL part
20
+	 */
21 21
 	
22 22
 	public function getFilter($filter = array(),$where = false,$and = false) {
23 23
 		global $globalFilter, $globalStatsFilters, $globalFilterName, $globalDBdriver;
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
 	}
85 85
 
86 86
 	/**
87
-	* Executes the SQL statements to get the tracker information
88
-	*
89
-	* @param String $query the SQL query
90
-	* @param Array $params parameter of the query
91
-	* @param String $limitQuery the limit query
92
-	* @return Array the tracker information
93
-	*
94
-	*/
87
+	 * Executes the SQL statements to get the tracker information
88
+	 *
89
+	 * @param String $query the SQL query
90
+	 * @param Array $params parameter of the query
91
+	 * @param String $limitQuery the limit query
92
+	 * @return Array the tracker information
93
+	 *
94
+	 */
95 95
 	public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false)
96 96
 	{
97 97
 		date_default_timezone_set('UTC');
@@ -204,11 +204,11 @@  discard block
 block discarded – undo
204 204
 	
205 205
 	
206 206
 	/**
207
-	* Gets all the tracker information based on the latest data entry
208
-	*
209
-	* @return Array the tracker information
210
-	*
211
-	*/
207
+	 * Gets all the tracker information based on the latest data entry
208
+	 *
209
+	 * @return Array the tracker information
210
+	 *
211
+	 */
212 212
 	public function getLatestTrackerData($limit = '', $sort = '', $filter = array())
213 213
 	{
214 214
 		global $global_tracker_query;
@@ -266,11 +266,11 @@  discard block
 block discarded – undo
266 266
 	}
267 267
 
268 268
 	/**
269
-	* Gets all the tracker information based on the callsign
270
-	*
271
-	* @return Array the tracker information
272
-	*
273
-	*/
269
+	 * Gets all the tracker information based on the callsign
270
+	 *
271
+	 * @return Array the tracker information
272
+	 *
273
+	 */
274 274
 	public function getTrackerDataByIdent($ident = '', $limit = '', $sort = '', $filter = array())
275 275
 	{
276 276
 		global $global_tracker_query;
@@ -381,12 +381,12 @@  discard block
 block discarded – undo
381 381
 
382 382
 
383 383
 	/**
384
-	* Gets all source name
385
-	*
386
-	* @param String type format of source
387
-	* @return Array list of source name
388
-	*
389
-	*/
384
+	 * Gets all source name
385
+	 *
386
+	 * @param String type format of source
387
+	 * @return Array list of source name
388
+	 *
389
+	 */
390 390
 	public function getAllSourceName($type = '',$filters = array())
391 391
 	{
392 392
 		$filter_query = $this->getFilter($filters,true,true);
@@ -416,11 +416,11 @@  discard block
 block discarded – undo
416 416
 
417 417
 
418 418
 	/**
419
-	* Gets a list of all idents/callsigns
420
-	*
421
-	* @return Array list of ident/callsign names
422
-	*
423
-	*/
419
+	 * Gets a list of all idents/callsigns
420
+	 *
421
+	 * @return Array list of ident/callsign names
422
+	 *
423
+	 */
424 424
 	public function getAllIdents($filters = array())
425 425
 	{
426 426
 		$filter_query = $this->getFilter($filters,true,true);
@@ -488,18 +488,18 @@  discard block
 block discarded – undo
488 488
 	
489 489
 	
490 490
 	/**
491
-	* Update ident tracker data
492
-	*
493
-	* @param String $flightaware_id the ID from flightaware
494
-	* @param String $ident the flight ident
495
-	* @return String success or false
496
-	*
497
-	*/	
491
+	 * Update ident tracker data
492
+	 *
493
+	 * @param String $flightaware_id the ID from flightaware
494
+	 * @param String $ident the flight ident
495
+	 * @return String success or false
496
+	 *
497
+	 */	
498 498
 	public function updateIdentTrackerData($famtrackid = '', $ident = '',$fromsource = NULL)
499 499
 	{
500 500
 
501 501
 		$query = 'UPDATE tracker_output SET ident = :ident WHERE famtrackid = :famtrackid';
502
-                $query_values = array(':famtrackid' => $famtrackid,':ident' => $ident);
502
+				$query_values = array(':famtrackid' => $famtrackid,':ident' => $ident);
503 503
 
504 504
 		try {
505 505
 			$sth = $this->db->prepare($query);
@@ -512,18 +512,18 @@  discard block
 block discarded – undo
512 512
 
513 513
 	}
514 514
 	/**
515
-	* Update latest tracker data
516
-	*
517
-	* @param String $flightaware_id the ID from flightaware
518
-	* @param String $ident the flight ident
519
-	* @param String $arrival_airport_icao the arrival airport
520
-	* @return String success or false
521
-	*
522
-	*/	
515
+	 * Update latest tracker data
516
+	 *
517
+	 * @param String $flightaware_id the ID from flightaware
518
+	 * @param String $ident the flight ident
519
+	 * @param String $arrival_airport_icao the arrival airport
520
+	 * @return String success or false
521
+	 *
522
+	 */	
523 523
 	public function updateLatestTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $groundspeed = NULL, $date = '')
524 524
 	{
525 525
 		$query = 'UPDATE tracker_output SET ident = :ident, last_latitude = :last_latitude, last_longitude = :last_longitude, last_altitude = :last_altitude, last_seen = :last_seen, last_ground_speed = :last_ground_speed WHERE famtrackid = :famtrackid';
526
-                $query_values = array(':famtrackid' => $famtrackid,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident);
526
+				$query_values = array(':famtrackid' => $famtrackid,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_altitude' => $altitude,':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident);
527 527
 
528 528
 		try {
529 529
 			$sth = $this->db->prepare($query);
@@ -537,32 +537,32 @@  discard block
 block discarded – undo
537 537
 	}
538 538
 
539 539
 	/**
540
-	* Adds a new tracker data
541
-	*
542
-	* @param String $flightaware_id the ID from flightaware
543
-	* @param String $ident the flight ident
544
-	* @param String $aircraft_icao the aircraft type
545
-	* @param String $departure_airport_icao the departure airport
546
-	* @param String $arrival_airport_icao the arrival airport
547
-	* @param String $latitude latitude of flight
548
-	* @param String $longitude latitude of flight
549
-	* @param String $waypoints waypoints of flight
550
-	* @param String $altitude altitude of flight
551
-	* @param String $heading heading of flight
552
-	* @param String $groundspeed speed of flight
553
-	* @param String $date date of flight
554
-	* @param String $departure_airport_time departure time of flight
555
-	* @param String $arrival_airport_time arrival time of flight
556
-	* @param String $squawk squawk code of flight
557
-	* @param String $route_stop route stop of flight
558
-	* @param String $highlight highlight or not
559
-	* @param String $ModeS ModesS code of flight
560
-	* @param String $registration registration code of flight
561
-	* @param String $pilot_id pilot id of flight (for virtual airlines)
562
-	* @param String $pilot_name pilot name of flight (for virtual airlines)
563
-	* @param String $verticalrate vertival rate of flight
564
-	* @return String success or false
565
-	*/
540
+	 * Adds a new tracker data
541
+	 *
542
+	 * @param String $flightaware_id the ID from flightaware
543
+	 * @param String $ident the flight ident
544
+	 * @param String $aircraft_icao the aircraft type
545
+	 * @param String $departure_airport_icao the departure airport
546
+	 * @param String $arrival_airport_icao the arrival airport
547
+	 * @param String $latitude latitude of flight
548
+	 * @param String $longitude latitude of flight
549
+	 * @param String $waypoints waypoints of flight
550
+	 * @param String $altitude altitude of flight
551
+	 * @param String $heading heading of flight
552
+	 * @param String $groundspeed speed of flight
553
+	 * @param String $date date of flight
554
+	 * @param String $departure_airport_time departure time of flight
555
+	 * @param String $arrival_airport_time arrival time of flight
556
+	 * @param String $squawk squawk code of flight
557
+	 * @param String $route_stop route stop of flight
558
+	 * @param String $highlight highlight or not
559
+	 * @param String $ModeS ModesS code of flight
560
+	 * @param String $registration registration code of flight
561
+	 * @param String $pilot_id pilot id of flight (for virtual airlines)
562
+	 * @param String $pilot_name pilot name of flight (for virtual airlines)
563
+	 * @param String $verticalrate vertival rate of flight
564
+	 * @return String success or false
565
+	 */
566 566
 	public function addTrackerData($famtrackid = '', $ident = '', $latitude = '', $longitude = '', $altitude = '', $heading = '', $groundspeed = '', $date = '', $comment = '', $type = '',$format_source = '', $source_name = '')
567 567
 	{
568 568
 		global $globalURL;
@@ -647,16 +647,16 @@  discard block
 block discarded – undo
647 647
 		$comment = filter_var($comment,FILTER_SANITIZE_STRING);
648 648
 		$type = filter_var($type,FILTER_SANITIZE_STRING);
649 649
 	
650
-                if ($latitude == '' && $longitude == '') {
651
-            		$latitude = 0;
652
-            		$longitude = 0;
653
-            	}
654
-                if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0;
655
-                if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0;
656
-                $query  = "INSERT INTO tracker_output (famtrackid, ident, latitude, longitude, altitude, heading, ground_speed, date, format_source, source_name, comment, type) 
650
+				if ($latitude == '' && $longitude == '') {
651
+					$latitude = 0;
652
+					$longitude = 0;
653
+				}
654
+				if ($heading == '' || $Common->isInteger($heading) === false) $heading = 0;
655
+				if ($groundspeed == '' || $Common->isInteger($groundspeed) === false) $groundspeed = 0;
656
+				$query  = "INSERT INTO tracker_output (famtrackid, ident, latitude, longitude, altitude, heading, ground_speed, date, format_source, source_name, comment, type) 
657 657
                 VALUES (:famtrackid,:ident,:latitude,:longitude,:altitude,:heading,:speed,:date,:format_source, :source_name,:comment,:type)";
658 658
 
659
-                $query_values = array(':famtrackid' => $famtrackid,':ident' => $ident,':latitude' => $latitude,':longitude' => $longitude,':altitude' => $altitude,':heading' => $heading,':speed' => $groundspeed,':date' => $date,':format_source' => $format_source, ':source_name' => $source_name,':comment' => $comment,':type' => $type);
659
+				$query_values = array(':famtrackid' => $famtrackid,':ident' => $ident,':latitude' => $latitude,':longitude' => $longitude,':altitude' => $altitude,':heading' => $heading,':speed' => $groundspeed,':date' => $date,':format_source' => $format_source, ':source_name' => $source_name,':comment' => $comment,':type' => $type);
660 660
 
661 661
 		try {
662 662
 		        
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 			$sth->execute($query_values);
665 665
 			$this->db = null;
666 666
 		} catch (PDOException $e) {
667
-		    return "error : ".$e->getMessage();
667
+			return "error : ".$e->getMessage();
668 668
 		}
669 669
 		
670 670
 		return "success";
@@ -673,11 +673,11 @@  discard block
 block discarded – undo
673 673
 	
674 674
   
675 675
 	/**
676
-	* Gets the aircraft ident within the last hour
677
-	*
678
-	* @return String the ident
679
-	*
680
-	*/
676
+	 * Gets the aircraft ident within the last hour
677
+	 *
678
+	 * @return String the ident
679
+	 *
680
+	 */
681 681
 	public function getIdentFromLastHour($ident)
682 682
 	{
683 683
 		global $globalDBdriver, $globalTimezone;
@@ -693,11 +693,11 @@  discard block
 block discarded – undo
693 693
 								AND tracker_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS'
694 694
 								AND tracker_output.date < now() AT TIME ZONE 'UTC'";
695 695
 			$query_data = array(':ident' => $ident);
696
-    		}
696
+			}
697 697
 		
698 698
 		$sth = $this->db->prepare($query);
699 699
 		$sth->execute($query_data);
700
-    		$ident_result='';
700
+			$ident_result='';
701 701
 		while($row = $sth->fetch(PDO::FETCH_ASSOC))
702 702
 		{
703 703
 			$ident_result = $row['ident'];
@@ -708,11 +708,11 @@  discard block
 block discarded – undo
708 708
 	
709 709
 	
710 710
 	/**
711
-	* Gets the aircraft data from the last 20 seconds
712
-	*
713
-	* @return Array the tracker data
714
-	*
715
-	*/
711
+	 * Gets the aircraft data from the last 20 seconds
712
+	 *
713
+	 * @return Array the tracker data
714
+	 *
715
+	 */
716 716
 	public function getRealTimeData($q = '')
717 717
 	{
718 718
 		global $globalDBdriver;
@@ -746,11 +746,11 @@  discard block
 block discarded – undo
746 746
 	}
747 747
 
748 748
 	/**
749
-	* Gets all number of flight over countries
750
-	*
751
-	* @return Array the airline country list
752
-	*
753
-	*/
749
+	 * Gets all number of flight over countries
750
+	 *
751
+	 * @return Array the airline country list
752
+	 *
753
+	 */
754 754
 	public function countAllTrackerOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array())
755 755
 	{
756 756
 		global $globalDBdriver, $globalArchive;
@@ -820,11 +820,11 @@  discard block
 block discarded – undo
820 820
 	}
821 821
 	
822 822
 	/**
823
-	* Gets all callsigns that have flown over
824
-	*
825
-	* @return Array the callsign list
826
-	*
827
-	*/
823
+	 * Gets all callsigns that have flown over
824
+	 *
825
+	 * @return Array the callsign list
826
+	 *
827
+	 */
828 828
 	public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '')
829 829
 	{
830 830
 		global $globalDBdriver;
@@ -891,11 +891,11 @@  discard block
 block discarded – undo
891 891
 
892 892
 
893 893
 	/**
894
-	* Counts all dates
895
-	*
896
-	* @return Array the date list
897
-	*
898
-	*/
894
+	 * Counts all dates
895
+	 *
896
+	 * @return Array the date list
897
+	 *
898
+	 */
899 899
 	public function countAllDates($filters = array())
900 900
 	{
901 901
 		global $globalTimezone, $globalDBdriver;
@@ -941,11 +941,11 @@  discard block
 block discarded – undo
941 941
 	
942 942
 	
943 943
 	/**
944
-	* Counts all dates during the last 7 days
945
-	*
946
-	* @return Array the date list
947
-	*
948
-	*/
944
+	 * Counts all dates during the last 7 days
945
+	 *
946
+	 * @return Array the date list
947
+	 *
948
+	 */
949 949
 	public function countAllDatesLast7Days($filters = array())
950 950
 	{
951 951
 		global $globalTimezone, $globalDBdriver;
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
 			$query .= " GROUP BY date_name 
968 968
 								ORDER BY date_name ASC";
969 969
 			$query_data = array(':offset' => $offset);
970
-    		}
970
+			}
971 971
 		
972 972
 		$sth = $this->db->prepare($query);
973 973
 		$sth->execute($query_data);
@@ -987,11 +987,11 @@  discard block
 block discarded – undo
987 987
 	}
988 988
 
989 989
 	/**
990
-	* Counts all dates during the last month
991
-	*
992
-	* @return Array the date list
993
-	*
994
-	*/
990
+	 * Counts all dates during the last month
991
+	 *
992
+	 * @return Array the date list
993
+	 *
994
+	 */
995 995
 	public function countAllDatesLastMonth($filters = array())
996 996
 	{
997 997
 		global $globalTimezone, $globalDBdriver;
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
 			$query .= " GROUP BY date_name 
1014 1014
 								ORDER BY date_name ASC";
1015 1015
 			$query_data = array(':offset' => $offset);
1016
-    		}
1016
+			}
1017 1017
 		
1018 1018
 		$sth = $this->db->prepare($query);
1019 1019
 		$sth->execute($query_data);
@@ -1035,11 +1035,11 @@  discard block
 block discarded – undo
1035 1035
 
1036 1036
 
1037 1037
 	/**
1038
-	* Counts all month
1039
-	*
1040
-	* @return Array the month list
1041
-	*
1042
-	*/
1038
+	 * Counts all month
1039
+	 *
1040
+	 * @return Array the month list
1041
+	 *
1042
+	 */
1043 1043
 	public function countAllMonths($filters = array())
1044 1044
 	{
1045 1045
 		global $globalTimezone, $globalDBdriver;
@@ -1084,11 +1084,11 @@  discard block
 block discarded – undo
1084 1084
 	
1085 1085
 
1086 1086
 	/**
1087
-	* Counts all dates during the last year
1088
-	*
1089
-	* @return Array the date list
1090
-	*
1091
-	*/
1087
+	 * Counts all dates during the last year
1088
+	 *
1089
+	 * @return Array the date list
1090
+	 *
1091
+	 */
1092 1092
 	public function countAllMonthsLastYear($filters)
1093 1093
 	{
1094 1094
 		global $globalTimezone, $globalDBdriver;
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 			$query .= " GROUP BY year_name, month_name
1111 1111
 								ORDER BY year_name, month_name ASC";
1112 1112
 			$query_data = array(':offset' => $offset);
1113
-    		}
1113
+			}
1114 1114
 		
1115 1115
 		$sth = $this->db->prepare($query);
1116 1116
 		$sth->execute($query_data);
@@ -1133,11 +1133,11 @@  discard block
 block discarded – undo
1133 1133
 	
1134 1134
 	
1135 1135
 	/**
1136
-	* Counts all hours
1137
-	*
1138
-	* @return Array the hour list
1139
-	*
1140
-	*/
1136
+	 * Counts all hours
1137
+	 *
1138
+	 * @return Array the hour list
1139
+	 *
1140
+	 */
1141 1141
 	public function countAllHours($orderby,$filters = array())
1142 1142
 	{
1143 1143
 		global $globalTimezone, $globalDBdriver;
@@ -1200,11 +1200,11 @@  discard block
 block discarded – undo
1200 1200
 	
1201 1201
 	
1202 1202
 	/**
1203
-	* Counts all hours by date
1204
-	*
1205
-	* @return Array the hour list
1206
-	*
1207
-	*/
1203
+	 * Counts all hours by date
1204
+	 *
1205
+	 * @return Array the hour list
1206
+	 *
1207
+	 */
1208 1208
 	public function countAllHoursByDate($date, $filters = array())
1209 1209
 	{
1210 1210
 		global $globalTimezone, $globalDBdriver;
@@ -1248,11 +1248,11 @@  discard block
 block discarded – undo
1248 1248
 	
1249 1249
 	
1250 1250
 	/**
1251
-	* Counts all hours by a ident/callsign
1252
-	*
1253
-	* @return Array the hour list
1254
-	*
1255
-	*/
1251
+	 * Counts all hours by a ident/callsign
1252
+	 *
1253
+	 * @return Array the hour list
1254
+	 *
1255
+	 */
1256 1256
 	public function countAllHoursByIdent($ident, $filters = array())
1257 1257
 	{
1258 1258
 		global $globalTimezone, $globalDBdriver;
@@ -1297,11 +1297,11 @@  discard block
 block discarded – undo
1297 1297
 	
1298 1298
 	
1299 1299
 	/**
1300
-	* Counts all trackers that have flown over
1301
-	*
1302
-	* @return Integer the number of trackers
1303
-	*
1304
-	*/
1300
+	 * Counts all trackers that have flown over
1301
+	 *
1302
+	 * @return Integer the number of trackers
1303
+	 *
1304
+	 */
1305 1305
 	public function countOverallTracker($filters = array(),$year = '',$month = '')
1306 1306
 	{
1307 1307
 		global $globalDBdriver;
@@ -1336,11 +1336,11 @@  discard block
 block discarded – undo
1336 1336
 	}
1337 1337
 	
1338 1338
 	/**
1339
-	* Counts all trackers type that have flown over
1340
-	*
1341
-	* @return Integer the number of flights
1342
-	*
1343
-	*/
1339
+	 * Counts all trackers type that have flown over
1340
+	 *
1341
+	 * @return Integer the number of flights
1342
+	 *
1343
+	 */
1344 1344
 	public function countOverallTrackerTypes($filters = array(),$year = '',$month = '')
1345 1345
 	{
1346 1346
 		global $globalDBdriver;
@@ -1375,11 +1375,11 @@  discard block
 block discarded – undo
1375 1375
 	
1376 1376
   
1377 1377
 	/**
1378
-	* Counts all hours of today
1379
-	*
1380
-	* @return Array the hour list
1381
-	*
1382
-	*/
1378
+	 * Counts all hours of today
1379
+	 *
1380
+	 * @return Array the hour list
1381
+	 *
1382
+	 */
1383 1383
 	public function countAllHoursFromToday($filters = array())
1384 1384
 	{
1385 1385
 		global $globalTimezone, $globalDBdriver;
@@ -1419,12 +1419,12 @@  discard block
 block discarded – undo
1419 1419
 	}
1420 1420
     
1421 1421
     
1422
-     /**
1423
-	* Gets the Barrie Spotter ID based on the FlightAware ID
1424
-	*
1425
-	* @return Integer the Barrie Spotter ID
1422
+	 /**
1423
+	  * Gets the Barrie Spotter ID based on the FlightAware ID
1424
+	  *
1425
+	  * @return Integer the Barrie Spotter ID
1426 1426
 q	*
1427
-	*/
1427
+	  */
1428 1428
 	public function getTrackerIDBasedOnFamTrackID($famtrackid)
1429 1429
 	{
1430 1430
 		$famtrackid = filter_var($famtrackid,FILTER_SANITIZE_STRING);
@@ -1445,13 +1445,13 @@  discard block
 block discarded – undo
1445 1445
   
1446 1446
  
1447 1447
 	/**
1448
-	* Parses a date string
1449
-	*
1450
-	* @param String $dateString the date string
1451
-	* @param String $timezone the timezone of a user
1452
-	* @return Array the time information
1453
-	*
1454
-	*/
1448
+	 * Parses a date string
1449
+	 *
1450
+	 * @param String $dateString the date string
1451
+	 * @param String $timezone the timezone of a user
1452
+	 * @return Array the time information
1453
+	 *
1454
+	 */
1455 1455
 	public function parseDateString($dateString, $timezone = '')
1456 1456
 	{
1457 1457
 		$time_array = array();
@@ -1484,12 +1484,12 @@  discard block
 block discarded – undo
1484 1484
 	}
1485 1485
 	
1486 1486
 	/**
1487
-	* Parses the direction degrees to working
1488
-	*
1489
-	* @param Float $direction the direction in degrees
1490
-	* @return Array the direction information
1491
-	*
1492
-	*/
1487
+	 * Parses the direction degrees to working
1488
+	 *
1489
+	 * @param Float $direction the direction in degrees
1490
+	 * @return Array the direction information
1491
+	 *
1492
+	 */
1493 1493
 	public function parseDirection($direction = 0)
1494 1494
 	{
1495 1495
 		if ($direction == '') $direction = 0;
@@ -1568,12 +1568,12 @@  discard block
 block discarded – undo
1568 1568
 	
1569 1569
 	
1570 1570
 	/**
1571
-	* Gets Country from latitude/longitude
1572
-	*
1573
-	* @param Float $latitude latitute of the flight
1574
-	* @param Float $longitude longitute of the flight
1575
-	* @return String the countrie
1576
-	*/
1571
+	 * Gets Country from latitude/longitude
1572
+	 *
1573
+	 * @param Float $latitude latitute of the flight
1574
+	 * @param Float $longitude longitute of the flight
1575
+	 * @return String the countrie
1576
+	 */
1577 1577
 	public function getCountryFromLatitudeLongitude($latitude,$longitude)
1578 1578
 	{
1579 1579
 		global $globalDBdriver, $globalDebug;
@@ -1610,11 +1610,11 @@  discard block
 block discarded – undo
1610 1610
 	}
1611 1611
 
1612 1612
 	/**
1613
-	* Gets Country from iso2
1614
-	*
1615
-	* @param String $iso2 ISO2 country code
1616
-	* @return String the countrie
1617
-	*/
1613
+	 * Gets Country from iso2
1614
+	 *
1615
+	 * @param String $iso2 ISO2 country code
1616
+	 * @return String the countrie
1617
+	 */
1618 1618
 	public function getCountryFromISO2($iso2)
1619 1619
 	{
1620 1620
 		global $globalDBdriver, $globalDebug;
@@ -1642,11 +1642,11 @@  discard block
 block discarded – undo
1642 1642
 	}
1643 1643
 
1644 1644
 	/**
1645
-	* Gets all vessels types that have flown over
1646
-	*
1647
-	* @return Array the vessel type list
1648
-	*
1649
-	*/
1645
+	 * Gets all vessels types that have flown over
1646
+	 *
1647
+	 * @return Array the vessel type list
1648
+	 *
1649
+	 */
1650 1650
 	public function countAllTrackerTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '')
1651 1651
 	{
1652 1652
 		global $globalDBdriver;
@@ -1711,11 +1711,11 @@  discard block
 block discarded – undo
1711 1711
 	}
1712 1712
 
1713 1713
 	/**
1714
-	* Gets all the tracker information
1715
-	*
1716
-	* @return Array the tracker information
1717
-	*
1718
-	*/
1714
+	 * Gets all the tracker information
1715
+	 *
1716
+	 * @return Array the tracker information
1717
+	 *
1718
+	 */
1719 1719
 	public function searchTrackerData($q = '', $callsign = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '',$filters = array())
1720 1720
 	{
1721 1721
 		global $globalTimezone, $globalDBdriver;
@@ -1820,12 +1820,12 @@  discard block
 block discarded – undo
1820 1820
 	}
1821 1821
 
1822 1822
 	/**
1823
-	* Gets the short url from bit.ly
1824
-	*
1825
-	* @param String $url the full url
1826
-	* @return String the bit.ly url
1827
-	*
1828
-	*/
1823
+	 * Gets the short url from bit.ly
1824
+	 *
1825
+	 * @param String $url the full url
1826
+	 * @return String the bit.ly url
1827
+	 *
1828
+	 */
1829 1829
 	public function getBitlyURL($url)
1830 1830
 	{
1831 1831
 		global $globalBitlyAccessToken;
Please login to merge, or discard this patch.
require/class.Marine.php 1 patch
Indentation   +231 added lines, -231 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
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;
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Executes the SQL statements to get the spotter information
92
-	*
93
-	* @param String $query the SQL query
94
-	* @param Array $params parameter of the query
95
-	* @param String $limitQuery the limit query
96
-	* @return Array the spotter information
97
-	*
98
-	*/
91
+	 * Executes the SQL statements to get the spotter information
92
+	 *
93
+	 * @param String $query the SQL query
94
+	 * @param Array $params parameter of the query
95
+	 * @param String $limitQuery the limit query
96
+	 * @return Array the spotter information
97
+	 *
98
+	 */
99 99
 	public function getDataFromDB($query, $params = array(), $limitQuery = '',$schedules = false)
100 100
 	{
101 101
 		date_default_timezone_set('UTC');
@@ -230,11 +230,11 @@  discard block
 block discarded – undo
230 230
 	
231 231
 	
232 232
 	/**
233
-	* Gets all the spotter information based on the latest data entry
234
-	*
235
-	* @return Array the spotter information
236
-	*
237
-	*/
233
+	 * Gets all the spotter information based on the latest data entry
234
+	 *
235
+	 * @return Array the spotter information
236
+	 *
237
+	 */
238 238
 	public function getLatestMarineData($limit = '', $sort = '', $filter = array())
239 239
 	{
240 240
 		global $global_marine_query;
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
 	}
284 284
 
285 285
 	/**
286
-	* Gets all the spotter information based on the callsign
287
-	*
288
-	* @return Array the spotter information
289
-	*
290
-	*/
286
+	 * Gets all the spotter information based on the callsign
287
+	 *
288
+	 * @return Array the spotter information
289
+	 *
290
+	 */
291 291
 	public function getMarineDataByIdent($ident = '', $limit = '', $sort = '', $filter = array())
292 292
 	{
293 293
 		global $global_marine_query;
@@ -339,11 +339,11 @@  discard block
 block discarded – undo
339 339
 	}
340 340
 
341 341
 	/**
342
-	* Gets all the marine information based on the type
343
-	*
344
-	* @return Array the marine information
345
-	*
346
-	*/
342
+	 * Gets all the marine information based on the type
343
+	 *
344
+	 * @return Array the marine information
345
+	 *
346
+	 */
347 347
 	public function getMarineDataByType($type = '', $limit = '', $sort = '', $filter = array())
348 348
 	{
349 349
 		global $global_marine_query;
@@ -449,11 +449,11 @@  discard block
 block discarded – undo
449 449
 	}
450 450
 
451 451
 	/**
452
-	* Gets all the marine information based on the captain
453
-	*
454
-	* @return Array the marine information
455
-	*
456
-	*/
452
+	 * Gets all the marine information based on the captain
453
+	 *
454
+	 * @return Array the marine information
455
+	 *
456
+	 */
457 457
 	public function getMarineDataByCaptain($captain = '', $limit = '', $sort = '', $filter = array())
458 458
 	{
459 459
 		global $global_marine_query;
@@ -491,12 +491,12 @@  discard block
 block discarded – undo
491 491
 	}
492 492
 
493 493
 	/**
494
-	* Gets all source name
495
-	*
496
-	* @param String type format of source
497
-	* @return Array list of source name
498
-	*
499
-	*/
494
+	 * Gets all source name
495
+	 *
496
+	 * @param String type format of source
497
+	 * @return Array list of source name
498
+	 *
499
+	 */
500 500
 	public function getAllSourceName($type = '',$filters = array())
501 501
 	{
502 502
 		$filter_query = $this->getFilter($filters,true,true);
@@ -526,11 +526,11 @@  discard block
 block discarded – undo
526 526
 
527 527
 
528 528
 	/**
529
-	* Gets a list of all idents/callsigns
530
-	*
531
-	* @return Array list of ident/callsign names
532
-	*
533
-	*/
529
+	 * Gets a list of all idents/callsigns
530
+	 *
531
+	 * @return Array list of ident/callsign names
532
+	 *
533
+	 */
534 534
 	public function getAllIdents($filters = array())
535 535
 	{
536 536
 		$filter_query = $this->getFilter($filters,true,true);
@@ -554,11 +554,11 @@  discard block
 block discarded – undo
554 554
 	}
555 555
 
556 556
 	/**
557
-	* Gets all info from a mmsi
558
-	*
559
-	* @return Array ident
560
-	*
561
-	*/
557
+	 * Gets all info from a mmsi
558
+	 *
559
+	 * @return Array ident
560
+	 *
561
+	 */
562 562
 	public function getIdentity($mmsi)
563 563
 	{
564 564
 		$mmsi = filter_var($mmsi,FILTER_SANITIZE_NUMBER_INT);
@@ -571,9 +571,9 @@  discard block
 block discarded – undo
571 571
 	}
572 572
 
573 573
 	/**
574
-	* Add identity
575
-	*
576
-	*/
574
+	 * Add identity
575
+	 *
576
+	 */
577 577
 	public function addIdentity($mmsi,$imo,$ident,$callsign,$type)
578 578
 	{
579 579
 		$mmsi = filter_var($mmsi,FILTER_SANITIZE_NUMBER_INT);
@@ -639,13 +639,13 @@  discard block
 block discarded – undo
639 639
 	}
640 640
 
641 641
 	/**
642
-	* Update ident tracker data
643
-	*
644
-	* @param String $fammarine_id the ID
645
-	* @param String $ident the marine ident
646
-	* @return String success or false
647
-	*
648
-	*/
642
+	 * Update ident tracker data
643
+	 *
644
+	 * @param String $fammarine_id the ID
645
+	 * @param String $ident the marine ident
646
+	 * @return String success or false
647
+	 *
648
+	 */
649 649
 	public function updateIdentMarineData($fammarine_id = '', $ident = '',$fromsource = NULL)
650 650
 	{
651 651
 		$query = 'UPDATE marine_output SET ident = :ident WHERE fammarine_id = :fammarine_id';
@@ -660,13 +660,13 @@  discard block
 block discarded – undo
660 660
 	}
661 661
 
662 662
 	/**
663
-	* Update arrival marine data
664
-	*
665
-	* @param String $fammarine_id the ID
666
-	* @param String $arrival_code the marine ident
667
-	* @return String success or false
668
-	*
669
-	*/
663
+	 * Update arrival marine data
664
+	 *
665
+	 * @param String $fammarine_id the ID
666
+	 * @param String $arrival_code the marine ident
667
+	 * @return String success or false
668
+	 *
669
+	 */
670 670
 	public function updateArrivalPortNameMarineData($fammarine_id = '', $arrival_code = '',$fromsource = NULL)
671 671
 	{
672 672
 		$query = 'UPDATE marine_output SET arrival_port_name = :arrival_code WHERE fammarine_id = :fammarine_id';
@@ -681,19 +681,19 @@  discard block
 block discarded – undo
681 681
 	}
682 682
 
683 683
 	/**
684
-	* Update Status data
685
-	*
686
-	* @param String $fammarine_id the ID
687
-	* @param String $status_id the marine status id
688
-	* @param String $status the marine status
689
-	* @return String success or false
690
-	*
691
-	*/
684
+	 * Update Status data
685
+	 *
686
+	 * @param String $fammarine_id the ID
687
+	 * @param String $status_id the marine status id
688
+	 * @param String $status the marine status
689
+	 * @return String success or false
690
+	 *
691
+	 */
692 692
 	public function updateStatusMarineData($fammarine_id = '', $status_id = '',$status = '')
693 693
 	{
694 694
 
695 695
 		$query = 'UPDATE marine_output SET status = :status, status_id = :status_id WHERE fammarine_id = :fammarine_id';
696
-                $query_values = array(':fammarine_id' => $fammarine_id,':status' => $status,':status_id' => $status_id);
696
+				$query_values = array(':fammarine_id' => $fammarine_id,':status' => $status,':status_id' => $status_id);
697 697
 
698 698
 		try {
699 699
 			$sth = $this->db->prepare($query);
@@ -706,17 +706,17 @@  discard block
 block discarded – undo
706 706
 
707 707
 	}
708 708
 	/**
709
-	* Update latest marine data
710
-	*
711
-	* @param String $fammarine_id the ID
712
-	* @param String $ident the marine ident
713
-	* @return String success or false
714
-	*
715
-	*/	
709
+	 * Update latest marine data
710
+	 *
711
+	 * @param String $fammarine_id the ID
712
+	 * @param String $ident the marine ident
713
+	 * @return String success or false
714
+	 *
715
+	 */	
716 716
 	public function updateLatestMarineData($fammarine_id = '', $ident = '', $latitude = '', $longitude = '', $groundspeed = NULL, $date = '')
717 717
 	{
718 718
 		$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';
719
-                $query_values = array(':fammarine_id' => $fammarine_id,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident);
719
+				$query_values = array(':fammarine_id' => $fammarine_id,':last_latitude' => $latitude,':last_longitude' => $longitude, ':last_ground_speed' => $groundspeed,':last_seen' => $date,':ident' => $ident);
720 720
 
721 721
 		try {
722 722
 			$sth = $this->db->prepare($query);
@@ -730,30 +730,30 @@  discard block
 block discarded – undo
730 730
 	}
731 731
 
732 732
 	/**
733
-	* Adds a new spotter data
734
-	*
735
-	* @param String $fammarine_id the ID
736
-	* @param String $ident the marine ident
737
-	* @param String $departure_airport_icao the departure airport
738
-	* @param String $arrival_airport_icao the arrival airport
739
-	* @param String $latitude latitude of flight
740
-	* @param String $longitude latitude of flight
741
-	* @param String $waypoints waypoints of flight
742
-	* @param String $heading heading of flight
743
-	* @param String $groundspeed speed of flight
744
-	* @param String $date date of flight
745
-	* @param String $departure_airport_time departure time of flight
746
-	* @param String $arrival_airport_time arrival time of flight
747
-	* @param String $squawk squawk code of flight
748
-	* @param String $route_stop route stop of flight
749
-	* @param String $highlight highlight or not
750
-	* @param String $ModeS ModesS code of flight
751
-	* @param String $registration registration code of flight
752
-	* @param String $pilot_id pilot id of flight (for virtual airlines)
753
-	* @param String $pilot_name pilot name of flight (for virtual airlines)
754
-	* @param String $verticalrate vertival rate of flight
755
-	* @return String success or false
756
-	*/
733
+	 * Adds a new spotter data
734
+	 *
735
+	 * @param String $fammarine_id the ID
736
+	 * @param String $ident the marine ident
737
+	 * @param String $departure_airport_icao the departure airport
738
+	 * @param String $arrival_airport_icao the arrival airport
739
+	 * @param String $latitude latitude of flight
740
+	 * @param String $longitude latitude of flight
741
+	 * @param String $waypoints waypoints of flight
742
+	 * @param String $heading heading of flight
743
+	 * @param String $groundspeed speed of flight
744
+	 * @param String $date date of flight
745
+	 * @param String $departure_airport_time departure time of flight
746
+	 * @param String $arrival_airport_time arrival time of flight
747
+	 * @param String $squawk squawk code of flight
748
+	 * @param String $route_stop route stop of flight
749
+	 * @param String $highlight highlight or not
750
+	 * @param String $ModeS ModesS code of flight
751
+	 * @param String $registration registration code of flight
752
+	 * @param String $pilot_id pilot id of flight (for virtual airlines)
753
+	 * @param String $pilot_name pilot name of flight (for virtual airlines)
754
+	 * @param String $verticalrate vertival rate of flight
755
+	 * @return String success or false
756
+	 */
757 757
 	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 = '', $captain_id = '',$captain_name = '',$race_id = '', $race_name = '')
758 758
 	{
759 759
 		global $globalURL, $globalMarineImageFetch;
@@ -881,11 +881,11 @@  discard block
 block discarded – undo
881 881
 	
882 882
   
883 883
 	/**
884
-	* Gets the aircraft ident within the last hour
885
-	*
886
-	* @return String the ident
887
-	*
888
-	*/
884
+	 * Gets the aircraft ident within the last hour
885
+	 *
886
+	 * @return String the ident
887
+	 *
888
+	 */
889 889
 	public function getIdentFromLastHour($ident)
890 890
 	{
891 891
 		global $globalDBdriver, $globalTimezone;
@@ -901,11 +901,11 @@  discard block
 block discarded – undo
901 901
 								AND marine_output.date >= now() AT TIME ZONE 'UTC' - INTERVAL '1 HOURS'
902 902
 								AND marine_output.date < now() AT TIME ZONE 'UTC'";
903 903
 			$query_data = array(':ident' => $ident);
904
-    		}
904
+			}
905 905
 		
906 906
 		$sth = $this->db->prepare($query);
907 907
 		$sth->execute($query_data);
908
-    		$ident_result='';
908
+			$ident_result='';
909 909
 		while($row = $sth->fetch(PDO::FETCH_ASSOC))
910 910
 		{
911 911
 			$ident_result = $row['ident'];
@@ -916,11 +916,11 @@  discard block
 block discarded – undo
916 916
 	
917 917
 	
918 918
 	/**
919
-	* Gets the aircraft data from the last 20 seconds
920
-	*
921
-	* @return Array the spotter data
922
-	*
923
-	*/
919
+	 * Gets the aircraft data from the last 20 seconds
920
+	 *
921
+	 * @return Array the spotter data
922
+	 *
923
+	 */
924 924
 	public function getRealTimeData($q = '')
925 925
 	{
926 926
 		global $globalDBdriver;
@@ -958,11 +958,11 @@  discard block
 block discarded – undo
958 958
 	
959 959
 
960 960
 	/**
961
-	* Gets all number of flight over countries
962
-	*
963
-	* @return Array the airline country list
964
-	*
965
-	*/
961
+	 * Gets all number of flight over countries
962
+	 *
963
+	 * @return Array the airline country list
964
+	 *
965
+	 */
966 966
 
967 967
 	public function countAllMarineOverCountries($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array())
968 968
 	{
@@ -1035,11 +1035,11 @@  discard block
 block discarded – undo
1035 1035
 	
1036 1036
 	
1037 1037
 	/**
1038
-	* Gets all callsigns that have flown over
1039
-	*
1040
-	* @return Array the callsign list
1041
-	*
1042
-	*/
1038
+	 * Gets all callsigns that have flown over
1039
+	 *
1040
+	 * @return Array the callsign list
1041
+	 *
1042
+	 */
1043 1043
 	public function countAllCallsigns($limit = true, $olderthanmonths = 0, $sincedate = '',$filters = array(),$year = '', $month = '', $day = '')
1044 1044
 	{
1045 1045
 		global $globalDBdriver;
@@ -1106,11 +1106,11 @@  discard block
 block discarded – undo
1106 1106
 
1107 1107
 
1108 1108
 	/**
1109
-	* Counts all dates
1110
-	*
1111
-	* @return Array the date list
1112
-	*
1113
-	*/
1109
+	 * Counts all dates
1110
+	 *
1111
+	 * @return Array the date list
1112
+	 *
1113
+	 */
1114 1114
 	public function countAllDates($filters = array())
1115 1115
 	{
1116 1116
 		global $globalTimezone, $globalDBdriver;
@@ -1156,11 +1156,11 @@  discard block
 block discarded – undo
1156 1156
 	
1157 1157
 	
1158 1158
 	/**
1159
-	* Counts all dates during the last 7 days
1160
-	*
1161
-	* @return Array the date list
1162
-	*
1163
-	*/
1159
+	 * Counts all dates during the last 7 days
1160
+	 *
1161
+	 * @return Array the date list
1162
+	 *
1163
+	 */
1164 1164
 	public function countAllDatesLast7Days($filters = array())
1165 1165
 	{
1166 1166
 		global $globalTimezone, $globalDBdriver;
@@ -1182,7 +1182,7 @@  discard block
 block discarded – undo
1182 1182
 			$query .= " GROUP BY date_name 
1183 1183
 								ORDER BY date_name ASC";
1184 1184
 			$query_data = array(':offset' => $offset);
1185
-    		}
1185
+			}
1186 1186
 		
1187 1187
 		$sth = $this->db->prepare($query);
1188 1188
 		$sth->execute($query_data);
@@ -1202,11 +1202,11 @@  discard block
 block discarded – undo
1202 1202
 	}
1203 1203
 
1204 1204
 	/**
1205
-	* Counts all dates during the last month
1206
-	*
1207
-	* @return Array the date list
1208
-	*
1209
-	*/
1205
+	 * Counts all dates during the last month
1206
+	 *
1207
+	 * @return Array the date list
1208
+	 *
1209
+	 */
1210 1210
 	public function countAllDatesLastMonth($filters = array())
1211 1211
 	{
1212 1212
 		global $globalTimezone, $globalDBdriver;
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
 			$query .= " GROUP BY date_name 
1229 1229
 								ORDER BY date_name ASC";
1230 1230
 			$query_data = array(':offset' => $offset);
1231
-    		}
1231
+			}
1232 1232
 		
1233 1233
 		$sth = $this->db->prepare($query);
1234 1234
 		$sth->execute($query_data);
@@ -1250,11 +1250,11 @@  discard block
 block discarded – undo
1250 1250
 
1251 1251
 
1252 1252
 	/**
1253
-	* Counts all month
1254
-	*
1255
-	* @return Array the month list
1256
-	*
1257
-	*/
1253
+	 * Counts all month
1254
+	 *
1255
+	 * @return Array the month list
1256
+	 *
1257
+	 */
1258 1258
 	public function countAllMonths($filters = array())
1259 1259
 	{
1260 1260
 		global $globalTimezone, $globalDBdriver;
@@ -1299,11 +1299,11 @@  discard block
 block discarded – undo
1299 1299
 	
1300 1300
 
1301 1301
 	/**
1302
-	* Counts all dates during the last year
1303
-	*
1304
-	* @return Array the date list
1305
-	*
1306
-	*/
1302
+	 * Counts all dates during the last year
1303
+	 *
1304
+	 * @return Array the date list
1305
+	 *
1306
+	 */
1307 1307
 	public function countAllMonthsLastYear($filters)
1308 1308
 	{
1309 1309
 		global $globalTimezone, $globalDBdriver;
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
 			$query .= " GROUP BY year_name, month_name
1326 1326
 								ORDER BY year_name, month_name ASC";
1327 1327
 			$query_data = array(':offset' => $offset);
1328
-    		}
1328
+			}
1329 1329
 		
1330 1330
 		$sth = $this->db->prepare($query);
1331 1331
 		$sth->execute($query_data);
@@ -1348,11 +1348,11 @@  discard block
 block discarded – undo
1348 1348
 	
1349 1349
 	
1350 1350
 	/**
1351
-	* Counts all hours
1352
-	*
1353
-	* @return Array the hour list
1354
-	*
1355
-	*/
1351
+	 * Counts all hours
1352
+	 *
1353
+	 * @return Array the hour list
1354
+	 *
1355
+	 */
1356 1356
 	public function countAllHours($orderby,$filters = array())
1357 1357
 	{
1358 1358
 		global $globalTimezone, $globalDBdriver;
@@ -1415,11 +1415,11 @@  discard block
 block discarded – undo
1415 1415
 	
1416 1416
 	
1417 1417
 	/**
1418
-	* Counts all hours by date
1419
-	*
1420
-	* @return Array the hour list
1421
-	*
1422
-	*/
1418
+	 * Counts all hours by date
1419
+	 *
1420
+	 * @return Array the hour list
1421
+	 *
1422
+	 */
1423 1423
 	public function countAllHoursByDate($date, $filters = array())
1424 1424
 	{
1425 1425
 		global $globalTimezone, $globalDBdriver;
@@ -1463,11 +1463,11 @@  discard block
 block discarded – undo
1463 1463
 	
1464 1464
 	
1465 1465
 	/**
1466
-	* Counts all hours by a ident/callsign
1467
-	*
1468
-	* @return Array the hour list
1469
-	*
1470
-	*/
1466
+	 * Counts all hours by a ident/callsign
1467
+	 *
1468
+	 * @return Array the hour list
1469
+	 *
1470
+	 */
1471 1471
 	public function countAllHoursByIdent($ident, $filters = array())
1472 1472
 	{
1473 1473
 		global $globalTimezone, $globalDBdriver;
@@ -1512,11 +1512,11 @@  discard block
 block discarded – undo
1512 1512
 	
1513 1513
 	
1514 1514
 	/**
1515
-	* Counts all vessels
1516
-	*
1517
-	* @return Integer the number of vessels
1518
-	*
1519
-	*/
1515
+	 * Counts all vessels
1516
+	 *
1517
+	 * @return Integer the number of vessels
1518
+	 *
1519
+	 */
1520 1520
 	public function countOverallMarine($filters = array(),$year = '',$month = '')
1521 1521
 	{
1522 1522
 		global $globalDBdriver;
@@ -1551,11 +1551,11 @@  discard block
 block discarded – undo
1551 1551
 	}
1552 1552
 	
1553 1553
 	/**
1554
-	* Counts all vessel type
1555
-	*
1556
-	* @return Integer the number of vessels
1557
-	*
1558
-	*/
1554
+	 * Counts all vessel type
1555
+	 *
1556
+	 * @return Integer the number of vessels
1557
+	 *
1558
+	 */
1559 1559
 	public function countOverallMarineTypes($filters = array(),$year = '',$month = '')
1560 1560
 	{
1561 1561
 		global $globalDBdriver;
@@ -1590,11 +1590,11 @@  discard block
 block discarded – undo
1590 1590
 	
1591 1591
   
1592 1592
 	/**
1593
-	* Counts all hours of today
1594
-	*
1595
-	* @return Array the hour list
1596
-	*
1597
-	*/
1593
+	 * Counts all hours of today
1594
+	 *
1595
+	 * @return Array the hour list
1596
+	 *
1597
+	 */
1598 1598
 	public function countAllHoursFromToday($filters = array())
1599 1599
 	{
1600 1600
 		global $globalTimezone, $globalDBdriver;
@@ -1634,12 +1634,12 @@  discard block
 block discarded – undo
1634 1634
 	}
1635 1635
     
1636 1636
     
1637
-     /**
1638
-	* Gets the Barrie Spotter ID based on the FlightAware ID
1639
-	*
1640
-	* @return Integer the Barrie Spotter ID
1637
+	 /**
1638
+	  * Gets the Barrie Spotter ID based on the FlightAware ID
1639
+	  *
1640
+	  * @return Integer the Barrie Spotter ID
1641 1641
 q	*
1642
-	*/
1642
+	  */
1643 1643
 	public function getMarineIDBasedOnFamMarineID($fammarine_id)
1644 1644
 	{
1645 1645
 		$fammarine_id = filter_var($fammarine_id,FILTER_SANITIZE_STRING);
@@ -1660,13 +1660,13 @@  discard block
 block discarded – undo
1660 1660
   
1661 1661
  
1662 1662
 	/**
1663
-	* Parses a date string
1664
-	*
1665
-	* @param String $dateString the date string
1666
-	* @param String $timezone the timezone of a user
1667
-	* @return Array the time information
1668
-	*
1669
-	*/
1663
+	 * Parses a date string
1664
+	 *
1665
+	 * @param String $dateString the date string
1666
+	 * @param String $timezone the timezone of a user
1667
+	 * @return Array the time information
1668
+	 *
1669
+	 */
1670 1670
 	public function parseDateString($dateString, $timezone = '')
1671 1671
 	{
1672 1672
 		$time_array = array();
@@ -1699,12 +1699,12 @@  discard block
 block discarded – undo
1699 1699
 	}
1700 1700
 	
1701 1701
 	/**
1702
-	* Parses the direction degrees to working
1703
-	*
1704
-	* @param Float $direction the direction in degrees
1705
-	* @return Array the direction information
1706
-	*
1707
-	*/
1702
+	 * Parses the direction degrees to working
1703
+	 *
1704
+	 * @param Float $direction the direction in degrees
1705
+	 * @return Array the direction information
1706
+	 *
1707
+	 */
1708 1708
 	public function parseDirection($direction = 0)
1709 1709
 	{
1710 1710
 		if ($direction == '') $direction = 0;
@@ -1783,12 +1783,12 @@  discard block
 block discarded – undo
1783 1783
 	
1784 1784
 	
1785 1785
 	/**
1786
-	* Gets Country from latitude/longitude
1787
-	*
1788
-	* @param Float $latitude latitute of the flight
1789
-	* @param Float $longitude longitute of the flight
1790
-	* @return String the countrie
1791
-	*/
1786
+	 * Gets Country from latitude/longitude
1787
+	 *
1788
+	 * @param Float $latitude latitute of the flight
1789
+	 * @param Float $longitude longitute of the flight
1790
+	 * @return String the countrie
1791
+	 */
1792 1792
 	public function getCountryFromLatitudeLongitude($latitude,$longitude)
1793 1793
 	{
1794 1794
 		global $globalDBdriver, $globalDebug;
@@ -1825,11 +1825,11 @@  discard block
 block discarded – undo
1825 1825
 	}
1826 1826
 
1827 1827
 	/**
1828
-	* Gets Country from iso2
1829
-	*
1830
-	* @param String $iso2 ISO2 country code
1831
-	* @return String the countrie
1832
-	*/
1828
+	 * Gets Country from iso2
1829
+	 *
1830
+	 * @param String $iso2 ISO2 country code
1831
+	 * @return String the countrie
1832
+	 */
1833 1833
 	public function getCountryFromISO2($iso2)
1834 1834
 	{
1835 1835
 		global $globalDBdriver, $globalDebug;
@@ -1858,12 +1858,12 @@  discard block
 block discarded – undo
1858 1858
 
1859 1859
 	
1860 1860
 	/**
1861
-	* Gets the short url from bit.ly
1862
-	*
1863
-	* @param String $url the full url
1864
-	* @return String the bit.ly url
1865
-	*
1866
-	*/
1861
+	 * Gets the short url from bit.ly
1862
+	 *
1863
+	 * @param String $url the full url
1864
+	 * @return String the bit.ly url
1865
+	 *
1866
+	 */
1867 1867
 	public function getBitlyURL($url)
1868 1868
 	{
1869 1869
 		global $globalBitlyAccessToken;
@@ -1890,11 +1890,11 @@  discard block
 block discarded – undo
1890 1890
 
1891 1891
 	
1892 1892
 	/**
1893
-	* Gets all vessels types that have flown over
1894
-	*
1895
-	* @return Array the vessel type list
1896
-	*
1897
-	*/
1893
+	 * Gets all vessels types that have flown over
1894
+	 *
1895
+	 * @return Array the vessel type list
1896
+	 *
1897
+	 */
1898 1898
 	public function countAllMarineTypes($limit = true,$olderthanmonths = 0,$sincedate = '',$filters = array(),$year = '',$month = '',$day = '')
1899 1899
 	{
1900 1900
 		global $globalDBdriver;
@@ -1960,11 +1960,11 @@  discard block
 block discarded – undo
1960 1960
 	}
1961 1961
 
1962 1962
 	/**
1963
-	* Gets all the tracker information
1964
-	*
1965
-	* @return Array the tracker information
1966
-	*
1967
-	*/
1963
+	 * Gets all the tracker information
1964
+	 *
1965
+	 * @return Array the tracker information
1966
+	 *
1967
+	 */
1968 1968
 	public function searchMarineData($q = '', $callsign = '',$mmsi = '', $imo = '', $date_posted = '', $limit = '', $sort = '', $includegeodata = '',$origLat = '',$origLon = '',$dist = '',$filters = array())
1969 1969
 	{
1970 1970
 		global $globalTimezone, $globalDBdriver;
Please login to merge, or discard this patch.