修改了页面布局

This commit is contained in:
Li Jianxuan 2012-04-01 10:42:48 +00:00
parent fcc0a2eddb
commit 3ea345f286
6 changed files with 425 additions and 337 deletions

View File

@ -4,39 +4,50 @@
$this->headTitle('分类浏览');
if (!empty($this->codename)) $this->headTitle($this->codename);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/data/category">分类浏览</a>');
if (!empty($this->codename)) $this->breadcrumb($this->codename);
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
?>
<div id='tools'>
<?= $this->partial('data/tools.phtml'); ?>
<div id="category">
<div id="category_nav" class="full clear">
<div class="title fleft">
数据集类别
</div>
<div class="categorys fright clear">
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<div class="clearfix"></div>
<div class="datalist clear mt12">
<ul id="datalist">
<?php foreach($this->metadata as $md) : ?>
<li id="data_<?php echo $md['uuid']; ?>" class="databox">
<div class="subject corners-top"><h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a></h2></div>
<div class="data_content clear">
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<div class="description"><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></div>
<div class="more"><a href="/data/<?php echo $md['uuid']; ?>">查看详细</a></div>
</div>
</li>
<?php endforeach; ?>
</ul>
</div>
<div class="page">
<?php echo $this->page->getNavigation(); ?>
</div>
</div>
</div>
<div id='leftnav'>
<fieldset><legend>数据集类别</legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php if (!empty($this->metadata)) : ?>
<div id='metacontent'>
<h1>当前浏览:<?php echo $this->codename; ?></h1>
<?php echo $this->page->getNavigation(); ?>
<hr />
<?php foreach($this->metadata as $md) : ?>
<div class="mditem">
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
</h2>
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
</div>
<?php endforeach; ?>
<?php echo $this->page->getNavigation(); ?>
</div>
<?php endif; ?>
<script>
var $container = $('#datalist');
$container.imagesLoaded(function(){
$container.masonry({
itemSelector : '.databox'
});
});
</script>

View File

