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

📄 allspace.asp

📁 一个适用于企业的客户电话咨询系统,可以与其它的相关企业管理系统进行整合!
💻 ASP
字号:
<%
'安装时要建虚拟目录zhengfu,才能正确显示空间占用情况
 set fso=Server.CreateObject("Scripting.FileSystemObject")
  'DirName=left(server.mappath("."),instrRev(server.mappath("."),"\")-1)
  'DirName=left(server.mappath("."),instrRev(server.mappath("."),"\"))
'response.write"DirName="&DirName
'response.write"<br>"
'mappath=server.mappath(".")
'response.write"server.mappath="&mappath
'response.end

  DirName=server.mappath(".")
  set GetFolder=fso.GetFolder(DirName)
  AllSpace=getfolder.size
  SAllSpace=getfolder.size
  if AllSpace>1024 then
     AllSpace=AllSpace/1024
	 ShowAllSpace=formatnumber(AllSpace,2)&"&nbsp;KB"
  end if
  if AllSpace>1024 then
     AllSpace=AllSpace/1024
	 ShowAllSpace=formatnumber(AllSpace,2)&"&nbsp;MB"
  end if
  '数据库占用空间
  set GetdatabaseSpace=fso.GetFolder(Server.mappath("data"))
  databaseSpace=GetdatabaseSpace.size
  SdatabaseSpace=GetdatabaseSpace.size
  if databaseSpace>1024 then
     databaseSpace=databaseSpace/1024
	 ShowdatabaseSpace=formatnumber(databaseSpace,2)&"&nbsp;KB"
  end if
  if databaseSpaceSpace>1024 then
     databaseSpaceSpace=databaseSpace/1024
	 databaseSpaceSpace=formatnumber(databaseSpace,2)&"&nbsp;MB"
  end if
  set GetUpfileSpace=fso.GetFolder(Server.mappath("images"))
  UpfileSpace=GetUpfileSpace.size
  SUpfileSpace=GetUpfileSpace.size
  if UpfileSpace>1024 then
     UpfileSpace=UpfileSpace/1024
	 ShowUpfileSpace=formatnumber(UpfileSpace,2)&"&nbsp;KB"
  end if
  if UpfileSpace>1024 then
     UpfileSpace=UpfileSpace/1024
	 ShowUpfileSpace=formatnumber(UpfileSpace,2)&"&nbsp;MB"
  end if

   OtherSpace=SAllSpace-SdatabaseSpace-SUpfileSpace
  SOtherSpace=SAllSpace-SdatabaseSpace-SUpfileSpace
  if OtherSpace>1024 then
     OtherSpace=OtherSpace/1024
	 ShowOtherSpace=formatnumber(OtherSpace,2)&"&nbsp;KB"
  end if
  if OtherSpace>1024 then
     OtherSpace=OtherSpace/1024
	 ShowOtherSpace=formatnumber(OtherSpace,2)&"&nbsp;MB"
  end if
%>
<html>
<head>
<title><%=version%>--空间占用</title>
<link href="include/site.css" type="text/css" rel="stylesheet">
</head>
<body>
<p>&nbsp;</p>
  <p>&nbsp;</p>
<table width="347" border="0" cellspacing="1" cellpadding="0" align="center" bgcolor="#4397c5">
  <tr> 
    <td width="345" height="16" colspan="7" valign="middle" onMouseOver=this.style.backgroundColor='#FAFBFC'; onMouseOut=this.style.backgroundColor=''; this.style.cursor='hand'; ><!--#include file = topMenu.htm--></td>
  </tr>
  <tr> 
    <td onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; height="16" bgcolor="#FFFFFF" colspan="7" >系统总占用空间: 
    <img src=images/space.gif width=200 height=10><%=ShowAllSpace%></td>
  </tr>
  <tr> 
    <td onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; height="16" bgcolor="#FFFFFF" colspan="7" >数据库占用空间: 
    <img src=images/space.gif width=<%=SdatabaseSpace/SAllSpace*200%> height=10><%=ShowdatabaseSpace%></td>
  </tr>
  <tr> 
    <td onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; height="16" bgcolor="#FFFFFF" colspan="7" >图片占用空间&nbsp;&nbsp;: 
     <img src=images/space.gif width=<%=SUpfileSpace/SAllSpace*200%> height=10><%=ShowUpfileSpace%></td>
  </tr>
  <tr> 
    <td onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; height="16" bgcolor="#FFFFFF" colspan="7" >其它占用空间&nbsp;&nbsp;: 
      <img src=images/space.gif width=<%=SOtherSpace/SAllSpace*200%> height=10><%=ShowOtherSpace%></td>
  </tr>
  <tr> 
    <td onMouseOver=this.style.backgroundColor='#FAFBFC'; this.style.cursor='hand'; onMouseOut=this.style.backgroundColor=''; height="60" colspan="7" bgcolor="#FFFFFF" > 
      <p>系统所在目录:<%=dirname%></p>
    </td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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