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

📄 checkspace.asp

📁 . 缓存处理技术
💻 ASP
字号:
<!--#include file="Sysconfig.asp"-->
<!--#include file="Checkadmin.asp"-->
<style type=text/css>
<!--
td{ font-size: 9pt }
-->
</style>
<%
if session("super_admin")<>super_admin then
   Response.write "<script language=javascript>alert('你还没有登陆,或者已经登陆超时,请重新登陆!');top.location.href='admin/default.asp';</script>"
   Response.End
end if
%>
<table cellpadding=0 cellspacing=0 border=0 width=560 align=center class=tablebg>
<tr> <td>
<table cellpadding=3 cellspacing=1 border=0 width=100%> <tr class=titletd>
<td align=center colspan="2"><b>空间使用情况</b></td></tr> <tr class=td> <td width="80%" valign=top>
<%
sub showspaceinfo(drvpath)
dim fso,d,size,showsize
set fso=server.createobject("scripting.filesystemobject")

    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=SPP

    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=SPP

  drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
  set d=fso.getfolder(drvpathroot)
  totalsize=d.size


  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=SPP

  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
%>
<table width=98% cellspacing=1 cellpadding=0 align="center">
<tr> <td width="100%">
<blockquote> 
<%
DIm FsoRank
fsorank=1
if fsorank=1 then

function getpp
  dim s
  s=request.servervariables("path_translated")
  getpp=left(s,instrrev(s,"\",len(s)))
end function
Dim Spp
if spp="" then spp=Getpp
if right(spp,1)<>"\" then spp=Getpp&"\"


Spp=Left(Spp,Len(spp)-1)


Spp=Left(Spp,InstrRev(Spp,"\"))



Dim FSO,f,fc,i2
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><%=i%></b>占用空间:&nbsp;<img src="images/s1.gif" width=<%=drawbar(SPP & f.name)%> height=10>&nbsp;<%showspaceinfo(SPP & f.name)%><br><br>
<%
i=i+1
if i2<10 then
i2=i2+1
else
i2=1
end if
next
%>
系统文件占用总空间:&nbsp;<img src="images/s1.gif" width=<%=drawspecialbar%> height=10>&nbsp;<%showspecialspaceinfo("program")%><br><br>
系统占用空间总计:<br>&nbsp;<img src="images/s1.gif" width=380 height=10> <%showspecialspaceinfo("all")%>
<%
else
response.write "<br><li>该功能无法执行</Li>"
end if
%> </blockquote></td></tr> </table></td></tr> </table>

⌨️ 快捷键说明

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