G
GTN170777
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_authorizedUsers="1,2,3"
MM_authFailedURL="index.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" &
Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" &
Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
It restricts access to the page based upon the following values –
MM_Username
MM_UserAuthorization
I believe that is checking to see whether MM_Username exists and if so
checking to see if the MM_UserAuthorization 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_authFailedURL (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_UserAuthorization it
checks to see whether the variable ACC (which is sent through
Request.QueryString) 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
below –
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="1,2,3"
MM_authFailedURL="index.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" &
Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" &
Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
It restricts access to the page based upon the following values –
MM_Username
MM_UserAuthorization
I believe that is checking to see whether MM_Username exists and if so
checking to see if the MM_UserAuthorization 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_authFailedURL (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_UserAuthorization it
checks to see whether the variable ACC (which is sent through
Request.QueryString) 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