From e27d19b37ec4b3b084fa0e43b743c6135d404b21 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Fri, 30 Sep 2011 07:15:08 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=85=83=E6=95=B0=E6=8D=AE=E8=AF=84=E5=AE=A1=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 31 +++++++++++++------ .../admin/views/scripts/review/accept.phtml | 4 +-- .../admin/views/scripts/review/myreview.phtml | 3 +- 3 files changed, 26 insertions(+), 12 deletions(-) diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index 10b9614e..ec959476 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -20,13 +20,29 @@ class Admin_ReviewController extends Zend_Controller_Action function acceptAction() { $search = $this->_request->getParam('search'); + $cancel = $this->_request->getParam('cancel'); + if($cancel>0) + { + $sql = "update mdstatus set status='-1' where id='$cancel'"; + try{ + if($this->db->exec($sql)>0) + { + $this->messenger->addMessage('操作成功:已取消该数据的评审'); + $this->_redirect("/admin/review/accept"); + } + } + catch(Exception $e){ + $this->messenger->addMessage('操作失败:'.$e->getMessage()); + $this->_redirect("/admin/review/accept"); + } + } if($search) { $keyword = $this->_request->getParam('keyword'); if(!empty($keyword)) { - $sql = "select md.title,u.username,u.realname from mdstatus m + $sql = "select m.id,md.title,u.username,u.realname from mdstatus m left join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid where m.status=1 @@ -42,10 +58,10 @@ class Admin_ReviewController extends Zend_Controller_Action Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); $this->view->paginator=$paginator; } - } + }//搜索 else { - $sql = "select md.title,u.username,u.realname from mdstatus m + $sql = "select m.id,md.title,u.username,u.realname from mdstatus m left join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid where m.status=1"; @@ -123,7 +139,7 @@ class Admin_ReviewController extends Zend_Controller_Action $this->view->keyword = $keyword; } - $sql = "select md.title,u.username,u.realname,m.status from mdstatus m + $sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m left join metadata md on md.uuid=m.uuid left join users u on u.id=m.userid where u.id='$userid' $searchjoin"; @@ -136,11 +152,8 @@ class Admin_ReviewController extends Zend_Controller_Action $paginator->setItemCountPerPage($this->view->config->page->max); $paginator->setView($this->view); Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); - $this->view->paginator=$paginator; - - - - } + $this->view->paginator=$paginator; + }//我管理的元数据 function expertsAction() { diff --git a/application/admin/views/scripts/review/accept.phtml b/application/admin/views/scripts/review/accept.phtml index b8a51807..34711f77 100644 --- a/application/admin/views/scripts/review/accept.phtml +++ b/application/admin/views/scripts/review/accept.phtml @@ -24,7 +24,7 @@
- +