Exemplo n.º 1
0
 public function view_profile()
 {
     $id = Auth::$userinfo->pilotid;
     $this->set('pilotdata', ExamsData::get_pilot_data($id));
     $this->show('exams/exam_view_profile');
 }
Exemplo n.º 2
0
 protected function edit_admin_setting()
 {
     $pilot_id = DB::escape($this->post->pilot_id);
     $admin_level = DB::escape($this->post->admin_level);
     $cur_level = DB::escape($this->post->cur_level);
     if ($cur_level == $admin_level) {
         $this->set('pilots', PilotData::GetAllPilots());
         $this->show('exams/exam_assign_admin');
     } elseif ($cur_level == '0') {
         ExamsData::add_admin($pilot_id, $admin_level);
         $this->set('message', '<div id="success">Pilot Administrator Status Changed.</div>');
         $this->set('pilots', PilotData::GetAllPilots());
         $this->show('exams/exam_assign_admin');
     } elseif ($admin_level == '0') {
         ExamsData::delete_admin($pilot_id);
         $this->set('message', '<div id="success">Pilot Administrator Status Changed.</div>');
         $this->set('pilots', PilotData::GetAllPilots());
         $this->show('exams/exam_assign_admin');
     } else {
         ExamsData::edit_admin($pilot_id, $admin_level);
         $this->set('message', '<div id="success">Pilot Administrator Status Changed.</div>');
         $this->set('pilots', PilotData::GetAllPilots());
         $this->show('exams/exam_assign_admin');
     }
 }