Hi there, I've got the standard Dreamweaver restrict access to page behaviour
below –
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUs ers="1,2,3"
MM_authFailedUR L="index.asp"
MM_grantAccess= false
If Session("MM_Use rname") <"" Then
If (false Or CStr(Session("M M_UserAuthoriza tion"))="") Or _
(InStr(1,MM_aut horizedUsers,Se ssion("MM_UserA uthorization")) >=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_aut hFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerV ariables("URL")
if (Len(Request.Qu eryString()) 0) Then MM_referrer = MM_referrer & "?" &
Request.QuerySt ring()
MM_authFailedUR L = MM_authFailedUR L & MM_qsChar & "accessdeni ed=" &
Server.URLEncod e(MM_referrer)
Response.Redire ct(MM_authFaile dURL)
End If
%>
It restricts access to the page based upon the following values –
MM_Username
MM_UserAuthoriz ation
I believe that is checking to see whether MM_Username exists and if so
checking to see if the MM_UserAuthoriz ation value is either 1, 2 or 3
I the event that both exist access is granted, in the event that one or
neither exist it redirects the user to MM_authFailedUR L (index.asp)
What I would like to do is build a similar behaviour, but that only checks
one value, so instead of checking MM_Username & MM_UserAuthoriz ation it
checks to see whether the variable ACC (which is sent through
Request.QuerySt ring) equals either –
Occ User
Reg User
Reg User5
Reg User10
Multi User
And in the event that ACC as one of the values above Access is granted, in
the event that this is not the case the user is redirected to info.asp.
Any ideas on how to do this would be great -
Thanks