<!--#include file="../p_inc/Include_func.asp"-->
<!--#include file="inc/public.asp"-->
<!--#include file="inc/openconn.asp"-->
<LINK href="css/style.css" rel=stylesheet type=text/css>
<%
checkLogin()
	Sub ShowSpaceInfo(drvpath)
 		dim fso,d,size,showsize
 		set fso=server.createobject("scripting.filesystemobject") 	
		IF IsFolderExists(drvpath) Then
			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=formatnumber(size,2) & "&nbsp;MB"		
			end if
			if size>1024 then
			   size=(size/1024)
			   showsize=formatnumber(size,2) & "&nbsp;GB"	   
			end if   
		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("\")
 		set d=fso.getfolder(drvpathroot)
 		totalsize=d.size
 		
		IF IsFolderExists(drvpath) THen
			drvpath=server.mappath(drvpath) 		
			set d=fso.getfolder(drvpath)
			size=d.size
			
			barsize=cint((size/totalsize)*350)
			Drawbar=barsize
		End iF
 	End Function 	
 		
%>
<table width="95%" border="0" cellspacing="1" cellpadding="3"  align=center class="tableBorder">    <tr>
      <th width="100%" height="28" bgcolor="#99CCFF"><b>&nbsp; 系统空间占用情况</b></th>
    </tr>
    <tr>
      <td width="100%" class="forumrow">      
      <blockquote><br>
	        <b>众讯系统文件占用空间情况：</b><br><br>
 			全 部 空间：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../")%> height=10>&nbsp;<%showSpaceinfo("../")%>	<br><br>		
 			数据库空间：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../p_data/")%> height=10>&nbsp;<%showSpaceinfo("../p_data")%>
			<br><br>
 			备份数据库：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../backup/")%> height=10>&nbsp;<%showSpaceinfo("../backup")%>
			<br><br>			
 			图 片 空间：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../upload/")%> height=10>&nbsp;<%showSpaceinfo("../upload")%>		
			<br><br>
			后 台 空间：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../"&G_admin&"/")%> height=10>&nbsp;<%showSpaceinfo("../"&G_admin)%>	<br><br>
			模 版 空间：&nbsp;<img src="images/bar.gif" width=<%=drawbar("../template/")%> height=10>&nbsp;<%showSpaceinfo("../template")%>	<br><br>			
												
	  </blockquote>
	  </td>
	 </tr>
</table>