Discuz!NT 포럼 통합 ASP 프로그램 포럼

3914 단어 Discuz!NTASP

<%@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.Forms Authentication.HashPassword ForStoringInConfigFile(str,"MD5").ToLower().Substring(8,16)로 변경 합 니 다.홈 페이지 와 포럼 의 통 일 된 암호 화 방식 을 실현 하 다.discuz 는 기본적으로 32 비트 암호 화 이지 만 통 합 된 ASP 는 16 비트 암호 화 이 며 32 비트 라면 수정 할 필요 가 없습니다.2.common 프로젝트 의 Encode 와 Decode 를 직접 되 돌려 줍 니 다.처 리 된 common Discuz.Common.rar

좋은 웹페이지 즐겨찾기