#206 在我负责的元数据(myreview)中增加了删除评审的功能

This commit is contained in:
Li Jianxuan 2011-10-28 02:01:47 +00:00
parent 00de4a3567
commit 13be09d1dc
2 changed files with 51 additions and 5 deletions

View File

@ -678,6 +678,51 @@ class Admin_ReviewController extends Zend_Controller_Action
}//已结束评审
function deleteAction(){
$id=$this->_request->getParam('id');
try{
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$userid = $user->id;
$sql = "select id from mdstatus where userid='$userid' and id='$id'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
if(!empty($row['id']))
{
$sql = "delete from mdstatus where id='$id'";
if($this->db->exec($sql))
{
$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");
}
}catch(Exception $e){
$this->messenger->addMessage('删除失败:'.$e->getMessage());
$this->_redirect("/admin/review/myreview");
}
}
function expertsAction()
{

View File

@ -52,11 +52,12 @@
?></td>
<td>
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
<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>
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
<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>
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
</td>
</tr>
<?php endforeach; ?>