📄 admin-showsp.asp
字号:
<!--#include file="conn.asp"--><!--#include file="fun.asp"--><!--#include file="md5.asp"-->
<link href=css.css rel=stylesheet>
<%set bbs=myconn.execute("select*from bbsinfo")
sty="all"
sp=request.cookies(cn&"1")(sty)
c1=request.cookies(cn&"1")(sty&"c1")
c2=request.cookies(cn&"1")(sty&"c2")
tlinfo=bbs("tlinfo")
tli=split(tlinfo,"|?|")
tl=tli(0)
c11=tli(1)
c12=tli(2)
topinfo=tli(3)
upnum=tli(4)
upsize=tli(5)
b1s=tli(6)
autotable=tli(7)
alltb=tli(8)
cbi=tli(9)
lmbbs=tli(10)
if sp="" then sp=b1s
if c1="" then c1=c11
if c2="" then c2=c12
set bbs=nothing
lgname=Request.Cookies(cn&"0")("lgname")
lgpwd=request.cookies(cn&"0")("lgpwd")
lgpwd=md5(lgpwd)
set cjbz=myconn.execute("select name from admin where name='"&lgname&"' and password='"&lgpwd&"' and bd='70767766'")
if cjbz.eof then
set cjbz=nothing
response.redirect"admin-login.asp"
end if
t1="<div align='center'><center><table border='0' cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='94%' bordercolor="&c1&"><tr><td width='100%' background='pic/"&sp&"3.gif' bgcolor='"&c1&"' height='23'><font color='#FFFFFF'><b> <img border='0' src='pic/fl.gif'> "
t2="</b></font></td></tr></table></div><div align=center><center><table border=1 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor="&c1&" width=94% >"
d1="<tr><td width=100% ><P style='MARGIN: 10px'>"
d2="</td></tr></table></center></div>"
%>
<body topmargin="0" leftmargin="0"><style>TABLE {BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 1px; }TD {BORDER-RIGHT: 0px; BORDER-TOP: 0px;}</style>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<tr>
<td width="100%" height="28" background="pic/<%=sp%>3.gif" align="center">
<b><font color="#FFFFFF">论坛后台管理系统</font></b></td>
</tr>
</table><br>
<%=t1%>系统空间占用情况<%=t2&d1%><br>
数据库总占用空间: <img src="img/bar1.gif" width=<%=drawbar("db")%> height=10> <%showSpaceinfo("db")%><br><br>
程序文件占用空间: <img src="img/bar1.gif" width=<%=drawspecialbar%> height=10> <%showSpecialSpaceinfo("Program")%><br><br>
动作图片占用空间: <img src="img/bar1.gif" width=<%=drawbar("emote")%> height=10> <%showSpaceinfo("emote")%><br><br>
表情图片占用空间: <img src="img/bar1.gif" width=<%=drawbar("face")%> height=10> <%showSpaceinfo("face")%><br><br>
<font face="宋体">pic </font>目录占用空间: <img src="img/bar1.gif" width=<%=drawbar("pic")%> height=10> <%showSpaceinfo("pic")%><br><br>
<font face="宋体">img </font>目录占用空间: <img src="img/bar1.gif" width=<%=drawbar("img")%> height=10> <%showSpaceinfo("img")%><br><br>
头像图片占用空间: <img src="img/bar1.gif" width=<%=drawbar("headpic")%> height=10> <%showSpaceinfo("headpic")%><br><br>
上传文件占用空间: <img src="img/bar1.gif" width=<%=drawbar("upload")%> height=10> <%showSpaceinfo("upload")%><br><br>
<font face="宋体">plus</font>目录占用空间: <img src="img/bar1.gif" width=<%=drawbar("plus")%> height=10> <%showSpaceinfo("plus")%><br><br>
论坛占用空间总计: <img src="img/bar2.gif" width=380 height=10> <%showspecialspaceinfo("All")%>
</blockquote></td></tr></table>
<!--以下为调用函数,无需修改-->
<%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 Showspecialspaceinfo(method)
dim fso,d,fc,f1,size,showsize,drvpath
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath("pic")
drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
set d=fso.getfolder(drvpath)
if method="All" then
size=d.size
elseif method="Program" then
set fc=d.Files
for each f1 in fc
size=size+f1.size
next
end if
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
Function Drawbar(drvpath)
dim fso,drvpathroot,d,size,totalsize,barsize
set fso=server.createobject("scripting.filesystemobject")
drvpathroot=server.mappath("pic")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
barsize=cint((size/totalsize)*400)
Drawbar=barsize
End Function
Function Drawspecialbar()
dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
set fso=server.createobject("scripting.filesystemobject")
drvpathroot=server.mappath("pic")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
set fc=d.files
for each f1 in fc
size=size+f1.size
next
barsize=cint((size/totalsize)*400)
Drawspecialbar=barsize
End Function%>
<%=d2%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -