www.gusucode.com > 因特达Access数据库在线管理系统 > 因特达Access数据库在线管理系统\code\access\file_select_left.asp

    <!--
程序作用:列出目录
编写时间:2007-8-9
程序制作:张正森
-->
<!-- #include file= "public.asp" -->
<html>
<head>
<style type="text/css">
<!--
body,td,th {
	font-size: 13px;
}
a {
	font-size: 13px;
	color: #316AC5;
	cursor: hand;
}
a:link {
	text-decoration: none;
	color: #0033CC;
}
a:visited {
	text-decoration: none;
	color: #0033CC;
}
a:hover {
	text-decoration: underline;
	color: #FF0000;
}
.selected {
	color: #FFFFFF;
	background-color: #E6F2FF;
}
a:active {
	text-decoration: none;
	color: #FF0000;
}
body {
	margin-left: 2px;
	margin-top: 1px;
	margin-right: 1px;
	margin-bottom: 0px;
}

-->
</style>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JScript.Encode" src="js/file_select_left.js"></script>

</head>

<body onclick="selectDiv()">
<%
all_i=1'全局变量i

dim requestPath'返回的请求路径

requestPath=request("path")
if requestPath="" then
	requestPath="/"
end if

Call folder_list(requestPath,obj_fso,cur_folder)

function folder_list(dir,obj_fso,cur_folder)
	set obj_fso=server.createobject("scripting.filesystemobject")
	'response.Write(server.MapPath(dir))
	'response.End()
	set obj_folder=obj_fso.getfolder(server.MapPath(dir))
	nbsp=""
	arr=split(dir,"/")
	jishu=ubound(arr)'目录级数
	'width=(jishu)*15
	width=25
	str=""
	for each s_folder in obj_folder.subfolders
		selected=""
		if request("path")=s_folder.name then selected=" class=selected "
		dirStr=dirStr&"<div id=t_"&all_i&selected&">"&nbsp&"<img src='ja.gif'><a href=#d>"&s_folder.name&"</a></div><div id=c_"&all_i&" style='padding-left:"&width&"'></div>"
		all_i=all_i+1
	next
	response.write(dirStr)'输出左边目录
end function
'response.Write("dd"&request("path"))
'response.End()


%>

<script>var all_i=<%=all_i%>//下次要接着用的变量
</script>

<iframe name="blank" width="0" height="0"></iframe>
</body>
</html>