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

class Logout extends CI_Controller{
	public function index(){
		$this->load->model('Usermaster');
			 $updateOnline = array(
			 	'online' => 0 
			 );
			$result = $this->Usermaster->usermaster_edit($updateOnline, element('role', $this->session->userdata('logged_in')));
		$this->session->sess_destroy();
		 redirect('login', 'refresh');
	}
}
?>