当前位置: 首页 > 图文教程 > 网络编程 > ASP > 取得服务器上用户组列表的脚本之asp版

ASP
深入讲解 ASP+ 验证(一)
深入讲解 ASP+ 验证(二)
深入讲解 ASP+ 验证(三)
深入讲解 ASP+ 验证(四)
通过事例学习.net的WebForms技术(一)
通过事例学习.net的WebForms技术(二)
StripNonNumeric函数源程序
通过事例学习.net的WebForms技术(三)
通过事例学习.net的WebForms技术(四)
将HTML表单数据存储为XML格式 - 1
将HTML表单数据存储为XML格式 - 2
将HTML表单数据存储为XML格式 - 3
asp生日自动提醒小程式
WEB页面简单进度记时器
在主页中编制音频播放器
图片数据的存和取示例
用ASPMail组件实现E_mail自动反馈
读取目录下的所有文件(源码)
制作我们自己的Ebay(拍卖系统)(1)
制作我们自己的Ebay(拍卖系统)(2)

ASP 中的 取得服务器上用户组列表的脚本之asp版


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 34 ::
收藏到网摘: n/a

 

将下文存为任一asp文件如lg.asp即可.
正文从***下开始
**************************************************
<form method="POST">
    请输入域名:<input type="text" name="DomainName" size="20">
    <input type="submit" value="提交" name="B1">
    <input type="reset" value="全部重写" name="B2">
</form>
<%
if isempty(request("domainname")) or trim(request("domainname"))="" then
   response.end
end if
DomainString =request("domainname")

on error resume next
Set DomainObj = GetObject("WinNT://" & DomainString)
tmp= DomainObj.MinPasswordLength    'verify this is a valid domain
if err<>0 then
   response.write "<Font Color=Red>连接域"&domainstring&"出错!</Font><br>"
   response.end
end if
%>
<Table border=1 cellpadding=4 width=90% bgcolor=ffffcc>
<TR Align=Center>
<TD valign=top><B><Font Size=5 Color=Blue>域<%=DomainString%>内的所有组的列表</B></Font>
</td>
</tr>
</table>
<Table border=0 cellpadding=5><TR><TD><B><Font Size=3>组名</Font></B></TD><TD><B><Font Size=3>描

述</Font></B></TD></TR>
<%
DomainObj.Filter = Array("group")
For Each GroupObj In DomainObj
    If GroupObj.Class = "Group" Then
       strInfo=strInfo&"<TR><TD><B><Font Size=3>"&GroupObj.Name&"</Font></B></TD><TD><B><Font

Size=3>"&GroupObj.Description&"</Font></B></TD></TR>"
    End If
Next
set DomainObj = Nothing
set GroupObj = Nothing
strInfo=strInfo & "</Table>"
response.write strInfo & "<br>"
response.write "<font size=3><I>" & Now & "</I></Font>"
%>