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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ class Admin_SysController extends Zend_Controller_Action
|
||||||
$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()
|
||||||
|
@ -333,5 +334,160 @@ 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>
|
|
@ -3,4 +3,6 @@
|
||||||
<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>
|
|
@ -711,40 +711,32 @@ class AuthorController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$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
|
|
||||||
|
|
||||||
//截获响应对象,并修改头部和内容
|
|
||||||
//不管有没有数据存在,都将返回Json数据,前台有判断机制来分析数据
|
|
||||||
|
|
||||||
$this ->getResponse()
|
$this->jsonexit($data);
|
||||||
->setHeader('Content-Type', 'application/json')
|
return true;
|
||||||
->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();
|
||||||
|
@ -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()
|
||||||
|
|
|
@ -1478,4 +1478,30 @@ class ServiceController extends Zend_Controller_Action
|
||||||
->setBody($bib);
|
->setBody($bib);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function mapsearchAction(){
|
||||||
|
$this->_helper->layout->disableLayout();
|
||||||
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
|
include_once("data/Metadata.php");
|
||||||
|
$md = new Metadata($this->db);
|
||||||
|
|
||||||
|
$options = $this->_getParam('opt');
|
||||||
|
if(isset($options['east']))
|
||||||
|
$options['east'] = (float)$options['east'];
|
||||||
|
if(isset($options['west']))
|
||||||
|
$options['west'] = (float)$options['west'];
|
||||||
|
if(isset($options['north']))
|
||||||
|
$options['north'] = (float)$options['north'];
|
||||||
|
if(isset($options['south']))
|
||||||
|
$options['south'] = (float)$options['south'];
|
||||||
|
|
||||||
|
$data = $md->DatasFilter($options);
|
||||||
|
|
||||||
|
$this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,12 +30,44 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
$(document).ready(function(e) {
|
||||||
|
$.ajax({
|
||||||
|
'type':"POST",
|
||||||
|
'url':'/author/apply',
|
||||||
|
'data':'ac=mydata',
|
||||||
|
'success':function(data){
|
||||||
|
datareceive(data);
|
||||||
|
},
|
||||||
|
'beforeSend':function(){
|
||||||
|
$('#search_btn').html('Searching...');
|
||||||
|
},
|
||||||
|
'timeout': 20000,
|
||||||
|
'error': function(){
|
||||||
|
alert('处理中出现问题,请重试');
|
||||||
|
$('#data_'+uuid).html('');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
function doSearch(){
|
function doSearch(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'type':"POST",
|
'type':"POST",
|
||||||
'url':'/author/apply',
|
'url':'/author/apply',
|
||||||
'data':'ac=search&q='+$('#keyword').val(),
|
'data':'ac=search&q='+$('#keyword').val(),
|
||||||
'success':function(data){
|
'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 (isObject(data))
|
||||||
{
|
{
|
||||||
if(typeof(data.error)!='undefined')
|
if(typeof(data.error)!='undefined')
|
||||||
|
@ -56,17 +88,8 @@ function doSearch(){
|
||||||
alert('无搜索结果');
|
alert('无搜索结果');
|
||||||
}
|
}
|
||||||
$('#search_btn').html('搜索');
|
$('#search_btn').html('搜索');
|
||||||
},
|
|
||||||
'beforeSend':function(){
|
|
||||||
$('#search_btn').html('Searching...');
|
|
||||||
},
|
|
||||||
'timeout': 20000,
|
|
||||||
'error': function(){
|
|
||||||
alert('处理中出现问题,请重试');
|
|
||||||
$('#data_'+uuid).html('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function apply(uuid){
|
function apply(uuid){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
'type':"POST",
|
'type':"POST",
|
||||||
|
|
|
@ -3,86 +3,215 @@
|
||||||
$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'=>'空间导航');
|
||||||
?>
|
?>
|
||||||
|
<style type="text/css">
|
||||||
|
#data_canvas .well {background:#FFF;}
|
||||||
|
</style>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
<?= $this->render('breadcrumbs.phtml'); ?>
|
<?= $this->render('breadcrumbs.phtml'); ?>
|
||||||
<?= $this->partial('data/tools.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>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
<h4>将地图中范围调整至要搜索数据的范围,然后点击“搜索数据”按钮查看当前范围的所有数据</h4>
|
||||||
|
</div>
|
||||||
|
<hr />
|
||||||
|
<div class="row-fluid">
|
||||||
|
<div class="span6">
|
||||||
|
<div><button class="btn btn-large btn-block" type="button" id="searchbtn" onclick="mapmethods.action(map,1);">查看数据</button></div>
|
||||||
|
<hr />
|
||||||
|
<div id="map_canvas" style="height:500px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<div><button class="btn btn-large btn-block" type="button" onclick="$('#data_canvas').html('');">清除列表</button></div>
|
||||||
|
<hr />
|
||||||
|
<div class="well well-small" style="height:500px;overflow-y:scroll;">
|
||||||
|
<ul id="data_canvas" class="unstyled">
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</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>
|
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var map;
|
$(function() {
|
||||||
|
|
||||||
map = new OpenLayers.Map('map');
|
});
|
||||||
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
var gphy = new OpenLayers.Layer.Google(
|
window.onload = loadScript;
|
||||||
"Google Physical",
|
|
||||||
{type: google.maps.MapTypeId.TERRAIN}
|
// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
);
|
);
|
||||||
var gmap = new OpenLayers.Layer.Google(
|
|
||||||
"Google Streets", // the default
|
rectangle = new google.maps.Rectangle({
|
||||||
{numZoomLevels: 20}
|
bounds: bounds,
|
||||||
);
|
editable: false
|
||||||
var ghyb = new OpenLayers.Layer.Google(
|
|
||||||
"Google Hybrid",
|
|
||||||
{type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}
|
|
||||||
);
|
|
||||||
var gsat = new OpenLayers.Layer.Google(
|
|
||||||
"Google Satellite",
|
|
||||||
{type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
|
|
||||||
);
|
|
||||||
geojson_layer = new OpenLayers.Layer.Vector("Data Boundary", {
|
|
||||||
strategies: [new OpenLayers.Strategy.Fixed()],
|
|
||||||
protocol: new OpenLayers.Protocol.HTTP({
|
|
||||||
url: "/service/json<?php echo $this->params; ?>",
|
|
||||||
format: new OpenLayers.Format.GeoJSON()
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
rectangle.setMap(map);
|
||||||
|
}else{
|
||||||
|
RemoveRectangle();
|
||||||
|
|
||||||
map.addLayers([gphy, gmap, ghyb, gsat,geojson_layer]);
|
var position = new google.maps.LatLng(south,east);
|
||||||
|
|
||||||
// Google.v3 uses EPSG:900913 as projection, so we have to
|
var marker = new google.maps.Marker({
|
||||||
// transform our coordinates
|
position: position,
|
||||||
map.setCenter(new OpenLayers.LonLat(102, 36).transform(
|
map: map,
|
||||||
new OpenLayers.Projection("EPSG:4326"),
|
});
|
||||||
map.getProjectionObject()
|
|
||||||
), 5);
|
|
||||||
|
|
||||||
var sf = new OpenLayers.Control.SelectFeature(geojson_layer,{onSelect:onFeatureSelect,onUnselect:onFeatureUnselect});
|
markers.push(marker);
|
||||||
map.addControl(sf);
|
|
||||||
sf.activate();
|
|
||||||
|
|
||||||
for (var i=map.layers.length-1; i>=0; --i) {
|
|
||||||
map.layers[i].animationEnabled = this.checked;
|
|
||||||
};
|
|
||||||
|
|
||||||
function onPopupClose(evt) {
|
|
||||||
selectControl.unselect(selectedFeature);
|
|
||||||
}
|
}
|
||||||
function onFeatureSelect(feature) {
|
|
||||||
selectedFeature = feature;
|
|
||||||
popup = new OpenLayers.Popup.FramedCloud("chicken",
|
|
||||||
feature.geometry.getBounds().getCenterLonLat(),
|
}
|
||||||
null,
|
|
||||||
"<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>",
|
var mapmethods = {
|
||||||
null, false, onPopupClose);
|
trigger : function(triggername,map){
|
||||||
feature.popup = popup;
|
google.maps.event.addListener(map, triggername,function(){
|
||||||
map.addPopup(popup);
|
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);
|
||||||
}
|
}
|
||||||
function onFeatureUnselect(feature) {
|
|
||||||
map.removePopup(feature.popup);
|
|
||||||
feature.popup.destroy();
|
|
||||||
feature.popup = null;
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -482,7 +482,7 @@ var zoomlevel = 1;
|
||||||
var bound = {
|
var bound = {
|
||||||
lat:<?= ($md->south+$md->north)/2; ?>,
|
lat:<?= ($md->south+$md->north)/2; ?>,
|
||||||
lng:<?= ($md->east+$md->west)/2; ?>,
|
lng:<?= ($md->east+$md->west)/2; ?>,
|
||||||
zoom:<?php if ($md->north==$md->south) { ?> 10 <?php }else {?> 16 <?php }?>,
|
zoom:<?php if ($md->north==$md->south) { ?> 10 <?php }else {?> 6 <?php }?>,
|
||||||
east:<?= $md->east; ?>,
|
east:<?= $md->east; ?>,
|
||||||
west:<?= $md->west; ?>,
|
west:<?= $md->west; ?>,
|
||||||
south:<?= $md->south; ?>,
|
south:<?= $md->south; ?>,
|
||||||
|
|
|
@ -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>
|
||||||
|
@ -202,6 +189,8 @@
|
||||||
<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>
|
||||||
|
|
|
@ -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))
|
||||||
|
@ -131,6 +131,7 @@ 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";
|
||||||
|
|
||||||
|
@ -138,6 +139,7 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
||||||
$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))
|
||||||
|
|
|
@ -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,6 +259,8 @@ function initialize() {
|
||||||
|
|
||||||
function setRectangle(east,west,south,north){
|
function setRectangle(east,west,south,north){
|
||||||
|
|
||||||
|
if(east.toFixed(1) != west.toFixed(1) && south.toFixed(1)!= north.toFixed(1) ){
|
||||||
|
|
||||||
bounds = new google.maps.LatLngBounds(
|
bounds = new google.maps.LatLngBounds(
|
||||||
new google.maps.LatLng(south,west),
|
new google.maps.LatLng(south,west),
|
||||||
new google.maps.LatLng(north,east)
|
new google.maps.LatLng(north,east)
|
||||||
|
@ -271,6 +273,18 @@ function setRectangle(east,west,south,north){
|
||||||
|
|
||||||
rectangle.setMap(map);
|
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));
|
||||||
|
|
Loading…
Reference in New Issue