⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fsoexplorer.asp

📁 在线文件管理器 修正版 asp数据
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="fsoconfig.asp"-->
<!--#include file="checklogin.asp"-->
<!--#include file="fsofunctions.asp"-->
<%
page=trim(request.querystring("page"))
act=trim(request.querystring("act"))
if page<>"" and isnumeric(page) then
	page=fix(page)
else
	page=1
end if
if path="/" then
	goparent="↑回上级目录..."
else
	goparent="<a href='"&selfname&"?path="&server.urlencode(left(path,instrrev(path,"/",len(path)-1)))&"&ntime="&ntime&"'>↑回上级目录...</a>"
end if
parent_url=server.urlencode(parent_url)
pathurl=server.urlencode(path)
s_folderpath=server.mappath(path)
set obj_fso=server.createobject("scripting.filesystemobject")
if act="paste" and session("act")="copy" and session("basepath")<>s_folderpath and obj_fso.folderexists(s_folderpath)=true then
	n_errfile=0
	n_errfolder=0
	if session("folders")<>"" then
		a_folders=split(session("folders"),chr(9))
		m=ubound(a_folders)
		for i=0 to m
			s_sourcefolder=session("basepath")&"\"&a_folders(i)
			s_targetfolder=s_folderpath&"\"&a_folders(i)
			if obj_fso.folderexists(s_sourcefolder) then
				obj_fso.copyfolder s_sourcefolder,s_targetfolder,true
			else
				n_errfolder=n_errfolder+1
			end if
		next
	else
		m=0-1
	end if
	if session("files")<>"" then
		a_files=split(session("files"),chr(9))
		n=ubound(a_files)
		for i=0 to n
			s_sourcefile=session("basepath")&"\"&a_files(i)
			s_targetfile=s_folderpath&"\"&a_files(i)
			if obj_fso.fileexists(s_sourcefile) then
				obj_fso.copyfile s_sourcefile,s_targetfile,true
			else
				n_errfile=n_errfile+1
			end if
		next
	else
		n=0-1
	end if
elseif act="paste" and session("act")="cut" and session("basepath")<>s_folderpath and obj_fso.folderexists(s_folderpath)=true then
	n_errfile=0
	n_errfolder=0
	if session("folders")<>"" then
		a_folders=split(session("folders"),chr(9))
		m=ubound(a_folders)
		for i=0 to m
			s_sourcefolder=session("basepath")&"\"&a_folders(i)
			s_targetfolder=s_folderpath&"\"&a_folders(i)
			if obj_fso.folderexists(s_sourcefolder) then
				obj_fso.copyfolder s_sourcefolder,s_targetfolder,true
				obj_fso.deletefolder s_sourcefolder,true
			else
				n_errfolder=n_errfolder+1
			end if
		next
	end if
	if session("files")<>"" then
		a_files=split(session("files"),chr(9))
		n=ubound(a_files)
		for i=0 to n
			s_sourcefile=session("basepath")&"\"&a_files(i)
			s_targetfile=s_folderpath&"\"&a_files(i)
			if obj_fso.fileexists(s_sourcefile) then
				obj_fso.copyfile s_sourcefile,s_targetfile,true
				obj_fso.deletefile s_sourcefile,true
			else
				n_errfile=n_errfile+1
			end if
		next
	end if
	session("act")=""
	session("basepath")=""
	session("folders")=""
	session("files")=""
end if
%>
<html>
<head>
<title><%=sysname%>--文件管理</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<meta name="author" content="netasp;EMAIL:netasp@sohu.com">
<style type="text/css">
<!--
body,table,td{font-size:12px;color:#000090;}
body{margin:0 0 1px;padding:0;background:#ffffff url(fsoimg/bgbrick.gif);}
table{width:760px}
table table{width:100%;background:#eeeeee}
td{vertical-align:top;}
table table td{padding-left:4px;vertical-align:middle;background:#ffffff}
img{vertical-align:bottom}
form{margin:0;padding:0}
a{color:#000080;text-decoration:none;}
a:hover{color:#ff3333;text-decoration:underline}
div{width:100%;background:#eeeeee}
.button{width:65px;height:20px;border:solid 1px;border-color:#ffffff #666666 #666666 #ffffff;margin:3px 0;}
.imgbutton{width:32px;height:32px;border:solid 1px #d6d3cc;cursor:hand;}
.imgbt{border:solid 1px;border-color:#ffffff #999999 #999999 #ffffff;cursor:hand;}
//-->
</style>
<script language="javascript">
<!--
function viewfile(path)
{
window.open(path,'','');
}
function editfile(fname)
{
	fname=urlencoding(fname);
	window.open("fsoedit.asp?path=<%=pathurl%>"+fname,'','');
}
function is_edit(fname)
{
	if(window.confirm('你确定该文件为ASCII类型文件,并编辑它吗?'))
		editfile(fname);
}
function dis_edit()
{
	alert('该类型文件为非ASCII文件,无法编辑!');
}
function renameit(fname,act)
{
	var newname=window.prompt("请输入文件(夹) ["+fname+"] 的新名称:","");
	if(newname!=null)
	{
		fname=urlencoding(fname);
		newname=urlencoding(newname);
		window.location.href="fsorename.asp?act="+act+"&path=<%=pathurl%>&fname="+fname+"&newname="+newname+"&epath=<%=pathurl%>&epage=<%=page%>&ntime=<%=ntime%>";
	}
}
function downfile(fname)
{
	fname=urlencoding(fname);
	window.open("downfile.asp?path=<%=pathurl%>"+fname,'','');
}
function delbatch()
{
	if (window.confirm("你真的要删除该文件或目录吗?"))
	{
		document.delthis.submit();
	}
}
function delfile(act,fname)
{
	fname=urlencoding(fname);
	if (window.confirm("你真的要删除该文件或目录吗?")==true)
	{
	window.location.href="fsodel.asp?act="+act+"&path=<%=pathurl%>"+fname+"&epath=<%=pathurl%>&epage=<%=page%>&ntime=<%=ntime%>";
	}
}
function selectall(objname,act)
{
	if(objname==null)
		alert("对不起,当前目录下没有文件(夹)可选择/清除");
	else if(objname.length==null)
		objname.checked=act;
	else
	{
		var n=objname.length;
		for (i=0;i<n;i++)
		{
			objname[i].checked=act;
		}
	}
}
//-->
</script>
<script language="vbscript">
<!--
function urlencoding(vstrin)
    dim i,strreturn,strSpecial
    strSpecial = "!""#$%&'()*+,/:;<=>?@[\]^`{|}~%"
    strreturn = ""

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -