diff --git a/application/default/controllers/AuthorController.php b/application/default/controllers/AuthorController.php index a960c3a5..7f311cba 100644 --- a/application/default/controllers/AuthorController.php +++ b/application/default/controllers/AuthorController.php @@ -142,7 +142,20 @@ class AuthorController extends Zend_Controller_Action $sql = "UPDATE dataorder SET authorpermitted=1 WHERE uuid=? and id=?"; $sth = $this->db->prepare($sql); 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); echo ''.$btn.''; exit();