<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="Check_SqlIn.asp" -->
<!--#include file="admin_conn.asp" -->
<!--#include file="md5.asp"-->
<%
SecurityCode=Trim(request.Form("SecurityCode"))

if SecurityCode <> cstr(session("lhSecurityCode"))  then
	response.write"<SCRIPT language=JavaScript>alert('请输入正确附加码！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end
end if

user=trim(Request.Form("user"))
password=md5(trim(Request.Form("password")))

user=replace(user,"'","''")
password=replace(password,"'","''")

set rs=server.CreateObject ("ADODB.RecordSet")
sql="select * from Admin where user='" & user & "'and password='" & password & "'"
rs.Open sql,conn,1,1

if rs.eof and rs.bof then
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
    response.write"<SCRIPT language=JavaScript>alert('用户名或密码不正确！');"
	response.write"javascript:history.go(-1)</SCRIPT>"
	response.end
else
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
	session("admin")=user
	response.Redirect "index.asp"
end if

%>

