Discuz! NT Forum integration ASP program Forum

Source: Internet
Author: User

CopyCode The Code is as follows: <% @ Language = "VBScript" codePage = "65001" %>
<! -- # Include virtual = "/INC/md5.asp" -->
<! -- # Include virtual = "/INC/Conn. asp" -->

<%
'16 MD5 1234656789 323b453885f5181f
'Discuz 25f9e794323b453885f5181f1b624d0b
'Response. Write (MD5 ("123456789 "))
'Response. Write ("Cookie:" & request. Cookies ("DNT") ("userid "))
Dim Username: username = request. Form ("username ")
Dim password: Password = request. Form ("password ")

Set objrs = conn.exe cute ("select * From member_user where username = '" & username "'")
If not objrs. EOF then
Response. Write (objrs ("userpassword "))

Set conn2 = server. Createobject ("ADODB. Connection ")
Conn2.open "provider = sqloledb; user id = sa; Password = 123456; initial catalog = DNT; Data Source = mww \ sqlexpress ;"

Set objrs2 = conn2.execute ("select * from [dnt_users] Where username = '" & username "'")
If not objrs2.eof then
Response. Write ("<br/>" & objrs2 ("uid") "<br/> ")
Response. Write (objrs2 ("password") "<br/> ")
Response. Write (objrs2 ("TPP") "<br/> ")
Response. Write (objrs2 ("PPP") "<br/> ")
Response. Write (objrs2 ("pmsound") "<br/> ")
Response. Write (objrs2 ("invisible") "<br/> ")
Response. Write (objrs2 ("sigstatus") "<br/> ")

Benchmark & TPP = 0 & PPP = 0 & pmsound = 1 & invisible = 0 & Referer = index. aspx & sigstatus = 1 & expires =-1
'Generate cookie
Response. Cookies ("DNT") ("userid") = objrs2 ("uid ")
Response. Cookies ("DNT") ("password") = objrs2 ("password ")
Response. Cookies ("DNT") ("TPP") = objrs2 ("TPP ")
Response. Cookies ("DNT") ("PPP") = objrs2 ("PPP ")
Response. Cookies ("DNT") ("pmsound") = objrs2 ("pmsound ")
Response. Cookies ("DNT") ("invisible") = objrs2 ("invisible ")
Response. Cookies ("DNT") ("Referer") = "index. aspx"
Response. Cookies ("DNT") ("sigstatus") = objrs2 ("sigstatus ")
'Response. Cookies ("DNT") ("expires") = expires
'If expires <> 0 then
'Response. Cookies ("DNT"). expires = dateadd ("N", expires, now ())
'End if
Response. Cookies ("DNT"). Domain = ".ejia.com" 'are modified to your domain name. Note the preceding. (Click)

Response. Cookies ("DNT"). Secure = false

End if
Objrs2.close
Set objrs2 = nothing
Conn2.close
Set conn2 = nothing

End if
Objrs. Close
Set objrs = nothing
Conn. Close
Set conn = nothing
%>
<Form action = "Cookie. asp" method = "Post">
Username: <input type = "text" name = "username"/> <br/>
Password: <input type = "text" name = "password"/>
<Input type = "Submit" value = "login"/>
</Form>

1. Change the MD5 function code in the common project:
Return System. Web. Security. formsauthentication. hashpasswordforstoringinconfigfile (STR, "MD5"). tolower (). substring (8, 16); implements unified encryption between the main site and the Forum. Because discuz is 32-bit encrypted by default, but the integrated ASP is 16-bit encrypted. If it is 32-bit, it does not need to be modified.

2. Change encode and decode in the common project to direct return.

The processed common discuz.common.rar

Related Article

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.