📄 index.asp
字号:
<%
Response.Buffer = true
server.scripttimeout=300
on error resume next
function cdrivetype(tnum)
Select Case tnum
Case 0: cdrivetype = "未知"
Case 1: cdrivetype = "可移动磁盘"
Case 2: cdrivetype = "本地硬盘"
Case 3: cdrivetype = "网络磁盘"
Case 4: cdrivetype = "CD-ROM"
Case 5: cdrivetype = "RAM 磁盘"
End Select
end function
function cIsReady(trd)
Select Case trd
case true: cIsReady="<font class=fonts><b>√</b></font>"
case false: cIsReady="<font color='red'><b>×</b></font>"
End Select
end function
function cSize(tSize)
if tSize>=1073741824 then
cSize=int((tSize/1073741824)*1000)/1000 & " GB"
elseif tSize>=1048576 then
cSize=int((tSize/1048576)*1000)/1000 & " MB"
elseif tSize>=1024 then
cSize=int((tSize/1024)*1000)/1000 & " KB"
else
cSize=tSize & "B"
end if
end function
set fs=server.createobject("scripting.filesystemobject")
LBTEMP=server.MapPath("./")&"\LBTEMP"
if fs.folderexists (LBTEMP)=false then
fs.createfolder LBTEMP
else
end if
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>蓝冰服务器文件管理程序-V1.0</TITLE>
<style>
<!--
BODY{FONT-FAMILY: 宋体;FONT-SIZE: 9pt}
TD{FONT-SIZE: 9pt}
A{COLOR: #000000;TEXT-DECORATION: none}
A:hover{COLOR: #3F8805;TEXT-DECORATION: underline}
.input{BORDER: #111111 1px solid;FONT-SIZE: 9pt;BACKGROUND-color: #F8FFF0}
.backs{BACKGROUND-COLOR: #3F8805;COLOR: #ffffff;}
.backq{BACKGROUND-COLOR: #EEFEE0}
.backc{BACKGROUND-COLOR: #3F8805;BORDER: medium none;COLOR: #ffffff;HEIGHT: 18px;font-size: 9pt}
.fonts{COLOR: #3F8805}
-->
</STYLE>
</HEAD>
<BODY>
蓝冰服务器文件管理程序-<font class=fonts>V1.0</font>
<b>[<a href="http://www.zysun.com">下载最新版</b></a>]<br>
<br>
声明:<br>
1,本程序为方便站长管空间文件而编写,请慎重使用,一切恶意使用所引发的后果均由使用<br>者自负,与作者无关。<br>
2,复制的文件将保存在您网站目录下的<font color=red>LBTEMP</font>文件夹中,请及时删除该文件夹。<br><br>
<font class=fonts>本文件所在路径:<%=Request.ServerVariables("PATH_TRANSLATED")%></font><br>
■ 我的电脑
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="510">
<tr height="18" align=center class="backs">
<td width="110">盘符和磁盘类型</td>
<td width="60">就绪</td>
<td width="90">卷标</td>
<td width="70">文件系统</td>
<td width="90">可用空间</td>
<td width="90">总空间</td>
</tr>
<%set drvObj=fs.Drives
for each d in drvObj %>
<tr height="18" align=center>
<td align="right"><a href="index.asp?path=<%=d.driveletter%>:\"><%=cdrivetype(d.DriveType) & " " & d.DriveLetter%>:</td>
<td><%=cIsReady(d.isReady)%></td>
<td><%=d.VolumeName%></td>
<td><%=d.FileSystem%></td>
<td align="right"><%=cSize(d.FreeSpace)%></td>
<td align="right"><%=cSize(d.TotalSize)%></td>
</tr>
<%on error resume next
next %>
</td></tr>
</table>
<br>
<%
dim path,msg
path=request("path")
if request("path")<>"" then
folder=path '在此设置要查找的路径
msg="当前路径"
set lq2=fs.getfolder(folder)
%>
■ <%=msg%>:<font color=red><u><%=lq2.path%></u></font><br>
<font class=fonts>包含文件夹数:<font color=red><%=lq2.subfolders.count%></font>个;</font> <font class=fonts>包含文件数:<font color=red><%=lq2.files.count%></font>个;</font> <a href="javascript:history.go(-1)"><font color=red>后退</font></a>
<table class=backq border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#3F8805" width="510">
<tr height=18 align=center class="backs">
<td width=220>文件夹<%=lq2.subfolders.count%>个/文件<%=lq2.files.count%>个</td>
<td width=70>大小</td>
<td width=120>类型</td>
<td width=100 colspan=2>操作</td>
</tr>
<%for each name1 in lq2.subfolders
set lq22=fs.getfolder(name1)
%><tr height=18>
<td width=220> <a href="index.asp?path=<%=name1%>\">
<%
if name1= server.MapPath("./") or name1=server.MapPath("./")&"\LBTEMP" then
response.write"<font color=red>"&name1&"</font>"
else
response.write name1
end if
%></a></td>
<td width=70 align=right> <%=csize(name1.size)%></td>
<td width=120> <%=name1.type%> (<%=lq22.subfolders.count%>夹/<%=lq22.files.count%>件)</td>
<td width=50 align=center><a href="index.asp?action=copyfolder&path=<%=request("path")%>&folder=<%=name1%>" title="复制该文件夹及该文件夹下的所有文件!">复制</a></td>
<td width=50 align=center><a href="index.asp?action=delfolder&path=<%=request("path")%>&folder=<%=name1%>" title="删除该文件夹及该文件夹下的所有文件!">删除</a></td>
</tr>
<%next
for each name2 in lq2.files%>
<tr height=18>
<td width=220> <%
if name2=Request.ServerVariables("PATH_TRANSLATED") then
response.write"<font color=red>"&name2&"(本文件)</font>"
else
response.write name2
end if%></td>
<td width=70 align=right> <%=cSize(name2.size)%></td>
<td width=120> <%=name2.type%></td>
<td width=50 align=center><a href="index.asp?action=copy&path=<%=request("path")%>&file=<%=name2%>">复制</a></td>
<td width=50 align=center><a href="index.asp?action=del&path=<%=request("path")%>&file=<%=name2%>">删除</a></td>
</tr>
<%next%>
</table>
<p>平面设计、网页设计、动画设计、程序源码,大量技术文章请访问【<font color="#FF0000"><a href="http://www.zysun.com"><font color="#FF0000">华讯在线</font></a></font>】
<br>
网址:<a href="http://www.zysun.co">http://www.zysun.com</a><br>
本程序由蓝冰(<a href="mailto:lvbqing@183.ha.cn?subject=蓝冰服务器文件管理程序">lvbqing@183.ha.cn,</a>35789762)编写,转载时请保留这些信息,谢谢!<br>
</p>
<%
if request("action")="del" then
fs.deletefile request("file"),true
response.redirect"index.asp?path="&request("path")
end if
if request("action")="delfolder" then
set lq3=fs.getfolder(request("folder"))
for each file in lq3.files
fs.deletefile file,true
next
fs.deletefolder request("folder"),true
response.redirect"index.asp?path="&request("path")
end if
if request("action")="copy" then
set lq4=fs.getfile(request("file"))
fs.copyfile request("file"),LBTEMP&"\"&lq4.name,false
response.redirect"index.asp?path="&request("path")
end if
if request("action")="copyfolder" then
set lq5=fs.getfolder(request("folder"))
fs.copyfolder request("folder"),LBTEMP&"\"&lq5.name
for each file in lq5.files
fs.copyfile file,LBTEMP&"\"&lq5.name&"\"&file.name,false
next
response.redirect"index.asp?path="&request("path")
end if
else
response.write"■ 请选择磁盘进行操作"
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -