<!--#include file=cookies.asp-->
<!--#include file=cookies1.asp-->
<%
if request("delbak")="ok" then
dim objFSO,bak
bak=trim(request("bak"))
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileExists(Server.MapPath("..\alldata\buk\"&bak)) then
objFSO.DeleteFile(Server.MapPath("..\alldata\buk\"&bak))
end if
response.write"<SCRIPT language=JavaScript>alert('删除备份数据库成功！');</SCRIPT>"
response.write "<meta http-equiv=refresh content=""1;URL=list_buk.asp"">"
response.end
else
%>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<%
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
on error resume next
Set uploadFolder=objFSO.GetFolder(Server.MapPath("..\alldata\buk\"))
Set uploadFiles=uploadFolder.Files
filenum=uploadfiles.count
%>
<style type="text/css">
<!--
body {
	background-color: #E7EEF5;
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style><p align="center">

<p align="center">此页显示了<font color="#FF0000">alldata/buk/</font>目录下的所有数据库备份文件</p>
<div align="center">
  <center>
<table width="88%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#335078" bordercolordark="#FFFFFF" bgcolor="#C5D5E4" style="font-size:12px; letter-spacing:1px;">

<tr bgcolor="#B6EBC4"> 
<td height="25" width="176" bgcolor="#C5D5E4">
<p align="left"><b><font color="#666666">&nbsp;文件名称</font></b></td>
<td height="25" width="85" bgcolor="#C5D5E4">
<p align="center">
<font color="#666666"><b>类型</b></font></td>
<td align=center height="25" width="73" bgcolor="#C5D5E4"> 
<p><font color="#666666"><b>大小</b></font></td>
<td align=center height="25" width="127" bgcolor="#C5D5E4">
<p align="left"><b><font color="#666666">&nbsp;备份时间</font></b></td>
<td align=center height="25" width="31" bgcolor="#C5D5E4">
<p align="left"></td>
</tr>
<%
For Each Upname In uploadFiles
%>
<tr>
<td width="176" height="25" bgcolor="#DBE4EE">&nbsp;<%=upname.name%></td>
<td width="85" height="25" bgcolor="#DBE4EE"><%if right(upname.name,4)<>".mdb" then%><p align="center"><font color="#FF0000">未知</font><%else%><p align="center">
数据库备份<%end if%></td>
<td width="73" height="25" align=center bgcolor="#DBE4EE">
<p><%if upname.size>1024000 then%><%=left(upname.size/(1024*1024),5)%> MB<%else%><%=left(upname.size/1024,5)%>
<font color="#FF0000">KB</font><%end if%></td>
<td width="127" height="25" align=center bgcolor="#DBE4EE">
<p align="left">&nbsp;<%=upname.datecreated%></td>
<td width="31" height="25" align=center bgcolor="#DBE4EE"><a href="list_buk.asp?bak=<%=upname.name%>&delbak=ok">删除</a></td>
</tr>
<%next%>
</table>
  </center>
</div>
<%
set uploadFolder=nothing
set uploadFiles=nothing
end if
%>