diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index d4433950..bda898e1 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -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() { diff --git a/application/admin/views/scripts/review/myreview.phtml b/application/admin/views/scripts/review/myreview.phtml index 317ea79e..e5e76fef 100644 --- a/application/admin/views/scripts/review/myreview.phtml +++ b/application/admin/views/scripts/review/myreview.phtml @@ -52,11 +52,12 @@ ?>