📄 backup_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>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<% call bghead() %>
<center><b>系统数据备份</b></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("/")&"\"
FileDir1=SysDir&"db\*.mdb"
fs.CopyFile FileDir1,BackupFileDir
FileDir1=SysDir&"kq\*.mdb"
fs.CopyFile FileDir1,BackupFileDir
FileDir1=SysDir&"Doc_Storeroom\*.mdb"
fs.CopyFile FileDir1,BackupFileDir
FileDir1=SysDir&"kq\backup\*.mdb"
fs.CopyFile FileDir1,BackupFileDir
FileDir1=SysDir&"qyml\data\*.mdb"
fs.CopyFile FileDir1,BackupFileDir
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="Backup_Data.asp">
备份数据文件目录:<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 + -