40 lines
841 B
PHP
40 lines
841 B
PHP
|
<?php
|
||
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
||
|
|
||
|
class Umkm 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'));
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
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);
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|