⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_serverinfo.asp

📁 本系统是一套开源WEB的网站管理系统
💻 ASP
字号:
<%
'==============================================================
'程序名称:茂盛网站管理系统(Maoin CSM)
'当前版本:Maosin CMS Version 1.1   Powered by maosin.com
'程序作者:阿茂(李胜茂)
'网站地址:www.maosin.com   www.maosin.net
'      QQ:57861417  
'电子邮箱:maosin@163.com  maosin@maosin.com
'--------------------------------------------------------------
'Copyright (C) 2006 maosin.com All Rights Reserved.
'免费版本请在程序首页保留(Powered by:Maosin CMS)版权链接信息;
'您可以对此版本进行修改,美化,但请保留此ASP文件内的版权信息;
'茂盛设计网保留此软件的法律追究权利
'==============================================================
Sub checkServerObject()
Call serverInfo()
Call table(5)
dim objectTest(18,2)
objectTest(0,0)="MSWC.AdRotator"
objectTest(0,1)="[随机广告组件]"
objectTest(1,0)="MSWC.BrowserType"
objectTest(1,1)="[浏览器检测组件]"
objectTest(2,0)="MSWC.NewLink"
objectTest(2,1)="[链接组件]"
objectTest(3,0)="MSWC.PermissionChecker"
objectTest(3,1)="[访问权限检测组件]"
objectTest(4,0)="MSWC.Counters"
objectTest(4,1)="[计数器组件]"
objectTest(5,0)="IISSample.PageCounter"
objectTest(6,0)="WScript.Shell"
objectTest(6,1)="[Win Shell远行]"
objectTest(7,0)="Scripting.FileSystemObject"
objectTest(7,1)="[FSO文件存取组件(常用)]"
objectTest(8,0)="ADODB.Stream"
objectTest(8,1)="[无组件上传(常用)]"
objectTest(9,0)="ADODB.Connection"
objectTest(9,1)="[ADO数据组件]"
objectTest(10,0)="Microsoft.XMLDOM"
objectTest(11,0)="CDONTS.Newmail"
objectTest(11,1)="[虚拟SMTP发信组件]"
objectTest(12,0)="CDONTS.Session"
objectTest(12,1)="[虚拟SMTP收信组件]"
objectTest(13,0)="Persits.MailSender"
objectTest(13,1)="[ASPemail 发信]"
objectTest(14,0)="JMail.SmtpMail"
objectTest(14,1)="[Dimac JMail 邮件收发组件]"
objectTest(15,0)="SoftArtisans.ImageGen"
objectTest(15,1)="[SA-ImgWriter生成预览图片]"
objectTest(16,0)="W3Image.Image"
objectTest(16,1)="[Dimac 的图像读写组件]"
objectTest(17,0)="CreatePreviewImage.cGvbox"
objectTest(17,1)="[CreatePreviewImage生成预览图片]"
objectTest(18,0)="Persits.Jpeg"
objectTest(18,1)="[AspJpeg生成预览图片]"
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
  <tr class="td_bgcolor"> 
    <td height="24" colspan="2" valign="middle" align="center" class="td_titleT"> 服务器组件支持检测</td>
  </tr>
  <tr valign="middle" align="center" class="td_topT"> 
    <td width="70%" height="20">组件名称</td>
    <td width="30%">支持及版本</td>
  </tr>
<%for i=0 to 17%>
  <tr valign="middle" class="td_bgcolor" onmouseover="mouseOver(this)" onmouseout="mouseOut(this)"> 
    <td height="20">&nbsp;<%=objectTest(i,0)&"<font color='#8C8C8C'>"&objectTest(i,1)&"</font>"%>;</td>
    <td align="center">&nbsp;<%Call isServerObject(objectTest(i,0))%></td>
  </tr>
