add glacier project

This commit is contained in:
wlx 2012-02-20 08:46:15 +00:00
parent a9853df64c
commit ad9e8a108c
4 changed files with 477 additions and 0 deletions

View File

@ -0,0 +1,311 @@
<?php
class GlacierController extends DataController
{
private $limit=20;
function preDispatch()
{
parent::preDispatch();
$this->_helper->layout->setLayout('glacier');
}
function indexAction()
{
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and length(t.data)>2 order by random() limit 3";
$this->view->meatdata=$this->db->fetchAll($sql);
}
/*
* 数据浏览
*/
function browseAction()
{
$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='heihe') ");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$this->db->select();
$select->from('normalmetadata','*')->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') ")->order('title desc')->limitPage($page,$this->limit);
$this->view->metadata = $this->db->fetchAll($select);
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function thumbAction()
{
$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='heihe') ");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$select=$this->db->select();
$select->from('normalmetadata as m','m.*')
->where(" uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') ")
->order('m.title desc')->limitPage($page,$this->limit);
$this->view->metadata = $this->db->fetchAll($select);
$this->view->page=new Pagination($sum,$page,$this->limit);
}
function documentAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("select count(*) from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') ))");
$sum=$row[0]['count'];
$sql="select * from reference where id in (select refid from mdref where uuid in (select uuid from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') )) order by reference limit ? offset ?";
$this->view->refs=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit,"文献");
$this->view->offset=$offset+1;
}
function baseAction()
{
$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='heihe') 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='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP'))");
$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='heihe') 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='水文地质' or keyword='社会经济' or keyword='人口' or keyword='SWAT' or keyword='NPP' or keyword='WRF' or keyword='辐射' or keyword='NEP')) 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 geobaseAction()
{
$this->getmd('基础地理');
}
function coreAction()
{
$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='heihe') and id in (select id from keyword where keytype='theme' and (keyword='DEM' 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='heihe') and id in (select id from keyword where keytype='theme' and (keyword='DEM' 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;
}
function demAction()
{
$this->getmd('DEM');
}
function rsAction()
{
$this->getmd('遥感影像');
}
function waterAction()
{
$this->getmd('水文地质');
}
function modelAction()
{
$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='heihe') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' 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='heihe') and id in (select id from keyword where keytype='theme' and (keyword='WRF' or keyword='NPP' or keyword='SWAT' or keyword='NEP' 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 economicAction()
{
$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='heihe') 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='heihe') 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 landsurfaceAction()
{
$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='heihe') 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='heihe') 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;
}
function landuseAction()
{
$this->getmd('土地利用','theme');
}
function soilAction()
{
$this->getmd('土壤','theme');
}
function meteoAction()
{
$this->getmd('气象','theme');
}
function hydroAction()
{
$this->getmd('水文观测','theme');
}
function irragationAction()
{
$this->getmd('灌溉','theme');
}
function obsAction()
{
$this->getmd('试验','theme');
}
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='heihe') order by timebegin,title";
$this->view->metadata=$this->db->fetchAll($sql);
}
function tagAction()
{
$key = $this->_request->getParam('key');
$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);
$state=$this->db->query($sql);
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and id in (select id from keyword where keyword='".$key."') 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);
} 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='heihe') 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='heihe') 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='heihe') 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='heihe') 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='heihe') 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);
}
}
function searchAction()
{
$this->view->addHelperPath('helper','Zend_View_Helper_');
$form=new SearchForm();
$this->view->form=$form;
//$form->submit->setLabel('快速搜索');
$key=$this->_request->getParam('q');
if (!empty($key)) {
$search=new Search($key);
$where=$search->sql_expr(array("title","description"));
$page=@(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$row=$this->db->fetchAll("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='heihe') and ".$where);
$sum=$row[0]['count'];
$sql="select uuid,title,id,description from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and ".$where." 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->key=$key;
$this->view->offset=$offset+1;
}
}
function timemapAction()
{
$sql="select id,uuid,west,south,north,east,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and timebegin is not null";
$this->view->rows=$this->db->fetchAll($sql);
}
function timelineAction()
{
$fn="heihetime.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='heihe') order by ts_created desc limit 1");
$last_update=strtotime($rows[0]['ts_created']);
if (!file_exists($fn) || (filemtime($fn)<$last_update))
{
$dateformat="M j Y";
$rows=$this->db->fetchAll("select id,uuid,description,title,timebegin,timeend from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and timebegin is not null order by timebegin,title");
$timexml='<data>';
foreach($rows as $row) {
$timexml.='<event start="'.date($dateformat,strtotime($row['timebegin'])).' GMT+0800" ';
if ($row['timeend']!='' && $row['timeend']!=$row['timebegin']) $timexml.=' end="'.date($dateformat,strtotime($row['timeend'])).'" isDuration="true"';
$timexml.= ' title="'.htmlspecialchars($row['title']).'" image="/images/westdc_40w.gif" link="/heihe/view/uuid/'.$row['uuid'].'">';
$desc_length=mb_strlen($row['description'],"UTF-8");
$desc=mb_substr($row['description'],0,($desc_length>300)?300:$desc_length,"UTF-8");
if ($desc_length>300) $desc.=" ...";
$timexml.=htmlspecialchars($desc);
$timexml.="</event>\n";
}
$timexml.='</data>';
$fp=fopen($fn,'w');
fwrite($fp,$timexml);
fclose($fp);
}
}
function categoryAction()
{
$code = (int)$this->_request->getParam('code');
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$this->view->category=$this->db->fetchAll("select c.code,name,name_zh,count(*) from category c left join normalmetadata m on c.id=m.id,categorycode cc where c.code=cc.code and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') group by c.code,cc.name,cc.name_zh");
if ($code>0 && $code<20) {
$row=$this->db->fetchAll("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='heihe') and id in (select id from category where code=".$code.")");
$sum=$row[0]['count'];
$sql="select uuid,title,description,id from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='heihe') and id in (select distinct id from category where code=".$code.") 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;
$row=$this->db->fetchRow("select name,name_zh from categorycode where code=?",$code);
$this->view->codename=(empty($row['name_zh'])?$row['name']:$row['name_zh']);
} else {
//提供全部分类列表
}
}
private function getmd($keyword,$type='theme')
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='heihe' and m.id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$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='heihe') and id in (select id from keyword where keytype='".$type."' and keyword='".$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;
}
}

