修正了新闻中心前台首页栏目链接不现实的bug,样式微调
This commit is contained in:
parent
7e68cfe3d2
commit
ef2e9de3e4
|
@ -71,7 +71,10 @@ class NewsController extends Zend_Controller_Action
|
||||||
|
|
||||||
$this->view->types=$types;
|
$this->view->types=$types;
|
||||||
|
|
||||||
$sql = "SELECT * FROM news_archives WHERE typeid='{$row['id']}' AND ts_published<".time()." AND pub>=1 ORDER BY ts_published DESC";
|
$sql = "SELECT arc.*,c.url FROM news_archives arc
|
||||||
|
left join news_catlog c ON arc.typeid=c.id
|
||||||
|
WHERE arc.typeid='{$row['id']}' AND arc.ts_published<".time()." AND arc.pub>=1
|
||||||
|
ORDER BY arc.ts_published DESC";
|
||||||
|
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
$rows = $rs->fetchAll();
|
$rows = $rs->fetchAll();
|
||||||
|
|
|
@ -32,12 +32,6 @@ $this->headMeta()->appendName('description', mb_substr($this->infos['description
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tbox">
|
|
||||||
<div class="title">Search</div>
|
|
||||||
<div class="content">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="Rfloat clear archive_body" id="archive_body">
|
<div class="Rfloat clear archive_body" id="archive_body">
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,6 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tbox mt14">
|
|
||||||
<div class="title">Search</div>
|
|
||||||
<div class="content">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="Rfloat clear" id="archives_list">
|
<div class="Rfloat clear" id="archives_list">
|
||||||
<div class="archives_list">
|
<div class="archives_list">
|
||||||
|
@ -48,12 +42,12 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
$description = "No description";
|
$description = "No description";
|
||||||
}else if (mb_strlen($v['description'])>160)
|
}else if (mb_strlen($v['description'])>160)
|
||||||
{
|
{
|
||||||
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$this->url.'/archive-'.$v['id'].'.html" class="more">(more)</a>';
|
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="more">(more)</a>';
|
||||||
}else{
|
}else{
|
||||||
$description = $v['description'];
|
$description = $v['description'];
|
||||||
}
|
}
|
||||||
echo '<li>
|
echo '<li>
|
||||||
<a href="/news/'.$this->url.'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
|
[<a href="/news/'.$v['url'].'/" class="type">'.$v['typetitle'].'</a>] <a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
|
||||||
<small>TIME : '.date("Y-m-d H:i",$v['ts_published']).'</small>
|
<small>TIME : '.date("Y-m-d H:i",$v['ts_published']).'</small>
|
||||||
<p>'.$description.'</p>
|
<p>'.$description.'</p>
|
||||||
</li>';
|
</li>';
|
||||||
|
|
|
@ -28,12 +28,6 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tbox mt14">
|
|
||||||
<div class="title">Search</div>
|
|
||||||
<div class="content">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="Rfloat clear" id="archives_list">
|
<div class="Rfloat clear" id="archives_list">
|
||||||
<div class="archives_list">
|
<div class="archives_list">
|
||||||
|
@ -49,12 +43,12 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
$description = "No description";
|
$description = "No description";
|
||||||
}else if (mb_strlen($v['description'])>160)
|
}else if (mb_strlen($v['description'])>160)
|
||||||
{
|
{
|
||||||
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$this->url.'/archive-'.$v['id'].'.html" class="more">(more)</a>';
|
$description = mb_substr($v['description'],0,160,'utf-8').'...<a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="more">(more)</a>';
|
||||||
}else{
|
}else{
|
||||||
$description = $v['description'];
|
$description = $v['description'];
|
||||||
}
|
}
|
||||||
echo '<li>
|
echo '<li>
|
||||||
<a href="/news/'.$this->url.'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
|
<a href="/news/'.$v['url'].'/archive-'.$v['id'].'.html" class="title">'.$v['title'].'</a><br />
|
||||||
<small>TIME : '.date("Y-m-d H:i",$v['ts_published']).'</small>
|
<small>TIME : '.date("Y-m-d H:i",$v['ts_published']).'</small>
|
||||||
<p>'.$description.'</p>
|
<p>'.$description.'</p>
|
||||||
</li>';
|
</li>';
|
||||||
|
|
Loading…
Reference in New Issue