//统计栏目文章数
functionGetTotalArc($tid){
global$dsql;
$sql= GetSonIds($tid);
$row=$dsql->GetOne("Selectcount(id)asdd From `dede_archives` where typeid
in({$sql})");
return$row['dd'];
}
//统计当前栏目信息数
functiondynamic_num($current_id){
global$dsql;
//读取当前栏目的子ID
$sql= "SELECT id FROM `dede_arctype` WHERE id='$current_id'||
topid='$current_id'";
$dsql->SetQuery($sql);
$dsql->Execute();
while($row=$dsql->GetArray()){
$arr[]=$row[id];
}
foreach($arras$key=>$value){
$type.=$value.',';
}
$ty="".$type."0";
//echo $ty;
$t_num=$dsql->GetOne("selectcount(*)asnum from `dede_archives` where typeid
in($ty)");
//echo $t_num[num];
if(is_array($t_num)){
return" ".$t_num[num]." ";
}else{
return"0";
}
}