<!--#include file="conn.asp"-->
<%
if session("flag")>0 then
   Response.Write("<br><br><br><center>对不起。你没有权限进入此页面！！！</center>")
   Response.end 
end if
%>
<html>
<head>
<META http-equiv=Content-Type content=text/html;charset=gb2312>
<link href=images/bbs.css rel=stylesheet>
</head>
<body>
<br><center>
<p></p>

<%
select case Request("menu")

case "bak"
bak

case "bakbf"
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
MyFileObject.CopyFile ""&Server.MapPath(Request("yl"))&"",""&Server.MapPath(Request("bf"))&""
Response.write("备份成功！")

case "bakhf"
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
MyFileObject.CopyFile ""&Server.MapPath(Request("bf"))&"",""&Server.MapPath(Request("yl"))&""
Response.write("恢复成功！")

end select

sub bak
%>

<form method="post" action="?menu=bakbf">
<fieldset style="WIDTH: 550">
<legend>备份数据库</legend>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="90%">
<tr>
<td width="30%">数据库路径： </td>
<td width="70%">
<input size="30" value="<%=datafile%>" name="yl"></td>
</tr>
<tr>
<td width="30%">备份的数据库路径：</td>
<td width="70%"><input size="30" value="<%=replace(datafile,right(datafile,4),"_bak"&right(datafile,4))%>" name="bf"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2">
<input type="submit" value=" 备 份 " name="Submit1"><br><br></td>
</tr>
</table>
</fieldset>
</form>

<form method="post" action="?menu=bakhf">
<fieldset style="WIDTH:550">
<legend>恢复数据库</legend>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="90%">
<tr>
<td width="30%">备份的数据库路径： </td>
<td width="70%">
<input size="30" value="<%=replace(datafile,right(datafile,4),"_bak"&right(datafile,4))%>" name="bf"></td>
</tr>
<tr>
<td width="30%">数据库路径：</td>
<td width="70%"><input size="30" value="<%=datafile%>" name="yl"></td>
</tr>
<tr>
<td width="100%" align="center" colspan="2">
<input type="submit" value=" 恢 复 " name="Submit1"><br><br></td>
</tr>
</table></fieldset>
</form>

<%
end sub
%>