diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index af6a8f20..82fb240b 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -296,16 +296,16 @@ class Admin_ReviewController extends Zend_Controller_Action { $user = $auth->getIdentity(); $userid = $user->id; - $sql = "insert into mdstatus (uuid,userid,ts_scheduled,status) values ('$uuid','$userid','".date("Y-m-d H:i:s")."','1')"; + $sql = "insert into mdstatus (uuid,userid,ts_scheduled,status) values ('$uuid','$userid','".date("Y-m-d H:i:s")."','0')"; try{ if($this->db->exec($sql)>0) { $this->messenger->addMessage('操作成功!该数据已放入评审'); - $this->_redirect("/admin/review"); + $this->_redirect("/admin/review/draft"); } }catch( Exception $e){ $this->messenger->addMessage('操作失败:'.$e->getMessage()); - $this->_redirect("/admin/review"); + $this->_redirect("/admin/review/draft"); } } @@ -353,6 +353,66 @@ class Admin_ReviewController extends Zend_Controller_Action $this->view->paginator=$paginator; }//我管理的元数据 + function draftAction(){ + + $search=$this->_request->getParam('search'); + $keyword = $this->_request->getParam('keyword'); + $update = $this->_request->getParam('update'); + + if($update>0 || is_array($update)) + { + $ids = ''; + if(is_array($update))$ids = join(',',$update); + else $ids=$update; + + $sql = "update mdstatus set status=1 where id in ($ids)"; + + try{ + + if($this->db->exec($sql)>0) + { + $this->messenger->addMessage('操作成功!'); + $this->_redirect("/admin/review/draft"); + } + + }catch(Exception $e){ + + $this->messenger->addMessage('操作失败:'.$e->getMessage()); + $this->_redirect("/admin/review/draft"); + + } + + }//开始评审 + + $searchjoin = ""; + if(!empty($search) && !empty($keyword)) + { + $searchjoin = " and md.title like '%$keyword%'"; + $this->view->keyword = $keyword; + } + + $sql = "select m.id,md.title,md.uuid,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 status=0 $searchjoin"; + + $re = $this->db->query($sql); + $rows = $re->fetchAll(); + + foreach ($rows as $k=>$v) + { + $rows[$k]['status']=$this->rewiterstatus($v['status']); + } + + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage($this->view->config->page->max); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + + }// draftAction 投稿元数据 + function expertsAction() { @@ -532,6 +592,5 @@ class Admin_ReviewController extends Zend_Controller_Action }//expertsAction 专家库 - } diff --git a/application/admin/views/scripts/review/draft.phtml b/application/admin/views/scripts/review/draft.phtml new file mode 100644 index 00000000..44eb77cc --- /dev/null +++ b/application/admin/views/scripts/review/draft.phtml @@ -0,0 +1,66 @@ +headTitle($this->config->title->site); + $this->headTitle('后台管理'); + $this->headTitle()->setSeparator(' - '); + $this->headLink()->appendStylesheet('/css/admin.css'); + $this->breadcrumb('首页'); + $this->breadcrumb('后台首页'); + $this->breadcrumb('元数据评审'); + $this->breadcrumb()->setSeparator(' > '); +?> +
msg; ?>
+messages): foreach($this->messages as $msg): ?> + + +