%
Head()
Dim TestConn
dim action
dim admin_flag
action=trim(request("action"))
dim dbpath,bkfolder,bkdbname,fso,fso1
Dim uploadpath
Dim okOS,okCpus,okCPU
If Dvbbs.Forum_Setting(76)="0" Or Dvbbs.Forum_Setting(76)="" Then Dvbbs.Forum_Setting(76)="UploadFile/"
uploadpath="../"&Dvbbs.Forum_Setting(76)
select case action
case "CompressData" '压缩数据
admin_flag=",30,"
if not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 then
Errmsg=ErrMsg + "
本页面为管理员专用,请登录后进入。
您没有管理本页面的权限。"
dvbbs_error()
else
dim tmprs
dim allarticle
dim Maxid
dim topic,username,dateandtime,body
call CompressData()
end if
case "BackupData" '备份数据
admin_flag=",31,"
if not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 then
Errmsg=ErrMsg + "
本页面为管理员专用,请登录后进入。
您没有管理本页面的权限。"
dvbbs_error()
else
if request("act")="Backup" then
call updata()
else
call BackupData()
end if
end if
case "RestoreData" '恢复数据
admin_flag=",32,"
dim backpath
if not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 then
Errmsg=ErrMsg + "
本页面为管理员专用,请登录后进入。
您没有管理本页面的权限。"
dvbbs_error()
else
if request("act")="Restore" then
Dbpath=request.form("Dbpath")
backpath=request.form("backpath")
if dbpath="" then
response.write "请输入您要恢复成的数据库全名"
else
Dbpath=server.mappath(Dbpath)
end if
backpath=server.mappath(backpath)
Set TestConn = Server.CreateObject("ADODB.Connection")
On Error Resume Next
TestConn.open "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Dbpath
If Err Then
Response.Write Err.Description
Err.Clear
Set TestConn = Nothing
Response.Write "备份的文件并非合法的数据库。"
Response.End
Else
Set TestConn = Nothing
End If
Set Fso=server.createobject("scripting.filesystemobject")
if fso.fileexists(dbpath) then
fso.copyfile Dbpath,Backpath
response.write "成功恢复数据!"
else
response.write "备份目录下并无您的备份文件!"
end if
else
call RestoreData()
end if
end if
case "SpaceSize" '系统空间占用
admin_flag=",33,"
if not Dvbbs.master or instr(","&session("flag")&",",admin_flag)=0 then
Errmsg=ErrMsg + "
本页面为管理员专用,请登录后进入。
您没有管理本页面的权限。"
dvbbs_error()
else
call SpaceSize()
end if
case else
Errmsg=ErrMsg + "
选取相应的操作。"
dvbbs_error()
end select
Footer()
response.write"