树型无限分类可否改成<ul><li>格式
这是动易的代码
树型无限分类可否改成 <ul> <li> 格式
sub ShowClass_Tree()
dim arrShowLine(20)
for i=0 to ubound(arrShowLine)
arrShowLine(i)=False
next
dim rsClass,sqlClass,tmpDepth,i
'sqlClass= "select C.ClassID,C.ClassName,C.Depth,L.LayoutFileName,C.NextID,C.LinkUrl,C.Child From ArticleClass C inner join Layout L on C.LayoutID=L.LayoutID order by C.RootID,C.OrderID "
sqlClass= "select ClassID,ClassName,Depth,NextID,LinkUrl,Child,ClassPicUrl,ParentID From ArticleClass order by RootID,OrderID "
Set rsClass=server.createobject( "adodb.recordset ")
rsClass.open sqlClass,conn,1,2
if rsClass.bof and rsClass.bof then
strClassTree= "没有任何栏目 "
else
strClassTree= " "
do while not rsClass.eof
tmpDepth=rsClass( "Depth ") '栏目深度
'if rsClass( "NextID ")> 0 then
'arrShowLine(tmpDepth)=True
'else
arrShowLine(tmpDepth)=False
'end if
if tmpDepth> 0 then
for i=1 to tmpDepth
if i=tmpDepth then
if rsClass( "nextid ")> 0 then
strClassTree=strClassTree & " <img src= 'images/tree_line1.gif ' width= '17 ' height= '16 ' valign= 'abvmiddle '> "
else
strClassTree=strClassTree & " <img src= 'images/tree_line2.gif ' width= '17 ' height= '16 ' valign= 'abvmiddle '> "
end if
else
if arrShowLine(i)=True then
strClassTree=strClassTree & " <img src= 'images/tree_line3.gif ' width= '17 ' height= '16 ' valign= 'abvmiddle '> "
else
strClassTree=strClassTree & " <img src= 'images/tree_line4.gif ' width= '17 ' height= '16 ' valign= 'abvmiddle '> "
end if
end if
next
end if
if rsClass( "Child ")> 0 then
strClassTree=strClassTree & " <img src= 'Images/tree_folder4.gif ' width= '15 ' height= '15 ' valign= 'abvmiddle '> "
else
strClassTree=strClassTree & " <img src= 'Images/tree_folder3.gif ' width= '15 ' height= '15 ' valign= 'abvmiddle '> "
end if
if rsClass( "linkurl ")= " " then
'strClassTree=strClassTree & " <a href= ' " & rsClass(3) & "?ClassID= " & rsClass(0) & " '> "
else
strClassTree=strClassTree & " <a href= ' " & rsClass( "LinkUrl ") & " ' target= '_blank '> "
end if
if rsC