📄 getfolders.asp
字号:
<!--#include file="CONST.ASP"-->
<!--#include file="inc/chkuser.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="inc/htmlhead.asp"-->
<!--#include FILE="inc/Syschar.asp"-->
<%
'if not isMaster then Response.redirect "login.asp"
iF SetPower(2,5)=false then
Response.write("<SCRIPT LANGUAGE=""JavaScript"">"&vbcrlf)
Response.write("<!--"&vbcrlf)
Response.write("window.parent.location.href='inc/error.html';")
Response.write("//-->"&vbcrlf)
Response.write("</SCRIPT>")
Response.end
'Response.redirect "login.asp"
eND iF
if right(GetPath,1)<>"/" then GetPath=GetPath&"/"
SetTemp=CheckFolder(GetPath,1)
if SetTemp<>"True" then EndProc SetTemp,1,""
Set GetFolder=Fso.GetFolder(Server.mappath(GetPath))
%>
<script language=javascript>
//window.name='leftFrame';
var baseurl;
baseurl='<%=GetBaseUrl%>';
function ExecuteIt(str,target)
{
window.open('<%=GetPath%>'+str,target);
}
function OpenIt(name,target)
{
window.open('EditFile_Adv.asp?action=OpenIt&path=<%=GetPath%>'+name,target);
}
function ChFolder(dir,mode)
{
var obj;
obj=document.boxobj;
if(!dir)
{alert('请输入要浏览的目录');return;}
if(mode)
{
if(obj.filter.value)
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&path=<%=GetPath%>'+dir;
else
obj.action='<%=GetFileName%>?path=<%=GetPath%>'+dir;
}
else
{
if(obj.filter.value)
obj.action='<%=GetFileName%>?filter='+obj.filter.value+'&path='+dir;
else
obj.action='<%=GetFileName%>?path='+dir;
}
obj.submit();
}
function showfiles(name,target)
{
window.open('getFiles.asp?path='+name,target);
}
function refreshWindow()
{
obj=document.boxobj;
obj.action=baseurl;
obj.submit();
}
</script>
<SCRIPT LANGUAGE="JavaScript">
<!--
//在最先打开的情况下编辑窗口尚未建立时处理错误
function writePath(subpath) //写当前目录到编辑窗口
{
var e;
try{var obj=window.parent.mainFrame.document.form2;
if(obj.filepath1)
{obj.filepath1.value='<%=GetPathDir%>'+subpath;
}
if(obj.filename1.value=='')
{obj.filepath.value='<%=GetPathDir%>'+subpath;}
}
catch(e){}
}
function insPath(inpath)
{
var info="<font color=#995511>"+inpath+"/</font>"
window.curpath.innerHTML=info;
}
//-->
</SCRIPT>
</head>
<body onload="writePath('');" bgcolor="#cacaca" text="#000000" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<form name="boxobj" method="post" action="<%=GetBaseUrl%>">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#999999" bordercolordark="#eeeeee" bgcolor="#cacaca">
<tr>
<td height="30" colspan="2" align="left" valign="middle" bgcolor="#D4D0c8"><nobr> 目录:<font color=#3366ee><%=GetPath%></font><span id=curpath></span></nobr></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#999999" bordercolordark="#eeeeee" bgcolor="#cacaca">
<tr align="left">
<td height="0" colspan="5" valign="middle" bordercolor="#CCCCCC" bgcolor="#CCCCCC">
<%if GetPath<>GetRootUrl and GetPath<>"/" then Response.write "<a href=""javascript:ChFolder('"&left(GetPath,instrRev(GetPath,"/",len(GetPath)-1))&"',0);showfiles('"&left(GetPath,instrRev(GetPath,"/",len(GetPath)-1))&"','bottomFrame');""><img src='pic/dir.gif' alt=返回上一级目录 border='0' onmouseover=this.src='pic/dir_x.gif' onmouseout=this.src='pic/dir.gif' ></a>"%> </td>
</tr>
<tr><td align="center" width="25" nowrap><nobr> <img src="pic/refreshiron.gif" onmouseover="this.src='pic/refreshiron_h.gif';" onMouseout="this.src='pic/refreshiron.gif';" alt="刷 新" style="cursor: hand;" onClick="refreshWindow();" align="absmiddle"> </nobr></td><td width='100%'> </td></tr>
<%
dim theFolder,cMaxDir
dim theFile,cMaxCount,iTotleSize,c,iMaxPage
cMaxDir=0
for each theFolder in GetFolder.SubFolders
cMaxDir=cMaxDir+1
%>
<tr>
<td height="20" align="center" valign="middle" nowrap bgcolor="#d8d8d8"><nobr> <a href="javascript:ChFolder('<%=theFolder.Name%>',1);showfiles ('<%=GetPath+theFolder.Name%>','bottomFrame');" target="_self"><img src="pic/folderB.gif" width="18" border="0" height="17" onmouseover="this.src='pic/folderA.gif'" id="folder<%=cMaxDir%>" onmouseout="if(!(this.id=='offs'))this.src='pic/folderB.gif'; " alt="打开子目录" align="absmiddle"></a> </nobr></td>
<td align="left" bgcolor="#d8d8d8" > <a href="javascript:ChFolder('<%=GetPath+theFolder.Name%>',0);" onclick ="
{if(offsFlag.value==1)
{
offs.src='pic/folderB.gif';
offs.id=offsFlag.name;
}
offsFlag.value=1;
offsFlag.name='folder<%=cMaxDir%>'
folder<%=cMaxDir%>.src='pic/folderA.gif';
folder<%=cMaxDir%>.id='offs';
writePath('<%=theFolder.Name%>'+'/');
insPath('<%=theFolder.Name%>');}
" target="bottomFrame" title="浏览该目录"><%=theFolder.Name%></a></td>
</tr>
<%
next
c=0
cMaxCount=0
iTotleSize=0
For Each theFile in GetFolder.Files
if CheckFile(theFile.Name,0,"02")="True" then
cMaxCount=cMaxCount+1
iTotleSize=iTotleSize+theFile.Size
end if
next
iMaxPage=cMaxCount\GetPageSize+1
%>
<tr valign="bottom" bgcolor="#cacaca">
<td height="24" colspan="5" bordercolor="#cacaca"> <font color=#777777>Folders:</font><font color=#ffff55><%=cMaxDir%></font>
<input type="hidden" name="maxdir" value="<%=cMaxDir%>">
<input name="filter" type="hidden" value="<%=GetFilter%>">
</td>
</tr>
</table>
</form>
<span id="offsFlag" name="" value="0"></span>
<span id="off" src="pic/folderB.gif"></span>
</body>
</html>
<%closedatabase
set GetFolder=nothing
set Fso=nothing
%>
<!--#include FILE="inc/coo_footer.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -