<!--#include file= ". /inc/conn1.asp "<!--#include file=". /inc/md5.asp
<%
If CStr (Request ("code")) <>cstr (Session ("GetCode")) then
Response.Write "<script language=javascript>alert (' Sorry, you filled in the CAPTCHA error! ');"
Response.Write "Javascript:history.go ( -1) </SCRIPT>"
Response.End
end If
Dim Userid,password
Username=request ("username")
PASSWORD=MD5 (Request ("password"))
set Rs=server. CreateObject ("Adodb.recordset")
sql= "Select Username,vip,jifen1,lastlogin,thislogin,logins from Tgy where username= ' &username& ' and password= ' &password& ' '
rs.open sql,conn,3,3
If rs.eof then
response. Write "<script>alert (' User login error, username or password error '); History.go ( -1);</script> '
else
SessiOn (' username ') =rs ("username")
if Day (rs ("Lastlogin")) <>day (date ()) then
if rs ("jifen1") = " "Or IsNull (RS (" Jifen1 ")) then
rs (" Jifen1 ") =5
else
rs (" Jifen1 ") =rs (" Jifen1 ") +5
end if
end if
rs ("Lastlogin") =rs ("Thislogin")
rs ("Thislogin") =now ()
rs ("Logins") =rs ("logins") +1
rs.update
session.timeout=20
Response. Write "<script>location.href= ' index.asp ';</script>"
End If
rs.close
set rs=nothing
conn.close
set conn=nothing
%>