From 674cc8557a4af490c1fada360aeb1125d1bb70c6 Mon Sep 17 00:00:00 2001 From: wlx Date: Sun, 4 Jul 2010 03:49:11 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=AB=E5=AF=BC=E8=88=AA=E7=9A=84=E5=85=B3=E9=94=AE=E8=AF=8D?= =?UTF-8?q?=E5=92=8C=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/WaterController.php | 39 ++++++++++++++++--- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/application/default/controllers/WaterController.php b/application/default/controllers/WaterController.php index 4b064b1a..a18c63db 100644 --- a/application/default/controllers/WaterController.php +++ b/application/default/controllers/WaterController.php @@ -123,11 +123,30 @@ class WaterController extends DataController } function radiometerAction() { - $this->getmd('微波辐射计','theme'); + $page=(int)$this->_request->getParam('page'); + if (empty($page)) $page=1; + $offset=$this->limit*($page-1); + $state=$this->db->query("select count(*) from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')"); + $row=$state->fetchAll(); + $sum=$row[0]['count']; + $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword ilike '%波段机载微波辐射计') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin limit ? offset ?"; + $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); + $this->view->page=new Pagination($sum,$page,$this->limit); + $this->view->offset=$offset+1; } function lidarAction() { - $this->getmd('激光雷达','theme'); + //$this->getmd('激光雷达','theme'); + $page=(int)$this->_request->getParam('page'); + if (empty($page)) $page=1; + $offset=$this->limit*($page-1); + $state=$this->db->query("select count(*) from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')"); + $row=$state->fetchAll(); + $sum=$row[0]['count']; + $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='激光雷达') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin limit ? offset ?"; + $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); + $this->view->page=new Pagination($sum,$page,$this->limit); + $this->view->offset=$offset+1; } function widasAction() { @@ -135,17 +154,27 @@ class WaterController extends DataController $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $state=$this->db->query("select count(*) from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')"); + $state=$this->db->query("select count(*) from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')"); $row=$state->fetchAll(); $sum=$row[0]['count']; - $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin limit ? offset ?"; + $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='红外广角双模式成像仪WiDAS') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin limit ? offset ?"; $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->page=new Pagination($sum,$page,$this->limit); $this->view->offset=$offset+1; } function asdAction() { - $this->getmd('成像光谱仪','theme'); + //$this->getmd('成像光谱仪OMIS-II','theme'); + $page=(int)$this->_request->getParam('page'); + if (empty($page)) $page=1; + $offset=$this->limit*($page-1); + $state=$this->db->query("select count(*) from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感')"); + $row=$state->fetchAll(); + $sum=$row[0]['count']; + $sql="select uuid,title from metadata where source='0595169a-279e-4b95-819f-129d0ba4280d' and id in (select id from keyword where keytype='theme' and keyword='成像光谱仪OMIS-II') and id in (select id from keyword where keytype='theme' and keyword='航空遥感') order by timebegin limit ? offset ?"; + $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); + $this->view->page=new Pagination($sum,$page,$this->limit); + $this->view->offset=$offset+1; } function satelliteAction() {