fix #231, 重新设计首页
This commit is contained in:
parent
e16c4a5ad8
commit
65acc205c5
|
@ -34,9 +34,13 @@ class IndexController extends Zend_Controller_Action
|
||||||
$sql="select * from datasetcd order by random()";
|
$sql="select * from datasetcd order by random()";
|
||||||
$this->view->datasetcd=$this->db->fetchRow($sql);
|
$this->view->datasetcd=$this->db->fetchRow($sql);
|
||||||
//下载最多数据(top 5)
|
//下载最多数据(top 5)
|
||||||
$sql="select uuid,title,id from metadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid group by m.id order by count(d.uuid) desc limit 5)";
|
$sql="select uuid,title,id from normalmetadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid where m.datatype=0 group by m.id order by count(d.uuid) desc limit 5)";
|
||||||
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
|
||||||
$this->view->mdtop=$this->db->fetchAll($sql);
|
$this->view->mdtop=$this->db->fetchAll($sql);
|
||||||
|
$sql="select uuid,title,id from normalmetadata where id in (select m.id from metadata m left join dataorder d on m.uuid=d.uuid where m.datatype=1 group by m.id order by count(d.uuid) desc limit 5)";
|
||||||
|
$this->view->offlinemdtop=$this->db->fetchAll($sql);
|
||||||
|
$sql="select m.uuid,m.title,m.id,m.description from normalmetadata m left join thumbnail t on m.id=t.id where length(t.data)>2 order by random()";
|
||||||
|
$this->view->mdrandom=$this->db->fetchRow($sql);
|
||||||
//搜索
|
//搜索
|
||||||
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
$this->view->addHelperPath('helper','Zend_View_Helper_');
|
||||||
$searchform=new SearchForm();
|
$searchform=new SearchForm();
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
?>
|
?>
|
||||||
<div id="index">
|
<div id="index">
|
||||||
<div id="leftPanel">
|
<div id="leftPanel">
|
||||||
<div class="title">下载热门数据</div>
|
<div class="title">在线下载热门数据</div>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($this->mdtop as $i=>$md) : ?>
|
<?php foreach($this->mdtop as $i=>$md) : ?>
|
||||||
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
|
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
|
||||||
|
@ -16,21 +16,14 @@
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="title">快速链接</div>
|
<div class="title">离线申请热门数据</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="/data/request">如何申请数据</a></span></li>
|
<?php foreach($this->offlinemdtop as $i=>$md) : ?>
|
||||||
<li class="item"><span class="symbol">• </span><span class="special"><a href="/data/onlinelist">在线数据清单</a></span></li>
|
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
|
||||||
<li class="item"><span class="symbol">• </span><span class="special"><a href="/data/offlinelist">离线数据清单</a></span></li>
|
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="/data/submit">如何向数据中心提交数据</a></span></li>
|
</li>
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="/netkites/apply">申请移动IP文献查询服务</a></span></li>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="title">友情链接</div>
|
|
||||||
<ul>
|
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="http://heihe.westgis.ac.cn" target="_blank">数字黑河</a></span></li>
|
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="http://web.nuist.edu.cn/DQKX/nadsc/" target="_blank">南京大气资料服务中心</a></span></li>
|
|
||||||
<li class="item"><span class="symbol">• </span><span><a href="http://www.sciencedata.cn" target="_blank">科学数据共享工程</a></span></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="title">统 计</div>
|
<div class="title">统 计</div>
|
||||||
<p class="subtitle">统计数据显示,目前本站:</p>
|
<p class="subtitle">统计数据显示,目前本站:</p>
|
||||||
|
@ -41,59 +34,116 @@
|
||||||
<li class="item"><span class="symbol">• </span>总数据 <strong><?php echo number_format(($this->onlinesize+$this->offlinesize)/1000,2,'.',''); ?> GB</strong></li>
|
<li class="item"><span class="symbol">• </span>总数据 <strong><?php echo number_format(($this->onlinesize+$this->offlinesize)/1000,2,'.',''); ?> GB</strong></li>
|
||||||
<li class="item"><span class="symbol">• </span>总注册用户 <strong><span><?php echo $this->usernum; ?></span> </strong> 人</li>
|
<li class="item"><span class="symbol">• </span>总注册用户 <strong><span><?php echo $this->usernum; ?></span> </strong> 人</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="sidebar">
|
||||||
|
<div class="title">随机推荐</div>
|
||||||
|
|
||||||
|
<a href="/data/<?php echo $this->mdrandom->uuid; ?>"><?php echo $this->mdrandom->title; ?>
|
||||||
|
<img src="/service/thumb/id/<?php echo $this->mdrandom->id; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($this->mdrandom->description)>400?$this->escape(mb_substr($this->mdrandom->description,0,400,'UTF-8').'...'):$this->escape($this->mdrandom->description);?>" />
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="title">专题数据集</div>
|
||||||
|
<ul>
|
||||||
|
<li class="item"><a href="/heihe">“黑河计划”数据整理服务</a></li>
|
||||||
|
<li class="item"><a href="/water">黑河综合遥感联合试验</a></li>
|
||||||
|
</ul>
|
||||||
|
<div class="title">数据导航</div>
|
||||||
|
<ul>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/category">分类浏览</a>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/tag">关键词导航</a>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/series">数据集序列</a>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/timeline">时间轴导航</a>
|
||||||
|
</li>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/timemap">时空导航</a>
|
||||||
|
</li>
|
||||||
|
<li class="item"><a href="/data/onlinelist">在线数据清单</a></li>
|
||||||
|
<li class="item"><a href="/data/offlinelist">离线数据清单</a></li>
|
||||||
|
<li class="item">
|
||||||
|
<a href="/data/advancesearch">高级搜索</a>
|
||||||
|
</li>
|
||||||
|
<li class="item"><form id="search" enctype="application/x-www-form-urlencoded" action="/data/search" method="post">
|
||||||
|
<input type="text" name="q" id="q" value="回车搜索标题和摘要" onfocus="myfocus(this);" onblur="myblur(this);">
|
||||||
|
<input type="hidden" name="submit" value="submit">
|
||||||
|
</form></li>
|
||||||
|
<script>
|
||||||
|
function myfocus(element) {
|
||||||
|
if (element.value == '回车搜索标题和摘要') {
|
||||||
|
element.value = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function myblur(element) {
|
||||||
|
if (element.value == '') {
|
||||||
|
element.value = '回车搜索标题和摘要';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<div class="title">友情链接</div>
|
||||||
|
<ul>
|
||||||
|
<li class="extlink"><span class="symbol">• </span><span><a href="http://heihe.westgis.ac.cn" target="_blank">数字黑河</a></span></li>
|
||||||
|
<li class="extlink"><span class="symbol">• </span><span><a href="http://web.nuist.edu.cn/DQKX/nadsc/" target="_blank">南京大气资料服务中心</a></span></li>
|
||||||
|
<li class="extlink"><span class="symbol">• </span><span><a href="http://www.sciencedata.cn" target="_blank">科学数据共享工程</a></span></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
</div> <!-- sidebar -->
|
||||||
|
|
||||||
<div id="rightPanel">
|
<div id="rightPanel">
|
||||||
<div id="feature">
|
<div id="feature">
|
||||||
<div class="alpha-shadow">
|
<div class="alpha-shadow">
|
||||||
<div><img src="<?= $this->feature['imgurl']; ?>" alt="特色数据集光盘" style="border-width:1px;border-style:solid;" /></div>
|
<div><img src="<?= $this->feature['imgurl']; ?>" alt="特色数据集" style="border-width:1px;border-style:solid;" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="title"><?= $this->feature['title']; ?></div>
|
<div class="title"><?= $this->feature['title']; ?></div>
|
||||||
<div class="description"><?= $this->feature['description']; ?>
|
<div class="description">
|
||||||
<p><a href="<?= $this->feature['detailurl']; ?>">详细</a></p>
|
<?= $this->feature['description']; ?>
|
||||||
</div>
|
</div>
|
||||||
<div ><span id="links"> </span>
|
<span id="links"> <a href="<?= $this->feature['detailurl']; ?>">详细</a> </span>
|
||||||
<span class="more"> <a href="/data/feature" >以往推荐</a></span>
|
<span class="more"> <a href="/data/feature" >以往推荐</a></span>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="itemCd">
|
<div id="itemCd">
|
||||||
<div class="alpha-shadow" id="image"><img src="<?= $this->datasetcd['img']; ?>" /></div>
|
<div class="alpha-shadow" id="image"><img src="<?= $this->datasetcd['img']; ?>" /></div>
|
||||||
<div id="title"><?= $this->datasetcd['title']; ?></div>
|
<div id="title"><?= $this->datasetcd['title']; ?></div>
|
||||||
<div id="descript"><span id="intro">简介:</span><?= $this->datasetcd['descript']; ?></div>
|
<div id="descript"><span id="intro">简介:</span><?= $this->datasetcd['descript']; ?></div>
|
||||||
|
|
||||||
<div id="link">
|
<div id="link">
|
||||||
<a href="/data/download/uuid/<?php echo $this->datasetcd['uuid']; ?>">直接下载</a>
|
<a href="/data/<?php echo $this->datasetcd['uuid']; ?>">详细元数据</a>
|
||||||
| <a href="/data/<?php echo $this->datasetcd['uuid']; ?>">详细元数据</a>
|
|
||||||
| <a href='<?= $this->datasetcd['document']; ?>' >此数据集的数据文档</a> | <a href="/data/datasetcd">更多特色数据集>></a>
|
| <a href='<?= $this->datasetcd['document']; ?>' >此数据集的数据文档</a> | <a href="/data/datasetcd">更多特色数据集>></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="dataLink">
|
<div class="service_title">数据服务</div>
|
||||||
<?= $this->searchform; ?>
|
|
||||||
<a href="/data/advancesearch">高级搜索</a>
|
|
||||||
<a href="/data/datasetcd">特色数据集光盘</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="contPane_services">
|
<div class="services_Item">
|
||||||
<div class="title"><span>数据服务</span></div>
|
|
||||||
<div class="contPane_services_container">
|
|
||||||
<div class="contPane_services_Item">
|
|
||||||
<a href="/data/newsletter">数据通讯</a>
|
<a href="/data/newsletter">数据通讯</a>
|
||||||
<span>不定期发布数据通讯,通告中心动态、最新数据和工具</span><br />
|
<span>不定期发布数据通讯,通告中心动态、最新数据和工具</span><br />
|
||||||
-<span><a href='/images/newsletter/<?php echo $this->newsletter; ?>' target="_blank">第<?php echo $this->newsletterno; ?>期数据通讯</a>
|
-<span><a href='/images/newsletter/<?php echo $this->newsletter; ?>' target="_blank">第<?php echo $this->newsletterno; ?>期数据通讯</a>
|
||||||
(pdf)</a> </span><br />
|
(pdf)</a> </span><br />
|
||||||
</div>
|
</div>
|
||||||
<div class="contPane_services_Item">
|
<div class="services_Item">
|
||||||
<a href="/data/service">用户服务</a><br />
|
|
||||||
-<span><a href="/data/offlineapp">最近20条离线数据服务记录</a></span><span style="font-weight:bold;color:Gray;">(<?= $this->offlinenum; ?>)</span>
|
|
||||||
</div>
|
|
||||||
<div class="contPane_services_Item">
|
|
||||||
<a href="/knowledge">文献服务</a>
|
<a href="/knowledge">文献服务</a>
|
||||||
<span>数据中心依托中科院资环信息中心提供西部环境与生态文献和文档服务</span><br />
|
<span>数据中心依托中科院资环信息中心提供西部环境与生态文献和文档服务</span>
|
||||||
-<span><a href="/knowledge/netkites">移动文献查询服务...</a></span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="services_Item">
|
||||||
</div>
|
<a href="/data/service">用户服务</a><br />
|
||||||
|
-<span><a href="/data/offlineapp">最近20条离线数据服务记录</a></span><span>(共<?= $this->offlinenum; ?>)</span><br />
|
||||||
|
-<span><a href="/about/contact">联系我们</a></span>
|
||||||
|
<span><a href="/about/request">如何申请数据</a></span>
|
||||||
|
<span><a href="/about/submit">如何发布数据</a></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue