<!--#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
%>