case 'sendallpireps': $resp = CentralData::send_all_pireps(); break; case 'sendpirep': $pirep = PIREPData::findPIREPS(array(), 20); $num = rand(0, count($pirep) - 1); $resp = CentralData::send_pirep($pirep[$num]->pirepid); break; case 'sendacars': # Send a random flight $flights = ACARSData::GetAllFlights(); $total = count($flights); $resp = CentralData::send_acars_data($flights[rand(0, $total - 1)]); break; case 'sendallacars': $resp = CentralData::send_all_acars(); break; } ?> <h3>Response:</h3> <pre><?php $response = CentralData::$xml_response; echo htmlentities(formatXmlString($response)); ?> </pre> <h3>Sent Data</h3> <pre><?php if (CentralData::$type == 'xml') { $xml = CentralData::$xml->asXML(); echo htmlentities(formatXmlString($xml));