My website and Forum have been integrated

Source: Internet
Author: User
Tags servervariables

Http://bbs.dvbbs.net/dispbbs.asp? Boardid = 134 & id = 1317828 & replyid = & Skin = 1
My website has been integrated with the Forum. It is okay to log on to or log out of the Forum. It is okay to register on the main site. The Forum can also be registered simultaneously. However, if you register on the Forum, the main site cannot be registered simultaneously, what is the reason? It's okay to log on to and log out of the Forum. The main site is also synchronized, that is, it cannot be registered in the Forum.

Integrated in Forum Reg. aspCode:

'-----------------------------------------------------------------
'System Consolidation
'-----------------------------------------------------------------
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

 

Code registered by the main site in the main site 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' get user information from XML
Dim sqlreg, rsreg, TRS, rndpassword, checknum
Rndpassword = getrndpassword (16)
Set rsreg = server. Createobject ("ADODB. recordset ")
Rsreg. Open "select * From Huiyuan", Conn, 1, 3
'Add a user to the database
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) = "female"
Elseif spe_items (congender, 1) = 1 then
Spe_items (congender, 1) = "male"
Else
Spe_items (congender, 1) = "confidential"
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)
'Determine whether a proxy is used
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") = "" 'ID card No.
Rsreg ("OICQ") = CSTR (spe_items (conqq, 1 ))
Rsreg ("je2") = my_je01 ''initial registration of a Member to reward the virtual currency amount
If regcon = "1" then' requires manual review of registered members
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) 'mobile phone number
Rsreg ("SJ") = now ()
Rsreg. Update
Rsreg. Close: Set rsreg = nothing
End sub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.