Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class C_Owner extends CI_Controller {
- function __construct(){
- parent::__construct();
- // $this->auth->cek_login();
- if($this->session->userdata('masuk') != TRUE){
- // $url=site_url();
- $this->session->set_flashdata('sukses','Anda belum login');
- redirect(site_url('C_Login'));
- }
- $this->load->helper(array('form', 'url'));
- $this->load->library(array('form_validation'));
- $this->load->database();
- $this->load->model(array('M_Users','M_Divisi'));
- }
- public function index()
- {
- $jumlah['users']= $this->M_Users->jml_user();
- $jumlah['divisi']= $this->M_Divisi->jml_divisi();
- $this->template->set('title','Home');
- $this->template->load('default_layout', 'content', 'Owner/V_Home', $jumlah);
- }
- public function users()
- {
- $users['user'] = $this->M_Users->all_user();
- $this->template->set('title','Users');
- $this->template->load('default_layout', 'content', 'Owner/V_Users', $users);
- }
- public function insert_user()
- {
- $users['user'] = $this->M_Users->get_insert_user();
- $this->template->set('title','Users');
- $this->template->load('default_layout', 'content', 'Owner/V_Users', $users);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement