merge heihedata branch from r3540 to r3552.
This commit is contained in:
commit
561628ced4
|
@ -24,9 +24,11 @@
|
||||||
<li><a href="/admin/test">数据测试管理</a></li>
|
<li><a href="/admin/test">数据测试管理</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<script>
|
<script>
|
||||||
$.getJSON("/admin/sys/getmsg", function(data) {
|
$.getJSON("/admin/sys/getmsg", function(data) {
|
||||||
var msg = data.count;
|
var msg = data.count;
|
||||||
if(msg>0){$.jGrowl('<a href="/admin/sys/message/" style="color:#FFF;text-decoration:underline;font-weight:bold;">有'+data.count+'条新消息</a>', { sticky: true });}
|
if(msg>0){$.jGrowl('<a href="/admin/sys/message/" style="color:#FFF;text-decoration:underline;font-weight:bold;">有'+data.count+'条新消息</a>', { sticky: true });}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
-->
|
|
@ -85,7 +85,7 @@ class IndexController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->list_news = $rows;
|
$this->view->list_news = $rows;
|
||||||
|
|
||||||
$sql="select * from datadoi where ts_published is not null order by ts_published desc limit 4";
|
$sql="select d.*,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.ts_published is not null order by ts_published desc limit 4";
|
||||||
$sth = $this->db->query($sql);
|
$sth = $this->db->query($sql);
|
||||||
$this->view->dois = $sth->fetchAll();
|
$this->view->dois = $sth->fetchAll();
|
||||||
|
|
||||||
|
|
|
@ -1387,7 +1387,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$ris='';
|
$ris='';
|
||||||
if ($lang=='cn' && !empty($uuid))
|
if ($lang=='cn' && !empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
$sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
|
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
|
||||||
$ris.='TY - JOUR'."\r\n";
|
$ris.='TY - JOUR'."\r\n";
|
||||||
|
@ -1396,7 +1396,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$ris.='A1 - '.$a."\r\n";
|
$ris.='A1 - '.$a."\r\n";
|
||||||
}
|
}
|
||||||
$ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n";
|
$ris.='Y1 - '.(empty($row['publish_year'])?date('Y/m/d',strtotime($row['ts_published'])):date('Y/m/d',strtotime($row['publish_year'])))."\r\n";
|
||||||
$ris.='JF - '.$row['publisher']."\r\n";
|
$ris.='JF - '.$row['publisher']."\r\n";
|
||||||
$ris.='JA - '.$row['publisher']."\r\n";
|
$ris.='JA - '.$row['publisher']."\r\n";
|
||||||
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
|
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
|
||||||
|
@ -1407,7 +1407,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
else if ($lang=='en' && !empty($uuid))
|
else if ($lang=='en' && !empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
$sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
|
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
|
||||||
$ris.='TY - JOUR'."\r\n";
|
$ris.='TY - JOUR'."\r\n";
|
||||||
|
@ -1416,7 +1416,7 @@ class ServiceController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$ris.='A1 - '.$a."\r\n";
|
$ris.='A1 - '.$a."\r\n";
|
||||||
}
|
}
|
||||||
$ris.='Y1 - '.date('Y/m/d',strtotime($row['ts_published']))."\r\n";
|
$ris.='Y1 - '.(empty($row['publish_year'])?date('Y/m/d',strtotime($row['ts_published'])):date('Y/m/d',strtotime($row['publish_year'])))."\r\n";
|
||||||
$ris.='JF - '.$row['publisher_en']."\r\n";
|
$ris.='JF - '.$row['publisher_en']."\r\n";
|
||||||
$ris.='JA - '.$row['publisher_en']."\r\n";
|
$ris.='JA - '.$row['publisher_en']."\r\n";
|
||||||
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
|
$ris.='UR - http://dx.doi.org/'.$row['doi']."\r\n";
|
||||||
|
@ -1443,30 +1443,30 @@ class ServiceController extends Zend_Controller_Action
|
||||||
$bib='';
|
$bib='';
|
||||||
if ($lang=='cn' && !empty($uuid))
|
if ($lang=='cn' && !empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
$sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$bib.='@article{'.$row['doi'].",\r\n";
|
$bib.='@article{'.$row['doi'].",\r\n";
|
||||||
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['authors'])).",\r\n";
|
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['authors'])).",\r\n";
|
||||||
$bib.=' journal = {'.$row['publisher']."},\r\n";
|
$bib.=' journal = {'.$row['publisher']."},\r\n";
|
||||||
$bib.=' publisher = {'.$row['publisher']."},\r\n";
|
$bib.=' publisher = {'.$row['publisher']."},\r\n";
|
||||||
$bib.=' title = {'.$row['title']."},\r\n";
|
$bib.=' title = {'.$row['title']."},\r\n";
|
||||||
$bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n";
|
$bib.=' year = {'.(empty($row['publish_year'])?date('Y',strtotime($row['ts_published'])):date('Y',strtotime($row['publish_year'])))."},\r\n";
|
||||||
$bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n";
|
$bib.=' month = {'.(empty($row['publish_year'])?date('m',strtotime($row['ts_published'])):date('m',strtotime($row['publish_year'])))."},\r\n";
|
||||||
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
|
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
|
||||||
$bib.=' doi = {'.$row['doi']."}\r\n";
|
$bib.=' doi = {'.$row['doi']."}\r\n";
|
||||||
$bib.="}\r\n";
|
$bib.="}\r\n";
|
||||||
}
|
}
|
||||||
else if ($lang=='en' && !empty($uuid))
|
else if ($lang=='en' && !empty($uuid))
|
||||||
{
|
{
|
||||||
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
$sql="select d.*,m.description,m.ts_published as publish_year from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
|
||||||
$row=$this->db->fetchRow($sql);
|
$row=$this->db->fetchRow($sql);
|
||||||
$bib.='@article{'.$row['doi'].",\r\n";
|
$bib.='@article{'.$row['doi'].",\r\n";
|
||||||
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['author_en'])).",\r\n";
|
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['author_en'])).",\r\n";
|
||||||
$bib.=' journal = {'.$row['publisher_en']."},\r\n";
|
$bib.=' journal = {'.$row['publisher_en']."},\r\n";
|
||||||
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
|
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
|
||||||
$bib.=' title = {'.$row['title']."},\r\n";
|
$bib.=' title = {'.$row['title']."},\r\n";
|
||||||
$bib.=' year = {'.date('Y',strtotime($row['ts_published']))."},\r\n";
|
$bib.=' year = {'.(empty($row['publish_year'])?date('Y',strtotime($row['ts_published'])):date('Y',strtotime($row['publish_year'])))."},\r\n";
|
||||||
$bib.=' month = {'.date('m',strtotime($row['ts_published']))."},\r\n";
|
$bib.=' month = {'.(empty($row['publish_year'])?date('m',strtotime($row['ts_published'])):date('m',strtotime($row['publish_year'])))."},\r\n";
|
||||||
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
|
$bib.=' url = {http://dx.doi.org/'.$row['doi']."},\r\n";
|
||||||
$bib.=' doi = {'.$row['doi']."}\r\n";
|
$bib.=' doi = {'.$row['doi']."}\r\n";
|
||||||
$bib.="}\r\n";
|
$bib.="}\r\n";
|
||||||
|
|
|
@ -26,15 +26,17 @@ $this->nav[] = array('link'=>"/data/category",'title'=>'分类浏览');
|
||||||
<h4>当前浏览:<?php echo $this->codename; ?></h4>
|
<h4>当前浏览:<?php echo $this->codename; ?></h4>
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
<hr />
|
<hr />
|
||||||
<ul class="unstyled">
|
|
||||||
<?php foreach($this->metadata as $md) : ?>
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
<li class="well well-small" style="overflow:hidden;">
|
<div class="media well well-small">
|
||||||
<img src="/service/thumb/id/<?php echo $md['id'];?>" class="pull-left img-polaroid img-rounded" style="margin-right:5px" />
|
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="pull-left colorbox">
|
||||||
<h3><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a></h3>
|
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>">
|
||||||
<p><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></p>
|
</a>
|
||||||
</li>
|
<div class="media-body">
|
||||||
|
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||||
|
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
<?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($this->codename);
|
$this->headTitle($this->codename);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
$this->headLink()->appendStylesheet('/css/metadata.css');
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->nav[] = array('link'=>"/data/offline",'title'=>'离线数据浏览');
|
||||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|
||||||
$this->breadcrumb('离线数据清单');
|
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
|
||||||
?>
|
?>
|
||||||
<div class="row-fluid">
|
<div class="row-fluid">
|
||||||
|
<?= $this->render('breadcrumbs.phtml'); ?>
|
||||||
<?= $this->partial('data/tools.phtml'); ?>
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
<hr />
|
<hr />
|
||||||
<?php foreach($this->metadata as $md) : ?>
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
<div class="mditem">
|
<div class="media well well-small">
|
||||||
<a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
|
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="pull-left colorbox">
|
||||||
<a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
|
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>">
|
||||||
<a href="/data/doc/uuid/<?php echo $md['uuid'];?>"><img src="/images/doc-icon.png" /></a>
|
</a>
|
||||||
|
<div class="media-body">
|
||||||
|
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||||
|
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
<?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($this->codename);
|
$this->headTitle($this->codename);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/metadata.css');
|
$this->headLink()->appendStylesheet('/css/metadata.css');
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->nav[] = array('link'=>"/data/offline",'title'=>'在线数据浏览');
|
||||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|
||||||
$this->breadcrumb('在线数据清单');
|
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
|
||||||
?>
|
?>
|
||||||
<div>
|
<div>
|
||||||
|
<?= $this->render('breadcrumbs.phtml'); ?>
|
||||||
<?= $this->partial('data/tools.phtml'); ?>
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
<hr />
|
<hr />
|
||||||
<?php foreach($this->metadata as $md) : ?>
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
<div class="mditem">
|
<div class="media well well-small">
|
||||||
<a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
|
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="pull-left colorbox">
|
||||||
<a href="/data/xml/id/<?php echo $md['id'];?>"><img src="/images/xml.gif" /></a>
|
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>">
|
||||||
<a href="/data/doc/uuid/<?php echo $md['uuid'];?>"><img src="/images/doc-icon.png" /></a>
|
</a>
|
||||||
|
<div class="media-body">
|
||||||
|
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||||
|
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -37,7 +37,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
</p>
|
</p>
|
||||||
<?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.', '.$md->publish_year.'. 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.', '.$md->publish_year.'. 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) : ?>
|
||||||
|
|
|
@ -69,12 +69,17 @@
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h4>数据服务</h4>
|
||||||
|
<span><a href="/data/offlineapp"><i class="icon-user"></i>最近20条离线数据服务记录</a></span><span>(共<?= $this->offlinenum; ?>)</span><br />
|
||||||
|
<span><a href="/data/request"><i class="icon-tint"></i>如何申请数据</a></span>
|
||||||
|
<span><a href="/data/submit"><i class="icon-tint"></i>如何发布数据</a></span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="span8">
|
<div class="span8">
|
||||||
<h4><a href="/data/doi">最新DOI数据</a></h4>
|
<h4><a href="/data/doi">最新注册DOI数据</a></h4>
|
||||||
<ul class="unstyled">
|
<ul class="unstyled">
|
||||||
<?php foreach($this->dois as $doi) :
|
<?php foreach($this->dois as $doi) :
|
||||||
echo '<li class="well well-small"><a href="/data/'.$doi->uuid.'">'.substr($doi->authors,1,-1).'. '.$doi->title.'. '.$doi->publisher.', '.date('Y',strtotime($doi->ts_published)).'. doi:'.$doi->doi.'</a></li>';
|
echo '<li class="well well-small">['.date('Y-m-d',strtotime($doi->ts_published)).']<a href="/data/'.$doi->uuid.'">'.substr($doi->authors,1,-1).'. '.$doi->title.'. '.$doi->publisher.', '.(empty($doi->publish_year)?date('Y',strtotime($doi->ts_published)):date('Y',strtotime($doi->publish_year))).'. doi:'.$doi->doi.'</a></li>';
|
||||||
//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.', '.$md->publish_year.'. doi:'.$md->doi.']';
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
|
@ -118,16 +123,9 @@
|
||||||
<li class="item">
|
<li class="item">
|
||||||
<a href="/data/timemap"><i class="icon-globe"></i>时空导航</a>
|
<a href="/data/timemap"><i class="icon-globe"></i>时空导航</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="item"><a href="/data/onlinelist"><i class="icon-th"></i>在线数据清单</a></li>
|
|
||||||
<li class="item"><a href="/data/offlinelist"><i class="icon-th"></i>离线数据清单</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="span4">
|
<div class="span4">
|
||||||
<h4>数据服务</h4>
|
|
||||||
-<span><a href="/data/offlineapp"><i class="icon-user"></i>最近20条离线数据服务记录</a></span><span>(共<?= $this->offlinenum; ?>)</span><br />
|
|
||||||
-<span><a href="/about/contact"><i class="icon-envelope"></i>联系我们</a></span>
|
|
||||||
<span><a href="/data/request"><i class="icon-tint"></i>如何申请数据</a></span>
|
|
||||||
<span><a href="/data/submit"><i class="icon-tint"></i>如何发布数据</a></span>
|
|
||||||
<h4>统计</h4>
|
<h4>统计</h4>
|
||||||
<ul class="unstyled">
|
<ul class="unstyled">
|
||||||
<li class="item"><span class="symbol">• </span>元数据 <strong>
|
<li class="item"><span class="symbol">• </span>元数据 <strong>
|
||||||
|
|
|
@ -191,11 +191,20 @@ class ISO19115
|
||||||
$db->setFetchMode(Zend_Db::FETCH_OBJ);
|
$db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||||
//save metadata into database
|
//save metadata into database
|
||||||
try {
|
try {
|
||||||
|
if ($this->refDate)
|
||||||
|
{
|
||||||
|
$sql="insert into metadata (uuid,title,title_en,description,citation,suppinfo,fileformat,projection,datatype,filesize,ts_created,
|
||||||
|
timebegin,timeend,west,south,north,east,doi,ts_published) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
|
$db->query($sql,array($this->uuid,$this->resTitle,$this->resAltTitle,$this->idAbs,$this->citation,$this->suppinfo,$this->fileformat,
|
||||||
|
$this->projection,$this->datatype,$this->filesize,$this->mdDateSt,$this->timebegin,$this->timeend,$this->geoBox['w'],
|
||||||
|
$this->geoBox['s'],$this->geoBox['n'],$this->geoBox['e'],$this->doi,$this->refDate));
|
||||||
|
} else {
|
||||||
$sql="insert into metadata (uuid,title,title_en,description,citation,suppinfo,fileformat,projection,datatype,filesize,ts_created,
|
$sql="insert into metadata (uuid,title,title_en,description,citation,suppinfo,fileformat,projection,datatype,filesize,ts_created,
|
||||||
timebegin,timeend,west,south,north,east,doi) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
timebegin,timeend,west,south,north,east,doi) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
$db->query($sql,array($this->uuid,$this->resTitle,$this->resAltTitle,$this->idAbs,$this->citation,$this->suppinfo,$this->fileformat,
|
$db->query($sql,array($this->uuid,$this->resTitle,$this->resAltTitle,$this->idAbs,$this->citation,$this->suppinfo,$this->fileformat,
|
||||||
$this->projection,$this->datatype,$this->filesize,$this->mdDateSt,$this->timebegin,$this->timeend,$this->geoBox['w'],
|
$this->projection,$this->datatype,$this->filesize,$this->mdDateSt,$this->timebegin,$this->timeend,$this->geoBox['w'],
|
||||||
$this->geoBox['s'],$this->geoBox['n'],$this->geoBox['e'],$this->doi));
|
$this->geoBox['s'],$this->geoBox['n'],$this->geoBox['e'],$this->doi));
|
||||||
|
}
|
||||||
$id=$db->lastInsertId('metadata','id');
|
$id=$db->lastInsertId('metadata','id');
|
||||||
//处理在线资源
|
//处理在线资源
|
||||||
if ($this->onlineresource) foreach($this->onlineresource as $resource)
|
if ($this->onlineresource) foreach($this->onlineresource as $resource)
|
||||||
|
@ -549,6 +558,15 @@ class ISO19115
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//resRefDate
|
||||||
|
$refdates=$this->dom->getElementsByTagName('resRefDate');
|
||||||
|
foreach($refdates as $refdate)
|
||||||
|
{
|
||||||
|
if ($refdate->getElementsByTagName('DateTypCd')->item(0) && $refdate->getElementsByTagName('DateTypCd')->item(0)->hasAttributes() && $refdate->getElementsByTagName('DateTypCd')->item(0)->attributes->getNamedItem('value')->nodeValue=="publication")
|
||||||
|
{
|
||||||
|
$this->refDate=$refdate->getElementsByTagName('refDate')->item(0)->nodeValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
//in ISO 19115 draft.
|
//in ISO 19115 draft.
|
||||||
$ds=$this->dom->getElementsByTagName('datasetSeries');
|
$ds=$this->dom->getElementsByTagName('datasetSeries');
|
||||||
foreach($ds as $k=>$dataset)
|
foreach($ds as $k=>$dataset)
|
||||||
|
|
Loading…
Reference in New Issue