📄 admin_space.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="../webconfig.asp"-->
<%
admintop()
Dim admin_flag
admin_flag=",45,"
if session("admin_name")="" or instr(","&session("flag")&",",admin_flag)=0 then
adminflag()
else
Dim okOS,okCpus,okCPU
'=====================绯荤粺绌洪棿鍙傛暟=========================
Sub ShowSpaceInfo(drvpath)
dim fso,d,size,showsize
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath(drvpath)
set d=fso.getfolder(drvpath)
size=d.size
showsize=size & " Byte"
if size>1024 then
size=(Size/1024)
showsize=formatnumber(size,2) & " KB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end if
response.write "" & showsize & ""
End Sub
Sub Showspecialspaceinfo(method)
dim fso,d,fc,f1,size,showsize,drvpath
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath("../default.asp")
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 & " Byte"
if size>1024 then
size=(Size/1024)
showsize=formatnumber(size,2) & " KB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " 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=server.mappath("../default.asp")
drvpathroot=left(drvpathroot,(instrrev(drvpathroot,"\")-1))
set d=fso.getfolder(drvpathroot)
totalsize=d.size
drvpath=server.mappath(drvpath)
if fso.FolderExists(drvpath) then
set d=fso.getfolder(drvpath)
size=d.size
End If
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=server.mappath("../default.asp")
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
Function GetAllSpace()
Dim fso,drvpath,d,size
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath("../default.asp")
drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
set d=fso.getfolder(drvpath)
size=d.size
set fso=nothing
GetAllSpace = size
End Function
Function GetFileSize(FileName)
Dim fso,drvpath,d,size,showsize
set fso=server.createobject("scripting.filesystemobject")
drvpath=server.mappath(FileName)
'drvpath=server.mappath("Admin_space.asp")
'drvpath=left(drvpath,(instrrev(drvpath,"\")-1))
set d=fso.getfile(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=formatnumber(size,2) & " MB"
end if
if size>1024 then
size=(size/1024)
showsize=formatnumber(size,2) & " GB"
end if
set fso=nothing
GetFileSize = showsize
End Function
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)
If 0 = Err Then IsObjInstalled = True
Set xTestObj = Nothing
Err = 0
End Function
Sub GetSysInfo()
On Error Resume Next
Dim WshShell,WshSysEnv
Set WshShell = Server.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
okOS = Cstr(WshSysEnv("OS"))
okCPUS = Cstr(WshSysEnv("NUMBER_OF_PROCESSORS"))
okCPU = Cstr(WshSysEnv("PROCESSOR_IDENTIFIER"))
If IsNull(okCPUS) Then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
ElseIf okCPUS="" Then
okCPUS = Request.ServerVariables("NUMBER_OF_PROCESSORS")
End If
If Request.ServerVariables("OS")="" Then okOS=okOS & "(鍙
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -