<%
function list(dirid)
dim sRec,sSql,sNum,sTmp,rTemp,background
set sRec=server.createobject("adodb.recordset")
sSql="select * from dirs where dirId='"&dirid&"' and siteid='41'"
sRec.open sSql,Conn,3,1
if not sRec.eof then
sNum=1
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
while not sRec.eof
rTemp=left(Rnd(1000)*1000000000000000,12)
sTmp=Conn.execute("select count(*) as w from dirs where siteid='41' and dirid='"&dirid&"'")
if sTmp("countSub")>0 and sTmp("countSub")<>"" then
%>
<tr>
<%
if sNum=sRec.recordcount then
%>
<td width="18" valign="top">
<img src="images/angel.gif">
</td>
<%
else
%>
<td width="18" background="images/eline.gif" valign="top">
<img src="images/t.gif" >
</td>
<%
end if
%>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="menuPro" id="listName<%=sRec("listId")%>"><nobr><img id="img<%=sRec("listId")%>" style="cursor:hand" src="images/close.gif" align="absMiddle" onclick="jscript:showMenu(subMenu<%=rTemp&sNum%>,1)" alt="<%=sRec("listInfo")%>"><a href=""><%=server.HTMLEncode(sRec("listName"))%></a> <input type="checkbox" name="dirs_box" value="<%=sRec("listid")%>"> <% if sRec("rolling_press") then response.Write("该简介已在滚动栏中显示") end if%>
</nobr>
</div>
</td>
</tr>
</table>
</td>
</tr>
<%
if sNum<>sRec.recordcount then
background="background=images/eline.gif"
else
background=""
end if %>
<tr id="subMenu<%=rTemp&sNum%>" style="display=none">
<td width="18" <%=background%> valign="top">
</td>
<td>
<%
list(sRec("listid"))
%>
</td>
</tr>
<%
end if
sRec.movenext
sNum=sNum+1
wend
%>
</table>
<%
end if
sRec.close '关闭记录集
set sRec=nothing '关闭记录集
end function
Conn.close '关闭数据库链接
set Conn=nothing '关闭数据库链接
%>
</td>
</tr>
</table>
<br>
</body>
</html>
<%
else
Response.Redirect "../err.asp?msg=您没有足够的权限访问该页。"
end if
end if
%>