?? 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 = "網(wǎng)絡(luò)磁盤"
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>藍冰服務(wù)器文件管理程序-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>
藍冰服務(wù)器文件管理程序-<font class=fonts>V1.0</font>
<b>[<a href="http://www.zysun.com">下載最新版</b></a>]<br>
<br>
聲明:<br>
1,本程序為方便站長管空間文件而編寫,請慎重使用,一切惡意使用所引發(fā)的后果均由使用<br>者自負,與作者無關(guān)。<br>
2,復(fù)制的文件將保存在您網(wǎng)站目錄下的<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">文件系統(tǒng)</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 '在此設(shè)置要查找的路徑
msg="當前路徑"
set lq2=fs.getfolder(folder)
%>
■ <%=msg%>:<font color=red><u><%=lq2.path%></u></font><br>
<font class=fonts>包含文件夾數(shù):<font color=red><%=lq2.subfolders.count%></font>個;</font> <font class=fonts>包含文件數(shù):<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="復(fù)制該文件夾及該文件夾下的所有文件!">復(fù)制</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%>">復(fù)制</a></td>
<td width=50 align=center><a href="index.asp?action=del&path=<%=request("path")%>&file=<%=name2%>">刪除</a></td>
</tr>
<%next%>
</table>
<p>平面設(shè)計、網(wǎng)頁設(shè)計、動畫設(shè)計、程序源碼,大量技術(shù)文章請訪問【<font color="#FF0000"><a href="http://www.zysun.com"><font color="#FF0000">華訊在線</font></a></font>】
<br>
網(wǎng)址:<a href="http://www.zysun.co">http://www.zysun.com</a><br>
本程序由藍冰(<a href="mailto:lvbqing@183.ha.cn?subject=藍冰服務(wù)器文件管理程序">lvbqing@183.ha.cn,</a>35789762)編寫,轉(zhuǎn)載時請保留這些信息,謝謝!<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
%>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -