2009-03-06 03:20:46 +00:00
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('数据查看');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdview.css');
$this->breadcrumb('< a href = "/" > 首页< / a > ');
$this->breadcrumb('< a href = "/data" > '.$this->config->title->data.'< / a > ');
$this->breadcrumb('查看元数据');
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/prototype.js');
$this->headScript()->appendFile('/js/OpenLayers.js');
2010-03-10 06:58:11 +00:00
$this->headScript()->appendFile('/js/window.js');
2009-03-06 03:20:46 +00:00
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
?>
<?php $md = $this -> metadata ; if ( $md ) : ?>
2010-01-06 02:09:46 +00:00
< h1 > <?php echo $this -> escape ( $md -> title );
if ($md->title_en) echo '< br / > '.$this->escape($md->title_en);?>
< / h1 >
2009-12-29 04:53:33 +00:00
< table width = 100% > < tr > < td >
2009-03-06 03:20:46 +00:00
< div id = "ImageViewer" >< img src = "/data/thumb/id/ <?php echo $md -> id ; ?> " /> </ div >
2010-01-04 12:09:44 +00:00
< / td > < td valign = "top" align = "middle" >
2009-03-06 03:20:46 +00:00
< div id = "ItemSummary" >
< div id = "category" >
< ul > <?php foreach ( $this -> category as $cat ) : ?>
< li >< a href = "/data/category/code/ <?php echo $cat [ 'code' ]; ?> " > <?php echo $this -> escape ( $cat [ 'name_zh' ]); ?> </ a ></ li >
<?php endforeach ; ?>
< / ul >
< / div >
2010-01-04 16:51:07 +00:00
<?php
$kt='';
$i=0;
foreach($this->keys as $cg) :
2010-06-27 12:41:30 +00:00
if ($kt==$cg['keytype']) :
2010-01-04 16:51:07 +00:00
$i+=1;
else :
if (!empty($kt)) echo '< / ul > < / div > ';
2010-06-27 12:41:30 +00:00
$kt=$cg['keytype'];
2010-01-04 16:51:07 +00:00
$i=0;
endif;
2010-06-27 12:41:30 +00:00
if ($i==0) echo '< div id = "'.$cg['keytype'].'" > < ul > ';
echo '< li > < a href = "/data/tag/key/'.urlencode($cg['keyword']).'" > '.$cg['keyword'].'< / a > < / li > ';
2010-01-04 16:51:07 +00:00
endforeach;
echo '< / ul > < / div > ';
?>
2009-03-06 03:20:46 +00:00
<?php if ( $this -> series ) : ?>
< div id = "series" >
< ul > <?php foreach ( $this -> series as $serie ) : ?>
< li >< a href = "/data/series/id/ <?php echo $serie [ 'id' ]; ?> " > <?php echo $this -> escape ( $serie [ 'name' ]); ?> </ a ></ li >
<?php endforeach ; ?>
< / ul >
< / div >
<?php endif ; ?>
< ul id = OtherInfo >
2010-01-04 16:51:07 +00:00
< li id = "filesize" > 数据大小:<?php echo $md -> filesize ; ?> MB</ li >
2009-03-06 03:20:46 +00:00
< li id = "fileformat" > 数据格式:<?php echo $md -> fileformat ; ?> </ li >
<?php if ( $this -> downloaded > 9 ) : ?>
< li id = "downtimes" > 下载:<?php echo $this -> downloaded ; ?> 次</ li >
<?php endif ; ?>
< li id = "viewtimes" > 浏览量:<?php echo $this -> viewed ; ?> 次</ li >
2010-01-05 03:57:55 +00:00
<?php if ( $md -> projection ) : ?>
2009-12-30 03:42:22 +00:00
< li id = "projection" title = " <? = $this -> projection ; ?> " > 数据投影:
<?php
$p=explode(" ",$this->projection);
$p=explode("=",$p[0]);
if (!empty($p[1]))
echo $p[1];
else
{
if (is_numeric($md->projection)) echo 'EPSG_CODE_';
echo $md->projection;
}
?>< / li >
2010-01-05 02:57:07 +00:00
<?php endif ; ?>
2009-03-06 03:20:46 +00:00
<?php if ( ! empty ( $md -> timebegin )) : ?>
< li id = "datatimes" > 数据时间范围:<?php echo date ( 'Y-m-d' , strtotime ( $md -> timebegin )); if ( ! empty ( $md -> timeend )) echo " 至 " . date ( 'Y-m-d' , strtotime ( $md -> timeend )); ?> </ li >
<?php endif ; ?>
2009-12-22 04:37:39 +00:00
<?php if ( ! empty ( $this -> doc )) : ?>
2010-03-19 10:18:58 +00:00
< li id = "datadoc" >< a href = " <?php $wikiTitle = $this -> doc ;
if(strpos($wikiTitle,'http://wiki.westgis.ac.cn/index.php/')!==false){
$title=str_replace('http://wiki.westgis.ac.cn/index.php/','',$wikiTitle);
echo "/metainfo/$title";
}else{
echo $this->doc;
}?>">数据说明文档< / a > < / li >
2009-12-22 04:37:39 +00:00
<?php endif ; ?>
2010-06-27 23:41:00 +00:00
< li id = "datatype" > 数据共享方式:<?php if ( $md -> datatype ) print "离线(可免费申请)" ; else print "在线(可直接下载)" ; ?> </ li >
2009-03-06 03:20:46 +00:00
< / ul >
< div id = "linkurl" >
<?php if ( ! $md -> datatype ) : ?>
< a href = "/data/download/uuid/ <?php echo $md -> uuid ; ?> " >< img src = "/images/download.png" title = "直接下载" /></ a >
<?php endif ; ?>
< a href = "/data/order/uuid/ <?php echo $md -> uuid ; ?> " >< img src = "/images/order.png" title = "免费!离线申请此数据(在线数据和离线数据都可申请)" /></ a >
< / div >
< / div >
2010-01-04 12:09:44 +00:00
< / td > < td valign = "top" >
2009-12-29 04:53:33 +00:00
< div id = "authors" >
< h2 > 联系人< / h2 >
< ul >
2010-01-01 13:05:50 +00:00
<?php
2010-06-22 09:46:11 +00:00
$party_zh=array('resourceProvider'=>'资源提供者','custodian'=>'维护者','owner'=>'拥有者','user'=>'用户','distributor'=>'数据服务联系人','originator'=>'创建者','pointOfContact'=>'联系人','principalInvestigator'=>'调查者','processor'=>'处理者','publisher'=>'元数据发布者','author'=>'元数据作者');
2010-01-04 04:08:00 +00:00
$r='';
$i=0;
foreach($this->authors as $k=>$author) :
if ($author['role']!=$r)
{
$r=$author['role'];
$i=0;
if ($k>0) echo '< / li > ';
echo '< li > '.$party_zh[$author['role']].': ';
}
if ($i>0) echo ', ';
$i+=1;
2010-01-04 10:07:40 +00:00
echo '< strong title = "'.$author['organisation'].'" > ';
2010-01-04 07:05:18 +00:00
if (!empty($author['individual']))
2010-01-04 07:00:37 +00:00
echo $author['individual'];
else
echo $author['organisation'];
echo '< / strong > ';
2010-01-04 04:08:00 +00:00
if ($k+1==count($this->authors)) echo '< / li > ';
endforeach;
?>
2010-01-05 03:57:55 +00:00
< / ul >
< h2 > 其他信息< / h2 > < ul >
2009-12-29 04:53:33 +00:00
< li > 元数据更新时间:<?php print date ( 'Y-m-d' , strtotime ( $md -> ts_created )); ?> </ li >
< li >< a href = "/data/detail/id/ <?php echo $md -> id ; ?> " > 详细元数据</ a ></ li >
< li >< a href = "/data/xml/id/ <?php echo $md -> id ; ?> " >< img src = "/images/xml.gif" alt = "查看XML源文件" ></ a ></ li >
2010-03-10 06:58:11 +00:00
< li >< a href = "#" id = "show-list" rel = " <?php echo $md -> uuid ; ?> " > 文件列表</ a ></ li >
2009-12-29 04:53:33 +00:00
< / ul >
< / div >
< / td > < / tr > < / table >
2009-03-06 03:20:46 +00:00
< script type = "text/javascript" >
(function(a, b) {
var ah=document.getElementById(a).offsetHeight, bh=document.getElementById(b).offsetHeight;
if (ah > bh) document.getElementById(b).style.height = ah + 'px';
})('ItemSummary', 'ImageViewer');
< / script >
< div style = "clear:both;border-top:0px solid transparent !important;" > < / div >
< hr / >
< div id = 'map' > < / div >
< div id = "abstract" >
< p >
2010-06-21 14:52:03 +00:00
<?php echo str_replace ( array ( " \r\n " , " \n " , " \r " ), '</p><p>' , $md -> description ); ?>
2009-03-06 03:20:46 +00:00
< / p >
< / div >
< hr / >
2010-01-04 13:00:33 +00:00
< div id = "cite" >
<?php if ( $md -> citation ) : ?>
< h2 > 本数据引用方式< / h2 >
< p > <?php echo $this -> escape ( $md -> citation ); ?> </ p >
<?php endif ; ?>
2010-01-05 15:12:07 +00:00
<?php if ( $this -> ref ) : ?>
< h2 > 建议参考文献< / h2 >
< ol >
<?php foreach ( $this -> ref as $ref ) :
echo '< li > '.$ref['reference'].'< / li > ';
endforeach;
?>
< / ol >
2010-06-21 10:15:18 +00:00
<?php endif ; ?>
2010-01-05 15:12:07 +00:00
< h2 > 数据使用声明< / h2 >
<?php
if ($this->uselimits) :
2010-01-04 16:51:07 +00:00
foreach($this->uselimits as $uselimit) :
2010-01-06 07:13:44 +00:00
echo '< p > '.str_replace(array("\r\n", "\n", "\r"),'< / p > < p > ',$this->escape($uselimit['uselimit'])).'< / p > ';
2010-01-04 16:51:07 +00:00
endforeach;
?>
<?php else : ?>
2010-01-04 13:00:33 +00:00
< p > 为尊重知识产权、保障数据作者的权益、扩展数据中心的服务、评估数据的应用潜力,请数据使用者在使用数据所产生的研究成果中(包括公开发表的论文、论著、数据产品和未公开发表的研究报告、数据产品等成果),明确注明数据来源和数据作者。对于转载(二次或多次发布)的数据,作者还须注明原始数据来源。< / p >
< p > 中文发表的成果参考以下规范注明: 数据来源于国家自然科学基金委员会"中国西部环境与生态科学数据中心"(http://westdc.westgis.ac.cn)< / p >
< p > 英文发表的成果依据以下规范注明: The data set is provided by Environmental and Ecological Science Data Center for West China,National Natural Science Foundation of China (http://westdc.westgis.ac.cn)< / p >
< / p >
2010-01-05 03:57:55 +00:00
<?php endif ; ?>
2010-06-21 10:15:18 +00:00
<?php if ( $md -> suppinfo ) : ?>
< h2 > 项目支持信息< / h2 >
2010-06-27 23:41:00 +00:00
<?php echo '<p>' . str_replace ( array ( " \r\n " , " \n " , " \r " ), '</p><p>' , $this -> escape ( $md -> suppinfo )) . '</p>' ; ?>
2010-06-21 14:52:03 +00:00
<?php endif ; ?>
2010-01-05 03:57:55 +00:00
<?php if ( $this -> resources ) : ?>
< h2 > 其他在线资源< / h2 >
< ul > <?php foreach ( $this -> resources as $link ) : ?>
2010-01-07 05:57:09 +00:00
< li >< a href = " <?php echo $link [ 'linkage' ]; ?> " title = " <?php echo $link [ 'description' ]; ?> " >
2010-01-05 03:57:55 +00:00
<?php
if (!empty($link['name']))
echo $link['name'];
elseif (!empty($link['description']))
echo $link['description'];
else
echo $link['linkage'];
?>< / a > < / li >
<?php endforeach ; ?>
< / ul >
<?php endif ; ?>
2010-01-04 13:00:33 +00:00
< / div >
2010-01-04 16:51:07 +00:00
<?php if ( $this -> related ) : ?>
2010-01-04 13:00:33 +00:00
< hr / >
2009-03-06 03:20:46 +00:00
< div id = "related" >
< h2 > 相关数据< / h2 >
< ul >
<?php foreach ( $this -> related as $r ) : ?>
< li >< a href = "/data/ <? = $r [ 'uuid' ]; ?> " > <? = $r [ 'title' ]; ?> </ a ></ li >
<?php endforeach ; ?>
< / ul >
< / div >
<?php endif ; ?>
<?php if ( $this -> literature ) : ?>
< div id = "literature" >
< h2 > 相关文献< / h2 >
< ul >
<?php foreach ( $this -> literature as $r ) :
$u=parse_url($r['url']);
if ($u['host']=='hdl.handle.net')
$url=$this->config->seekspace->handleurl.$u['path'];
else
$url=$r['url'];
2010-01-07 15:18:07 +00:00
echo '< li > ';
if ($url) echo '< a href = "'.$url.'" target = "_blank" > ';
echo $r['title'];
if ($url) echo '< / a > ';
echo '< / li > ';
2009-03-06 03:20:46 +00:00
?>
<?php endforeach ; ?>
< / ul >
< / div >
<?php endif ; ?>
<?php if ( $this -> documents ) : ?>
< div id = "documents" >
< h2 > 相关文档< / h2 >
< ul >
<?php foreach ( $this -> documents as $r ) : ?>
< li >< a href = "/data/ <? = $r [ 'uuid' ]; ?> " > <? = $r [ 'title' ]; ?> </ a ></ li >
<?php endforeach ; ?>
< / ul >
< / div >
<?php endif ; ?>
< hr / >
< div id = "comment" >
< h2 > 数据评论< / h2 >
< div id = "allcomments" >
< / div >
< script type = "text/javascript" >
function loading()
{
$('loading').style.display = 'block';
}
function done()
{
$('loading').style.display = 'none';
}
function reportError(request)
{
alert('Sorry. There was an error.');
}
var request_pars = ''; //请求参数
var myAjax = new Ajax.Updater('allcomments', '/data/comment/uuid/<? = $md -> uuid ; ?> ',{
method : 'get', // http 请求方法,get or post
parameters : request_pars, // 请求参数
onFailure : reportError, // 失败的时候调用 reportError 函数处理
onLoading : loading, // 加载时
onComplete : done // 读取完毕
});
< / script >
<?php echo $this -> commentForm ; ?>
< / div >
2009-12-10 14:54:52 +00:00
<!-- westdc.westgis.ac.cn -->
2009-03-06 03:20:46 +00:00
< script src = "http://maps.google.com/maps?file=api&v=2&key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhRBSKpgcP88GYi6r2Of16IkMX_4YhSBQsywCi4J2_fh4nBuWmK7gyRjLg" > < / script >
2009-12-10 14:54:52 +00:00
<!-- test.westgis.ac.cn
2009-11-27 02:50:58 +00:00
< script src = 'http://maps.google.com/maps?file=api&v=2&key=ABQIAAAACD-MqkkoOm60o_dvwdcKVhThiRESR0xRCe9JKd36EL3glTk0OxTsRzifkUWmTTrYWaE7dY1lYUlGxA' > < / script >
2009-12-10 14:54:52 +00:00
-->
2009-03-06 03:20:46 +00:00
< script type = "text/javascript" >
var map = new GMap2(document.getElementById("map"));
var plotbounds=new GLatLngBounds(new GLatLng(<? = $md -> south ; ?> ,<? = $md -> west ; ?> ),new GLatLng(<? = $md -> north ; ?> ,<? = $md -> east ; ?> ));
var zoomlevel=map.getBoundsZoomLevel(plotbounds);
zoomlevel--;
if (zoomlevel>16) zoomlevel=16;
map.setCenter(new GLatLng(<? = ( $md -> south + $md -> north ) / 2 ; ?> ,<? = ( $md -> east + $md -> west ) / 2 ; ?> ), zoomlevel);
2009-12-30 04:30:03 +00:00
map.setMapType(G_PHYSICAL_MAP);
map.setUIToDefault();
2009-03-06 03:20:46 +00:00
var polygon=new GPolygon([
new GLatLng(<? = $md -> north ; ?> ,<? = $md -> west ; ?> ),
new GLatLng(<? = $md -> north ; ?> ,<? = $md -> east ; ?> ),
new GLatLng(<? = $md -> south ; ?> ,<? = $md -> east ; ?> ),
new GLatLng(<? = $md -> south ; ?> ,<? = $md -> west ; ?> ),
new GLatLng(<? = $md -> north ; ?> ,<? = $md -> west ; ?> )
],"#f33f00",5,1,"#ff0000",0.2);
map.addOverlay(polygon);
< / script >
<!--
< script type = "text/javascript" >
var map;
map = new OpenLayers.Map('map');
map.addControl(new OpenLayers.Control.LayerSwitcher());
var gphy = new OpenLayers.Layer.Google(
"Google Physical",
{type: G_PHYSICAL_MAP}
);
var gmap = new OpenLayers.Layer.Google(
"Google Streets" // the default
);
var ghyb = new OpenLayers.Layer.Google(
"Google Hybrid",
{type: G_HYBRID_MAP}
);
var gsat = new OpenLayers.Layer.Google(
"Google Satellite",
{type: G_SATELLITE_MAP}
);
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'} );
map.addLayers([ol_wms,gphy, gmap, ghyb, gsat]);
//map.zoomToExtent(extent);
//map.setCenter(new OpenLayers.LonLat(102, 36), 4);
var ajax=new OpenLayers.Ajax.Request('/metadata/json/id/<?php echo $md -> id ; ?> ',{method:'get',onSuccess:featureresult});
function featureresult(response){
var feature1= eval('(' + response.responseText + ')');
//alert(feature1.type);
var geojson_format = new OpenLayers.Format.GeoJSON();
var vector_layer = new OpenLayers.Layer.Vector('metadata');
map.addLayer(vector_layer);
vector_layer.addFeatures(geojson_format.read(feature1));
map.zoomToExtent(vector_layer.getExtent());
var sf = new OpenLayers.Control.SelectFeature(vector_layer);
map.addControl(sf);
sf.activate();
}
< / script >
-->
2010-03-10 06:58:11 +00:00
< div id = "window-outter" style = "display:none;" >
< div id = "window-inner" >
< div id = "window-closer-container" > [< a href = "#" id = "window-closer" > 关闭< / a > ]< / div >
< div id = "window-content-container" >
< div id = "window-loading" > 加载中...< / div >
< ol id = "file-list" >
< / ol >
< / div >
< / div >
< / div >
2009-03-06 03:20:46 +00:00
<?php else : ?>
< p > Cannot find the metadata.< / p >
< p > 没有找到对应的元数据。< / p >
<?php endif ; ?>
2010-01-04 16:51:07 +00:00