简单的服务器组件支持情况查询
作者:cmscn 日期:2009-08-13
<table cellspacing=1 cellpadding=1 border=1 width=700 align=center bordercolor=#eeeeee >
<tr>
<td colspan="2" height="25" align=center>组件支持情况</td>
</tr>
<%
Dim theInstalledObjects(16)
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) = "MSWC.PermissionChecker"
theInstalledObjects(7) = "Scripting.FileSystemObject"
theInstalledObjects(8) = "adodb.connection"
theInstalledObjects(9) = "SoftArtisans.FileUp"
theInstalledObjects(10) = "SoftArtisans.FileManager"
theInstalledObjects(11) = "JMail.Message"
theInstalledObjects(12) = "CDONTS.NewMail"
theInstalledObjects(13) = "Persits.MailSender"
theInstalledObjects(14) = "LyfUpload.UploadFile"
theInstalledObjects(15) = "Persits.Upload.1"
theInstalledObjects(16) = "w3.upload"
For i=0 to 16
Response.Write "<TR class=lanyuds><TD width='57%'> " & theInstalledObjects(i) & "<font color=888888> "
select case i
case 7
Response.Write "(FSO 文本文件读写)"
case 8
Response.Write "(ACCESS 数据库)"
case 9
Response.Write "(SA-FileUp 文件上传)"
case 10
Response.Write "(SA-FM 文件管理)"
case 11
Response.Write "(JMail 邮件发送)"
case 12
Response.Write "(WIN虚拟SMTP 发信)"
case 13
Response.Write "(ASPEmail 邮件发送)"
case 14
Response.Write "(LyfUpload 文件上传)"
case 15
Response.Write "(ASPUpload 文件上传)"
case 16
Response.Write "(w3 upload 文件上传)"
end select
Response.Write "</font></td><td height=25 width='41%' align=center>"
If Not IsObjInstalled(theInstalledObjects(i)) Then
Response.Write "<font color=red><b>×</b></font>"
Else
Response.Write "<b>√</b> " & getver(theInstalledObjects(i)) & ""
End If
Response.Write "</td></TR>" & vbCrLf
Next
%>
</table>
<%
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
''''''''''''''''''''''''''''''
Function getver(Classstr)
On Error Resume Next
getver=""
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(Classstr)
If 0 = Err Then getver=xtestobj.version
Set xTestObj = Nothing
Err = 0
End Function
%>
评论: 0 | 引用: 0 | 查看次数: 404
发表评论