📄 unbackup_data.asp
字号:
<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/bgsub.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="Electron_Doc/Public/public.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<title>还原备份数据</title>
<script language="javascript">
function checkform()
{
if (confirm('该操作将覆盖现有数据,真的要还原备份数据吗?'))
return (true);
else
return (false);
}
</script>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<% call bghead() %>
<center><b>还原备份数据</b><br><font color=red>注意:还原备份数据将覆盖现有数据!</font></center>
<%
call bgmid()
%>
<center>
<br>
<%
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username='" & oabusyusername&"'"
rs.open sql,conn,1
cook_allow_control_all_user=rs("allow_control_all_user")
conn.close
set conn=nothing
set rs=nothing
if cook_allow_control_all_user="yes" then
BackupFileDir=trim(request.form("BackupFileDir"))
if BackupFileDir<>"" then
on error resume next
set fs=createobject("scripting.filesystemobject")
if fs.FolderExists(BackupFileDir) then
SysDir=Server.mappath("/")&"\"
BackupFileDir1=BackupFileDir&"\lmtof.mdb"
FileDir1=SysDir&"db\lmtof.mdb"
fs.CopyFile BackupFileDir1,FileDir1
BackupFileDir1=BackupFileDir&"\epass_user_check.mdb"
FileDir1=SysDir&"db\epass_user_check.mdb"
fs.CopyFile BackupFileDir1,FileDir1
BackupFileDir1=BackupFileDir&"\DocData.mdb"
FileDir1=SysDir&"Doc_Storeroom\DocData.mdb"
fs.CopyFile BackupFileDir1,FileDir1
BackupFileDir1=BackupFileDir&"\2*.mdb"
FileDir1=SysDir&"kq"
fs.CopyFile BackupFileDir1,FileDir1
BackupFileDir1=BackupFileDir&"\new.mdb"
FileDir1=SysDir&"kq\backup\new.mdb"
fs.CopyFile BackupFileDir1,FileDir1
BackupFileDir1=BackupFileDir&"\data.mdb"
FileDir1=SysDir&"qyml\data\data.mdb"
fs.CopyFile BackupFileDir1,FileDir1
if err.number<>0 then
response.write("<font color=red size=""+1"">对不起,还原备份系统数据失败!"&err.description&"</font>")
else
response.write("<font color=red size=""+1"">成功还原备份系统数据!</font>")
end if
else
response.write("<font color=red size=""+1"">对不起,该目录不存在!</font>")
end if
set fs=nothing
else
%>
<form method="post" name="theForm" action="UnBackup_Data.asp" onsubmit="return checkform()">
备份数据文件目录:<input type="text" name="BackupFileDir" value="" size="60">
<br><br>
<input type="submit" name="submit" value="确定">
</form>
</center>
<%
end if
else
response.write("<font color=red size=""+1"">对不起,您不能还原备份的系统数据!</font>")
end if
%>
</td>
<td background="<%=imgpath%>images/j5.gif" width=19 height=280></td>
</tr>
</table>
</tr>
<tr>
<td height=19>
<table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
<tr>
<td width=18 height=20><img border="0" src="<%=imgpath%>images/j6.gif" width="18" height="19"></td>
<td background="<%=imgpath%>images/j7.gif" width=100% height=20></td>
<td width="19" height="20"><img border="0" src="<%=imgpath%>images/j8.gif"></td>
</tr>
<tr>
<td width="100%" height=20 colspan="3"><center>-----<a href="http://office.11k.net/" target=_blank><font color="red">Red office v1.5</font></a>-----</center></td>
</tr>
</table>
</td>
</tr>
</table>
<%
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -