From 3eba55b7a8dde183c69b9e046fab2157a98e23d7 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Mon, 17 Oct 2011 09:23:30 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86review=E7=9A=84?= =?UTF-8?q?=E8=A7=86=E5=9B=BE=20=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=94=B6?= =?UTF-8?q?=E7=A8=BF=E5=85=83=E6=95=B0=E6=8D=AE=E7=9A=84=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/ReviewController.php | 44 ++++++++++++++ .../views/scripts/pagination_param.phtml | 50 ++++++++-------- .../default/views/scripts/review/accept.phtml | 57 +++++++++++++++++++ .../default/views/scripts/review/draft.phtml | 6 +- .../views/scripts/review/myreview.phtml | 4 +- 5 files changed, 131 insertions(+), 30 deletions(-) create mode 100644 application/default/views/scripts/review/accept.phtml diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index ff42c5ef..6a098113 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -105,6 +105,50 @@ class ReviewController extends Zend_Controller_Action $keyword = $this->_request->getParam('q'); $search = $this->_request->getParam('search'); + try{ + + $wheresql = array(); + $wheresql[]=" ms.status=0 "; + + if(!empty($keyword) && !empty($search)) + { + if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$keyword) || !is_numeric($search)) + { + $this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号'); + $this->_redirect('/review/draft'); + }//非法请求过滤 + $this->view->keyword = $keyword; + $wheresql[] = " md.title like '%$keyword%' "; + } + + $wheresql = join(' and ',$wheresql); + + $sql = "select ms.uuid,ms.status,ms.ts_created,md.title,md.author from mdstatus ms + left join metadata md on md.uuid=ms.uuid + where $wheresql"; + + $rs = $this->db->query($sql); + $rows = $rs->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; + + }catch(Exception $e){ + $this->messenger->addMessage('查询失败,请稍后重试 :('); + $this->_redirect('/review/draft'); + } + + }//最新收稿 + + function acceptAction(){ + + $keyword = $this->_request->getParam('q'); + $search = $this->_request->getParam('search'); + try{ $wheresql = array(); diff --git a/application/default/views/scripts/pagination_param.phtml b/application/default/views/scripts/pagination_param.phtml index bc11a2c9..26489fd4 100644 --- a/application/default/views/scripts/pagination_param.phtml +++ b/application/default/views/scripts/pagination_param.phtml @@ -1,26 +1,26 @@ -pageCount): ?> -
- -previous)): ?> - ">< Previous - - < Previous - - - -pagesInRange as $page): ?> - current): ?> - "> - - - - - - -next)): ?> - ">Next > - - Next > - -
+pageCount): ?> +
+ +previous)): ?> + ">< Previous + + < Previous + + + +pagesInRange as $page): ?> + current): ?> + "> + + + + + + +next)): ?> + ">Next > + + Next > + +
\ No newline at end of file diff --git a/application/default/views/scripts/review/accept.phtml b/application/default/views/scripts/review/accept.phtml new file mode 100644 index 00000000..4793fa76 --- /dev/null +++ b/application/default/views/scripts/review/accept.phtml @@ -0,0 +1,57 @@ +headTitle($config->title->site); +$this->headTitle($config->title->mdreview); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/mdreview.css'); +$this->breadcrumb('首页'); +$this->breadcrumb('元数据评审'); +$this->breadcrumb()->setSeparator(' > '); +?> +
+ +msg or $this->messages) :?> +
+msg) : ?> + msg; ?> +messages): foreach($this->messages as $msg): ?> + + + +
+ + +

最新收稿的元数据:

+ +
+ + +
+ + + + + + + + + + paginator)): + $autoindex=0; + foreach ($this->paginator as $item): + $autoindex++;?> + + + + + + +
元数据标题操作
+ 评审 查看 +
+ + +
\ No newline at end of file diff --git a/application/default/views/scripts/review/draft.phtml b/application/default/views/scripts/review/draft.phtml index 672e4988..b0205129 100644 --- a/application/default/views/scripts/review/draft.phtml +++ b/application/default/views/scripts/review/draft.phtml @@ -26,11 +26,11 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);

最新收稿的元数据:

- + -
+ - +
diff --git a/application/default/views/scripts/review/myreview.phtml b/application/default/views/scripts/review/myreview.phtml index d4c00d37..239c2a6a 100644 --- a/application/default/views/scripts/review/myreview.phtml +++ b/application/default/views/scripts/review/myreview.phtml @@ -26,11 +26,11 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);

我参审的元数据:

- + -
元数据标题
+
元数据标题