Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Remove / Disable Member List
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Remove / Disable Member List

 Post Reply Post Reply
Author
Maktub View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maktub Quote  Post ReplyReply Direct Link To This Post Topic: Remove / Disable Member List
    Posted: 16 February 2007 at 5:09am
Dear All,
 
Probalby a simple answer, but I could not find a way, explanation how to remove / disable the memberlist. What would I have to do if I don't want that people except Admin can access / view this list?
 
Thanks for your input.
 
 


Edited by Maktub - 16 February 2007 at 5:10am
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2007 at 6:09am
Add
If blnAdmin = False Then 
'Clean up
Call closeDatabase()


Response.Redirect("default.asp")
End If


To the page


Edited by Melkor - 16 February 2007 at 6:10am
Back to Top
Maktub View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maktub Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2007 at 6:57am
Thanks Melkor,
 
Could you please let me know to which page (default.asp?) and in what position. I an absolut novice in ASP.
 
Chris
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2007 at 7:12am
OK.

Add the code above to the page that you only want the Admins to be able to access anywhere below the line
<!--#include file="common.asp"-->
You mentioned not wanting the member listings viewable so this would be members.asp.

I'll break it down for you;
The If clause checks if the logged in user is an Admin or not (this is determined from pages linked to via the common.asp hence putting the code after that include).

If the logged in user is not and Admin, the server will close access to the database and redirectr the user to the page specified (in this case default.asp which is the main forum page).

If the logged in user is an Admin, the page will continue to load.

Back to Top
Maktub View Drop Down
Newbie
Newbie
Avatar

Joined: 14 February 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maktub Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2007 at 10:41am
Most appreciated.
 
Is my understanding correct, that the button/link "Memberlist" on top of the page remains, but that it will only redirect if user are not logged-in as Admin back to the default.asp?
 
If so, maybe that's not so elegant - Wouldn't it possible to also remove the icon and link all together and provide Admin's with the URL to the memberlist (or to view it in the Admin section actually).
 
So, maybe it would be easier to remove the memberlist icon / memberlist text on top of the page as well?
Back to Top
Melkor View Drop Down
Groupie
Groupie


Joined: 11 December 2006
Location: United States
Status: Offline
Points: 80
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melkor Quote  Post ReplyReply Direct Link To This Post Posted: 16 February 2007 at 4:26pm
Yup, you can do the the same thing to that link.

Add
<% If blnAdmin = True Then %>
before the link, and
<% End If %>
after the link, then it will only appear for admins. 
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.