<!--#Include File="Connection.Asp"-->
<!--#Include File="../JaInc/Ja_MD5.Asp"-->
<!--#Include File="Function.Asp"-->
<%
If Cint(Trim(Request.Form("CheckCode")))<>Session("ChkNum") Then
Response.Write "<script language=javascript>alert('验证码错误,返回重写!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
Else
Dim Logna,LogPwd,JaIP
Dim JaLogOK
Dim CLogin
Logna = JaKillStr(Trim(Request.Form("userid")))
LogPwd = MD5(JaKillStr(Trim(Request.Form("password"))),"long")
JaIP = Request.ServerVariables("REMOTE_ADDR")
Set Clogin = Conn.ExeCute("SELECT * FROM [JaAdmin] WHERE JaAdmin='"&Logna&"' and JaPass='"&LogPwd&"'")
If Clogin.eof Then
Response.Write "<script language=javascript>alert('用户名或密码错误,请重新填写!');"
Response.Write "window.document.location.href='javascript:history.go(-1)';</script>"
Else
Conn.Execute("Update [JaAdmin] Set JaLoginIP='"&JaIp&"' Where JaAdmin='"&Logna&"' and JaPass='"&LogPwd&"' ")
SESSION("JaAdmin")=Logna
SESSION("JaPwd")=LogPwd
SESSION.TIMEOUT=60
Response.Write "<script language=javascript>window.document.location.href='In.Asp';</script>"
End if
End If
%>