<%next%>
  <tr valign="middle" class="td_bottomT">
  <form name="checkform" method="post" action="admin_data.asp?action=checkServerObject">
   	<td height="30" colspan="2">&nbsp;
 <%if request.form("queryDll")<>"" then
  	myDll=Request.form("checkdll")
	if isInstallObject(myDll) then
	Response.write("<font color=#00FF00>恭喜,服务器支持"&myDll&"组件!</font><br>")
	else
	Response.write("<font color=#ff0000>很遗憾,服务器不支持些"&myDll&"组件!</font><br>")
	end if
  end if%>
	&nbsp;&nbsp;其它组件支持情况查询:
	<input type="text" name="checkdll" size="25">&nbsp;
	<input type="submit" name="queryDll" value="开始查询">
	</td>
   </form>
  </tr>
</table>
<%
End Sub
Sub serverInfo()
Dim okOS,okCUPS
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 & "(可能是 Windows Server 2003)"
%>
<table width="100%" border="0" cellpadding="3" cellspacing="1" class="text table_border mainTable">
  <tr> 
    <td height="24" colspan="4" align="center" valign="middle" class="td_titleT">服务器信息</td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;服务器名</td>
    <td width="30%">&nbsp;<%=Request.ServerVariables("SERVER_NAME")%></td>
    <td width="20%">&nbsp;服务器IP地址</td>
    <td width="30%">&nbsp;<%=Request.ServerVariables("LOCAL_ADDR")%></td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;ASP脚本解释引擎</td>
    <td width="30%">&nbsp;<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td>
    <td width="20%">&nbsp;IIS 版本</td>
    <td width="30%">&nbsp;<%=Request.ServerVariables("SERVER_SOFTWARE")%></td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;服务器操作系统</td>
    <td width="30%">&nbsp;<%=okOs%></td>
    <td width="20%">&nbsp;服务器CPU数量</td>
    <td width="30%">&nbsp;<font color="#ff0000"><%=okCPUS%></font>个</td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;服务器application数量</td>
    <td width="30%">&nbsp;<font color="#ff0000"><%=application.Contents.count%></font>个</td>
    <td width="20%">&nbsp;服务器session数量</td>
    <td width="30%">&nbsp;<font color="#ff0000"><%=session.Contents.count%></font>个</td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;服务器当前时间</td>
    <td width="30%">&nbsp;<%=now%></td>
    <td width="20%">&nbsp;脚本连接超时时间</td>
    <td width="30%">&nbsp;<%=server.scripttimeout%></td>
  </tr>
  <tr valign="middle" class="td_bgcolor"> 
    <td width="20%" height="20">&nbsp;当前脚本路径</td>
    <td width="30%">&nbsp;<%=Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))%></td>
    <td width="20%">&nbsp;服务器HTTP端口号</td>
    <td width="30%">&nbsp;<%=Request.ServerVariables("SERVER_PORT")%></td>
  </tr>
</table>
<%
End Sub
Sub isServerObject(StrObj)
	On error Resume Next
	Set isobjtest=Server.CreateObject(StrObj)
	if err=0 then
		Response.Write("<font color=#000000>√</font>&nbsp;&nbsp;")
		Response.write(isobjtest.version)
	else 
		Response.Write "<font color=#ff0000>×</font>&nbsp;&nbsp;"
	end if
	Set isobjtest=nothing
	err=0
End Sub
Function isInstallObject(strDll)
	On error Resume Next
	Set isobjtest=Server.CreateObject(strDll)
	Dim isInstall
	isInstall=true

	if err=0 then
		isInstall=True
	else
		isInstall=False
	end if
		isInstallObject=isInstall
	Set isobjtest=Nothing
	err=0
End Function
'========================================================
'MaoSin CMS 1.1      Power by maosin.com
'Email: maosin@163.com , maosin@maosin.com
'Web: http://www.maosin.com  http://www.maosin.net
'Copyright (C) 2006 maosin.com All Rights Reserved.
'========================================================
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -