ks_cls/kesion.label.commoncls.asp 1869行左右。
'按父ID返回二级分类结构
Function GetCategory(tn)
Call KS.LoadClassConfig()
Dim Node,ClassXML,TreeStr
Set ClassXML=Application(KS.SiteSN&"_class")
If IsOBject(ClassXml) Then
For Each Node In ClassXML.DocumentElement.SelectNodes("class[@ks27=1][@ks13=" & tn & "]")
TreeStr = TreeStr & "<dl><dt>" & KS.GetClassNP(Node.SelectSingleNode("@ks0").text)&" </dt>"&vbcrlf
TreeStr = TreeStr & SubTreeList(ClassXml,Node.SelectSingleNode("@ks0").text)
Next
End If
GetCategory=TreeStr
End Function
Function SubTreeList(ClassXml,tn)
Dim Node,K,TJ,TreeStr
If IsOBject(ClassXml) Then
TreeStr = TreeStr & "<dd>"
For Each Node In ClassXML.DocumentElement.SelectNodes("class[@ks27=1][@ks13='" & TN &"']")
TreeStr = TreeStr & KS.GetClassNP(Node.SelectSingleNode("@ks0").text)
Next
TreeStr = TreeStr & "</dd></dl>"
End If
SubTreeList=TreeStr
End Function