饿虎岗资源网 Design By www.oxmxm.com
复制代码 代码如下:
<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/><...
饿虎岗资源网 Design By www.oxmxm.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
饿虎岗资源网 Design By www.oxmxm.com
暂无评论...
更新日志
2024年09月20日
2024年09月20日
- 魏新雨《为你祈祷+新歌精逊2CD[WAV]
- 影心、明萨拉你选哪个?国外美女COS《博德3》
- 澳洲女子骑车跌入“自杀树”丛 疼痛持续9个月崩溃
- 育碧公布2024“她创力”计划:为女性游戏人提供辅导
- 刘美君.2017-千色·30总选3CD【环球】【WAV+CUE】
- 群星.2022-星河长明电视原声带【乐有奇思】【FLAC分轨】
- 陈淑桦.1995-淑桦盛开Forever【滚石】【WAV+CUE】
- 《再来一张》评测:出师成败皆系“赌”
- 《银河汉堡店》测评:我是银河走菜王!
- 《末日地带2》评测:酣畅淋漓的“和面”之旅
- 萧煌奇《没事的》[320K/MP3][96.22MB]
- 萧煌奇《没事的》[FLAC/分轨][263.38MB]
- 群星《音你而来 第6期》[320K/MP3][90.61MB]
- 交错战线爬塔攻略一览
- 战锤40K星际战士2全近战武器使用教学|近战武器连招表