📄 adminspace.asp
字号:
<!--#INCLUDE FILE="Connections.asp" -->
<!--#include file="adminaccess.asp" -->
<body <%=background%> >
<%
on error resume next
set fso=server.createobject("scripting.filesystemobject")
if err then
err.clear
response.write "<div class=tdc>不能建立fso对象,请确保你的空间支持fso:!"
response.end
end if
images=server.mappath("./images")
set a=fso.getfolder(images)
images=a.size
if images>1024 then
images=(images\1024)
imagessize=images & " KB"
end if
if images>1024 then
images=(images/1024)
imagessize=formatnumber(images,2) & " MB"
end if
if images>1024 then
images=(images/1024)
imagessize=formatnumber(images,2) & " GB"
end if
image=server.mappath("./image")
set a=fso.getfolder(image)
image=a.size
if image>1024 then
image=(image\1024)
imagesize=image & " KB"
end if
if image>1024 then
image=(image/1024)
imagesize=formatnumber(image,2) & " MB"
end if
if image>1024 then
image=(image/1024)
imagesize=formatnumber(image,2) & " GB"
end if
upload=server.mappath("./upload")
set a=fso.getfolder(upload)
upload=a.size
if upload>1024 then
upload=(upload\1024)
uploadsize=upload & " KB"
end if
if upload>1024 then
upload=(upload/1024)
uploadsize=formatnumber(upload,2) & " MB"
end if
if upload>1024 then
upload=(upload/1024)
uploadsize=formatnumber(upload,2) & " GB"
end if
mdb=server.mappath("./mdb")
set a=fso.getfolder(mdb)
mdb=a.size
if mdb>1024 then
mdb=(mdb\1024)
mdbsize=mdb & " KB"
end if
if mdb>1024 then
mdb=(mdb/1024)
mdbsize=formatnumber(mdb,2) & " MB"
end if
if mdb>1024 then
mdb=(mdb/1024)
mdbsize=formatnumber(mdb,2) & " GB"
end if
ubb=server.mappath("./ubb")
set a=fso.getfolder(ubb)
ubb=a.size
if ubb>1024 then
ubb=(ubb\1024)
ubbsize=ubb & " KB"
end if
if ubb>1024 then
ubb=(ubb/1024)
ubbsize=formatnumber(ubb,2) & " MB"
end if
if ubb>1024 then
ubb=(ubb/1024)
ubbsize=formatnumber(ubb,2) & " GB"
end if
emot=server.mappath("./emot")
set a=fso.getfolder(emot)
emot=a.size
if emot>1024 then
emot=(emot\1024)
emotsize=emot & " KB"
end if
if emot>1024 then
emot=(emot/1024)
emotsize=formatnumber(emot,2) & " MB"
end if
if emot>1024 then
emot=(emot/1024)
emotsize=formatnumber(emot,2) & " GB"
end if
icon2=server.mappath("./icon")
set a=fso.getfolder(icon2)
icon1=a.size
if icon1>1024 then
icon1=(icon1\1024)
iconsize=icon1 & " KB"
end if
if icon1>1024 then
icon1=(icon1/1024)
iconsize=formatnumber(icon1,2) & " MB"
end if
if icon1>1024 then
icon1=(icon1/1024)
iconsize=formatnumber(icon1,2) & " GB"
end if
data=server.mappath("./data")
set a=fso.getfolder(data)
data=a.size
if data>1024 then
data=(data\1024)
datasize=data & " KB"
end if
if data>1024 then
data=(data/1024)
datasize=formatnumber(data,2) & " MB"
end if
if data>1024 then
data=(data/1024)
datasize=formatnumber(data,2) & " GB"
end if
total=server.mappath(".")
set a=fso.getfolder(total)
total1=a.size
if total1>1024 then
total1=(total1\1024)
totalsize=total1 & " KB"
end if
if total1>1024 then
total1=(total1/1024)
totalsize=formatnumber(total1,2) & " MB"
end if
if total1>1024 then
total1=(total1/1024)
totalsize=formatnumber(size,2) & " GB"
end if
set fso=nothing
%>
<table border=1 borderColor=<%=tdc2%> cellPadding=3 cellSpacing=1 width=100% style="border-collapse: collapse" align=center >
<tr align="center">
<td <%=tColor%> class=tdc1 height=22 colspan="2">文件占用空间统计</td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">头像图片占用空间(images/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((images/total1),0)%> height=10> <%=imagessize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">表情图片占用空间(icon/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((icon1/total1),0)%> height=10> <%=iconsize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">心情图片占用空间(emot/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((emot/total1),0)%> height=10> <%=emotsize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">上传文件占用空间(upload/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((upload/total1),0)%> height=10> <%=uploadsize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">常规图片占用空间(image/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((image/total1),0)%> height=10> <%=imagesize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">数据库占用空间(mdb/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((mdb/total1),0)%> height=10> <%=mdbsize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">备份数据占用空间(data/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=<%=formatnumber((data/total1),0)%> height=10> <%=datasize%></td>
</tr>
<tr>
<td width="30%" bgcolor=<%=tColor2%> class=tdc align="left">目录占用总空间(bbs/):</td>
<td width="70%" bgcolor=<%=tColor2%> class=tdc><img src="image/b1.gif" width=100% height=10> <%=totalsize%></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -