objMenu=unserialize($menucached); $_showpage->objBnGroup=unserialize($groupBnCached); //print_r( unserialize($menucached)); //print_r($_showpage->objMenu); //Cho banner $cate_page=$_CATEGORIES->getIdCateMenuPage($cate); //$cate_page=$cate; $_showpage->catepage=$cate_page; $menuhead=$_showpage->objMenu[1]; //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]; ////////////////////////////////// //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; //print_r($arrSeo); $keywords_seo=$arrSeo->keywords; $description_seo=$arrSeo->description; // $_CONTENT_CORE = new CONTENT_CORE(); $_CONTENT_CORE->setNodeid($item); $objItem=$_CONTENT_CORE->get_detail(); //print_r($objItem); }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 = $objItem->title; if($title_seo==""){ $title_seo=_TITLE_PAGE; } } if($keywords_seo=="") $keywords_seo=_KEYWORD_PAGE; if($description_seo=="" || !$description_seo) $description_seo=_DESC_PAGE; ////////////////////////////////////////////////// $_showpage->arrvar=array( "module"=>$module, "cate"=>$cate, "item"=>$item, "parent_id"=>$_showpage->parent_id, "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); //echo _PATH_TEMPLATE; $content_tpl=$_thumb->readFile(_PATH_TEMPLATE."index.php"); $_showpage->action_page(); $content_tpl=$_showpage->show_content_tpl($content_tpl); //$content_tpl=$_showpage->show_content_tpl($content_tpl); //echo _PATH_TEMPLATE; print $content_tpl; ?>