http://mr-w.cn/
Have been plagued by this problem!! Now finally the perfect solution!! To those who need the front desk to remember the login information! (This method after my use of verification does not exist the star Bell Dan Admin said the background will continue to log security risks ...) Backstage is the same as the original, the effect is only for the foreground!!
Thanks to Wady and Ifairy ...
Please don't just look back, just don't come back to my blog to sit ... Replies are virtues!
Here is how to modify ...
1. First modify common/checkuser.asp (mainly this!!)
The following original code
[Copy to Clipboard] CODE:
' Make MD5 password verification, convert old account password authentication method
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 (Password&strsalt)
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) = "Login Succeeded"
Reinfo (1) = "<b>" &memlogin ("Mem_name") & "</b>", welcome to your visit again. <br/><a href= "Default.asp" "> Click Back Home </a>"
Reinfo (2) = "Messageicon"
Reinfo (3) =true
End IF
Else
If Memlogin ("Mem_password") <>sha1 (Password&memlogin ("Mem_salt")) Then
Reinfo (0) = "error Message"
Reinfo (1) = "<b> username and password error </b><br/><a href=" "Javascript:history.go (-1);" " > Please return to re-enter </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) = "Login Succeeded"
Reinfo (1) = "<b>" &memlogin ("Mem_name") & "</b>", welcome to your visit again. <br/><a href= "Default.asp" > Click Back Home </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
Modified into
[Copy to Clipboard] CODE:
' Make MD5 password verification, convert old account password authentication method
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 (Password&strsalt)
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) = "Landing Success"
Reinfo (1) = "<b>" &memlogin ("Mem_name") & "</b>", welcome to your visit again. <br/><a href= "Default.asp" "> Click Back Home </a>"
Reinfo (2) = "Messageicon"
Reinfo (3) =true
End IF
Else
If Memlogin ("Mem_password") <>sha1 (Password&memlogin ("Mem_salt")) Then
Reinfo (0) = "error Message"
Reinfo (1) = "<b> username and password error </b><br/><a href=" "Javascript:history.go (-1);" " > Please return to re-enter </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) = "Landing Success"
Reinfo (1) = "<b>" &memlogin ("Mem_name") & "</b>", welcome to your visit again. <br/><a href= "Default.asp" > Click Back Home </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
and then search
[Copy to Clipboard] CODE:
Memlogin ("Mem_lastip") =getip ()
There are three places! Delete it ...
Search again
[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
Replaced by
[Copy to Clipboard] CODE:
Memname=checkstr (Request.Cookies (CookieName) ("MemName"))
Memstatus=checkcookie ("Mem_status")
2. Modify Login.asp:
Replace the following code with <form name= "CheckUser" action= "Login.asp" method= "post" > To </form> broken
If you do not bother to change or do not change, please download my bag, cover the original file can! (Changes are risky, please back up the original file!!)
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.