更新新闻首页的分平台限制
This commit is contained in:
parent
75ae4ff252
commit
fb0bfea245
|
@ -12,14 +12,10 @@ class ArchivesController extends Zend_Controller_Action
|
||||||
$this->view->nav = array(
|
$this->view->nav = array(
|
||||||
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
|
||||||
array('link'=>'/archives','title'=>'新闻'),
|
array('link'=>'/archives','title'=>'新闻'),
|
||||||
);
|
);
|
||||||
|
$this->subnews=$this->view->config->sub->news;
|
||||||
}
|
}
|
||||||
|
|
||||||
function testAction()
|
|
||||||
{
|
|
||||||
$this->_helper->viewRenderer('archive-view-player');
|
|
||||||
}
|
|
||||||
|
|
||||||
function indexAction()
|
function indexAction()
|
||||||
{
|
{
|
||||||
$News = new Archive($this->db);
|
$News = new Archive($this->db);
|
||||||
|
@ -52,7 +48,8 @@ class ArchivesController extends Zend_Controller_Action
|
||||||
$sql = "SELECT n.*,c.title as typetitle,c.code FROM ".$News->tbl_archives." n
|
$sql = "SELECT n.*,c.title as typetitle,c.code FROM ".$News->tbl_archives." n
|
||||||
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
left join ".$News->tbl_catalog." ct on ct.aid=n.id
|
||||||
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
left join ".$News->tbl_categorys." c on c.id = ct.cid
|
||||||
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
|
WHERE n.ts_published<'$time' AND ct.cid={$v['id']} AND n.is_pub=true
|
||||||
|
and n.sub='$this->subnews'
|
||||||
ORDER BY ts_published DESC
|
ORDER BY ts_published DESC
|
||||||
LIMIT 10";
|
LIMIT 10";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue