@@ -67,12 +67,22 @@ |
||
| 67 | 67 | } else { |
| 68 | 68 | $geom = geoPHP::load(stream_get_contents($row['wkb'])); |
| 69 | 69 | } |
| 70 | - if (isset($properties['type'])) $properties['type'] = trim($properties['type']); |
|
| 71 | - elseif (isset($properties['class'])) $properties['type'] = trim($properties['class']); |
|
| 72 | - if (isset($properties['ogr_fid'])) $properties['id'] = $properties['ogr_fid']; |
|
| 73 | - elseif (isset($properties['ogc_fid'])) $properties['id'] = $properties['ogc_fid']; |
|
| 74 | - if (isset($properties['ceiling'])) $properties['tops'] = $properties['ceiling']; |
|
| 75 | - if (isset($properties['floor'])) $properties['base'] = $properties['floor']; |
|
| 70 | + if (isset($properties['type'])) { |
|
| 71 | + $properties['type'] = trim($properties['type']); |
|
| 72 | + } elseif (isset($properties['class'])) { |
|
| 73 | + $properties['type'] = trim($properties['class']); |
|
| 74 | + } |
|
| 75 | + if (isset($properties['ogr_fid'])) { |
|
| 76 | + $properties['id'] = $properties['ogr_fid']; |
|
| 77 | + } elseif (isset($properties['ogc_fid'])) { |
|
| 78 | + $properties['id'] = $properties['ogc_fid']; |
|
| 79 | + } |
|
| 80 | + if (isset($properties['ceiling'])) { |
|
| 81 | + $properties['tops'] = $properties['ceiling']; |
|
| 82 | + } |
|
| 83 | + if (isset($properties['floor'])) { |
|
| 84 | + $properties['base'] = $properties['floor']; |
|
| 85 | + } |
|
| 76 | 86 | if (preg_match('/^FL(\s)*(?<alt>\d+)/',strtoupper($properties['tops']),$matches)) { |
| 77 | 87 | $properties['upper_limit'] = round($matches['alt']*100*0.38048); |
| 78 | 88 | } elseif (preg_match('/^(?<alt>\d+)(\s)*(FT|AGL|ALT|MSL)/',strtoupper($properties['tops']),$matches)) { |
@@ -24,7 +24,9 @@ |
||
| 24 | 24 | print '<option></option>'; |
| 25 | 25 | $Stats = new Stats(); |
| 26 | 26 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 27 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 27 | + if (empty($aircraft_types)) { |
|
| 28 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 29 | + } |
|
| 28 | 30 | foreach($aircraft_types as $aircrafttype) |
| 29 | 31 | { |
| 30 | 32 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | $limit_start = 0; |
| 15 | 15 | $limit_end = 25; |
| 16 | 16 | $absolute_difference = 25; |
| 17 | - } else { |
|
| 17 | + } else { |
|
| 18 | 18 | $limit_explode = explode(",", $_GET['limit']); |
| 19 | 19 | $limit_start = $limit_explode[0]; |
| 20 | 20 | $limit_end = $limit_explode[1]; |
@@ -45,7 +45,9 @@ discard block |
||
| 45 | 45 | print '<option></option>'; |
| 46 | 46 | $Stats = new Stats(); |
| 47 | 47 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 48 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 48 | + if (empty($aircraft_types)) { |
|
| 49 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 50 | + } |
|
| 49 | 51 | foreach($aircraft_types as $aircrafttype) |
| 50 | 52 | { |
| 51 | 53 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -66,7 +68,9 @@ discard block |
||
| 66 | 68 | print '<h1>'.$spotter_array[0]['aircraft_name'].' ('.$spotter_array[0]['aircraft_type'].')</h1>'; |
| 67 | 69 | print '<div><span class="label">'._("Name").'</span>'.$spotter_array[0]['aircraft_name'].'</div>'; |
| 68 | 70 | print '<div><span class="label">'._("ICAO").'</span>'.$spotter_array[0]['aircraft_type'].'</div>'; |
| 69 | - if (isset($spotter_array[0]['aircraft_manufacturer'])) print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
| 71 | + if (isset($spotter_array[0]['aircraft_manufacturer'])) { |
|
| 72 | + print '<div><span class="label">'._("Manufacturer").'</span><a href="'.$globalURL.'/manufacturer/'.strtolower(str_replace(" ", "-", $spotter_array[0]['aircraft_manufacturer'])).'">'.$spotter_array[0]['aircraft_manufacturer'].'</a></div>'; |
|
| 73 | + } |
|
| 70 | 74 | print '</div>'; |
| 71 | 75 | } else { |
| 72 | 76 | print '<div class="alert alert-warning">'._("This special aircraft profile shows all flights in where the aircraft type is unknown.").'</div>'; |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |
@@ -23,7 +23,9 @@ |
||
| 23 | 23 | print '<option></option>'; |
| 24 | 24 | $Stats = new Stats(); |
| 25 | 25 | $aircraft_types = $Stats->getAllAircraftTypes(); |
| 26 | - if (empty($aircraft_types)) $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 26 | + if (empty($aircraft_types)) { |
|
| 27 | + $aircraft_types = $Spotter->getAllAircraftTypes(); |
|
| 28 | + } |
|
| 27 | 29 | foreach($aircraft_types as $aircrafttype) |
| 28 | 30 | { |
| 29 | 31 | if($aircraft_type == $aircrafttype['aircraft_icao']) |