📄 fsoexplorer.asp
字号:
for i = 1 to len(vstrin)
thischr = mid(vstrin,i,1)
if abs(asc(thischr)) < &hff then
if thischr=" " then
strreturn = strreturn & "+"
elseif instr(strSpecial,thischr)>0 then
strreturn = strreturn & "%" & hex(asc(thischr))
else
strreturn = strreturn & thischr
end if
else
innercode = asc(thischr)
if innercode < 0 then
innercode = innercode + &h10000
end if
hight8 = (innercode and &hff00)\ &hff
low8 = innercode and &hff
strreturn = strreturn & "%" & hex(hight8) & "%" & hex(low8)
end if
next
urlencoding = strreturn
end function
function create_it(act)
fname=trim(inputbox("请输入要创建的文件(夹)的名称:","输入待创建的文件(夹)名"))
if fname<>"" then
fname=urlencoding(fname)
window.location.href="fsodel.asp?act="&act&"&path=<%=pathurl%>"&fname&"&epath=<%=pathurl%>&page=<%=page%>&ntime=<%=ntime%>"
end if
end function
//-->
</script>
<head>
<body>
<table align="center" cellspacing=0 style="border:solid 1px;border-color:#f6f6f6 #999999 #999999 #f6f6f6;background:#d6d3cc">
<tr>
<td width="40%" style="border-right:none;padding-left:12px;vertical-align:middle"><%=sysname%> Version:<%=sysversion%></td>
<td align="center" width="40%" style="border-right:none;border-left:none;">
<img src="fsoimg/del.gif" class="imgbutton" onmouseover="this.className='imgbt'" onmouseout="this.className='imgbutton'" onclick="delbatch()" alt="删除选中文件">
<img src="fsoimg/copy.gif" class="imgbutton" onmouseover="this.className='imgbt'" onmouseout="this.className='imgbutton'" onclick="document.delthis.action='fsocopy.asp?path=<%=pathurl%>&page=<%=page%>';document.delthis.act.value='copy';document.delthis.submit();" alt="复制选中文件">
<img src="fsoimg/cut.gif" class="imgbutton" onmouseover="this.className='imgbt'" onmouseout="this.className='imgbutton'" onclick="document.delthis.action='fsocopy.asp?path=<%=pathurl%>&page=<%=page%>';document.delthis.act.value='cut';document.delthis.submit();" alt="剪切选中文件">
<%if session("act")="copy" or session("act")="cut" then%>
<img src="fsoimg/paste.gif" class="imgbutton" onmouseover="this.className='imgbt'" onmouseout="this.className='imgbutton'" onclick="window.location.href='<%=selfname%>?act=paste&path=<%=pathurl%>&page=<%=page%>&ntime=<%=ntime%>';" alt="粘贴文件到当前目录">
<%end if%>
<img src="fsoimg/refresh.gif" class="imgbutton" onmouseover="this.className='imgbt'" onmouseout="this.className='imgbutton'" onclick="window.location.reload()" alt="刷新">
</td>
<td style="text-align:right;vertical-align:middle;padding-right:12px;border-left:none;"><%if session("loginstatus")="islogined" and session("grade")=3 then%><a href="###" onclick="window.open('admin.asp','','menubar=no,scrollbars=no,location=no,status=no,width=310,height=210')">用户管理</a> <%end if%><a href="loginout.asp?ntime=<%=ntime%>">注销登陆</a></td>
</tr>
</table>
<table align="center" cellspacing=0 style="border:solid 1px;border-color:#f6f6f6 #999999 #999999 #f6f6f6;background:#d6d3cc">
<tr>
<td colspan=3 vertical-align="middle">
<form method="get" action="<%=selfname%>" style="padding:0;margin:0">
<span style="position:relative;top:-3px;">位置:</span><input type="text" name="path" style="margin:6px 6px 3px;width:614px;border:solid 1px #000099;" value="<%=path%>">
<input type="submit" class="button" value="跳转">
</form>
</td>
</tr>
</table>
<table align="center" border=1 cellspacing=1>
<tr>
<td width="30%">
<%if obj_fso.folderexists(s_folderpath) then%>
<div> <input type="button" value="全选目录" class="button" onclick="selectall(document.delthis.folders,true)">
<input type="button" value="清除选择" class="button" onclick="selectall(document.delthis.folders,false)">
<input type="button" value="新建目录" class="button" onclick="create_it('createfolder')"><br>
</div>
<%
set obj_folder=obj_fso.getfolder(s_folderpath)
if obj_folder.files.count mod pagesize=0 then
totalpage=obj_folder.files.count\pagesize
else
totalpage=obj_folder.files.count\pagesize+1
end if
if page<1 then
page=1
end if
if page>totalpage then
page=totalpage
end if
response.write "<table cellspacing=1 border=0>"&vbcrlf&"<form name='delthis' method='post' action='fsodelbatch.asp?page="&page&"&path="&pathurl&"'><input type='hidden' name='act' value='delbatch'><input type='hidden' name='basepath' value='"&path&"'>"&vbcrlf&"<tr>"&vbcrlf&"<td colspan=2>"&vbcrlf
response.write goparent&"<br><br>"&vbcrlf
for each s_folder in obj_folder.subfolders
response.write "<tr>"&vbcrlf&"<td width='70%'>"&vbcrlf
response.write "<input type='checkbox' name='folders' value='"&s_folder.name&"'><img src='fsoimg/folder.gif'> <a href='"&selfname&"?path="&pathurl&server.urlencode(s_folder.name)&"&ntime="&ntime&"'>"&s_folder.name&"</a>"&vbcrlf
response.write "<td><a href=""javascript:delfile('delfolder','"&s_folder.name&"')"">删除</a> <a href=""javascript:renameit('"&s_folder.name&"','renfolder')"">更名</a></td>"&vbcrlf&"</tr>"&vbcrlf
next
%>
</table>
</td>
<td align="right"><div><input type="button" value="全选文件" class="button" onclick="selectall(document.delthis.files,true)">
<input type="button" value="清除选择" class="button" onclick="selectall(document.delthis.files,false)">
<input type="button" value="新建文件" class="button" onclick="create_it('createfile')">
<input type="button" value="上传文件" class="button" onclick="window.open('fsoupload.asp?path=<%=pathurl%>','','')"> <br>
</div><table cellspacing=1 border=0>
<%
i=1
startnum=(page-1)*pagesize
for each s_file in obj_folder.files
if i>startnum then
response.write "<tr>"&vbcrlf&"<td width='41%'><input type='checkbox' name='files' value='"&s_file.name&"'>"&vbcrlf
file_type=getname(s_file,".")
select case file_type
case "htm","html"
response.write "<img src='fsoimg/html.gif'> "
case "css"
response.write "<img src='fsoimg/css.gif'> "
case "asp"
response.write "<img src='fsoimg/asp.gif'> "
case "txt"
response.write "<img src='fsoimg/text.gif'> "
case "jpg","gif","png"
response.write "<img src='fsoimg/img.gif'> "
case "mdb"
response.write "<img src='fsoimg/access.gif'> "
case "doc"
response.write "<img src='fsoimg/word.gif'> "
case "mid","mp3"
response.write "<img src='fsoimg/midi.gif'> "
case "zip","rar"
response.write "<img src='fsoimg/zip.gif'> "
case "chm"
response.write "<img src='fsoimg/chm.gif'> "
case else
response.write "<img src='fsoimg/unknown.gif'> "
end select
response.write "<a href=""javascript:viewfile('"&pathurl&"'+urlencoding('"&s_file.name&"'),'','');"">"&s_file.name&"</a></td>"&vbcrlf
select case file_type
case "zip","rar","tar","exe","gif","jpg","jpe","jpeg","png","bmp","psd","mdb","doc","ppt","xls","mid","mp3","avi","chm"
response.write "<td width='24%'><a href=""javascript:dis_edit();"">"
case "txt","bat","c","htm","html","css","js","vbs","inc","stm","shtm","shtml","asp","asa","aspx","asax","ascx","asmx","aspa","php","php3","php4","jsp","cgi"
response.write "<td width='24%'><a href=""javascript:editfile('"&s_file.name&"')"">"
case else
response.write "<td width='24%'><a href=""javascript:is_edit('"&s_file.name&"')"">"
end select
response.write "编辑</a> <a href=""javascript:delfile('delfile','"&s_file.name&"')"">删除</a> <a href=""javascript:renameit('"&s_file.name&"','renfile')"">更名</a> <a href=""javascript:downfile('"&s_file.name&"')"">下载</a></td>"&vbcrlf
response.write "<td width='11%'>"&s_file.size&"</td>"&vbcrlf
response.write "<td>"&s_file.datelastmodified&"</td>"&vbcrlf&"</tr>"&vbcrlf
end if
if i>startnum+pagesize then
exit for
end if
i=i+1
next
%>
</td>
</tr>
<tr>
<td colspan=4 align=center><%
if page>1 then
response.write "<a href='"&selfname&"?path="&pathurl&"&page="&(page-1)&"&ntime="&ntime&"'>上一页</a> "
end if
response.write "共"&obj_folder.files.count&"个文件 当前第 "
response.write "<select name='jtp' style='line-height:12px;border:none;height:12px;padding:0' onchange="&chr(34)&"window.location.href='"&selfname&"?page='+(this.options.selectedIndex+1)+'&path="&pathurl&"&ntime="&ntime&"'"&chr(34)&">"&vbcrlf
for i=1 to totalpage
if i=page then
response.write "<option selected>"&i&vbcrlf
else
response.write "<option>"&i&vbcrlf
end if
next
response.write "</select>"&vbcrlf
response.write " 页"&vbcrlf
response.write " 共 "&totalpage&" 页"
if page<totalpage then
response.write " <a href='"&selfname&"?path="&pathurl&"&page="&(page+1)&"&ntime="&ntime&"'>下一页</a> "
end if
response.write "</td>"&vbcrlf&"</tr>"&vbcrlf
response.write "</form>"&vbcrlf&"</table>"&vbcrlf
set obj_folder=nothing
else
response.write "<div style='width:100%;padding:25px 0 15px;text-align:center;background:transparent;color:#ff3333;font-weight:600'>文件夹不存在或者你没有访问权限</div>"
end if
set obj_fso=nothing
%>
</td>
</tr>
</table>
<table align="center" cellspacing=0 style="border:solid 1px;border-color:#f6f6f6 #999999 #999999 #f6f6f6;background:#d6d3cc">
<tr>
<td align="center" height="32px" style="padding-top:6px">版权所有:<a href="http://www.98062.com" target="_blank">www.98062.com</a> 程序设计:<a href="mailto:netasp@sohu.com">netasp@sohu.com</a></td>
</tr>
</table>
</body>
</html>
<!--#include file="fsofoot.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -