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

class Token_type_ctrl extends user_icd_index {
 
	
	public function __construct(){
		parent::__construct(); 
		$data = array();
		$this->load->model('admin_model');
		$this->load->model('icd_model');
	}
	 
	 
	/*----------------- load local_search_list page -----------------*/
	public function local_search_list(){		
		$data['sdata'] 			= array(); 
			
		$data['active_cls'] 	= 'conedl_cls';	
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');	
		if(isset($_POST['token_no_val'])){ 
			$token_no = $this->input->post('token_no_val');
			$data['sdata']['igetl_list'] 		= $this->icd_model->get_icdl_igetl_details_list('','','',$token_no,'1');
		}else if(!isset($_POST['token_no_val'])){		
			$data['sdata']['igetl_list'] 		= $this->icd_model->get_icdl_igetl_details_list('','','','','1');
		}


		if($this->user['panel_type']=='9'){
			$data['subview'] 	= 'icd/token_type/local/l_geo_local_list';
		}else if($this->user['panel_type']=='10'){
			$data['subview'] 	= 'icd/token_type/local/l_igeo_local_list';
		}else if($this->user['panel_type']=='11'){
			$data['subview'] 	= 'icd/token_type/local/l_iao_local_list'; 
		}else if($this->user['panel_type']=='12'){
			$data['subview'] 	= 'icd/token_type/local/l_iomo_local_list';
		}	


		// echo $this->db->last_query(); return;
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}
	

	/*----------------- load transit_search_list page -----------------*/
	public function transit_search_list(){		
		$data['sdata'] 			= array(); 
			
		$data['active_cls'] 	= 'conedl_cls';	
		$data['url_list'] 		= $this->admin_model->get_result_array_with_one_where('user_role_list','url_status','1');	
		if(isset($_POST['token_no_val'])){ 
			$token_no = $this->input->post('token_no_val');
			$data['sdata']['igetl_list'] 		= $this->icd_model->get_icdl_igetl_details_list('','','',$token_no,'2');
		}else if(!isset($_POST['token_no_val'])){		
			$data['sdata']['igetl_list'] 		= $this->icd_model->get_icdl_igetl_details_list('','','','','2');
		} 


		if($this->user['panel_type']=='9'){
			$data['subview'] 	= 'icd/token_type/transit/t_geo_transit_list';
		}else if($this->user['panel_type']=='10'){
			$data['subview'] 	= 'icd/token_type/transit/t_igeo_transit_list';
		}else if($this->user['panel_type']=='11'){
			$data['subview'] 	= 'icd/token_type/transit/t_iao_transit_list';
		}else if($this->user['panel_type']=='12'){
			$data['subview'] 	= 'icd/token_type/transit/t_iomo_transit_list';
		}	

		// echo $this->db->last_query(); return;
		$this->load->view('icd/common/icd_sidepanel',$data); 
	}

	
 

 
	
	
	
}
