|
|
|
@ -225,6 +225,41 @@ class api extends CI_Controller{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function send_options_mail_to_wl(){
|
|
|
|
|
header('Access-Control-Allow-Origin:*');
|
|
|
|
|
header('Access-Control-Allow-Methods:POST, GET');
|
|
|
|
|
header('Access-Control-Max-Age:0');
|
|
|
|
|
header('Access-Control-Allow-Headers:x-requested-with, Content-Type');
|
|
|
|
|
header('Access-Control-Allow-Credentials:true');
|
|
|
|
|
$fromName = "cyc";
|
|
|
|
|
$fromEmail = "cyc@hainatravel.com";
|
|
|
|
|
|
|
|
|
|
$order = $this->input->get_post('order');
|
|
|
|
|
$person = $this->input->get_post('person');
|
|
|
|
|
$type = $this->input->get_post('type');
|
|
|
|
|
$request = $this->input->get_post('request');
|
|
|
|
|
$body = '';
|
|
|
|
|
|
|
|
|
|
$coli_id = $this->BIZ_train_model->cold_sn_get_coli_id($order);
|
|
|
|
|
$trainInfos = $this->BIZ_train_model->biz_order_detail($order);
|
|
|
|
|
$passager = $this->BIZ_train_model->in_bpesn_people_info($person);
|
|
|
|
|
|
|
|
|
|
$body .= '订单号:'.$coli_id['0']->COLI_ID.'<br>';
|
|
|
|
|
$body .= '车程:'.$trainInfos->DepartAirport_cn.'->'.$trainInfos->ArrivalAirport_cn.','.$trainInfos->FlightsNo.','.date('Y-m-d',strtotime($trainInfos->DepartureDate)).'<br>';
|
|
|
|
|
$body .= '乘客:'.$passager['0']->BPE_FirstName.$passager['0']->BPE_MiddleName.$passager['0']->BPE_LastName.','.$passager['0']->BPE_Passport.'<br>';
|
|
|
|
|
$body .= '操作:'.$type.'<br>';
|
|
|
|
|
$body .= '详细信息:'.$request.'<br>';
|
|
|
|
|
|
|
|
|
|
$toName = 'Sharon';
|
|
|
|
|
$toEmail = 'Sharon@hainatravel.com';
|
|
|
|
|
$subject = '用户中心操作';
|
|
|
|
|
|
|
|
|
|
$obj = $this->Sendmail_model->SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body);
|
|
|
|
|
if($obj){
|
|
|
|
|
exit('{"status":"200","reason":"邮件发送成功"}');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//导出账单api
|
|
|
|
|
public function export_excel(){
|
|
|
|
|
set_time_limit(0);
|
|
|
|
|