<!--#include file="conn.asp"-->
<!--#include file="admin.asp"-->
<%Call Head()%>
<%id=usb(request("id"))
if id="" then id="99999999999999"
fid=usb(request("fid"))
xpp=usb(request("ffss"))
cz=usb(request("cz"))
Call saycarda("恢复数据")
%>

<%if cz=""&zqfjsf&"" then

Set fs = Server.CreateObject("Scripting.FileSystemObject")
SFile = Server.MapPath(""&saytkcomshuju&"")
TFile = Server.MapPath("/shujuku/bfsj/"&xpp&"")
on Error Resume Next
fs.CopyFile TFile,SFile
If Err.Number = 53 Then
 Response.Write SFile & "数据不存在！"
Elseif Err.Number = 70 Then
 Response.Write TFile & "文件属性为只读！"
Elseif Err.Number <> 0 Then
 Response.Write "未知错误，错误编码：" & Err.Number
Else
 Response.Write "成功恢复数据！<br/>"
End If

 Response.Write "<br/>"
%>
<%end if%>
<%if cz<>"" and cz<>""&zqfjsf&"" then%>
对不起，安全码错误<br/>
<%end if%>

恢复数据前请确认你有备份数据！<br/>
<%
set fso=server.createobject("scripting.filesystemobject") 
set fl=fso.getfolder(""&server.mappath("/shujuku/bfsj/")&"") 
on error resume next 
response.write "【已备份的数据库】" 
for each fn in fl.files 
if fn.name="" then
response.Write"<br/>你还没有备份<br/>"
else
response.write "<br/>"&fn.name 
end if
response.write "<br/>"
 

call xlanlj("hfsj.asp?saytk="&saytk&"&amp;sid="&sid&"")
if saytk>1 then%>
备份名<input name='ffss' value='<%=fn.name%>'/>*<br/>
安全码<input name='cz' value=''/>*<br/>
<%
call xlantj("idp","$(idp)")
call xlanlj1("确定恢复")
else%>
安全码<input name='iidd<%=minute(now)%><%=second(now)%>' value=''/>*<br/>
备份名<input name='dq<%=minute(now)%><%=second(now)%>' value=''/>*
<br/>

<anchor>确定恢复<go href='hfsj.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>' method='post' accept-charset='utf-8'>
<postfield name='idp' value='$(idp)'/>
<postfield name='cz' value='$(iidd<%=minute(now)%><%=second(now)%>)'/>
<postfield name='ffss' value='$(dq<%=minute(now)%><%=second(now)%>)'/>
</go></anchor>
<%end if
next%>
<br/>-------<br/>
<a href="index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<br/>
本备份系统由龙门网独立修改制作<br/>
技术支持QQ:415575433<br/>
报时:<%=time%>
<%Call headsay()%>
