diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index 6d1f31d2..5b388c0d 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -20,6 +20,9 @@ class ReviewController extends Zend_Controller_Action //最新10个已审 $sql="select m.uuid,m.title,s.ts_accepted from mdstatus s left join metadata m on m.uuid=s.uuid where s.status=5 order by s.ts_created desc limit 10"; $this->view->mdreviewed = $this->db->fetchAll($sql); + //统计数字 + $sql="select (select count(*) from mdexperts) as experts,(select count(*) from mdstatus where status=0) as draft,(select count(*) from mdstatus where status=1) as accept,(select count(*) from mdstatus where status in (2,3,4)) as inreview,(select count(*) from mdstatus where status=5) as reviewed,(select count(*) from mdreview) as openreview,(select count(distinct(userid)) from mdreview) as openreviewuser"; + $this->view->stat=$this->db->fetchRow($sql); } /* * 数据浏览 diff --git a/application/default/views/scripts/review/index.phtml b/application/default/views/scripts/review/index.phtml index 6d21d2a8..4d0ba98e 100755 --- a/application/default/views/scripts/review/index.phtml +++ b/application/default/views/scripts/review/index.phtml @@ -9,6 +9,7 @@ $this->breadcrumb('元数据评审'); $this->breadcrumb()->setSeparator(' > '); ?>