View File

@ -0,0 +1,34 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/glacier/">'.$this->config->title->glacier.'</a>');
$this->breadcrumb('基础数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='sidebar'>
<div id='leftnavi'>
<?= $this->partial('glacier/navi.phtml'); ?>
</div>
</div>
<div id='right'>
<div>&nbsp;</div>
<div id="intro">
基础数据是指用于开展冰川和冰湖编目的遥感影像、地形图和数字地形模型,由于地形图属国家保密数据,不在共享范围内。
</div>
<hr />
<?php if ($this->metadata) : ?>
<?php echo $this->page->getNavigation(); ?>
<div id="mdlist">
<ol start="<?php echo $this->offset; ?>">
<?php foreach($this->metadata as $md) : ?>
<li><a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><?php echo $md['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<?php endif; ?>
</div>

View File

@ -0,0 +1,75 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->breadcrumb($this->config->title->glacier);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='sidebar'>
<div id='leftnavi'>
<?= $this->partial('glacier/navi.phtml'); ?>
</div>
</div>
<div id='right'>
<div class="clear">&nbsp;</div>
<div id="intro">
<h1>“中国冰川资源及其变化调查”项目简介</h1>
<p>
冰川是最敏感、最直接、最易于辩识、长纪录、高分辨的气候变化信息指示器和储存体,冰川变化信息是全球变化中的重要基础性资源。我国是中、低纬度山 地冰川面积最多的国家(占52%),是两极冰盖之外最重要的冰川集结地,冰川变化信息的挖掘、调查、监测、编目是十分重要的基础性工作。
</p>
<p>
始于1978年的第一次冰川编目历时24年查清了截止到第一次全国航空测量时(西部冰川区约为1960s-1980s)中国冰川资源的基本情况。第一次冰川清查工作在国际和国内产生了重大影响,被国际冰川学会主席誉为建立了一座“冰川和气候变化研究的金矿”。
本次冰川资源调查是在中国科技部和中国科学院的联合支持下开展的一次大规模冰川普查其目标以第一次冰川编目为参考以20052006年为现状 年,以高分辨率遥感数据与地理信息系统技术为基础,深入研究基于遥感的冰川制图方法,结合冰川野外考察考察,获取我国冰川的分布状况,对有观测历史的典型 冰川进行重点监测;并与第一次冰川编目数据进行比较,查明我国冰川资源变化情况;同时,以此调查数据为基础,综合定位监测与相关资料,评估冰川变化对水资 源的影响,为西部水资源开发利用提供决策依据 。
</p>
<h2>《中国冰川资源及其变化调查》主要研究内容</h2>
<ol>
<li>第一次冰川编目的数字化:重点开展第一次冰川编目时期冰川及冰湖分布的数字化,为冰川遥感监测提供基础数据。</li>
<li>现状年20052006年西北干旱区和其它典型区冰川(湖)分布遥感调查:重点开展现状年基于高分辨率遥感影像的冰川与冰湖分布调查,同时,开展研究区部分冰川表面高程和运动速度信息的提取。</li>
<li>遥感冰川制图地面验证、典型冰川厚度测量与冰川变化野外调查:重点开展代表性区域野外调查和典型冰川定位观测,验证遥感解译结果,获取典型监测冰川过程观测数据;开展代表性冰川厚度的雷达测量。</li>
<li>冰川变化对水资源的影响评估:以现有定位观测冰川和区域冰川变化遥感调查数据为基础,评估西北干旱区和其它典型区冰川变化特征及其对水资源的影响。</li>
<li>冰川资源及其变化调查信息共享平台建设:建立冰川资源管理及共享信息系统,为资源共享服务。</li>
</ol>
<h2>《西部冰川变化监测及其影响评估方法研究》主要研究内容</h2>
<ol>
<li>各类冰川参数的遥感提取方法研究:针对西部三类冰川特点,综合运用现有卫星遥感数据,建立冰川几何尺寸、特征要素、物理特征、表面高程等信息的提取算法,为大范围冰川调查提供适合各类冰川下垫面状况和气候条件的参数提取方法集,提高遥感获取冰川信息的自动化程度。</li>
<li>冰川储量估算与冰川参数遥感提取精度评估:研制或改进冰川厚度测量雷达,对不同类型典型冰川流域不同规模的代表性冰川进行冰川厚度测量,建立适 合不同规模冰川的储量计算公式;开展各典型监测冰川区遥感冰川制图的野外验证、控制点采集与冰川变化的调查,进行遥感提取参数的误差分析与方法验证研究。</li>
<li>流域冰川融水径流估算方法研究:以典型监测冰川长期观测资料为基础,并进行加强观测,同时收集流域出山口径流长期水文气象观测数据,建立适合不同资料条件的简单和复杂冰川融水径流模型,在对比分析基础上,提出适合西部流域尺度的冰川融水径流计算方案。</li>
<li>冰川变化对水资源影响的评估方法及其应用研究:分析典型冰川流域冰川变化的空间特征及其差异;以典型冰川融水径流过程和流域尺度冰川动力响应研 究为基础,研究不同融水径流计算方案、基于冰川动力响应和基于冰川几何尺度转换关系模型对于不同性质冰川流域融水径流年际变化的模拟能力;根据流域融水径 流模型集,剖析冰川变化对冰川径流临界转变的影响及其强度。</li>
</ol>
</div>
<div id="heihe_ad">
<h2>已整理数据展示</h2>
<ul id="heihe_list">
<?php foreach($this->meatdata as $md) : ?>
<li>
<a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
<img src="/service/thumb/id/<?php echo $md['id']; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
</a>
</li>
<?php endforeach; ?>
</ul>
<img class="next" src="/images/next.png" onclick="changetlist()" />
</div>
</div>
<script type="text/javascript" language="javascript">
function changetlist(){
$.getJSON("/service/mdjson/source/heihe", function(data){
$('#heihe_list').html('');
if(data.length>0)
{
$.each(data, function(key, val) {
var a = '<a href="/data/'+val['uuid']+'"><span>'+val['title']+'</span>';
var img = '<img src="/service/thumb/id/'+val['id']+'" alt="Data Thumbnail" title="'+val['description']+'" />';
$('<li/>', {
//"class":'list_img',
"html": a+img+'</a>'
}).appendTo('#heihe_list');
});
}
});
}
</script>

View File

@ -0,0 +1,57 @@
<ul>
<li><a href="/glacier/">项目简介</a></li>
<li><a href="/glacier/geobase">基础数据</a>
<ul>
<li><a href="/glacier/dem">遥感影像</a></li>
<li><a href="/glacier/landuse">DEM数据</a></li>
</ul>
</li>
<li><a href="/glacier/base">冰湖编目数据</a>
<ul><li><a href="/glacier/geobase">中国</a></li>
<li><a href="/glacier/landsurface">其他地区</a></li>
</ul>
</li>
<li><a href="/glacier/base">冰川编目数据</a>
<ul><li><a href="/glacier/geobase">中国</a></li>
<li><a href="/glacier/landsurface">其他地区</a></li>
</ul>
</li>
<li><a href="/glacier/base">典型冰川区数据</a>
<ul><li><a href="/glacier/geobase">祁连山</a></li>
<li><a href="/glacier/landsurface">天山</a></li>
<li><a href="/glacier/geobase">贡嘎山</a></li>
<li><a href="/glacier/landsurface">纳木错流域</a></li>
<li><a href="/glacier/geobase">长江源区</a></li>
<li><a href="/glacier/landsurface">年楚河流域</a></li>
<li><a href="/glacier/geobase">珠穆朗玛峰北坡</a></li>
</ul>
</li>
</ul>
<ul>
<li><a href="/glacier/document">项目文档</a></li>
<li><a href="/glacier/list">数据列表</a></li>
<li><a href="/glacier/browse">整体浏览</a></li>
<li><a href="/glacier/category">ISO19115分类</a></li>
<li><a href="/glacier/thumb">缩略图浏览</a></li>
<li><a href="/glacier/tag">关键词导航</a></li>
<li><a href="/glacier/timeline">时间轴导航</a></li>
<li><a href="/glacier/timemap">时空联合导航</a></li>
<!-- <li>WebGIS地图浏览</li>
<li>数据使用协议</li> -->
</ul>
<form id="search" enctype="application/x-www-form-urlencoded" action="/glacier/search" method="post">
<input type="text" name="q" id="q" value="<?php echo (empty($this->key))?'回车搜索标题和摘要':$this->key; ?>" onfocus="myfocus(this);" onblur="myblur(this);">
<input type="hidden" name="submit" value="submit">
</form>
<script>
function myfocus(element) {
if (element.value == '回车搜索标题和摘要') {
element.value = '';
}
}
function myblur(element) {
if (element.value == '') {
element.value = '回车搜索标题和摘要';
}
}
</script>