westdc-zf1/application/default/views/scripts/index/index.phtml

184 lines
6.3 KiB
PHTML
Raw Normal View History

2011-10-26 03:21:28 +00:00
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/index.css');
$this->theme->AppendPlus($this,'jquery');
$this->theme->AppendPlus($this,'slides');
2011-10-26 03:21:28 +00:00
$auth = Zend_Auth::getInstance();
?>
<div id="index">
<div id="leftPanel">
2011-10-29 12:13:12 +00:00
<div class="title">在线下载热门数据</div>
2011-10-26 03:21:28 +00:00
<ul>
<?php foreach($this->mdtop as $i=>$md) : ?>
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />&nbsp;
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
2011-11-01 07:59:38 +00:00
2011-10-29 12:13:12 +00:00
<div class="title">离线申请热门数据</div>
2011-10-26 03:21:28 +00:00
<ul>
2011-10-29 12:13:12 +00:00
<?php foreach($this->offlinemdtop as $i=>$md) : ?>
<li> <img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />&nbsp;
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
2011-10-26 03:21:28 +00:00
<div class="title">&nbsp;</div>
<p class="subtitle">统计数据显示,目前本站:</p>
<ul>
<li class="item"><span class="symbol">&nbsp;</span>元数据 <strong>
<span><?php echo $this->metanum; ?></span></strong></li>
<li class="item"><span class="symbol">&nbsp;</span>在线数据 <strong><?php echo number_format($this->onlinesize/1000,2,'.',''); ?> GB</strong></li>
<li class="item"><span class="symbol">&nbsp;</span>总数据 <strong><?php echo number_format(($this->onlinesize+$this->offlinesize)/1000,2,'.',''); ?> GB</strong></li>
<li class="item"><span class="symbol">&nbsp;</span>总注册用户&nbsp;<strong><span><?php echo $this->usernum; ?></span> </strong>&nbsp;</li>
2011-10-29 12:13:12 +00:00
</ul>
2011-10-26 03:21:28 +00:00
</div>
2011-11-01 07:59:38 +00:00
<div id="sidebar">
<div class="title">随机推荐</div>
2011-10-30 08:05:42 +00:00
<a href="/data/<?php echo $this->mdrandom->uuid; ?>"><span><?php echo $this->mdrandom->title; ?></span>
2011-11-01 07:59:38 +00:00
<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>
2011-10-29 12:13:12 +00:00
<div class="title">专题数据集</div>
<ul>
2011-11-01 07:59:38 +00:00
<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>
2011-10-29 12:13:12 +00:00
<li class="item"><a href="/data/onlinelist">在线数据清单</a></li>
<li class="item"><a href="/data/offlinelist">离线数据清单</a></li>
2011-11-01 07:59:38 +00:00
<li class="item">
<a href="/data/advancesearch">高级搜索</a>
</li>
<li class="item"><form id="search" enctype="application/x-www-form-urlencoded" action="/search" method="get">
2011-11-01 07:59:38 +00:00
<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>
2011-10-29 12:13:12 +00:00
<div class="title">友情链接</div>
<ul>
2011-10-30 08:05:42 +00:00
<li class="extlink">&nbsp;<a href="http://heihe.westgis.ac.cn" target="_blank">数字黑河</a></li>
<li class="extlink">&nbsp;<a href="http://web.nuist.edu.cn/DQKX/nadsc/" target="_blank">南京大气资料服务中心</a></li>
<li class="extlink">&nbsp;<a href="http://www.sciencedata.cn" target="_blank">科学数据共享工程</a></li>
2011-10-29 12:13:12 +00:00
</ul>
2011-11-01 07:59:38 +00:00
</div> <!-- sidebar -->
2011-10-26 03:21:28 +00:00
<div id="rightPanel">
<div id="feature">
<div id="slides">
<div class="slides_container">
<?php
foreach($this->news as $k=>$v)
{
echo '<div class="slide">'.
'<div class="thumb"><img src="'.$v['image'].'" /></div>'.
2012-12-28 07:24:14 +00:00
'<div class="content">'.
'<div class="description"><h2><a href="'.$v['url'].'">'.$v['title'].'</a><span>['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h2>'.
''.$v['description'].'</div>'.
'</div>'.
'</div>';
}
?>
</div>
2012-12-28 08:53:28 +00:00
<a href="#" class="prev"><img src="/static/img/nyro/prev.gif" width="15" height="23" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="/static/img/nyro/next.gif" width="15" height="23" alt="Arrow Next"></a>
</div>
2011-10-26 03:21:28 +00:00
</div>
2011-10-29 12:13:12 +00:00
<div id="itemCd">
2012-12-31 03:48:10 +00:00
<ul class="news-list">
<?php
foreach($this->list_news as $k=>$v)
{
echo '<li>[<a href="'.$v['type_url'].'">'.$v['type_title'].'</a>] <a href="'.$v['url'].'">'.$v['title'].'</a><span>['.date("Y-m-d",strtotime($v['ts_published'])).']</span></li>';
}
?>
</ul>
2011-11-01 07:59:38 +00:00
</div>
2011-10-29 12:13:12 +00:00
<div class="service_title">数据服务</div>
<div class="services_Item">
2011-10-26 03:21:28 +00:00
<a href="/data/service">用户服务</a><br />
2011-11-01 07:59:38 +00:00
-<span><a href="/data/offlineapp">最近20条离线数据服务记录</a></span><span>(共<?= $this->offlinenum; ?>)</span><br />
-<span><a href="/about/contact">联系我们</a></span>
2012-01-04 07:33:57 +00:00
<span><a href="/data/request">如何申请数据</a></span>
<span><a href="/data/submit">如何发布数据</a></span>
2011-10-26 03:21:28 +00:00
</div>
2011-11-09 02:51:09 +00:00
</div>
2011-10-26 03:21:28 +00:00
</div>
</div>
<script>
var startSlide = 1;
$('#slides').slides({
preload: true,
preloadImage: 'images/loading.gif',
generatePagination: true,
2012-12-28 08:53:28 +00:00
//generateNextPrev: true,
play: 5000,
pause: 2500,
hoverPause: true,
2012-12-28 08:53:28 +00:00
start: startSlide,
next: 'next',
prev: 'prev',
effect: 'fade'
});
2012-12-28 07:24:14 +00:00
$(function() {
index.init();
2012-12-28 08:53:28 +00:00
index.npctl();
2012-12-28 07:24:14 +00:00
});
var index = {
init : function(){
$('.content').css('opacity',0.7);
2012-12-28 08:53:28 +00:00
},
npctl : function(){
$('#slides').hover(
function(){
$('.prev').css('left',0);
$('.next').css('left',475);
},
function(){
$('.prev').css('left',-20);
$('.next').css('left',520);
}
);
2012-12-28 07:24:14 +00:00
}
}
</script>