欢迎光临
我们一直在努力

用ASP检查MDaemon系统管理员登录-ASP教程,邮件相关

建站超值云服务器,限时71元/月

//////////////////////////////////////////////////////////////////////////////

// [mdaemon] 用asp检查mdaemon系统管理员登录

// 原创作者: 贾俊 (jaron)

// 网址: http://www.jiangdu.net ;

// 邮件: jaron@jdinfo.net

// 首次发表于江都资讯网,2003-01-12

//////////////////////////////////////////////////////////////////////////////

<%

set omduser = server.createobject("mdusercom.mduser")

set omduserinfo = server.createobject("mdusercom.mduserinfo")

omduser.loaduserdll

cappdir = omduser.getappdir

dim adomains()

dim itotalaccounts

dim itotaldomains

itotaldomains = omduser.getdomaincount

itotalaccounts = omduser.usercount

redim adomains(0,itotaldomains)

omduser.getdomainnames(adomains)

if request.form("cmdlogin") = "add" then

slogin = request.form("txtusername")

spassword = request.form("txtpassword")

iuserid = omduser.getbyemail(slogin)

if iuserid = -1 then

smessage = "无此用户"

end if

if iuserid <> 1 then

smessage = "权限不够,请用系统管理员登录"

else

if spassword = omduser.getpassword(iuserid) then

session("mdusers") = slogin

omduser.getfree iuserid

smessage = "正确登录"

else

smessage = "口令错误"

end if

end if

end if

%>

管理员登录示例!

<form action="login.asp" method=post id="form1">

<table id="table1">

<tr><td>domain:</td><td><input size=50 name="txtdomain" id="text1"></td></tr>

<tr><td>user name:</td><td><input size=25 name="txtusername" id="text3"></td></tr>

<tr><td>password:</td><td><input type="password" size=25 name="txtpassword" id="password1"></td></tr>

<tr><td></td><td><input type="submit" value="add" name="cmdlogin" id="submit1"></td></tr>

</table>

<%=smessage%>

</form>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用ASP检查MDaemon系统管理员登录-ASP教程,邮件相关
分享到: 更多 (0)

相关推荐

  • 暂无文章