set rs=server.createobject("adodb.recordset")
rs.open"select * from user_table where user_name='"&request.form("user_name")&"' and user_pwd='"&request.form("user_pwd")&"'"
if not rs.eof then
if rs("role1")="1" then
rs.close
set rs=nothing
rsponse.redirect"权限为1的页面url"
elseif rs("role2")="1" then
rs.close
set rs=nothing
rsponse.redirect"权限为2的页面url"
elseif rs("role3")="1" then
rs.close
set rs=nothing
rsponse.redirect"权限为4的页面url"
elseif rs("role4")="1" then
rs.close
set rs=nothing
rsponse.redirect"权限为4的页面url"
else
rs.close
set rs=nothing
response.redirect"0.asp"
end if
else
response.write"该用户不存在"
end