discuz 2.0 통합 asp 시스템,사용자 추가 함수
<% 
'      ,     
'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") 
%> 
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
discuz 함수 dgmdate텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.