📄 data.asp
字号:
<!--#include file =../conn.asp-->
<!-- #include file="inc/const.asp" -->
<%
Head()
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 + "<BR><li>本页面为管理员专用,请<a href=../admin_login.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
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 + "<BR><li>本页面为管理员专用,请<a href=../admin_login.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
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 + "<BR><li>本页面为管理员专用,请<a href=../admin_login.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
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 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 + "<BR><li> 本页面为管理员专用,请<a href=../admin_login.asp target=_top>登录</a>后进入。<br><li>您没有管理本页面的权限。"
dvbbs_error()
else
call SpaceSize()
end if
case else
Errmsg=ErrMsg + "<BR><li>选取相应的操作。"
dvbbs_error()
end select
Footer()
response.write"</body></html>"
'====================系统空间占用=======================
sub SpaceSize()
On error resume next
GetSysInfo()
Dim t
't = GetAllSpace
Dim FoundFso
FoundFso = False
FoundFso = IsObjInstalled("Scripting.FileSystemObject")
%>
<table border="0" cellspacing="1" cellpadding="5" height="1" align=center width="95%" class="tableBorder"><tr>
<th height=25 colspan=5>
系统信息检测情况
</th>
</tr>
<tr>
<td class="forumrow" width="35%" height=23>
当前论坛版本
</td>
<td class="forumrow" width="15%">
<a href="http://www.dvbbs.net/download.asp" target=_blank>Dvbbs <%=Dvbbs.Forum_Version%></a>
</td>
<td width="8" class="forumrow"></td>
<td class="forumrow" width="35%">
数据库类型:
</td>
<td class="forumrow" width="15%">
<%
If IsSqlDataBase = 1 Then
Response.Write "Sql Server"
Else
Response.Write "Access"
End If
%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="35%" height=23>
服务器名和IP
</td>
<td class="forumRowHighlight" width="15%">
<%=Request.ServerVariables("SERVER_NAME")%><BR><%=Request.ServerVariables("LOCAL_ADDR")%>
</td>
<td width="8" class="forumRowHighlight"></td>
<td class="forumRowHighlight" width="35%">
数据库占用空间
</td>
<td class="forumRowHighlight" width="15%">
<%
If IsSqlDataBase = 1 Then
Set Rs=Dvbbs.Execute("Exec sp_spaceused")
If Err <> 0 Then
Err.Clear
Response.Write "<font color=gray>未知</font>"
Else
Response.Write Rs(1)
End If
Else
If FoundFso Then
Response.Write GetFileSize(MyDbPath & DB)
Else
Response.Write "<font color=gray>未知</font>"
End If
End If
%>
</td>
</tr>
<tr>
<td class="forumrow" width="35%" height=23>
上传头像占用空间
</td>
<td class="forumrow" width="15%">
<%showSpaceinfo("../uploadface")%>
</td>
<td width="8" class="forumrow"></td>
<td class="forumrow" width="35%">
上传图片占用空间
</td>
<td class="forumrow" width="15%">
<%showSpaceinfo(uploadpath)%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="100%" height=23 colspan=5>
<B>服务器相关信息</B>
</td>
</tr>
<tr>
<td class="forumrow" width="35%" height=23>
ASP脚本解释引擎
</td>
<td class="forumrow" width="15%">
<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
</td>
<td width="8" class="forumrow"></td>
<td class="forumrow" width="35%">
IIS 版本
</td>
<td class="forumrow" width="15%">
<%=Request.ServerVariables("SERVER_SOFTWARE")%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="35%" height=23>
服务器操作系统
</td>
<td class="forumRowHighlight" width="15%">
<%=okos%>
</td>
<td width="8" class="forumRowHighlight"></td>
<td class="forumRowHighlight" width="35%">
服务器CPU数量
</td>
<td class="forumRowHighlight" width="15%">
<%=okcpus%> 个
</td>
</tr>
<tr>
<td class="forumrow" width="100%" height=23 colspan=5>
本文件路径:<%=Server.Mappath("data.asp")%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="100%" colspan=5 height=23>
<B>主要组件信息</B>
</td>
</tr>
<tr>
<td class="forumrow" width="35%" height=23>
FSO文件读写
</td>
<td class="forumrow" width="15%">
<%
If FoundFso Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="8" class="forumrow"></td>
<td class="forumrow" width="35%">
Jmail发送邮件支持
</td>
<td class="forumrow" width="15%">
<%
If IsObjInstalled("JMail.SmtpMail") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="35%" height=23>
CDONTS发送邮件支持
</td>
<td class="forumRowHighlight" width="15%">
<%
If IsObjInstalled("CDONTS.NewMail") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="8" class="forumRowHighlight"></td>
<td class="forumRowHighlight" width="35%">
AspEmail发送邮件支持
</td>
<td class="forumRowHighlight" width="15%">
<%
If IsObjInstalled("Persits.MailSender") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr>
<td class="forumrow" width="35%" height=23>
无组件上传支持
</td>
<td class="forumrow" width="15%">
<%
If IsObjInstalled("Adodb.Stream") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
<td width="8" class="forumrow"></td>
<td class="forumrow" width="35%">
AspUpload上传支持
</td>
<td class="forumrow" width="15%">
<%
If IsObjInstalled("Persits.Upload") Then
Response.Write "<font color=green><b>√</b></font>"
Else
Response.Write "<font color=red><b>×</b></font>"
End If
%>
</td>
</tr>
<tr>
<td class="forumRowHighlight" width="35%" height=23>
SA-FileUp上传支持
</td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -