41 lines
1022 B
PHP
41 lines
1022 B
PHP
|
<?php
|
||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||
|
|
||
|
class DetailPemilik extends CI_Controller {
|
||
|
|
||
|
public function __construct()
|
||
|
{
|
||
|
parent::__construct();
|
||
|
$this->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);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|