📄 admin_data.asp
字号:
<!--#include file="inc/conn.asp"-->
<%
call hacker()
call checkadmin("data")
%>
<LINK href="img/admin.css" type=text/css rel=stylesheet>
<%
if request.querystring("go")="action" then
dim frompath,gotopath
frompath=server.mappath(conndata)
gotopath=server.mappath(backdata)
On Error Resume Next
set fso=server.createobject("Scripting.FileSystemObject")
select case request.querystring("action")
case "bak"
fso.copyfile frompath,gotopath,true
Response.Write("<script>alert('数据库备份成功!');history.back();</script>")
case "com"
if fso.fileexists(gotopath) then
fso.copyfile gotopath,frompath,true
Response.Write("<script>alert('您的数据库恢复成功!');history.back();</script>")
else
Response.Write("<script>alert('您还没有备份过的文件!');history.back();</script>")
end if
case "zip"
gopath=left(frompath,instrrev(frompath,"\"))
fso.CopyFile frompath,gopath& "temp.mdb"
if fso.fileexists(frompath) then
Set zip=CreateObject("JRO.JetEngine")
zip.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&gopath&"temp.mdb","Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&gopath&"temp1.mdb"
fso.CopyFile gopath&"temp1.mdb",frompath
fso.DeleteFile(gopath&"temp.mdb")
fso.DeleteFile(gopath&"temp1.mdb")
if err.number=0 then
Response.Write("<script>alert('您的数据库, 已经压缩成功!');history.back();</script>")
else
Response.Write("<script>alert('压缩过程中出现错误!');history.back();</script>")
end if
Set Engine=nothing
else
Response.Write("<script>alert('找不到数据库文件!');history.back();</script>")
end if
end select
set fso=nothing
end if
%>
<table border="1" cellspacing="0" cellpadding="0" rules=none width=100% class='3d'>
<tr>
<td class="title" height=22><b> <img src=img/ie.gif border=0 width='15' height='15' align='absMiddle' /> 数据库处理(需要FSO支持)</b>
</td>
</tr>
<tr>
<td height='50' align='center' class='bg'>
<button style='height:30px;' class='button' onclick="location.href='?go=action&action=zip'">压 缩 数 据 库</button>
<button style='height:30px' class='button' onclick="location.href='?go=action&action=bak'">备 份 数 据 库</button>
<button style='height:30px' class='button' onclick="location.href='?go=action&action=com'">还 原 数 据 库</button>
</td>
</tr>
<tr><td class="hr"></td></tr>
<tr><td height='30' align='center' class='bg'>
注意:数据库处理之前请您先设置好您的备份路径,以免造成不必要的损失!
</td></tr></form></table>
<%call closedata()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -