<?php
if (!defined('IN_59MIAO'))
{
	exit('Access Defined');
}
class AllAction extends Action {
	private $_nav=null;	
	private $_apiaction=null;
	private $_keywords='';
	
	public function __construct() {
		parent::__construct();
		if (!$this->_tpl->is_cached(SMARTY_FRONT.'/all.tpl',$_SERVER["REQUEST_URI"])) {	
			$this->_nav = new NavModel();	
			$this->_keywords=new KeywordsModel();
		}
	}	
	//实现初始页面
	public function index(){		
		if (!$this->_tpl->is_cached(SMARTY_FRONT.'/all.tpl',$_SERVER["REQUEST_URI"])) {	
			$this->setSeo();
			$AllNav=$this->_nav->findAllFront();
			$this->_tpl->assign('AllNav',$AllNav['allnav']);		
			$b2cdata=$this->_model->GetItemCats();
			$taodata=$this->_model->GetTaoCats();	
			$AllKeywords=$this->_keywords->findAllFront();		
			$this->_tpl->assign('KeyWords',$AllKeywords);			
			$this->_tpl->assign('Allcats',$b2cdata);	
			$this->_tpl->assign('TaoCats',$taodata);
		}
		$this->_tpl->display(SMARTY_FRONT.'/all.tpl',$_SERVER["REQUEST_URI"]);
	}	
	//seo 设置
	private function setSeo(){
		//error_reporting(0);		
		$site_title=$this->_site_title;
		$site_titleb=$this->_site_titleb;
		$site_keywords=$this->_site_keywords;
		$site_description=$this->_site_description;
		if(file_exists('./configs/seo_config.inc.php')){
			require_once './configs/seo_config.inc.php';	
		}				
		$this->_tpl->assign('title',$all_title);
		$this->_tpl->assign('keywords',$all_keywords);
		$this->_tpl->assign('description',$all_info);
	}

}

?>