修改部分类别导航的关键词和限制

This commit is contained in:
wlx 2010-07-04 03:49:11 +00:00
parent f7bdd0f20b
commit 674cc8557a
1 changed files with 34 additions and 5 deletions

View File

@ -123,11 +123,30 @@ class WaterController extends DataController
} }
function radiometerAction() 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() 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() function widasAction()
{ {
@ -135,17 +154,27 @@ class WaterController extends DataController
$page=(int)$this->_request->getParam('page'); $page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1; if (empty($page)) $page=1;
$offset=$this->limit*($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(); $row=$state->fetchAll();
$sum=$row[0]['count']; $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->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit); $this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1; $this->view->offset=$offset+1;
} }
function asdAction() 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() function satelliteAction()
{ {