在后台添加子目录确不能显示出此目录?

hyher 2009-07-11 10:40:45
在后台添加一个二级目录或三级目录,但是在显示目录中确无法得到添加的目录,但是在前台显示得出添的目录,请问如何解决,好像是固定死原来的目录了!显示目录代码如下:<table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="25" align="center" background="../sysImages/menudown.gif" class="menu_title" id="imgmenu0" style="cursor:hand" onClick="showsubmenu(0)">系统菜单</td>
</tr>
<tr class="body">
<td colspan="2" align="center" class="td_line" id="submenu0" ><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"> </td>
</tr>
<tr>
<td height="20"> <img src="../sysImages/Station.gIF" width="24" height="22" align="absmiddle" />根目录</td>
</tr>
<tr>
<td height="20">
<%
UID = Session("UID")
Menu_SQL="select * from admin where UID='"&UID&"'"
Set rc=server.CreateObject("ADODB.RecordSet")
rc.open Menu_SQL,conn,1,1
if rc("Menu")<>Empty then
Menus=split(rc("Menu"),",")
end if


Function Tree(Parent_id)
sql = "select * from type where Parent_id="&Parent_id&" order by Rank desc"
set rs=server.CreateObject("ADODB.RecordSet")
rs.open sql,conn,1,1
%>
<table border="0" cellspacing="0" cellpadding="0">
<%
i = 1
do until RS.eof
ChildCount=conn.execute("select count(*) from Type where Parent_ID="&RS("ID"))(0)

if ChildCount=0 then
if i=RS.recordcount then
menutype="file1"
else
menutype="file"
end if
onmouseup=""
else
if i=RS.recordcount then
menutype="menu3"
listtype="list1"
onmouseup=" onMouseUp=change1('a"&RS("ID")&"','b"&RS("ID")&"');"
else
menutype="menu1"
listtype="list"
onmouseup=" onMouseUp=change2('a"&RS("ID")&"','b"&RS("ID")&"');"
end if
end if
if rs("Parent_id")<>0 then
Module_sql="select * from Module_id where id="&rs("Module_id")
set rc=conn.execute(Module_sql)
module_Url = rc("Url") & "?SS_ID="&RS("ID")
rc.close()
Else
module_Url = "#"
end if
%>
<%
Flag = 0
For J = LBound(menus) To UBound(menus)
IF Trim(Rs("ID"))=Trim(menus(J)) Then
Flag = 1
End If
Next
%>
<%if flag=1 then%>
<tr>
<td class='<%= menutype %>' id='b<%= RS("ID") %>'<%= onmouseup %> height="25"><% If Module_url<>"#" Then %><a href="<%= module_Url %>" target="main"><%= rs("Title")%></a><% Else %><%= rs("Title")%><% End If %> </td>
</tr>
<%end if%>



<%
IF ChildCount>0 then
%>
<tr id='a<%=rs("id")%>' style="display:none">
<td class='<%= listtype %>'><% tree(RS("ID")) %>
</td>
</tr>
<%
end if
rs.movenext
i=i+1
loop

%>
</table>
<%
End Function
call Tree(0)
%>
</td>
</tr>
<tr>
<td height="20" align="center">
</tr>
</table></td>
</tr>
</table>
...全文
74 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