response.expires = -1
response.expiresabsolute = now() - 1
response.expires = 0
response.cachecontrol = "no-cache"
%>
if path="" then
path=trim(request.querystring("path"))&""
end if
if act="" then
act=lcase(trim(request.querystring("act")))
end if
if page="" then
page=lcase(trim(request.querystring("page")))
end if
if right(path,1)<>"/" then
path=path&"/"
end if
if left(path,1)<>"/" then
path="/"&path
end if
if invalidchar(path,0) then
call showmsg("错误:指定的路径含有非法字符!","")
response.end
end if
call checkpath(pathcanmodify,path)
realpath=server.mappath(path)
select case act
case "copy","move"
call copymove()
case "del","rd","md","copycon","renfile","renfolder"
call commands()
case "deltree"
call deltree()
case else
call showmsg("参数丢失,请重新正确操作!","back:off")
response.end
end select
sub copymove()
checksubmit()
frompath=trim(request.form("frompath"))
if invalidchar(frompath,0) then
call showmsg("错误:指定的路径含有非法字符!","")
response.end
end if
call checkpath(pathcanmodify,frompath)
session(sessionprefix&"folders")=""
session(sessionprefix&"files")=""
for each folder_name in request.form("folders")
session(sessionprefix&"folders")=session(sessionprefix&"folders")&"||"&folder_name
next
if left(session(sessionprefix&"folders"),2)="||" then
session(sessionprefix&"folders")=right(session(sessionprefix&"folders"),len(session(sessionprefix&"folders"))-2)
end if
for each file_name in request.form("files")
session(sessionprefix&"files")=session(sessionprefix&"files")&"||"&file_name
next
if left(session(sessionprefix&"files"),2)="||" then
session(sessionprefix&"files")=right(session(sessionprefix&"files"),len(session(sessionprefix&"files"))-2)
end if
if session(sessionprefix&"folders")="" and session(sessionprefix&"files")="" then
session(sessionprefix&"act")=""
session(sessionprefix&"frompath")=""
call showmsg("错误:没有选中任何文件和文件夹!","")
else
session(sessionprefix&"act")=act
session(sessionprefix&"frompath")=server.mappath(frompath)
response.redirect "web_explorer.asp?path="&server.urlencode(path)&"&page="&page
end if
end sub
sub commands()
frompath=server.urlencode(trim(request("currentpath")))
set fso=server.createobject("scripting.filesystemobject")
backurl="web_explorer.asp?path="&frompath&"&page="&page
if act="del" then
if fso.fileexists(realpath) then
fso.deletefile(realpath)
if fso.fileexists(realpath) then
set fso=nothing
call showmsg("错误:删除文件失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
else
set fso=nothing
call showmsg("错误:您要删除的文件 "&getselfname(realpath,"")&" 不存在!","back:off")
response.end
end if
elseif act="rd" then
if trim(path)="/" then
call showmsg("错误:无法删除网站根目录!","back:off")
response.end
end if
if fso.folderexists(realpath) then
fso.deletefolder(realpath)
if fso.folderexists(realpath) then
set fso=nothing
call showmsg("错误:删除文件夹失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
else
set fso=nothing
call showmsg("错误:您要删除的文件夹 "&getselfname(realpath,"")&" 不存在!","back:off")
response.end
end if
elseif act="md" then
if fso.folderexists(realpath) then
set fso=nothing
call showmsg("错误:您要新建的目录 "&getselfname(realpath,"")&" 已经存在!","back:off")
response.end
end if
fso.createfolder(realpath)
if not fso.folderexists(realpath) then
set fso=nothing
call showmsg("错误:新建目录失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
elseif act="copycon" then
if fso.fileexists(realpath) then
set fso=nothing
call showmsg("错误:您要新建的文件 "&getselfname(realpath,"")&" 已经存在!","back:off")
response.end
end if
fso.createtextfile(realpath)
if not fso.fileexists(realpath) then
set fso=nothing
call showmsg("错误:新建文件失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
elseif act="renfile" or act="renfolder" then
dim oldname,newname,addchar
oldname=trim(request("oldname"))
newname=trim(request("newname"))
if act="renfolder" then
addchar="夹"
end if
if oldname="" or newname="" then
set fso=nothing
call showmsg("错误:旧文件"&addchar&"名和新文件"&addchar&"名都必须不能为空!","back:off")
response.end
elseif invalidchar(oldname,1) then
set fso=nothing
call showmsg("错误:旧文件"&addchar&"名含非法字符!","back:off")
response.end
elseif invalidchar(newname,1) then
set fso=nothing
call showmsg("错误:新文件"&addchar&"名含非法字符!","back:off")
response.end
end if
oldname=server.mappath(path&oldname)
newname=server.mappath(path&newname)
if act="renfile" then
if fso.fileexists(oldname) then
if not fso.fileexists(newname) then
fso.getfile(oldname).name=trim(request("newname"))
if not fso.fileexists(newname) then
set fso=nothing
call showmsg("错误:更改文件"&addchar&"名失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
else
set fso=nothing
call showmsg("失败:新文件"&addchar&"名 "&trim(request("newname"))&" 的文件"&addchar&"已经存在!","back:off")
response.end
end if
else
set fso=nothing
call showmsg("失败:要更改的文件"&addchar&" "&trim(request("oldname"))&" 不存在!","back:off")
response.end
end if
elseif act="renfolder" then
if fso.folderexists(oldname) then
if not fso.folderexists(newname) then
fso.getfolder(oldname).name=trim(request("newname"))
if not fso.folderexists(newname) then
set fso=nothing
call showmsg("错误:更改文件"&addchar&"名失败!请确保您有相应的权限。","back:off")
response.end
end if
set fso=nothing
'response.redirect(backurl)
else
set fso=nothing
call showmsg("失败:新文件"&addchar&"名 "&trim(request("newname"))&" 的文件"&addchar&"已经存在!","back:off")
response.end
end if
else
set fso=nothing
call showmsg("失败:要更改的文件"&addchar&" "&trim(request("oldname"))&" 不存在!","back:off")
response.end
end if
end if
end if
end sub
sub deltree()
checksubmit()
dim folders,files,foldername,filename,tempname
frompath=trim(request.form("frompath"))
if invalidchar(frompath,0) then
call showmsg("错误:指定的路径含有非法字符!","")
response.end
end if
call checkpath(pathcanmodify,frompath)
frompath=server.mappath(frompath)
backurl="web_explorer.asp?path="&server.urlencode(path)&"&page="&page
if lcase(trim(request.form("act")))="deltree" then
set folders=request.form("folders")
set files=request.form("files")
set fso=server.createobject("scripting.filesystemobject")
if folders.count>0 then
for each foldername in folders
tempname=frompath&""&foldername
if fso.folderexists(tempname) then
fso.deletefolder tempname,true
end if
next
end if
if files.count>0 then
for each filename in files
tempname=frompath&""&filename
if fso.fileexists(tempname) then
fso.deletefile tempname,true
end if
next
end if
set folders=nothing
set files=nothing
set fso=nothing
end if
'response.redirect(backurl)
end sub
if trim(backurl)&""<>"" then
backurl=replace(backurl,"","")
backurl=replace(backurl,chr(34),""&chr(34))
end if
%>
敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载像素火影骨架佐助 (Perseverance Fire Shadow)手机版v1.16
下载要塞英雄 安卓版v33.20.0-39082670-Android
下载梦想城镇vivo最新版本 安卓版v12.0.1
梦想城镇vivo版是这款卡通风模拟经营类手游的渠道服版本,玩
怦然心动的瞬间 安卓版v1.0
怦然心动的瞬间是一款真人向的恋爱互动游戏,在游戏中玩家将扮演
曼尼汉堡店游戏 安卓版v1.0.3
曼尼汉堡店是一款非常好玩的精品恐怖类型冒险游戏,在这款游戏中
现代总统模拟器去广告版 安卓版v1.0.46
现代总统模拟器是一款休闲养成类游戏,可能对于不少的玩家来说都
现代总统模拟器付费完整版 安卓版v1.0.46
现代总统模拟器高级版在商店是需要付费的,相对于普通版本,高级