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

class Logout extends CI_Controller {
	var $arrLogin;
	public function __construct(){
 		parent::__construct();
 		 $this->load->model(array('admin/admin_model',)); 
		 $this->load->helper(array('form', 'url'));
 	}
	
	function index()
	{	
		$adminSessionData = $this->session->userdata('BIBLEALL_RP_ADMIN');
		$track_user_type = ($adminSessionData['PRIVILEGE'] == 'admin')?$adminSessionData['PRIVILEGE']:'SubAdmin';$track_user_email = $adminSessionData['EMAIL'];
		$track_user_details = $track_user_type.' has been logged out';
 		$arrTracking =array( 'log_type' => 'AdminActivity', 'log_status_msg' => 'Logout', 'log_msg' => $track_user_details ); 						
 		$this->admin_model->tracking($arrTracking);
 		$this->session->unset_userdata('BIBLEALL_RP_ADMIN');
 		
		redirect('admin', 'refresh');
 	}
}
/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */