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

159 lines
7.1 KiB
PHTML
Executable File

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/static/js/jqgalscroll.js');
$this->headScript()->appendFile('/static/js/slides.min.jquery.js');
$this->headLink()->appendStylesheet('/static/css/jqGalScroll.css');
$auth = Zend_Auth::getInstance();
?>
<div id="index" class="full clear">
<div class="width2 fleft">
<div class="tbox">
<div class="title corners-top"><a href="<?= $this->feature['detailurl']; ?>"><?= $this->feature['title']; ?></a><span class="more"><a href="/data/feature" >以往推荐>></a></span></div>
<div class="content">
<img src="<?= $this->feature['imgurl']; ?>" alt="特色数据集" id="featureimg" />
<?= $this->feature['description']; ?>
<span id="links"><a href="<?= $this->feature['detailurl']; ?>">详细</a></span>
</div>
</div>
<div class="dmad" style="margin:10px 0px;overflow:hidden;width:660px;height:120px;">
<div id="slides">
<div class="slides_container">
<?php
for($i=0;$i<=6;$i++)
{?>
<div class="slide">
<img src="/static/images/dmad<?= $i; ?>.jpg" />
</div>
<?php }?>
</div>
</div>
</div>
<div class="tbox mt12">
<div class="title corners-top"><a href="/data/<?php echo $this->mdrandom->uuid; ?>" title="<?php echo $this->mdrandom->title; ?>"><?php echo $this->mdrandom->title; ?></a><span class="more"><a href="/data" >更多数据>></a></span></div>
<div class="content">
<img src="/service/thumb/id/<?php echo $this->mdrandom->id; ?>" alt="特色数据集" class="thumbimg" />
<?php echo mb_strlen($this->mdrandom->description)>400?$this->escape(mb_substr($this->mdrandom->description,0,400,'UTF-8').'...'):$this->escape($this->mdrandom->description);?>
<span id="links"><a href="/data/<?php echo $this->mdrandom->uuid; ?>">详细</a></span>
</div>
</div>
<div class="tbox width4 mt12 fleft">
<div class="title corners-top">数据导航</div>
<div class="content">
<div id="search_types">
<ul>
<li><a href="/data/category">分类浏览</a></li>
<li><a href="/data/tag">关键词导航</a></li>
<li><a href="/data/timeline">时间轴导航</a></li>
<li><a href="/data/map">空间导航</a></li>
<li><a href="/data/timemap">时空导航</a></li>
</ul>
<div id="search_box">
<form id="search" enctype="application/x-www-form-urlencoded" action="/data/search" method="post">
<p><input type="text" name="q" value="" class="keywords" /></p>
<p><button type="submit" class="btn" onclick="">站内搜索</button></p>
</form>
</div>
</div>
</div>
</div>
<div class="tbox width4 mt12 fright">
<div class="title corners-top">用户服务</div>
<div class="content">
- <span><a href="/data/offlineapp">最近20条离线数据服务记录</a></span><span>(共<?= $this->offlinenum; ?>)</span><br />
- <span><a href="/about/contact">联系我们</a></span><br />
- <span><a href="/data/request">如何申请数据</a></span><br />
- <span><a href="/data/submit">如何发布数据</a></span><br />
- <span><a href="/about/terms">使用条款</a></span><br />
</div>
</div>
</div><!-- left -->
<div class="width3 fright">
<div class="tbox">
<div class="title corners-top">最新上线数据</div>
<div class="content">
<ul>
<?php foreach($this->lastmd as $i=>$md) : ?>
<li><img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="tbox mt12">
<ul id='slideshowHolder' style="width:278px;height:220px;overflow:hidden;">
<?php
foreach ($this->mdrandoms as $v)
{
echo '<li><a href="/data/'.$v->uuid.'" target="_blank"><img src="/service/thumb/id/'.$v->id.'" alt="'.$v->title.'" /></a></li>';
}
?>
</ul>
</div>
<script>
</script>
<div class="tbox mt12">
<div class="title corners-top">在线下载热门数据</div>
<div class="content">
<ul>
<?php foreach($this->mdtop as $i=>$md) : ?>
<li><img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="tbox mt12">
<div class="title corners-top">离线申请热门数据</div>
<div class="content">
<ul>
<?php foreach($this->offlinemdtop as $i=>$md) : ?>
<li><img src="/images/no<?php echo $i+1; ?>.gif" align="absmiddle" style="border-width:0px;" />
<a class="item" href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="tbox mt12">
<div class="title corners-top">统计</div>
<div class="content">
<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>
</ul>
</div>
</div>
</div><!-- right -->
</div>
<script>
$(function(){
var startSlide = 1;
$('#slides').slides({
preload: true,
preloadImage: 'images/loading.gif',
generatePagination: false,
play: 5000,
pause: 2500,
hoverPause: false,
start: startSlide
});
$("#slideshowHolder").jqGalScroll({
speed:1,
width: 278,
height: 220,
direction : 'vertical'
});
});
</script>