//获取顶级栏目名function GetTopTypename($id){ global $dsql; $row = $dsql->GetOne("SELECT typename,topid FROM dede_arctype WHERE id= $id"); if ($row['topid'] == '0') { return $row['typename']; } else { $row1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $row[topid]"); return $row1['typename']; }}
//获取顶级栏目url function GetTopTypeurl($id){ global $dsql; $row = $dsql->GetOne("SELECT sitepath,topid FROM dede_arctype WHERE id= $id"); if ($row['topid'] == '0') { return $row['sitepath']; } else { $row1 = $dsql->GetOne("SELECT sitepath FROM dede_arctype WHERE id= $row[topid]"); return $row1['sitepath']; }}
function GetTopTypeurl($id){ global $dsql; $row = $dsql->GetOne("SELECT siteurl,topid FROM dede_arctype WHERE id= $id"); if ($row['topid'] == '0') { return $row['siteurl']; } else { $row1 = $dsql->GetOne("SELECT siteurl FROM dede_arctype WHERE id= $row[topid]"); return $row1['siteurl']; }}
{dede:type}[feild:topid/]{/dede:type}
$row = $dsql->GetOne("Select id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathFrom `dede_arctype` where id='$typeid'");
$row = $dsql->GetOne("Select id,topid,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathFrom `dede_arctype` where id='$typeid'");
if( $row['topid']==0){$row['topid']=$row['id'];}
新闻热点
疑难解答