把下面代码存到一个ASP文件中即可,方便管理服务器上的文件
<title>http://bbs.asp2004.net 制作:小灰 QQ:103895</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a:link {
font-size: 9pt;
}
a:visited {
font-size: 9pt;
}
a:hover {
font-size: 9pt;
}
a:active {
font-size: 9pt;
}
body {
font-size: 9pt;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
line-height: 20px;
}
td {
font-size: 9pt;
line-height: 20px;
}
-->
</style>
<%
action=request.QueryString("action")
temp=split(request.ServerVariables("URL"),"/")
url=temp(ubound(temp))
chklogin()
select case action
case "logout"
logout()
case "delfile"
delfile()
case "savefile"
savefile()
case "editfile"
fileedit()
case "newfile"
filenew()
case "upload"
upload()
case "saveupload"
saveupload()
case "delfolder"
delfolder()
case "savefolder"
savefolder()
case "editfolder"
editfolder()
case "newfolder"
newfolder()
case else
foldername=request.QueryString("foldername")
filename=request.QueryString("filename")
path=foldername
if path="" then path=server.MapPath("./")
ShowFolderList(path)
end select
Function ShowFolderList(folderspec)
temp=request.ServerVariables("HTTP_REFERER")
temp=left(temp,Instrrev(temp,"/"))
temp1=len(folderspec)-len(server.MapPath("./"))-1
if temp1>0 then
temp1=right(folderspec,cint(temp1))
elseif temp1=-1 then
temp1=""
end if
tempurl=temp+replace(temp1,"\","/")+"/"
Set fso = CreateObject("Scripting.FileSystemObject")
upfolderspec=fso.GetParentfoldername(folderspec&"\")
%>
<a href="<%= url%>?action=newfolder&foldername=<%= folderspec%>">新建文件夹</a> | <a href="<%= url%>?action=newfile&filename=<%= folderspec&"\"%>">新建文件</a> | <a href="<%= url%>?action=upload">上传文件</a> | <a href="<%= url%>?foldername=<%= upfolderspec%>">向上</a> | <a href="file.asp">返回首页</a> | <a href="<%= url%>?action=logout">退出</a>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#6595D6">
<tr bgcolor="#E4E8EF">
<td width="64%"><div align="center">名称</div></td>
<td width="7%"><div align="right">大小</div></td>
<td width="6%"><div align="center">类型</div></td>
<td width="15%"><div align="left">修改时间</div></td>
<td width="8%"><div align="center">操作</div></td>
</tr>
<%
'列出目录
Set f = fso.GetFolder(folderspec)
Set fc = f.SubFolders
For Each f1 in fc
%>
<tr bgcolor="#E4E8EF" onMouseOut=this.bgColor='#E4E8EF'; onMouseOver=this.bgColor='#FFFFFF';>
<td><a href="<%= url%>?foldername=<%= folderspec%>\<%= f1.name%>"><%= f1.name%></a></td>
<td><div align="right"><%= f1.size%></div></td>
<td><div align="center">文件夹</div></td>
<td><div align="left"><%= f1.datelastmodified%></div></td>
<td><a href="<%= url%>?action=editfolder&foldername=<%= folderspec&"\"&f1.name%>">修改</a> <a href="<%= url%>?action=delfolder&foldername=<%= folderspec&"\"&f1.name%>" onclick="{if(confirm('删除文件夹<<%= f1.name%么?')){return true;}return false;}">删除</a></td>
</tr>
<%
Next
'列出文件
Set fc = f.Files
For Each f1 in fc
%>
<tr bgcolor="#E4E8EF" onMouseOut=this.bgColor='#E4E8EF'; onMouseOver=this.bgColor='#FFFFFF';>
<td><a href="<%= tempurl+f1.name%>" target="_blank"><%= f1.name%></a></td>
<td><div align="right"><%= f1.size%></div></td>
<td><div align="left"></div></td>
<td><div align="left"><%= f1.datelastmodified%></div></td>
<td><a href="<%= url%>?action=editfile&filename=<%= folderspec&"\"&f1.name%>">修改</a> <a href="<%= url%>?action=delfile&filename=<%= folderspec&"\"&f1.name%>" onclick="{if(confirm('删除文件<<%= f1.name%么?')){return true;}return false;}">删除</a></td>
</tr>
<%
Next
set fso=nothing
%>
</table>
<%
End Function
'文件操作
function delfile()
filename=request.QueryString("filename")
set fso=server.CreateObject("scripting.filesystemobject")
fso.deletefile(filename)
tempurl=url&"?foldername="&fso.GetParentfoldername(filename)
set fso=nothing
response.Redirect(tempurl)
end function
function savefile()
filename=request.Form("filename")
content=request.Form("content")
filename1=request.Form("filename1")
if request.ServerVariables("PATH_TRANSLATED")<>filename then
set fso=server.CreateObject("scripting.filesystemobject")
set f1=fso.opentextfile(filename,2,true)
f1.write(content)
f1.close
if filename1<>"" and filename1<>filename then fso.deletefile(filename1)
tempurl=url&"?foldername="&fso.GetParentfoldername(filename)
set fso=nothing
end if
response.Redirect(tempurl)
end function
function filenew()
filename=request.QueryString("filename")
content=""
fileform filename,content,filename1
end function
function fileedit()
filename=request.QueryString("filename")
filename1=request.QueryString("filename")
set fso=server.CreateObject("scripting.filesystemobject")
set f1=fso.opentextfile(filename,1,true)
content=server.HTMLEncode(f1.readall)
f1.close
set fso=nothing
fileform filename,content,filename1
end function
function fileform(filename,content,filename1)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="<%= url%>?action=savefile">
<tr>
<td><input name="filename1" type="hidden" value="<%= filename1%>"><input name="filename" type="text" value="<%= filename%>" style="width:100%"></td>
</tr>
<tr>
<td><textarea name="content" wrap="VIRTUAL" style="width:100%;height:100%;font:Arial,Helvetica,sans-serif;" onKeyUp="style.height=this.scrollHeight;"><%= content%></textarea></td>
</tr>
<tr>
<td><center><input type="submit" name="Submit" value="保存" style="width:200"><input type="reset" name="Submit2" value="重置" style="width:200"></center></td>
</tr>
</form>
</table>
<%
end function
'文件夹操作函数
function delfolder()
foldername=request.QueryString("foldername")
set fso=server.CreateObject("scripting.filesystemobject")
tempurl=url&"?foldername="&fso.GetParentfoldername(foldername)
fso.deletefolder(foldername)
set fso=nothing
response.Redirect(tempurl)
end function
function savefolder()
foldername=request.Form("foldername")
foldername1=request.Form("foldername1")
set fso=server.CreateObject("scripting.filesystemobject")
if foldername1="" then
set f=fso.createfolder(foldername)
else
fso.MoveFolder foldername1,foldername
end if
tempurl=url&"?foldername="&f
set fso=nothing
response.Redirect(tempurl)
end function
function newfolder()
foldername=request.QueryString("foldername")&"\"
formfolder foldername,foldername1
end function
function editfolder()
foldername=request.QueryString("foldername")
foldername1=request.QueryString("foldername")
formfolder foldername,foldername1
end function
function formfolder(foldername,foldername1)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="<%= url%>?action=savefolder">
<tr><td><input name="foldername1" type="hidden" value="<%= foldername1%>"><input name="foldername" type="text" value="<%= foldername%>" style="width:100%"></td></tr>
<tr><td><center><input type="submit" name="Submit" value="保存" style="width:200"><input type="reset" name="Submit2" value="重置" style="width:200"></center></td></tr>
</form>
</table>
<%
end function
function upload()
%>
<form action="file.asp?action=saveupload" method="post" enctype="multipart/form-data" name="form2">
<div align="center">有待完成
<input type="file" name="file" style="width:80%">
<input type="submit" name="Submit" value="提交">
</div>
</form>
<%
end function
function saveupload()
'有待实现
end function
'登陆
function chklogin()
password=request.Form("password")
if password="ok" then session("login")="login"
if session("login")<>"login" then login
end function
function login()
%>
<form name="form1" method="post" action="<%= url%>?action=chklogin">
<center>请输入密码:<input name="password" type="password"><input type="submit" name="Submit" value="登陆"></center>
</form>
<%
response.End()
end function
function logout()
session.Abandon()
response.Redirect(url)
end function
%>
<title>http://bbs.asp2004.net 制作:小灰 QQ:103895</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a:link {
font-size: 9pt;
}
a:visited {
font-size: 9pt;
}
a:hover {
font-size: 9pt;
}
a:active {
font-size: 9pt;
}
body {
font-size: 9pt;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
line-height: 20px;
}
td {
font-size: 9pt;
line-height: 20px;
}
-->
</style>
<%
action=request.QueryString("action")
temp=split(request.ServerVariables("URL"),"/")
url=temp(ubound(temp))
chklogin()
select case action
case "logout"
logout()
case "delfile"
delfile()
case "savefile"
savefile()
case "editfile"
fileedit()
case "newfile"
filenew()
case "upload"
upload()
case "saveupload"
saveupload()
case "delfolder"
delfolder()
case "savefolder"
savefolder()
case "editfolder"
editfolder()
case "newfolder"
newfolder()
case else
foldername=request.QueryString("foldername")
filename=request.QueryString("filename")
path=foldername
if path="" then path=server.MapPath("./")
ShowFolderList(path)
end select
Function ShowFolderList(folderspec)
temp=request.ServerVariables("HTTP_REFERER")
temp=left(temp,Instrrev(temp,"/"))
temp1=len(folderspec)-len(server.MapPath("./"))-1
if temp1>0 then
temp1=right(folderspec,cint(temp1))
elseif temp1=-1 then
temp1=""
end if
tempurl=temp+replace(temp1,"\","/")+"/"
Set fso = CreateObject("Scripting.FileSystemObject")
upfolderspec=fso.GetParentfoldername(folderspec&"\")
%>
<a href="<%= url%>?action=newfolder&foldername=<%= folderspec%>">新建文件夹</a> | <a href="<%= url%>?action=newfile&filename=<%= folderspec&"\"%>">新建文件</a> | <a href="<%= url%>?action=upload">上传文件</a> | <a href="<%= url%>?foldername=<%= upfolderspec%>">向上</a> | <a href="file.asp">返回首页</a> | <a href="<%= url%>?action=logout">退出</a>
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#6595D6">
<tr bgcolor="#E4E8EF">
<td width="64%"><div align="center">名称</div></td>
<td width="7%"><div align="right">大小</div></td>
<td width="6%"><div align="center">类型</div></td>
<td width="15%"><div align="left">修改时间</div></td>
<td width="8%"><div align="center">操作</div></td>
</tr>
<%
'列出目录
Set f = fso.GetFolder(folderspec)
Set fc = f.SubFolders
For Each f1 in fc
%>
<tr bgcolor="#E4E8EF" onMouseOut=this.bgColor='#E4E8EF'; onMouseOver=this.bgColor='#FFFFFF';>
<td><a href="<%= url%>?foldername=<%= folderspec%>\<%= f1.name%>"><%= f1.name%></a></td>
<td><div align="right"><%= f1.size%></div></td>
<td><div align="center">文件夹</div></td>
<td><div align="left"><%= f1.datelastmodified%></div></td>
<td><a href="<%= url%>?action=editfolder&foldername=<%= folderspec&"\"&f1.name%>">修改</a> <a href="<%= url%>?action=delfolder&foldername=<%= folderspec&"\"&f1.name%>" onclick="{if(confirm('删除文件夹<<%= f1.name%么?')){return true;}return false;}">删除</a></td>
</tr>
<%
Next
'列出文件
Set fc = f.Files
For Each f1 in fc
%>
<tr bgcolor="#E4E8EF" onMouseOut=this.bgColor='#E4E8EF'; onMouseOver=this.bgColor='#FFFFFF';>
<td><a href="<%= tempurl+f1.name%>" target="_blank"><%= f1.name%></a></td>
<td><div align="right"><%= f1.size%></div></td>
<td><div align="left"></div></td>
<td><div align="left"><%= f1.datelastmodified%></div></td>
<td><a href="<%= url%>?action=editfile&filename=<%= folderspec&"\"&f1.name%>">修改</a> <a href="<%= url%>?action=delfile&filename=<%= folderspec&"\"&f1.name%>" onclick="{if(confirm('删除文件<<%= f1.name%么?')){return true;}return false;}">删除</a></td>
</tr>
<%
Next
set fso=nothing
%>
</table>
<%
End Function
'文件操作
function delfile()
filename=request.QueryString("filename")
set fso=server.CreateObject("scripting.filesystemobject")
fso.deletefile(filename)
tempurl=url&"?foldername="&fso.GetParentfoldername(filename)
set fso=nothing
response.Redirect(tempurl)
end function
function savefile()
filename=request.Form("filename")
content=request.Form("content")
filename1=request.Form("filename1")
if request.ServerVariables("PATH_TRANSLATED")<>filename then
set fso=server.CreateObject("scripting.filesystemobject")
set f1=fso.opentextfile(filename,2,true)
f1.write(content)
f1.close
if filename1<>"" and filename1<>filename then fso.deletefile(filename1)
tempurl=url&"?foldername="&fso.GetParentfoldername(filename)
set fso=nothing
end if
response.Redirect(tempurl)
end function
function filenew()
filename=request.QueryString("filename")
content=""
fileform filename,content,filename1
end function
function fileedit()
filename=request.QueryString("filename")
filename1=request.QueryString("filename")
set fso=server.CreateObject("scripting.filesystemobject")
set f1=fso.opentextfile(filename,1,true)
content=server.HTMLEncode(f1.readall)
f1.close
set fso=nothing
fileform filename,content,filename1
end function
function fileform(filename,content,filename1)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="<%= url%>?action=savefile">
<tr>
<td><input name="filename1" type="hidden" value="<%= filename1%>"><input name="filename" type="text" value="<%= filename%>" style="width:100%"></td>
</tr>
<tr>
<td><textarea name="content" wrap="VIRTUAL" style="width:100%;height:100%;font:Arial,Helvetica,sans-serif;" onKeyUp="style.height=this.scrollHeight;"><%= content%></textarea></td>
</tr>
<tr>
<td><center><input type="submit" name="Submit" value="保存" style="width:200"><input type="reset" name="Submit2" value="重置" style="width:200"></center></td>
</tr>
</form>
</table>
<%
end function
'文件夹操作函数
function delfolder()
foldername=request.QueryString("foldername")
set fso=server.CreateObject("scripting.filesystemobject")
tempurl=url&"?foldername="&fso.GetParentfoldername(foldername)
fso.deletefolder(foldername)
set fso=nothing
response.Redirect(tempurl)
end function
function savefolder()
foldername=request.Form("foldername")
foldername1=request.Form("foldername1")
set fso=server.CreateObject("scripting.filesystemobject")
if foldername1="" then
set f=fso.createfolder(foldername)
else
fso.MoveFolder foldername1,foldername
end if
tempurl=url&"?foldername="&f
set fso=nothing
response.Redirect(tempurl)
end function
function newfolder()
foldername=request.QueryString("foldername")&"\"
formfolder foldername,foldername1
end function
function editfolder()
foldername=request.QueryString("foldername")
foldername1=request.QueryString("foldername")
formfolder foldername,foldername1
end function
function formfolder(foldername,foldername1)
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="<%= url%>?action=savefolder">
<tr><td><input name="foldername1" type="hidden" value="<%= foldername1%>"><input name="foldername" type="text" value="<%= foldername%>" style="width:100%"></td></tr>
<tr><td><center><input type="submit" name="Submit" value="保存" style="width:200"><input type="reset" name="Submit2" value="重置" style="width:200"></center></td></tr>
</form>
</table>
<%
end function
function upload()
%>
<form action="file.asp?action=saveupload" method="post" enctype="multipart/form-data" name="form2">
<div align="center">有待完成
<input type="file" name="file" style="width:80%">
<input type="submit" name="Submit" value="提交">
</div>
</form>
<%
end function
function saveupload()
'有待实现
end function
'登陆
function chklogin()
password=request.Form("password")
if password="ok" then session("login")="login"
if session("login")<>"login" then login
end function
function login()
%>
<form name="form1" method="post" action="<%= url%>?action=chklogin">
<center>请输入密码:<input name="password" type="password"><input type="submit" name="Submit" value="登陆"></center>
</form>
<%
response.End()
end function
function logout()
session.Abandon()
response.Redirect(url)
end function
%>
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。
更新日志
2024年11月23日
2024年11月23日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]