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')); } $get = $this->input->get(); if($get['id_user']==NULL){ redirect(site_url('admin/dashboard')); } } public function index() { $get = $this->input->get(); $pemilik = $this->UserModel->getUsersById($get['id_user']); $data['jumlahumkm'] = $this->UmkmModel->getUmkmCountByUserId($get['id_user']); $data['listumkm'] = $this->UmkmModel->getUmkmsByIdPemilik($get['id_user']); $data['pemilik'] = $pemilik; $data['user_logged'] = $this->session->userdata('user_logged'); $this->load->view('admin/detailpemilik',$data); } }