/** * Pilots::index() * * @return */ public function index() { // Get all of our hubs, and list pilots by hub $allhubs = OperationsData::GetAllHubs(); if (!$allhubs) { $allhubs = array(); } foreach ($allhubs as $hub) { $this->set('title', $hub->name); $this->set('icao', $hub->icao); $pilot_list = PilotData::findPilots(array('p.hub' => $hub->icao)); $this->set('allpilots', $pilot_list); # deprecated $this->set('pilot_list', $pilot_list); $this->render('pilots_list.tpl'); } $nohub = PilotData::findPilots(array('p.hub' => '')); if (!$nohub) { return; } $this->set('title', 'No Hub'); $this->set('icao', ''); $this->set('allpilots', $nohub); # deprecated $this->set('pilot_list', $nohub); $this->render('pilots_list.tpl'); }
protected function ShowForm() { $this->set('extrafields', RegistrationData::GetCustomFields()); $this->set('allairlines', OperationsData::GetAllAirlines(true)); $this->set('allhubs', OperationsData::GetAllHubs()); $this->set('countries', Countries::getAllCountries()); $this->render('registration_mainform.tpl'); }
</select> </td> </tr> <tr> <td align="right"><b>Transfer Hours:</b></td> <td><input type="text" name="transferhours" value="<?php echo $pilot->transferhours; ?> " /></td> </tr> <tr> <td align="right"><b>Hub:</b></td> <td> <select name="hub"> <?php $allhubs = OperationsData::GetAllHubs(); foreach ($allhubs as $hub) { if ($pilot->hub == $hub->icao) { $sel = ' selected'; } else { $sel = ''; } echo '<option value="' . $hub->icao . '" ' . $sel . '>' . $hub->icao . ' - ' . $hub->name . '</option>'; } ?> </select> </td> </tr> <tr> <td align="right"><b>Total Flights:</b></td>