<?php
 /**
 *      [XCECP] (C) COLNET Inc.
 *      This is NOT a freeware, use is subject to license terms
 */
if(!defined("IN_QKWEB")){exit("Access Denied");}
class BrandAction{
	function index(){
		$sm = new SeoModel();
		$pageInfo = $sm->pageInfo(8);
		$pageInfo['title'] = $pageInfo['title']?$pageInfo['title']:$GLOBALS['siteConf']['siteName'];
		assign("pageInfo",$pageInfo);
		display();
	}
	function view(){
		$id = getgpc("id");
		if($id && is_numeric($id)){//echo $id;exit;
			load_class('brand');$bm = new BrandModel();
			$brandInfo=$bm->getInfo($id);
			if(!$brandInfo){Msg::show('品牌不存在');}
			assign('brandInfo',$brandInfo);
			//print_R($brandInfo);
			$template = 'brand/view';
			if($brandInfo['templateView']){$template=$brandInfo['templateView'];}
			$pageInfo['title'] = $brandInfo['name']?$brandInfo['name'].' 品牌 - ':'';
			$pageInfo['title'] .= $GLOBALS['siteConf']['siteName'];
			assign("pageInfo",$pageInfo);
			display($template);
		}
	}
}
?>