<?php
if (!defined('IN_59MIAO'))
{
	exit('Access Defined');
}
//皇冠店铺
class ShopAction extends Action {	
	private $_keywords='';
	private $_recshop='';
	public function __construct() {
		parent::__construct();		
		$this->_nav=new NavModel();	
		$this->_keywords=new KeywordsModel();	
		$this->_recshop=new RecshopModel();
	}	
	//实现初始页面
	public function index(){
		if (!$this->_tpl->is_cached(SMARTY_FRONT.'/shop.tpl',$_SERVER["REQUEST_URI"])) {	
			$this->setSeo();
			$this->_tpl->assign('name', '首页');
					
			$AllNav=$this->_nav->findAllFront();
			$this->_tpl->assign('AllNav',$AllNav['allnav']);
			
			$AllKeywords=$this->_keywords->findAllFront();		
			$this->_tpl->assign('KeyWords',$AllKeywords);
			
			$AllShop=$this->_model->GetShop();		
			$this->_tpl->assign('AllShop',$AllShop);
			//findFrontAll		
			$this->_tpl->assign('AllRecshop',$this->_recshop->findFrontAll());
			
		}
		
		$this->_tpl->display(SMARTY_FRONT.'/shop.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',$taoshop_title);
		$this->_tpl->assign('keywords',$taoshop_keywords);
		$this->_tpl->assign('description',$taoshop_info);
	}	

}
?>