From 13be09d1dcd08ec62affcbf991451cd0925c615c Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 28 Oct 2011 02:01:47 +0000 Subject: [PATCH] =?UTF-8?q?#206=20=E5=9C=A8=E6=88=91=E8=B4=9F=E8=B4=A3?= =?UTF-8?q?=E7=9A=84=E5=85=83=E6=95=B0=E6=8D=AE(myreview)=E4=B8=AD?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=88=A0=E9=99=A4=E8=AF=84=E5=AE=A1?= =?UTF-8?q?=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 45 +++++++++++++++++++ .../admin/views/scripts/review/myreview.phtml | 11 ++--- 2 files changed, 51 insertions(+), 5 deletions(-) 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 @@ ?> 邀请专家 - 更改管理员 - 查看详细 - 查看评审意见 - ' onclick="return confirm('是否确定取消评审')">取消评审 - 发布 + 更改管理员 + 查看详细 + 查看评审意见 + ' onclick="return confirm('是否确定取消评审')">取消评审 + 发布 + 删除