<!-- #include file="include/adovbs.inc" -->
<!-- #include file="include/dataconn.asp" -->
<!-- #include file="include/checksession.asp" -->
<!-- #include file="include/168soft_back_SqlIn.Asp" -->
<%
	 mm=month(now)
	  if mm<10 then
	 	mm="0" & mm
	 end if
	 dd=day(now)
	 if dd<10 then
	 	dd="0" & dd
	 end if
	 thistoday = year(now)&"-"& mm &"-"& dd
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="include/e1.css" type="text/css">
<script language='javascript' src='include/common.js'></script>
</head>
<script>
	function check()
	{
		if(!confirm("恢复数据后，当前的数据将丢失！！请慎重处理，您确认要恢复数据么？"))
		{
			return false;
		}
		return true;
	}
</script>
<BODY topMargin=0 leftmargin="0" marginheight="0">
<%
if Request.QueryString("action")="reload" then
	currf="db/#168softdb41.asa"
	currf=server.mappath(currf)
	backf=trim(request.form("backf"))
	if backf="" then
		response.write "<script>alert(""请输入您要恢复的数据库路径"");history.back();</script>" 
	else
		backf=cstr(backf)&"/#168softdb41.asa"
		backf=server.mappath(backf)
	end if
	on error resume next
	Set objfso = Server.CreateObject("Scripting.FileSystemObject")
	if err then 
	err.clear
	response.write "<script>alert(""不能建立fso对象，请确保你的空间支持fso:！"");history.back();</script>"
	response.end
	end if
	if objfso.fileexists(backf) then 
	objfso.copyfile ""&backf&"",""&currf&""
	response.write "<script>alert(""恢复数据库成功"");history.back();</script>"
	response.end
	else
	response.write "<script>alert(""错误:备份目录下无您的备份文件！"");history.back();</script>"
	response.end
	end if
end if 
%>

<form name="form1" method="POST" action="restoredb.asp?action=reload" onsubmit="return check();">
<div align="center">
<center>
<br><br>
<table align="center" bgcolor="#AAAAAA" border="0" cellpadding="0" cellspacing="0" width="75%"><tr>
          <td>
<table border="0" cellpadding="5" cellspacing="1" style="border-collapse: collapse" width="100%" id="AutoNumber3">
              <tr class="tdTitle"> 
                <td height="40" colspan="2"> <div align="center"><font color="#FFFFFF" size="3"><strong>恢 
                    复 数 据 库</strong></font></div></td>
              </tr>
              <tr bgcolor="#FBFDFF"> 
                <td width="35%"> <div align="center"> 
                    <p>&nbsp;</p>
                    <p align="right">恢复的数据库路径：</p>
                    <p>&nbsp;</p>
                  </div></td>
                <td width="65%"  height="25"><span style="background-color: #F7FFF7"> 
                  <input type="text" name="backf" size="30" value="<% =thistoday%>">
                  （默认格式：<%=thistoday%>） </span></td>
              </tr>
              <tr bgcolor="#FBFDFF"> 
                <td colspan="2"><div align="center"><span style="background-color: #F7FFF7"> 
                    <input type="submit" name="Submit" value="恢 复" class="b02">
                    </span></div></td>
              </tr>
              <tr bgcolor="#FBFDFF"> 
                <td colspan="2"><p><font color="#FF0000"><strong><br>
                    *</strong></font>你的空间只有支持fso才可以进行如下操作，否则你只能手动备份</p>
                  <p><font color="#FF0000"><strong>*</strong></font>系统在计算前会自动备份一个目录“日期＋计算前”，如果您要恢复到计算前的数据库，那就在备份数据库路径处填写：日期＋“计算前”，点恢复再重新运算</p></td>
              </tr>
            </table>
</td>
  </tr>
</table>
</center>
</div>
</form>
</html>