diff --git a/application/controllers/Webservices.php b/application/controllers/Webservices.php index 4897dca..01bc79c 100644 --- a/application/controllers/Webservices.php +++ b/application/controllers/Webservices.php @@ -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); diff --git a/application/models/Webservice_model.php b/application/models/Webservice_model.php index 2fb5e10..ce3ec8f 100644 --- a/application/models/Webservice_model.php +++ b/application/models/Webservice_model.php @@ -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(); diff --git a/index.php b/index.php index 263949c..30f5ef8 100644 --- a/index.php +++ b/index.php @@ -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'); /* *---------------------------------------------------------------