From 336e352d200cf74306ca6e0e63091f9b68be8b50 Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Tue, 16 Apr 2013 09:19:06 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9glacier=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E7=9A=84=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/GlacierController.php | 108 +++++----- .../default/controllers/HiwaterController.php | 32 ++- .../views/scripts/glacier/browse.phtml | 58 +++--- .../views/scripts/glacier/category.phtml | 86 ++++---- .../default/views/scripts/glacier/dem.phtml | 70 ++++--- .../default/views/scripts/glacier/field.phtml | 68 +++---- .../views/scripts/glacier/frozensoil.phtml | 68 +++---- .../views/scripts/glacier/geobase.phtml | 70 ++++--- .../views/scripts/glacier/glacier.phtml | 68 +++---- .../default/views/scripts/glacier/gps.phtml | 68 +++---- .../default/views/scripts/glacier/hydro.phtml | 68 +++---- .../default/views/scripts/glacier/index.phtml | 94 +++++---- .../views/scripts/glacier/inventory.phtml | 72 ++++--- .../default/views/scripts/glacier/lake.phtml | 70 ++++--- .../default/views/scripts/glacier/lidar.phtml | 72 ++++--- .../views/scripts/glacier/material.phtml | 72 ++++--- .../default/views/scripts/glacier/meteo.phtml | 68 +++---- .../views/scripts/glacier/movement.phtml | 68 +++---- .../default/views/scripts/glacier/navi.phtml | 183 +++++++++++------ .../scripts/glacier/photogrammetry.phtml | 68 +++---- .../views/scripts/glacier/physical.phtml | 68 +++---- .../views/scripts/glacier/quatemary.phtml | 68 +++---- .../default/views/scripts/glacier/rs.phtml | 68 +++---- .../default/views/scripts/glacier/tag.phtml | 107 +++++----- .../default/views/scripts/glacier/thumb.phtml | 80 ++++---- .../views/scripts/glacier/timeline.phtml | 44 ++-- .../views/scripts/glacier/timemap.phtml | 188 +++++++++--------- .../views/scripts/glacier/vegetation.phtml | 68 +++---- .../default/views/scripts/heihe/base.phtml | 4 +- .../default/views/scripts/heihe/thumb.phtml | 4 +- .../default/views/scripts/hiwater/index.phtml | 51 +++-- .../default/views/scripts/hiwater/navi.phtml | 130 ++++++++++++ 32 files changed, 1305 insertions(+), 1106 deletions(-) diff --git a/application/default/controllers/GlacierController.php b/application/default/controllers/GlacierController.php index 3e8b2fc8..719bcdf9 100644 --- a/application/default/controllers/GlacierController.php +++ b/application/default/controllers/GlacierController.php @@ -6,7 +6,21 @@ class GlacierController extends DataController function preDispatch() { parent::preDispatch(); - $this->_helper->layout->setLayout('glacier'); + //$this->_helper->layout->setLayout('glacier'); + $acName = $this->_request->getActionName(); + if(in_array($acName,array("rs","dem"))) + { + $this->view->pageIn = "collapse1"; + } + if(in_array($acName,array("glacier","lake"))) + { + $this->view->pageIn = "collapse2"; + } + if(in_array($acName,array("meteo","hydro","gps",'lidar','material','movement','physical','photogrammetry','frozensoil','vegetation','quatemary'))) + { + $this->view->pageIn = "collapse3"; + } + $this->view->pageID = "glacier-".$acName; } function indexAction() @@ -69,8 +83,8 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='遥感影像' or keyword='DEM'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='遥感影像' or keyword='DEM')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='遥感影像' or keyword='DEM')) order by timebegin,title 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; @@ -87,48 +101,48 @@ class GlacierController extends DataController } function inventoryAction() - { + { $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰川编目' or keyword='冰湖编目'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰川编目' or keyword='冰湖编目')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰川编目' or keyword='冰湖编目')) order by timebegin,title 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 glacierAction() { $this->getmd('冰川编目'); - } + } function lakeAction() { $this->getmd('冰湖编目'); - } - - function fieldAction() - { + } + + function fieldAction() + { $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' - and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS' - or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌' + $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' + and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS' + or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌' or keyword='冰雪物理过程' or keyword='冰温' or keyword='摄影测量' or keyword='照片' or keyword='第四纪' or keyword='冻土' or keyword='植被' ))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS' - or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌' - or keyword='冰雪物理过程' or keyword='冰温' or keyword='摄影测量' or keyword='照片' or keyword='第四纪' or keyword='冻土' or keyword='植被' )) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位' or keyword='气象' or keyword='雨量' or keyword='GPS' + or keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度' or keyword='物质平衡' or keyword='花杆' or keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌' + or keyword='冰雪物理过程' or keyword='冰温' or keyword='摄影测量' or keyword='照片' or keyword='第四纪' or keyword='冻土' or keyword='植被' )) order by timebegin,title 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; - } - + $this->view->offset=$offset+1; + } + function meteoAction() { $page=(int)$this->_request->getParam('page'); @@ -136,8 +150,8 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='气象' or keyword='雨量'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='气象' or keyword='雨量')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='气象' or keyword='雨量')) order by timebegin,title 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; @@ -150,8 +164,8 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='水文' or keyword='流量' or keyword='水质' or keyword='同位素' or keyword='径流' or keyword='水位')) order by timebegin,title 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; @@ -169,13 +183,13 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='雷达' or keyword='雷达测厚' or keyword='冰川厚度')) order by timebegin,title 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 materialAction() { $page=(int)$this->_request->getParam('page'); @@ -183,8 +197,8 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='物质平衡' or keyword='花杆'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='物质平衡' or keyword='花杆')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='物质平衡' or keyword='花杆')) order by timebegin,title 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; @@ -197,56 +211,56 @@ class GlacierController extends DataController $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='运动速度' or keyword='花杆消融观测' or keyword='冰舌')) order by timebegin,title 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 physicalAction() - { + { $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰雪物理过程' or keyword='冰温'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰雪物理过程' or keyword='冰温')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='冰雪物理过程' or keyword='冰温')) order by timebegin,title 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 photogrammetryAction() - { + { $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); $state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='摄影测量' or keyword='照片'))"); $row=$state->fetchAll(); - $sum=$row[0]['count']; - $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='摄影测量' or keyword='照片')) order by timebegin,title limit ? offset ?"; + $sum=$row[0]['count']; + $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') and id in (select id from keyword where keytype='theme' and (keyword='摄影测量' or keyword='照片')) order by timebegin,title 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 vegetationAction() - { + { $this->getmd('植被'); } function frozensoilAction() - { + { $this->getmd('冻土'); - } + } function quatemaryAction() - { + { $this->getmd('第四纪'); } - + function listAction() { $sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='glacier') order by timebegin,title"; diff --git a/application/default/controllers/HiwaterController.php b/application/default/controllers/HiwaterController.php index 9d8e9770..675a86f8 100644 --- a/application/default/controllers/HiwaterController.php +++ b/application/default/controllers/HiwaterController.php @@ -6,8 +6,38 @@ class HiwaterController extends DataController function preDispatch() { parent::preDispatch(); - $this->_helper->layout->setLayout('hiwater'); + //$this->_helper->layout->setLayout('hiwater'); $this->debug = 1; + $acName = $this->_request->getActionName(); + if(in_array($acName,array("cold","bg","ar","bdk","eb"))) + { + $this->view->pageIn = "collapse1"; + } + if(in_array($acName,array("forest","dyk","plg"))) + { + $this->view->pageIn = "collapse2"; + } + if(in_array($acName,array("arid","hzz","yk",'zy','zynoc','lzg','lzs'))) + { + $this->view->pageIn = "collapse3"; + } + if(in_array($acName,array("meteo","autometeo","mobilemeteo","ec",'las','normalmeteo','regionalmeteo','doppler','hydro','airsounding'))) + { + $this->view->pageIn = "collapse4"; + } + if(in_array($acName,array("radiometer","airebone","lidar","widas",'asd'))) + { + $this->view->pageIn = "collapse5"; + } + if(in_array($acName,array("satellite"))) + { + $this->view->pageIn = "collapse6"; + } + if(in_array($acName,array("surveystd","document"))) + { + $this->view->pageIn = "collapse7"; + } + $this->view->pageID = "hiwater-".$acName; } function indexAction() diff --git a/application/default/views/scripts/glacier/browse.phtml b/application/default/views/scripts/glacier/browse.phtml index 3dde7bf0..1825019c 100755 --- a/application/default/views/scripts/glacier/browse.phtml +++ b/application/default/views/scripts/glacier/browse.phtml @@ -1,30 +1,30 @@ -headTitle($this->config->title->site); - $this->headTitle($this->config->title->data); - $this->headTitle('全部浏览'); -$this->headTitle()->setSeparator(' - '); -$this->headLink()->appendStylesheet('/css/water.css'); -$this->breadcrumb('首页'); -$this->breadcrumb(''.$this->config->title->data.''); -$this->breadcrumb(''.$this->config->title->glacier.''); -$this->breadcrumb('浏览'); -$this->breadcrumb()->setSeparator(' > '); -?> - -