You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

47 lines
799 B

<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Logout Class
*/
class Dashboard extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->library('session');
if(! $this->session->userdata('validated')){
redirect(base_url('/login'));
}
}
public function index()
{
if ($this->session->admin == '1' OR $this->session->superadmin == '1') {
redirect(base_url('/dashboard/admin'));
} else {
redirect(base_url('/dashboard/user'));
}
}
public function admin()
{
}
public function user()
{
$data['title'] = 'JOS';
// Header
$this->load->view('header');
// login page
$this->load->view('dashboard_user', $data);
// Footer
$this->load->view('footer');
}
}