⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 size.asp

📁 鄂尔多斯建站网全站程序(冬季修正版)
💻 ASP
字号:
<!--#include file="session.asp"-->
<!--#include file="conn.asp"-->
<%
'**********************************
'版本:host_free 3.0               *
'官方网站:http://www.850518.com   *
'技术论坛:http://forum.850518.com *
'qq:54455245 (欢迎咨询商业版)     *
'msn: steven_bass@msn.com         *
'手机:(0)13632779827              *
'mail:wtez@vip.163.com            *
'版权所有,请保留该信息,谢谢合作 *
'**********************************
%>
 <% 	
	on error resume next
 	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=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>"
 	end sub	
 	
 	sub showspecialspaceinfo(method)
 		dim fso,d,fc,f1,size,showsize,drvpath 		
 		set fso=server.createobject("scripting.filesystemobject")
 		drvpath=server.mappath("../images")
 		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>"
 	end sub 	 	 	
 	
 	function drawbar(drvpath)
 		dim fso,drvpathroot,d,size,totalsize,barsize
 		set fso=server.createobject("scripting.filesystemobject")
 		drvpathroot=server.mappath("../images")
 		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("../images")
 		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 	
 %>
<html>

<head>
<meta http-equiv="content-language" content="zh-cn">
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta name="generator" content="microsoft frontpage 4.0">
<meta name="progid" content="frontpage.editor.document">
<link href="style.css" rel=stylesheet>
</head>

<body style="background-color: #eeeeee">

<div align="center">
  <center>
  <table border="0" cellpadding="0" cellspacing="1" width="100%" bgcolor="#626262">
    <tr>
      <td height="20">&nbsp; <font color="#ffffff"><b>占用情况</b></font></td>   
    </tr>
    <tr>
      <td height="500" bgcolor="#ffffff">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td width="18%" height="25" align="right">后台文件占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../admin")%> height=10> <%showspaceinfo("../admin")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">数据库占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../data")%> height=10> <%showspaceinfo("../data")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">备份数据库占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../databackup")%> height=10> <%showspaceinfo("../databackup")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">ubb图片占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../images")%> height=10> <%showspaceinfo("../images")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">子程序文件占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../include")%> height=10> <%showspaceinfo("../include")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">整站图片占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../pic")%> height=10> <%showspaceinfo("../pic")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">上传文件占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=<%=drawbar("../upfile")%> height=10> <%showspaceinfo("../upfile")%></td>
          </tr>
          <tr>
            <td width="18%" height="25" align="right">全站占用空间:</td>
            <td width="82%" height="25"><img border="0" src="../pic/bar.gif"  width=400 height=10> <%showspecialspaceinfo("all")%></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>
<%
'**********************************
'版本:host_free 3.0               *
'官方网站:http://www.850518.com   *
'技术论坛:http://forum.850518.com *
'qq:54455245 (欢迎咨询商业版)     *
'msn: steven_bass@msn.com         *
'手机:(0)13632779827              *
'mail:wtez@vip.163.com            *
'版权所有,请保留该信息,谢谢合作 *
'**********************************
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -