谢谢各位高手
if session("dj")="1" then
%>
<!--webbot bot="Validation" s-display-name="栏目分类" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select size="1" name="lm">
<option>请选择</option>
<%
sql = "select * from lm where lm<>'' order by id asc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
%>
<option value='<%=rs("id")%>|0|0' <% if clng(lmid)=clng(rs("id")) then response.write " selected" %>><%=rs("lm")%>(1级)</option>
<% sql2 = "select * from lm where lmid='"&rs("id")&"' order by id asc"
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
while not rs2.eof
%>
<option value='<%=rs("id")%>|<%=rs2("id")%>|0' <% if clng(lmid)=clng(rs2("id")) then response.write " selected" %>> ├<%=rs2("lm2")%>(2级)</option>
<%
Set rs33 = Server.CreateObject("ADODB.RecordSet")
rs33.Open "select * from [lm] where lm3<>'' and lmid='"&rs2("id")&"' order by id asc",conn,1,1
while not rs33.eof
%>
<option value='<%=rs2("lmid")%>|<%=rs2("id")%>|<%=rs33("id")%>' <% if clng(lmid)=clng(rs33("id")) then response.write " selected" %>> ├<%=rs33("lm3")%>(3级)</option>
<%
rs33.movenext
wend
rs2.movenext
wend
rs.movenext
wend
rs.close
set rs=nothing
%>
</select>
<%else%> <!--webbot bot="Validation" s-display-name="栏目分类" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select name="lm1" size="1" id="lm1">
<option>请选择</option>
<option value="<%=lm_1_rs("lmid")%>|<%=lm_1_rs("id")%>|0">├ <%=lm_1_rs("lm2")%>(2级)</option>
<option value="<%=lmid31%>|<%=lm_1_rs("lmid")%>|<%=lm_1_rs("id")%>">├ <%=lm_1_rs("lm3")%>(3级)</option>
<%
admin_sql = "select * from admin where [user]='"&adminuser&"' order by id desc"
Set admin_rs = Server.CreateObject("ADODB.RecordSet")
admin_rs.Open admin_sql,conn,1,1
admin_lmid=admin_rs("lmid")
for kkk=1 to 31
admin_lmid=replace(admin_lmid,chr(i),"")
next
'Response.Write admin_lmid
array_admin_lmid=split(admin_lmid,",")
For i=0 to ubound(array_admin_lmid)
aaa=array_admin_lmid(i) '取出编辑者拥有的权限ID号.
if aaa="" then aaa=0
lm_1_sql = "select * from lm where id="&aaa
Set lm_1_rs = Server.CreateObject("ADODB.RecordSet")
lm_1_rs.Open lm_1_sql,conn,1,1
while not lm_1_rs.eof
if lm_1_rs("lm")<>"" then
%>
<%
ElseIf lm_1_rs("lm2")<>"" then
%>
<%
Elseif lm_1_rs("lm3")<>"" then
get_1_id_sql="select lmid from [lm] where id="&clng(lm_1_rs("lmid"))
set get_1_id_rs = Server.CreateObject("ADODB.RecordSet")
get_1_id_rs.Open get_1_id_sql,conn,1,1
lmid31=get_1_id_rs("lmid")
get_1_id_rs.close
set get_1_id_rs=nothing
%>
<%
end if '结尾配对lm_1_rs("lm")<>""
lm_1_rs.movenext
wend
lm_1_rs.close
set lm_1_rs=nothing
next
admin_rs.close
set admin_rs=nothing
%>
</select>
<%end if%>
这是我的程序 头头 要让我改成 2级联动的 求各位高手给改下