system_webuseinfo.asp
来自「SK信息采集2.0功能介绍: 1.可针对任何静态网页,动态网页进行采集。包括h」· ASP 代码 · 共 177 行
ASP
177 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%option explicit%>
<!--#include file="../../Conn.asp"-->
<!--#include file="../../SysCls/KS_CommonCls.asp"-->
<!--#include file="../Inc/Session.asp"-->
<%
'===================================================================================================================
'软件名称:科汛网站管理系统
'当前版本:科汛网站管理系统 V2.2 SP2 Free
'Copyright (C) 2006-2008 Kesion.Com All rights reserved.
'产品咨询QQ:9537636,41904294
'技术支持QQ:111394,54004407
'程序版权:科汛网络
'程序开发:科汛网络开发组(总策划:林文仲)
'E-Mail :kesioncms@hotmail.com webmaster@kesion.com
'官方网站:http://www.kesion.com
'演示站点:http://test.kesion.com
'郑重声明:
' ①、免费版本请在程序首页保留版权信息,并做上本站LOGO友情连接,商业版本无此要求;
' ②、任何个人或组织不得在授权允许的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息;
' ③、科汛网络保留此软件的法律追究权利
'===================================================================================================================
Dim KSCls
Set KSCls = New System_WebUseInfo
KSCls.Execute()
Set KSCls = Nothing
Class System_WebUseInfo
Private KSCMS
Private Sub Class_Initialize()
Set KSCMS=New CommonCls
End Sub
Private Sub Class_Terminate()
Call KSCMS.CloseConn()
Set KSCMS=Nothing
End Sub
Function Execute()
If Not KSCMS.ReturnPowerResult(0, "KMST10007") Then '检查是否有空间查看的权限
Response.Write ("<script>parent.frames['BottomFrame'].location.href='javascript:history.back();';</script>")
Call KSCMS.ReturnErr(1, "")
Exit Function
Response.End
End If
Dim SysPath, FSO, F, FC, I, I2
Response.Write (" <html>")
Response.Write ("<title>空间查看</title>")
Response.Write ("<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>")
Response.Write ("<link href='../Inc/Admin_Style.CSS' rel='stylesheet' type='text/css'>")
Response.Write ("<BODY leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>")
Response.Write ("<table width='100%' border='0' cellspacing='0' cellpadding='0' oncontextmenu=""return false"">")
Response.Write (" <tr>")
Response.Write (" <td height='25' class='sort'>")
Response.Write (" <div align='center' ><strong>系统空间使用情况</strong></div></td>")
Response.Write (" </tr>")
Response.Write (" <tr>")
Response.Write (" <td valign='top'>")
Response.Write ("<br><br><table width=90% border=0 align='center' cellpadding=0 cellspacing=1 bgcolor='#CDCDCD'>")
SysPath = Server.MapPath("\") & "\"
Set FSO = Server.CreateObject("scripting.filesystemobject")
Set F = FSO.GetFolder(SysPath)
Set FC = F.SubFolders
I = 1
I2 = 1
For Each F In FC
Response.Write (" <tr>")
Response.Write (" <td height=25 bgcolor='#EEF8FE'><img src='../Images/Folder/folderclosed.gif' width='20' height='20' align='absmiddle'><b>" & F.name & "</b> 占用空间: <img src='../Images/pic/bar" & I2 & ".gif' width=" & Drawbar(F.name) & " height=10> ")
ShowSpaceInfo (F.name)
Response.Write (" </td>")
Response.Write (" </tr>")
I = I + 1
If I2 < 10 Then
I2 = I2 + 1
Else
I2 = 1
End If
Next
Response.Write (" <tr>")
Response.Write (" <td height='25' bgcolor='#EEF8FE'> 程序文件占用空间: <img src='../Images/pic/bar8.gif' width=" & Drawspecialbar & " height=10> ")
Showspecialspaceinfo ("Program")
Response.Write (" </td>")
Response.Write (" </tr>")
Response.Write (" </table>")
Response.Write (" <table width=90% border=0 align='center' cellpadding=3 cellspacing=1>")
Response.Write (" <tr>")
Response.Write (" <td height='28' align='right' bgcolor='#FFFFFF'><font color='#FF0066'><strong><font color='#006666'>系统占用空间总计:</font></strong>")
Showspecialspaceinfo ("All")
Response.Write (" </font> </td>")
Response.Write (" </tr>")
Response.Write (" </table></td>")
Response.Write (" </tr>")
Response.Write ("</table>")
Response.Write "<div style=""text-align:center;color:#003300"">-----------------------------------------------------------------------------------------------------------</div>"
Response.Write "<div style=""height:30px;text-align:center"">KeSion CMS V 2.2, Copyright (c) 2006-2008 <a href=http://www.kesion.com/ target=""_blank""><font color=#cc6600>KeSion.Com</font></a>. All Rights Reserved . </div>"
Response.Write ("</body>")
Response.Write ("</html>")
End Function
Sub ShowSpaceInfo(drvpath)
Dim FSO, d, size, showsize
Set FSO = Server.CreateObject(KSCMS.GetConfig("FsoObjName"))
Set d = FSO.GetFolder(Server.MapPath("/" & drvpath))
size = d.size
showsize = size & " Byte"
If size > 1024 Then
size = (size \ 1024)
showsize = size & " KB"
End If
If size > 1024 Then
size = (size / 1024)
showsize = size & " MB"
End If
If size > 1024 Then
size = (size / 1024)
showsize = size & " 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(KSCMS.GetConfig("FsoObjName"))
Set d = FSO.GetFolder(Server.MapPath("/"))
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 & " Byte"
If size > 1024 Then
size = (size \ 1024)
showsize = size & " KB"
End If
If size > 1024 Then
size = (size / 1024)
showsize = size & " MB"
End If
If size > 1024 Then
size = (size / 1024)
showsize = size & " 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(KSCMS.GetConfig("FsoObjName"))
Set d = FSO.GetFolder(Server.MapPath("/"))
totalsize = d.size
Set d = FSO.GetFolder(Server.MapPath("/" & drvpath))
size = d.size
barsize = CInt((size / totalsize) * 100)
Drawbar = barsize
End Function
Function Drawspecialbar()
Dim FSO, drvpathroot, d, FC, f1, size, totalsize, barsize
Set FSO = Server.CreateObject(KSCMS.GetConfig("FsoObjName"))
Set d = FSO.GetFolder(Server.MapPath("/"))
totalsize = d.size
Set FC = d.Files
For Each f1 In FC
size = size + f1.size
Next
barsize = CInt((size / totalsize) * 100)
Drawspecialbar = barsize
End Function
End Class
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?