merge heihedata branch r4760 - r4881 into trunk
This commit is contained in:
parent
4124558c66
commit
23dc7213e3
|
@ -3,10 +3,7 @@ $this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->data);
|
$this->headTitle($this->config->title->data);
|
||||||
$this->headTitle("空间浏览");
|
$this->headTitle("空间浏览");
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->theme->AppendPlus($this,'jquery_ui');
|
$this->theme->AppendPlus($this,'tianditu');
|
||||||
//$this->theme->AppendPlus($this,'google_map_v3');
|
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
|
||||||
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
|
|
||||||
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
||||||
?>
|
?>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
@ -18,8 +15,8 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<form class="form-search pull-right">
|
<form class="form-search pull-right">
|
||||||
<div class="input-append">
|
<div class="input-append">
|
||||||
<input type="text" class="span8 search-query" id="keyword">
|
<input type="text" class="span8 search-query" id="keyword" placeholder="关键词">
|
||||||
<button type="button" class="btn" onclick="mapmethods.action(map,1);">Search</button>
|
<button type="button" class="btn" onclick="mapmethods.action(map,1);">搜索</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
|
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
|
||||||
|
@ -43,103 +40,59 @@ $this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" >
|
<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 myLatlng = new TLngLat(100,38);
|
||||||
var script = document.createElement('script');
|
var config = { projection: "EPSG:4326"}
|
||||||
script.type = 'text/javascript';
|
map = new TMap("map_canvas",config);
|
||||||
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
|
map.centerAndZoom(myLatlng,zoom);
|
||||||
'callback=initialize';
|
map.enableHandleMouseScroll();
|
||||||
document.body.appendChild(script);
|
var config = {
|
||||||
}
|
type:"TMAP_NAVIGATION_CONTROL_LARGE", //缩放平移的显示类型
|
||||||
|
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
|
||||||
window.onload = loadScript;
|
offset:[0,0], //缩放平移控件的偏移值
|
||||||
|
showZoomInfo:true //是否显示级别提示信息,true表示显示,false表示隐藏。
|
||||||
// Google Map Part
|
};
|
||||||
var map = null;
|
//创建缩放平移控件对象
|
||||||
var mapElementID = "map_canvas";
|
var control=new TNavigationControl(config);
|
||||||
var rectangle = null;
|
//添加缩放平移控件
|
||||||
var markers = [];
|
map.addControl(control);
|
||||||
|
control = new TMapTypeControl();
|
||||||
function initialize() {
|
//将地图类型控件添加到地图上
|
||||||
//加载地图
|
map.addControl(control);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function setRectangle(east,west,south,north){
|
function setRectangle(east,west,south,north){
|
||||||
|
map.clearOverLays();
|
||||||
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
||||||
RemoveRectangle();
|
var p1=new TLngLat(west,south);
|
||||||
|
var p2=new TLngLat(west,north);
|
||||||
bounds = new google.maps.LatLngBounds(
|
var p3=new TLngLat(east,south);
|
||||||
new google.maps.LatLng(south,west),
|
var p4=new TLngLat(east,north);
|
||||||
new google.maps.LatLng(north,east)
|
map.setViewport(new Array(p1,p2,p3,p4));
|
||||||
);
|
var bounds = new TBounds(west,south,east,north);
|
||||||
|
var rect = new TRect(bounds);
|
||||||
rectangle = new google.maps.Rectangle({
|
map.addOverLay(rect);
|
||||||
bounds: bounds,
|
|
||||||
editable: false
|
|
||||||
});
|
|
||||||
|
|
||||||
rectangle.setMap(map);
|
|
||||||
}else{
|
}else{
|
||||||
RemoveRectangle();
|
var marker=new TMarker(new TLngLat(east,south));
|
||||||
|
map.addOverLay(marker);
|
||||||
var position = new google.maps.LatLng(south,east);
|
map.centerAndZoom(new TLngLat(east,south),zoom);
|
||||||
|
}
|
||||||
var marker = new google.maps.Marker({
|
|
||||||
position: position,
|
|
||||||
map: map,
|
|
||||||
});
|
|
||||||
|
|
||||||
markers.push(marker);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var mapmethods = {
|
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){
|
getbounds : function(map){
|
||||||
bounds = map.getBounds();
|
bounds = map.getBounds();
|
||||||
point1 = bounds.getNorthEast();
|
point1 = bounds.getNorthEast();
|
||||||
point2 = bounds.getSouthWest();
|
point2 = bounds.getSouthWest();
|
||||||
latlng = new Array();
|
latlng = new Array();
|
||||||
latlng['east'] = point1.lng().toFixed(2);
|
latlng['east'] = point1.getLng().toFixed(2);
|
||||||
latlng['north'] = point1.lat().toFixed(2);
|
latlng['north'] = point1.getLat().toFixed(2);
|
||||||
latlng['west'] = point2.lng().toFixed(2);
|
latlng['west'] = point2.getLng().toFixed(2);
|
||||||
latlng['south'] = point2.lat().toFixed(2);
|
latlng['south'] = point2.getLat().toFixed(2);
|
||||||
return latlng;
|
return latlng;
|
||||||
},
|
},
|
||||||
action : function(map,ajax){
|
action : function(map,ajax){
|
||||||
|
|
|
@ -126,7 +126,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ol>
|
</ol>
|
||||||
<?php endif; ?>
|
<?php endif; endif;?>
|
||||||
<hr />
|
<hr />
|
||||||
<h4><i class="icon-legal text-warning"></i>数据使用声明</h4>
|
<h4><i class="icon-legal text-warning"></i>数据使用声明</h4>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -2,185 +2,115 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->data);
|
$this->headTitle($this->config->title->data);
|
||||||
$this->headTitle('高级搜索');
|
$this->headTitle('高级搜索');
|
||||||
if (!empty($this->codename)) $this->headTitle($this->codename);
|
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||||
$this->breadcrumb('高级搜索');
|
$this->breadcrumb('高级搜索');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
$this->theme->AppendPlus($this,'google_map_v3');
|
$this->theme->AppendPlus($this,'tianditu');
|
||||||
$this->theme->AppendPlus($this,'google_map_keydragzone');
|
|
||||||
$this->theme->AppendPlus($this,'jquery_ui');
|
$this->theme->AppendPlus($this,'jquery_ui');
|
||||||
$this->theme->AppendPlus($this,'colorbox');
|
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
<?= $this->partial('data/tools.phtml'); ?>
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
</div>
|
</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="row">
|
||||||
<div class="span8" id="map_canvas" style="height:500px;"></div>
|
<div class="span8" id="map_canvas" style="height:500px;"></div>
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
|
<form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
|
||||||
<fieldset><legend>时间范围</legend>
|
<fieldset><legend>时间范围</legend>
|
||||||
<label>
|
<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>
|
||||||
<input name="begin" type="text" id="begin" value="<?php echo $this->begin; ?>"/>
|
</fieldset>
|
||||||
</label>
|
<fieldset><legend>空间范围</legend>
|
||||||
<label>
|
<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>
|
||||||
<input name="end" type="text" id="end" value="<?php echo $this->end; ?>" />
|
<label>西<input name="west" id="west" type="text" value="<?php echo $this->west; ?>" /></label>
|
||||||
</label>
|
<label>北<input name="north" id="north" type="text" value="<?php echo $this->north; ?>" /></label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset><legend>空间范围(按住shift键,在地图上拉框)</legend>
|
<label>关键词<input name="q" id="q" type="text" value="<?php echo $this->q; ?>"/></label>
|
||||||
<label>东
|
<button id="search" class="btn btn-large btn-block btn-primary" type="submit" value="" onclick="dosubmit()" ><i class="icon-search"></i>搜索</button>
|
||||||
<input name="east" id="east" type="text" value="<?php echo $this->east; ?>"/></label>
|
</form>
|
||||||
<label>南
|
</div>
|
||||||
<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>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
//Google map (不启用预先加载)
|
//jquery ui datepicker
|
||||||
google.maps.event.addDomListener(window, 'load', initialize);
|
$("#begin").datepicker({dateFormat:"yy-mm-dd"});
|
||||||
//jquery ui datepicker
|
$("#end").datepicker({dateFormat:"yy-mm-dd"});
|
||||||
$("#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 bounds = null;
|
||||||
var rectangle = null;
|
var rect = null;
|
||||||
|
var map,zoom=6,rectTool;
|
||||||
var input = {east:'#east',west:'#west',north:'#north',south:'#south'};
|
var input = {east:'#east',west:'#west',north:'#north',south:'#south'};
|
||||||
|
|
||||||
function initialize() {
|
//加载地图
|
||||||
//加载地图
|
var myLatlng = new TLngLat(100,38);
|
||||||
var myLatlng = new google.maps.LatLng(35.656456,105.819946);
|
var config = { projection: "EPSG:4326"}
|
||||||
var myOptions = {
|
map = new TMap("map_canvas",config);
|
||||||
zoom: 3,
|
map.centerAndZoom(myLatlng,zoom);
|
||||||
center: myLatlng,
|
map.enableHandleMouseScroll();
|
||||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
var config = {
|
||||||
}
|
type:"TMAP_NAVIGATION_CONTROL_LARGE", //缩放平移的显示类型
|
||||||
map = new google.maps.Map(document.getElementById(mapElementID), myOptions);
|
anchor:"TMAP_ANCHOR_TOP_LEFT", //缩放平移控件显示的位置
|
||||||
|
offset:[0,0], //缩放平移控件的偏移值
|
||||||
//Keydragzone
|
showZoomInfo:true //是否显示级别提示信息,true表示显示,false表示隐藏。
|
||||||
map.enableKeyDragZoom({
|
};
|
||||||
key: "shift",
|
//创建缩放平移控件对象
|
||||||
boxStyle: {
|
var control=new TNavigationControl(config);
|
||||||
border: "1px dashed black",
|
//添加缩放平移控件
|
||||||
backgroundColor: "transparent",
|
map.addControl(control);
|
||||||
opacity: 1.0
|
control = new TMapTypeControl();
|
||||||
},
|
//将地图类型控件添加到地图上
|
||||||
veilStyle: {
|
map.addControl(control);
|
||||||
backgroundColor: "white",
|
|
||||||
opacity: 0.35,
|
|
||||||
cursor: "crosshair"
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
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();
|
|
||||||
|
|
||||||
}
|
//创建矩形工具对象
|
||||||
|
rectTool = new TRectTool(map);
|
||||||
|
//注册矩形工具绘制完成后的事件
|
||||||
|
TEvent.addListener(rectTool,"draw",onDrawRect);
|
||||||
|
rectTool.open();
|
||||||
|
|
||||||
function setRectangle(east,west,south,north){
|
function onDrawRect(bounds)
|
||||||
|
{
|
||||||
bounds = new google.maps.LatLngBounds(
|
map.clearOverLays();
|
||||||
new google.maps.LatLng(south,west),
|
rect = new TRect(bounds);
|
||||||
new google.maps.LatLng(north,east)
|
$(input.east).val(bounds.getNorthEast().getLng());
|
||||||
);
|
$(input.north).val(bounds.getNorthEast().getLat());
|
||||||
|
$(input.west).val(bounds.getSouthWest().getLng());
|
||||||
rectangle = new google.maps.Rectangle({
|
$(input.south).val(bounds.getSouthWest().getLat());
|
||||||
bounds: bounds,
|
map.addOverLay(rect);
|
||||||
editable: true
|
//关闭矩形工具体
|
||||||
});
|
//rectTool.close();
|
||||||
|
|
||||||
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 InputValueChange(){
|
function InputValueChange(){
|
||||||
if(MapInputValueCheck() == true)
|
if(MapInputValueCheck() == true)
|
||||||
{
|
{
|
||||||
if(rectangle == null)
|
map.clearOverLays();
|
||||||
{
|
var p1=new TLngLat($(input.west).val(),$(input.south).val());
|
||||||
setRectangle($(input.east).val(),$(input.west).val(),$(input.south).val(),$(input.north).val());
|
var p2=new TLngLat($(input.west).val(),$(input.north).val());
|
||||||
}else{
|
var p3=new TLngLat($(input.east).val(),$(input.north).val());
|
||||||
var reSetBounds = new google.maps.LatLngBounds(
|
var p4=new TLngLat($(input.east).val(),$(input.south).val());
|
||||||
new google.maps.LatLng($(input.south).val(),$(input.west).val()),
|
map.setViewport(new Array(p1,p2,p3,p4));
|
||||||
new google.maps.LatLng($(input.north).val(),$(input.east).val())
|
|
||||||
);
|
var west=$(input.west).val();
|
||||||
rectangle.setBounds(reSetBounds);
|
var east=$(input.east).val();
|
||||||
}
|
var north=$(input.north).val();
|
||||||
}
|
var south=$(input.south).val();
|
||||||
|
var bounds = new TBounds(west,south,east,north);
|
||||||
|
rect = new TRect(bounds);
|
||||||
|
map.addOverLay(rect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function MapInputValueCheck()
|
function MapInputValueCheck()
|
||||||
{
|
{
|
||||||
if($(input.east).val() != "" && $(input.west).val() != "" && $(input.north).val() != "" && $(input.south).val() != "")
|
if($(input.east).val() != "" && $(input.west).val() != "" && $(input.north).val() != "" && $(input.south).val() != "")
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$(input.east).bind('blur',InputValueChange);
|
$(input.east).bind('blur',InputValueChange);
|
||||||
|
@ -188,25 +118,7 @@ $(input.west).bind('blur',InputValueChange);
|
||||||
$(input.north).bind('blur',InputValueChange);
|
$(input.north).bind('blur',InputValueChange);
|
||||||
$(input.south).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() {
|
function dosubmit() {
|
||||||
theForm.action="/search";
|
theForm.action="/search";
|
||||||
}
|
}
|
||||||
</script>
|
</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; ?>
|
|
|
@ -154,10 +154,14 @@ class Order
|
||||||
$uid = view::User('id');
|
$uid = view::User('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$sql = "select count(*) as cnt from dataorder where status=1 and userid=".$uid;
|
||||||
|
$row=$this->db->FetchRow($sql);
|
||||||
|
if ($row['cnt']>$this->config->download->max) return "一次申请不能大于5条数据!请移除部分数据。";
|
||||||
|
|
||||||
if($id == -1)
|
if($id == -1)
|
||||||
{
|
{
|
||||||
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$uid);
|
$sql = $this->db->quoteInto("update dataorder set status=2 where status=1 and userid=?",$uid);
|
||||||
if($this->db->exec($sql))
|
if($this->db->exec($sql))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
|
Loading…
Reference in New Issue