我的网站和论坛整合好了

http://bbs.dvbbs.net/dispbbs.asp?BoardID=134&ID=1317828&replyID=&skin=1
我的网站和论坛整合好了,登陆注销什么的都没问题,在主站注册也没问题,论坛也能同步注册,但在论坛注册的话,主站不能同步注册,是什么原因啊,在论坛登陆和注销都没问题,主站也同步的,就是在论坛注册不行.

论坛reg.asp里整合的代码:

'-----------------------------------------------------------------
 '系统整合
 '-----------------------------------------------------------------
 Dim DvApi_Obj,DvApi_SaveCookie,SysKey
 If DvApi_Enable Then
  'SysKey = Md5(UserName&DvApi_SysKey,16)
  Set DvApi_Obj = New DvApi
   'DvApi_Obj.NodeValue "syskey",SysKey,0,False
   DvApi_Obj.NodeValue "action","reguser",0,False
   DvApi_Obj.NodeValue "username",UserName,1,False
   Md5OLD = 1
   SysKey = Md5(DvApi_Obj.XmlNode("username")&DvApi_SysKey,16)
   Md5OLD = 0
   DvApi_Obj.NodeValue "syskey",SysKey,0,False
   DvApi_Obj.NodeValue "password",pass2,0,False
   DvApi_Obj.NodeValue "email",UserEmail,1,False
   DvApi_Obj.NodeValue "question",quesion,1,False
   DvApi_Obj.NodeValue "answer",Request.form("answer"),1,False
   DvApi_Obj.NodeValue "truename",Request.Form("realname"),1,False
   DvApi_Obj.NodeValue "gender",sex,0,False
   DvApi_Obj.NodeValue "birthday",birthday,0,False
   DvApi_Obj.NodeValue "qq",Qq,1,False
   DvApi_Obj.NodeValue "msn",Request.form("msn"),1,False
   DvApi_Obj.NodeValue "mobile",Request.Form("userphone"),1,False
   DvApi_Obj.NodeValue "homepage",Request.form("homepage"),1,False
   DvApi_Obj.SendHttpData
   If DvApi_Obj.Status = "1" Then
    Response.redirect "showerr.asp?ErrCodes="& DvApi_Obj.Message &"&action=OtherErr"
    Exit Sub
   Else
    DvApi_SaveCookie = DvApi_Obj.SetCookie(SysKey,UserName,Password,Request("usercookies"))
   End If
  Set DvApi_Obj = Nothing
 End If

 

主站api/api_response里主站注册的代码

 

Sub createUser
    sPE_Items(conEmail,1) = getNodeText(sPE_Items(conEmail,0))
    If CheckUserName(sPE_Items(conUsername,1)) = False Or CheckUserEmail(sPE_Items(conEmail,1)) = False Then
        Exit Sub
    End If
    Dim rsConfig,PresentExp,PresentMoney,PresentPoint,PresentValidNum,PresentValidUnit,Regip
    prepareData True '从XML中获取用户信息
    Dim sqlReg, rsReg, trs, RndPassword,CheckNum
    RndPassword = GetRndPassword(16)
 set rsReg=server.createobject("adodb.recordset")
 rsReg.open "select * from huiyuan",conn,1,3
 '添加一个用户到数据库
 rsReg.addnew
 rsReg("huiyuan")= sPE_Items(conUsername,1)
 rsReg("password")=MD5(sPE_Items(conPassword,1), 16)
 rsReg("name")=sPE_Items(conTruename,1)
 rsReg("UserQuestion")=sPE_Items(conQuestion,1)
 rsReg("UserAnswer")=md5(sPE_Items(conAnswer,1))
 If sPE_Items(conGender,1) = 0 Then
  sPE_Items(conGender,1) = "女"
 ElseIf sPE_Items(conGender,1) = 1 Then
  sPE_Items(conGender,1) = "男"
 Else
  sPE_Items(conGender,1) = "保密"
 End If
 rsReg("xb")=sPE_Items(conGender,1)
 rsReg("dz")=cstr(sPE_Items(conProvince,1)) & cstr(sPE_Items(conCity,1))
 rsReg("dizhi1")=sPE_Items(conAddress,1)
 '判断是否使用了代理
 if Request.ServerVariables("HTTP_X_FORWARDED_FOR") = ""  then
  Regip=Request.ServerVariables("REMOTE_ADDR")
 else
  Regip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
 end if
 rsReg("ip") = Regip 
 rsReg("ip2") = Regip
 rsReg("idcard") = "" '身份证号
 rsReg("oicq") = cstr(sPE_Items(conQQ,1))
 rsReg("je2")=my_je01 ''会员初始注册奖励虚拟货币金额
 if regcon="1" then '需要对注册会员进行人工审核
 rsReg("zt")=0
 else
 rsReg("zt")=1
 end if
 rsReg("yb")=sPE_Items(conZipcode,1)
 rsReg("tel")=sPE_Items(conTelephone,1)
 rsReg("mail")=sPE_Items(conEmail,1)
 rsReg("shouji")=sPE_Items(conMobile,1) '手机号
 rsReg("sj")=now()
 rsReg.update
 rsReg.close:set rsReg=nothing
End Sub

posted on 2007-02-03 07:53  cy163  阅读(1683)  评论(1编辑  收藏  举报

导航