%
if Request("act")="login" Then
set rs=Server.CreateObject("ADODB.recordset")
sql="select * from User_Info where User_Account='"&Request.Form("User_Account")&"' and User_Password='"&Md5(Request.Form("User_Password"))&"'"
rs.open sql,conn,1,1
if Not Rs.EOF Then
Session("User_Account")=rs("User_Account")
Session("User_Password")=rs("User_Password")
Response.Cookies("User_Account")=rs("User_Account")
Response.Cookies("User_Password")=rs("User_Password")
Response.Cookies("User_Account").expires=date+365
rs.close
set rs=Server.CreateObject("ADODB.recordset")
sql="select * from User_Info where User_Account='"&Request.Form("User_Account")&"' and User_Password='"&Md5(Request.Form("User_Password"))&"'"
rs.open sql,conn,1,3
rs("User_Out")=now()
rs("User_Hits")=rs("User_Hits")+1
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
Response.Redirect "fav.asp"
Else
Call AlertBack("密码不正确")
End if
End if
%>