POST TIME:2021-05-23 02:12
function GetTotalArc($tid){
$dsql = new DedeSql(false);
$sql = TypeGetSunID($tid,$dsql);
$row = $dsql->GetOne("Select count(ID) as dd From dede_archives where {$sql}");
return $row['dd'];
}
|
function GetChannelArticleNum($id){
if(!$id || !is_numeric($id)) return 0;
$dsql = new DedeSql();
require_once(dirname(__FILE__)。"/inc_channel_unit_functions.php");
$sql = TypeGetSunID($id,$dsql);
$dsql -> SetQuery("Select count(*) as c From dede_archives where {$sql}");
$row = $dsql -> GetOne();
return $row['c'];
}
|
function ParseTemplet()
{
if(!is_array($this->dtp->CTags)) return "";
foreach($this->dtp->CTags as $tagid=>$ctag)
{
$tagname = $ctag->GetName();
//countclass 统计栏目文章数量
if( $tagname == "countclass" ){
$tid = $ctag->GetAtt("typeid");
$row = $this->dsql->GetOne("Select count(ID) as dd From dede_archives where typeid='$tid' and arcrank<>-1");
$this->dtp->Assign($tagid,$row['dd']);
}
|
function GetTotalArc($tid){
$dsql = new DedeSql(false);
$row = $dsql->GetOne("Select count(ID) as dd From dede_archives where typeid='$tid'");
return $row['dd'];
}
|
