From cf732de1c1b7ef61ca24c782906b4c220810fd62 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Sun, 9 Oct 2011 03:49:20 +0000 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=9C=A8=E5=AE=A1=E7=8A=B6=E6=80=81=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=BA=86=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E4=B8=93=E5=AE=B6=E7=9A=84=E5=8A=A8=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/controllers/ReviewController.php | 115 +++++++++++++----- .../admin/views/scripts/review/inreview.phtml | 56 +++++++++ .../admin/views/scripts/review/invite.phtml | 4 +- 3 files changed, 142 insertions(+), 33 deletions(-) create mode 100644 application/admin/views/scripts/review/inreview.phtml diff --git a/application/admin/controllers/ReviewController.php b/application/admin/controllers/ReviewController.php index c567eff8..e9c41e67 100644 --- a/application/admin/controllers/ReviewController.php +++ b/application/admin/controllers/ReviewController.php @@ -167,11 +167,45 @@ class Admin_ReviewController extends Zend_Controller_Action function inreviewAction(){ - } + $show = $this->_request->getParam('show'); + $search = $this->_request->getParam('search'); + $keyword = $this->_request->getParam('keyword'); + + if($show>0) + { + + }//查看详细 + else + { + $sql = "select m.id,md.title,m.status from mdstatus m + left join metadata md on md.uuid=m.uuid + where m.status in (3,4)"; + $rs = $this->db->query($sql); + $rows = $rs->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; + }//列表 + + + }//在审元数据 function inviteAction(){ $id = $this->_request->getParam('id'); + if(empty($id)) + { + $this->_redirect("/admin/review"); + } $search = $this->_request->getParam('search'); $keyword = $this->_request->getParam('keyword'); $submit = $this->_request->getParam('submit'); @@ -186,40 +220,59 @@ class Admin_ReviewController extends Zend_Controller_Action { if(is_array($exps)) { - echo "s"; + $sql = "select m.uuid,m.title from metadata m + left join mdstatus s on s.uuid=m.uuid + where s.id='$id'"; + + $rs = $this -> db -> query($sql); + $md = $rs -> fetchAll(); + + $uuid = $md['uuid']; + + foreach ($exps as $v) + { + $sql = "select id from mdexpertreview where uuid='$uuid' and "; + $sql = "insert into mdexpertreview "; + } + } + else + { + $this->messenger->addMessage('请选择要邀请的专家'); + $this->_redirect("/admin/review/invite/?id=$id"); } } - $searchjoin = ""; - if(!empty($search) && !empty($keyword)) - { - $searchjoin = " where u.username like '%$keyword%' - or u.realname like '%$keyword%' - or u.unit like '%$keyword%' - or u.email like '%$keyword%'"; - $this->view->keyword = $keyword; - } - - $sql = "select u.id,u.username,u.realname,u.unit,u.phone,u.email from users u - right join mdexperts me on u.id=me.id - $searchjoin"; - $re = $this->db->query($sql); - $rows = $re->fetchAll(); - - $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; - $sql = "select m.title from metadata m - left join mdstatus s on s.uuid=m.uuid - where s.id='$id'"; - - $re = $this->db->query($sql); - $title = $re->fetch(); - $this->view->md=$title; + $searchjoin = ""; + if(!empty($search) && !empty($keyword)) + { + $searchjoin = " where u.username like '%$keyword%' + or u.realname like '%$keyword%' + or u.unit like '%$keyword%' + or u.email like '%$keyword%'"; + $this->view->keyword = $keyword; + } + + $sql = "select u.id,u.username,u.realname,u.unit,u.phone,u.email from users u + right join mdexperts me on u.id=me.id + $searchjoin"; + $re = $this->db->query($sql); + $rows = $re->fetchAll(); + + $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; + + $sql = "select m.title from metadata m + left join mdstatus s on s.uuid=m.uuid + where s.id='$id'"; + + $re = $this->db->query($sql); + $title = $re->fetch(); + $this->view->md=$title; } diff --git a/application/admin/views/scripts/review/inreview.phtml b/application/admin/views/scripts/review/inreview.phtml new file mode 100644 index 00000000..f283b55c --- /dev/null +++ b/application/admin/views/scripts/review/inreview.phtml @@ -0,0 +1,56 @@ +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(' > '); +?> +
+
+partial('review/left.phtml'); ?> +
+
+msg or $this->messages) :?> +
+msg) : ?> +

msg; ?>

+messages): foreach($this->messages as $msg): ?> +

+ +
+ +
+ + + + + + + + + + paginator)): ?> + + paginator as $item): ?> + + > + + + + + + + +
ID标题状态操作
查看详细
+
+ paginator; ?>
+ + + +
+ +
+
\ No newline at end of file diff --git a/application/admin/views/scripts/review/invite.phtml b/application/admin/views/scripts/review/invite.phtml index 3afc1c3a..f721a787 100644 --- a/application/admin/views/scripts/review/invite.phtml +++ b/application/admin/views/scripts/review/invite.phtml @@ -54,7 +54,7 @@ paginator as $item): ?> > - + @@ -65,7 +65,7 @@ - +
paginator; ?>