load->model("UserModel"); $this->load->model("UmkmModel"); $this->load->model("KategoriModel"); 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['del_msg']= $get['del_msg']; if(isset($get['umkm'])){ $data['del_umkm']= $get['umkm']; } } $data['user_logged'] = $this->session->userdata('user_logged'); $data['data_umkm'] = $this->UmkmModel->getUmkm(); $this->load->view('admin/umkm',$data); } }