首页更新

This commit is contained in:
wlx 2015-01-30 16:11:17 +00:00
parent 77a5a0008f
commit c309c9561d
2 changed files with 9 additions and 53 deletions

View File

@ -86,6 +86,11 @@ class IndexController extends Zend_Controller_Action
$sql="select * from $this->submd where uuid in (select uuid from datavisual) order by ts_created desc limit 5";
$sth=$this->db->query($sql);
$this->view->visualdata = $sth->fetchAll(PDO::FETCH_BOTH);
$sql="select * from $this->submd order by ts_created desc limit 5";
$sth=$this->db->query($sql);
$this->view->newdata = $sth->fetchAll(PDO::FETCH_BOTH);
}
}

View File

@ -53,11 +53,11 @@
<div class="row-fluid">
<div class="span6">
<div class="box" >
<p class="box-title">最新可视化数据</p>
<p class="box-title">最新发布数据</p>
<ul >
<?php foreach($this->visualdata as $k=>$v){ ?>
<?php foreach($this->newdata as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_created'])) ?></span>
</li>
<?php } ?>
<span class="pull-right"><a href="/data/visual" target="_blank" class="more">更多>></a></span>
@ -69,7 +69,7 @@
<div class="span3">
<div class="box">
<p class="box-title">可视化数据</p>
<div class="count"><span>208</span></div>
<div class="count"><span><?= $this->visualnum ?></span></div>
</div>
</div>
<div class="span3">
@ -83,55 +83,6 @@
</div><!-- /.part1 -->
<!-- Three columns of text below the carousel -->
<div class="row-fluid">
<div class="span12">
<div class="span4">
<div class="box">
<p class="box-title">最新发布数据</p>
<ul>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span4 -->
<div class="span4">
<div class="box">
<p class="box-title">热门数据排行</p>
<ul>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span4 -->
<div class="span4">
<div class="box">
<p class="box-title">热门数据排行</p>
<ul>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span4 -->
</div>
<!-- /.row -->
<div style="margin-bottom:20px;"><img src="/sjyportal/img/protect.jpg" class="img-rounded" /></div>
<!-- Three columns of text below the carousel -->