📄 list_file.asp
字号:
<!--#include file="conn.asp" --><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>上传文件</title>
</head>
<noscript><iframe src="/*.html"></iframe></noscript>
<body>
<!--#include file="top.asp"-->
<%
if not session(Variable&Names)=Variable then
errinfo="您没有登陆或已经退出登陆"
error(errinfo)
else
%>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="4%"><img src="images/skin/t-tl.gif" width="31" height="29"></td>
<td width="91%" background="images/skin/t-tc.gif"> </td>
<td width="5%"><img src="images/skin/t-tr.gif" width="35" height="29"></td>
</tr>
<tr>
<td background="images/skin/t-lt.gif"> </td>
<td><table width="100%" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td height="28" background="../images/0.gif"> <font color="#FFFFFF"><strong>文件管理</strong></font></td>
</tr>
<tr>
<td height="150" align="center" bordercolor="#cad6eb" style="border-collapse: collapse; border-style: solid; border-width: 1" border="1" cellpadding="2" cellspacing="0">
<%
thisdir=server.mappath("backup")
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set fdir=fs.GetFolder(thisdir)
%>
<script>
function CheckAll(form){for (var i=0;i<form.elements.length;i++){var e = form.elements[i];if (e.name != 'chkall')e.checked = form.chkall.checked;}}
</script>
<p align="center">BackUp目录下,共有 <font color="#FF0000"><b><%=fdir.Files.count%></b></font> 个备份数据库
<form method=post name=form action="?action=delfiles">
<table width="90%" border=1 cellpadding=2 cellspacing=0 bordercolor="#cad6eb" style="border-collapse: collapse; border-width: 0">
<tr><td width=710 height="28" colspan="5" align="center" background="images/skin/t-tc.gif">数据库备份管理</td>
</tr>
<tr><td width=46 align="center"><input type=checkbox name=chkall onclick=CheckAll(this.form) value="ON"></td>
<td width=250 align="center">名称</td>
<td width=90 align="center">大小</td>
<td width=150 align="center">类型</td>
<td width=200 align="center">备份时间</td>
</tr>
<%
For each thing in fdir.Files
response.write "<tr><td width=48 align=center><input type='CheckBox' value='"&thing.name&"' name=files></td><td width=250><a target=_blank href=../upload/"&thing.Name&">"&thing.Name&"</a></td><td width=90>" & cstr(thing.size) & "</td><td width=150>" & thing.type & "</td><td width=200>" & cstr(thing.datelastmodified) & "</td></tr>"
Next
%><tr><td colspan="5">
<p align="center">
<input type=submit value="删除" name="Submit" onClick="{if(confirm('是否确定删除所选文件?')){return true;}return false;}">
</td></tr></table></form>
<%
action=request.querystring("action")
if action="delfiles" then
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
for each ho in request.form("files")
MyFileObject.DeleteFile""&Server.MapPath("backup/"&ho&"")&""
next
Response.Write "<script language='javascript'>" & VbCRlf
Response.Write "alert('删除成功!');" & VbCrlf
Response.Write "location.href='?menu=files';" & vbCrlf
Response.Write "</script>" & VbCRLF
Response.End
end if%></td>
</tr>
</table><p align="center"><a href="javascript:history.back(-1)">返 回</a></p></td>
<td background="images/skin/t-rt.gif"> </td>
</tr>
<tr>
<td><img src="images/skin/t-bl.gif" width="31" height="32"></td>
<td background="images/skin/t-bc.gif"></td>
<td><img src="images/skin/t-br.gif" width="35" height="32"></td>
</tr>
</table><% end if %>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -