<!--#include file="../include/hf_conn.asp"-->
<!--#include file="checkadmin.asp"-->
<%
'阿江探针版权所有
Response.Buffer = true
Dim ObjTotest(26,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 数据对象)"
ObjTotest(11,0) = "SoftArtisans.FileUp"
	ObjTotest(11,1) = "(SA-FileUp 文件上传)"
ObjTotest(12,0) = "SoftArtisans.FileManager"
	ObjTotest(12,1) = "(SoftArtisans 文件管理)"
ObjTotest(13,0) = "LyfUpload.UploadFile"
	ObjTotest(13,1) = "(刘云峰的文件上传组件)"
ObjTotest(14,0) = "Persits.Upload.1"
	ObjTotest(14,1) = "(ASPUpload 文件上传)"
ObjTotest(15,0) = "w3.upload"
	ObjTotest(15,1) = "(Dimac 文件上传)"
ObjTotest(16,0) = "JMail.SmtpMail"
	ObjTotest(16,1) = "(Dimac JMail 邮件收发)"
ObjTotest(17,0) = "CDONTS.NewMail"
	ObjTotest(17,1) = "(虚拟 SMTP 发信)"
ObjTotest(18,0) = "Persits.MailSender"
	ObjTotest(18,1) = "(ASPemail 发信)"
ObjTotest(19,0) = "SMTPsvg.Mailer"
	ObjTotest(19,1) = "(ASPmail 发信)"
ObjTotest(20,0) = "DkQmail.Qmail"
	ObjTotest(20,1) = "(dkQmail 发信)"
ObjTotest(21,0) = "Geocel.Mailer"
	ObjTotest(21,1) = "(Geocel 发信)"
ObjTotest(22,0) = "IISmail.Iismail.1"
	ObjTotest(22,1) = "(IISmail 发信)"
ObjTotest(23,0) = "SmtpMail.SmtpMail.1"
	ObjTotest(23,1) = "(SmtpMail 发信)"
	
ObjTotest(24,0) = "SoftArtisans.ImageGen"
	ObjTotest(24,1) = "(SA 的图像读写组件)"
ObjTotest(25,0) = "W3Image.Image"
	ObjTotest(25,1) = "(Dimac 的图像读写组件)"

public IsObj,VerObj,TestObj
public okOS,okCPUS,okCPU

'检查预查组件支持情况及版本
dim i
for i=0 to 25
	on error resume next
	IsObj=false
	VerObj=""
	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
'检查组件是否被支持及组件版本的子程序
sub ObjTest(strObj)
	on error resume next
	IsObj=false
	VerObj=""
	TestObj=""
	set TestObj=server.CreateObject (strObj)
	If -2147221005 <> Err then
		IsObj = True
		VerObj = TestObj.version
		if VerObj="" or isnull(VerObj) then VerObj=TestObj.about
	end if	
End sub
%>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="manage.css" type=text/css rel=stylesheet>
<TITLE>服务器和组件信息</TITLE>
</HEAD>
<BODY background="../images/admin/back.gif">


<table border=0 width="98%" cellspacing=0 cellpadding=0>
<tr height=18 class=backs align=center><td colspan=2 height=18 CLASS=TD>服务器的有关参数</td></tr>
<tr><td>
	<table border=0 width="98%" cellspacing=1 cellpadding=0>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器名</td><td width=60%>&nbsp;<%=Request.ServerVariables("SERVER_NAME")%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器IP</td><td>&nbsp;<%=Request.ServerVariables("LOCAL_ADDR")%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器端口</td><td>&nbsp;<%=Request.ServerVariables("SERVER_PORT")%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器时间</td><td>&nbsp;<%=now%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;IIS版本</td><td>&nbsp;<%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;脚本超时时间</td><td>&nbsp;<%=Server.ScriptTimeout%> 秒</td>       
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;Session过期时间</td><td>&nbsp;<%=session.Timeout%> 分钟</td>       
	  </tr> 
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器解译引擎</td><td>&nbsp;<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
	  </tr>
	<%getsysinfo()  '获得服务器数据%>

	  <tr CLASS=TR height=18>
		<td align=left>
          <p align="left">&nbsp;服务器CPU数量</p>
        </td>
<center>
<td>&nbsp;<%=okCPUS%> 个</td>       
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器CPU详情</td><td>&nbsp;<%=okCPU%></td>
	  </tr>
	  <tr CLASS=TR height=18>
		<td align=left>&nbsp;服务器操作系统</td><td>&nbsp;<%=okOS%></td>
	  </tr>
	</table>
    </center>
</td></tr>
</table>

<%
Response.Flush
if ObjTest("Scripting.FileSystemObject") then
set fsoobj=server.CreateObject("Scripting.FileSystemObject")
Response.Flush
	dPath = server.MapPath("../")
	set dDir = fsoObj.GetFolder(dPath)
	dpicPath = server.MapPath("../pic/")
	set dpicDir = fsoObj.GetFolder(dpicPath)
ddb=split(db,"/")
n=ubound(ddb)
db=replace(db,ddb(n),"")
	dbPath = server.MapPath(DB)
	set dbDir = fsoObj.GetFolder(dbPath)
	set dDrive = fsoObj.GetDrive(dDir.Drive)
%>



<table border=0 width="98%" cellspacing=0 cellpadding=0>
<tr height=18 class=backs align=center><td colspan=2 height=18 CLASS=TD>网站空间的使用情况</td></tr>
<tr><td>
<table border=0 width="98%" cellspacing=1 cellpadding=0>
<tr CLASS=TR><td height=18>&nbsp;物理路径</td><td width=60%>&nbsp;<%=dPath%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;已用空间</td><td>&nbsp;<%=cSize(dDir.Size)%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;图片占用空间</td><td>&nbsp;<%=cSize(dpicDir.Size)%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;数据库占用空间</td><td>&nbsp;<%=cSize(dbDir.Size)%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;可用空间</td><td>&nbsp;<%=cSize(dDrive.AvailableSpace)%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;文件夹数目</td><td>&nbsp;<%=dDir.SubFolders.Count%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;文件总数目</td><td>&nbsp;<%=dDir.Files.Count%></td></tr>
<tr CLASS=TR><td height=18>&nbsp;创建时间</td><td>&nbsp;<%=dDir.DateCreated%></td></tr>
</table>
</td></tr>

</table>

<table border=0 width="98%" cellspacing=0 cellpadding=0>
<tr height=18 class=backs align=center><td colspan=2 height=18 CLASS=TD>IIS自带ASP组件</td></tr>
	<%For i=0 to 10%>
	<tr height="18">
		<td align=left>&nbsp;<%=ObjTotest(i,0) & "<font color=#888888>&nbsp;" & ObjTotest(i,1)%></font></td>
		<td align=left  width=30%>&nbsp;<%
		If Not ObjTotest(i,2) Then 
			Response.Write "<font color=red><b>×</b></font>"
		Else
			Response.Write "<font><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
		End If%></td>
	</tr>
	<%next%>
</table>


<table border=0 width="98%" cellspacing=0 cellpadding=0>
<tr height=18 class=backs align=center><td colspan=2 height=18 CLASS=TD>常见的文件上传和管理组件</td></tr>

	<%For i=11 to 15%>
	<tr height="18" >
		<td align=left>&nbsp;<%=ObjTotest(i,0) & "<font color=#888888>&nbsp;" & ObjTotest(i,1)%></font></td>
		<td align=left  width=30%>&nbsp;<%
		If Not ObjTotest(i,2) Then 
			Response.Write "<font color=red><b>×</b></font>"
		Else
			Response.Write "<font ><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
		End If%></td>
	</tr>
	<%next%>
</table>


<table border=0 width="98%" cellspacing=0 cellpadding=0>
<tr height=18 class=backs align=center><td colspan=2 height=18 CLASS=TD>常见的收发邮件组件</td></tr>
	<%For i=16 to 23%>
	<tr height="18" >
		<td align=left>&nbsp;<%=ObjTotest(i,0) & "<font color=#888888>&nbsp;" & ObjTotest(i,1)%></font></td>
		<td align=left width=30%>&nbsp;<%
		If Not ObjTotest(i,2) Then 
			Response.Write "<font color=red><b>×</b></font>"
		Else
			Response.Write "<font ><b>√</b></font> <a title='" & ObjTotest(i,3) & "'>" & left(ObjTotest(i,3),11) & "</a>"
		End If%></td>
	</tr>
	<%next%>
</table>


<%
end if


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
%>
