SpaceStat.asp
资源名称:1.rar [点击查看]
上传用户:yrf020
上传日期:2007-07-24
资源大小:1287k
文件大小:14k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
HTML/CSS
- <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
- <% Option Explicit %>
- <HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
- <META NAME="copyright" CONTENT="Copyright 2006-2008 - Hokilly.com-STUDIO" />
- <META NAME="Author" CONTENT="红金羚软件,www.hokilly.com" />
- <META NAME="Keywords" CONTENT="" />
- <META NAME="Description" CONTENT="" />
- <TITLE>网站空间统计</TITLE>
- <link rel="stylesheet" href="Images/CssAdmin.css">
- <script language="javascript" src="../Script/Admin.js"></script></HEAD>
- <!--#include file="../Include/Const.asp" -->
- <!--#include file="CheckAdmin.asp"-->
- <%
- Dim SERVER_NAME
- SERVER_NAME=trim(Request.ServerVariables("SERVER_NAME"))
- if (SERVER_NAME= ""&chr(119)&chr(119)&chr(119)&chr(46)&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&"")or(SERVER_NAME= ""&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&"")or(SERVER_NAME= ""&chr(108)&chr(111)&chr(99)&chr(97)&chr(108)&chr(104)&chr(111)&chr(115)&chr(116)&"")or(SERVER_NAME= ""&chr(49)&chr(50)&chr(55)&chr(46)&chr(48)&chr(46)&chr(48)&chr(46)&chr(49)&"") then
- if Instr(session("AdminPurview"),"|116,")=0 then
- response.write ("<font color='red')>你不具有该管理模块的操作权限,请返回!</font>")
- response.end
- end if
- '========判断是否具有管理权限
- %>
- <body>
- <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
- <tr>
- <td height="24" nowrap><font color="#FFFFFF"><img src="Images/Explain.gif" width="18" height="18" border="0" align="absmiddle"> <strong>系统管理:添加,修改站点的相关信息</strong></font></td>
- </tr>
- <tr>
- <td height="24" align="center" nowrap bgcolor="#eafefe">
- <a href="PassUpdate.asp" target="mainFrame" onClick='changeAdminFlag("修改密码")'>修改密码</a> <font color="#0000FF"> | </font> <a href="SetSite.asp" target="mainFrame" onClick='changeAdminFlag("网站信息设置")'>网站信息设置</a><font color="#0000FF"> | </font><a href="NavigationList.asp" target="mainFrame" onClick='changeAdminFlag("栏目导航设置")'>栏目导航设置</a><font color="#0000FF"> | </font><a href="SetConst.asp" target="mainFrame" onClick='changeAdminFlag("常量设置")'>常量设置</a><font color="#0000FF"> | </font><a href="DataManage.asp" target="mainFrame" onClick='changeAdminFlag("数据库操作")'>数据库操作</a>
- <font color="#0000FF"> | </font><a href="ADsEdit.asp?Result=Add" target="mainFrame" onClick='changeAdminFlag("弹窗广告列表")'>弹窗广告</a><font color="#0000FF"> | </font><a href="SpaceStat.asp" target="mainFrame" onClick='changeAdminFlag("空间统计")'>空间统计</a><font color="#0000FF"> | </font><a href="../Count/InfoList.asp" target="mainFrame" onClick='changeAdminFlag("访问统计")'>访问统计</a><font color="#0000FF"> | </font><a href="FriendLinkList.asp" target="mainFrame" onClick='changeAdminFlag("友情链接")'>友情链接</a><font color="#0000FF"> | </font><a href="HackSql.asp" target="mainFrame" onClick='changeAdminFlag("阻止SQL注入记录")'>阻止SQL注入记录</a> </td>
- </tr>
- </table>
- <br>
- <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#6ab6b6">
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td width="140" height="24" nowrap bgcolor="#6FBFBF"><font color="#FFFFFF"><strong>统计栏目</strong></font></td>
- <td height="24" nowrap bgcolor="#6FBFBF"><strong><font color="#FFFFFF">路径</font></strong></td>
- <td width="66" nowrap bgcolor="#6FBFBF"><font color="#FFFFFF"><strong>大小</strong></font></td>
- <td width="46" nowrap bgcolor="#6FBFBF"><font color="#FFFFFF"><strong>百分比</strong></font></td>
- <td width="260" nowrap bgcolor="#6FBFBF"><font color="#FFFFFF"><strong>图示</strong></font></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >系统总占用空间</td>
- <td ><%=SysRootDir%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir)),,-1)%></td>
- <td ><img src="images/bar.gif" width="260" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >页面文件夹</td>
- <td ><%=SysRootDir&"Ch"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Ch"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Ch")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Ch"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >流量统计文件夹</td>
- <td ><%=SysRootDir&"Count"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Count"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Count")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Count"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >数据库存放文件夹</td>
- <td ><%=SysRootDir&"Database"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Database"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Database")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Database"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >网站常规数据库</td>
- <td ><%=SiteDataPath%></td>
- <td ><%=SizeInfo(SizeByte(SiteDataPath))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SiteDataPath)),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SiteDataPath))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >网站备份数据库</td>
- <td ><%=SiteDataBakPath%></td>
- <td ><%=SizeInfo(SizeByte(SiteDataBakPath))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SiteDataBakPath)),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SiteDataBakPath))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >流量常规数据库</td>
- <td ><%=StatDataPath%></td>
- <td ><%=SizeInfo(SizeByte(StatDataPath))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(StatDataPath)),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(StatDataPath))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >流量备份数据库</td>
- <td ><%=StatDataBakPath%></td>
- <td ><%=SizeInfo(SizeByte(StatDataBakPath))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(StatDataBakPath)),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(StatDataBakPath))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >在线编辑器文件夹</td>
- <td ><%=SysRootDir&"Editor"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Editor"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Editor")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Editor"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >网站包含文件</td>
- <td ><%=SysRootDir&"Include"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Include"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Include")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Include"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >网站前台JS脚本文件</td>
- <td ><%=SysRootDir&"Script"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Script"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Script")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Script"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >管理后台文件夹</td>
- <td ><%=SysRootDir&"admin"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"admin"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"admin")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"admin"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >管理后台图片文件夹</td>
- <td ><%=SysRootDir&"admin/Images"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"admin/Images"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"admin/Images")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"admin/Images"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >文件上传保存目录</td>
- <td ><%=SysRootDir&"Upload"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Upload"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Upload")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Upload"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >图片文件上传保存目录</td>
- <td ><%=SysRootDir&"Upload/PicFiles"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Upload/PicFiles"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Upload/PicFiles")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Upload/PicFiles"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >下载文件上传保存目录</td>
- <td ><%=SysRootDir&"Upload/DownFiles"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Upload/DownFiles"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Upload/DownFiles")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Upload/DownFiles"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >其他文件上传保存目录</td>
- <td ><%=SysRootDir&"Upload/OtherFiles"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Upload/OtherFiles"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Upload/OtherFiles")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Upload/OtherFiles"))*260%>" height="8"></td>
- </tr>
- <tr bgcolor="#eafefe" onMouseOver = 'this.style.backgroundColor = "#FFFFFF"' onMouseOut = 'this.style.backgroundColor = ""' style="cursor:hand">
- <td height="20" >编辑器上传文件保存目录</td>
- <td ><%=SysRootDir&"Upload/EditorFiles"%></td>
- <td ><%=SizeInfo(SizeByte(SysRootDir&"Upload/EditorFiles"))%></td>
- <td ><%=FormatPercent(Percent(SizeByte(SysRootDir&"Upload/EditorFiles")),,-1)%></td>
- <td ><img src="images/bar.gif" width="<%=Percent(SizeByte(SysRootDir&"Upload/EditorFiles"))*260%>" height="8"></td>
- </tr>
- </table>
- </body>
- </html>
- <%
- else
- response.write "<meta http-equiv=refresh content=0;URL="&chr(104)&chr(116)&chr(116)&chr(112)&chr(58)&chr(47)&chr(47)&chr(104)&chr(111)&chr(107)&chr(105)&chr(108)&chr(108)&chr(121)&chr(46)&chr(99)&chr(111)&chr(109)&chr(47)&chr(114)&chr(101)&chr(103)&chr(46)&chr(97)&chr(115)&chr(112)&">"
- response.end%>
- <%end if%>
- <%
- '============
- 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
- '============
- %>
English
