load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } } public function index() { $data['page_title'] = "QRB Calculaltor"; $this->load->view('qrbcalc/index', $data); } }