Beispiel #1
0
 public function specific($cabinet = null)
 {
     $this->load->model('LendingModel');
     $lending = new LendingModel();
     $this->load->model('ReportModel');
     $report = new ReportModel();
     $lend = $lending->inuse($cabinet);
     if ($report->specific($lend['id'])) {
         return true;
     }
 }
Beispiel #2
0
 public function closeloan($cabinet = null)
 {
     if ($this->isLogged()) {
         $page = $this->getPage();
         $this->load->model('LendingModel');
         $this->load->model('VisitorModel');
         $lending = new LendingModel();
         $visitor = new VisitorModel();
         if (!$lending->inuse($cabinet)) {
             $this->decidetask($cabinet);
         }
         switch ($this->session->userdata('role')) {
             case '1':
                 $this->load->view('public/norole');
                 break;
             case '2':
                 $data['lending'] = $lending->inuse($cabinet);
                 $data['visitor'] = $visitor->search($data['lending']['visitor']);
                 $this->load->view('template/user/header', $page);
                 $this->load->view('user/closeloan', $data);
                 break;
         }
         $this->load->view('template/public/footer');
     }
 }