【选择所属类别】
<% Dim Result,Datafrom Result=request.QueryString("Result") Select Case Result Case "Products" Datafrom="wygkcndiv_ProductSort" Case "News" Datafrom="wygkcndiv_NewsSort" Case "Download" Datafrom="wygkcndiv_DownSort" Case "Others" Datafrom="wygkcndiv_OthersSort" Case Else End Select ListSort(0) %>

<% Function ListSort(id) Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType Set rs=server.CreateObject("adodb.recordset") sql="Select * From "&Datafrom&" where ParentID="&id&" order by id" rs.open sql,conn,1,1 if id=0 and rs.recordcount=0 then response.write ("
暂无相关分类
") response.end end if i=1 response.write("

") while not rs.eof ChildCount=conn.execute("select count(*) from "&Datafrom&" where ParentID="&rs("id"))(0) if ChildCount=0 then if i=rs.recordcount then FolderType="SortFileEnd" else FolderType="SortFile" end if FolderName=rs("SortNameCH") onMouseUp="" else if i=rs.recordcount then FolderType="SortEndFolderClose" ListType="SortEndListline" onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');" else FolderType="SortFolderClose" ListType="SortListline" onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');" end if FolderName=rs("SortNameCH") end if response.write("
") response.write("
| "&FolderName&" ") response.write("选择") response.write("
") if ChildCount>0 then %>
" style="display:yes">
| <% ListSort(rs("id")) %>
<% end if rs.movenext i=i+1 wend response.write("

") rs.close set rs=nothing end function Function SortText(ID) Dim rs,sql Set rs=server.CreateObject("adodb.recordset") sql="Select * From "&Datafrom&" where ID="&ID rs.open sql,conn,1,1 SortText=rs("SortNameCH") SortText=replace(SortText," "," ") rs.close set rs=nothing End Function %>