Commit e119aeaa by Jansa Jose

J : change push param user id to friend id

parent 7d25bcdb
......@@ -116,12 +116,16 @@ class FlightServices_model extends CI_Model {
$data['issue_country'] = str_replace(" ","<br>",$data['issue_country']);
$data['passport_expiry'] = str_replace(" ","<br>",$data['passport_expiry']);
$data['passport_no'] = str_replace(" ","<br>",$data['passport_no']);
$childMealplan = (isset($data['childMealplan']) && !empty($data['childMealplan']))?$data['childMealplan']:'';
$infantMealplan = (isset($data['infantMealplan']) && !empty($data['infantMealplan']))?$data['infantMealplan']:'';
$adultmealplan = (isset($data['adultmealplan']) && !empty($data['adultmealplan']))?$data['adultmealplan']:'';
$postCode = (isset($data['PostCode']) && !empty($data['PostCode']))?$data['PostCode']:'';
$url = "https://trawex.biz/api/flight_trawex/book?user_id=".$settings['trawex_user_id']."&user_password=".$settings['trawex_user_password']."&access=".$settings['trawex_access']."&ip_address=".$settings['trawex_ip_address']."&target=".$data['target']."&session_id=".$data['session_id']."&area_code=".$data['area_code']."&country_code=".$data['country_code']."&first_name=".$data['first_name']."&last_name=".$data['last_name']."&title=".$data['title']."&email_id=".$data['email_id']."&mobile_no=".$data['mobile_no']."&dob=".$data['dob']."&gender=".$data['gender']."&issue_country=".$data['issue_country']."&passport_expiry=".$data['passport_expiry']."&passport_no=".$data['passport_no']."&type=".$data['type']."&IsPassportMandatory=".$data['IsPassportMandatory']."&adult_flight=".$data['adult_flight']."&child_flight=".$data['child_flight']."&infant_flight=".$data['infant_flight']."&frequentFlyrNum=".$data['frequentFlyrNum']."&adultmealplan=".$data['adultmealplan']."&child_dob=".$data['child_dob']."&child_gender=".$data['child_gender']."&child_title=".$data['child_title']."&child_first_name=".$data['child_first_name']."&child_last_name=".$data['child_last_name']."&child_passport_expiry_date=".$data['child_passport_expiry_date']."&child_passport_no=".$data['child_passport_no']."&child_frequentFlyrNum=".$data['child_frequentFlyrNum']."&childMealplan=".$data['childMealplan']."&infant_dob=".$data['infant_dob']."&infant_gender=".$data['infant_gender']."&infant_first_name=".$data['infant_first_name']."&infant_last_name=".$data['infant_last_name']."&infant_title=".$data['infant_title']."&infantMealplan=".$data['infantMealplan']."&FareSourceCode=".$data['FareSourceCode']."&PostCode=".$data['PostCode']."";
$url = "https://trawex.biz/api/flight_trawex/book?user_id=".$settings['trawex_user_id']."&user_password=".$settings['trawex_user_password']."&access=".$settings['trawex_access']."&ip_address=".$settings['trawex_ip_address']."&target=".$data['target']."&session_id=".$data['session_id']."&area_code=".$data['area_code']."&country_code=".$data['country_code']."&first_name=".$data['first_name']."&last_name=".$data['last_name']."&title=".$data['title']."&email_id=".$data['email_id']."&mobile_no=".$data['mobile_no']."&dob=".$data['dob']."&gender=".$data['gender']."&issue_country=".$data['issue_country']."&passport_expiry=".$data['passport_expiry']."&passport_no=".$data['passport_no']."&type=".$data['type']."&IsPassportMandatory=".$data['IsPassportMandatory']."&adult_flight=".$data['adult_flight']."&child_flight=".$data['child_flight']."&infant_flight=".$data['infant_flight']."&frequentFlyrNum=".$data['frequentFlyrNum']."&adultmealplan=".$adultmealplan."&child_dob=".$data['child_dob']."&child_gender=".$data['child_gender']."&child_title=".$data['child_title']."&child_first_name=".$data['child_first_name']."&child_last_name=".$data['child_last_name']."&child_passport_expiry_date=".$data['child_passport_expiry_date']."&child_passport_no=".$data['child_passport_no']."&child_frequentFlyrNum=".$data['child_frequentFlyrNum']."&childMealplan=".$childMealplan."&infant_dob=".$data['infant_dob']."&infant_gender=".$data['infant_gender']."&infant_first_name=".$data['infant_first_name']."&infant_last_name=".$data['infant_last_name']."&infant_title=".$data['infant_title']."&infantMealplan=".$infantMealplan."&FareSourceCode=".$data['FareSourceCode']."&PostCode=".$postCode."";
$result = $this->passToJsonCurl($url,'');
if(!empty($result)){
$result = json_decode($result);
$res = array('status'=>1,'result'=>$result);
$res = array('status'=>1,'data'=>$result);
}else{
$res = array('status'=>0,'message'=>'No Data Found','code'=>'ER08');
}
......
......@@ -1970,7 +1970,7 @@ class Webservice_model extends CI_Model {
if($data['add_as_friend'] == 1){
$toCustData = $this->db->get_where('customer',array('customer_id'=>$fromUser))->row_array();
$frmCustData = $this->db->get_where('customer',array('customer_id'=>$user_id))->row_array();
$fcmData = array('id'=>$user_id,'param'=>'user_id',
$fcmData = array('id'=>$user_id,'param'=>'friend_id',
'title'=>'Accepted Chat Request',
'message'=>$frmCustData['name'].' has Accepted Your Chat Request');
push_sent_cancel(1,$toCustData['fcm_token'],$fcmData);
......@@ -1994,7 +1994,7 @@ class Webservice_model extends CI_Model {
$toCustData = $this->db->get_where('customer',array('customer_id'=>$toUser))->row_array();
$frmCustData = $this->db->get_where('customer',array('customer_id'=>$user_id))->row_array();
$fcmData = array('id'=>$toUser,'param'=>'user_id',
$fcmData = array('id'=>$toUser,'param'=>'friend_id',
'title'=>'New Chat Request',
'message'=>'You got a New Chat Request from '.$toCustData['name']);
push_sent_cancel(1,$frmCustData['fcm_token'],$fcmData);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment