<?php
/*
'#################################################################
'# 程序名称：中环CMSV2.0
'# 授权方式：免费软件
'# 作者：善
'# 联系QQ:9118847
'# 作者网站:http://www.ps173.com
'# 发布时间：2015-6-10
'# 声明：欢迎广大的PHP爱好者一起共同探讨
'# 声明：各种用途均可免费使用、自由传播，但必须保留程序代码中的版权信息。
'#################################################################
 */

//菜单列表输出
class ListAction extends CommonAction{

	public function index(){
		if(!$this->isCached(null, $_SERVER["REQUEST_URI"])){
			$pid = isset($_GET['pid']) ? intval($_GET['pid']) : null;
			$navid= $this->nav->getpid($pid);
			$size = $this->info();
			$page = new Page($this->article->arttotal(array("pid"=>$navid)), $size['size'], "pid/{$pid}");
			$this->assign("reclist", $this->article->art_list("id, title, posttime", 16, array('pid'=>$navid, 'attr'=>"%推荐%", "views"=>0)));
			$this->assign("books", $this->article->art_list("id, title, posttime", 16, array('pid'=>$navid, "views"=>0), "nums desc"));
			$this->assign("page", $page->pageinfo());
			$this->assign("all", $this->article->all_list($navid, $page->limit));
			$this->assign("hostpid", $this->article->hostpid($navid));
			$this->assign('menunum', $this->nav->menu($pid));
			$this->assign('location', $this->nav->colsmenu($_GET['pid']));
			$this->assign("list", $this->nav->menu());
			$this->assign("flink", $this->viewflink());
			$this->assign("info", $size);
		}
		
		$this->assign("adver", $this->viewadver());
		$this->display(null, $_SERVER["REQUEST_URI"]);
	}

}

?>