load->model("UserModel"); $this->load->model("AbsenModel"); $this->load->model("AbsensiModel"); $this->load->model("LaporanModel"); if($this->UserModel->isNotLogin()) { redirect(site_url('login')); } elseif(!($this->UserModel->isAdmin())) { redirect(site_url('dashboard')); } } public function index() { if($this->input->get()){ $get = $this->input->get(); $data['tahun_laporan'] = $get['tahun']; $data['msg'] = $get['msg']; } $data['tahun_list']= $this->AbsenModel->getAbsenTahun(); $data['user_logged'] = $this->session->userdata('user_logged'); $data['absenmodel'] = $this->AbsenModel; $data['Laporanmodel'] = $this->LaporanModel; $this->load->view('admin/progresabsen',$data); } }