限定首页图片新闻为特色新闻类别
This commit is contained in:
parent
6dc360749d
commit
7780d3e67a
|
@ -58,7 +58,7 @@ class IndexController extends Zend_Controller_Action
|
|||
$News = new Archive($this->db);
|
||||
|
||||
$time = date("Y-m-d H:i:s",time());
|
||||
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' AND image!='' order by ts_published desc LIMIT 5";
|
||||
$sql = "SELECT * FROM archive WHERE is_pub=true AND ts_published<'$time' AND image!='' and id in (select ar_catalog.aid from ar_category left join ar_catalog on ar_category.id=ar_catalog.cid where ar_category.code='featured') order by ts_published desc LIMIT 5";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll(PDO::FETCH_BOTH);
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
<li><a href="/data/series"><i class="icon-th-list"></i>序列浏览</a></li>
|
||||
<li><a href="/data/category"><i class="icon-th"></i>分类浏览</a></li>
|
||||
<li><a href="/data/timeline"><i class="icon-tasks"></i>时间轴浏览</a></li>
|
||||
<li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li>
|
||||
<!-- <li><a href="/data/map"><i class="icon-globe"></i>空间浏览</a></li> -->
|
||||
<li><a href="/data/timemap"><i class="icon-film"></i>时空浏览</a></li>
|
||||
<li><a href="/data/browse"><i class="icon-align-justify"></i>全部浏览</a></li>
|
||||
<li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li>
|
||||
<!-- <li><a href="/data/advancesearch"><i class="icon-search"></i>高级搜索</a></li> -->
|
||||
<li>
|
||||
<form id="search" enctype="application/x-www-form-urlencoded" action="/data/search" method="post">
|
||||
<input type="text" name="q" id="q" value="<?php echo (empty($this->key))?'':$this->key; ?>" placeholder="回车搜索标题和摘要">
|
||||
|
|
Loading…
Reference in New Issue