📄 webserver_info.asp
字号:
<!--#include file="chklogin.asp"-->
<%
call myobj.chkrq()
Response.Buffer = true
Dim ObjTotest(10,4)
ObjTotest(0,0) = "MSWC.AdRotator"
ObjTotest(1,0) = "MSWC.BrowserType"
ObjTotest(2,0) = "MSWC.NextLink"
ObjTotest(3,0) = "MSWC.Tools"
ObjTotest(4,0) = "MSWC.Status"
ObjTotest(5,0) = "MSWC.Counters"
ObjTotest(6,0) = "IISSample.ContentRotator"
ObjTotest(7,0) = "IISSample.PageCounter"
ObjTotest(8,0) = "MSWC.PermissionChecker"
ObjTotest(9,0) = "Scripting.FileSystemObject"
ObjTotest(9,1) = "(FSO 文本文件读写)"
ObjTotest(10,0) = "adodb.connection"
ObjTotest(10,1) = "(ADO 数据对象)"
public IsObj,VerObj,TestObj
public okOS,okCPUS,okCPU
dim i
for i=0 to 10
on error resume next
IsObj=false
VerObj=""
'dim TestObj
TestObj=""
set TestObj=server.CreateObject(ObjTotest(i,0))
If -2147221005 <> Err then
IsObj = True
VerObj = TestObj.version
if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
end if
ObjTotest(i,2)=IsObj
ObjTotest(i,3)=VerObj
next
function cdrivetype(tnum)
Select Case tnum
Case 0: cdrivetype = "未知"
Case 1: cdrivetype = "可移动磁盘"
Case 2: cdrivetype = "本地硬盘"
Case 3: cdrivetype = "网络磁盘"
Case 4: cdrivetype = "CD-ROM"
Case 5: cdrivetype = "RAM 磁盘"
End Select
end function
function cIsReady(trd)
Select Case trd
case true: cIsReady="<font class=fonts><b>√</b></font>"
case false: cIsReady="<font color='red'><b>×</b></font>"
End Select
end function
function cSize(tSize)
if tSize>=1073741824 then
cSize=int((tSize/1073741824)*1000)/1000 & " GB"
elseif tSize>=1048576 then
cSize=int((tSize/1048576)*1000)/1000 & " MB"
elseif tSize>=1024 then
cSize=int((tSize/1024)*1000)/1000 & " KB"
else
cSize=tSize & "B"
end if
end function
sub getsysinfo()
on error resume next
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 & "(可能是 Windows Server 2003)"
end sub
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>系统修复/清理</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
a:link {
color: #0000FF;
text-decoration: none;
}
a:visited {
color: #0000FF;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style></head>
<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<table width="550" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><a href="webonline_info.asp">网站在线用户信息</a> Web服务器检测 <a href="test.asp">Helix Server链接监控/记录</a></td>
</tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center" class="font1"><strong class="font1">WEB服务器环境检测</strong></td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25">服务器名:<%=Request.ServerVariables("SERVER_NAME")%></td>
</tr>
<tr>
<td height="25">服务器IP:<%=Request.ServerVariables("LOCAL_ADDR")%></td>
</tr>
<tr>
<td height="25">服务端口:<%=Request.ServerVariables("SERVER_PORT")%></td>
</tr>
<tr>
<td height="25">服务器语言:<%=request.servervariables("HTTP_ACCEPT_LANGUAGE")%></td>
</tr>
<tr>
<td height="25">协议版本:<%=Request.ServerVariables("SERVER_PROTOCOL")%></td>
</tr>
<tr>
<td height="25">服务器时间:<%=now()%></td>
</tr>
<tr>
<td height="25">Web服务器版本:<%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
</tr>
<tr>
<td height="25">CGI引擎版本:<%=Request.ServerVariables("GATEWAY_INTERFACE")%></td>
</tr>
<tr>
<td height="25">脚本引擎版本:<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
</tr>
<%getsysinfo()%>
<tr>
<td height="25">服务器CPU数量:<%=okCPUS%>个</td>
</tr>
<tr>
<td height="25">服务器CPU信息:<%=okCPU%></td>
</tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "exec sp_spaceused",conn,1,1
%>
<tr>
<td height="25">数据库名:<%=rs(0)%></td>
</tr>
<tr>
<td height="25">数据库大小:<%=rs(1)%></td>
</tr>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center" class="font1"><strong class="font1">组件支持列表</strong></td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" style="border-collapse: collapse">
<tr height=18 class=backs align=center>
<td width=350 bgcolor="#F7F7F7">组 件 名 称</td>
<td width=150 height="18" bgcolor="#F7F7F7">支持及版本</td>
</tr>
<%For i=0 to 10%>
<tr height="18" class=backq>
<td height="18" align=left bgcolor="#F7F7F7"> <%=ObjTotest(i,0)%><%=ObjTotest(i,1)%></td>
<td align=left bgcolor="#F7F7F7">
<%
If Not ObjTotest(i,2) Then
Response.Write "<span class='font3'>×</span>"
Else
Response.Write "√ <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
End If%></td>
</tr>
<%next%>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
<tr>
<td align="center" class="font1"><strong>磁盘信息检测</strong></td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
<tr>
<td align="center" bgcolor="#F7F7F7"><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<%
Response.Flush
if ObjTest("Scripting.FileSystemObject") then
set fsoobj=server.CreateObject("Scripting.FileSystemObject")
%>
<tr>
<td height="25" align="center" bgcolor="#F7F7F7">盘符和类型</td>
<td align="center" bgcolor="#F7F7F7">状态</td>
<td align="center" bgcolor="#F7F7F7">卷标</td>
<td align="center" bgcolor="#F7F7F7">文件系统</td>
<td align="center" bgcolor="#F7F7F7">可用空间</td>
<td align="center" bgcolor="#F7F7F7">总空间</td>
</tr>
<%
set drvObj=fsoobj.Drives
for each d in drvObj
%>
<tr>
<td height="25" bgcolor="#F7F7F7"> <%=cdrivetype(d.DriveType) & " " & d.DriveLetter%></td>
<%
if d.DriveLetter = "A" then '为防止影响服务器,不检查软驱
Response.Write "<td></td><td></td><td></td><td></td><td></td>"
else
%>
<td align="center" bgcolor="#F7F7F7"><%=cIsReady(d.isReady)%></td>
<td align="center" bgcolor="#F7F7F7"><%=d.VolumeName%></td>
<td align="center" bgcolor="#F7F7F7"><%=d.FileSystem%></td>
<td align="center" bgcolor="#F7F7F7"><%=cSize(d.FreeSpace)%></td>
<td align="center" bgcolor="#F7F7F7"><%=cSize(d.TotalSize)%></td>
<%end if%>
</tr>
<%next%>
<%
Response.Flush
set fsoobj=nothing
end if
%>
</table>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<table width="550" height="50" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -