예제 #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
 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');
 }