【选择所属类别】
<% 'update by quzhonghua 2010 3.10 Dim Result,Datafrom Result=request.QueryString("Result") Select Case Result Case "Products" Datafrom="ProductSort" Case "News" Datafrom="NewsSort" Case "Price" Datafrom="PriceSort" Case "Download" Datafrom="DownSort" Case "Others" Datafrom="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("") if ChildCount>0 then %> " style="display:yes"> <% end if rs.movenext i=i+1 wend response.write("
"&FolderName&"        ") response.write("选择") response.write("
<% ListSort(rs("id")) %>
") 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 %>