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

class Agent extends CI_Controller {

var $_page_data=array('view_page_name'=>'gc/agent_manage.php','form_action'=>'gc/agent/manage_agent','agent_id'=>'','agent_code'=>'','agent_name'=>'','is_enabled'=>'','error'=>'');
	
	function __construct()	{
		parent::__construct();
		$this->load->model('master_model');
	}

	function index()	{	
		$this->list_agent();
	}
	
	function manage_agent($purpose=null){
		if($purpose=='')
			$purpose='Add';
		$this->_page_data['purpose']=$purpose;
		$this->_page_data['page_title']=$purpose." Agent";
		$this->_page_data['bredcrum']=array(
										'Manage Agent'=>site_url(AGENT_PATH.'list_agent'),
										'Add Agent'=>'#',
										);
		$this->load->view('gc/agent_manage.php',$this->_page_data);
	}
		
	function confirm_agent()	{
		$this->_page_data['page_title']="Confirm Agent";
		$this->_page_data['bredcrum']=array(
										'Manage Agent'=>site_url(AGENT_PATH.'list_agent'),
										'Confirm Agent'=>'#',
										);
		$this->load->view('gc/agent_confirm.php',$this->_page_data);
	}
	
	function view_agent()	{
		$this->_page_data['page_title']="View Agent";
		$this->_page_data['bredcrum']=array(
										'Manage Agent'=>site_url(AGENT_PATH.'list_agent'),
										'View Agent'=>'#',
										);
		$this->load->view('gc/agent_view.php',$this->_page_data);
	}
	
	function list_agent($query_id = 0, $sort_by = '', $sort_order = 'asc', $offset = 0) {
		$this->_page_data['page_title']="List Agent";
		$this->_page_data['bredcrum']=array(
										'Manage Agent'=>'#',
										'List Agent'=>'#',
										);
		$this->load->view('gc/agent_list.php',$this->_page_data);
	}	
}