<!--#include file=ruanx/cookies.asp-->
<%
dim flag
flag=request.cookies("foxwww")("fox")
if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');history.go(-1);</script>"
response.end
end if%>
<title><%=title%>空间查看</title>
<link href="fox.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	background-color: #CCCC99;
}
.style1 {color: #FF0000}
-->
</style>
<meta NAME=GENERATOR CHARSET=GB2312>
<BODY bgcolor="#ffffff" topmargin="20">
<div align="center">
<table cellpadding=0 cellspacing=0 border=0 width=95%> 
<tr> <td> 
<table cellpadding=3 cellspacing=1 border=1 width=100% bordercolorlight="#CC0000" bordercolordark="#CC0000"> <tr bgcolor='#EEEEEE'> 
<td align=center colspan="2" bgcolor="#CC0000">空间使用情况 </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 & "&nbsp;Byte" 
   if size>1024 then
      size=(size\1024)
      showsize=size & "&nbsp;KB"
   end if
   if size>1024 then
      size=(size/1024)
      showsize=size & "&nbsp;MB"  
   end if
   if size>1024 then
      size=(size/1024)
      showsize=size & "&nbsp;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 & "&nbsp;Byte" 
   if size>1024 then
      size=(size\1024)
      showsize=size & "&nbsp;KB"
   end if
   if size>1024 then
      size=(size/1024)
      showsize=size & "&nbsp;MB"  
   end if
   if size>1024 then
      size=(size/1024)
      showsize=size & "&nbsp;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  
 %> 
<div align="center">
	<table width=98% cellspacing=1 cellpadding=0 class="p10t"> 
 <tr> <td height=25 WIDTH="100%"> 
&nbsp;系统空间占用情况</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>占用空间：&nbsp;<img src="images/zxzx_bg05.gif" width=<%=drawbar(""&f.name&"")%> height=10>&nbsp;<%showSpaceinfo(""&f.name&"")%><br><br>
                  <%i=i+1
                          if i2<10 then
        i2=i2+1
                          else
                            i2=1
                          end if
      Next%>
                  &quot;根目录&quot;文件占用空间：&nbsp;<img src="images/zxzx_bg05.gif" width=<%=drawspecialbar%> height=10>&nbsp; 
                  <%showSpecialSpaceinfo("Program")%>
                  <br>
                  <br> 
系统占用空间总计：&nbsp;<img src="images/zxzx_bg05.gif" width=2 height=10> <%showspecialspaceinfo("All")%> 
<%
    else
     response.write "<br><li>本功能已经被关闭"
    end if
    %> </blockquote></td></tr> </table></div>
		</td></tr> </table>
</div>
