delete bookings
Showing
... | @@ -138,7 +138,7 @@ header('Content-Type: text/html; charset=utf-8'); | ... | @@ -138,7 +138,7 @@ header('Content-Type: text/html; charset=utf-8'); |
} | } | ||
##################################### Facebook Login ####################################################### | ##################################### Facebook Login ################################################# | ||
public function google_login_post(){ | public function google_login_post(){ | ||
// 'fb_login');die(); | // 'fb_login');die(); | ||
... | @@ -159,7 +159,7 @@ header('Content-Type: text/html; charset=utf-8'); | ... | @@ -159,7 +159,7 @@ header('Content-Type: text/html; charset=utf-8'); |
} | } | ||
public function get_cars_details_post(){ | public function get_cars_details_post(){ | ||
$postdata = file_get_contents("php://input"); | $postdata = file_get_contents("php://input"); | ||
$request = json_decode($postdata,true); | $request = json_decode($postdata,true); | ||
$result = $this->Webservice_model->get_cars_details($request); | $result = $this->Webservice_model->get_cars_details($request); | ||
... | @@ -190,9 +190,7 @@ public function fb_login_post(){ | ... | @@ -190,9 +190,7 @@ public function fb_login_post(){ |
} | } | ||
##################################### Forgot password ############################################### | |||
##################################### Forgot password ####################################################### | |||
public function forgot_password_post() { | public function forgot_password_post() { | ||
... | @@ -215,9 +213,7 @@ public function fb_login_post(){ | ... | @@ -215,9 +213,7 @@ public function fb_login_post(){ |
} | } | ||
##################################### Change password ################################################ | |||
##################################### Change password ####################################################### | |||
public function change_password_post(){ | public function change_password_post(){ | ||
... | @@ -245,11 +241,7 @@ public function fb_login_post(){ | ... | @@ -245,11 +241,7 @@ public function fb_login_post(){ |
##################################### Biography Update ################################################ | |||
##################################### Biography Update ####################################################### | |||
public function update_biography_post(){ | public function update_biography_post(){ | ||
... | @@ -275,16 +267,7 @@ public function fb_login_post(){ | ... | @@ -275,16 +267,7 @@ public function fb_login_post(){ |
} | } | ||
##################################### Profile Update ############################################### | |||
##################################### Profile Update ####################################################### | |||
public function update_profile_post(){ | public function update_profile_post(){ | ||
... | @@ -311,14 +294,7 @@ public function fb_login_post(){ | ... | @@ -311,14 +294,7 @@ public function fb_login_post(){ |
##################################### Profile Pic upadate ########################################### | |||
##################################### Profile Pic upadate ####################################################### | |||
... | @@ -450,7 +426,7 @@ public function fb_login_post(){ | ... | @@ -450,7 +426,7 @@ public function fb_login_post(){ |
} | } | ||
############################################################################## | ################################################################################################### | ||
public function get_users_car_list_post(){ | public function get_users_car_list_post(){ | ||
... | @@ -507,17 +483,8 @@ public function fb_login_post(){ | ... | @@ -507,17 +483,8 @@ public function fb_login_post(){ |
public function add_users_car_post(){ | public function add_users_car_post(){ | ||
$postdata = file_get_contents("php://input"); | $postdata = file_get_contents("php://input"); | ||
$request = json_decode($postdata,true); | $request = json_decode($postdata,true); | ||
if($request) { | if($request) { | ||
... | @@ -534,7 +501,6 @@ public function fb_login_post(){ | ... | @@ -534,7 +501,6 @@ public function fb_login_post(){ |
} else { | } else { | ||
print json_encode(array('status' => 'error','message'=>'Something Went wrong','data'=>'')); | print json_encode(array('status' => 'error','message'=>'Something Went wrong','data'=>'')); | ||
} | } | ||
} | } | ||
////****************14-08-2017************************//// | ////****************14-08-2017************************//// | ||
... | @@ -542,14 +508,8 @@ public function fb_login_post(){ | ... | @@ -542,14 +508,8 @@ public function fb_login_post(){ |
public function offer_ride_post(){ | public function offer_ride_post(){ | ||
$postdata = file_get_contents("php://input"); | $postdata = file_get_contents("php://input"); | ||
$request = json_decode($postdata,true); | $request = json_decode($postdata,true); | ||
/*$request = (array) json_decode(file_get_contents("php://input"));*/ | |||
//print_r($request);exit; | |||
if($request) { | if($request) { | ||
/////////////////////////duration and time calculation////////////////////////// | /////////////////////////duration and time calculation////////////////////////// | ||
$from = $request['source']; | $from = $request['source']; | ||
$remFrom = str_replace(',', '', $from); //Remove Commas | $remFrom = str_replace(',', '', $from); //Remove Commas | ||
... | @@ -608,13 +568,12 @@ public function fb_login_post(){ | ... | @@ -608,13 +568,12 @@ public function fb_login_post(){ |
}else{ | }else{ | ||
$response=array('status' => 'carerror','message'=>'No car Found!!! Please Add car','data'=>''); | $response=array('status' => 'carerror','message'=>'No car Found!!! Please Add car','data'=>''); | ||
}} | } | ||
} | |||
}else { | }else { | ||
$response=array('status' => 'error','message'=>'Error Occured','data'=>''); | $response=array('status' => 'error','message'=>'Error Occured','data'=>''); | ||
} | } | ||
// $response) | |||
print json_encode($response); | print json_encode($response); | ||
} | } | ||
... | @@ -627,8 +586,6 @@ public function fb_login_post(){ | ... | @@ -627,8 +586,6 @@ public function fb_login_post(){ |
$ride_list = $request['insert_id']; | $ride_list = $request['insert_id']; | ||
$i = 0; | $i = 0; | ||
foreach($ride_list as $ride_id){ | foreach($ride_list as $ride_id){ | ||
++$i; | ++$i; | ||
$request['ride_id'] = $ride_id; | $request['ride_id'] = $ride_id; | ||
... | @@ -650,7 +607,6 @@ public function fb_login_post(){ | ... | @@ -650,7 +607,6 @@ public function fb_login_post(){ |
$result = $this->Webservice_model->offer_update($request); | $result = $this->Webservice_model->offer_update($request); | ||
if($result){ | if($result){ | ||
$check_notification=$this->Webservice_model->check_notification_updates($result->users_id); | $check_notification=$this->Webservice_model->check_notification_updates($result->users_id); | ||
// var_dump() | |||
if($check_notification){ | if($check_notification){ | ||
$subject="Offerride"; | $subject="Offerride"; | ||
$user_id =$result->users_id; | $user_id =$result->users_id; | ||
... | @@ -658,10 +614,8 @@ public function fb_login_post(){ | ... | @@ -658,10 +614,8 @@ public function fb_login_post(){ |
$this->email_send($result,$subject,$user_id, $page); | $this->email_send($result,$subject,$user_id, $page); | ||
} | } | ||
$result_ride = $this->Webservice_model->result_ride($result); | $result_ride = $this->Webservice_model->result_ride($result); | ||
// var_dump($result_ride); | |||
if($result_ride){ | if($result_ride){ | ||
$res = $this->send_alert($result_ride); | $res = $this->send_alert($result_ride); | ||
// var_dump($res); | |||
$response=array('status' => 'success','message'=>'Ride Offered successfully','data'=>''); | $response=array('status' => 'success','message'=>'Ride Offered successfully','data'=>''); | ||
} else { | } else { | ||
$response=array('status' => 'error','message'=>'Something Went Wrong','data'=>''); | $response=array('status' => 'error','message'=>'Something Went Wrong','data'=>''); | ||
... | @@ -672,11 +626,6 @@ public function fb_login_post(){ | ... | @@ -672,11 +626,6 @@ public function fb_login_post(){ |
} | } | ||
} | } | ||
print json_encode($response); | print json_encode($response); | ||
... | @@ -718,11 +667,6 @@ public function fb_login_post(){ | ... | @@ -718,11 +667,6 @@ public function fb_login_post(){ |
} | } | ||
public function send_alert($result){ | public function send_alert($result){ | ||
// $result); | |||
/* $result); | |||
die(); | |||
$new=array(); | |||
if($result){*/ | |||
foreach($result as $key => $value){ | foreach($result as $key => $value){ | ||
$id = $key; | $id = $key; | ||
... | @@ -740,35 +684,10 @@ public function fb_login_post(){ | ... | @@ -740,35 +684,10 @@ public function fb_login_post(){ |
//die; | //die; | ||
$include_player_ids = array($rs->player_id); | $include_player_ids = array($rs->player_id); | ||
$res= $this->send_Message($content,$headings,$include_player_ids,$result,$type,$id); | $res= $this->send_Message($content,$headings,$include_player_ids,$result,$type,$id); | ||
$return = $res; | $return = $res; | ||
// $return = json_encode($return); | |||
// print($return); | |||
} | } | ||
} | } | ||
// print("\n\nJSON received:\n"); | |||
// print("\n"); | |||
/*}else{ | |||
$response=array('status' => 'error','message'=>'Something Went Wrong','data'=>''); | |||
print json_encode($response); | |||
}*/ | |||
} | } | ||
public function list_offer_ride_post(){ | public function list_offer_ride_post(){ | ||
... | @@ -1817,6 +1736,26 @@ public function goverment_upload_post(){ | ... | @@ -1817,6 +1736,26 @@ public function goverment_upload_post(){ |
} | } | ||
public function deletebooking_post(){ | |||
$postdata = file_get_contents("php://input"); | |||
$request = json_decode($postdata); | |||
if($request){ | |||
$result=$this->Webservice_model->deletebooking($request); | |||
if($result){ | |||
$response=array('status' => 'success','data'=>$result); | |||
}else{ | |||
$response=array('status' => 'error'); | |||
} | |||
}else{ | |||
$response=array('status' => 'error','message'=>'Something Went wrong'); | |||
} | |||
print json_encode($response); | |||
} | |||
################################################################################################# | ################################################################################################# | ||
public function email_send($data,$subject,$user_id,$page) { | public function email_send($data,$subject,$user_id,$page) { | ||
... | @@ -2121,13 +2060,6 @@ public function goverment_upload_post(){ | ... | @@ -2121,13 +2060,6 @@ public function goverment_upload_post(){ |
// } | // } | ||
public function update_carphoto_post(){ | public function update_carphoto_post(){ | ||
// print json_encode(array('status' => 'error','data'=>$_FILES)); | // print json_encode(array('status' => 'error','data'=>$_FILES)); | ||
... | @@ -2989,6 +2921,35 @@ public function end_ride_update_post(){ | ... | @@ -2989,6 +2921,35 @@ public function end_ride_update_post(){ |
/********send mail ***************/ | /********send mail ***************/ | ||
public function mailsendfun(){ | |||
$this->load->library('email'); | |||
$config = Array( | |||
'protocol' => 'smtp', | |||
'smtp_host' => 'smtp.sendgrid.net', | |||
'smtp_port' => 25, | |||
'smtp_user' => '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', // change it to yours | |||
'smtp_pass' => 'Golden_123', // change it to yours | |||
'smtp_timeout'=>20, | |||
'mailtype' => 'html', | |||
'charset' => 'utf-8', | |||
'wordwrap' => TRUE | |||
); | |||
$this->email->initialize($config);// add this line | |||
$subject = 'New Mail'; | |||
//$name= $data->name; | |||
//$mailTemplate=$data->message; | |||
//$this->email->set_newline("\r\n"); | |||
$this->email->from('[email protected]'); | |||
$this->email->to('[email protected]'); | |||
$this->email->subject("Verify Your Email"); | |||
$this->email->message("Success"); | |||
$this->email->send(); | |||
// echo $this->email->print_debugger(); | |||
return "EmailSend"; | |||
} | |||
... | ... |
Please
register
or
sign in
to comment