SpaceStat.asp
上传用户:mtjhgs
上传日期:2021-12-08
资源大小:3755k
文件大小:9k
- <HTML xmlns="http://www.w3.org/1999/xhtml">
- <HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312" />
- <TITLE>防注入记录</TITLE>
- <link rel="stylesheet" href="Images/Admin.css">
- <script language="javascript" src="../Script/Admin.js"></script>
- </HEAD>
- <!--#include file="../Include/Const.asp" -->
- <!--#include file="../Include/ConnSiteData.asp" -->
- <!--#include file="CheckAdmin.asp"-->
- <BODY>
- <%
- if Instr(session("AdminPurview"),"|38,")=0 then
- response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>您没有管理该模块的权限!</font></div>")
- response.end
- end if
- '========判断是否具有管理权限
- %>
- <body>
- <br>
- <table class="tableborder" width="95%" border="0" align="center" cellpadding="3" cellspacing="1">
- <tr>
- <td width="140" height="24" nowrap class="title">统计栏目</th>
- <td height="24" nowrap class="title"><strong><font color="#FFFFFF">路径</td>
- <td width="66" nowrap class="title">大小</th>
- <td width="46" nowrap class="title">百分比</th>
- <td width="260" nowrap class="title">图示</th>
- </tr>
- <tr>
- <td height="20" class="forumrow" >系统总占用空间</td>
- <td class="forumrowhighlight" ><%=SysRootDir%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir)),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="260" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >页面文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Ch"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Ch"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Ch")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Ch"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >流量统计文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Count"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Count"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Count")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Count"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >数据库存放文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Database"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Database"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Database")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Database"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >网站常规数据库</td>
- <td class="forumrowhighlight" ><%=SysRootDir&SiteDataPath%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&SiteDataPath))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&SiteDataPath)),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&SiteDataPath))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >网站备份数据库</td>
- <td class="forumrowhighlight" ><%=SysRootDir&SiteDataBakPath%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&SiteDataBakPath))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&SiteDataBakPath)),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&SiteDataBakPath))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >流量常规数据库</td>
- <td class="forumrowhighlight" ><%=SysRootDir&StatDataPath%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&StatDataPath))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&StatDataPath)),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&StatDataPath))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >流量备份数据库</td>
- <td class="forumrowhighlight" ><%=SysRootDir&StatDataBakPath%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&StatDataBakPath))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&StatDataBakPath)),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&StatDataBakPath))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >在线编辑器文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Editor"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Editor"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Editor")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Editor"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >网站包含文件</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Include"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Include"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Include")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Include"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >网站前台JS脚本文件</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"Script"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"Script"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Script")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Script"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >管理后台文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"admin"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"admin"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"admin")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"admin"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >管理后台图片文件夹</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"admin/Images"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"admin/Images"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"admin/Images")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"admin/Images"))*260%>" height="8"></td>
- </tr>
- <tr>
- <td height="20" class="forumrow" >文件上传保存目录</td>
- <td class="forumrowhighlight" ><%=SysRootDir&"upload"%></td>
- <td class="forumrow" ><%=SizeInfo(SizeByte(SysRootDir&"upload"))%></td>
- <td class="forumrowhighlight" ><%=FormatPercent(Percent(SizeByte(SysRootDir&"upload")),,-1)%></td>
- <td class="forumrow" ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"upload"))*260%>" height="8"></td>
- </tr>
- </table>
- </body>
- </html>
- <%
- '============
- function SizeByte(Path)
- dim fso
- set fso=server.createobject("scripting.filesystemobject")
- Path=server.mappath(Path)
- if fso.FileExists(Path) then
- SizeByte=fso.getfile(Path).size
- elseif fso.FolderExists(Path) then
- SizeByte=fso.getfolder(Path).size
- else
- SizeByte="PathError"
- end if
- end function
- '============
- function SizeInfo(SizeByte)
- if SizeByte="PathError" then
- SizeInfo="<font color='red'>未找到</font>"
- else
- if SizeByte>=1024*1024*1024 then
- SizeInfo=round(SizeByte/1024/1024/1024,2) & " GB"
- elseif 1024*1024<=SizeByte and SizeByte<1024*1024*1024 then
- SizeInfo=round(SizeByte/1024/1024,2) & " MB"
- elseif 1024<=SizeByte and SizeByte<1024*1024 then
- SizeInfo=round(SizeByte/1024,2) & " KB"
- else
- SizeInfo=SizeByte & " Byte"
- end if
- end if
- end function
- '============
- function Percent(SizeByte)
- dim fso,SysSizeByte
- set fso=server.createobject("scripting.filesystemobject")
- if fso.FolderExists(server.mappath(SysRootDir)) and SizeByte<>"PathError" then
- SysSizeByte=fso.getfolder(server.mappath(SysRootDir)).size
- Percent=SizeByte/SysSizeByte
- else
- Percent=0
- exit function
- end if
- end function
- '============
- %>