实现邀请专家的新模板及拒绝功能

This commit is contained in:
wlx 2011-11-23 10:25:06 +00:00
parent 814cee43bc
commit 53bb04bdcb
1 changed files with 6 additions and 4 deletions

View File

@ -351,14 +351,16 @@ class Admin_ReviewController extends Zend_Controller_Action
$sql="select realname,email,(select title from metadata where uuid='$uuid') as title from users where id='$user'"; $sql="select realname,email,(select title from metadata where uuid='$uuid') as title from users where id='$user'";
$row=$this->db->fetchRow($sql); $row=$this->db->fetchRow($sql);
//实例化EmailText //实例化EmailText
$mailtp=new EmailText($this->db,'invite-expert-review',array('user'=>$row['realname'],'uuid'=>$uuid,'title'=>$row['title'])); $mailtp=new EmailText($this->db,'invite-expert-review',array('user'=>$row['realname'],'uuid'=>$uuid,'title'=>$row['title'],'userid'=>$user));
$mail=new WestdcMailer($this->view->config->smtp); $mail=new WestdcMailer($this->view->config->smtp);
$mail->setBodyText($mailtp->getBody()); $mail->setBodyText($mailtp->getBody());
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); $mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
$mail->addTo($row['email']); $mail->addTo($row['email']);
$mail->setSubject($mailtp->getSubject()); $mail->setSubject($mailtp->getSubject());
$filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/data/doc/review/1/uuid/'.$uuid); $filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/doc/review/1/uuid/'.$uuid);
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc'); $mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.doc');
$filecontent=file_get_contents("http://" . $_SERVER['HTTP_HOST'].'/service/pdf/uuid/'.$uuid);
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf');
if($mail->send()) if($mail->send())
{ {
$this->messenger->addMessage('成功再次邀请专家:'.$row['realname']); $this->messenger->addMessage('成功再次邀请专家:'.$row['realname']);
@ -498,7 +500,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status from mdstatus m $sql = "select m.id,md.uuid,md.title,u.username,u.realname,m.status from mdstatus m
left join metadata md on md.uuid=m.uuid left join metadata md on md.uuid=m.uuid
left join users u on u.id=m.userid left join users u on u.id=m.userid
where u.id='$userid' $searchjoin"; where m.status in (0,1,2,3,4) and u.id='$userid' $searchjoin order by m.status desc";
$re = $this->db->query($sql); $re = $this->db->query($sql);
$rows = $re->fetchAll(); $rows = $re->fetchAll();