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() {