<!--#include file="../../conn/zkconn.asp" -->
<%
	dim sql,rs,adminname,adminpass,yz,ok
	admin=nohack(request("name"))
	password=nohack(Request("pass"))
	yz=nohack(request("yz"))
    ok=nohack(session("ok"))
	if not yz=ok then
	  Response.Write "<script language=JavaScript>{window.alert('填入的验证码错误，请重新输入!');window.history.go(-1);}</script>"
	  response.end
    end if

	set rs = conn.execute("select * from user_name where admin='"&admin&"' and password='"&password&"'")
	if not(rs.bof and rs.eof) then
 		if admin=rs("admin") and password=rs("password") then
			if rs("zt")="1" then
			session("www.loogoo.com")=rs("name")
			Response.Redirect "admin.asp"
			else
    	response.write "<script>alert(""该商户尚未通过审核，或已经过期！"");history.back();</script>"
			end if
 		else
    	response.write "<script>alert(""用户名或密码错误，请检查！"");history.back();</script>"
 		end if
	else
    	response.write "<script>alert(""用户名或密码错误，请检查！"");history.back();</script>"
	end if
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing
%>