@ -2,103 +2,122 @@
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/metadata.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb($this->config->title->data);
$this->breadcrumb()->setSeparator(' > ');
$this->headScript()->appendFile('/static/js/jqFancyTransitions.1.8.min.js');
?>
<div id='leftContainer'>
<div id="links">
<div class="title"><img src="/images/dbs.png" align="absmiddle" />数 据 导 航</div>
<h3>
<?php echo $this->searchform; ?>
<a href="/data/advancesearch">高级搜索</a></h3>
<h3> 分类导航</h3>
<div id='category' class="fieldlist">
<fieldset><legend><a href="/data/category">数据集类别</a></legend>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php if ($this->serie) : ?>
<div id='series' class="fieldlist">
<fieldset><legend><a href="/data/series">数据集序列</a></legend>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul></fieldset>
</div>
<?php endif; ?>
<div id='keyword' class="fieldlist">
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
foreach($this->keywords as $type=>$kcg) :
if (is_array($kcg) && count($kcg)>0 ) :
?>
<fieldset><legend><a href="/data/tag/"><?php echo $keytypezh[$type]; ?></a></legend>
<ul>
<?php foreach($kcg as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
<li class="more"><a href='/data/tag/'>...更多>>></a></li>
</ul>
</fieldset>
<?php endif;endforeach; ?>
</div>
<div class="fieldlist">
<ul><li><a href="/data/timeline">时间轴浏览</a></li>
<li><a href="/data/map">空间浏览</a></li>
<li><a href="/data/timemap">时空浏览</a></li>
<li><a href="/data/browse">数据列表浏览</a></li>
<li><a href="/data/onlinelist">在线数据清单</a></li>
<li><a href="/data/offlinelist">离线数据清单</a></li>
</ul>
</div>
</div>
<div id='toolbox'>
</div>
</div>
<div id='latest'>
<div class="title"><img src="/images/dbs.png" align="absmiddle" />数据最近更新<a href="/data/feed" target="_blank"><img src="images/rss.png"></a></div>
<div class="mditem">
<ul>
<?php foreach($this->metadata as $md) : ?>
<li> <img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
<?php endforeach; ?>
<li class="more"><a href="/data/browse">更多</a></li>
</ul>
</div>
</div>
<div id="services">
<div class="title"><img src="/images/Project24x24_24-bit.png" align="absmiddle" />&nbsp;数据服务</div>
<div class="items">
<div class="item">
<h3><a href="/data/service">用户服务</a></h3>
<p class="description">
了解数据服务内容、方式及政策</p>
<ul>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/request">如何申请数据</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/submit">如何发布数据</a></li>
</ul>
</div>
<!--<div class="item">
<h3><a href="/data/ogcwxs">在线地图服务</a></h3>
<p class="description">提供OGC WMS、WFS等在线地图服务</p>-->
</div>
<div class="item">
<h3><a href="/about/contact">联系我们</a></h3>
</div>
</div>&nbsp;
</div>
<div id="metadata" class="full clear">
<div class="width2 fleft">
<div class="tbox">
<div class="title corners-top">数据导航</div>
<div class="content" style="width:638px;">
<div id="datanav">
<h3> 分类导航</h3>
<div id='category' class="fieldlist">
<div class="subject"><a href="/data/category">数据集类别</a></div>
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<?php if ($this->serie) : ?>
<div id='series' class="fieldlist">
<div class="subject"><a href="/data/series">数据集序列</a></div>
<ul>
<?php foreach($this->serie as $cg) : ?>
<li><a href='/data/series/<?php echo $cg['id']; ?>'><?php echo $cg['name']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
foreach($this->keywords as $type=>$kcg) :
if (is_array($kcg) && count($kcg)>0 ) :
?>
<div id='keyword' class="fieldlist">
<div class="subject"><a href="/data/tag/"><?php echo $keytypezh[$type]; ?></a></div>
<ul>
<?php foreach($kcg as $cg) : ?>
<li><a href='/data/tag/<?php echo $cg['keyword']; ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
<li class="more"><a href='/data/tag/'>...更多>>></a></li>
</ul>
</div>
<?php endif;endforeach; ?>
</div>
</div>
</div><!-- 数据导航 -->
<div class="tbox width4 mt12 fleft">
<div class="title corners-top">数据导航</div>
<div class="content" style="width:288px;">
<div id="search_types">
<ul>
<li><a href="">分类浏览</a></li>
<li><a href="">关键词导航</a></li>
<li><a href="">数据集序列</a></li>
<li><a href="">时间轴导航</a></li>
<li><a href="">时空导航</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" style="width:288px;">
<ul><li><a href="/data/timeline">时间轴浏览</a></li>
<li><a href="/data/map">空间浏览</a></li>
<li><a href="/data/timemap">时空浏览</a></li>
<li><a href="/data/browse">数据列表浏览</a></li>
<li><a href="/data/onlinelist">在线数据清单</a></li>
<li><a href="/data/offlinelist">离线数据清单</a></li>
</ul>
</div>
</div>
</div><!-- left -->
<div class="width3 fright">
<div class="tbox">
<div class="title corners-top">数据最近更新</div>
<div class="content" style="width:258px;">
<ul>
<?php foreach($this->metadata as $md) : ?>
<li><img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
<?php endforeach; ?>
</ul>
</div>
</div>
<div class="tbox mt12">
<div id='slideshowHolder'>
<img src='img1.jpg' alt='img1' />
<img src='img2.jpg' alt='img2' />
<img src='img3.jpg' alt='img3' />
</div>
<script>
$(document).ready( function(){
$('#slideshowHolder').jqFancyTransitions({ width: 280, height: 280 });
});
</script>
</div>
<div class="tbox mt12">
<div class="title corners-top">数据服务</div>
<div class="content" style="width:258px;">
<h3><a href="/data/service">用户服务</a></h3>
<p class="description">
了解数据服务内容、方式及政策</p>
<ul>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/offlineapp">离线数据服务记录最近20个</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/request">如何申请数据</a></li>
<li>-&nbsp;&nbsp;&nbsp;<a href="/data/submit">如何发布数据</a></li>
</ul>
</div>
</div>
</div><!-- right -->
</div>

View File

@ -15,35 +15,132 @@
$this->headLink()->appendStylesheet('/css/colorbox.css');
$this->headScript()->appendFile('/js/jquery.idTabs.min.js');
?>
<div id="view">
<?php $md=$this->metadata;if ($md):?>
<h1><?php echo $this->escape($md->title);
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
</h1>
<div id="right">
<div id="ItemSummary">
<div id="category">
<ul><?php foreach($this->category as $cat): ?>
<li><a href="/data/category/code/<?php echo $cat->code;?>"><?php echo $this->escape($cat->name_zh);?></a></li>
<?php endforeach; ?>
</ul>
</div>
<?php
$kt='';
$i=0;
foreach($this->keys as $cg) :
if ($kt==$cg->keytype) :
$i+=1;
else :
if (!empty($kt)) echo '</ul></div>';
$kt=$cg->keytype;
<ul class="clear" id="items">
<li>
<div class="title">
<br />
</div>
<div class="content"><p>
<?php foreach($this->category as $cat): ?>
<a href="/data/category/code/<?php echo $cat->code;?>"><?php echo $this->escape($cat->name_zh);?></a>
<?php endforeach; ?></p>
</div>
</li><!-- 类别 -->
<?php
$kt='';
$i=0;
endif;
if ($i==0) echo '<div id="'.$cg->keytype.'"><ul>';
echo '<li><a href="/data/tag/key/'.urlencode($cg->keyword).'">'.$cg->keyword.'</a></li>';
endforeach;
echo '</ul></div>';
?>
foreach($this->keys as $cg) :
if ($kt==$cg->keytype) :
$i+=1;
else :
if (!empty($kt)) echo '';
$kt=$cg->keytype;
$i=0;
endif;
if($i==0)
{
$ctitle ="";
if($cg->keytype == 'discipline')
{$ctitle = "学<br />科";}
if($cg->keytype == 'place')
{$ctitle = "地<br />点";}
if($cg->keytype == 'theme')
{$ctitle = "主<br />题";}
if($cg->keytype == 'temporal')
{$ctitle = "时<br />间";}
if(empty($ctitle))
{
$ctitle = $cg->keytype;
}
echo '<li><div class="title">'.$ctitle.'</div><div class="content">';
echo '<p><a href="/data/tag/key/'.urlencode($cg->keyword).'">'.$cg->keyword.'</a></p>';
echo '</div></li>';
}
endforeach;
?><!-- 关键词 -->
<?php if ($md->fileformat) : ?>
<li>
<div class="title">
<br />
</div>
<div class="content"><p>
<?php echo $md->fileformat; ?></p>
</div>
</li>
<?php endif; ?><!-- 格式 -->
<li>
<div class="title"><br /></div>
<div class="content"><p>
<?php echo $md->filesize; ?>MB</p>
</div>
</li><!-- 大小 -->
<li>
<div class="title"><br /><br /><br /></div>
<div class="content"><div id='watermap'></div></div>
</li>
<?php if ($this->downloaded>9) :?>
<li>
<div class="title"><br /></div>
<div class="content"><p>
<?php echo $this->downloaded; ?></p>
</div>
</li>
<?php endif; ?>
<li>
<div class="title"><br /></div>
<div class="content"><p>
<?php echo $this->viewed; ?></p>
</div>
</li>
<?php if (!empty($this->doc)) : ?>
<li>
<div class="title"><br /><br /><br /></div>
<div class="content"><p>
<a href="<?php $wikiTitle = $this->doc;
if(strpos($wikiTitle,'http://wiki.westgis.ac.cn/index.php/')!==false){
$title=str_replace('http://wiki.westgis.ac.cn/index.php/','',$wikiTitle);
echo "/metainfo/$title";
}else{
echo $this->doc;
}?>">数据说明文档</a></p></div></li>
<?php endif; ?>
<?php if (!empty($md->timebegin)) : ?>
<li>
<div class="title">数据时间范围</div>
<div class="content"><p><?php echo date('Y-m-d',strtotime($md->timebegin));if (!empty($md->timeend)) echo " 至 ".date('Y-m-d',strtotime($md->timeend)); ?></p></div></li>
<?php endif; ?>
<?php if ($this->attachments) : ?>
<li><div class="title"><br /><br /><br /></div>
<div class="content"><p>
<?php foreach ($this->attachments as $k=>$a) : ?>
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><?php echo ($k+1); ?></a>
<?php endforeach; ?>
<a href="/service/attach/zip/<?php echo $md->uuid; ?>"><img src="/images/zip_icon.gif" title="打包下载"/></a>
</p>
</div>
</li>
<?php endif; ?>
<li><div class="title"></div>
<div class="content"><p>数据共享方式:<br /><?php if ($md->datatype) print "离线"; else print "在线(可直接下载)";?> <a href="javascript:void(0);" id="show-list" onclick="getFileList()" title="">文件列表</a></p>
<p><?php if ($md->status>0 and $md->status<5) : ?>
<a href="/review/review/uuid/<?php echo $md->uuid; ?>"><img src="/images/review.png" title="此数据正在评审中,我们邀请您对此数据进行评审,以便其能尽快发布!" /></a>
<?php else : if (!$md->datatype) : ?>
<a href="javascript:$('#todownload').show();todownload(1);"><img src="/images/download.png" title="直接下载" /></a>
<?php endif; ?>
<a href="/data/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
<?php endif; ?></p>
</div></li>
</ul>
<!--
<?php if ($this->series): ?>
<div id="series">
@ -55,14 +152,6 @@ echo '</ul></div>';
<?php endif; ?>
-->
<ul id=OtherInfo>
<?php if ($md->fileformat) : ?>
<li id="fileformat">格式:<?php echo $md->fileformat; ?></li>
<?php endif; ?>
<li id="filesize">大小:<?php echo $md->filesize; ?>MB</li>
<?php if ($this->downloaded>9) :?>
<li id="downtimes">下载:<?php echo $this->downloaded; ?></li>
<?php endif; ?>
<li id="viewtimes">浏览:<?php echo $this->viewed; ?></li>
<!--
<?php if ($md->projection) : ?>
<li id="projection" title="<?= $this->projection; ?>">数据投影:
@ -79,42 +168,8 @@ else
?></li>
<?php endif; ?>
-->
<?php if (!empty($md->timebegin)) : ?>
<li id="datatimes">数据时间范围:<?php echo date('Y-m-d',strtotime($md->timebegin));if (!empty($md->timeend)) echo " 至 ".date('Y-m-d',strtotime($md->timeend)); ?></li>
<?php endif; ?>
<?php if (!empty($this->doc)) : ?>
<li id="datadoc"><a href="<?php $wikiTitle = $this->doc;
if(strpos($wikiTitle,'http://wiki.westgis.ac.cn/index.php/')!==false){
$title=str_replace('http://wiki.westgis.ac.cn/index.php/','',$wikiTitle);
echo "/metainfo/$title";
}else{
echo $this->doc;
}?>">数据说明文档</a></li>
<?php endif; ?>
<?php if ($this->attachments) : ?>
<li class="attach">相关文档:
<?php foreach ($this->attachments as $k=>$a) : ?>
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><?php echo ($k+1); ?></a>
<?php endforeach; ?>
<a href="/service/attach/zip/<?php echo $md->uuid; ?>"><img src="/images/zip_icon.gif" title="打包下载"/></a>
</li>
<?php endif; ?>
<li id="datatype">数据共享方式:<?php if ($md->datatype) print "离线"; else print "在线(可直接下载)";?> <a href="javascript:void(0);" id="show-list" onclick="getFileList()" title="">文件列表</a></li>
</ul>
<div id="linkurl">
<?php if ($md->status>0 and $md->status<5) : ?>
<a href="/review/review/uuid/<?php echo $md->uuid; ?>"><img src="/images/review.png" title="此数据正在评审中,我们邀请您对此数据进行评审,以便其能尽快发布!" /></a>
<?php else : if (!$md->datatype) : ?>
<a href="javascript:$('#todownload').show();todownload(1);"><img src="/images/download.png" title="直接下载" /></a>
<?php endif; ?>
<a href="/data/order/uuid/<?php echo $md->uuid; ?>"><img src="/images/order.png" title="免费!离线申请此数据(在线数据和离线数据都可申请)"/></a>
<?php endif; ?>
</div>
</div>
<hr />
<h2>空间位置</h2>
<div id='watermap'></div>
<hr />
<h2>联系信息</h2>
<div id="authors">
@ -334,7 +389,14 @@ if($auth->hasIdentity())
</div>
</div>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){$(".colorbox").colorbox({photo:"true"});});
$(document).ready(function(){
$(".colorbox").colorbox({photo:"true"});
var colors = ['#cccccc', '#e0e0e0'];
$("#items").find("li").each(function (i) {
$(this).addClass("corners-left");
$(this).css("background-color", colors[i % 2]);
});
});
$(window).bind("load", function() { var timeout = setTimeout(function() { initLoader(); }, 100);});
//$(window).bind("load", function() { var timeout = setTimeout(function() { gmaploaded(); }, 1000);});
function loadMaps() {
@ -609,3 +671,4 @@ zoomlevel--;
<p>没有找到对应的元数据。</p>
<?php endif;?>
</div>

View File

@ -1,10 +1,10 @@
<div id="divFooter">
<span>版权所有©2011青海省环境监测中心站Powered by <a href="http://westdc.westgis.ac.cn/">WestDC</a> </span> | <a href="/about/contact" >联系我们</a> | <a href="/about/terms">使用条款和免责申明</a>
| <a href="http://www.miibeian.gov.cn" target="_blank">陇ICP备05000491号</a>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-302912-6";
urchinTracker();
<div class="footer">
<span>版权所有©2011青海省环境监测中心站Powered by <a href="http://westdc.westgis.ac.cn/">WestDC</a> </span> | <a href="/about/contact" >联系我们</a> | <a href="/about/terms">使用条款和免责申明</a>
| <a href="http://www.miibeian.gov.cn" target="_blank">陇ICP备05000491号</a>
</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-302912-6";
urchinTracker();
</script>

View File

@ -1,34 +1,34 @@
<div id="divHeader">
<div id="divLogo">
<a href="/"><img src="/images/westdc-banner.jpg" alt="Logo" /></a>
</div>
<div class="header clear">
<div class="banner"></div>
<div class="nav">
<div id="divNavi">
<ul>
<!-- CSS Tabs -->
<li><a href="/"><span>首页</span></a></li>
<!-- <li><a href="/news"><span>新闻动态</span></a></li> -->
<li><a href="/data"><span>数据与服务</span></a></li>
<li><a href="/submit"><span>数据汇交</span></a></li>
<!-- <li><a href="/review"><span>元数据评审</span></a></li> -->
<li><a href="/manage"><span>数据管理</span></a></li>
<li><a href="/news"><span>新闻动态</span></a></li>
<li><a href="/about"><span>关于本站</span></a></li>
</ul>
</div>
<div id="userNavi">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account/edit">'.$user->username.'</a> ';
if ($user->usertype=="administrator") echo '<a href="/admin">后台管理</a> ';
echo '<a href="/data/order">数据篮</a> <a href="/account/logout">注销</a>';
} else {
echo '<a href="/account/login">登录</a> <a href="/account/register">注册</a>';
}
?>
<div class="search">
<span id="user"><?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account/edit">'.$user->username.'</a> ';
if ($user->usertype=="administrator") echo '<a href="/admin">后台管理</a> ';
echo '<a href="/data/order">数据篮</a> <a href="/account/logout">注销</a>';
} else {
echo '<a href="/account/login">登录</a> <a href="/account/register">注册</a>';
}
?></span>
<span id="search">
<form id="search" enctype="application/x-www-form-urlencoded" action="/data/search" method="post">
<input type="text" name="q" id="q" value="" class="keywords" />
<button type="submit" class="btn" onclick="">站内搜索</button><a href="/search">高级搜索</a></form>
</span>
</div>
</div>
<div class="main">
<ul>
<li><a href="/about"><span>关于本站</span></a></li>
<li><a href="/news"><span>新闻动态</span></a></li>
<li><a href="/manage"><span>数据管理</span></a></li>
<li><a href="/submit"><span>数据汇交</span></a></li>
<li><a href="/data"><span>数据与服务</span></a></li>
<li><a href="/"><span>首页</span></a></li>
</ul>
</div>
</div>
</div>

