merge sanjiangyuan-sub branch r4821 - r4849 into sjy-emc
This commit is contained in:
commit
53c01a9568
|
@ -356,6 +356,14 @@ class AccountController extends Zend_Controller_Action
|
|||
|
||||
if(!empty($submit))
|
||||
{
|
||||
$captchaword = trim($this->_request->getParam('captcha'));
|
||||
if($captcha->isValid($captchaword) !== true)
|
||||
{
|
||||
$this->view->error = view::Error("验证码错误");
|
||||
$this->view->captcha = $captcha->setCaptcha();
|
||||
return true;
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'username' => $this->_getParam('username'),
|
||||
'password' => $this->_getParam('password')
|
||||
|
|
|
@ -18,6 +18,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = $this->config = Zend_Registry::get('config');
|
||||
$this->submd = $this->view->config->sub->metadata;
|
||||
//$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
//$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
@ -189,16 +190,16 @@ class ServiceController extends Zend_Controller_Action
|
|||
function feedAction()
|
||||
{
|
||||
$feedArray = array(
|
||||
'title' => '中国西部环境与生态科学数据中心',
|
||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/data/feed',
|
||||
'description' => '共享西部计划产生的数据',
|
||||
'title' => '三江源生态监测综合服务平台',
|
||||
'link' => 'http://'.$_SERVER['SERVER_NAME'].'/service/feed',
|
||||
'description' => '管理、共享三江源生态监测数据',
|
||||
'language' => 'zh-CN',
|
||||
'charset' => 'utf-8',
|
||||
'published' => time(),
|
||||
//'generator' => 'Zend Framework Zend_Feed',
|
||||
'entries' => array()
|
||||
);
|
||||
$sql="select * from normalmetadata order by ts_created desc";
|
||||
$sql="select * from $this->submd order by ts_created desc";
|
||||
$rs=$this->db->fetchAll($sql);
|
||||
$feedArray['published']=strtotime($rs[0]['ts_created']);
|
||||
foreach($rs as $r)
|
||||
|
@ -334,7 +335,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
{
|
||||
$fund.='<li>'.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")</li>";
|
||||
}
|
||||
if (empty($fund)) $fund=$row['suppinfo'];
|
||||
if (empty($fund) && !empty($row['suppinfo'])) $fund=$row['suppinfo'];
|
||||
|
||||
}
|
||||
|
||||
|
@ -356,7 +357,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
$xslt->setParameter('','projection',$projection);
|
||||
$xslt->setParameter('','reference',$reference);
|
||||
$xslt->setParameter('','citation',$citation);
|
||||
$xslt->setParameter('','fund',$fund);
|
||||
if ($fund) $xslt->setParameter('','fund',$fund);
|
||||
$XSL = new DOMDocument();
|
||||
$XSL->load( '../data/doc.xsl', LIBXML_NOCDATA);
|
||||
$xslt->importStylesheet($XSL);
|
||||
|
@ -540,7 +541,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
$pdf->metadata=$row;
|
||||
$pdf->Draw();
|
||||
$pdf->setTitle($row['title'],true);
|
||||
$pdf->setAuthor('寒区旱区科学数据中心',true);
|
||||
$pdf->setAuthor('三江源生态监测综合服务平台',true);
|
||||
$this->getResponse()->setHeader('Content-Type', 'application/pdf');
|
||||
//->setHeader('Content-Disposition','inline; filename="'.$row['title'].'.pdf"');
|
||||
$pdf->Output($row['title'].'.pdf','I');
|
||||
|
@ -729,8 +730,8 @@ class ServiceController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
@$odf->setVars('citation',$cit,true,'utf-8');
|
||||
@$odf->setVars('reference',$row['reference'],true,'utf-8');
|
||||
@$odf->setVars('doi',$row['doi'],true,'utf-8');
|
||||
//@$odf->setVars('reference',$row['reference'],true,'utf-8');
|
||||
//@$odf->setVars('doi',$row['doi'],true,'utf-8');
|
||||
|
||||
@$odf->setVars('north',$row['north'],true,'utf-8');
|
||||
@$odf->setVars('south',$row['south'],true,'utf-8');
|
||||
|
@ -738,18 +739,18 @@ class ServiceController extends Zend_Controller_Action
|
|||
@$odf->setVars('east',$row['east'],true,'utf-8');
|
||||
if (!$ac=='simple')
|
||||
{
|
||||
@$odf->setImage('bigthumb', 'http://westdc.westgis.ac.cn/service/bigthumb/uuid/'.$row['uuid']);
|
||||
@$odf->setImage('thumb', 'http://westdc.westgis.ac.cn/service/thumb/uuid/'.$row['uuid']);
|
||||
@$odf->setImage('bigthumb', 'http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$row['uuid']);
|
||||
@$odf->setImage('thumb', 'http://'.$_SERVER['SERVER_NAME'].'/service/thumb/uuid/'.$row['uuid']);
|
||||
@$odf->setVars('projection',$row['projection'],true,'utf-8');
|
||||
@$odf->setVars('resolution',$row['resolution'],true,'utf-8');
|
||||
@$odf->setVars('rfdenom',$row['rfdenom'],true,'utf-8');
|
||||
@$odf->setVars('stratum_keyword',$row['keyword']['stratum'],true,'utf-8');
|
||||
@$odf->setVars('uselimits',$row['uselimits'],true,'utf-8');
|
||||
@$odf->setVars('resources',$row['resources'],true,'utf-8');
|
||||
@$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8');
|
||||
//@$odf->setVars('suppinfo',$row['suppinfo'],true,'utf-8');
|
||||
@$odf->setVars('contacts',$row['contacts'],true,'utf-8');
|
||||
} else {
|
||||
@$odf->setImage('qrcode', 'http://westdc.westgis.ac.cn/service/qrcode/uuid/'.$row['uuid']);
|
||||
@$odf->setImage('qrcode', 'http://'.$_SERVER['SERVER_NAME'].'/service/qrcode/uuid/'.$row['uuid']);
|
||||
}
|
||||
|
||||
$odf->exportAsAttachedFile($row['title'].'.odt');
|
||||
|
@ -1793,7 +1794,7 @@ class ServiceController extends Zend_Controller_Action
|
|||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$uuid = $this->getRequest()->getParam('uuid');
|
||||
$code_params = array('text' => 'http://westdc.westgis.ac.cn/data/'.$uuid,
|
||||
$code_params = array('text' => 'http://'.$_SERVER['SERVER_NAME'].'/data/'.$uuid,
|
||||
'backgroundColor' => '#FFFFFF',
|
||||
'foreColor' => '#000000',
|
||||
'padding' => 4, //array(10,5,10,5),
|
||||
|
|
|
@ -31,19 +31,17 @@ $this->theme->AppendPlus($this,'masonry');
|
|||
|
||||
<div class="span9">
|
||||
<div class="Lbox">
|
||||
<h4 class="box-title">新闻列表</h4>
|
||||
<ol >
|
||||
<?php
|
||||
foreach($this->lists as $v)
|
||||
{?>
|
||||
<?php if(count($v['list'])>0) {?>
|
||||
|
||||
<h4 class="box-title"><a href="<?= $v['url'] ?>"><?= $v['title'] ?></a></h4>
|
||||
<ol >
|
||||
<?php foreach($v['list'] as $arc){?>
|
||||
<li><a href="<?= $arc['url']?>"><?= $arc['title'] ?></a><small>[<?php echo date("Y-m-d",strtotime( $arc['ts_published'] )); ?>]</small></li>
|
||||
<?php }?>
|
||||
|
||||
<?php } }?>
|
||||
</ol>
|
||||
</ol>
|
||||
<?php } }?>
|
||||
</div>
|
||||
<div class="pagenavi">
|
||||
<?= $this->paginator; ?>
|
||||
|
|
|
@ -5,17 +5,15 @@
|
|||
?>
|
||||
<div class="row">
|
||||
<div class="span12" style=" border-bottom:1px dashed #E0E0E0">
|
||||
<form method="get" action="/search" id="search" class="form-search">
|
||||
<a class="btn" href="/data/browse"><i class="icon-align-justify"></i>数据列表浏览</a>
|
||||
<a class="btn" href="/data/thumb"><i class="icon-th"></i>缩略图浏览</a>
|
||||
<a class="btn" href="/data/timeline"><i class="icon-calendar"></i>时间轴浏览</a>
|
||||
<a class="btn" href="/data/map"><i class="icon-globe"></i>空间浏览</a>
|
||||
<a class="btn" href="/data/timemap"><i class="icon-film"></i>时空浏览</a>
|
||||
<a class="btn" href="/data/onlinelist"><i class="icon-th"></i>在线数据清单</a>
|
||||
<a class="btn" href="/data/offlinelist"><i class="icon-th"></i>离线数据清单</a>
|
||||
<a class="btn" href="/data/visual"><i class="icon-th"></i>可视化数据</a>
|
||||
<li class="input-append">
|
||||
<input type="text" value="" id="q" name="q" class="span2 search-query " placeholder="全文搜索">
|
||||
<button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
|
||||
</li>
|
||||
</form>
|
||||
<a class="btn" href="/search/advance"><i class="icon-search"></i>高级搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -59,18 +57,18 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<h4>数据最近更新<a href="/service/feed" target="_blank"><i class="icon-rss"></i></a></h4>
|
||||
<h4>数据最近更新 <a href="/service/feed" target="_blank"><i class="icon-rss"></i></a></h4>
|
||||
<ul class="unstyled">
|
||||
<?php foreach($this->metadata as $md) : ?>
|
||||
<li><i class="icon-map-marker"></i><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> [<?= date('Y-m-d',strtotime($md['ts_created'])) ?>]</li>
|
||||
<li><a href="/data/<?php echo $md['uuid'];?>"><i class="icon-map-marker"> </i><?php echo $this->escape($md['title']);?></a><small class="pull-right">[<?= date('Y-m-d',strtotime($md['ts_created'])) ?>]</small></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span6">
|
||||
<h4>最多浏览数据集</h4>
|
||||
<h4>最多浏览数据集 </h4>
|
||||
<ul class="unstyled">
|
||||
<?php foreach($this->viewedmd as $md) : ?>
|
||||
<li><i class="icon-map-marker"></i><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>[<?= $md['viewed'] ?>]</li>
|
||||
<li><a href="/data/<?php echo $md['uuid'];?>"><i class="icon-map-marker"> </i><?php echo $this->escape($md['title']);?></a><small> [<?= $md['viewed'] ?>]</small></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -3,23 +3,19 @@ $this->headTitle($this->config->title->site);
|
|||
$this->headTitle($this->config->title->data);
|
||||
$this->headTitle("空间浏览");
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->theme->AppendPlus($this,'jquery_ui');
|
||||
//$this->theme->AppendPlus($this,'google_map_v3');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
|
||||
$this->theme->AppendPlus($this,'tianditu');
|
||||
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
||||
?>
|
||||
<style type="text/css">
|
||||
#data_canvas .well {background:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<?= $this->render('breadcrumbs.phtml'); ?>
|
||||
<?= $this->partial('data/tools.phtml'); ?>
|
||||
<div class="row-fluid">
|
||||
<form class="form-search pull-right">
|
||||
<div class="input-append">
|
||||
<input type="text" class="span8 search-query" id="keyword">
|
||||
<button type="button" class="btn" onclick="mapmethods.action(map,1);">Search</button>
|
||||
<input type="text" class="span8 search-query" id="keyword" placeholder="关键词">
|
||||
<button type="button" class="btn" onclick="mapmethods.action(map,1);">搜索</button>
|
||||
</div>
|
||||
</form>
|
||||
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
|
||||
|
@ -43,103 +39,59 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
|||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" >
|
||||
$(function() {
|
||||
var bounds = null;
|
||||
var rect = null;
|
||||
var map,zoom=6,rectTool;
|
||||
var input = {east:'#east',west:'#west',north:'#north',south:'#south'};
|
||||
|
||||
});
|
||||
function loadScript() {
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
|
||||
'callback=initialize';
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
window.onload = loadScript;
|
||||
|
||||
// Google Map Part
|
||||
var map = null;
|
||||
var mapElementID = "map_canvas";
|
||||
var rectangle = null;
|
||||
var markers = [];
|
||||
|
||||
function initialize() {
|
||||
//加载地图
|
||||
var myLatlng = new google.maps.LatLng(35.656456,105.819946);
|
||||
var myOptions = {
|
||||
zoom: 3,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById(mapElementID), myOptions);
|
||||
|
||||
//methods.trigger('tilesloaded',map);
|
||||
mapmethods.trigger('dragend',map);
|
||||
mapmethods.trigger('zoom_changed',map);
|
||||
}
|
||||
|
||||
function RemoveRectangle(){
|
||||
if(rectangle != null)
|
||||
{
|
||||
rectangle.setMap(null);
|
||||
rectangle = null;
|
||||
}
|
||||
if (markers) {
|
||||
for (i in markers) {
|
||||
markers[i].setMap(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
//加载地图
|
||||
var myLatlng = new TLngLat(100,38);
|
||||
var config = { projection: "EPSG:4326"}
|
||||
map = new TMap("map_canvas",config);
|
||||
map.centerAndZoom(myLatlng,zoom);
|
||||
map.enableHandleMouseScroll();
|
||||
var config = {
|
||||
type:"TMAP_NAVIGATION_CONTROL_LARGE", //缩放平移的显示类型
|
||||
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
|
||||
offset:[0,0], //缩放平移控件的偏移值
|
||||
showZoomInfo:true //是否显示级别提示信息,true表示显示,false表示隐藏。
|
||||
};
|
||||
//创建缩放平移控件对象
|
||||
var control=new TNavigationControl(config);
|
||||
//添加缩放平移控件
|
||||
map.addControl(control);
|
||||
control = new TMapTypeControl();
|
||||
//将地图类型控件添加到地图上
|
||||
map.addControl(control);
|
||||
|
||||
function setRectangle(east,west,south,north){
|
||||
|
||||
map.clearOverLays();
|
||||
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
||||
RemoveRectangle();
|
||||
|
||||
bounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng(south,west),
|
||||
new google.maps.LatLng(north,east)
|
||||
);
|
||||
|
||||
rectangle = new google.maps.Rectangle({
|
||||
bounds: bounds,
|
||||
editable: false
|
||||
});
|
||||
|
||||
rectangle.setMap(map);
|
||||
var p1=new TLngLat(west,south);
|
||||
var p2=new TLngLat(west,north);
|
||||
var p3=new TLngLat(east,south);
|
||||
var p4=new TLngLat(east,north);
|
||||
map.setViewport(new Array(p1,p2,p3,p4));
|
||||
var bounds = new TBounds(west,south,east,north);
|
||||
var rect = new TRect(bounds);
|
||||
map.addOverLay(rect);
|
||||
}else{
|
||||
RemoveRectangle();
|
||||
|
||||
var position = new google.maps.LatLng(south,east);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: position,
|
||||
map: map,
|
||||
});
|
||||
|
||||
markers.push(marker);
|
||||
var marker=new TMarker(new TLngLat(east,south));
|
||||
map.addOverLay(marker);
|
||||
map.centerAndZoom(new TLngLat(east,south),zoom);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
var mapmethods = {
|
||||
trigger : function(triggername,map){
|
||||
google.maps.event.addListener(map, triggername,function(){
|
||||
range = mapmethods.action(map);
|
||||
//console.log(range);
|
||||
//mapmethods.ajax(range,0);
|
||||
});
|
||||
},
|
||||
getbounds : function(map){
|
||||
bounds = map.getBounds();
|
||||
point1 = bounds.getNorthEast();
|
||||
point2 = bounds.getSouthWest();
|
||||
latlng = new Array();
|
||||
latlng['east'] = point1.lng().toFixed(2);
|
||||
latlng['north'] = point1.lat().toFixed(2);
|
||||
latlng['west'] = point2.lng().toFixed(2);
|
||||
latlng['south'] = point2.lat().toFixed(2);
|
||||
latlng['east'] = point1.getLng().toFixed(2);
|
||||
latlng['north'] = point1.getLat().toFixed(2);
|
||||
latlng['west'] = point2.getLng().toFixed(2);
|
||||
latlng['south'] = point2.getLat().toFixed(2);
|
||||
return latlng;
|
||||
},
|
||||
action : function(map,ajax){
|
||||
|
|
|
@ -3,7 +3,6 @@ $this->headTitle($this->config->title->site);
|
|||
$this->headTitle($this->config->title->data);
|
||||
if (!empty($this->codename)) $this->headTitle($this->codename);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
||||
$this->nav[] = array('link'=>"/data/tag",'title'=>'关键词浏览');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
|
@ -12,7 +11,7 @@ $this->theme->AppendPlus($this,'colorbox');
|
|||
</div>
|
||||
<?php if (!empty($this->metadata)) : ?>
|
||||
<div id='metacontent'>
|
||||
<h1>当前浏览:<?php echo $this->codename; ?></h1>
|
||||
<h3>当前浏览:<?php echo $this->codename; ?></h3>
|
||||
<?php echo $this->page->getNavigation(); ?>
|
||||
<div class="box">
|
||||
|
||||
|
@ -51,10 +50,10 @@ foreach($this->keywords as $cg) :
|
|||
$type=$cg['keytype'];
|
||||
?>
|
||||
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
|
||||
<ul>
|
||||
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<ul class="inline">
|
||||
<li><i class="icon-tag"></i><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<?php else : ?>
|
||||
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<li><i class="icon-tag"></i><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
<li><a href="/data/series"><i class="icon-th-list"></i>序列浏览</a></li>
|
||||
<li><a href="/data/category"><i class="icon-th"></i>分类浏览</a></li>
|
||||
<li><a href="/data/timeline"><i class="icon-tasks"></i>时间轴浏览</a></li>
|
||||
<!-- <li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li> -->
|
||||
<li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li>
|
||||
<li><a href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li>
|
||||
<li><a href="/data/browse"><i class="icon-align-justify"></i>全部浏览</a></li>
|
||||
<!-- <li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li> -->
|
||||
<li><a href="/data/visual"><i class="icon-align-justify"></i>可视化数据</a></li>
|
||||
<li><a href="/search/advance"><i class="icon-search"></i>高级搜索</a></li>
|
||||
</ul>
|
|
@ -7,14 +7,6 @@
|
|||
</div>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
!function ($) {
|
||||
$(function(){
|
||||
// carousel demo
|
||||
$('#myCarousel').carousel()
|
||||
})
|
||||
}(window.jQuery)
|
||||
</script>
|
||||
<script>setPage();</script>
|
||||
<?php if(!empty($this->pageID)) {?>
|
||||
<script>$('#Nav-<?= $this->pageID?>').addClass("active");</script>
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<ul>
|
||||
<?php foreach($this->list_news as $k=>$v){ ?>
|
||||
<li>
|
||||
[<?= date('Y-m-d',strtotime($v['ts_created'])) ?>]<a href="<?= $v['url'] ?>" title="<?= $v['title'] ?>"><i class=" icon-ok-sign"> </i><?= $v['title'] ?></a>
|
||||
[<?= date('Y-m-d',strtotime($v['ts_published'])) ?>]<a href="<?= $v['url'] ?>" title="<?= $v['title'] ?>"><i class=" icon-ok-sign"> </i><?= $v['title'] ?></a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
|
||||
|
@ -117,3 +117,11 @@
|
|||
</div>
|
||||
|
||||
<!-- /.container -->
|
||||
<script>
|
||||
!function ($) {
|
||||
$(function(){
|
||||
// carousel demo
|
||||
$('#myCarousel').carousel()
|
||||
})
|
||||
}(window.jQuery)
|
||||
</script>
|
|
@ -2,185 +2,115 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->data);
|
||||
$this->headTitle('高级搜索');
|
||||
if (!empty($this->codename)) $this->headTitle($this->codename);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||
$this->breadcrumb('高级搜索');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,'google_map_v3');
|
||||
$this->theme->AppendPlus($this,'google_map_keydragzone');
|
||||
$this->theme->AppendPlus($this,'tianditu');
|
||||
$this->theme->AppendPlus($this,'jquery_ui');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
<div>
|
||||
<?= $this->partial('data/tools.phtml'); ?>
|
||||
</div>
|
||||
<?php if (!empty($this->metadata)) :
|
||||
echo $this->page->getNavigation();?>
|
||||
<hr />
|
||||
|
||||
<?php
|
||||
foreach($this->metadata as $md) : ?>
|
||||
<div class="mditem">
|
||||
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
||||
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
|
||||
</h2>
|
||||
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php echo $this->page->getNavigation();?>
|
||||
<?php else: ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="span8" id="map_canvas" style="height:500px;"></div>
|
||||
<div class="span4">
|
||||
<form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
|
||||
<fieldset><legend>时间范围</legend>
|
||||
<label>
|
||||
开始时间
|
||||
<input name="begin" type="text" id="begin" value="<?php echo $this->begin; ?>"/>
|
||||
</label>
|
||||
<label>
|
||||
结束时间
|
||||
<input name="end" type="text" id="end" value="<?php echo $this->end; ?>" />
|
||||
</label>
|
||||
</fieldset>
|
||||
<fieldset><legend>空间范围(按住shift键,在地图上拉框)</legend>
|
||||
<label>东
|
||||
<input name="east" id="east" type="text" value="<?php echo $this->east; ?>"/></label>
|
||||
<label>南
|
||||
<input name="south" id="south" type="text" value="<?php echo $this->south; ?>" /></label>
|
||||
<label>西
|
||||
<input name="west" id="west" type="text" value="<?php echo $this->west; ?>" /></label>
|
||||
<label>北
|
||||
<input name="north" id="north" type="text" value="<?php echo $this->north; ?>" /></label>
|
||||
</fieldset>
|
||||
<label>关键词
|
||||
<input name="q" id="q" type="text" value="<?php echo $this->q; ?>"/></label>
|
||||
<button id="search" class="btn btn-large btn-block btn-primary" type="submit" value="" onclick="dosubmit()" ><i class="icon-search"></i>搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="span8" id="map_canvas" style="height:500px;"></div>
|
||||
<div class="span4">
|
||||
<form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
|
||||
<fieldset><legend>时间范围</legend>
|
||||
<label>开始时间<input name="begin" type="text" id="begin" value="<?php echo $this->begin; ?>"/></label>
|
||||
<label>结束时间<input name="end" type="text" id="end" value="<?php echo $this->end; ?>" /></label>
|
||||
</fieldset>
|
||||
<fieldset><legend>空间范围</legend>
|
||||
<label>东<input name="east" id="east" type="text" value="<?php echo $this->east; ?>"/></label>
|
||||
<label>南<input name="south" id="south" type="text" value="<?php echo $this->south; ?>" /></label>
|
||||
<label>西<input name="west" id="west" type="text" value="<?php echo $this->west; ?>" /></label>
|
||||
<label>北<input name="north" id="north" type="text" value="<?php echo $this->north; ?>" /></label>
|
||||
</fieldset>
|
||||
<label>关键词<input name="q" id="q" type="text" value="<?php echo $this->q; ?>"/></label>
|
||||
<button id="search" class="btn btn-large btn-block btn-primary" type="submit" value="" onclick="dosubmit()" ><i class="icon-search"></i>搜索</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//Google map (不启用预先加载)
|
||||
google.maps.event.addDomListener(window, 'load', initialize);
|
||||
//jquery ui datepicker
|
||||
$("#begin").datepicker({dateFormat:"yy-mm-dd"});
|
||||
$("#end").datepicker({dateFormat:"yy-mm-dd"});
|
||||
//jquery ui datepicker
|
||||
$("#begin").datepicker({dateFormat:"yy-mm-dd"});
|
||||
$("#end").datepicker({dateFormat:"yy-mm-dd"});
|
||||
});
|
||||
// Google Map Part
|
||||
var map = null;
|
||||
var mapElementID = "map_canvas";
|
||||
var bounds = null;
|
||||
var rectangle = null;
|
||||
var rect = null;
|
||||
var map,zoom=6,rectTool;
|
||||
var input = {east:'#east',west:'#west',north:'#north',south:'#south'};
|
||||
|
||||
function initialize() {
|
||||
//加载地图
|
||||
var myLatlng = new google.maps.LatLng(35.656456,105.819946);
|
||||
var myOptions = {
|
||||
zoom: 3,
|
||||
center: myLatlng,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
}
|
||||
map = new google.maps.Map(document.getElementById(mapElementID), myOptions);
|
||||
//加载地图
|
||||
var myLatlng = new TLngLat(97,38);
|
||||
map = new TMap("map_canvas");
|
||||
map.centerAndZoom(myLatlng,zoom);
|
||||
map.enableHandleMouseScroll();
|
||||
var config = {
|
||||
type:"TMAP_NAVIGATION_CONTROL_LARGE", //缩放平移的显示类型
|
||||
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
|
||||
offset:[0,0], //缩放平移控件的偏移值
|
||||
showZoomInfo:true //是否显示级别提示信息,true表示显示,false表示隐藏。
|
||||
};
|
||||
//创建缩放平移控件对象
|
||||
var control=new TNavigationControl(config);
|
||||
//添加缩放平移控件
|
||||
map.addControl(control);
|
||||
control = new TMapTypeControl();
|
||||
//将地图类型控件添加到地图上
|
||||
map.addControl(control);
|
||||
|
||||
//Keydragzone
|
||||
map.enableKeyDragZoom({
|
||||
key: "shift",
|
||||
boxStyle: {
|
||||
border: "1px dashed black",
|
||||
backgroundColor: "transparent",
|
||||
opacity: 1.0
|
||||
},
|
||||
veilStyle: {
|
||||
backgroundColor: "white",
|
||||
opacity: 0.35,
|
||||
cursor: "crosshair"
|
||||
}
|
||||
});
|
||||
var config = {
|
||||
strokeColor:"#000000", //折线颜色
|
||||
fillColor:"#FFFFFF", //填充颜色。当参数为空时,折线覆盖物将没有填充效果
|
||||
strokeWeight:"2px", //折线的宽度,以像素为单位
|
||||
opacity:0.5, //折线的透明度,取值范围0 - 1
|
||||
strokeStyle:"dashed" //折线的样式,solid或dashed
|
||||
};
|
||||
//创建矩形工具对象
|
||||
rectTool = new TRectTool(map,config);
|
||||
//注册矩形工具绘制完成后的事件
|
||||
TEvent.addListener(rectTool,"draw",onDrawRect);
|
||||
rectTool.open();
|
||||
|
||||
var dz = map.getDragZoomObject();
|
||||
google.maps.event.addListener(dz, 'dragstart', function (latlng) {
|
||||
RemoveRectangle();
|
||||
//console.dir(latlng);
|
||||
});
|
||||
google.maps.event.addListener(dz, 'dragend', function (latlng) {
|
||||
console.log(latlng);
|
||||
MapValueChange(latlng.fa.d,latlng.$.d,latlng.fa.b,latlng.$.b);
|
||||
setRectangle(latlng.fa.d,latlng.fa.b,latlng.$.b,latlng.$.d);
|
||||
//console.dir(latlng);
|
||||
});
|
||||
|
||||
InputValueChange();
|
||||
|
||||
}
|
||||
|
||||
function setRectangle(east,west,south,north){
|
||||
|
||||
bounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng(south,west),
|
||||
new google.maps.LatLng(north,east)
|
||||
);
|
||||
|
||||
rectangle = new google.maps.Rectangle({
|
||||
bounds: bounds,
|
||||
editable: true
|
||||
});
|
||||
|
||||
rectangle.setMap(map);
|
||||
|
||||
google.maps.event.addListener(rectangle, 'bounds_changed', function () {
|
||||
var latlng = rectangle.getBounds();
|
||||
MapValueChange(latlng.fa.d,latlng.Z.d,latlng.fa.b,latlng.Z.b);
|
||||
//console.dir(latlng);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function RemoveRectangle(){
|
||||
if(rectangle != null)
|
||||
{
|
||||
rectangle.setMap(null);
|
||||
rectangle = null;
|
||||
}
|
||||
}
|
||||
|
||||
function MapValueChange(east,north,west,south){
|
||||
$(input.east).val(east);
|
||||
$(input.north).val(north);
|
||||
$(input.west).val(west);
|
||||
$(input.south).val(south);
|
||||
function onDrawRect(bounds)
|
||||
{
|
||||
map.clearOverLays();
|
||||
rect = new TRect(bounds);
|
||||
$(input.east).val(bounds.getNorthEast().getLng());
|
||||
$(input.north).val(bounds.getNorthEast().getLat());
|
||||
$(input.west).val(bounds.getSouthWest().getLng());
|
||||
$(input.south).val(bounds.getSouthWest().getLat());
|
||||
map.addOverLay(rect);
|
||||
//关闭矩形工具体
|
||||
//rectTool.close();
|
||||
}
|
||||
|
||||
function InputValueChange(){
|
||||
if(MapInputValueCheck() == true)
|
||||
{
|
||||
if(rectangle == null)
|
||||
{
|
||||
setRectangle($(input.east).val(),$(input.west).val(),$(input.south).val(),$(input.north).val());
|
||||
}else{
|
||||
var reSetBounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng($(input.south).val(),$(input.west).val()),
|
||||
new google.maps.LatLng($(input.north).val(),$(input.east).val())
|
||||
);
|
||||
rectangle.setBounds(reSetBounds);
|
||||
}
|
||||
}
|
||||
if(MapInputValueCheck() == true)
|
||||
{
|
||||
map.clearOverLays();
|
||||
rect = new TRect(new TBounds($(input.west).val(),$(input.south).val(),$(input.east).val(),$(input.north).val()));
|
||||
map.addOverLay(rect);
|
||||
var p1=new TLngLat($(input.west).val(),$(input.south).val());
|
||||
var p2=new TLngLat($(input.west).val(),$(input.north).val());
|
||||
var p3=new TLngLat($(input.east).val(),$(input.north).val());
|
||||
var p4=new TLngLat($(input.east).val(),$(input.south).val());
|
||||
map.setViewport(new Array(p1,p2,p3,p4));
|
||||
}
|
||||
}
|
||||
|
||||
function MapInputValueCheck()
|
||||
{
|
||||
if($(input.east).val() != "" && $(input.west).val() != "" && $(input.north).val() != "" && $(input.south).val() != "")
|
||||
{
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
if($(input.east).val() != "" && $(input.west).val() != "" && $(input.north).val() != "" && $(input.south).val() != "")
|
||||
{
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$(input.east).bind('blur',InputValueChange);
|
||||
|
@ -188,25 +118,7 @@ $(input.west).bind('blur',InputValueChange);
|
|||
$(input.north).bind('blur',InputValueChange);
|
||||
$(input.south).bind('blur',InputValueChange);
|
||||
|
||||
// Google map Part --End
|
||||
|
||||
|
||||
function Alert(content){
|
||||
$.colorbox({innerWidth:'40%',html:'<div style="line-height:30px;font-size:16px;">'+ content +'</div>'});
|
||||
}
|
||||
|
||||
function dosubmit() {
|
||||
theForm.action="/search";
|
||||
theForm.action="/search";
|
||||
}
|
||||
</script>
|
||||
<div id="help">
|
||||
<fieldset><legend>搜索说明</legend><ul><li>关键词:您可以使用一个关键词,比如“沙漠”,也可以使用多个关键词,中间用空格分开。</li>
|
||||
<li>空间范围:这是以度为单位的十进制数字。比如,东经125度30分,可以输入为125.5。您也可以通过下面的在线地图工具直接在图上拉框选择一个范围,空间坐标会自动转换到文本框中。</li>
|
||||
<li>时间范围:指数据的时间范围,从开始时间到结束时间。开始时间与结束时间可以为空,若仅填写开始时间,则含义为选择大于开始时间的数据。若仅填写结束时间,则含义为选择小于结束时间的数据。时间格式为YYYY-MM-DD。</li>
|
||||
<li>还不清楚?您可以到<a href="http://forum.westgis.ac.cn/viewforum.php?f=30">论坛</a>提问。</li>
|
||||
</ul></fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
|
@ -29,12 +29,11 @@
|
|||
<?= $this->headStyle() ?>
|
||||
<link rel="shortcut icon" href="/favicon_64.png" />
|
||||
<link rel="alternate" type="application/rss+xml" title="WestDC RSS Feed" href="/service/feed" />
|
||||
<link rel="pingback" href="http://westdc.westgis.ac.cn/data/pingback" />
|
||||
<link rel="pingback" href="http://www.sanjiangyuan.org.cn/service/pingback" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?= $this->render('header.phtml') ?>
|
||||
<!--<div class="breadcrumb"><?= $this->breadcrumb() ?> </div>-->
|
||||
<?= $this->layout()->content ?>
|
||||
<?= $this->render('footer.phtml') ?>
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ class MetadataPDF extends PDF_Unicode
|
|||
function DrawTitlePage()
|
||||
{
|
||||
$this->AddPage();
|
||||
$this->Image('http://westdc.westgis.ac.cn/images/westdc_logo_white.gif',80,30,0,0,'','http://westdc.westgis.ac.cn/');
|
||||
$this->Image('http://www.sanjiangyuan.org.cn/images/logo.png',80,30,0,0,'','http://www.sanjiangyuan.org.cn/');
|
||||
$this->SetFont('uGB','B',20);
|
||||
$this->setXY(0,70);
|
||||
$this->Cell(0,0,'寒区旱区科学数据中心',0,2,'C',false,'http://westdc.westgis.ac.cn/');
|
||||
$this->Cell(0,0,'三江源生态监测综合服务平台',0,2,'C',false,'http://'.$_SERVER['SERVER_NAME']);
|
||||
$imgurl='http://'.$_SERVER['SERVER_NAME'].'/service/bigthumb/uuid/'.$this->metadata['uuid'];
|
||||
$imgsize=getimagesize($imgurl);
|
||||
if ($this->metadata['filetype'] && $imgsize)
|
||||
|
@ -44,7 +44,7 @@ class MetadataPDF extends PDF_Unicode
|
|||
//$this->setFont('Arial','',12);
|
||||
$this->ln(10);
|
||||
$this->SetFont('uGB','B',12);
|
||||
$this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://westdc.westgis.ac.cn/data/'.$this->metadata['uuid']);
|
||||
$this->Cell(0,0,'UUID: '.$this->metadata['uuid'],0,2,'C',false,'http://'.$_SERVER['SERVER_NAME'].'/data/'.$this->metadata['uuid']);
|
||||
}
|
||||
|
||||
function DrawContent()
|
||||
|
|
|
@ -4,11 +4,13 @@ class Metadata
|
|||
private $db; //传入PDO对象.
|
||||
|
||||
//使用到的公共变量
|
||||
public $tbl_metadata = "metadata";
|
||||
public $tbl_metadata;
|
||||
|
||||
function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
$config = \Zend_Registry::get('config');
|
||||
$this->tbl_metadata=$config->sub->metadata;
|
||||
}
|
||||
|
||||
function view($uuid)
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
<xsl:param name="fund" select="defaultstring"/>
|
||||
<xsl:template match="/">
|
||||
<img>
|
||||
<xsl:attribute name="src">http://westdc.westgis.ac.cn/images/westdc-logo-1.png</xsl:attribute>
|
||||
<xsl:attribute name="src">http://www.sanjiangyuan.org.cn/images/logo.png</xsl:attribute>
|
||||
</img>
|
||||
<div id="uuid" style="color:red"><u>
|
||||
<xsl:variable name="uuid" select="//Metadata/mdFileID"/>
|
||||
<a href="http://westdc.westgis.ac.cn/data/{$uuid}">
|
||||
<a href="http://www.sanjiangyuan.org.cn/data/{$uuid}">
|
||||
本数据地址:<xsl:value-of select="//Metadata/mdFileID"/>
|
||||
</a>
|
||||
</u></div>
|
||||
|
@ -159,7 +159,7 @@
|
|||
<div style="text-align:center;">
|
||||
<xsl:for-each select="//Metadata/dataIdInfo/graphOver">
|
||||
|
||||
<xsl:variable name="imgurl" select="concat('http://westdc.westgis.ac.cn/gndata/',$thumburl,'/public/',bgFileName)"/>
|
||||
<xsl:variable name="imgurl" select="concat('http://www.sanjiangyuan.org.cn/gndata/',$thumburl,'/public/',bgFileName)"/>
|
||||
<xsl:if test="bgFileDesc='large_thumbnail'">
|
||||
<img width="600" class="figure" align="center">
|
||||
<xsl:attribute name="src">
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue