|
|
|
@ -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'].'<br>';
|
|
|
|
|
$mailnody .= '手机号码:'.$data['phone'].'<br>';
|
|
|
|
|
$mailnody .= '电子邮箱:'.$data['email'].'<br>';
|
|
|
|
|
$mailnody .= '姓名:'.$data['name'].'<br>';
|
|
|
|
|
if($data['sex'] == 0){
|
|
|
|
|
$data['sex'] = '女';
|
|
|
|
|
}else{
|
|
|
|
|
$data['sex'] = '男';
|
|
|
|
|
}
|
|
|
|
|
$mailnody .= '性别:'.$data['sex'].'<br>';
|
|
|
|
|
$mailnody .= '毕业院校:'.$data['school'].'<br>';
|
|
|
|
|
$mailnody .= '最高学历:'.$data['education'].'<br>';
|
|
|
|
|
$mailnody .= '当前公司:'.$data['currentcompany'].'<br>';
|
|
|
|
|
$mailnody .= '任职时间开始:'.$data['from_time'].'<br>';
|
|
|
|
|
$mailnody .= '任职时间结束:'.$data['to_time'].'<br>';
|
|
|
|
|
|
|
|
|
|
$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');
|
|
|
|
|