diff --git a/application/default/controllers/WaterController.php b/application/default/controllers/WaterController.php index 0cc90617..4b064b1a 100644 --- a/application/default/controllers/WaterController.php +++ b/application/default/controllers/WaterController.php @@ -7,6 +7,15 @@ class WaterController extends DataController } function documentAction() { + $page=(int)$this->_request->getParam('page'); + if (empty($page)) $page=1; + $offset=$this->limit*($page-1); + $row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d'))"); + $sum=$row[0]['count']; + $sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d')) order by reference limit ? offset ?"; + $this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset)); + $this->view->page=new Pagination($sum,$page,$this->limit,"文献"); + $this->view->offset=$offset+1; } function coldAction() { diff --git a/application/default/views/scripts/water/document.phtml b/application/default/views/scripts/water/document.phtml index aec0a2c4..5b98cac5 100644 --- a/application/default/views/scripts/water/document.phtml +++ b/application/default/views/scripts/water/document.phtml @@ -35,6 +35,21 @@ doi:10.1029/2008JD011590. 下载 黑河流域上游寒区水文遥感-地面同步观测试验介绍。冰川冻土,2009, 31(2): 189-197. 下载