Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: General / Classic ASP versions(v3.4.XX)
 grr logincheck hiding
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

maxray
Starting Member

5 Posts

Posted - 02 December 2004 :  09:43:35  Show Profile
Hi I want to password protect some other pages that live next to my forum but cant isolate the login check from the header inc. Can anyone point me at the right bits of code>?

incidentally Ive searched the forum for ages and the universal login although helpful isnt quite doing it for me :)

dayve
Forum Moderator

USA
5820 Posts

Posted - 02 December 2004 :  11:37:11  Show Profile  Visit dayve's Homepage
do you want to protect these pages for certain member levels (admin, moderator, etc?) or just forum members?

Go to Top of Page

maxray
Starting Member

5 Posts

Posted - 02 December 2004 :  11:55:27  Show Profile
hi dayve, there wont be moderators other than 1 person whos adminning the whole thing.Infac tthere s a set number of users so no registrants either. Basically theres say 4 pages open to everyone and then 4pages plus the forum that are password protected. Seemed sensible to use the same login as the forum for these 4 pages otherwise you would just spend your time logging in :) ideally you wouldnt be able to see the forum either if you wernt logged in. I considered doing a seperate login check using a session. Does the snitz forum store the 'logged in or not' value somewhere it can be accessed outside the header_inc?


Any help would be much appreciated :)

Go to Top of Page

maxray
Starting Member

5 Posts

Posted - 02 December 2004 :  11:57:34  Show Profile
seems you are a fan of oil filled heaters? :) or an affiliate scheme
Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 02 December 2004 :  12:25:49  Show Profile  Visit dayve's Homepage
quote:
Originally posted by maxray

seems you are a fan of oil filled heaters? :) or an affiliate scheme


not really... I am a fan of Nine Inch Nails which is the mind-child of one Trent Reznor who's family used to own Reznor Heaters. .

I was going to say that if you're just wanting to allow these pages to have access based on whether or not they are a forum member, you can just use the cookies that are set by the forum to grant access to these pages. For example, on the pages you're trying to protect, add these lines:

strDBNTUserName = Request.Cookies("Snitz01User")("Name")

The reason Snitz01 is in red is because this is the prefix that is set in config.asp. If you changed this, then you will need to change it in the cookie request as well.

Then you can do a conditional check like so (this is an extremely simplistic example):

if strDBNTUserName <> "" ' member is logged on to Snitz

...your web page code here

end if

or some variation of above. is this something like what you want to do or are you thinking of a different approach? if you want to use the passwords that are already in the Snitz database, then you can take advantage of a simple sql statement using the sha256 function for authentication.

Go to Top of Page

maxray
Starting Member

5 Posts

Posted - 03 December 2004 :  05:36:26  Show Profile
Going to have a crack at it today hopefully i will break th eback of it

NIN.. quality band. Hey pig piggy pig pig pig...
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 1.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07