public function index() { /* Dashboard.tpl calls the functions below */ $this->CheckForUpdates(); CentralData::send_vastats(); $this->set('unexported_count', count(PIREPData::getReportsByExportStatus(false))); $this->render('dashboard.php'); }
<a href="?a=sendpirep">Send a PIREP</a> | <a href="?a=sendacars">Send ACARS Data</a> | <a href="?a=sendallacars">Send All ACARS Data</a> </td> </tr> <tr> <td> <br /> <?php if (isset($_GET['diag'])) { Config::Set('VACENTRAL_API_SERVER', 'http://apidev.phpvms.net'); echo '<p style="color: red">Debug mode enabled!</p>'; } CentralData::$debug = true; switch ($_GET['a']) { case 'sendstats': $resp = CentralData::send_vastats(); break; case 'sendschedules': $resp = CentralData::send_schedules(); break; case 'sendpilots': $resp = CentralData::send_pilots(); break; 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;