Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Restricted pages
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Restricted pages

 Post Reply Post Reply
Author
breeze76 View Drop Down
Newbie
Newbie


Joined: 22 July 2003
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote breeze76 Quote  Post ReplyReply Direct Link To This Post Topic: Restricted pages
    Posted: 22 July 2003 at 8:30am
Is there a way, code wise to use cookies or whatever to restrict certain pages and to let view certain pages for certain groups of people?
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2003 at 9:32am
yes
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2003 at 9:46am
The way I go about this is assigning permission levels from 0 to whatever. The lower the level the more access. 0 level would be the highest access and have all the permissions of the other level. A level 1 would have less access than 0 but more than 2.

If using Access, I general store this level in a cookie and set the level at login. This prevents multiple hits to the database just to check levels. If using SQL server, I build a stored procedure to check levels and return it with every page query.

Take LongBox.com, there are 20 different permission levels overall with 5 different permission structures. This is all controlled and configured by the database and every update to the website check you permission level.
Back to Top
zaboss View Drop Down
Senior Member
Senior Member


Joined: 20 August 2002
Location: Romania
Status: Offline
Points: 454
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaboss Quote  Post ReplyReply Direct Link To This Post Posted: 22 July 2003 at 11:34pm

I use a system similar to what jamal said but at login i set a session variable (as it is only one character it does not hit the server very hard, and this way you don't have to access the db on overy page). And on each page I put something like

<% If Session("UserLevel") < X then ' the user is not OK
Response.Redirect ("mypage.asp")
Else ' the user is OK
End if %>



Edited by zaboss
Cristian Banu
Soft 4 web
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.