application/controllers/Common.php
/* Fetch the details of perticular search's chat messages*/
Fetch the details of perticular search's chat messages
Fetch the details of perticular search ' s chat messages
public function search_detail_chats_post(){
		$post_data = $this->post();
		$this->form_validation->set_data($post_data);
		$this->form_validation->set_error_delimiters('', '');	
		$loginUserId = array_key_exists("loginUserId",$post_data);
        if($loginUserId){ 
            $loginUserId =  $post_data['loginUserId'];             
			$this->form_validation->set_rules('loginUserId','User Id','required|numeric|callback_user_in_tribe_check['.$post_data['searchId'].']');				
        }					
		$this->form_validation->set_rules('searchId','Search criteria id','required|numeric|callback_search_criteria_check');		
		if ($this->form_validation->run() === false) {
    			$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => validation_errors(),'Result'=>''), 400);    		
		}else{
			$data['count'] = $this->Common_model->count_search_detail_chats($post_data);
			if($data['count']){
				$data['list']= $this->Common_model->search_detail_chats($post_data);
				if($data['list']){				
					$this->response(array('ResponseCode' => 1, 'ResponseMessage' => 'SUCCESS', 'Comments' => 'Chat detail fetch successfully','Result'=>$data), 200);
				}else{
					$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'No data found','Result'=>false), 400);
				}
			}else{
				$this->response(array('ResponseCode' => 0, 'ResponseMessage' => 'FAILURE', 'Comments' => 'No data found','Result'=>false), 400);
			}
		}
	}
public function search_detail_chats_post ( ) { $ post_data = $ this -> post ( ) ; $ this -> form_validation -> set_data ( $ post_data ) ; $ this -> form_validation -> set_error_delimiters ( '' , '' ) ; $ loginUserId = array_key_exists ( " loginUserId " , $ post_data ) ; if ( $ loginUserId ) { $ loginUserId = $ post_data [ 'loginUserId' ] ; $ this -> form_validation -> set_rules ( 'loginUserId' , 'User Id' , 'required|numeric|callback_user_in_tribe_check[' . $ post_data [ 'searchId' ] . ']' ) ; } $ this -> form_validation -> set_rules ( 'searchId' , 'Search criteria id' , 'required|numeric|callback_search_criteria_check' ) ; if ( $ this -> form_validation -> run ( ) === false ) { $ this -> response ( array ( 'ResponseCode' => 0 , 'ResponseMessage' => 'FAILURE' , 'Comments' => validation_errors ( ) , 'Result' => '' ) , 400 ) ; } else { $ data [ 'count' ] = $ this -> Common_model -> count_search_detail_chats ( $ post_data ) ; if ( $ data [ 'count' ] ) { $ data [ 'list' ] = $ this -> Common_model -> search_detail_chats ( $ post_data ) ; if ( $ data [ 'list' ] ) { $ this -> response ( array ( 'ResponseCode' => 1 , 'ResponseMessage' => 'SUCCESS' , 'Comments' => 'Chat detail fetch successfully' , 'Result' => $ data ) , 200 ) ; } else { $ this -> response ( array ( 'ResponseCode' => 0 , 'ResponseMessage' => 'FAILURE' , 'Comments' => 'No data found' , 'Result' => false ) , 400 ) ; } } else { $ this -> response ( array ( 'ResponseCode' => 0 , 'ResponseMessage' => 'FAILURE' , 'Comments' => 'No data found' , 'Result' => false ) , 400 ) ; } } }
Fetch the details of perticular search's chat messages
Fetch the details of perticular search ' s chat messages