diff --git a/application/default/controllers/HiwaterController.php b/application/default/controllers/HiwaterController.php index 2d27245c..e01ead85 100644 --- a/application/default/controllers/HiwaterController.php +++ b/application/default/controllers/HiwaterController.php @@ -276,12 +276,13 @@ class HiwaterController extends DataController function tagAction() { $key = $this->_request->getParam('key'); + $keytype = $this->_request->getParam('keytype'); $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); if (!empty($key)) { $this->view->codename=$key; - $sql=$this->db->quoteInto('select count(id) from keyword where keyword=?',$key); + $sql=$this->db->quoteInto("select count(k.id) from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and k.keyword=?",$key); $state=$this->db->query($sql); $row=$state->fetchAll(); $sum=$row[0]['count']; @@ -289,17 +290,12 @@ class HiwaterController extends DataController $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->page=new Pagination($sum,$page,$this->limit); } else { - $state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by keyword.keyword order by count desc"); - $k1=$state->fetchAll(); - $state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by k.keyword order by k.keyword"); - $k2=$state->fetchAll(); - $state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by k.keyword order by k.keyword"); - $k3=$state->fetchAll(); - $state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by k.keyword order by k.keyword"); - $k4=$state->fetchAll(); - $state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') group by keyword.keyword order by keyword.keyword"); - $k5=$state->fetchAll(); - $this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5); + $sql="select k.keyword,count(*),k.keytype from keyword k left join normalmetadata m on k.id=m.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') "; + if (!empty($keytype) && ($keytype=='place' || $keytype=='theme' || $keytype=='discipline'||$keytype=='temporal')) $sql.=" and k.keytype='".$keytype."'"; + $sql.=' group by k.keyword,k.keytype order by k.keytype,k.keyword,count desc'; + $state=$this->db->query($sql); + $this->view->keytype=$keytype; + $this->view->keywords=$state->fetchAll(); } } @@ -334,7 +330,7 @@ class HiwaterController extends DataController function timelineAction() { - $fn="heihetime.xml"; + $fn="hiwatertime.xml"; $rows=$this->db->fetchAll("select ts_created from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') order by ts_created desc limit 1"); $last_update=strtotime($rows[0]['ts_created']); if (!file_exists($fn) || (filemtime($fn)<$last_update)) @@ -379,6 +375,12 @@ class HiwaterController extends DataController //提供全部分类列表 } } + + function viewAction() + { + parent::viewAction(); + $this->_helper->viewRenderer('hiwater/view'); + } private function getmd($keyword,$type='theme') { diff --git a/application/default/views/scripts/hiwater/base.phtml b/application/default/views/scripts/hiwater/base.phtml index 58cc53e7..af2309cc 100644 --- a/application/default/views/scripts/hiwater/base.phtml +++ b/application/default/views/scripts/hiwater/base.phtml @@ -3,7 +3,7 @@ $this->headTitle($this->config->title->site); $this->headTitle($this->config->title->data); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); -$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> render('breadcrumbs.phtml'); ?>
diff --git a/application/default/views/scripts/hiwater/browse.phtml b/application/default/views/scripts/hiwater/browse.phtml index 51528ee9..a901353e 100644 --- a/application/default/views/scripts/hiwater/browse.phtml +++ b/application/default/views/scripts/hiwater/browse.phtml @@ -4,7 +4,7 @@ $this->headTitle('全部浏览'); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); -$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> render('breadcrumbs.phtml'); ?>
diff --git a/application/default/views/scripts/hiwater/document.phtml b/application/default/views/scripts/hiwater/document.phtml index 0e2aab67..973edc80 100644 --- a/application/default/views/scripts/hiwater/document.phtml +++ b/application/default/views/scripts/hiwater/document.phtml @@ -6,7 +6,9 @@ $this->headLink()->appendStylesheet('/css/water.css'); $this->breadcrumb('首页'); $this->breadcrumb()->setSeparator(' > '); $this->theme->AppendPlus($this,'colorbox'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> +render('breadcrumbs.phtml'); ?>
partial('hiwater/navi.phtml'); ?> diff --git a/application/default/views/scripts/hiwater/search.phtml b/application/default/views/scripts/hiwater/search.phtml index 081a7264..e227d881 100644 --- a/application/default/views/scripts/hiwater/search.phtml +++ b/application/default/views/scripts/hiwater/search.phtml @@ -6,17 +6,14 @@ $this->headTitle('快速搜索'); if (!empty($this->codename)) $this->headTitle($this->codename); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); -$this->breadcrumb('首页'); -$this->breadcrumb(''.$this->config->title->data.''); -$this->breadcrumb(''.$this->config->title->heihe.''); -$this->breadcrumb('快速搜索'); -$this->breadcrumb()->setSeparator(' > '); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> +render('breadcrumbs.phtml'); ?>
-
+
partial('hiwater/navi.phtml',array('key'=>$this->key)); ?>
-
+
breadcrumb() ?>
metadata)) : ?> page->getNavigation(); ?> diff --git a/application/default/views/scripts/hiwater/tag.phtml b/application/default/views/scripts/hiwater/tag.phtml index 59112995..b87301d3 100644 --- a/application/default/views/scripts/hiwater/tag.phtml +++ b/application/default/views/scripts/hiwater/tag.phtml @@ -9,16 +9,17 @@ $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb(''.$this->config->title->heihe.''); $this->breadcrumb('关键词导航'.(($this->codename)?':'.$this->codename:'')); $this->breadcrumb()->setSeparator(' > '); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> +render('breadcrumbs.phtml'); ?>
-
+
partial('hiwater/navi.phtml'); ?>
-
-
breadcrumb() ?>
+
metadata)) : ?>
-