View File

@ -2,113 +2,108 @@
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/index.css');
$this->headScript()->appendFile('/static/js/jqFancyTransitions.1.8.min.js');
$auth = Zend_Auth::getInstance();
?>
<div id="index">
<div id="leftPanel">
<div class="title">在线下载热门数据</div>
<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>
<div class="title">离线申请热门数据</div>
<ul>
<?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>
<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>
</ul>
</div>
<div id="rightPanel">
<div id="feature">
<div class="alpha-shadow">
<div><img src="<?= $this->feature['imgurl']; ?>" alt="特色数据集" style="border-width:1px;border-style:solid;" /></div>
</div>
<div class="title"><?= $this->feature['title']; ?></div>
<div class="description">
<?= $this->feature['description']; ?>
</div>
<span class="more"><a href="/data/feature" >以往推荐</a></span>
<span id="links"><a href="<?= $this->feature['detailurl']; ?>">详细</a></span>
</div>
<div id="itemCd">
<div class="alpha-shadow" id="image"><img src="/service/thumb/id/<?php echo $this->mdrandom->id; ?>" /></div>
<div id="title"><?php echo $this->mdrandom->title; ?></div>
<div id="descript"><?php echo mb_strlen($this->mdrandom->description)>400?$this->escape(mb_substr($this->mdrandom->description,0,400,'UTF-8').'...'):$this->escape($this->mdrandom->description);?></div>
<div id="link">
<a href="/data/<?php echo $this->mdrandom->uuid; ?>">详细元数据</a>
| <a href="/data/">更多数据&gt;&gt;</a>
</div>
</div>
<div class="service_title">数据导航</div>
<div id="datalink">
<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"><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>
<div class="service_title">数据服务</div>
<div class="services_Item">
<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 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" style="width:638px;">
<img src="<?= $this->feature['imgurl']; ?>" alt="特色数据集" style="border-width:1px;border-style:solid;float:left;margin:5px;" />
<?= $this->feature['description']; ?>
<span id="links"><a href="<?= $this->feature['detailurl']; ?>">详细</a></span>
</div>
</div>
<img src="/static/images/dmad.jpg" class="mt12" />
<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" style="width:638px;">
<img src="/service/thumb/id/<?php echo $this->mdrandom->id; ?>" alt="特色数据集" style="border-width:1px;border-style:solid;float:left;margin:5px;" />
<?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" style="width:288px;">
<div id="search_types">
<ul>
<li><a href="">分类浏览</a></li>
<li><a href="">关键词导航</a></li>
<li><a href="">数据集序列</a></li>
<li><a href="">时间轴导航</a></li>
<li><a href="">时空导航</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" style="width:288px;">
- <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 id='slideshowHolder'>
<img src='img1.jpg' alt='img1' />
<img src='img2.jpg' alt='img2' />
<img src='img3.jpg' alt='img3' />
</div>
<script>
$(document).ready( function(){
$('#slideshowHolder').jqFancyTransitions({ width: 280, height: 300 });
});
</script>
</div>
<div class="tbox mt12">
<div class="title corners-top">在线下载热门数据</div>
<div class="content" style="width:258px;">
<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" style="width:258px;">
<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" style="width:258px;">
<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>
</ul>
</div>
</div>
</div><!-- right -->
</div>