相思资源网 Design By www.200059.com
<%@ Language=VBScript %>
<!-- METADATA TYPE="TypeLib" UUID="{01E88D14-F479-4CA5-9CA8-EBD2EED74C83}" -->
<HTML>
<BODY>
<H1 align=center>在线注册演示</H1>
<%
Dim sMessage
If Request.Form("cmdAddUser") <> "" Then
Dim oMDUser
Dim oMDUserInfo
Dim nResult
Dim sFullName
Dim sUserName
Dim sPassword
sFullName = Request.Form("txtFullName")
sUserName = Request.Form("txtUserName")
sPassword = Request.Form("txtPassword")
sDomain=Request.Form("txtDomain")
Set oMDUser = Server.CreateObject("MDUserCOM.MDUser")
Set oMDUserInfo = Server.CreateObject("MDUserCOM.MDUserInfo")
If oMDUser.LoadUserDll() = True Then
oMDUser.InitUserInfo(oMDUserInfo)
oMDUserInfo.FullName = sFullName
oMDUserInfo.MailBox = sUserName
oMDUserInfo.Password = sPassword
oMDUserInfo.Domain = sDomain
oMDUser.FilterUserInfo (oMDUserInfo)
nResult = oMDUser.AddUser (oMDUserInfo)
Select Case nResult
Case MDDLLERR_NOERROR
sMessage = "用户注册成功!"
Case MDDLLERR_USEREXISTS
sMessage = "用户名: '" & sUserName & "' 已存在!注册失败!"
case Else
sMessage = "注册用户失败 ! 错误代码:" & nResult
End Select
oMDUser.FreeUserDll
Else
sMessage = "错误: 不能加载DLL文件"
End If
Set oMDUser = Nothing
Set oMDUserInfo = Nothing
End If
%>
<P>新用户注册</P>
<FORM ACTION="adduser.asp" METHOD=post ID="Form1">
<TABLE ID="Table1">
<TR><TD>域名:</TD><TD><INPUT SIZE=50 NAME="txtDomain" ID="Text1" value="system.mail" readonly></TD></TR>
<TR><TD>全名:</TD><TD><INPUT SIZE=50 NAME="txtFullName" ID="Text2"></TD></TR>
<TR><TD>登录名:</TD><TD><INPUT SIZE=25 NAME="txtUserName" ID="Text3"></TD></TR>
<TR><TD>口令:</TD><TD><INPUT TYPE="password" SIZE=25 NAME="txtPassword" ID="Password1"></TD></TR>
<TR><TD></TD><TD><INPUT TYPE="submit" value="注册新用户" NAME="cmdAddUser" ID="Submit1"></TD></TR>
</TABLE>
</FORM>
<%
Response.Write(sMessage & "<BR>")
%>
</BODY>
</HTML>
<!-- METADATA TYPE="TypeLib" UUID="{01E88D14-F479-4CA5-9CA8-EBD2EED74C83}" -->
<HTML>
<BODY>
<H1 align=center>在线注册演示</H1>
<%
Dim sMessage
If Request.Form("cmdAddUser") <> "" Then
Dim oMDUser
Dim oMDUserInfo
Dim nResult
Dim sFullName
Dim sUserName
Dim sPassword
sFullName = Request.Form("txtFullName")
sUserName = Request.Form("txtUserName")
sPassword = Request.Form("txtPassword")
sDomain=Request.Form("txtDomain")
Set oMDUser = Server.CreateObject("MDUserCOM.MDUser")
Set oMDUserInfo = Server.CreateObject("MDUserCOM.MDUserInfo")
If oMDUser.LoadUserDll() = True Then
oMDUser.InitUserInfo(oMDUserInfo)
oMDUserInfo.FullName = sFullName
oMDUserInfo.MailBox = sUserName
oMDUserInfo.Password = sPassword
oMDUserInfo.Domain = sDomain
oMDUser.FilterUserInfo (oMDUserInfo)
nResult = oMDUser.AddUser (oMDUserInfo)
Select Case nResult
Case MDDLLERR_NOERROR
sMessage = "用户注册成功!"
Case MDDLLERR_USEREXISTS
sMessage = "用户名: '" & sUserName & "' 已存在!注册失败!"
case Else
sMessage = "注册用户失败 ! 错误代码:" & nResult
End Select
oMDUser.FreeUserDll
Else
sMessage = "错误: 不能加载DLL文件"
End If
Set oMDUser = Nothing
Set oMDUserInfo = Nothing
End If
%>
<P>新用户注册</P>
<FORM ACTION="adduser.asp" METHOD=post ID="Form1">
<TABLE ID="Table1">
<TR><TD>域名:</TD><TD><INPUT SIZE=50 NAME="txtDomain" ID="Text1" value="system.mail" readonly></TD></TR>
<TR><TD>全名:</TD><TD><INPUT SIZE=50 NAME="txtFullName" ID="Text2"></TD></TR>
<TR><TD>登录名:</TD><TD><INPUT SIZE=25 NAME="txtUserName" ID="Text3"></TD></TR>
<TR><TD>口令:</TD><TD><INPUT TYPE="password" SIZE=25 NAME="txtPassword" ID="Password1"></TD></TR>
<TR><TD></TD><TD><INPUT TYPE="submit" value="注册新用户" NAME="cmdAddUser" ID="Submit1"></TD></TR>
</TABLE>
</FORM>
<%
Response.Write(sMessage & "<BR>")
%>
</BODY>
</HTML>
相思资源网 Design By www.200059.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
相思资源网 Design By www.200059.com
暂无用ASP创建MDaemon用户的代码的评论...