关键词:codename; ?> 【全部关键词

+

关键词:codename; ?> 【全部关键词

page->getNavigation(); ?>
@@ -33,22 +34,27 @@ $this->breadcrumb()->setSeparator(' > ');
-
\ No newline at end of file diff --git a/application/default/views/scripts/hiwater/thumb.phtml b/application/default/views/scripts/hiwater/thumb.phtml index 87dadeef..4015e80f 100644 --- a/application/default/views/scripts/hiwater/thumb.phtml +++ b/application/default/views/scripts/hiwater/thumb.phtml @@ -4,7 +4,7 @@ $this->headTitle($this->config->title->data); $this->headTitle('缩略图浏览'); $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); -$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); $this->theme->AppendPlus($this,'colorbox'); $this->theme->AppendPlus($this,'masonry'); ?> diff --git a/application/default/views/scripts/hiwater/timeline.phtml b/application/default/views/scripts/hiwater/timeline.phtml index 24db2a0e..58aacb1e 100644 --- a/application/default/views/scripts/hiwater/timeline.phtml +++ b/application/default/views/scripts/hiwater/timeline.phtml @@ -6,19 +6,66 @@ $this->headTitle()->setSeparator(' - '); $this->headLink()->appendStylesheet('/css/water.css'); $this->breadcrumb('首页'); $this->breadcrumb(''.$this->config->title->data.''); -$this->breadcrumb(''.$this->config->title->heihe.''); +$this->breadcrumb(''.$this->config->title->hiwater.''); $this->breadcrumb('时间轴导航'); $this->breadcrumb()->setSeparator(' > '); $this->headScript()->appendFile('/js/timeline_var.js'); $this->headScript()->appendFile('/js/timeline_js/timeline-api.js'); -$this->headScript()->appendFile('/js/heihetime.js'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> +render('breadcrumbs.phtml'); ?>
-
+
partial('hiwater/navi.phtml'); ?>
-
-
breadcrumb() ?>
+
-
\ No newline at end of file +
+ \ No newline at end of file diff --git a/application/default/views/scripts/hiwater/timemap.phtml b/application/default/views/scripts/hiwater/timemap.phtml index 29f6dd4e..89d9b158 100644 --- a/application/default/views/scripts/hiwater/timemap.phtml +++ b/application/default/views/scripts/hiwater/timemap.phtml @@ -15,16 +15,17 @@ $this->headScript()->appendFile('/js/timeline_var.js'); $this->headScript()->appendFile('/js/timeline_js/timeline-api.js'); $this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)'); $this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js'); +$this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> +render('breadcrumbs.phtml'); ?>
-
+
partial('hiwater/navi.phtml'); ?>
-
-
breadcrumb() ?>
+
@@ -63,7 +64,7 @@ $(function() { tm = TimeMap.init({ mapId: "map", // Id of map div element (required) timelineId: "timeline", // Id of timeline div element (required) - scrollTo: "2000-01-01", + scrollTo: "2012-05-01", options: { eventIconPath: "../images/" }, diff --git a/application/default/views/scripts/hiwater/view.phtml b/application/default/views/scripts/hiwater/view.phtml index ba18a53c..88dd9207 100644 --- a/application/default/views/scripts/hiwater/view.phtml +++ b/application/default/views/scripts/hiwater/view.phtml @@ -3,578 +3,487 @@ $this->headTitle($this->config->title->data); $this->headTitle($this->metadata->title); $this->headTitle()->setSeparator(' - '); - $this->headLink()->appendStylesheet('/css/water.css'); - $this->headLink()->appendStylesheet('/css/heihemdview.css'); $this->breadcrumb('首页'); $this->breadcrumb(''.$this->config->title->data.''); $this->breadcrumb(''.$this->config->title->heihe.''); $this->breadcrumb('查看元数据'); $this->breadcrumb()->setSeparator(' > '); - //$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api); - $this->headScript()->appendFile('/js/jquery-1.7.min.js'); - $this->headScript()->appendFile('/js/jquery.colorbox-min.js'); - $this->headScript()->appendFile('/js/jquery.idTabs.min.js'); - $this->headLink()->appendStylesheet('/css/colorbox.css'); - //$this->headLink()->appendStylesheet('/js/theme/default/style.css'); + $this->headLink()->appendStylesheet('/css/water.css'); + $this->theme->AppendPlus($this,'google_map_v3'); + $this->theme->AppendPlus($this,'colorbox'); + $this->nav[] = array('link'=>"/hiwater",'title'=>'黑河生态水文遥感试验'); ?> - -