打开/include/extend.fuc.php文件
在最下面加入下面代码
//获取顶级栏目名
function GetTopTypenameById($id)
{
global $dsql;
$row = $dsql->GetOne("SELECT typename,topid FROM idea_arctype WHERE id= $id");
if ($row['topid'] == '0')
{
return $row['typename'];
} else {
$row1 = $dsql->GetOne("SELECT typename FROM idea_arctype WHERE id= $row[topid]");
return $row1['typename'];
}
}
如图:
560be432939c2cf71a5861aa452c5b1b1fde1242