From 9883620c8e73f3eb0e24224a35c562f2109116ba Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 13 Oct 2011 09:30:53 +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=E5=85=83=E6=95=B0=E6=8D=AE=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 --- .../default/controllers/ReviewController.php | 73 ++++++++++++++++++- .../default/views/scripts/review/draft.phtml | 2 +- .../views/scripts/review/inreview.phtml | 61 ++++++++++++++++ 3 files changed, 133 insertions(+), 3 deletions(-) create mode 100644 application/default/views/scripts/review/inreview.phtml diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index c26f4530..9c95ec0c 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -64,7 +64,7 @@ class ReviewController extends Zend_Controller_Action } $wheresql = array(); - $wheresql[]=" mdexp.id=7381 "; + $wheresql[]=" mdexp.id='$uid' "; if(!empty($keyword) && !empty($search)) { @@ -115,7 +115,7 @@ class ReviewController extends Zend_Controller_Action if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$keyword) || !is_numeric($search)) { $this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号'); - $this->_redirect('/review/myreview'); + $this->_redirect('/review/draft'); }//非法请求过滤 $this->view->keyword = $keyword; $wheresql[] = " md.title like '%$keyword%' "; @@ -143,6 +143,75 @@ class ReviewController extends Zend_Controller_Action } }//最新收稿 + + function inreviewAction(){ + + $keyword = $this->_request->getParam('q'); + $search = $this->_request->getParam('search'); + + try{ + + $wheresql = array(); + $wheresql[]=" ms.status in (2,3,4) "; + + if(!empty($keyword) && !empty($search)) + { + if (preg_match("/[<|>|#|$|%|^|*|(|)|{|}|'|\"|;|:]/i",$keyword) || !is_numeric($search)) + { + $this->messenger->addMessage('您的输入的搜索条件包含非法请求,请不要输入特殊符号'); + $this->_redirect('/review/inreview'); + }//非法请求过滤 + $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(); + + 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; + + }catch(Exception $e){ + $this->messenger->addMessage('查询失败,请稍后重试 :('); + $this->_redirect('/review/inreview'); + } + + }//在审阶段的元数据 + + + function rewiterstatus($status){ + if($status==-1) + {return "取消评审";} + else if($status==0) + {return "初始状态";} + else if($status==1) + {return "接受元数据评审";} + else if($status==2) + {return "专家评审中";} + else if($status==3) + {return "专家评审中";} + else if($status==4) + {return "专家反馈";} + else if($status==5) + {return "已发布";} + else + {return "";} + }//function rewriterstatus } diff --git a/application/default/views/scripts/review/draft.phtml b/application/default/views/scripts/review/draft.phtml index 8a1806fb..672e4988 100644 --- a/application/default/views/scripts/review/draft.phtml +++ b/application/default/views/scripts/review/draft.phtml @@ -25,7 +25,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);

最新收稿的元数据:

-
+
diff --git a/application/default/views/scripts/review/inreview.phtml b/application/default/views/scripts/review/inreview.phtml new file mode 100644 index 00000000..19702308 --- /dev/null +++ b/application/default/views/scripts/review/inreview.phtml @@ -0,0 +1,61 @@ +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