Advertisement
Bannip73

Administrator

Nov 10th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3.  
  4. class Administrator extends CI_Controller {
  5.  
  6.     public function __construct()
  7.     {
  8.         parent::__construct();
  9.         $this->ceklogin();
  10.     }
  11.  
  12.     private function ceklogin()
  13.     {
  14.         $id_user = $this->session->userdata('userid');
  15.         $status = $this->session->userdata('status');
  16.         if ($id_user == null OR $status != 'ok') {
  17.             redirect("auth");
  18.         }
  19.     }
  20.  
  21.     public function index() {
  22.         $data = array(
  23.             'title' => 'user',
  24.             'title_level1' => 'Data User',
  25.             'title_level2' => 'Data User',
  26.             'datauser' =>$this->model->getUsers(),
  27.             'konten' => 'administrator/users/v_users',
  28.  
  29.         );
  30.         $this->load->view('administrator/template', $data);
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement