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

class Allhadlers extends CI_Model {
public function allterms_handler($searchterm,$name)
	{
		
		
		if($searchterm)
		{
		
			$this->session->set_userdata($name, $searchterm);
			return $searchterm;
		}
		elseif($this->session->userdata($name))
		{
			$searchterm = $this->session->userdata($name);
			return $searchterm;
		}
		else
		{
			$searchterm ="";
			return $searchterm;
		}
	}
	
	public function group_handler($searchterm)
	{
		if($searchterm)
		{
			$this->session->set_userdata('group', $searchterm);
			return $searchterm;
		}
		elseif($this->session->userdata('group'))
		{
			$searchterm = $this->session->userdata('group');
			return $searchterm;
		}
		else
		{
			$searchterm ="";
			return $searchterm;
		}
	}

}

 ?>