diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php
index 40532b08..d27fae95 100644
--- a/application/admin/controllers/ReviewController.php
+++ b/application/admin/controllers/ReviewController.php
@@ -10,7 +10,7 @@ class Admin_ReviewController extends Zend_Controller_Action
}
function postDispatch()
{
- $this->view->messages = $this->messenger->getMessages();
+ //$this->view->messages = $this->messenger->getMessages();
}
function indexAction()
{
@@ -211,7 +211,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$v['status']="未答复";
}
$expname[] = '
'.$v['realname'].' [状态:'.$v['status'].']
- [再次发送邀请邮件]';
+ [再次发送邀请邮件]';
}
}
if(count($expname>0))
@@ -259,7 +259,8 @@ class Admin_ReviewController extends Zend_Controller_Action
function inviteAction(){//邀请
- $id = $this->_request->getParam('id');
+ $id = $this->_request->getParam('id');
+ $user = $this->_request->getParam('user');
if(empty($id))
{
$this->_redirect("/admin/review");
@@ -302,7 +303,6 @@ class Admin_ReviewController extends Zend_Controller_Action
{
$sql = "insert into mdexpertreview (id,uuid) values ('$v','$uuid')";
-
$expinfo="select realname,email from users where id='$v'";
$rs = $this->db->query($expinfo);
$expinfo = $rs->fetch();
@@ -344,6 +344,28 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->messenger->addMessage('请选择要邀请的专家');
$this->_redirect("/admin/review/invite/?id=$id");
}
+ } elseif ($user>0) {
+ $uuid=$this->_request->getParam('uuid');
+ $sql="update mdexpertreview set ts_modified=now() where id='$user' and uuid='$uuid'";
+ $this->db->exec($sql);
+ $sql="select realname,email,(select title from metadata where uuid='$uuid') as title from users where id='$user'";
+ $row=$this->db->fetchRow($sql);
+ //实例化EmailText
+ $mailtp=new EmailText($this->db,'invite-expert-review',array('user'=>$row['realname'],'uuid'=>$uuid,'title'=>$row['title']));
+ $mail=new WestdcMailer($this->view->config->smtp);
+ $mail->setBodyText($mailtp->getBody());
+ $mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
+ $mail->addTo($row['email']);
+ $mail->setSubject($mailtp->getSubject());
+ $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/data/doc/review/1/uuid/'.$uuid);
+ $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc');
+ if($mail->send())
+ {
+ $this->messenger->addMessage('成功再次邀请专家:'.$row['realname']);
+ }else
+ {
+ $this->messenger->addMessage('邀请专家'.$row['realname'].'的邮件发送失败,请尝试手动发送邀请邮件');
+ }
}
$searchjoin = "";
if(!empty($search) && !empty($keyword))