复制代码 代码如下:
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据库管理</title>
</head>
<body>
<div align=center>数据库管理系统</div>
<br>
<br>
<p align="center">
<%
Dim ZC_DATABASE_PATH
'数据库的路径
ZC_DATABASE_PATH="database/data.mdb"
data_array= Split(ZC_DATABASE_PATH,"/")
Dim action
action=trim(request("action"))
Dim dbpath,bkfolder,bkdbname,fso,fso1
Select Case action
Case ""
Call chushihua()
Case "CompressData" '压缩数据
Dim tmprs
dim allarticle
dim Maxid
dim topic,username,dateandtime,body
call CompressData()
case "BackupData" '备份数据
if request("act")="Backup" Then
call updata()
else
call BackupData()
end If
case "RestoreData" '恢复数据
dim backpath
if request("act")="Restore" Then
Dbpath=request.form("Dbpath")
backpath=request.form("backpath")
if dbpath="" Then
response.write "Please input your database whole Name"
else
Dbpath=server.mappath(Dbpath)
end If
backpath=server.mappath(backpath)
Set Fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(dbpath) Then
fso.copyfile Dbpath,Backpath
response.write "数据库被成功还原!<br>"
else
response.write "没找到您所需要的数据库!"
end If
else
call RestoreData()
end If
Case "SpaceSize" '系统空间占用
call SpaceSize()
Case "deletebackup"
Dim dbname
dbpath=Request.QueryString("dbpath")
dbname=Request.QueryString("dbname")
dbpath=Server.MapPath(dbpath)
dbpath=dbpath &"\"&dbname
set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(dbPath) Then
fso.DeleteFile(DBPath)
Set fso = nothing
response.write "<br>您备份的数据库已经" & dbpath &"被成功删除!<br><br><a href=""data_s.asp"">返回..</a>"
Else
response.write dbpath
response.write "<br>输入的路径错误,请确认后重新输入!<br><br><a href=""data_s.asp"">返回..</a>"
End If
Case Else
End Select
%>
</div>
<%
response.write"</body></html>"
Sub chushihua()
%>
<div align=center>
<form id="edit">
<br/>
<a href="?action=CompressData">[压缩数据库]</a>
<br/><br/><a href="?action=BackupData">[备份数据库]</a>
<br/><br/><a href="?action=RestoreData">[还原数据库]</a>
<br/><br/><a href="?action=SpaceSize">[系统空间占用]</a>
<br/><br/>
</form>
</div>
<%end sub%>
<%
'====================系统空间占用=======================
Sub SpaceSize()
On Error Resume Next
%>
<div align=center>
<div align=center>
系统空间查看
<br/><br/>
<form id="edit">
<br>
数据库:<%showSpaceinfo("../"&data_array(1)&"")%><br><br>
备份数据库:<%showSpaceinfo("databackup")%><br><br>
系统总共:<%showSpaceinfo("/")%>
<br><br>
</form>
</div>
<br >
<br >
<br >
<a href="data_s.asp">返回...</a>
</div>
<%
End Sub
%>
<% Sub ShowSpaceInfo(drvpath)
dim fso,d,size,showsize
set fso=server.CreateObject("scripting.filesystemobject")
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
showsize=size & " Byte"
if size>1024 Then
size=(Size/1024)
showsize=size & " KB"
end If
if size>1024 Then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end If
if size>1024 Then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end If
response.write "<font face=verdana>" & showsize & "</font>"
End Sub
%>
<%
Sub RestoreData()
%>
<div align=center>
<div align=center>
<br/><...
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据库管理</title>
</head>
<body>
<div align=center>数据库管理系统</div>
<br>
<br>
<p align="center">
<%
Dim ZC_DATABASE_PATH
'数据库的路径
ZC_DATABASE_PATH="database/data.mdb"
data_array= Split(ZC_DATABASE_PATH,"/")
Dim action
action=trim(request("action"))
Dim dbpath,bkfolder,bkdbname,fso,fso1
Select Case action
Case ""
Call chushihua()
Case "CompressData" '压缩数据
Dim tmprs
dim allarticle
dim Maxid
dim topic,username,dateandtime,body
call CompressData()
case "BackupData" '备份数据
if request("act")="Backup" Then
call updata()
else
call BackupData()
end If
case "RestoreData" '恢复数据
dim backpath
if request("act")="Restore" Then
Dbpath=request.form("Dbpath")
backpath=request.form("backpath")
if dbpath="" Then
response.write "Please input your database whole Name"
else
Dbpath=server.mappath(Dbpath)
end If
backpath=server.mappath(backpath)
Set Fso=server.CreateObject("scripting.filesystemobject")
if fso.fileexists(dbpath) Then
fso.copyfile Dbpath,Backpath
response.write "数据库被成功还原!<br>"
else
response.write "没找到您所需要的数据库!"
end If
else
call RestoreData()
end If
Case "SpaceSize" '系统空间占用
call SpaceSize()
Case "deletebackup"
Dim dbname
dbpath=Request.QueryString("dbpath")
dbname=Request.QueryString("dbname")
dbpath=Server.MapPath(dbpath)
dbpath=dbpath &"\"&dbname
set fso = CreateObject("Scripting.FileSystemObject")
If fso.FileExists(dbPath) Then
fso.DeleteFile(DBPath)
Set fso = nothing
response.write "<br>您备份的数据库已经" & dbpath &"被成功删除!<br><br><a href=""data_s.asp"">返回..</a>"
Else
response.write dbpath
response.write "<br>输入的路径错误,请确认后重新输入!<br><br><a href=""data_s.asp"">返回..</a>"
End If
Case Else
End Select
%>
</div>
<%
response.write"</body></html>"
Sub chushihua()
%>
<div align=center>
<form id="edit">
<br/>
<a href="?action=CompressData">[压缩数据库]</a>
<br/><br/><a href="?action=BackupData">[备份数据库]</a>
<br/><br/><a href="?action=RestoreData">[还原数据库]</a>
<br/><br/><a href="?action=SpaceSize">[系统空间占用]</a>
<br/><br/>
</form>
</div>
<%end sub%>
<%
'====================系统空间占用=======================
Sub SpaceSize()
On Error Resume Next
%>
<div align=center>
<div align=center>
系统空间查看
<br/><br/>
<form id="edit">
<br>
数据库:<%showSpaceinfo("../"&data_array(1)&"")%><br><br>
备份数据库:<%showSpaceinfo("databackup")%><br><br>
系统总共:<%showSpaceinfo("/")%>
<br><br>
</form>
</div>
<br >
<br >
<br >
<a href="data_s.asp">返回...</a>
</div>
<%
End Sub
%>
<% Sub ShowSpaceInfo(drvpath)
dim fso,d,size,showsize
set fso=server.CreateObject("scripting.filesystemobject")
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
showsize=size & " Byte"
if size>1024 Then
size=(Size/1024)
showsize=size & " KB"
end If
if size>1024 Then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end If
if size>1024 Then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end If
response.write "<font face=verdana>" & showsize & "</font>"
End Sub
%>
<%
Sub RestoreData()
%>
<div align=center>
<div align=center>
<br/><...
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“ACCESS数据库的压缩,备份,还原,下载,删除的实现”评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。