[Copy to clipboard]CODE: '进行MD5密码验证,转换旧帐户密码验证方式 dim strSalt strSalt=randomStr(6) memLogin("mem_salt")=strSalt memLogin("mem_LastIP")=getIP() memLogin("mem_lastVisit")=now() memLogin("mem_hashKey")=HashKey memLogin("mem_Password")=SHA1(PasswordstrSalt) Response.Cookies(CookieName)("memName")=memLogin("mem_Name") Response.Cookies(CookieName)("memHashKey")=HashKey if Request.Form("KeepLogin")="1" then Response.Cookies(CookieName).Expires=Date+365 memLogin.Update ReInfo(0)="登录成功" ReInfo(1)="b>"memLogin("mem_Name")"/b>,欢迎你的再次光临。br/>a href=""default.asp"">点击返回主页/a>" ReInfo(2)="MessageIcon" ReInfo(3)=true End IF else if memLogin("mem_Password")>SHA1(PasswordmemLogin("mem_salt")) then ReInfo(0)="错误信息" ReInfo(1)="b>用户名与密码错误/b>br/>a href=""javascript:history.go(-1);"">请返回重新输入/a>" ReInfo(2)="ErrorIcon" logout(false) else memLogin("mem_LastIP")=getIP() memLogin("mem_lastVisit")=now() memLogin("mem_hashKey")=HashKey Response.Cookies(CookieName)("memName")=memLogin("mem_Name") Response.Cookies(CookieName)("memHashKey")=HashKey if Request.Form("KeepLogin")="1" then Response.Cookies(CookieName).Expires=Date+365 memLogin.Update ReInfo(0)="登录成功" ReInfo(1)="b>"memLogin("mem_Name")"/b>,欢迎你的再次光临。br/>a href=""default.asp"">点击返回主页/a>meta http-equiv=""refresh"" content=""3;url=default.asp""/>" ReInfo(2)="MessageIcon" ReInfo(3)=true end if end if memLogin.Close Set memLogin=Nothing login=ReInfo end function
修改成
[Copy to clipboard]CODE: '进行MD5密码验证,转换旧帐户密码验证方式 dim strSalt strSalt=randomStr(6) memLogin("mem_salt")=strSalt memLogin("mem_LastIP")=getIP() memLogin("mem_lastVisit")=now() memLogin("mem_hashKey")=HashKey memLogin("mem_Password")=SHA1(PasswordstrSalt) Response.Cookies(CookieName)("memName")=memLogin("mem_Name") Response.Cookies(CookieName)("memHashKey")=HashKey if Cint(Request.Form("KeepLogin"))>0 then Response.Cookies(CookieName).Expires=Date+Cint(Request.Form("KeepLogin")) memLogin.Update ReInfo(0)="登陆成功" ReInfo(1)="b>"memLogin("mem_Name")"/b>,欢迎你的再次光临。br/>a href=""default.asp"">点击返回主页/a>" ReInfo(2)="MessageIcon" ReInfo(3)=true End IF else if memLogin("mem_Password")>SHA1(PasswordmemLogin("mem_salt")) then ReInfo(0)="错误信息" ReInfo(1)="b>用户名与密码错误/b>br/>a href=""javascript:history.go(-1);"">请返回重新输入/a>" ReInfo(2)="ErrorIcon" logout(false) else memLogin("mem_LastIP")=getIP() memLogin("mem_lastVisit")=now() memLogin("mem_hashKey")=HashKey Response.Cookies(CookieName)("memName")=memLogin("mem_Name") Response.Cookies(CookieName)("memHashKey")=HashKey if Cint(Request.Form("KeepLogin"))>0 then Response.Cookies(CookieName).Expires=Date+Cint(Request.Form("KeepLogin")) memLogin.Update ReInfo(0)="登陆成功" ReInfo(1)="b>"memLogin("mem_Name")"/b>,欢迎你的再次光临。br/>a href=""default.asp"">点击返回主页/a>meta http-equiv=""refresh"" content=""3;url=default.asp""/>" ReInfo(2)="MessageIcon" ReInfo(3)=true end if end if memLogin.Close Set memLogin=Nothing login=ReInfo end function
然后搜索
[Copy to clipboard]CODE: memLogin("mem_LastIP")=getIP()
有三处!将其删除...
再搜索
[Copy to clipboard]CODE:
if CheckCookie("mem_LastIP")>Guest_IP or isNull(CheckCookie("mem_LastIP")) then logout(true) else memName=CheckStr(Request.Cookies(CookieName)("memName")) memStatus=CheckCookie("mem_Status") end if
替换为
[Copy to clipboard]CODE: memName=CheckStr(Request.Cookies(CookieName)("memName")) memStatus=CheckCookie("mem_Status")