function GetTopTypeName($typeid) { global $dsql; $typeRow = $dsql->GetOne("SELECT typename,topid FROM dede_arctype WHERE id= $typeid"); if ($typeRow['topid'] == '0') { return $typeRow['typename']; } else { $typeRow1 = $dsql->GetOne("SELECT typename FROM dede_arctype WHERE id= $typeRow[topid]"); return $typeRow1['typename']; } } |