<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Error extends MY_Controller {

	public function index()
	{
		save_current_url(base_url() . 'error/');
		
		if($this->session->userdata('user_type') && ($this->session->userdata('user_type') == SUPERADMIN || $this->session->userdata('user_type') == ADMIN)) {
			$this->lang->load('account_general', get_language());
		
			$data['page_title'] = $this->lang->line('website_name') . ' | ' . $this->lang->line('hf_error');
		
			$this->load->view('error', $data);
		}
		else {
			redirect('login', 'refresh');
		}
	}
}

/* End of file error.php */
/* Location: ./application/controllers/error.php */