Discuz!NT 論壇整合ASP程式論壇

來源:互聯網
上載者:User

複製代碼 代碼如下:<%@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.execute("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 />")

'userid=2&password=0P273vMb%2bonHszSw%2fTtGpb%2fz4pB7CbWl&avatar=avatars%5ccommon%5c0.gif&tpp=0&ppp=0&pmsound=1&invisible=0&referer=index.aspx&sigstatus=1&expires=-1
'產生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" '修改為你的網域名稱,注意前面帶.(點)

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">
使用者名稱:<input type="text" name="userName" /><br />
密碼:<input type="text" name="passWord" />
<input type="submit" value="登陸" />
</form>

1、將common項目中的md5函數代碼更改為:
return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower().Substring(8, 16);實現主站與論壇統一加密方式。因為discuz預設是32位加密,但整合的ASP是16位加密,如果是32位,則不需要修改。

2、將common項目中的Encode和Decode改成直接返回。

已經處理好的common Discuz.Common.rar

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.