application/controllers/Common.php
/* Function for get list of Basic serarch criteria and my tribe search */
Function for get list of Basic serarch criteria and my tribe search
Function for get list of Basic serarch criteria and my tribe search
public function search_criteria_list_post(){
    	$post_data = $this->post();
		$this->form_validation->set_data($post_data);
		$this->form_validation->set_error_delimiters('', '');
		$this->form_validation->set_rules('userId','User Id','required');		
		if ($this->form_validation->run() === false) {
    			$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => validation_errors(),'Result'=>''), 400);    		
		}else{
				$data['list'] = $this->Common_model->search_criteria_list($post_data);
				if ($data) {
					$this->response(array('ResponseCode' => 1, 'ResponseMessage' => 'SUCCESS', 'Comments' => 'Search criteria fetched successfully','Result'=>$data), 200);
				}else{
					$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'No data found','Result'=>'No Data Found'), 400);
				}
		}
    }
public function search_criteria_list_post ( ) { $ post_data = $ this -> post ( ) ; $ this -> form_validation -> set_data ( $ post_data ) ; $ this -> form_validation -> set_error_delimiters ( '' , '' ) ; $ this -> form_validation -> set_rules ( 'userId' , 'User Id' , 'required' ) ; if ( $ this -> form_validation -> run ( ) === false ) { $ this -> response ( array ( 'ResponseCode' => 0 , 'ResponseMessage' => 'FAILURE' , 'Comments' => validation_errors ( ) , 'Result' => '' ) , 400 ) ; } else { $ data [ 'list' ] = $ this -> Common_model -> search_criteria_list ( $ post_data ) ; if ( $ data ) { $ this -> response ( array ( 'ResponseCode' => 1 , 'ResponseMessage' => 'SUCCESS' , 'Comments' => 'Search criteria fetched successfully' , 'Result' => $ data ) , 200 ) ; } else { $ this -> response ( array ( 'ResponseCode' => 0 , 'ResponseMessage' => 'FAILURE' , 'Comments' => 'No data found' , 'Result' => 'No Data Found' ) , 400 ) ; } } }
Function for get list of Basic serarch criteria and my tribe search
Function for get list of Basic serarch criteria and my tribe search
//$data['count'] = $this->Common_model->count_search_criteria_list($post_data);     //print_r($data['count'])	;exit(); //if($data['count']){ // }else{ // 	$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'No data found','Result'=>'No Data Found'), 400); // }	