增加了发布评审通过的元数据的功能

This commit is contained in:
Li Jianxuan 2011-10-21 02:13:27 +00:00
parent dab2ffc87b
commit 137f717777
2 changed files with 44 additions and 1 deletions

View File

@ -358,7 +358,7 @@ class Admin_ReviewController extends Zend_Controller_Action
$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');
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, base64_encode($row['title'].'.doc'));
if($mail->send())
{
$this->messenger->addMessage('成功再次邀请专家:'.$row['realname']);
@ -509,6 +509,48 @@ class Admin_ReviewController extends Zend_Controller_Action
$this->view->paginator=$paginator;
}//我管理的元数据
function postAction(){
$id = $this->_request->getParam('id');
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$userid = $user->id;
$sql = "select id from mdstatus where userid='$userid'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
if(!empty($row['id']))
{
if($this->changestatus($id,5))
{
$this->messenger->addMessage('操作成功:该元数据意见成功发布');
$this->_redirect("/admin/review/myreview");
}else{
$this->messenger->addMessage('操作失败');
$this->_redirect("/admin/review/myreview");
}
}else{
$this->messenger->addMessage('您没有权限操作其他管理员管理的元数据评审');
$this->_redirect("/admin/review/myreview");
}
}else
{
$this->messenger->addMessage('权限读取失败');
$this->_redirect("/admin/review/myreview");
}
}
function draftAction(){
$search=$this->_request->getParam('search');

View File

@ -56,6 +56,7 @@
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
<a href="/admin/review/post/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
</td>
</tr>
<?php endforeach; ?>