ADODB.Recordset (0x800A0E78)
对象关闭时,不允许操作。
/root/ASP SQL Server源代码/8/Chkadmin.asp, 第 80 行
期待高手指教
源代码如下:
<!--#include file="conn/conn.asp"-->
<%
    dim sql
    dim rs
        dim from1
        dim sq12
        dim sq123
    dim nick
    dim password
    nick=replace(trim(request("nick")),"'","")
    password=replace(trim(Request("password")),"'","")   
        select1=request.form("select")
    set rs=server.createobject("adodb.recordset")
        if select1="a"  then 
    sql="select * from admin where password='"&password&"' and nick='"&nick&"'"
'    response.write ""&sql&""
'    response.end
    rs.open sql,conn,1,1
     if not(rs.bof and rs.eof) then
         if password=rs("password") and rs("flag")<=2 then
            session("admin")=rs("nick")  
            session("flag")=rs("flag")
            Response.Redirect "manage.asp"
         else
            call Error
         end if
    else
        call Error()
    end if
        elseif select1="b"  then 
    sql2="select * from admin where password='"&password&"' and nick='"&nick&"'"
'    response.write ""&sql&""
'    response.end
    rs.open sql2,conn,1,1
     if not(rs.bof and rs.eof) then
         if password=rs("password") and rs("flag")=3 then
            session("admin")=rs("nick")   
            session("flag")=rs("flag")
            Response.Redirect "manage.asp"
         else
            call Error
         end if
    else
        call Error()
    end if
        elseif select1="c" then
        sql23="select * from personnal where pass='"&password&"' and [user]='"&nick&"'"
'    response.write ""&sql&""
'    response.end
    rs.open sql23,conn,1,1
     if not(rs.bof and rs.eof) then
         if password=rs("pass") and rs("flag")>=1 then
            session("admin")=rs("user")
            session("flag")=rs("flag")
            Response.Redirect "manage.asp"
         else
            call Error
         end if
    else
        call Error()
    end if
        end if
    sub Error()
        response.write "   <br><br><br>"
        response.write "    <table align='center' width='300' border='1' cellpadding='0' cellspacing='0' bordercolor='#999999'>"
        response.write "      <tr bgcolor='#999999'> "
        response.write "        <td colspan='2' height='15'> "
        response.write "          <div align='center'><font color='#FFFFFF'>操作: 确认身份失败!</font></div>"
        response.write "        </td>"
        response.write "      </tr>"
        response.write "      <tr> "
        response.write "        <td colspan='2' height='23'> "
        response.write "          <div align='center'><br><br>"
        response.write "      用户名或密码错误!!! <br><br>"
        response.write "        <a href='javascript:onclick=history.go(-1)'>返回</a>"        
        response.write "        <br><br></div></td>"
        response.write "      </tr>   </table>" 
    end sub
    rs.close
    conn.close
    set rs=nothing
    set conn=nothing
%>

 
											





 
	     
											


