41 lines
925 B
PHP
41 lines
925 B
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Dashboard extends CI_Controller {
|
|
|
|
public function __construct()
|
|
{
|
|
parent::__construct();
|
|
$this->load->model("UmkmModel");
|
|
$this->load->model("UserModel");
|
|
$this->load->model("KategoriModel");
|
|
|
|
if($this->UserModel->isNotLogin()) {
|
|
redirect(site_url('login'));
|
|
} elseif(!($this->UserModel->isPemilik())) {
|
|
redirect(site_url('admin/dashboard'));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
if($this->input->get()){
|
|
$get = $this->input->get();
|
|
if(isset($get['pemilik'])){
|
|
$data['del_pemilik']= $get['pemilik'];
|
|
}
|
|
$data['del_msg']= $get['del_msg'];
|
|
|
|
}
|
|
|
|
$data['user_logged'] = $this->session->userdata('user_logged');
|
|
$data['data_umkm'] = $this->UmkmModel->getUmkmsByIdPemilik($data['user_logged']->id_user);
|
|
$this->load->view('user/dashboard',$data);
|
|
|
|
}
|
|
|
|
|
|
}
|