<!--#include file="../Conn.asp" -->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/Function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>跳转页面</title>
<LINK href="Images/style.css" type=text/css rel=stylesheet>
</head>
<body leftmargin=0 bottommargin=0 rightmargin=0 topmargin=0>
<BR style="OVERFLOW: hidden; LINE-HEIGHT: 3px">
<%
dim txqname,txqpass,admincode
txqname=replace(Trim(request.form("txqname")),"","")
txqpass=md5(Replace(Trim(request.form("txqpass")),"",""))
admincode=Replace(Trim(request.form("admincode")),"","")
if txqname="" then
Response.Write("<script language=javascript>alert('您没有输入用户名,请输入用户名~！');history.back(1);</script>")
Response.End
elseif txqname="'or'='or'" then
Response.Write("<script language=javascript>alert('非法用户名,请输入用户名~！');history.back(1);</script>")
Response.End
elseif txqpass="" then
Response.Write("<script language=javascript>alert('您没有输入密码,请输入密码~！');history.back(1);</script>")
Response.End
elseif admincode="" then
Response.Write("<script language=javascript>alert('您没有输入验证码,请输入验证码~！');history.back(1);</script>")
Response.End
elseif CStr(Session("getcode"))<>CStr(Trim(Request("admincode"))) Then
ReturnError("您输入的验证码不一致,请重新输入验证码")
Response.End
end if
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from admin where txqname='"&txqname&"' and txqpass='"&txqpass&"'"
rs.Open sql,conn,1,1
if not (rs.Eof and rs.BOF) then
Response.Cookies("admin")=rs("txqname")
Response.Cookies("admin").expires=date+10
Response.Cookies("pass")=rs("txqpass")
Response.Cookies("pass").expires=date+10
session("admin")=rs("txqname")
response.write"<script>window.open('admin_index.asp','_parent')</script>"
else
Response.Write("<script language=javascript>alert('您输入的用户名和密码不正确哦~！');history.back(1);</script>")
Response.End

end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
</body>
</html>
