2015-10-06
This commit is contained in:
martinzhou2015
2015-10-06 20:25:13 +08:00
parent af9192435c
commit 7b3e979fd4
52 changed files with 1484 additions and 80 deletions

View File

@@ -124,4 +124,31 @@ class PostController extends BaseController
$this->error("添加积分失败");
}
}
}
/**
* 分发漏洞报告
* @param [type] $id [description]
* @return [type] [description]
*/
public function send()
{
import('ORG.Net.Mail');
$id = I('get.id',0,'intval');
$email = I('post.email');
$title = I('post.title');
$tips = I('post.tips');
if (!IS_POST) {
$model = M('post')->where('id='.$id)->find();
$this->assign('post',$model);
$this->display();
}
if (IS_POST) {
$result = SendMail($email,$title,$tips,'应急响应中心');
if($result){
$this->success("发送成功", U('post/index'));
}else{
$this->error("发送失败");
}
}
}
}