@@ -22,14 +22,14 @@ discard block |
||
22 | 22 | if ($this->db === null) die('Error: No DB connection. (Image)'); |
23 | 23 | } |
24 | 24 | |
25 | - /** |
|
26 | - * Gets the images based on the aircraft registration |
|
27 | - * |
|
28 | - * @param $registration |
|
29 | - * @param string $aircraft_icao |
|
30 | - * @param string $airline_icao |
|
31 | - * @return array the images list |
|
32 | - */ |
|
25 | + /** |
|
26 | + * Gets the images based on the aircraft registration |
|
27 | + * |
|
28 | + * @param $registration |
|
29 | + * @param string $aircraft_icao |
|
30 | + * @param string $airline_icao |
|
31 | + * @return array the images list |
|
32 | + */ |
|
33 | 33 | public function getSpotterImage($registration,$aircraft_icao = '', $airline_icao = '') |
34 | 34 | { |
35 | 35 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -49,15 +49,15 @@ discard block |
||
49 | 49 | else return array(); |
50 | 50 | } |
51 | 51 | |
52 | - /** |
|
53 | - * Gets the images based on the ship name |
|
54 | - * |
|
55 | - * @param $mmsi |
|
56 | - * @param string $imo |
|
57 | - * @param string $name |
|
58 | - * @param string $type_name |
|
59 | - * @return array the images list |
|
60 | - */ |
|
52 | + /** |
|
53 | + * Gets the images based on the ship name |
|
54 | + * |
|
55 | + * @param $mmsi |
|
56 | + * @param string $imo |
|
57 | + * @param string $name |
|
58 | + * @param string $type_name |
|
59 | + * @return array the images list |
|
60 | + */ |
|
61 | 61 | public function getMarineImage($mmsi,$imo = '',$name = '',$type_name = '') |
62 | 62 | { |
63 | 63 | global $globalMarineImagePics; |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | return $result; |
95 | 95 | } |
96 | 96 | |
97 | - /** |
|
98 | - * Gets the image copyright based on the Exif data |
|
99 | - * |
|
100 | - * @param $url |
|
101 | - * @return String image copyright |
|
102 | - */ |
|
97 | + /** |
|
98 | + * Gets the image copyright based on the Exif data |
|
99 | + * |
|
100 | + * @param $url |
|
101 | + * @return String image copyright |
|
102 | + */ |
|
103 | 103 | public function getExifCopyright($url) { |
104 | 104 | $exif = exif_read_data($url); |
105 | 105 | $copyright = ''; |
@@ -113,14 +113,14 @@ discard block |
||
113 | 113 | return $copyright; |
114 | 114 | } |
115 | 115 | |
116 | - /** |
|
117 | - * Adds the images based on the aircraft registration |
|
118 | - * |
|
119 | - * @param $registration |
|
120 | - * @param string $aircraft_icao |
|
121 | - * @param string $airline_icao |
|
122 | - * @return String either success or error |
|
123 | - */ |
|
116 | + /** |
|
117 | + * Adds the images based on the aircraft registration |
|
118 | + * |
|
119 | + * @param $registration |
|
120 | + * @param string $aircraft_icao |
|
121 | + * @param string $airline_icao |
|
122 | + * @return String either success or error |
|
123 | + */ |
|
124 | 124 | public function addSpotterImage($registration,$aircraft_icao = '', $airline_icao = '') |
125 | 125 | { |
126 | 126 | global $globalDebug,$globalAircraftImageFetch, $globalOffline; |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | return "success"; |
148 | 148 | } |
149 | 149 | |
150 | - /** |
|
151 | - * Adds the images based on the marine name |
|
152 | - * |
|
153 | - * @param $mmsi |
|
154 | - * @param string $imo |
|
155 | - * @param string $name |
|
156 | - * @return String either success or error |
|
157 | - */ |
|
150 | + /** |
|
151 | + * Adds the images based on the marine name |
|
152 | + * |
|
153 | + * @param $mmsi |
|
154 | + * @param string $imo |
|
155 | + * @param string $name |
|
156 | + * @return String either success or error |
|
157 | + */ |
|
158 | 158 | public function addMarineImage($mmsi,$imo = '',$name = '') |
159 | 159 | { |
160 | 160 | global $globalDebug,$globalMarineImageFetch, $globalOffline; |
@@ -190,14 +190,14 @@ discard block |
||
190 | 190 | return "success"; |
191 | 191 | } |
192 | 192 | |
193 | - /** |
|
194 | - * Gets the aircraft image |
|
195 | - * |
|
196 | - * @param String $aircraft_registration the registration of the aircraft |
|
197 | - * @param string $aircraft_icao |
|
198 | - * @param string $airline_icao |
|
199 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
200 | - */ |
|
193 | + /** |
|
194 | + * Gets the aircraft image |
|
195 | + * |
|
196 | + * @param String $aircraft_registration the registration of the aircraft |
|
197 | + * @param string $aircraft_icao |
|
198 | + * @param string $airline_icao |
|
199 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
200 | + */ |
|
201 | 201 | public function findAircraftImage($aircraft_registration, $aircraft_icao = '', $airline_icao = '') |
202 | 202 | { |
203 | 203 | global $globalAircraftImageSources, $globalIVAO, $globalAircraftImageCheckICAO, $globalVA; |
@@ -241,14 +241,14 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
244 | - * Gets the vessel image |
|
245 | - * |
|
246 | - * @param String $mmsi the vessel mmsi |
|
247 | - * @param String $imo the vessel imo |
|
248 | - * @param String $name the vessel name |
|
249 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
250 | - * |
|
251 | - */ |
|
244 | + * Gets the vessel image |
|
245 | + * |
|
246 | + * @param String $mmsi the vessel mmsi |
|
247 | + * @param String $imo the vessel imo |
|
248 | + * @param String $name the vessel name |
|
249 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
250 | + * |
|
251 | + */ |
|
252 | 252 | public function findMarineImage($mmsi,$imo = '',$name = '') |
253 | 253 | { |
254 | 254 | global $globalMarineImageSources; |
@@ -282,13 +282,13 @@ discard block |
||
282 | 282 | } |
283 | 283 | |
284 | 284 | /** |
285 | - * Gets the aircraft image from Planespotters |
|
286 | - * |
|
287 | - * @param String $aircraft_registration the registration of the aircraft |
|
288 | - * @param String $aircraft_name type of the aircraft |
|
289 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
290 | - * |
|
291 | - */ |
|
285 | + * Gets the aircraft image from Planespotters |
|
286 | + * |
|
287 | + * @param String $aircraft_registration the registration of the aircraft |
|
288 | + * @param String $aircraft_name type of the aircraft |
|
289 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
290 | + * |
|
291 | + */ |
|
292 | 292 | public function fromPlanespotters($type,$aircraft_registration, $aircraft_name='') { |
293 | 293 | $Common = new Common(); |
294 | 294 | // If aircraft registration is only number, also check with aircraft model |
@@ -315,14 +315,14 @@ discard block |
||
315 | 315 | return array('thumbnail' => '','original' => '', 'copyright' => '','source' => '','source_website' => ''); |
316 | 316 | } |
317 | 317 | |
318 | - /** |
|
319 | - * Gets the aircraft image from Deviantart |
|
320 | - * |
|
321 | - * @param $type |
|
322 | - * @param String $registration the registration of the aircraft |
|
323 | - * @param String $name type of the aircraft |
|
324 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
325 | - */ |
|
318 | + /** |
|
319 | + * Gets the aircraft image from Deviantart |
|
320 | + * |
|
321 | + * @param $type |
|
322 | + * @param String $registration the registration of the aircraft |
|
323 | + * @param String $name type of the aircraft |
|
324 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
325 | + */ |
|
326 | 326 | public function fromDeviantart($type,$registration, $name='') { |
327 | 327 | $Common = new Common(); |
328 | 328 | if ($type == 'aircraft') { |
@@ -356,13 +356,13 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | /** |
359 | - * Gets the aircraft image from JetPhotos |
|
360 | - * |
|
361 | - * @param String $aircraft_registration the registration of the aircraft |
|
362 | - * @param String $aircraft_name type of the aircraft |
|
363 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
364 | - * |
|
365 | - */ |
|
359 | + * Gets the aircraft image from JetPhotos |
|
360 | + * |
|
361 | + * @param String $aircraft_registration the registration of the aircraft |
|
362 | + * @param String $aircraft_name type of the aircraft |
|
363 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
364 | + * |
|
365 | + */ |
|
366 | 366 | public function fromJetPhotos($type,$aircraft_registration, $aircraft_name='') { |
367 | 367 | $Common = new Common(); |
368 | 368 | $url= 'http://jetphotos.net/showphotos.php?displaymode=2®search='.$aircraft_registration; |
@@ -398,13 +398,13 @@ discard block |
||
398 | 398 | } |
399 | 399 | |
400 | 400 | /** |
401 | - * Gets the aircraft image from PlanePictures |
|
402 | - * |
|
403 | - * @param String $aircraft_registration the registration of the aircraft |
|
404 | - * @param String $aircraft_name type of the aircraft |
|
405 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
406 | - * |
|
407 | - */ |
|
401 | + * Gets the aircraft image from PlanePictures |
|
402 | + * |
|
403 | + * @param String $aircraft_registration the registration of the aircraft |
|
404 | + * @param String $aircraft_name type of the aircraft |
|
405 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
406 | + * |
|
407 | + */ |
|
408 | 408 | public function fromPlanePictures($type,$aircraft_registration, $aircraft_name='') { |
409 | 409 | $Common = new Common(); |
410 | 410 | $url= 'http://www.planepictures.net/netsearch4.cgi?srch='.$aircraft_registration.'&stype=reg&srng=2'; |
@@ -432,13 +432,13 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | /** |
435 | - * Gets the aircraft image from Flickr |
|
436 | - * |
|
437 | - * @param String $registration the registration of the aircraft |
|
438 | - * @param String $name type of the aircraft |
|
439 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
440 | - * |
|
441 | - */ |
|
435 | + * Gets the aircraft image from Flickr |
|
436 | + * |
|
437 | + * @param String $registration the registration of the aircraft |
|
438 | + * @param String $name type of the aircraft |
|
439 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
440 | + * |
|
441 | + */ |
|
442 | 442 | public function fromFlickr($type,$registration,$name='') { |
443 | 443 | $Common = new Common(); |
444 | 444 | if ($type == 'aircraft') { |
@@ -465,13 +465,13 @@ discard block |
||
465 | 465 | return array('thumbnail' => '','original' => '', 'copyright' => '','source' => '','source_website' => ''); |
466 | 466 | } |
467 | 467 | |
468 | - /** |
|
469 | - * @param $type |
|
470 | - * @param $aircraft_icao |
|
471 | - * @param $airline_icao |
|
472 | - * @return array |
|
473 | - */ |
|
474 | - public function fromIvaoMtl($type, $aircraft_icao, $airline_icao) { |
|
468 | + /** |
|
469 | + * @param $type |
|
470 | + * @param $aircraft_icao |
|
471 | + * @param $airline_icao |
|
472 | + * @return array |
|
473 | + */ |
|
474 | + public function fromIvaoMtl($type, $aircraft_icao, $airline_icao) { |
|
475 | 475 | $Common = new Common(); |
476 | 476 | //echo "\n".'SEARCH IMAGE : http://mtlcatalog.ivao.aero/images/aircraft/'.$aircraft_icao.$airline_icao.'.jpg'; |
477 | 477 | if ($Common->urlexist('http://mtlcatalog.ivao.aero/images/aircraft/'.$aircraft_icao.$airline_icao.'.jpg')) { |
@@ -487,14 +487,14 @@ discard block |
||
487 | 487 | } |
488 | 488 | } |
489 | 489 | |
490 | - /** |
|
491 | - * Gets the aircraft image from Bing |
|
492 | - * |
|
493 | - * @param $type |
|
494 | - * @param String $aircraft_registration the registration of the aircraft |
|
495 | - * @param String $aircraft_name type of the aircraft |
|
496 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
497 | - */ |
|
490 | + /** |
|
491 | + * Gets the aircraft image from Bing |
|
492 | + * |
|
493 | + * @param $type |
|
494 | + * @param String $aircraft_registration the registration of the aircraft |
|
495 | + * @param String $aircraft_name type of the aircraft |
|
496 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
497 | + */ |
|
498 | 498 | public function fromBing($type,$aircraft_registration,$aircraft_name='') { |
499 | 499 | global $globalImageBingKey; |
500 | 500 | $Common = new Common(); |
@@ -525,14 +525,14 @@ discard block |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | /** |
528 | - * Gets the aircraft image from airport-data |
|
529 | - * |
|
530 | - * @param String $aircraft_registration the registration of the aircraft |
|
531 | - * @param String $aircraft_icao the icao code of the aircraft |
|
532 | - * @param String $aircraft_name type of the aircraft |
|
533 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
534 | - * |
|
535 | - */ |
|
528 | + * Gets the aircraft image from airport-data |
|
529 | + * |
|
530 | + * @param String $aircraft_registration the registration of the aircraft |
|
531 | + * @param String $aircraft_icao the icao code of the aircraft |
|
532 | + * @param String $aircraft_name type of the aircraft |
|
533 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
534 | + * |
|
535 | + */ |
|
536 | 536 | public function fromAirportData($type,$aircraft_registration,$aircraft_icao,$aircraft_name='') { |
537 | 537 | $Common = new Common(); |
538 | 538 | $url = 'http://www.airport-data.com/api/ac_thumb.json?&n=1&r='.$aircraft_registration.'&m='.$aircraft_icao; |
@@ -551,13 +551,13 @@ discard block |
||
551 | 551 | } |
552 | 552 | |
553 | 553 | /** |
554 | - * Gets image from WikiMedia |
|
555 | - * |
|
556 | - * @param String $registration the registration of the aircraft/mmsi |
|
557 | - * @param String $name name |
|
558 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
559 | - * |
|
560 | - */ |
|
554 | + * Gets image from WikiMedia |
|
555 | + * |
|
556 | + * @param String $registration the registration of the aircraft/mmsi |
|
557 | + * @param String $name name |
|
558 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
559 | + * |
|
560 | + */ |
|
561 | 561 | public function fromWikimedia($type,$registration,$name='') { |
562 | 562 | $Common = new Common(); |
563 | 563 | if ($type == 'aircraft') { |
@@ -612,13 +612,13 @@ discard block |
||
612 | 612 | } |
613 | 613 | |
614 | 614 | /** |
615 | - * Gets the aircraft image from custom url |
|
616 | - * |
|
617 | - * @param String $registration the registration of the aircraft |
|
618 | - * @param String $name type of the aircraft |
|
619 | - * @return array the aircraft thumbnail, orignal url and copyright |
|
620 | - * |
|
621 | - */ |
|
615 | + * Gets the aircraft image from custom url |
|
616 | + * |
|
617 | + * @param String $registration the registration of the aircraft |
|
618 | + * @param String $name type of the aircraft |
|
619 | + * @return array the aircraft thumbnail, orignal url and copyright |
|
620 | + * |
|
621 | + */ |
|
622 | 622 | public function fromCustomSource($type,$registration,$name='') { |
623 | 623 | global $globalAircraftImageCustomSources, $globalMarineImageCustomSources, $globalDebug; |
624 | 624 | //$globalAircraftImageCustomSource[] = array('thumbnail' => '','original' => '', 'copyright' => '', 'source_website' => '', 'source' => '','exif' => true); |