objMenu=unserialize($menucached); $_showpage->objBnGroup=unserialize($groupBnCached); //print_r( unserialize($menucached)); //print_r($_showpage->objMenu); //Cho banner $cate_page=$_CATEGORIES->getIdCateMenuPage($module,$cate,$item); $_showpage->catepage=$cate_page; $menuhead=$_showpage->objMenu[0]; //print_r($menuhead); //Luu tru parentid if($cate>0 ){ $_CATEGORIES->cate=$cate; $arrCatedetail=$_CATEGORIES->getDetail(); $_showpage->codecate=$arrCatedetail->code; $_showpage->cateCurrDetail=$arrCatedetail; if(array_key_exists($cate,$menuhead)){ $_showpage->parent_id=$cate; }else { $i=0; foreach($menuhead as $key => $items){ if($i==0)$defaut_key=$key; $temp=method::getArrMenu($items,$cate,"id"); if(count($temp)>0){$_showpage->parent_id=$key; break;} $i++; } } } if(!$_REQUEST){ foreach($menuhead as $key => $items){ $defaut_key=$key;break; } $_showpage->parent_id=$defaut_key; } //print "a:".$_showpage->parent_id; //////////////////////////// $_showpage->arrTree=$_showpage->objMenu[1]; if($cate==0&&$module=="products") header("location:".method::pathweb(array())); ////////////////////////////////// //define("_RRODUCT_CATE","Danh muc san pham"); $_seo_core = new SEO_CORE(); if($item>0){ $arrSeo=$_seo_core->getMetaPage(method::reconvert_module($module),$item); $title_seo=$arrSeo->title; $keywords_seo=$arrSeo->keywords; $description_seo=$arrSeo->description; //Lay chi tiet $_CONTENT_CORE= new CONTENT_CORE; $objItem=$_CONTENT_CORE->get_detail($item); }elseif($cate>0){ $arrSeo=$_seo_core->getMetaPage('RSCATE',$cate); $title_seo=$arrSeo->title; $keywords_seo=$arrSeo->keywords; $description_seo=$arrSeo->description; } if($title_seo=="") $title_seo=_TITLE_PAGE; if($keywords_seo=="") $keywords_seo=_KEYWORD_PAGE; if($description_seo=="") $description_seo=_DESC_PAGE; ////////////////////////////////////////////////// $_showpage->arrvar=array( "module"=>$module, "cate"=>$cate, "item"=>$item, "act"=>$act,"pact"=>$pact, "companyinfo"=>$_COMPANY_CORE->getCompanyInfo(), "allmenu"=>$_showpage->objMenu, "arrCatedetail"=>$arrCatedetail, "cate_page"=>$cate_page, "objItem"=>$objItem); $_showpage->arrpage=array("title"=>$title_seo,"keywords"=>$keywords_seo,"description"=>$description_seo); $content_tpl=$_thumb->readFile(_PATH_TEMPLATE."content.php"); $_showpage->action_page(); $content_tpl=$_showpage->show_content_tpl($content_tpl); //$content_tpl=$_showpage->show_content_tpl($content_tpl); print $content_tpl; ?>