merge heihedata branch from r3591 to r3612.
This commit is contained in:
commit
cfc0649536
|
@ -3408,7 +3408,7 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$uuid = $this->_getParam('uuid');
|
$uuid = $this->_getParam('uuid');
|
||||||
if(empty($uuid))
|
if(empty($uuid))
|
||||||
{
|
{
|
||||||
$rows = $fund->fetch();
|
$rows = $fund->fetch(NULL,true,0,$keyword);
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
}else{
|
}else{
|
||||||
include('data/Metadata.php');
|
include('data/Metadata.php');
|
||||||
|
@ -3424,7 +3424,7 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->_helper->viewRenderer('fund-data-list');
|
$this->_helper->viewRenderer('fund-data-list');
|
||||||
$this->view->q = $q = $this->_getParam('q');
|
$this->view->q = $q = $this->_getParam('q');
|
||||||
$rows = $fund->fetchFormData(true,0,$q);
|
$rows = $fund->fetchFromData(true,0,$q);
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3435,7 +3435,7 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$this->view->q = $q = $this->_getParam('q');
|
$this->view->q = $q = $this->_getParam('q');
|
||||||
$id = $this->_getParam('id');
|
$id = $this->_getParam('id');
|
||||||
$this->view->fund = $fund->view($id);
|
$this->view->fund = $fund->view($id);
|
||||||
$rows = $fund->fetchFormData($id,0,$q);
|
$rows = $fund->fetchFromData($id,0,$q);
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,8 @@ class Admin_SysController extends Zend_Controller_Action
|
||||||
$this->view->config = Zend_Registry::get('config');
|
$this->view->config = Zend_Registry::get('config');
|
||||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->view->messages = $this->messenger->getMessages();
|
||||||
$this->_helper->layout->setLayout('administry');//新UI
|
$this->_helper->layout->setLayout('administry');//新UI
|
||||||
|
$this->view->theme = new Theme();
|
||||||
}
|
}
|
||||||
|
|
||||||
function postDispatch()
|
function postDispatch()
|
||||||
|
@ -332,6 +333,161 @@ class Admin_SysController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}//end
|
}//end
|
||||||
|
|
||||||
}//getmessageAction() 获取站内消息
|
}//getmessageAction() 获取站内消息
|
||||||
|
|
||||||
|
//ftp测试
|
||||||
|
function ftptestAction()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function recoveryAction()
|
||||||
|
{
|
||||||
|
$pages=20;
|
||||||
|
$ac=$this->_request->getParam('ac');
|
||||||
|
if ($ac=='' || $ac=='online')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
where s.status>4 and m.datatype=0 and ds.host='ftp1.westgis.ac.cn'
|
||||||
|
ORDER BY m.id DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
} else if ($ac=='heihe')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
left join datasource on datasource.uuid=m.uuid
|
||||||
|
left join source on datasource.sourceid=source.id
|
||||||
|
where s.status>4 and m.datatype=1 and ds.host='ftp1.westgis.ac.cn' and source.code='heihe'
|
||||||
|
ORDER BY m.id DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
} else if ($ac=='water')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
left join datasource on datasource.uuid=m.uuid
|
||||||
|
left join source on datasource.sourceid=source.id
|
||||||
|
where s.status>4 and m.datatype=1 and ds.host='ftp1.westgis.ac.cn' and source.code='water'
|
||||||
|
ORDER BY m.id DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
} else if ($ac=='heihe1')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
left join datasource on datasource.uuid=m.uuid
|
||||||
|
left join source on datasource.sourceid=source.id
|
||||||
|
where s.status in (2,3,4) and ds.host='ftp1.westgis.ac.cn' and source.code='heihe'
|
||||||
|
ORDER BY m.title DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
} else if ($ac=='hiwater')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
left join datasource on datasource.uuid=m.uuid
|
||||||
|
left join source on datasource.sourceid=source.id
|
||||||
|
where ds.host='ftp1.westgis.ac.cn' and source.code='hiwater'
|
||||||
|
ORDER BY m.title DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}else if ($ac=='westee')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
where ds.host='ftp1.westgis.ac.cn' and m.uuid in (select uuid from westeemd)
|
||||||
|
ORDER BY m.title DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}else if ($ac=='other')
|
||||||
|
{
|
||||||
|
$sql = "SELECT m.title,m.uuid,ds.host,ds.path,
|
||||||
|
(select floor(sum(filesize)/1024/1024*100)/100 from datafile where dsid=ds.id) as filesize,
|
||||||
|
(select count(id) from datafile where dsid=ds.id) as filecount from metadata m
|
||||||
|
LEFT JOIN mdstatus s ON m.uuid=s.uuid
|
||||||
|
LEFT JOIN dataset ds ON m.uuid=ds.uuid
|
||||||
|
where ds.host='ftp1.westgis.ac.cn' and m.uuid not in (select uuid from datasource) and m.uuid not in (select uuid from westeemd)
|
||||||
|
ORDER BY m.title DESC";
|
||||||
|
$sth = $this->db->prepare($sql);
|
||||||
|
$sth->execute();
|
||||||
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
|
$paginator = Zend_Paginator::factory($rows);
|
||||||
|
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||||
|
$paginator->setItemCountPerPage($pages);
|
||||||
|
$paginator->setView($this->view);
|
||||||
|
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||||
|
$this->view->paginator=$paginator;
|
||||||
|
}
|
||||||
|
$this->view->activeID="btn-".$ac;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<form action="/admin/down/offlineapp" method="get">
|
<form action="/admin/down/offlineapp" method="get">
|
||||||
<input name="search" value="1" type="hidden">
|
<input name="search" value="1" type="hidden">
|
||||||
<ul>
|
<ul>
|
||||||
<li><label>搜索关键字</label><input name="q" value="" type="text"></li>
|
<li><input name="q" value="" type="text" placeholder="搜索关键字"></li>
|
||||||
<li><input class="searchbtn" value="搜索" type="submit"></li>
|
<li><input class="searchbtn" value="搜索" type="submit"></li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -11,5 +11,8 @@
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<iframe src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=proftp" style="width:100%;height:700px;border:none;"></iframe>
|
<iframe id="tl" src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=proftp" style="width:100%;height:700px;border:none;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$('#tl').height($(window).height());
|
||||||
|
</script>
|
|
@ -11,5 +11,8 @@
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<iframe src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=pureftp" style="width:100%;height:700px;border:none;"></iframe>
|
<iframe id="tl" src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=pureftp" style="width:100%;height:700px;border:none;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$('#tl').height($(window).height());
|
||||||
|
</script>
|
|
@ -11,5 +11,8 @@
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<iframe src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=westdc" style="width:100%;height:700px;border:none;"></iframe>
|
<iframe id="tl" src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=westdc" style="width:100%;height:700px;border:none;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$('#tl').height($(window).height());
|
||||||
|
</script>
|
|
@ -11,5 +11,8 @@
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<iframe src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=geodata" style="width:100%;height:700px;border:none;"></iframe>
|
<iframe id="tl" src="http://westdc.westgis.ac.cn/awstats/awstats.pl?config=geodata" style="width:100%;height:700px;border:none;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$('#tl').height($(window).height());
|
||||||
|
</script>
|
|
@ -11,5 +11,8 @@
|
||||||
<?= $this->partial('stat/left.phtml'); ?>
|
<?= $this->partial('stat/left.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<iframe src="http://westdc.westgis.ac.cn/webalizer/index.html" style="width:100%;height:700px;border:none;"></iframe>
|
<iframe id="tl" src="http://westdc.westgis.ac.cn/webalizer/index.html" style="width:100%;height:700px;border:none;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
<script type="text/javascript" charset="utf-8">
|
||||||
|
$('#tl').height($(window).height());
|
||||||
|
</script>
|
|
@ -2,5 +2,7 @@
|
||||||
<li class="title">系统管理</li>
|
<li class="title">系统管理</li>
|
||||||
<li><a href="/admin/sys/emailtext">邮件模板管理</a></li>
|
<li><a href="/admin/sys/emailtext">邮件模板管理</a></li>
|
||||||
<li><a href="/admin/sys/seekspace">文献平台同步</a></li>
|
<li><a href="/admin/sys/seekspace">文献平台同步</a></li>
|
||||||
<li><a href="/admin/sys/message">管理消息</a></li>
|
<li><a href="/admin/sys/message">管理消息</a></li>
|
||||||
|
<li><a href="/admin/sys/ftptest">数据FTP测试</a></li>
|
||||||
|
<li><a href="/admin/sys/recovery">数据恢复进展</a></li>
|
||||||
</ul>
|
</ul>
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle('后台管理');
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
?>
|
||||||
|
<div id="leftPanel">
|
||||||
|
<?= $this->partial('sys/left.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="rightPanel">
|
||||||
|
<a id="btn-online" class="btn" href="/admin/sys/recovery/ac/online">在线数据</a>
|
||||||
|
<a id="btn-heihe" class="btn" href="/admin/sys/recovery/ac/heihe">黑河专题数据</a>
|
||||||
|
<a id="btn-water" class="btn" href="/admin/sys/recovery/ac/water">WATER</a>
|
||||||
|
<a id="btn-westee" class="btn" href="/admin/sys/recovery/ac/westee">西部计划</a></a>
|
||||||
|
<a id="btn-hiwater" class="btn" href="/admin/sys/recovery/ac/hiwater">Hiwater</a></a>
|
||||||
|
<a id="btn-heihe1" class="btn" href="/admin/sys/recovery/ac/heihe1">黑河计划未发布数据</a>
|
||||||
|
<a id="btn-other" class="btn" href="/admin/sys/recovery/ac/other">其他数据</a>
|
||||||
|
<table><thead><tr>
|
||||||
|
<th>数据标题</th>
|
||||||
|
<th>UUID</th>
|
||||||
|
<th>FTP主机</th>
|
||||||
|
<th>路径</th>
|
||||||
|
<th>大小</th>
|
||||||
|
<th>文件数</th>
|
||||||
|
<th>操作</th>
|
||||||
|
</tr></thead><tbody>
|
||||||
|
<?php
|
||||||
|
if (count($this->paginator)):
|
||||||
|
$autoindex=0;
|
||||||
|
foreach ($this->paginator as $item):
|
||||||
|
$autoindex++;?>
|
||||||
|
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
|
||||||
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
|
||||||
|
<td><?php echo $item['uuid'];?></td>
|
||||||
|
<td><?php echo $item['host'];?></td>
|
||||||
|
<td><?php echo $item['path'];?></td>
|
||||||
|
<td><?php echo $item['filesize'];?></td>
|
||||||
|
<td><?php echo $item['filecount'];?></td>
|
||||||
|
<td><a href="/admin/data/dataset/ac/getdataset/uuid/<?php echo $item['uuid'];?>" class="iframe">数据路径</a></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; endif; ?>
|
||||||
|
</tbody></table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
|
<?php if(!empty($this->activeID)) : ?>
|
||||||
|
<script>$('#<?= $this->activeID?>').addClass("btn-primary");</script>
|
||||||
|
<?php endif; ?>
|
||||||
|
<script>
|
||||||
|
$(".iframe").colorbox({iframe:true, width:"50%", height:"50%"});
|
||||||
|
$(".inline").colorbox({inline:true, width:"50%"});
|
||||||
|
function Alert(html){
|
||||||
|
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -709,42 +709,34 @@ class AuthorController extends Zend_Controller_Action
|
||||||
*/
|
*/
|
||||||
function applyAction()
|
function applyAction()
|
||||||
{
|
{
|
||||||
$ac = $this->_request->getParam('ac');
|
$ac = $this->_request->getParam('ac');
|
||||||
|
|
||||||
|
if($ac == "mydata")
|
||||||
|
{
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
include_once('helper/view.php');
|
||||||
|
$email = view::User('email');
|
||||||
|
$realname=view::User('realname');
|
||||||
|
|
||||||
|
$sql = "SELECT distinct m.uuid,m.title,m.description,a.status,a.userid FROM normalmetadata m
|
||||||
|
LEFT JOIN mdauthor a ON m.uuid=a.uuid
|
||||||
|
LEFT JOIN role r ON r.uuid=m.uuid
|
||||||
|
LEFT JOIN responsible re ON r.resid = re.id
|
||||||
|
WHERE re.email LIKE '%$email%' or re.realname='$realname'";
|
||||||
|
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
$this->jsonexit($rs->fetchAll());
|
||||||
|
return true;
|
||||||
|
}//首页
|
||||||
|
|
||||||
//搜索动作
|
//搜索动作
|
||||||
if($ac == "search")
|
if($ac == "search")
|
||||||
{
|
{
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
//要输出的Json对象
|
|
||||||
//过程中如果没有处理,则不包含任何返回信息,由前台定义提示信息,如:
|
|
||||||
/*
|
|
||||||
$.ajax({
|
|
||||||
'type':"POST",
|
|
||||||
'url':'/author/apply',
|
|
||||||
'data':'ac=search&q='+$('#keyword').val(),
|
|
||||||
'success':function(data){
|
|
||||||
if (typeof(data)=='object') //如果服务器端的响应为Json对象
|
|
||||||
{
|
|
||||||
if(typeof(data.error)!='undefined') //服务器端响应的错误消息
|
|
||||||
{
|
|
||||||
alert(data.error);
|
|
||||||
}else{ //服务器端无错误消息则为成功的响应
|
|
||||||
alert(data.length);
|
|
||||||
}
|
|
||||||
}else{ //服务器端响应了非JSON对象或者为空
|
|
||||||
alert('无搜索结果');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'beforeSend':function(){
|
|
||||||
//请求发送前
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
错误消息的键名必须为error,不包含JS脚本,如:
|
|
||||||
$data['error'] = '服务器忙!';
|
|
||||||
*/
|
|
||||||
$data = "";
|
$data = "";
|
||||||
|
|
||||||
//防止通过其它方式访问,先判断是否是登录用户,如果不是,抛出消息后强制用户退出
|
//防止通过其它方式访问,先判断是否是登录用户,如果不是,抛出消息后强制用户退出
|
||||||
|
@ -792,7 +784,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
//如果上面的程序已经发送出提示,就不发送抛出的错误
|
|
||||||
if(empty($data['error']))
|
if(empty($data['error']))
|
||||||
{
|
{
|
||||||
if($this->debug==0)
|
if($this->debug==0)
|
||||||
|
@ -803,14 +795,10 @@ class AuthorController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// >>>>>>>>>>> F
|
|
||||||
|
|
||||||
//截获响应对象,并修改头部和内容
|
$this->jsonexit($data);
|
||||||
//不管有没有数据存在,都将返回Json数据,前台有判断机制来分析数据
|
return true;
|
||||||
|
|
||||||
$this ->getResponse()
|
|
||||||
->setHeader('Content-Type', 'application/json')
|
|
||||||
->appendBody(Zend_Json::encode($data));
|
|
||||||
}// search
|
}// search
|
||||||
|
|
||||||
|
|
||||||
|
@ -3817,9 +3805,10 @@ class AuthorController extends Zend_Controller_Action
|
||||||
if($ac=='index' || empty($ac))
|
if($ac=='index' || empty($ac))
|
||||||
{
|
{
|
||||||
$uuid = $this->_getParam('uuid');
|
$uuid = $this->_getParam('uuid');
|
||||||
|
$this->view->q=$this->_getParam('q');
|
||||||
if(empty($uuid))
|
if(empty($uuid))
|
||||||
{
|
{
|
||||||
$rows = $fund->fetch("",true);
|
$rows = $fund->fetch("",true,0,$this->_getParam('q'));
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
}else{
|
}else{
|
||||||
include('data/Metadata.php');
|
include('data/Metadata.php');
|
||||||
|
@ -3835,7 +3824,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->_helper->viewRenderer('fund-data');
|
$this->_helper->viewRenderer('fund-data');
|
||||||
$this->view->q = $q = $this->_getParam('q');
|
$this->view->q = $q = $this->_getParam('q');
|
||||||
$rows = $fund->fetchFormData(true,$uid,$q);
|
$rows = $fund->fetchFromData(true,$uid,$q);
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3845,7 +3834,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$this->view->q = $q = $this->_getParam('q');
|
$this->view->q = $q = $this->_getParam('q');
|
||||||
$id = $this->_getParam('id');
|
$id = $this->_getParam('id');
|
||||||
$this->view->fund = $fund->view($id);
|
$this->view->fund = $fund->view($id);
|
||||||
$rows = $fund->fetchFormData($id,$q);
|
$rows = $fund->fetchFromData($id,$uid,$q);
|
||||||
view::addPaginator($rows,$this->view,$this->_request);
|
view::addPaginator($rows,$this->view,$this->_request);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3963,6 +3952,7 @@ class AuthorController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
|
|
||||||
$mfid = $this->_getParam('mfid');
|
$mfid = $this->_getParam('mfid');
|
||||||
|
$this->view->q=$this->_getParam('q');
|
||||||
|
|
||||||
if(!empty($mfid))
|
if(!empty($mfid))
|
||||||
{
|
{
|
||||||
|
@ -3974,10 +3964,10 @@ class AuthorController extends Zend_Controller_Action
|
||||||
$this->view->AlertType = "alert-error";
|
$this->view->AlertType = "alert-error";
|
||||||
$this->view->error = "排序修改失败!";
|
$this->view->error = "排序修改失败!";
|
||||||
}
|
}
|
||||||
$rows = $fund->fetch($uuid,true,$uid);
|
$rows = $fund->fetch($uuid,true,0);
|
||||||
}else{
|
}else{
|
||||||
$this->view->ct = "ct";
|
$this->view->ct = "ct";
|
||||||
$rows = $fund->fetch($uuid,false,$uid);
|
$rows = $fund->fetch($uuid,false,0,$this->_getParam('q'));
|
||||||
}
|
}
|
||||||
|
|
||||||
include('data/Metadata.php');
|
include('data/Metadata.php');
|
||||||
|
|
|
@ -688,6 +688,7 @@ class DataController extends Zend_Controller_Action
|
||||||
LEFT JOIN users u ON v.userid=u.id
|
LEFT JOIN users u ON v.userid=u.id
|
||||||
WHERE v.uuid=? AND v.changelog IS NOT NULL
|
WHERE v.uuid=? AND v.changelog IS NOT NULL
|
||||||
ORDER BY v.ts_created DESC";
|
ORDER BY v.ts_created DESC";
|
||||||
|
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute(array($uuid));
|
$sth->execute(array($uuid));
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
|
@ -1283,7 +1284,7 @@ class DataController extends Zend_Controller_Action
|
||||||
function downloadAction()
|
function downloadAction()
|
||||||
{
|
{
|
||||||
$uuid=$this->_request->getParam('uuid');
|
$uuid=$this->_request->getParam('uuid');
|
||||||
$onlineappid=$this->_request->getParam('onlineappid');
|
$onlineappid=$this->_request->getParam('onlineappid');
|
||||||
$this->view->pageID = "account-dataorder";
|
$this->view->pageID = "account-dataorder";
|
||||||
|
|
||||||
if (empty($uuid)) $this->_redirect('/data');
|
if (empty($uuid)) $this->_redirect('/data');
|
||||||
|
@ -1330,8 +1331,8 @@ class DataController extends Zend_Controller_Action
|
||||||
$updateftp=$updateftp1=false;
|
$updateftp=$updateftp1=false;
|
||||||
$this->view->md=$data;
|
$this->view->md=$data;
|
||||||
$this->view->userpass=md5('westdc'.rand(1000,9999));
|
$this->view->userpass=md5('westdc'.rand(1000,9999));
|
||||||
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
|
$this->view->ftptime=date('Y-m-d H:i:s', strtotime('+1 week'));
|
||||||
$sql=$this->db->quoteInto("select * from ftpuser where userid=?",$userid);
|
$sql=$this->db->quoteInto("select * from ftpuser where userid=?",$userid);
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$datacount=$row['datacount'];
|
$datacount=$row['datacount'];
|
||||||
if ($data['host']=='ftp.westgis.ac.cn')
|
if ($data['host']=='ftp.westgis.ac.cn')
|
||||||
|
@ -2001,5 +2002,6 @@ class DataController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class HiwaterController extends DataController
|
||||||
{
|
{
|
||||||
$this->view->pageIn = "collapse5";
|
$this->view->pageIn = "collapse5";
|
||||||
}
|
}
|
||||||
else if(in_array($acName,array("fund","tag","timeline","timemap",'author','organization')))
|
else if(in_array($acName,array("browse","thumb","fund","tag","timeline","timemap",'author','organization')))
|
||||||
{
|
{
|
||||||
$this->view->pageIn = "collapse10";
|
$this->view->pageIn = "collapse10";
|
||||||
}
|
}
|
||||||
|
@ -107,12 +107,12 @@ class HiwaterController extends DataController
|
||||||
}
|
}
|
||||||
function lidarAction()
|
function lidarAction()
|
||||||
{
|
{
|
||||||
$this->getmd(array('','Lidar'));
|
$this->getmd(array('LIDAR','Lidar'));
|
||||||
$this->_helper->viewRenderer('base');
|
$this->_helper->viewRenderer('base');
|
||||||
}
|
}
|
||||||
function widasAction()
|
function widasAction()
|
||||||
{
|
{
|
||||||
$this->getmd(array('','WiDAS'));
|
$this->getmd(array('WIDAS','WiDAS'));
|
||||||
$this->_helper->viewRenderer('base');
|
$this->_helper->viewRenderer('base');
|
||||||
}
|
}
|
||||||
function nearvisAction()
|
function nearvisAction()
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -30,32 +30,13 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
function doSearch(){
|
$(document).ready(function(e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'type':"POST",
|
'type':"POST",
|
||||||
'url':'/author/apply',
|
'url':'/author/apply',
|
||||||
'data':'ac=search&q='+$('#keyword').val(),
|
'data':'ac=mydata',
|
||||||
'success':function(data){
|
'success':function(data){
|
||||||
if (isObject(data))
|
datareceive(data);
|
||||||
{
|
|
||||||
if(typeof(data.error)!='undefined')
|
|
||||||
{
|
|
||||||
alert(data.error);
|
|
||||||
}else{
|
|
||||||
var result = new Array();
|
|
||||||
for(i=0;i<data.length;i++)
|
|
||||||
{
|
|
||||||
if(data[i].status==1) var ct='<img src="/images/list_links.gif" />您是此元数据的作者';
|
|
||||||
else if (data[i].status==0) var ct='<img src="/images/list_extensions.gif" />您已经申请成为该元数据作者,请前往 <a href="/author/accept">我的数据</a> 查看<span id="data_'+data[i].uuid+'"></span>';
|
|
||||||
else var ct='<a href="javascript:;" onclick="apply(\'' +data[i].uuid+ '\')"><img src="/images/list_keys.gif" />申请成为此数据的作者</a><span id="data_'+data[i].uuid+'"></span>';
|
|
||||||
result.push('<li class="well"><h4><a href="/data/'+data[i].uuid+'" target="_blank" class="title">'+data[i].title+'</a></h4><p>'+data[i].description+'</p><p>'+ct+'</p></li>');
|
|
||||||
}
|
|
||||||
$('#searchlist').html('<ul class="unstyled">'+result.join('')+'</ul>');
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
alert('无搜索结果');
|
|
||||||
}
|
|
||||||
$('#search_btn').html('搜索');
|
|
||||||
},
|
},
|
||||||
'beforeSend':function(){
|
'beforeSend':function(){
|
||||||
$('#search_btn').html('Searching...');
|
$('#search_btn').html('Searching...');
|
||||||
|
@ -64,9 +45,51 @@ function doSearch(){
|
||||||
'error': function(){
|
'error': function(){
|
||||||
alert('处理中出现问题,请重试');
|
alert('处理中出现问题,请重试');
|
||||||
$('#data_'+uuid).html('');
|
$('#data_'+uuid).html('');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
function doSearch(){
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/author/apply',
|
||||||
|
'data':'ac=search&q='+$('#keyword').val(),
|
||||||
|
'success':function(data){
|
||||||
|
datareceive(data);
|
||||||
|
},
|
||||||
|
'beforeSend':function(){
|
||||||
|
$('#search_btn').html('Searching...');
|
||||||
|
},
|
||||||
|
'timeout': 20000,
|
||||||
|
'error': function(){
|
||||||
|
alert('处理中出现问题,请重试');
|
||||||
|
$('#data_'+uuid).html('');
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function datareceive(data){
|
||||||
|
if (isObject(data))
|
||||||
|
{
|
||||||
|
if(typeof(data.error)!='undefined')
|
||||||
|
{
|
||||||
|
alert(data.error);
|
||||||
|
}else{
|
||||||
|
var result = new Array();
|
||||||
|
for(i=0;i<data.length;i++)
|
||||||
|
{
|
||||||
|
if(data[i].status==1) var ct='<img src="/images/list_links.gif" />您是此元数据的作者';
|
||||||
|
else if (data[i].status==0) var ct='<img src="/images/list_extensions.gif" />您已经申请成为该元数据作者,请前往 <a href="/author/accept">我的数据</a> 查看<span id="data_'+data[i].uuid+'"></span>';
|
||||||
|
else var ct='<a href="javascript:;" onclick="apply(\'' +data[i].uuid+ '\')"><img src="/images/list_keys.gif" />申请成为此数据的作者</a><span id="data_'+data[i].uuid+'"></span>';
|
||||||
|
result.push('<li class="well"><h4><a href="/data/'+data[i].uuid+'" target="_blank" class="title">'+data[i].title+'</a></h4><p>'+data[i].description+'</p><p>'+ct+'</p></li>');
|
||||||
|
}
|
||||||
|
$('#searchlist').html('<ul class="unstyled">'+result.join('')+'</ul>');
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alert('无搜索结果');
|
||||||
|
}
|
||||||
|
$('#search_btn').html('搜索');
|
||||||
|
}
|
||||||
|
|
||||||
function apply(uuid){
|
function apply(uuid){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'type':"POST",
|
'type':"POST",
|
||||||
|
|
|
@ -1,88 +1,217 @@
|
||||||
<?php
|
<?php
|
||||||
$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("空间浏览");
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
$this->theme->AppendPlus($this,'jquery_ui');
|
||||||
$this->headScript()->appendFile('http://maps.google.com/maps/api/js?sensor=false');
|
//$this->theme->AppendPlus($this,'google_map_v3');
|
||||||
$this->headScript()->appendFile('/js/OpenLayers.js');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
|
$this->headLink()->appendStylesheet('/js/theme/default/style.css');
|
||||||
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
$this->nav[] = array('link'=>"/data/map",'title'=>'空间导航');
|
||||||
?>
|
?>
|
||||||
<div class="row-fluid">
|
<style type="text/css">
|
||||||
<?= $this->render('breadcrumbs.phtml'); ?>
|
#data_canvas .well {background:#FFF;}
|
||||||
<?= $this->partial('data/tools.phtml'); ?>
|
|
||||||
</div>
|
|
||||||
<div id='map' style="clear:left;height:500px;border:1px;"></div>
|
|
||||||
<style type="text/css">
|
|
||||||
label{display:inline;}
|
|
||||||
img{max-width:none;}
|
|
||||||
hr{margin:0;}
|
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript" >
|
<div class="row-fluid">
|
||||||
var map;
|
<?= $this->render('breadcrumbs.phtml'); ?>
|
||||||
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
map = new OpenLayers.Map('map');
|
<div class="row-fluid">
|
||||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
<form class="form-search pull-right">
|
||||||
|
<div class="input-append">
|
||||||
var gphy = new OpenLayers.Layer.Google(
|
<input type="text" class="span8 search-query" id="keyword">
|
||||||
"Google Physical",
|
<button type="button" class="btn" onclick="mapmethods.action(map,1);">Search</button>
|
||||||
{type: google.maps.MapTypeId.TERRAIN}
|
</div>
|
||||||
);
|
</form>
|
||||||
var gmap = new OpenLayers.Layer.Google(
|
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
|
||||||
"Google Streets", // the default
|
</div>
|
||||||
{numZoomLevels: 20}
|
<hr />
|
||||||
);
|
<div class="row-fluid">
|
||||||
var ghyb = new OpenLayers.Layer.Google(
|
<div class="span6">
|
||||||
"Google Hybrid",
|
<div><button class="btn btn-large btn-block" type="button" id="searchbtn" onclick="mapmethods.action(map,1);">查看数据</button></div>
|
||||||
{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
|
<hr />
|
||||||
);
|
<div id="map_canvas" style="height:500px;">
|
||||||
var gsat = new OpenLayers.Layer.Google(
|
</div>
|
||||||
"Google Satellite",
|
</div>
|
||||||
{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
|
<div class="span6">
|
||||||
);
|
<div><button class="btn btn-large btn-block" type="button" onclick="$('#data_canvas').html('');">清除列表</button></div>
|
||||||
geojson_layer = new OpenLayers.Layer.Vector("Data Boundary", {
|
<hr />
|
||||||
strategies: [new OpenLayers.Strategy.Fixed()],
|
<div class="well well-small" style="height:500px;overflow-y:scroll;">
|
||||||
protocol: new OpenLayers.Protocol.HTTP({
|
<ul id="data_canvas" class="unstyled">
|
||||||
url: "/service/json<?php echo $this->params; ?>",
|
</ul>
|
||||||
format: new OpenLayers.Format.GeoJSON()
|
</div>
|
||||||
})
|
</div>
|
||||||
});
|
</div>
|
||||||
|
</div>
|
||||||
|
<script type="text/javascript" >
|
||||||
map.addLayers([gphy, gmap, ghyb, gsat,geojson_layer]);
|
$(function() {
|
||||||
|
|
||||||
// Google.v3 uses EPSG:900913 as projection, so we have to
|
});
|
||||||
// transform our coordinates
|
function loadScript() {
|
||||||
map.setCenter(new OpenLayers.LonLat(102, 36).transform(
|
var script = document.createElement('script');
|
||||||
new OpenLayers.Projection("EPSG:4326"),
|
script.type = 'text/javascript';
|
||||||
map.getProjectionObject()
|
script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' +
|
||||||
), 5);
|
'callback=initialize';
|
||||||
|
document.body.appendChild(script);
|
||||||
var sf = new OpenLayers.Control.SelectFeature(geojson_layer,{onSelect:onFeatureSelect,onUnselect:onFeatureUnselect});
|
}
|
||||||
map.addControl(sf);
|
|
||||||
sf.activate();
|
window.onload = loadScript;
|
||||||
|
|
||||||
for (var i=map.layers.length-1; i>=0; --i) {
|
// Google Map Part
|
||||||
map.layers[i].animationEnabled = this.checked;
|
var map = null;
|
||||||
};
|
var mapElementID = "map_canvas";
|
||||||
|
var rectangle = null;
|
||||||
function onPopupClose(evt) {
|
var markers = [];
|
||||||
selectControl.unselect(selectedFeature);
|
|
||||||
}
|
function initialize() {
|
||||||
function onFeatureSelect(feature) {
|
//加载地图
|
||||||
selectedFeature = feature;
|
var myLatlng = new google.maps.LatLng(35.656456,105.819946);
|
||||||
popup = new OpenLayers.Popup.FramedCloud("chicken",
|
var myOptions = {
|
||||||
feature.geometry.getBounds().getCenterLonLat(),
|
zoom: 3,
|
||||||
null,
|
center: myLatlng,
|
||||||
"<div style='font-size:.8em'><a href=/data/"+feature.attributes['uuid']+">"+ feature.attributes['title'] +"</a> | <a href=/data/map/id/"+feature.attributes['id']+"><i class='icon-globe'></i></a><hr /><img class='' src=/service/thumb/id/" + feature.attributes['id']+"/></div>",
|
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||||
null, false, onPopupClose);
|
}
|
||||||
feature.popup = popup;
|
map = new google.maps.Map(document.getElementById(mapElementID), myOptions);
|
||||||
map.addPopup(popup);
|
|
||||||
}
|
//methods.trigger('tilesloaded',map);
|
||||||
function onFeatureUnselect(feature) {
|
mapmethods.trigger('dragend',map);
|
||||||
map.removePopup(feature.popup);
|
mapmethods.trigger('zoom_changed',map);
|
||||||
feature.popup.destroy();
|
}
|
||||||
feature.popup = null;
|
|
||||||
}
|
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){
|
||||||
|
|
||||||
|
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);
|
||||||
|
}else{
|
||||||
|
RemoveRectangle();
|
||||||
|
|
||||||
|
var position = new google.maps.LatLng(south,east);
|
||||||
|
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: position,
|
||||||
|
map: map,
|
||||||
|
});
|
||||||
|
|
||||||
|
markers.push(marker);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
return latlng;
|
||||||
|
},
|
||||||
|
action : function(map,ajax){
|
||||||
|
range = mapmethods.getbounds(map);
|
||||||
|
$('#searchbtn').html("搜索数据:(" + range['east'] + "," + range['north'] + ") to (" + range['west'] + "," + range['south'] + ")");
|
||||||
|
if(ajax == 1)
|
||||||
|
mapmethods.ajax(range);
|
||||||
|
//return range;
|
||||||
|
},
|
||||||
|
ajax : function(range){
|
||||||
|
btn = $('#searchbtn');
|
||||||
|
btnhtml = btn.html();
|
||||||
|
func = btn.attr('onclick');
|
||||||
|
|
||||||
|
data = new Array();
|
||||||
|
for(k in range)
|
||||||
|
{
|
||||||
|
data.push('opt['+k+']='+range[k]);
|
||||||
|
}
|
||||||
|
|
||||||
|
q = $('#keyword').val();
|
||||||
|
if( q != '')
|
||||||
|
{
|
||||||
|
data.push('opt[q]='+q);
|
||||||
|
}
|
||||||
|
|
||||||
|
post = data.join("&");
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url': '/service/mapsearch',
|
||||||
|
'data': post,
|
||||||
|
'success':function(data){
|
||||||
|
if (typeof(data)=='object')
|
||||||
|
{
|
||||||
|
mapmethods.list(data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
alert('此区域无数据');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
'timeout': 15000,
|
||||||
|
'error': function(){
|
||||||
|
alert('处理中出现错误,请刷新页面后重试');
|
||||||
|
},
|
||||||
|
'beforeSend':function(){
|
||||||
|
btn.attr('onclick','');
|
||||||
|
btn.html('<img src="/images/ajax-load-small.gif" />');
|
||||||
|
},
|
||||||
|
'complete':function(){
|
||||||
|
btn.attr('onclick',func);
|
||||||
|
btn.html(btnhtml);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
list : function(data)
|
||||||
|
{
|
||||||
|
html = "";
|
||||||
|
if(data.length > 0)
|
||||||
|
{
|
||||||
|
for(i in data)
|
||||||
|
{
|
||||||
|
html += '<li class="well well-small">'
|
||||||
|
+ '<p><a href="/data/'+data[i].uuid+'">'+data[i].title+'</a></p>'
|
||||||
|
+ '<div class="input-append">'
|
||||||
|
+ '<a class="btn" href="javascript:void(0);" onclick="setRectangle('+data[i].east+','+data[i].west+','+data[i].south+','+data[i].north+')" title="在地图上查看数据范围"><i class="icon-eye-open"></i></a>'
|
||||||
|
+ '<a class="btn" href="/data/'+data[i].uuid+'" title="查看数据信息"><i class="icon-search"></i></a>'
|
||||||
|
+ '</div>'
|
||||||
|
+ '</li>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$('#data_canvas').html(html);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,20 +6,7 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="accordion-group heihe-accordion-title">
|
|
||||||
<div class="accordion-heading" id="Nav-hiwater-browse">
|
|
||||||
<a class="accordion-toggle" href="/hiwater/browse/">
|
|
||||||
数据浏览
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-group heihe-accordion-title">
|
|
||||||
<div class="accordion-heading" id="Nav-hiwater-thumb">
|
|
||||||
<a class="accordion-toggle" href="/hiwater/thumb/">
|
|
||||||
缩略图浏览
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="accordion-group heihe-accordion-title">
|
<div class="accordion-group heihe-accordion-title">
|
||||||
<div class="accordion-heading" id="Nav-hiwater-aviation">
|
<div class="accordion-heading" id="Nav-hiwater-aviation">
|
||||||
<a href="/hiwater/aviation" title="查看详细" class="detail-link pull-right"><i class="icon-arrow-right"></i></a>
|
<a href="/hiwater/aviation" title="查看详细" class="detail-link pull-right"><i class="icon-arrow-right"></i></a>
|
||||||
|
@ -201,12 +188,14 @@
|
||||||
<div id="collapse10" class="accordion-body collapse">
|
<div id="collapse10" class="accordion-body collapse">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
<ul class="nav nav-list heihe-subnav">
|
<ul class="nav nav-list heihe-subnav">
|
||||||
<li id="Nav-hiwater-tag"><a href="/hiwater/tag"><i class="icon-double-angle-right"></i>关键词浏览</a></li>
|
<li id="Nav-hiwater-tag"><a href="/hiwater/tag"><i class="icon-double-angle-right"></i>关键词浏览</a></li>
|
||||||
|
<li id="Nav-hiwater-thumb"><a href="/hiwater/thumb"><i class="icon-double-angle-right"></i>缩略图浏览</a></li>
|
||||||
|
<li id="Nav-hiwater-browse"><a href="/hiwater/browse"><i class="icon-double-angle-right"></i>全部浏览</a></li>
|
||||||
<li id="Nav-hiwater-timeline"><a href="/hiwater/timeline"><i class="icon-double-angle-right"></i>时间轴浏览</a></li>
|
<li id="Nav-hiwater-timeline"><a href="/hiwater/timeline"><i class="icon-double-angle-right"></i>时间轴浏览</a></li>
|
||||||
<li id="Nav-hiwater-timemap"><a href="/hiwater/timemap"><i class="icon-double-angle-right"></i>时空浏览</a></li>
|
<li id="Nav-hiwater-timemap"><a href="/hiwater/timemap"><i class="icon-double-angle-right"></i>时空浏览</a></li>
|
||||||
<li id="Nav-hiwater-fund"><a href="/hiwater/fund"><i class="icon-double-angle-right"></i>项目浏览</a></li>
|
<li id="Nav-hiwater-fund"><a href="/hiwater/fund"><i class="icon-double-angle-right"></i>项目浏览</a></li>
|
||||||
<li id="Nav-hiwater-author"><a href="/hiwater/author"><i class="icon-double-angle-right"></i>作者浏览</a></li>
|
<li id="Nav-hiwater-author"><a href="/hiwater/author"><i class="icon-double-angle-right"></i>作者浏览</a></li>
|
||||||
<li id="Nav-hiwater-organization"><a href="/hiwater/organization"><i class="icon-double-angle-right"></i>单位浏览</a></li>
|
<li id="Nav-hiwater-organization"><a href="/hiwater/organization"><i class="icon-double-angle-right"></i>单位浏览</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
|
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
|
||||||
<p><span class="label label-info">数据的引用</span><?php
|
<p><span class="label label-info">数据的引用</span><?php
|
||||||
echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi;
|
echo substr($md->authors,1,-1).'. '.$md->title.'. '.$md->publisher.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi;
|
||||||
echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.$md->publish_year.'. doi:'.$md->doi.']';
|
echo ' ['.str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title_en.'. '.$md->publisher_en.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi.']';
|
||||||
?> (下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)</p>
|
?> (下载引用:<a href="/service/ris/lang/cn/uuid/<?php echo $md->uuid; ?>">RIS格式</a> | <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS英文格式</a> | <a href="/service/bibtex/lang/cn/uuid/<?php echo $md->uuid; ?>">Bibtex格式</a> | <a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex英文格式</a>)</p>
|
||||||
<?php endif; endif; if ($this->ref) : ?>
|
<?php endif; endif; if ($this->ref) : ?>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -95,12 +95,12 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchFormData($count = true,$uid,$keyword){
|
function fetchFromData($count = true,$uid,$keyword){
|
||||||
$wheresql = array();
|
$wheresql = array();
|
||||||
|
|
||||||
if(!empty($uid) && is_int($uid))
|
if(!empty($uid) && is_int($uid))
|
||||||
{
|
{
|
||||||
$wheresql[] = " f.userid='$uid' ";
|
$wheresql[] = " a.userid='$uid' ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!empty($keyword))
|
if(!empty($keyword))
|
||||||
|
@ -130,14 +130,16 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
||||||
{
|
{
|
||||||
$sql = "SELECT f.*,count(md.uuid) as mds FROM ".$this->tbl_fund." f
|
$sql = "SELECT f.*,count(md.uuid) as mds FROM ".$this->tbl_fund." f
|
||||||
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
||||||
LEFT JOIN metadata md ON md.uuid=mf.uuid
|
LEFT JOIN metadata md ON md.uuid=mf.uuid
|
||||||
|
left join mdauthor a on md.uuid=a.uuid
|
||||||
$wheresql
|
$wheresql
|
||||||
GROUP BY f.id";
|
GROUP BY f.id";
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$sql = "SELECT mf.id as mfid,md.title as mdtitle,md.uuid FROM ".$this->tbl_fund." f
|
$sql = "SELECT mf.id as mfid,md.title as mdtitle,md.uuid FROM ".$this->tbl_fund." f
|
||||||
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
LEFT JOIN ".$this->tbl_mdfund." mf ON mf.fid=f.id
|
||||||
LEFT JOIN metadata md ON md.uuid=mf.uuid
|
LEFT JOIN metadata md ON md.uuid=mf.uuid
|
||||||
|
left join mdauthor a on md.uuid=a.uuid
|
||||||
$wheresql
|
$wheresql
|
||||||
GROUP BY md.title,md.uuid,mf.id
|
GROUP BY md.title,md.uuid,mf.id
|
||||||
";
|
";
|
||||||
|
|
|
@ -17,4 +17,52 @@ class Metadata
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
return $rs->fetch();
|
return $rs->fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function DatasFilter($options)
|
||||||
|
{
|
||||||
|
$wheresql = array();
|
||||||
|
|
||||||
|
if(isset($options['east']))
|
||||||
|
{
|
||||||
|
$wheresql[] = " md.east < ".$options['east'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($options['west']))
|
||||||
|
{
|
||||||
|
$wheresql[] = " md.west > ".$options['west'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($options['north']))
|
||||||
|
{
|
||||||
|
$wheresql[] = " md.north < ".$options['north'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($options['south']))
|
||||||
|
{
|
||||||
|
$wheresql[] = " md.south > ".$options['south'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($options['q']))
|
||||||
|
{
|
||||||
|
if(preg_match("/\'/",$options['q']))
|
||||||
|
{
|
||||||
|
$q = preg_replace("/\'/","''",$options['q']);
|
||||||
|
}else{
|
||||||
|
$q = $options['q'];
|
||||||
|
}
|
||||||
|
$wheresql[] = " md.title LIKE '%$q%' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(count($wheresql)>0)
|
||||||
|
{
|
||||||
|
$wheresql = " WHERE ".join(" AND ",$wheresql);
|
||||||
|
}else{
|
||||||
|
$wheresql = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "SELECT md.* FROM ".$this->tbl_metadata." md $wheresql";
|
||||||
|
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
return $rs->fetchAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ class Review extends Zend_Controller_Plugin_Abstract
|
||||||
|
|
||||||
$wheresql = array();
|
$wheresql = array();
|
||||||
|
|
||||||
$wheresql[] = " m.status in (0,1,2,3,4) ";
|
$wheresql[] = " m.status in (1,2,3,4) ";
|
||||||
$wheresql[] = " u.id=$uid ";
|
$wheresql[] = " u.id=$uid ";
|
||||||
|
|
||||||
if(!empty($keyword))
|
if(!empty($keyword))
|
||||||
|
@ -78,7 +78,7 @@ class Review extends Zend_Controller_Plugin_Abstract
|
||||||
|
|
||||||
$sql = "select m.id,g.id as gid, md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid,md.author,m.ts_accepted
|
$sql = "select m.id,g.id as gid, md.uuid,md.title,u.username,u.realname,m.status,md.id as mdid,md.author,m.ts_accepted
|
||||||
FROM mdstatus m
|
FROM mdstatus m
|
||||||
right join metadata md on md.uuid=m.uuid
|
right join metadata md on md.uuid=m.uuid
|
||||||
left join geonetworkmetadata g on m.uuid=g.uuid
|
left join geonetworkmetadata g on m.uuid=g.uuid
|
||||||
left join users u on u.id=m.userid
|
left join users u on u.id=m.userid
|
||||||
$wheresql
|
$wheresql
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
* 2011/9/13 15:48
|
* 2011/9/13 15:48
|
||||||
*/
|
*/
|
||||||
|
|
||||||
*{padding:0px;margin:0px;}
|
|
||||||
html {background:#FFF;}
|
|
||||||
body {font:12px Tahoma, Geneva, sans-serif;}
|
|
||||||
a {text-decoration:none;cursor:hand;}
|
|
||||||
od,ul,li,ul li{list-style:none;}
|
|
||||||
input,select,button{font:12px Tahoma, Geneva, sans-serif;vertical-align:middle;}
|
input,select,button{font:12px Tahoma, Geneva, sans-serif;vertical-align:middle;}
|
||||||
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
|
input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}
|
||||||
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0px;padding:0px;}
|
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0px;padding:0px;}
|
||||||
|
@ -299,77 +294,7 @@ fieldset small {
|
||||||
font-size:11px;
|
font-size:11px;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.btn {
|
|
||||||
display: inline-block;
|
|
||||||
padding: 5px 10px;
|
|
||||||
color: #777 !important;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
font-family: Tahoma, Arial, sans-serif;
|
|
||||||
-moz-border-radius: 4px;
|
|
||||||
-webkit-border-radius: 4px;
|
|
||||||
border-radius: 4px;
|
|
||||||
text-shadow: 0 1px 1px rgba(255,255,255,0.9);
|
|
||||||
position: relative;
|
|
||||||
cursor: pointer;
|
|
||||||
border:1px solid #ccc !important;
|
|
||||||
background:#fff url("../images/btn-overlay.png") repeat-x !important;
|
|
||||||
}
|
|
||||||
.btn:hover, .btn:focus, .btn:active {
|
|
||||||
outline:medium none;
|
|
||||||
border:1px solid #329ECC !important;
|
|
||||||
opacity:0.9;
|
|
||||||
-khtml-opacity: .9;
|
|
||||||
-moz-opacity: 0.9;
|
|
||||||
-moz-box-shadow:0 0 5px rgba(82, 168, 236, 0.5);
|
|
||||||
-webkit-box-shadow: 0 0 5px rgba(82, 168, 236, 0.5);
|
|
||||||
box-shadow: 0 0 5px rgba(82, 168, 236, 0.5);
|
|
||||||
}
|
|
||||||
.btn-green {
|
|
||||||
color: #fff !important;
|
|
||||||
text-shadow: 0 1px 1px rgba(0,0,0,0.25);
|
|
||||||
border:1px solid #749217 !important;
|
|
||||||
background-color: #6AB620 !important;
|
|
||||||
}
|
|
||||||
.btn-green:hover, .btn-green:focus, .btn-green:active {
|
|
||||||
-moz-box-shadow:0 0 5px rgba(116, 146, 23, 0.9);
|
|
||||||
-webkit-box-shadow: 0 0 5px rgba(116, 146, 23, 0.9);
|
|
||||||
box-shadow: 0 0 5px rgba(116, 146, 23, 0.9);
|
|
||||||
border:1px solid #749217 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-blue {
|
|
||||||
color: #fff !important;
|
|
||||||
text-shadow: 0 1px 1px rgba(0,0,0,0.25);
|
|
||||||
border:1px solid #2D69AC !important;
|
|
||||||
background-color: #3C6ED1 !important;
|
|
||||||
}
|
|
||||||
.btn-blue:hover, .btn-blue:focus, .btn-blue:active {
|
|
||||||
-moz-box-shadow:0 0 5px rgba(71, 131, 243, 0.9);
|
|
||||||
-webkit-box-shadow:0 0 5px rgba(71, 131, 243, 0.9);
|
|
||||||
box-shadow: 0 0 5px rgba(71, 131, 243, 0.9);
|
|
||||||
border:1px solid #2D69AC !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-red {
|
|
||||||
color: #fff !important;
|
|
||||||
text-shadow: 0 1px 1px rgba(0,0,0,0.25);
|
|
||||||
border:1px solid #AE2B2B !important;
|
|
||||||
background-color: #D22A2A !important;
|
|
||||||
background-image:none;
|
|
||||||
}
|
|
||||||
.btn-red:hover, .btn-red:focus, .btn-red:active {
|
|
||||||
-moz-box-shadow:0 0 5px rgba(174, 43, 43, 0.9);
|
|
||||||
-webkit-box-shadow:0 0 5px rgba(174, 43, 43, 0.9);
|
|
||||||
box-shadow: 0 0 5px rgba(174, 43, 43, 0.9);
|
|
||||||
border:1px solid #AE2B2B !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.btn-special {
|
|
||||||
font-size:110%;
|
|
||||||
width: 210px;
|
|
||||||
}
|
|
||||||
.tables{width:320px;float:left;}
|
.tables{width:320px;float:left;}
|
||||||
.tables .stitle{width:100%;font-size:16px;font-weight:bold;}
|
.tables .stitle{width:100%;font-size:16px;font-weight:bold;}
|
||||||
|
|
||||||
|
|
|
@ -259,20 +259,34 @@ function initialize() {
|
||||||
|
|
||||||
function setRectangle(east,west,south,north){
|
function setRectangle(east,west,south,north){
|
||||||
|
|
||||||
bounds = new google.maps.LatLngBounds(
|
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
||||||
new google.maps.LatLng(south,west),
|
|
||||||
new google.maps.LatLng(north,east)
|
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);
|
rectangle = new google.maps.Rectangle({
|
||||||
|
bounds: bounds,
|
||||||
|
editable: false
|
||||||
|
});
|
||||||
|
|
||||||
|
rectangle.setMap(map);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
var position = new google.maps.LatLng(south,east);
|
||||||
|
|
||||||
|
var marker = new google.maps.Marker({
|
||||||
|
position: position,
|
||||||
|
map: map,
|
||||||
|
});
|
||||||
|
|
||||||
|
markers.push(marker);
|
||||||
|
}
|
||||||
|
|
||||||
var bounds = new google.maps.LatLngBounds();
|
var bounds = new google.maps.LatLngBounds();
|
||||||
bounds.extend(new google.maps.LatLng(south, west));
|
bounds.extend(new google.maps.LatLng(south,west));
|
||||||
bounds.extend(new google.maps.LatLng(north,east));
|
bounds.extend(new google.maps.LatLng(north,east));
|
||||||
map.fitBounds(bounds);
|
map.fitBounds(bounds);
|
||||||
}
|
}
|
Loading…
Reference in New Issue