fix #417, send email to westdc when author permitted the application.
This commit is contained in:
parent
d759c34417
commit
0b26aa6aff
|
@ -143,6 +143,19 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
if($sth->execute(array($uuid,$oid)))
|
if($sth->execute(array($uuid,$oid)))
|
||||||
{
|
{
|
||||||
|
//发送相关邮件给数据中心服务人员
|
||||||
|
$sql="select m.title,a.username from dataorder o left join metadata m on o.uuid=m.uuid left join offlineapp a on o.offlineappid=a.id where o.id=?";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute(array($oid));
|
||||||
|
$row = $sth->fetch();
|
||||||
|
$mail = new WestdcMailer($this->view->config->smtp);
|
||||||
|
$mailtp=new EmailText($this->db,'offline-author-yes',array('user'=>$row['username'],'data'=>$row['title'],'email'=>$u_email));
|
||||||
|
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||||
|
$mail->setBodyText($mailtp->getBody());
|
||||||
|
$mail->setSubject($mailtp->getSubject());
|
||||||
|
$mail->addTo($this->view->config->service->email,'西部数据中心服务组');
|
||||||
|
$mail->send();
|
||||||
|
|
||||||
$btn = $this->createOfflineCtBtn($uuid,'c',$oid);
|
$btn = $this->createOfflineCtBtn($uuid,'c',$oid);
|
||||||
echo ''.$btn.'<script>alert("您已经同意用户的离线数据申请");</script>';
|
echo ''.$btn.'<script>alert("您已经同意用户的离线数据申请");</script>';
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue