<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../connadmin.asp"-->
<%	
Function GetTotalSize(GetLocal,GetType)
	Dim FSO
	Set FSO=Server.CreateObject("Scripting.FileSystemObject")
	IF Err<>0 Then
		Err.Clear
		GetTotalSize="服务器关闭FSO，查看占用空间失败"
	Else
		Dim SiteFolder
		IF GetType="Folder" Then
			Set SiteFolder=FSO.GetFolder(GetLocal) 
		Else
			Set SiteFolder=FSO.GetFile(GetLocal) 
		End IF
		GetTotalSize=SiteFolder.Size
		IF GetTotalSize>1024*1024 Then
		GetTotalSize=GetTotalSize/1024/1024
		IF inStr(GetTotalSize,".") Then GetTotalSize = Left(GetTotalSize,inStr(GetTotalSize,".")+2)
			GetTotalSize=GetTotalSize&" MB"
		Else
			GetTotalSize=Fix(GetTotalSize/1024)&" KB"
		End IF
		Set SiteFolder=Nothing
	End IF
	Set FSO=Nothing
End Function

%>

<%
	Dim theInstalledObjects(17)
    theInstalledObjects(0) = "MSWC.AdRotator"
    theInstalledObjects(1) = "MSWC.BrowserType"
    theInstalledObjects(2) = "MSWC.NextLink"
    theInstalledObjects(3) = "MSWC.Tools"
    theInstalledObjects(4) = "MSWC.Status"
    theInstalledObjects(5) = "MSWC.Counters"
    theInstalledObjects(6) = "IISSample.ContentRotator"
    theInstalledObjects(7) = "IISSample.PageCounter"
    theInstalledObjects(8) = "MSWC.PermissionChecker"
    theInstalledObjects(9) = "Scripting.FileSystemObject"
    theInstalledObjects(10) = "adodb.connection"
    
    theInstalledObjects(11) = "SoftArtisans.FileUp"
    theInstalledObjects(12) = "SoftArtisans.FileManager"
    theInstalledObjects(13) = "JMail.SMTPMail"
    theInstalledObjects(14) = "CDONTS.NewMail"
    theInstalledObjects(15) = "Persits.MailSender"
    theInstalledObjects(16) = "LyfUpload.UploadFile"
    theInstalledObjects(17) = "Persits.Upload.1"

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
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" href="../img/css.css">
<title><%=site_name%></title>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style></head>

<body>
<table class="border" width="98%" border="0" align="center" cellpadding="1" cellspacing="0">
  <tr> 
    <td height="553" align="center" valign="top" class="bg_low"> 
      <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" valign="middle" class="bgtop"><font color="#FFFFFF"><b>服务器基本性能</b></font> 
          </td>
        </tr>
      </table>  
      <table width="99%" border="1" align="center" cellpadding="2" cellspacing="1" bordercolor="#ABCEDD">
        <tr> </tr>
        <tr> 
          <td width="50%"   height="23">服务器类型：<%=Request.ServerVariables("OS")%>(IP:<%=Request.ServerVariables("LOCAL_ADDR")%>)</td>
          <td width="50%">脚本解释引擎：<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
        </tr>
        <tr> 
          <td width="50%"  height="23">站点物理路径：<%=request.ServerVariables("APPL_PHYSICAL_PATH")%></td>
          <td width="50%">数据库占用空间总计： 
            <%=GetTotalSize(Server.Mappath(mydata_path),"File")%>
          </td>
        </tr>
        <tr> 
          <td width="50%"  height="23">FSO文本读写： 
            <%If Not IsObjInstalled(theInstalledObjects(9)) Then%>
            <font color="#FF0000"><b>×</b></font> 
            <%else%>
            <b>√</b> 
            <%end if%>
          </td>
          <td width="50%">数据库使用： 
            <%If Not IsObjInstalled(theInstalledObjects(10)) Then%>
            <font color="#FF0000"><b>×</b></font> 
            <%else%>
            <b>√</b> 
            <%end if%>
          </td>
        </tr>
        <tr> 
          <td width="50%"  height="23">Jmail组件支持： 
            <%If Not IsObjInstalled(theInstalledObjects(13)) Then%>
            <font color="#FF0000"><b>×</b></font> 
            <%else%>
            <b>√</b> 
            <%end if%>
          </td>
          <td width="50%">CDONTS组件支持： 
            <%If Not IsObjInstalled(theInstalledObjects(14)) Then%>
            <font color="#FF0000"><b>×</b></font> 
            <%else%>
            <b>√</b> 
            <%end if%>
          </td>
        </tr>
      </table>
      </td>
  </tr>
</table>
</body>
</html>
<%conn.close
set conn=nothing%>