<%@ LANGUAGE=VBScript codepage ="936" %><%Response.Expires=0
Response.Buffer=true
zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
if zhbg_name="" then Response.Redirect "../error.asp?id=440"
if session("zhbg_adminok")<>true then Response.Redirect "../chat/readonly/bomb.htm"
if zhbg_grade<>10 or instr(Application("zhbg_user"),zhbg_name)=0  then Response.Redirect "../error.asp?id=439"
if zhbg_name<>Application("zhbg_adminuser") then Response.Redirect "../chat/readonly/bomb.htm"
%>
<head>
<LINK href='../css.css' type=text/css rel=stylesheet>
</head>
<body>
<br>
<br>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr>
<td align=center colspan="2">欢迎<b><%=zhbg_name%></b>进入管理页面
</td>
</tr>
<tr>
<td width="20%" valign=top>
</td>
<td width="80%" valign=top>
<% 
dim b_d3
Function ShowSpaceInfo(drvpath)
dim fso,d,size,showsize
showsize=0
set fso=server.createobject("Scripting.FileSystemObject") 
drvpath=server.mappath(drvpath) 
set d=fso.getfolder(drvpath) 
size=d.size
showsize=size 
b_d3= "&nbsp;Byte"
if size>1024 then
	size=(size\1024)
	b_d3="&nbsp;KB"
	showsize=size 
end if
if size>1024 then
	size=(size/1024)
	b_d3="&nbsp;MB" 
	showsize=formatnumber(size,2)
end if
if size>1024 then
	size=(size/1024)
	b_d3="&nbsp;MB" 
	showsize=formatnumber(size,2) 
end if 
ShowSpaceInfo=showsize
Set d=Nothing
Set Fso=Nothing
End Function 

Sub Showspecialspaceinfo(method)
	dim fso,d,fc,f1,size,showsize,drvpath 
	set fso=server.createobject("Scripting.FileSystemObject")
	drvpath=server.mappath("../chat")
	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 & "&nbsp;Byte" 
if size>1024 then
	size=(size\1024)
	showsize=size & "&nbsp;KB"
end if
if size>1024 then
	size=(size/1024)
	showsize=formatnumber(size,2) & "&nbsp;MB" 
end if
if size>1024 then
	size=(size/1024)
	showsize=formatnumber(size,2) & "&nbsp;GB" 
end if 
	response.write "<font face=verdana>" & showsize & "</font>"
	Set d=Nothing
	Set Fso=Nothing
end sub 

Function Drawbar(drvpath)
dim fso,drvpathroot,d,size,totalsize,barsize
set fso=server.createobject("Scripting.FileSystemObject")

drvpath=server.mappath(drvpath) 
set d=fso.getfolder(drvpath)
size=d.size
if size>1024 then size=(size\1024)
if size>1024 then size=(size/1024)
if size>1024 then size=(size/1024)
Drawbar=size * 3
Set d=Nothing
Set Fso=Nothing
End Function 

Function Drawspecialbar()
dim fso,drvpathroot,d,fc,f1,size,totalsize,barsize
set fso=server.createobject("Scripting.FileSystemObject")
drvpathroot=server.mappath("../chat")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
size=d.size
if size>1024 then size=(size\1024)
if size>1024 then size=(size/1024)
if size>1024 then size=(size/1024)
Drawspecialbar=size * 3
Set d=Nothing
Set Fso=Nothing
End Function 

%>
<table width=550 cellspacing=1 cellpadding=0 > 
<tr>
<td height=25 >
&nbsp;&nbsp;
</td>
</tr> 
<tr>
<td> 
<blockquote> 
<%
fsoflag=1
if fsoflag=1 then
%>
<br> 
国度数据占用空间：&nbsp;<img src="../GIF/1.gif" width=<%=drawbar("../116722683")%> height=10>&nbsp;<font face=verdana><%=showSpaceinfo("../116722683") & b_d3%></font><br><br>
国度占用空间总计：<br><img src="../GIF/2.gif" width=<%=Drawspecialbar()%> height=10>&nbsp;<br><%showspecialspaceinfo("All")%>
<%
else
response.write "<br><li>本功能已经被关闭"
end if
%>
</blockquote> 
</td>
</tr>
</table> 
</td> 
</body>