修改include/inc_functions.php文件
复制代码 代码如下:
functionGetTotalArc($typeid){
$dsql=newDedeSql(false);
if(!empty($typeid))
{
$reids=explode(",",$typeid);
$ridnum=count($reids);
if($ridnum>1){
$tpsql="";
for($i=0;$i<$ridnum;$i++){
if($tpsql=="")$tpsql.="And(".TypeGetSunID($reids[$i],$dsql,'');
else$tpsql.="Or".TypeGetSunID($reids[$i],$dsql,'');
}
$tpsql.=")";
$orwhere.=$tpsql;
unset($tpsql);
}else{
$orwhere.="And".TypeGetSunID($typeid,$dsql,'');
}
unset($reids);
}
$row=$dsql->GetOne("Selectcount(ID)asddFrom#@__archiveswheretypeid>0$orwhere");
return$row['dd'];
}
调用方法
复制代码 代码如下:
[field:idfunction='GetTotalArc(@me)'/]
