上一篇:无限级目录树+记忆节点状态 >>
利用C#在SQL Server2000存取图像 For Window
<%
set conn=server.createobject("ADODB.CONNECTION")
connstr="DBQ="+server.mappath("db1.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
conn.open connstr
function menu(id)
set rs=server.CreateObject("adodb.recordset")
sql="select * from menu where id1="&id&" order by url,id"
rs.open sql,conn,1,1
if rs.recordcount=0 then
rs.close
set rs=nothing
exit function
end if
response.write("<table border=‘’0‘’ cellspacing=‘’0‘’ cellpadding=‘’0‘’>")
i=1
while not rs.eof
if len(rs("url"))>0 then
if i=rs.recordcount then
menutype="file1"
else
menutype="file"
end if
menuname="<a href=‘’"&rs("url")&"‘’ target=‘’_blank‘’>"&rs("menuname")&"</a>"
onmouseup=""
else
if i=rs.recordcount then
menutype="menu3"
listtype="list1"
onmouseup="with(eval(‘’id"&rs("id")&"‘’))if(style.display==‘’‘’){style.display=‘’none‘’;this.className=‘’menu3‘’;}else{style.display=‘’‘’;this.className=‘’menu4‘’;}"
else
menutype="menu1"
listtype="list"
onmouseup="with(eval(‘’id"&rs("id")&"‘’))if(style.display==‘’‘’){style.display=‘’none‘’;this.className=‘’menu1‘’;}else{style.display=‘’‘’;this.className=‘’menu2‘’;}"
end if
menuname=rs("menuname")
end if
%>
<tr>
<td class="<%= menutype%>" onMouseUp="<%= onmouseup%>"><%= menuname%></td>
</tr>
<%if len(rs("url"))<3 then%>
<tr id="id<%= rs("id")%>" style="display:none">
<td class="<%= listtype%>"><%menu(rs("id"))%></td>
</tr>
<%
end if
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
set rs=nothing
end function
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>=========无限级目录树=========http://bbs.asp2004.net</title>
<style type="text/css">
<!--
.menu1 {
background-image: url(folder1.gif);
background-repeat: no-repeat;
height: 17px;
left: 32px;
padding-left: 32px;
cursor: hand;
}
.menu2 {
background-image: url(folder2.gif);
background-repeat: no-repeat;
height: 17px;
left: 32px;
padding-left: 32px;
cursor: hand;
}
.menu3 {
background-image: url(folder3.gif);
background-repeat: no-repeat;
height: 17px;
left: 32px;
padding-left: 32px;
cursor: hand;
}
.menu4 {
background-image: url(folder4.gif);
background-repeat: no-repeat;
height: 17px;
left: 32px;
padding-left: 32px;
cursor: hand;
}
.list {
padding-left: 20px;
background-image: url(list.gif);
background-repeat: repeat-y;
}
.list1 {
padding-left: 20px;
}
.file {
background-image: url(file.gif);
background-repeat: no-repeat;
height: 16px;
cursor: hand;
padding-left: 32px;
}
.file1 {
background-image: url(file1.gif);
background-repeat: no-repeat;
height: 16px;
cursor: hand;
padding-left: 32px;
}
body {
font-size: 9pt;
color: #000000;
background-color: #FFFFFF;
}
a:link {
font-size: 9pt;
color: #000000;
text-decoration: none;
}
a:visited {
font-size: 9pt;
color: #000000;
text-decoration: none;
}
a:hover {
font-size: 9pt;
color: #0000FF;
text-decoration: none;
position: relative;
right: 1px;
bottom: 1px;
}
a:active {
font-size: 9pt;
color: #000000;
text-decoration: none;
}
-->
</style>
<meta name="keywords" content="asp2004,树,菜单,无限级">
<meta name="author" content="小灰,quxiaohui_0@163.com">
</head>
<body>
<a href="http://bbs.asp2004.net/" target="_blank">http://bbs.asp2004.net/</a>提供最新下载《<a href="menu.asp">管理</a>》<br>
<%
menu 0
conn.close
set conn=nothing
%>
</body>
</html>
相关文章:
- · 如何把ASP编写成DLL
- · ASP计数器设计详解(转载)
- · 统计在线人数、每日访问人数和总人数
- · 如何动态ASP文件
- · 用asp打开光驱!
- · asp分页显示详论
- · 面向对象的ASP技术:思考与实践
- · 如何获得真实的ip
- · 对文件夹操作2
- · 对文件的操作1
- · 全面优化ASP应用程序的性能(转载)
- · 测试访问者电脑的分辨率
- · 让你的ASP运行于非Windows平台
- · 用ASP编程实现快速查找
- · Calculator
- · ASP导出Excel数据的四种方法
- · ASP编程中15个非常有用的例子
- · 改进ASP应用程序中的字符串处理性能
- · 保护你的ASP页面的两种办法
- · ASP如何获取真实IP地址
- · 关于<SELECT>的无限级联(省|市|县|乡|村|...)
- · 一个简单的计数器和流量统计程序
- · 最简洁的多重查询的解决方案
- · 让上传变的简简单单
- · Microsoft Word 对象
- · ASP操作Excel技术总结
- · 图片上传前取得尺寸
- · 用ASP、VB和XML建立互联网应用程序(1)
- · ASP分页显示之乱盖
- · 为你的网页加一个Loading !!!!
- · 关于asp调试出错信息
- · Vbscript类型转换函数
- · ASP自动生成编号的方法
- · JMAIL属性、方法大全
- · ASP中模板思想的应用
- · asp中常用的长度单位
- · 输出EXCEL文件的通用函数,很实用
- · 二级域名原理以及程序,申请即可开通
