Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defined('BASEPATH') or exit('No direct script access allowed');
- class Admin extends CI_Controller
- {
- public function __construct()
- {
- parent::__construct();
- $this->load->model('Admin_model', 'admin');
- if ($this->session->userdata('level') != 'admin') {
- redirect('welcome/login');
- }
- }
- public function index()
- {
- $data = [
- 'title' => 'Dashboard',
- 'dashboard' => $this->admin->dashboard_info(),
- 'content' => 'admin/dashboard',
- ];
- $this->load->view('layout/wrapper', $data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement