找到include/common.func.php,打开这个文件,在这个文件的最后加入如下代码:
functionGetTopTypename($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'];
}
}
网友评论