discuz 2.0 통합 asp 시스템,사용자 추가 함수

2620 단어 discuzasp
함수 참고 가능:

<%
' ,
'username
'password
'groupid id, , id 17; , id 18; , id 10
'email,realname,mobile,phone , , ,
sub regbbsuser(username,password,groupid,email,realname,mobile,phone)
'
MM_conn_bbs_STRING="Driver={SQL Server};server=SURUI;uid=sa;pwd=sa;database=ntylswbbs;"
Set connbbs=Server.Createobject("ADODB.Connection")
connbbs.open MM_conn_bbs_STRING
'
checkuser="select * from dnt_users where username='"&username"'"
set checkuserrs=connbbs.execute(checkuser)
if not checkuserrs.eof then
haveuser="true"
else
haveuser="false"
end if
' ,
if haveuser="false" then

' dnt_users( )
sql1="select * from dnt_users"
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,connbbs,1,3
rs1.addnew
rs1("username")=username
rs1("password")=md532(password)
rs1("groupid")=groupid
rs1("email")=email
rs1.update
rs1.close

' id
sql2="select * from dnt_users where username='"&username"'"
set rs2=server.createobject("ADODB.Recordset")
rs2.open sql2,connbbs,1,1
useruid=rs2("uid")
rs2.close

' dnt_userfields( )
sql3="select * from dnt_userfields"
set rs3=server.createobject("ADODB.Recordset")
rs3.open sql3,connbbs,1,3
rs3.addnew
rs3("uid")=useruid
if realname<>"" then
rs3("realname")=realname
end if
if mobile<>"" then
rs3("mobile")=mobile
end if
if phone<>"" then
rs3("phone")=phone
end if
rs3.update
rs3.close

' dnt_statistics( )
sql4="select * from dnt_statistics"
set rs4=server.createobject("ADODB.Recordset")
rs4.open sql4,connbbs,1,3
rs4("totalusers")=rs4("totalusers")+1
rs4("lastusername")=username
rs4("lastuserid")=useruid
rs4.update
rs4.close

end if

connbbs.close

end sub


'
call regbbsuser("asp","123456789",18,"[email protected]"," ","13580351626","0207235803")
%>

좋은 웹페이지 즐겨찾기