objMenu=unserialize($menucached); $_showpage->objBnGroup=unserialize($groupBnCached); //print_r( unserialize($menucached)); //print_r($_showpage->objMenu); //Cho banner $cate_page=$_CATEGORIES->getIdCateMenuPage($cate); $_showpage->catepage=$cate_page; $menuhead=$_showpage->objMenu[0]; //print_r($menuhead); //Luu tru parentid $arrCatedetail=$objItem =array(); 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(); $title_seo=$keywords_seo=$description_seo=$img_url=$url=""; 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 sp $_GALLERIES_CORE= new GALLERIES_CORE; $objItem=$_GALLERIES_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 = $_db_local->getField(TBLCATE,'title','ID',$cate); } if($title_seo=="") $title_seo=_TITLE_PAGE; if($keywords_seo=="") $keywords_seo=_KEYWORD_PAGE; if($description_seo=="") $description_seo=_DESC_PAGE; if($img_url=="") $img_url=$_thumb->formatFileUrl($_db_local->getField(TBLCOMPANY,'logo','ID',1)); if($url=="") $url=method::curPageURL(); ////////////////////////////////////////////////// $_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( "img"=>$img_url, "url"=>$url, "title"=>$title_seo,"keywords"=>$keywords_seo,"description"=>$description_seo); $content_tpl=$_thumb->readFile(_PATH_TEMPLATE."widget.php"); $_showpage->action_page(); $content_tpl=$_showpage->show_content_tpl($content_tpl); //$content_tpl=$_showpage->show_content_tpl($content_tpl); print $content_tpl; ?>