<%
if session("username")="指定的用户" then 'session("username")用来保存用户名,如果是
'管理员指定的用户名,那么
Application.Lock
Application("weburl") = Request.ServerVariables("Path_info")
'把此指定用户访问的本页面写入Application("weburl"),用来指定其它用户也访问这个页面
Application.UnLock
else
if Application("weburl")<>Request.ServerVariables("Path_info") then
'如果其它用户访问的是指定用户访问的页面,那么不跳转
if Application("weburl")<>"" then
'如果指定用户访问的页面存在,那么
response.redirect Application("weburl") '其它用户也跳转到以上这个页面
else '否则跳转到默认的页面
response.redirect "这里填写默认访问地址,意为指定用户没访问时其它用户的访问地址"
end if
end if
end if%>
!!!另外我的思路如下!!!:
SETURL.asp
<%
Dim URL,username,password
password = Request.Form(password)
username = Request.Form(name)
IF
登陆用户为指定用户
THEN
Response.Redirect(URL) //url是保存管理员所在的页面
ELSE IF
登陆人员为管理员
THEN
URL = Request.QueryString(url) //管理员所在的页面的url地址,通过网址传递
Response.Redirect(URL) //转到管理员要去的页面
END IF
END IF
%>
<%
if session("username")="指定的用户" then
Application.Lock
Application("weburl") = Request.ServerVariables("Path_info")
Application.UnLock
else
if Application("weburl")<>Request.ServerVariables("Path_info") then
if Application("weburl")<>"" then
response.redirect Application("weburl")
else
response.redirect "这里填写默认访问地址,意为指定用户没访问时其它用户的访问地址"
end if
end if
end if%>
<%
if session("username")="指定的用户" then
Application.Lock
Application("weburl") = Request.ServerVariables("Path_info")
Application.UnLock
else
if Application("weburl")<>"" then
response.redirect Application("weburl")
else
response.redirect "这里填写默认访问地址,意为指定用户没访问时其它用户的访问地址"
end if
end if%>
<%
if session("username")="指定的用户" then
Application.Lock
Application("weburl") = Request.ServerVariables("Path_info")
Application.UnLock
end if
if Application("weburl")<>"" then
response.redirect Application("weburl")
else
response.redirect "这里填写默认访问地址,意为指定用户没访问时其它用户的访问地址"
end if%>