From 09440f0a13575f835032c59596f6f409739d9e0f Mon Sep 17 00:00:00 2001
From: wlx
Date: Fri, 2 Jul 2010 10:07:53 +0000
Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=89=80=E6=9C=89=E5=92=8C?=
=?UTF-8?q?=E8=AF=95=E9=AA=8C=E7=9B=B8=E5=85=B3=E7=9A=84=E6=96=87=E7=8C=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../default/controllers/WaterController.php | 9 +++++++++
.../views/scripts/water/document.phtml | 19 +++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)
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. 下载
-设计文档
-
+试验成果(数据相关)
+refs) : ?>
+page->getNavigation(); ?>
+
+
+ refs as $md) : ?>
+ - 下载';
+}
+ ?>
+
+
+
+
+
\ No newline at end of file