|
@@ 2163-2187 (lines=25) @@
|
| 2160 |
|
* @return Array list of aircraft types |
| 2161 |
|
* |
| 2162 |
|
*/ |
| 2163 |
|
public function getAllManufacturers() |
| 2164 |
|
{ |
| 2165 |
|
/* |
| 2166 |
|
$query = "SELECT DISTINCT spotter_output.aircraft_manufacturer AS aircraft_manufacturer |
| 2167 |
|
FROM spotter_output |
| 2168 |
|
WHERE spotter_output.aircraft_manufacturer <> '' |
| 2169 |
|
ORDER BY spotter_output.aircraft_manufacturer ASC"; |
| 2170 |
|
*/ |
| 2171 |
|
|
| 2172 |
|
$query = "SELECT DISTINCT manufacturer AS aircraft_manufacturer FROM aircraft WHERE manufacturer <> '' ORDER BY manufacturer ASC"; |
| 2173 |
|
$sth = $this->db->prepare($query); |
| 2174 |
|
$sth->execute(); |
| 2175 |
|
|
| 2176 |
|
$manufacturer_array = array(); |
| 2177 |
|
$temp_array = array(); |
| 2178 |
|
|
| 2179 |
|
while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 2180 |
|
{ |
| 2181 |
|
$temp_array['aircraft_manufacturer'] = $row['aircraft_manufacturer']; |
| 2182 |
|
|
| 2183 |
|
$manufacturer_array[] = $temp_array; |
| 2184 |
|
} |
| 2185 |
|
|
| 2186 |
|
return $manufacturer_array; |
| 2187 |
|
} |
| 2188 |
|
|
| 2189 |
|
|
| 2190 |
|
/** |
|
@@ 2232-2253 (lines=22) @@
|
| 2229 |
|
* @return Array list of aircraft registrations |
| 2230 |
|
* |
| 2231 |
|
*/ |
| 2232 |
|
public function getAllAircraftRegistrations() |
| 2233 |
|
{ |
| 2234 |
|
$query = "SELECT DISTINCT spotter_output.registration |
| 2235 |
|
FROM spotter_output |
| 2236 |
|
WHERE spotter_output.registration <> '' |
| 2237 |
|
ORDER BY spotter_output.registration ASC"; |
| 2238 |
|
|
| 2239 |
|
$sth = $this->db->prepare($query); |
| 2240 |
|
$sth->execute(); |
| 2241 |
|
|
| 2242 |
|
$aircraft_array = array(); |
| 2243 |
|
$temp_array = array(); |
| 2244 |
|
|
| 2245 |
|
while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 2246 |
|
{ |
| 2247 |
|
$temp_array['registration'] = $row['registration']; |
| 2248 |
|
|
| 2249 |
|
$aircraft_array[] = $temp_array; |
| 2250 |
|
} |
| 2251 |
|
|
| 2252 |
|
return $aircraft_array; |
| 2253 |
|
} |
| 2254 |
|
|
| 2255 |
|
/** |
| 2256 |
|
* Gets all source name |
|
@@ 2344-2367 (lines=24) @@
|
| 2341 |
|
* @return Array list of airline countries |
| 2342 |
|
* |
| 2343 |
|
*/ |
| 2344 |
|
public function getAllAirlineCountries() |
| 2345 |
|
{ |
| 2346 |
|
|
| 2347 |
|
$query = "SELECT DISTINCT spotter_output.airline_country AS airline_country |
| 2348 |
|
FROM spotter_output |
| 2349 |
|
WHERE spotter_output.airline_country <> '' |
| 2350 |
|
ORDER BY spotter_output.airline_country ASC"; |
| 2351 |
|
|
| 2352 |
|
//$query = "SELECT DISTINCT country AS airline_country FROM airlines WHERE country <> '' AND active = 'Y' ORDER BY country ASC"; |
| 2353 |
|
$sth = $this->db->prepare($query); |
| 2354 |
|
$sth->execute(); |
| 2355 |
|
|
| 2356 |
|
$airline_array = array(); |
| 2357 |
|
$temp_array = array(); |
| 2358 |
|
|
| 2359 |
|
while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 2360 |
|
{ |
| 2361 |
|
$temp_array['airline_country'] = $row['airline_country']; |
| 2362 |
|
|
| 2363 |
|
$airline_array[] = $temp_array; |
| 2364 |
|
} |
| 2365 |
|
|
| 2366 |
|
return $airline_array; |
| 2367 |
|
} |
| 2368 |
|
|
| 2369 |
|
|
| 2370 |
|
|
|
@@ 2574-2594 (lines=21) @@
|
| 2571 |
|
* @return Array list of ident/callsign names |
| 2572 |
|
* |
| 2573 |
|
*/ |
| 2574 |
|
public function getAllIdents() |
| 2575 |
|
{ |
| 2576 |
|
$query = "SELECT DISTINCT spotter_output.ident |
| 2577 |
|
FROM spotter_output |
| 2578 |
|
WHERE spotter_output.ident <> '' |
| 2579 |
|
ORDER BY spotter_output.date ASC LIMIT 700 OFFSET 0"; |
| 2580 |
|
|
| 2581 |
|
$sth = $this->db->prepare($query); |
| 2582 |
|
$sth->execute(); |
| 2583 |
|
|
| 2584 |
|
$ident_array = array(); |
| 2585 |
|
$temp_array = array(); |
| 2586 |
|
|
| 2587 |
|
while($row = $sth->fetch(PDO::FETCH_ASSOC)) |
| 2588 |
|
{ |
| 2589 |
|
$temp_array['ident'] = $row['ident']; |
| 2590 |
|
$ident_array[] = $temp_array; |
| 2591 |
|
} |
| 2592 |
|
|
| 2593 |
|
return $ident_array; |
| 2594 |
|
} |
| 2595 |
|
|
| 2596 |
|
/** |
| 2597 |
|
* Get a list of flights from airport since 7 days |