@@ -254,16 +254,16 @@ discard block |
||
254 | 254 | <div class="more"> |
255 | 255 | <?php |
256 | 256 | |
257 | - if ($year != '' && $month != '') { |
|
258 | - ?> |
|
257 | + if ($year != '' && $month != '') { |
|
258 | + ?> |
|
259 | 259 | <a href="<?php print $globalURL; ?>/marine/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
260 | 260 | <?php |
261 | - } else { |
|
262 | - ?> |
|
261 | + } else { |
|
262 | + ?> |
|
263 | 263 | <a href="<?php print $globalURL; ?>/marine/statistics/type" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
264 | 264 | <?php |
265 | - } |
|
266 | - ?> |
|
265 | + } |
|
266 | + ?> |
|
267 | 267 | </div> |
268 | 268 | </div> |
269 | 269 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | ?> |
298 | 298 | <div class="more"> |
299 | 299 | <?php |
300 | - /* |
|
300 | + /* |
|
301 | 301 | if ($year != '' && $month != '') { |
302 | 302 | ?> |
303 | 303 | <a href="<?php print $globalURL; ?>/tracker/statistics/type/<?php echo $year; ?>/<?php echo $month ?>/" class="btn btn-default btn" role="button"><?php echo _("See full statistic"); ?>»</a> |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | <?php |
309 | 309 | } |
310 | 310 | */ |
311 | - ?> |
|
311 | + ?> |
|
312 | 312 | </div> |
313 | 313 | </div> |
314 | 314 | <!-- <?php print 'Time elapsed : '.(microtime(true)-$beginpage).'s' ?> --> |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | </form> |
8 | 8 | </div> |
9 | 9 | <?php |
10 | - if (isset($owner)) { |
|
10 | + if (isset($owner)) { |
|
11 | 11 | ?> |
12 | 12 | <div class="sub-menu sub-menu-container"> |
13 | 13 | <ul class="nav nav-pills"> |
@@ -38,5 +38,5 @@ discard block |
||
38 | 38 | </ul> |
39 | 39 | </div> |
40 | 40 | <?php |
41 | - } |
|
41 | + } |
|
42 | 42 | ?> |
43 | 43 | \ No newline at end of file |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $id = $spotter_item['Waypoint']['@attributes']['id']; |
24 | 24 | if ($id == 0 || !is_numeric($id)) $id = $j; |
25 | 25 | $output .= '{"type": "Feature",'; |
26 | - $output .= '"id": '.$id.','; |
|
27 | - $output .= '"properties": {'; |
|
26 | + $output .= '"id": '.$id.','; |
|
27 | + $output .= '"properties": {'; |
|
28 | 28 | $output .= '"type": "'.$spotter_item['@attributes']['type'].'",'; |
29 | 29 | //$output .= '"id": "'.$spotter_item['Waypoint']['@attributes']['id'].'",'; |
30 | 30 | $output .= '"name": "'.$spotter_item['Waypoint']['@attributes']['name'].'",'; |
@@ -35,31 +35,31 @@ discard block |
||
35 | 35 | } elseif ($spotter_item['@attributes']['type'] == 'Finish') { |
36 | 36 | $output .= '"icon": "/images/tsk/tsk-finish.png"'; |
37 | 37 | } else $output .= '"icon": "/images/tsk/number_'.$id.'.png"'; |
38 | - $output .= '},'; |
|
39 | - $output .= '"geometry": {'; |
|
38 | + $output .= '},'; |
|
39 | + $output .= '"geometry": {'; |
|
40 | 40 | $output .= '"type": "Point",'; |
41 | 41 | $output .= '"coordinates": ['; |
42 | - $output .= $spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude']; |
|
42 | + $output .= $spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude']; |
|
43 | 43 | $output .= ']'; |
44 | - $output .= '}'; |
|
44 | + $output .= '}'; |
|
45 | 45 | $output .= '},'; |
46 | 46 | $j++; |
47 | 47 | } |
48 | 48 | // Lines |
49 | 49 | $output .= '{"type": "Feature",'; |
50 | - $output .= '"properties": {'; |
|
50 | + $output .= '"properties": {'; |
|
51 | 51 | $output .= '"type": "'.$spotter_array['@attributes']['type'].'"'; |
52 | - $output .= '},'; |
|
53 | - $output .= '"geometry": {'; |
|
52 | + $output .= '},'; |
|
53 | + $output .= '"geometry": {'; |
|
54 | 54 | $output .= '"type": "LineString",'; |
55 | 55 | $output .= '"coordinates": ['; |
56 | 56 | foreach($spotter_array['Point'] as $spotter_item) |
57 | 57 | { |
58 | - $output .= '['.$spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'].'],'; |
|
58 | + $output .= '['.$spotter_item['Waypoint']['Location']['@attributes']['longitude'].', '.$spotter_item['Waypoint']['Location']['@attributes']['latitude'].'],'; |
|
59 | 59 | } |
60 | 60 | $output = substr($output, 0, -1); |
61 | 61 | $output .= ']'; |
62 | - $output .= '}'; |
|
62 | + $output .= '}'; |
|
63 | 63 | $output .= '},'; |
64 | 64 | $output = substr($output, 0, -1); |
65 | 65 | } |
@@ -331,15 +331,15 @@ discard block |
||
331 | 331 | } |
332 | 332 | |
333 | 333 | <?php |
334 | - if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
334 | + if (isset($globalMapUseBbox) && $globalMapUseBbox) { |
|
335 | 335 | ?> |
336 | 336 | var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php?coord="+bbox()); |
337 | 337 | <?php |
338 | - } else { |
|
338 | + } else { |
|
339 | 339 | ?> |
340 | 340 | var loc_geojson = Cesium.loadJson("<?php print $globalURL; ?>/location-geojson.php"); |
341 | 341 | <?php |
342 | - } |
|
342 | + } |
|
343 | 343 | ?> |
344 | 344 | loc_geojson.then(function(geojsondata) { |
345 | 345 | loc = new Cesium.CustomDataSource('location'); |
@@ -512,15 +512,15 @@ discard block |
||
512 | 512 | // if (!isset($_COOKIE['MapTerrain']) || $_COOKIE['MapTerrain'] == 'stk') { |
513 | 513 | ?> |
514 | 514 | <?php |
515 | - if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
|
515 | + if (isset($globalMapOffline) && $globalMapOffline === TRUE) { |
|
516 | 516 | ?> |
517 | 517 | var MapTerrain = 'ellipsoid'; |
518 | 518 | <?php |
519 | - } else { |
|
519 | + } else { |
|
520 | 520 | ?> |
521 | 521 | var MapTerrain = getCookie('MapTerrain'); |
522 | 522 | <?php |
523 | - } |
|
523 | + } |
|
524 | 524 | ?> |
525 | 525 | |
526 | 526 | |
@@ -574,11 +574,11 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | <?php |
577 | - if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
577 | + if (isset($globalTSK) && $globalTSK && isset($_GET['tsk'])) { |
|
578 | 578 | ?> |
579 | 579 | update_tsk(); |
580 | 580 | <?php |
581 | - } |
|
581 | + } |
|
582 | 582 | ?> |
583 | 583 | |
584 | 584 | update_locationsLayer(); |
@@ -13,11 +13,11 @@ discard block |
||
13 | 13 | } |
14 | 14 | |
15 | 15 | /** |
16 | - * Gets the images based on the aircraft registration |
|
17 | - * |
|
18 | - * @return Array the images list |
|
19 | - * |
|
20 | - */ |
|
16 | + * Gets the images based on the aircraft registration |
|
17 | + * |
|
18 | + * @return Array the images list |
|
19 | + * |
|
20 | + */ |
|
21 | 21 | public function getSpotterImage($registration,$aircraft_icao = '', $airline_icao = '') |
22 | 22 | { |
23 | 23 | $registration = filter_var($registration,FILTER_SANITIZE_STRING); |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
41 | - * Gets the images based on the ship name |
|
42 | - * |
|
43 | - * @return Array the images list |
|
44 | - * |
|
45 | - */ |
|
41 | + * Gets the images based on the ship name |
|
42 | + * |
|
43 | + * @return Array the images list |
|
44 | + * |
|
45 | + */ |
|
46 | 46 | public function getMarineImage($mmsi,$imo = '',$name = '') |
47 | 47 | { |
48 | 48 | $mmsi = filter_var($mmsi,FILTER_SANITIZE_STRING); |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
72 | - * Gets the image copyright based on the Exif data |
|
73 | - * |
|
74 | - * @return String image copyright |
|
75 | - * |
|
76 | - */ |
|
72 | + * Gets the image copyright based on the Exif data |
|
73 | + * |
|
74 | + * @return String image copyright |
|
75 | + * |
|
76 | + */ |
|
77 | 77 | public function getExifCopyright($url) { |
78 | 78 | $exif = exif_read_data($url); |
79 | 79 | $copyright = ''; |
@@ -88,11 +88,11 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * Adds the images based on the aircraft registration |
|
92 | - * |
|
93 | - * @return String either success or error |
|
94 | - * |
|
95 | - */ |
|
91 | + * Adds the images based on the aircraft registration |
|
92 | + * |
|
93 | + * @return String either success or error |
|
94 | + * |
|
95 | + */ |
|
96 | 96 | public function addSpotterImage($registration,$aircraft_icao = '', $airline_icao = '') |
97 | 97 | { |
98 | 98 | global $globalDebug,$globalAircraftImageFetch, $globalOffline; |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | /** |
123 | - * Adds the images based on the marine name |
|
124 | - * |
|
125 | - * @return String either success or error |
|
126 | - * |
|
127 | - */ |
|
123 | + * Adds the images based on the marine name |
|
124 | + * |
|
125 | + * @return String either success or error |
|
126 | + * |
|
127 | + */ |
|
128 | 128 | public function addMarineImage($mmsi,$imo = '',$name = '') |
129 | 129 | { |
130 | 130 | global $globalDebug,$globalMarineImageFetch, $globalOffline; |
@@ -161,12 +161,12 @@ discard block |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * Gets the aircraft image |
|
165 | - * |
|
166 | - * @param String $aircraft_registration the registration of the aircraft |
|
167 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
168 | - * |
|
169 | - */ |
|
164 | + * Gets the aircraft image |
|
165 | + * |
|
166 | + * @param String $aircraft_registration the registration of the aircraft |
|
167 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
168 | + * |
|
169 | + */ |
|
170 | 170 | public function findAircraftImage($aircraft_registration, $aircraft_icao = '', $airline_icao = '') |
171 | 171 | { |
172 | 172 | global $globalAircraftImageSources, $globalIVAO, $globalAircraftImageCheckICAO, $globalVA; |
@@ -210,14 +210,14 @@ discard block |
||
210 | 210 | } |
211 | 211 | |
212 | 212 | /** |
213 | - * Gets the vessel image |
|
214 | - * |
|
215 | - * @param String $mmsi the vessel mmsi |
|
216 | - * @param String $imo the vessel imo |
|
217 | - * @param String $name the vessel name |
|
218 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
219 | - * |
|
220 | - */ |
|
213 | + * Gets the vessel image |
|
214 | + * |
|
215 | + * @param String $mmsi the vessel mmsi |
|
216 | + * @param String $imo the vessel imo |
|
217 | + * @param String $name the vessel name |
|
218 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
219 | + * |
|
220 | + */ |
|
221 | 221 | public function findMarineImage($mmsi,$imo = '',$name = '') |
222 | 222 | { |
223 | 223 | global $globalMarineImageSources; |
@@ -251,13 +251,13 @@ discard block |
||
251 | 251 | } |
252 | 252 | |
253 | 253 | /** |
254 | - * Gets the aircraft image from Planespotters |
|
255 | - * |
|
256 | - * @param String $aircraft_registration the registration of the aircraft |
|
257 | - * @param String $aircraft_name type of the aircraft |
|
258 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
259 | - * |
|
260 | - */ |
|
254 | + * Gets the aircraft image from Planespotters |
|
255 | + * |
|
256 | + * @param String $aircraft_registration the registration of the aircraft |
|
257 | + * @param String $aircraft_name type of the aircraft |
|
258 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
259 | + * |
|
260 | + */ |
|
261 | 261 | public function fromPlanespotters($type,$aircraft_registration, $aircraft_name='') { |
262 | 262 | $Common = new Common(); |
263 | 263 | // If aircraft registration is only number, also check with aircraft model |
@@ -285,13 +285,13 @@ discard block |
||
285 | 285 | } |
286 | 286 | |
287 | 287 | /** |
288 | - * Gets the aircraft image from Deviantart |
|
289 | - * |
|
290 | - * @param String $registration the registration of the aircraft |
|
291 | - * @param String $name type of the aircraft |
|
292 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
293 | - * |
|
294 | - */ |
|
288 | + * Gets the aircraft image from Deviantart |
|
289 | + * |
|
290 | + * @param String $registration the registration of the aircraft |
|
291 | + * @param String $name type of the aircraft |
|
292 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
293 | + * |
|
294 | + */ |
|
295 | 295 | public function fromDeviantart($type,$registration, $name='') { |
296 | 296 | $Common = new Common(); |
297 | 297 | if ($type == 'aircraft') { |
@@ -325,13 +325,13 @@ discard block |
||
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
328 | - * Gets the aircraft image from JetPhotos |
|
329 | - * |
|
330 | - * @param String $aircraft_registration the registration of the aircraft |
|
331 | - * @param String $aircraft_name type of the aircraft |
|
332 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
333 | - * |
|
334 | - */ |
|
328 | + * Gets the aircraft image from JetPhotos |
|
329 | + * |
|
330 | + * @param String $aircraft_registration the registration of the aircraft |
|
331 | + * @param String $aircraft_name type of the aircraft |
|
332 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
333 | + * |
|
334 | + */ |
|
335 | 335 | public function fromJetPhotos($type,$aircraft_registration, $aircraft_name='') { |
336 | 336 | $Common = new Common(); |
337 | 337 | $url= 'http://jetphotos.net/showphotos.php?displaymode=2®search='.$aircraft_registration; |
@@ -367,13 +367,13 @@ discard block |
||
367 | 367 | } |
368 | 368 | |
369 | 369 | /** |
370 | - * Gets the aircraft image from PlanePictures |
|
371 | - * |
|
372 | - * @param String $aircraft_registration the registration of the aircraft |
|
373 | - * @param String $aircraft_name type of the aircraft |
|
374 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
375 | - * |
|
376 | - */ |
|
370 | + * Gets the aircraft image from PlanePictures |
|
371 | + * |
|
372 | + * @param String $aircraft_registration the registration of the aircraft |
|
373 | + * @param String $aircraft_name type of the aircraft |
|
374 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
375 | + * |
|
376 | + */ |
|
377 | 377 | public function fromPlanePictures($type,$aircraft_registration, $aircraft_name='') { |
378 | 378 | $Common = new Common(); |
379 | 379 | $url= 'http://www.planepictures.net/netsearch4.cgi?srch='.$aircraft_registration.'&stype=reg&srng=2'; |
@@ -401,13 +401,13 @@ discard block |
||
401 | 401 | } |
402 | 402 | |
403 | 403 | /** |
404 | - * Gets the aircraft image from Flickr |
|
405 | - * |
|
406 | - * @param String $registration the registration of the aircraft |
|
407 | - * @param String $name type of the aircraft |
|
408 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
409 | - * |
|
410 | - */ |
|
404 | + * Gets the aircraft image from Flickr |
|
405 | + * |
|
406 | + * @param String $registration the registration of the aircraft |
|
407 | + * @param String $name type of the aircraft |
|
408 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
409 | + * |
|
410 | + */ |
|
411 | 411 | public function fromFlickr($type,$registration,$name='') { |
412 | 412 | $Common = new Common(); |
413 | 413 | if ($type == 'aircraft') { |
@@ -451,13 +451,13 @@ discard block |
||
451 | 451 | } |
452 | 452 | |
453 | 453 | /** |
454 | - * Gets the aircraft image from Bing |
|
455 | - * |
|
456 | - * @param String $aircraft_registration the registration of the aircraft |
|
457 | - * @param String $aircraft_name type of the aircraft |
|
458 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
459 | - * |
|
460 | - */ |
|
454 | + * Gets the aircraft image from Bing |
|
455 | + * |
|
456 | + * @param String $aircraft_registration the registration of the aircraft |
|
457 | + * @param String $aircraft_name type of the aircraft |
|
458 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
459 | + * |
|
460 | + */ |
|
461 | 461 | public function fromBing($type,$aircraft_registration,$aircraft_name='') { |
462 | 462 | global $globalImageBingKey; |
463 | 463 | $Common = new Common(); |
@@ -488,13 +488,13 @@ discard block |
||
488 | 488 | } |
489 | 489 | |
490 | 490 | /** |
491 | - * Gets the aircraft image from airport-data |
|
492 | - * |
|
493 | - * @param String $aircraft_registration the registration of the aircraft |
|
494 | - * @param String $aircraft_name type of the aircraft |
|
495 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
496 | - * |
|
497 | - */ |
|
491 | + * Gets the aircraft image from airport-data |
|
492 | + * |
|
493 | + * @param String $aircraft_registration the registration of the aircraft |
|
494 | + * @param String $aircraft_name type of the aircraft |
|
495 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
496 | + * |
|
497 | + */ |
|
498 | 498 | public function fromAirportData($type,$aircraft_registration,$aircraft_name='') { |
499 | 499 | $Common = new Common(); |
500 | 500 | $url = 'http://www.airport-data.com/api/ac_thumb.json?&n=1&r='.$aircraft_registration; |
@@ -513,13 +513,13 @@ discard block |
||
513 | 513 | } |
514 | 514 | |
515 | 515 | /** |
516 | - * Gets image from WikiMedia |
|
517 | - * |
|
518 | - * @param String $registration the registration of the aircraft/mmsi |
|
519 | - * @param String $name name |
|
520 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
521 | - * |
|
522 | - */ |
|
516 | + * Gets image from WikiMedia |
|
517 | + * |
|
518 | + * @param String $registration the registration of the aircraft/mmsi |
|
519 | + * @param String $name name |
|
520 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
521 | + * |
|
522 | + */ |
|
523 | 523 | public function fromWikimedia($type,$registration,$name='') { |
524 | 524 | $Common = new Common(); |
525 | 525 | if ($type == 'aircraft') { |
@@ -574,13 +574,13 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * Gets the aircraft image from custom url |
|
578 | - * |
|
579 | - * @param String $registration the registration of the aircraft |
|
580 | - * @param String $name type of the aircraft |
|
581 | - * @return Array the aircraft thumbnail, orignal url and copyright |
|
582 | - * |
|
583 | - */ |
|
577 | + * Gets the aircraft image from custom url |
|
578 | + * |
|
579 | + * @param String $registration the registration of the aircraft |
|
580 | + * @param String $name type of the aircraft |
|
581 | + * @return Array the aircraft thumbnail, orignal url and copyright |
|
582 | + * |
|
583 | + */ |
|
584 | 584 | public function fromCustomSource($type,$registration,$name='') { |
585 | 585 | global $globalAircraftImageCustomSources, $globalMarineImageCustomSources, $globalDebug; |
586 | 586 | //$globalAircraftImageCustomSource[] = array('thumbnail' => '','original' => '', 'copyright' => '', 'source_website' => '', 'source' => '','exif' => true); |
@@ -14,35 +14,35 @@ discard block |
||
14 | 14 | public $db; |
15 | 15 | |
16 | 16 | protected $texts = Array( |
17 | - 'MI' => 'Shallow', |
|
18 | - 'PR' => 'Partial', |
|
19 | - 'BC' => 'Low drifting', |
|
20 | - 'BL' => 'Blowing', |
|
21 | - 'SH' => 'Showers', |
|
22 | - 'TS' => 'Thunderstorm', |
|
23 | - 'FZ' => 'Freezing', |
|
24 | - 'DZ' => 'Drizzle', |
|
25 | - 'RA' => 'Rain', |
|
26 | - 'SN' => 'Snow', |
|
27 | - 'SG' => 'Snow Grains', |
|
28 | - 'IC' => 'Ice crystals', |
|
29 | - 'PL' => 'Ice pellets', |
|
30 | - 'GR' => 'Hail', |
|
31 | - 'GS' => 'Small hail', |
|
32 | - 'UP' => 'Unknown', |
|
33 | - 'BR' => 'Mist', |
|
34 | - 'FG' => 'Fog', |
|
35 | - 'FU' => 'Smoke', |
|
36 | - 'VA' => 'Volcanic ash', |
|
37 | - 'DU' => 'Widespread dust', |
|
38 | - 'SA' => 'Sand', |
|
39 | - 'HZ' => 'Haze', |
|
40 | - 'PY' => 'Spray', |
|
41 | - 'PO' => 'Well developed dust / sand whirls', |
|
42 | - 'SQ' => 'Squalls', |
|
43 | - 'FC' => 'Funnel clouds inc tornadoes or waterspouts', |
|
44 | - 'SS' => 'Sandstorm', |
|
45 | - 'DS' => 'Duststorm' |
|
17 | + 'MI' => 'Shallow', |
|
18 | + 'PR' => 'Partial', |
|
19 | + 'BC' => 'Low drifting', |
|
20 | + 'BL' => 'Blowing', |
|
21 | + 'SH' => 'Showers', |
|
22 | + 'TS' => 'Thunderstorm', |
|
23 | + 'FZ' => 'Freezing', |
|
24 | + 'DZ' => 'Drizzle', |
|
25 | + 'RA' => 'Rain', |
|
26 | + 'SN' => 'Snow', |
|
27 | + 'SG' => 'Snow Grains', |
|
28 | + 'IC' => 'Ice crystals', |
|
29 | + 'PL' => 'Ice pellets', |
|
30 | + 'GR' => 'Hail', |
|
31 | + 'GS' => 'Small hail', |
|
32 | + 'UP' => 'Unknown', |
|
33 | + 'BR' => 'Mist', |
|
34 | + 'FG' => 'Fog', |
|
35 | + 'FU' => 'Smoke', |
|
36 | + 'VA' => 'Volcanic ash', |
|
37 | + 'DU' => 'Widespread dust', |
|
38 | + 'SA' => 'Sand', |
|
39 | + 'HZ' => 'Haze', |
|
40 | + 'PY' => 'Spray', |
|
41 | + 'PO' => 'Well developed dust / sand whirls', |
|
42 | + 'SQ' => 'Squalls', |
|
43 | + 'FC' => 'Funnel clouds inc tornadoes or waterspouts', |
|
44 | + 'SS' => 'Sandstorm', |
|
45 | + 'DS' => 'Duststorm' |
|
46 | 46 | ); |
47 | 47 | |
48 | 48 | /* |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $result['QNH_format'] = $matches[1] == 'Q' ? 'hPa' : 'inHg'; |
178 | 178 | */ |
179 | 179 | } |
180 | - /* |
|
180 | + /* |
|
181 | 181 | // Wind Direction |
182 | 182 | if (preg_match('#^([0-9]{3})V([0-9]{3})$#', $piece, $matches)) { |
183 | 183 | $result['wind_direction'] = $matches[1]; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | $result['speed_variable'] = $matches[1]; |
189 | 189 | } |
190 | 190 | */ |
191 | - // Visibility |
|
191 | + // Visibility |
|
192 | 192 | if (preg_match('#^([0-9]{4})|(([0-9]{1,4})SM)$#', $piece, $matches)) { |
193 | 193 | if (isset($matches[3]) && strlen($matches[3]) > 0) { |
194 | 194 | $result['visibility'] = (float)$matches[3] * 1609.34; |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | else $range = array('exact' => (float)$matches[2], 'unit' => 'M'); |
247 | 247 | if (isset($matches[3])) { |
248 | 248 | $range = Array( |
249 | - 'from' => (float)$matches[2], |
|
250 | - 'to' => (float)$matches[4], |
|
251 | - 'unit' => $matches[5] ? 'FT' : 'M' |
|
249 | + 'from' => (float)$matches[2], |
|
250 | + 'to' => (float)$matches[4], |
|
251 | + 'unit' => $matches[5] ? 'FT' : 'M' |
|
252 | 252 | ); |
253 | 253 | } |
254 | 254 | $result['RVR'] = $matches[1]; |
@@ -176,8 +176,8 @@ |
||
176 | 176 | |
177 | 177 | private function urshift($n, $s) { |
178 | 178 | return ($n >= 0) ? ($n >> $s) : |
179 | - (($n & 0x7fffffff) >> $s) | |
|
180 | - (0x40000000 >> ($s - 1)); |
|
179 | + (($n & 0x7fffffff) >> $s) | |
|
180 | + (0x40000000 >> ($s - 1)); |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /* |
@@ -32,11 +32,11 @@ discard block |
||
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * Change IATA to ICAO value for ident |
|
36 | - * |
|
37 | - * @param String $ident ident |
|
38 | - * @return String the icao |
|
39 | - */ |
|
35 | + * Change IATA to ICAO value for ident |
|
36 | + * |
|
37 | + * @param String $ident ident |
|
38 | + * @return String the icao |
|
39 | + */ |
|
40 | 40 | public function ident2icao($ident) { |
41 | 41 | if (substr($ident,0,2) == 'AF') { |
42 | 42 | if (filter_var(substr($ident,2),FILTER_VALIDATE_INT,array("flags"=>FILTER_FLAG_ALLOW_OCTAL))) $icao = $ident; |
@@ -52,11 +52,11 @@ discard block |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | - * Deletes all info in the live table |
|
56 | - * |
|
57 | - * @return String success or false |
|
58 | - * |
|
59 | - */ |
|
55 | + * Deletes all info in the live table |
|
56 | + * |
|
57 | + * @return String success or false |
|
58 | + * |
|
59 | + */ |
|
60 | 60 | public function deleteLiveAcarsData() |
61 | 61 | { |
62 | 62 | global $globalDBdriver; |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
79 | - * Deletes all info in the archive table |
|
80 | - * |
|
81 | - * @return String success or false |
|
82 | - * |
|
83 | - */ |
|
79 | + * Deletes all info in the archive table |
|
80 | + * |
|
81 | + * @return String success or false |
|
82 | + * |
|
83 | + */ |
|
84 | 84 | public function deleteArchiveAcarsData() |
85 | 85 | { |
86 | 86 | global $globalACARSArchiveKeepMonths, $globalDBdriver; |
@@ -101,11 +101,11 @@ discard block |
||
101 | 101 | |
102 | 102 | |
103 | 103 | /** |
104 | - * Parse ACARS data |
|
105 | - * |
|
106 | - * @param String ACARS data in acarsdec data |
|
107 | - * |
|
108 | - */ |
|
104 | + * Parse ACARS data |
|
105 | + * |
|
106 | + * @param String ACARS data in acarsdec data |
|
107 | + * |
|
108 | + */ |
|
109 | 109 | public function parse($data) { |
110 | 110 | global $globalDebug, $globalACARSArchive; |
111 | 111 | //$Image = new Image($this->db); |
@@ -735,11 +735,11 @@ discard block |
||
735 | 735 | } |
736 | 736 | |
737 | 737 | /** |
738 | - * Add ACARS data |
|
739 | - * |
|
740 | - * @param String ACARS data in acarsdec data |
|
741 | - * |
|
742 | - */ |
|
738 | + * Add ACARS data |
|
739 | + * |
|
740 | + * @param String ACARS data in acarsdec data |
|
741 | + * |
|
742 | + */ |
|
743 | 743 | function add($data) { |
744 | 744 | global $globalDebug, $globalACARSArchive; |
745 | 745 | $Image = new Image($this->db); |
@@ -786,15 +786,15 @@ discard block |
||
786 | 786 | } |
787 | 787 | |
788 | 788 | /** |
789 | - * Add Live ACARS data in DB |
|
790 | - * |
|
791 | - * @param String $ident ident |
|
792 | - * @param String $registration Registration of the aircraft |
|
793 | - * @param String $label Label of the ACARS message |
|
794 | - * @param String $block_id Block id of the ACARS message |
|
795 | - * @param String $msg_no Number of the ACARS message |
|
796 | - * @param String $message ACARS message |
|
797 | - */ |
|
789 | + * Add Live ACARS data in DB |
|
790 | + * |
|
791 | + * @param String $ident ident |
|
792 | + * @param String $registration Registration of the aircraft |
|
793 | + * @param String $label Label of the ACARS message |
|
794 | + * @param String $block_id Block id of the ACARS message |
|
795 | + * @param String $msg_no Number of the ACARS message |
|
796 | + * @param String $message ACARS message |
|
797 | + */ |
|
798 | 798 | public function addLiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') { |
799 | 799 | global $globalDebug; |
800 | 800 | date_default_timezone_set('UTC'); |
@@ -830,15 +830,15 @@ discard block |
||
830 | 830 | } |
831 | 831 | |
832 | 832 | /** |
833 | - * Add Archive ACARS data in DB |
|
834 | - * |
|
835 | - * @param String $ident ident |
|
836 | - * @param String $registration Registration of the aircraft |
|
837 | - * @param String $label Label of the ACARS message |
|
838 | - * @param String $block_id Block id of the ACARS message |
|
839 | - * @param String $msg_no Number of the ACARS message |
|
840 | - * @param String $message ACARS message |
|
841 | - */ |
|
833 | + * Add Archive ACARS data in DB |
|
834 | + * |
|
835 | + * @param String $ident ident |
|
836 | + * @param String $registration Registration of the aircraft |
|
837 | + * @param String $label Label of the ACARS message |
|
838 | + * @param String $block_id Block id of the ACARS message |
|
839 | + * @param String $msg_no Number of the ACARS message |
|
840 | + * @param String $message ACARS message |
|
841 | + */ |
|
842 | 842 | public function addArchiveAcarsData($ident,$registration,$label,$block_id,$msg_no,$message,$decode = '') { |
843 | 843 | global $globalDebug; |
844 | 844 | date_default_timezone_set('UTC'); |
@@ -869,11 +869,11 @@ discard block |
||
869 | 869 | } |
870 | 870 | |
871 | 871 | /** |
872 | - * Get Message title from label from DB |
|
873 | - * |
|
874 | - * @param String $label |
|
875 | - * @return String Return ACARS title |
|
876 | - */ |
|
872 | + * Get Message title from label from DB |
|
873 | + * |
|
874 | + * @param String $label |
|
875 | + * @return String Return ACARS title |
|
876 | + */ |
|
877 | 877 | public function getTitlefromLabel($label) { |
878 | 878 | $Connection = new Connection($this->db); |
879 | 879 | $this->db = $Connection->db; |
@@ -892,10 +892,10 @@ discard block |
||
892 | 892 | } |
893 | 893 | |
894 | 894 | /** |
895 | - * List all Message title & label from DB |
|
896 | - * |
|
897 | - * @return Array Return ACARS data in array |
|
898 | - */ |
|
895 | + * List all Message title & label from DB |
|
896 | + * |
|
897 | + * @return Array Return ACARS data in array |
|
898 | + */ |
|
899 | 899 | public function getAllTitleLabel() { |
900 | 900 | $query = "SELECT * FROM acars_label ORDER BY title"; |
901 | 901 | $query_values = array(); |
@@ -912,11 +912,11 @@ discard block |
||
912 | 912 | } |
913 | 913 | |
914 | 914 | /** |
915 | - * Get Live ACARS data from DB |
|
916 | - * |
|
917 | - * @param String $ident |
|
918 | - * @return Array Return ACARS data in array |
|
919 | - */ |
|
915 | + * Get Live ACARS data from DB |
|
916 | + * |
|
917 | + * @param String $ident |
|
918 | + * @return Array Return ACARS data in array |
|
919 | + */ |
|
920 | 920 | public function getLiveAcarsData($ident) { |
921 | 921 | $query = "SELECT * FROM acars_live WHERE ident = :ident ORDER BY acars_live_id DESC"; |
922 | 922 | $query_values = array(':ident' => $ident); |
@@ -933,10 +933,10 @@ discard block |
||
933 | 933 | } |
934 | 934 | |
935 | 935 | /** |
936 | - * Get Latest ACARS data from DB |
|
937 | - * |
|
938 | - * @return Array Return ACARS data in array |
|
939 | - */ |
|
936 | + * Get Latest ACARS data from DB |
|
937 | + * |
|
938 | + * @return Array Return ACARS data in array |
|
939 | + */ |
|
940 | 940 | public function getLatestAcarsData($limit = '',$label = '') { |
941 | 941 | global $globalURL, $globalDBdriver; |
942 | 942 | $Image = new Image($this->db); |
@@ -1024,10 +1024,10 @@ discard block |
||
1024 | 1024 | } |
1025 | 1025 | |
1026 | 1026 | /** |
1027 | - * Get Archive ACARS data from DB |
|
1028 | - * |
|
1029 | - * @return Array Return ACARS data in array |
|
1030 | - */ |
|
1027 | + * Get Archive ACARS data from DB |
|
1028 | + * |
|
1029 | + * @return Array Return ACARS data in array |
|
1030 | + */ |
|
1031 | 1031 | public function getArchiveAcarsData($limit = '',$label = '') { |
1032 | 1032 | global $globalURL, $globalDBdriver; |
1033 | 1033 | $Image = new Image($this->db); |
@@ -1115,13 +1115,13 @@ discard block |
||
1115 | 1115 | } |
1116 | 1116 | |
1117 | 1117 | /** |
1118 | - * Add ModeS data to DB |
|
1119 | - * |
|
1120 | - * @param String $ident ident |
|
1121 | - * @param String $registration Registration of the aircraft |
|
1122 | - * @param String $icao |
|
1123 | - * @param String $ICAOTypeCode |
|
1124 | - */ |
|
1118 | + * Add ModeS data to DB |
|
1119 | + * |
|
1120 | + * @param String $ident ident |
|
1121 | + * @param String $registration Registration of the aircraft |
|
1122 | + * @param String $icao |
|
1123 | + * @param String $ICAOTypeCode |
|
1124 | + */ |
|
1125 | 1125 | public function addModeSData($ident,$registration,$icao = '',$ICAOTypeCode = '',$latitude = '', $longitude = '') { |
1126 | 1126 | global $globalDebug, $globalDBdriver; |
1127 | 1127 | $ident = trim($ident); |
@@ -25,11 +25,11 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
28 | - * Change IATA to ICAO value for ident |
|
29 | - * |
|
30 | - * @param String $ident ident |
|
31 | - * @return String the icao |
|
32 | - */ |
|
28 | + * Change IATA to ICAO value for ident |
|
29 | + * |
|
30 | + * @param String $ident ident |
|
31 | + * @return String the icao |
|
32 | + */ |
|
33 | 33 | public function ident2icao($ident) { |
34 | 34 | $Spotter = new Spotter(); |
35 | 35 | if (!is_numeric(substr($ident, 0, 3))) { |