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)
 Cookie for Login
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bondbugcrazy
Starting Member

5 Posts

Posted - 21 February 2009 :  18:47:37  Show Profile
I want to add a pop up when people login and plan to use the username so only selected members see the message. What is the name of the cookie (value will be the username) that I need to check for on page load.

Ta<

cripto9t
Average Member

USA
881 Posts

Posted - 22 February 2009 :  07:57:35  Show Profile
inc_header.asp - around line 161

strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")]/green]



This code in inc_header.asp, drops and clears cookies. So you will need to add your code somewhere after it.

around line 183
[green]select case Request.Form("Method_Type")
	case "login"
		strEncodedPassword = sha256("" & Request.Form("Password"))
		select case chkUser(strDBNTFUserName, strEncodedPassword,-1)
			case 1, 2, 3, 4
				Call DoCookies(Request.Form("SavePassword"))
				strLoginStatus = 1
			case else
				strLoginStatus = 0
			end select
	case "logout"
		Call ClearCookies()
end select


The functions DoCookies() and ClearCookies() are located in inc_func_common.asp

If you want to use the members id instead of thier name the variable is "MemberID" and you should put your code after this in inc_header.asp

around line 197
if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
	chkCookie = 1
	mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
	chkCookie = 0
else
	MemberID = -1
	mLev = 0
end if


the variable "MemberID" is set int the ChkUser() function. It's also located in inc_func_common.asp<

    _-/Cripto9t\-_

Edited by - cripto9t on 22 February 2009 08:01:53
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 23 February 2009 :  04:38:08  Show Profile
If you use inc_header_short.asp (and inc_footer_short.asp) in your popup then you can use the strDBNTUserName variable wherever you need.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

bondbugcrazy
Starting Member

5 Posts

Posted - 23 February 2009 :  17:43:36  Show Profile
Thanks Folks<
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 0.32 seconds. Powered By: Snitz Forums 2000 Version 3.4.07