<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/dlxf_inside.asp"-->
<%call SaveSqlLog(2)
call SF_Sql
if request("user")="" then
	response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·请输入用户名');history.go(-1);</Script>"
	Response.End 
elseif Request("pass")="" then
	response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·请输入用户密码');history.go(-1);</Script>"
	Response.End 
elseif int(replace(trim(Request("regjm")),"'",""))<>int(Session("GetCode")) then
	response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·认证码输入错误');history.go(-1);</Script>"
	Response.End 
end if

nick=replace(trim(request("user")),"'","")
password=md5(replace(trim(Request("pass")),"'","")) 

	set rs=server.createobject("adodb.recordset")
	sql="select * from dlxf_Job_qz where dlxf_pwd='"&password&"' and dlxf_user='"&nick&"'"
	rs.open sql,conn,1,1
 	if not(rs.bof and rs.eof) then
      if rs("dlxf_key1")=0 then
	    response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·您注册的用户名还未经过审核,如有问题请及时和我们联系');window.open('../index.asp','_self');</Script>"
	    Response.End 
      elseif rs("dlxf_key2")=0 then
	    response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·您注册的用户名已被管理员关闭,如有问题请及时和我们联系');window.open('../index.asp','_self');</Script>"
	    Response.End 
      else
		session("individualuser")=rs("dlxf_user")  
		session("individualid")=rs("dlxf_id") 
		Response.Redirect "admin.asp"
	  end if
	else
	response.write "<script>alert('用户登录出错，下面是产生错误的可能原因：\n\n·用户名或密码错误,请重新输入');history.go(-1);</Script>"
	Response.End 
	end if
	
	rs.close
	conn.close
	set rs=nothing
	set conn=nothing

%>

