Commit 9644680a by Jansa Jose

mail

parent 5d20300d
...@@ -2453,12 +2453,12 @@ public function end_ride_update_post(){ ...@@ -2453,12 +2453,12 @@ public function end_ride_update_post(){
$include_player_ids = array($res->player_id); $include_player_ids = array($res->player_id);
$id=''; $id='';
$res= $this->send_Message($content,$headings,$include_player_ids,$res,$type,$id); $ress= $this->send_Message($content,$headings,$include_player_ids,$res,$type,$id);
$data['email'] = $res->email; $data['email'] = $res->email;
$data['subject'] = 'Booking Rejected'; $data['subject'] = 'Booking Rejected';
$data['msg'] = 'Hi '.$res->first_name.', Your Request is Rejected.'; $data['msg'] = 'Hi '.$res->first_name.', Your Request is Rejected.';
$this->send_mails($data); $this->send_mails($data);
$return = $res; $return = $ress;
// print($return); // print($return);
// $return = json_encode($return); // $return = json_encode($return);
...@@ -2472,7 +2472,7 @@ public function end_ride_update_post(){ ...@@ -2472,7 +2472,7 @@ public function end_ride_update_post(){
public function approve_send_alert($request){ public function approve_send_alert($request){
$res=$this->Webservice_model->approve_send_details($request->booking_id); $res=$this->Webservice_model->approve_send_details($request->booking_id);
//print_r($res->email);exit();
$content = array( $content = array(
"en" => 'Ride Accepted ' "en" => 'Ride Accepted '
...@@ -2484,15 +2484,15 @@ public function end_ride_update_post(){ ...@@ -2484,15 +2484,15 @@ public function end_ride_update_post(){
// var_dump($content); // var_dump($content);
$type='ride_approve_alert'; $type='ride_approve_alert';
//die; //die;
$include_player_ids = array($res->player_id); $include_player_ids = array(isset($res->device_id) && !empty($res->device_id)? $res->device_id : '');
$id=''; $id='';
$res= $this->send_Message($content,$headings,$include_player_ids,$res,$type,$id); $ress= $this->send_Message($content,$headings,$include_player_ids,$res,$type,$id);
$data['email'] = $res->email; $data['email'] = $res->email;
$data['subject'] = 'Booking Approved'; $data['subject'] = 'Booking Approved';
$data['msg'] = 'Hi '.$res->first_name.', Your Request is Approved.'; $data['msg'] = 'Hi '.$res->first_name.', Your Request is Approved.';
$this->send_mails($data); $this->send_mails($data);
$return = $res; $return = $ress;
// print($return); // print($return);
// $return = json_encode($return); // $return = json_encode($return);
......
...@@ -2173,7 +2173,7 @@ function get_push_notification_details($request){ ...@@ -2173,7 +2173,7 @@ function get_push_notification_details($request){
} }
function reject_send_details($request){ function reject_send_details($request){
$this->db->where('booking.booking_id',$request); $this->db->where('booking.id',$request);
$this->db->select('booking.*,users.*'); $this->db->select('booking.*,users.*');
$this->db->from('booking'); $this->db->from('booking');
$this->db->join('users','booking.user_id=users.id','left'); $this->db->join('users','booking.user_id=users.id','left');
...@@ -2184,12 +2184,12 @@ function reject_send_details($request){ ...@@ -2184,12 +2184,12 @@ function reject_send_details($request){
} }
function approve_send_details($request){ function approve_send_details($request){
$this->db->where('booking.booking_id',$request); $this->db->where('booking.id',$request);
$this->db->select('booking.*,users.*'); $this->db->select('booking.*,users.*');
$this->db->from('booking'); $this->db->from('booking');
$this->db->join('users','booking.user_id=users.id','left'); $this->db->join('users','booking.user_id=users.id','left');
$query= $this->db->get(); $query= $this->db->get();
// echo $this->db->last_query(); //echo $this->db->last_query();
return $query->row(); return $query->row();
......
...@@ -55,7 +55,7 @@ date_default_timezone_set("Asia/Kolkata"); ...@@ -55,7 +55,7 @@ date_default_timezone_set("Asia/Kolkata");
* *
* NOTE: If you change these, also change the error_reporting() code below * NOTE: If you change these, also change the error_reporting() code below
*/ */
define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'production'); define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development');
/* /*
*--------------------------------------------------------------- *---------------------------------------------------------------
......
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