if($category->RootID=='0'){
$tempcid=$category->ID;
$where =array(array('=','cate_RootID' ,$tempcid));
$order = array('cate_Order' => 'DESC' );
$array=$zbp->GetCategoryList(null,$where,$order,null,null);
$wherearray=array();
$wherearray[]=array('log_CateID',$tempcid);
foreach ($array as $cate){
$wherearray[]=array('log_CateID',$cate->ID);
}
$where=array(
array('array',$wherearray),
array('=','log_Status','0'),
);
}else{
$tempcid=$category->RootID;
$where =array(array('=','cate_RootID' ,$tempcid));
$order = array('cate_Order' => 'DESC' );
$array=$zbp->GetCategoryList(null,$where,$order,null,null);
$wherearray=array();
$wherearray[]=array('log_CateID',$category->RootID);
foreach ($array as $cate){
$wherearray[]=array('log_CateID',$cate->ID);
}
$where=array(
array('array',$wherearray),
array('=','log_Status','0'),
);
}
//Output popular articles in subcategories
$num=10;
$order = array('log_ViewNums'=>'DESC');
$substr='';
$arrayhotarticle= $zbp->GetArticleList(array('*'),$where,$order,array($num),'');
foreach ($arrayhotarticle as $key=>$b3) {
$substr.='< li><a href="'.$b3->Url.'"> '.$ b3->Title.' </ a></li>';
}
echo $substr;