欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

dedecms統(tǒng)計欄目文章數(shù)量實(shí)現(xiàn)代碼修訂版

 更新時間:2008年03月23日 18:11:11   作者:  
以下的實(shí)現(xiàn)辦法為修訂的方法,可實(shí)現(xiàn)任意指定欄目的文章數(shù)量統(tǒng)計,包括最終列表欄目和含有子欄目的欄目。
修改include/inc_functions.php文件
復(fù)制代碼 代碼如下:

function GetTotalArc($typeid){ 
  $dsql = new DedeSql(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("Select count(ID) as dd From #@__archives where typeid>0 $orwhere"); 
   return $row['dd']; 


調(diào)用方法
復(fù)制代碼 代碼如下:

[field:id function='GetTotalArc(@me)'/] 

相關(guān)文章

最新評論