📄 check.asp
字号:
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限!</b></font></div>"
response.End
end if
end if
%>
<title><%=webname%>:::空间查看</title>
<style type="text/css">
table { font-size: 9pt}
BODY { FONT-FAMILY: 宋体; FONT-SIZE: 9pt;
SCROLLBAR-HIGHLIGHT-COLOR: buttonface;
SCROLLBAR-SHADOW-COLOR: buttonface;
SCROLLBAR-3DLIGHT-COLOR: buttonhighlight;
SCROLLBAR-TRACK-COLOR: #eeeeee;
SCROLLBAR-DARKSHADOW-COLOR: buttonshadow}
</STYLE>
<meta NAME=GENERATOR Content=""Microsoft FrontPage 3.0"" CHARSET=GB2312>
<BODY bgcolor="#ffffff" alink="#333333" vlink="#333333" link="#333333" topmargin="20"><table cellpadding=0 cellspacing=0 border=0 width=95% bgcolor=#777777 align=center>
<tr> <td> <table cellpadding=3 cellspacing=1 border=0 width=100%> <tr bgcolor='#EEEEEE'>
<td align=center colspan="2">空间的使用情况 </td></tr> <tr BGCOLOR="#ffffff"> <td width="80%" valign=top>
<%
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=size & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=size & " 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=size & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=size & " 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
%> <table width=90% cellspacing=1 cellpadding=0 ALIGN="CENTER"> <tr> <td height=25 WIDTH="100%">
系统空间占用情况 | </td></tr> <tr> <td WIDTH="100%"> <blockquote> <%
fsorank=1
if fsorank=1 then
%> <br> <%Function GetPP
dim s
s=Request.ServerVariables("path_translated")
GetPP=left(s,instrrev(s,"\",len(s)))
End function
if sPP="" then sPP=GetPP
if right(sPP,1)<>"\" then sPP=sPP&"\"
set fso=server.createobject("scripting.filesystemobject")
Set f = fso.GetFolder(sPP)
Set fc = f.SubFolders
i=1
i2=1
For Each f in fc%> 目录<b><%=f.name%></b>占用空间: <img src="pic/bar<%=i2%>.gif" width=<%=drawbar(""&f.name&"")%> height=10> <%showSpaceinfo(""&f.name&"")%><br><br>
<%i=i+1
if i2<10 then
i2=i2+1
else
i2=1
end if
Next%> 程序文件占用空间: <img src="pic/bar8.gif" width=<%=drawspecialbar%> height=10> <%showSpecialSpaceinfo("Program")%><br><br>
系统占用空间总计:<br><img src="pic/bar9.gif" width=400 height=10> <%showspecialspaceinfo("All")%>
<%
else
response.write "<br><li>本功能已经被关闭"
end if
%> </blockquote></td></tr> </table></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -