分类管理

<% set rs=server.createobject("adodb.recordset") set rss=server.createobject("adodb.recordset") dim RsClass(5) function listunder(e) set RsClass(e)=server.createobject("adodb.recordset") RsClass(e).open "select Class_Id,Class_Name from Class where Class_TopClassId="&RsClass(e-1)("Class_Id"),conn,1,3 while not RsClass(e).eof dim topclassname topclassname="" for x=0 to e-1 topclassname=topclassname&RsClass(x)("Class_Name")&"＞" next SelectValue=SelectValue&","""&RsClass(e)("Class_Id")&"""" SelectMenu=SelectMenu&","""&topclassname&RsClass(e)("Class_Name")&"""" rs.open"select UrlClass_Id,UrlClass_Name from UrlClass where UrlClass_ClassId="&RsClass(e)("Class_Id"),conn,1,3 SelectClassValue=SelectClassValue&"[" SelectClassMenu=SelectClassMenu&"[" dim UCi UCi=0 while not rs.eof if UCi>0 then SelectClassValue=SelectClassValue&","""&rs("UrlClass_Id")&"""" SelectClassMenu=SelectClassMenu&","""&rs("UrlClass_Name")&"""" else SelectClassValue=SelectClassValue&""""&rs("UrlClass_Id")&"""" SelectClassMenu=SelectClassMenu&""""&rs("UrlClass_Name")&"""" end if UCi=3 rs.movenext wend rs.close SelectClassValue=SelectClassValue&"]" SelectClassMenu=SelectClassMenu&"]" if i 0 then SelectValue=SelectValue&","""&RsClass(0)("Class_Id")&"""" SelectMenu=SelectMenu&","""&RsClass(0)("Class_Name")&"""" SelectClassValue=SelectClassValue&",[" SelectClassMenu=SelectClassMenu&",[" else SelectValue=SelectValue&"""0"","""&RsClass(0)("Class_Id")&"""" SelectMenu=SelectMenu&"""-选择主分类-"","""&RsClass(0)("Class_Name")&"""" SelectClassValue=SelectClassValue&"[""0""],[" SelectClassMenu=SelectClassMenu&"[""子分类""],[" end if Cj=0 rs.open"select UrlClass_Id,UrlClass_Name from UrlClass where UrlClass_ClassId="&RsClass(0)("Class_Id"),conn,1,3 while not rs.eof if Cj>0 then SelectClassValue=SelectClassValue&","""&rs("UrlClass_Id")&"""" SelectClassMenu=SelectClassMenu&","""&rs("UrlClass_Name")&"""" else SelectClassValue=SelectClassValue&""""&rs("UrlClass_Id")&"""" SelectClassMenu=SelectClassMenu&""""&rs("UrlClass_Name")&"""" end if Cj=3 rs.movenext wend rs.close Ci=3 SelectClassValue=SelectClassValue&"]" SelectClassMenu=SelectClassMenu&"]" call listunder(1) RsClass(0).movenext wend SelectClassMenu="["&SelectClassMenu&"]" SelectClassValue="["&SelectClassValue&"]" SelectMenu="["&SelectMenu&"]" SelectValue="["&SelectValue&"]" response.write ""&SelectClassMenu&"
" response.write ""&SelectClassValue&"
" response.write ""&SelectValue&"
" response.write ""&SelectMenu&"" %>