

<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%>
<%
user_name=Request("user_name")
password=trim(request("password"))
sql="select * from admin where admin_id='"&user_name&"'"
set rs=server.CreateObject ("ADODB.recordset")
 rs.Open sql,conn1,3
if rs.RecordCount =0 then
	rs.Close
    set rs=nothing
	Response.Redirect "error.asp?cause=0"  'cause=0 表示没有这个会员
elseif rs("passwd")<>password then
    rs.Close
    set rs=nothing
    Response.Redirect "error.asp?cause=1"  'cause=1 表示密码错误
else
   	session("Current_user")=rs("admin_id")
    Session("weight")=5
   
   
    rs.Close
    set rs=nothing
    Response.Redirect "admin_main.asp"
 end if
  %>