{ public $lat; public $lng; } switch ($acars_action) { /* Request data about a flight */ case 'data': $flight = $_REQUEST['DATA2']; Debug::log('FLIGHT PLAN REQUEST', 'xacars'); # They requested latest bid if (strtolower($flight) == 'bid') { /*preg_match('/^([A-Za-z]*)(\d*)/', $_REQUEST['DATA4'], $matches); $code = $matches[1]; $pilotid = intval($matches[2]) - Config::Get('PILOTID_OFFSET');*/ $pilotid = PilotData::parsePilotID($_REQUEST['DATA4']); $route = SchedulesData::GetLatestBid($pilotid); if (!$route) { echo '0|No bids found!'; return; } } else { if (is_numeric($flight)) { echo '0|No airline code entered!'; return; } $flightinfo = SchedulesData::getProperFlightNum($flight); $code = $flightinfo['code']; $flight_num = $flightinfo['flightnum']; $route = SchedulesData::GetScheduleByFlight($code, $flight_num); Debug::log(print_r($route, true), 'xacars'); if (!$route) {