Commit 9644680a by Jansa Jose

mail

parent 5d20300d
......@@ -2453,12 +2453,12 @@ public function end_ride_update_post(){
$include_player_ids = array($res->player_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['subject'] = 'Booking Rejected';
$data['msg'] = 'Hi '.$res->first_name.', Your Request is Rejected.';
$this->send_mails($data);
$return = $res;
$return = $ress;
// print($return);
// $return = json_encode($return);
......@@ -2472,7 +2472,7 @@ public function end_ride_update_post(){
public function approve_send_alert($request){
$res=$this->Webservice_model->approve_send_details($request->booking_id);
//print_r($res->email);exit();
$content = array(
"en" => 'Ride Accepted '
......@@ -2484,15 +2484,15 @@ public function end_ride_update_post(){
// var_dump($content);
$type='ride_approve_alert';
//die;
$include_player_ids = array($res->player_id);
$include_player_ids = array(isset($res->device_id) && !empty($res->device_id)? $res->device_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['subject'] = 'Booking Approved';
$data['msg'] = 'Hi '.$res->first_name.', Your Request is Approved.';
$this->send_mails($data);
$return = $res;
$return = $ress;
// print($return);
// $return = json_encode($return);
......
......@@ -2173,7 +2173,7 @@ function get_push_notification_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->from('booking');
$this->db->join('users','booking.user_id=users.id','left');
......@@ -2184,12 +2184,12 @@ function reject_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->from('booking');
$this->db->join('users','booking.user_id=users.id','left');
$query= $this->db->get();
// echo $this->db->last_query();
//echo $this->db->last_query();
return $query->row();
......
......@@ -55,7 +55,7 @@ date_default_timezone_set("Asia/Kolkata");
*
* 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