diff --git a/application/third_party/trainsystem/models/BIZ_train_model.php b/application/third_party/trainsystem/models/BIZ_train_model.php index dcc64977..01c2ef1b 100644 --- a/application/third_party/trainsystem/models/BIZ_train_model.php +++ b/application/third_party/trainsystem/models/BIZ_train_model.php @@ -312,7 +312,7 @@ class BIZ_train_model extends CI_Model { AND ts_status != '2' AND - bcli.COLI_WebCode = 'cht' + bcli.COLI_WebCode in ('cht','WebMob-biz','WeChat-biz') "; $query = $this->INFO->query($sql); return $query->result(); diff --git a/webht/third_party/dingmail/controllers/index.php b/webht/third_party/dingmail/controllers/index.php index 7ee50452..e64b2b6b 100644 --- a/webht/third_party/dingmail/controllers/index.php +++ b/webht/third_party/dingmail/controllers/index.php @@ -192,6 +192,54 @@ class Index extends CI_Controller { return; } + //ajax发送邮件 + public function ajax_sendmail(){ + 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'); + + $data = array(); + $data['position'] = $this->input->get_post('position'); + $data['phone'] = $this->input->get_post('phone'); + $data['email'] = $this->input->get_post('email'); + $data['name'] = $this->input->get_post('name'); + $data['sex'] = $this->input->get_post('sex'); + $data['school'] = $this->input->get_post('school'); + $data['education'] = $this->input->get_post('education'); + $data['currentcompany'] = $this->input->get_post('currentcompany'); + $data['from_time'] = $this->input->get_post('from_time'); + $data['to_time'] = $this->input->get_post('to_time'); + + $mailnody = ''; + $mailnody .= '应聘职位:'.$data['position'].'
'; + $mailnody .= '手机号码:'.$data['phone'].'
'; + $mailnody .= '电子邮箱:'.$data['email'].'
'; + $mailnody .= '姓名:'.$data['name'].'
'; + if($data['sex'] == 0){ + $data['sex'] = '女'; + }else{ + $data['sex'] = '男'; + } + $mailnody .= '性别:'.$data['sex'].'
'; + $mailnody .= '毕业院校:'.$data['school'].'
'; + $mailnody .= '最高学历:'.$data['education'].'
'; + $mailnody .= '当前公司:'.$data['currentcompany'].'
'; + $mailnody .= '任职时间开始:'.$data['from_time'].'
'; + $mailnody .= '任职时间结束:'.$data['to_time'].'
'; + + $tolist_array = array(); + $tolist_array['0'] = new stdClass(); + $tolist_array['0']->ddu_Email = 'cyc@hainatravel.com'; + + if($this->do_sendmail('cyc',$tolist_array,'','应聘简历',$mailnody)){ + echo '{"status":1}'; + }else{ + echo '{"status":0}'; + } + } + //执行邮件发送功能 public function do_sendmail($fromuser, $tolist_array, $cclist_array, $subject, $mailbody) { $this->load->library('Phpmailer_lib');