コード例 #1
0
ファイル: Settings.php プロジェクト: Galihom/phpVMS
 protected function PIREP_ShowFields()
 {
     $this->set('allfields', PIREPData::GetAllFields());
     $this->render('settings_pirepfieldsform.tpl');
 }
コード例 #2
0
ファイル: PIREPS.php プロジェクト: rallin/phpVMS
 protected function FilePIREPForm($bidid = '')
 {
     if (!Auth::LoggedIn()) {
         $this->set('message', 'You must be logged in to access this feature!');
         $this->render('core_error.tpl');
         return;
     }
     $this->set('pilot', Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname);
     $this->set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
     $this->set('pirepfields', PIREPData::GetAllFields());
     if ($bidid != '') {
         $this->set('bid', SchedulesData::GetBid($bidid));
         // get the bid info
     }
     $this->set('allairports', OperationsData::GetAllAirports());
     $this->set('allairlines', OperationsData::GetAllAirlines(true));
     $this->set('allaircraft', OperationsData::GetAllAircraft(true));
     $this->render('pirep_new.tpl');
 }
コード例 #3
0
ファイル: PIREPAdmin.php プロジェクト: ryanunderwood/phpVMS
 public function editpirep()
 {
     $this->set('pirep', PIREPData::GetReportDetails($this->get->pirepid));
     $this->set('allairlines', OperationsData::GetAllAirlines());
     $this->set('allairports', OperationsData::GetAllAirports());
     $this->set('allaircraft', OperationsData::GetAllAircraft());
     $this->set('fielddata', PIREPData::GetFieldData($this->get->pirepid));
     $this->set('pirepfields', PIREPData::GetAllFields());
     $this->set('comments', PIREPData::GetComments($this->get->pirepid));
     $this->render('pirep_edit.tpl');
 }
コード例 #4
0
ファイル: PIREPS.php プロジェクト: Galihom/phpVMS
 /**
  * PIREPS::FilePIREPForm()
  * 
  * @param string $bidid
  * @return
  */
 protected function FilePIREPForm($bidid = '')
 {
     if (!Auth::LoggedIn()) {
         $this->set('message', 'You must be logged in to access this feature!');
         $this->render('core_error.tpl');
         return;
     }
     $this->set('pilot', Auth::$pilot->firstname . ' ' . Auth::$pilot->lastname);
     $this->set('pilotcode', PilotData::GetPilotCode(Auth::$pilot->code, Auth::$pilot->pilotid));
     $this->set('pirepfields', PIREPData::GetAllFields());
     if ($bidid != '') {
         $this->set('bid', SchedulesData::GetBid($bidid));
         // get the bid info
     }
     $airport_list = OperationsData::getAllAirports();
     $this->set('allairports', $airport_list);
     #deprecated
     $this->set('airport_list', $airport_list);
     $airline_list = OperationsData::getAllAirlines(true);
     $this->set('allairlines', $airline_list);
     #deprecated
     $this->set('airline_list', $airline_list);
     $aircraft_list = OperationsData::getAllAircraft(true);
     /*	Skip any aircraft which have aircraft that the pilot
     			is not rated to fly (according to RANK)
                 This means the aircraft rank level is higher than
     			what the pilot's ranklevel, so just do "continue"
     			and move onto the next route in the list 
     	     */
     if (Config::Get('RESTRICT_AIRCRAFT_RANKS') === true) {
         foreach ($aircraft_list as $index => $aircraft) {
             if ($aircraft->ranklevel > Auth::$pilot->ranklevel) {
                 unset($aircraft_list[$index]);
                 continue;
             }
         }
     }
     $this->set('allaircraft', $aircraft_list);
     #deprecated
     $this->set('aircraft_list', $aircraft_list);
     $this->render('pirep_new.tpl');
 }