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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 get MemberID without inc_header.asp?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 09 March 2006 :  08:26:49  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Is it possible to get MemberID without using inc_header.asp?

I'm working on an uploadthingy with a popup-window. At first I used this link:
<a href=""javascript:openWindow6('ezuploadorig.asp?memid=" & MemberID & ')"">
and then got the memid via Request.Querystring("memid").

But:
after selecting the files I want to upload the popup-window reloads and the memid is lost...
If I include the inc_header.asp I get an error as stated in another thread.
<

/Tribaliztic
- www.gotlandrace.se -

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 09 March 2006 :  09:34:27  Show Profile  Reply with Quote
2 other ways to retrieve the MemberID without using inc_header.asp.

1. Use inc_header_short.asp instead.
2. Use the getMemberID() function which requires the user name of the member to be passed to it. It is found in inc_func_secure.asp.<

Support Snitz Forums
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 09 March 2006 :  09:54:37  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
inc_header_short.asp cause the same error as inc_header.asp unfortunately..
I tried getMemberID() but couldn't get it to work.
What's the syntax?
I checked code in topic.asp (I think it was) and tried to use it but it didn't work.
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 09 March 2006 :  10:01:44  Show Profile  Reply with Quote
What error is the "same error"?

The syntax is simple as for any other function you calling:
intMemberID = getMemberID("Davio")
OR
Response.Write "Your Member ID is " & getMemberID("Davio") & vbNewLine
<

Support Snitz Forums
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 09 March 2006 :  10:06:02  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Okay, so I should use it like this then:

intMemberID = getMemberID("" & strDBNTUsername & "")

I must use a variable because this will tell the code what foldername (the userid) it should upload the files to.
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 09 March 2006 :  10:21:28  Show Profile  Reply with Quote
Yes, you can use it like that. Just that, strDBNTUsername is set in inc_header.asp and inc_header_short.asp.

You could put this in your code:
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strUniqueID is set in config.asp. You could hard code it into your file.
strDBNTUserName = Request.Cookies("Snitz00User")("Name")
<

Support Snitz Forums
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 10 March 2006 :  02:23:28  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
heh, no wonder it didn't work then =)
I'll check that out, thank you!
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 10 March 2006 :  02:59:13  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Well, I tried this code:

Dim folder

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

folder = getMemberID("strDBNTUserName")


And got this error:
"ADODB.Recordset error '800a0bb9'.
The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another".
/inc_func_secure.asp, line 78


I suppose it's because of this line in inc_func_secure.asp
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fUser_Name, "SQLString") & "'"

I guess that I get "strDBNTSQLName" from inc_header.asp also?
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 10 March 2006 :  03:03:06  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
No, it's from config.asp:

if strAuthType = "db" then
strDBNTSQLName = "M_NAME"
strAutoLogon = "0"
strNTGroups = "0"
else
strDBNTSQLName = "M_USERNAME"
end if

and the M_NAME is from inc_func_secure.asp:

function getMemberName(fUser_Number)

dim strSql
dim rsGetmemberName

'## Forum_SQL
if isNull(fUser_Number) then exit function
strSql = "SELECT M_NAME "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID = " & cLng(fUser_Number)

set rsGetMemberName = Server.CreateObject("ADODB.Recordset")
rsGetMemberName.open strSql, my_Conn

if rsGetMemberName.EOF or rsGetMemberName.BOF then
getMemberName = ""
else
getMemberName = chkString(rsGetMemberName("M_NAME"),"display")
end if

rsGetMemberName.close
set rsGetMemberName = nothing

end function

and that function won't work since I don't have the "fUser_Number".

Am I wrong? (I hope so..)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 10 March 2006 :  11:40:59  Show Profile  Reply with Quote
Oops. Brain didn't catch that. Hmmm

Easiest fix would be to include config.asp. Or take out the variables out of config.asp and put it in your file. And copy the function into your file. Replacing the variables with the hard coded values.

Basically you will have to get the user name from their cookie, then search for their ID that matches their user name.<

Support Snitz Forums
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 11 March 2006 :  05:18:30  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
I already have config.asp included =)
I still get the same error if I try this:

folder = getMemberID("strDBNTUserName")

Why won't it work?
The complete code is here:
http://www.gotlandrace.se/tabort/ezuploadorig.txt
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 11 March 2006 :  06:59:01  Show Profile  Reply with Quote
If you have config.asp included, you don't need to have this code in your file:
strDBNTSQLName = Request.Cookies("Snitz00User")("Name")
<

Support Snitz Forums
Go to Top of Page

Zuel
Average Member

USA
540 Posts

Posted - 11 March 2006 :  12:41:04  Show Profile  Visit Zuel's Homepage  Reply with Quote
Here's your problem:
folder = getMemberID("strDBNTUserName")

You are looking for a Member named strDBNTUserName. Try it without the quotes.

folder = getMemberID(strDBNTUserName)

Davio knew that! <

My Completed Mods: News Mod | Zuel's Avatar Add-on
In Development: World of Warcraft Member Roster | [C# Based Forum]

Note - I may take a few days to recieve your email. Hotmail filters all new emails as junk. Would be best to post all questions, concerns in a forum topic to catch my immediate attention. This way others can assist and also correct any similar mistakes.

MSN / E-Mail: ucyimDa_Ruler@Hotmail.com

Personal Bookmarks: How to work a DBS File
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 11 March 2006 :  15:34:34  Show Profile  Reply with Quote
quote:
Originally posted by Zuel
Davio knew that!

<

Support Snitz Forums
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 13 March 2006 :  03:43:07  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
As soon as I enter this line:
folder = getMemberID(strDBNTUserName)

I get this error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/inc_func_secure.asp, line 78
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 13 March 2006 :  03:55:43  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
How can I add "member_id" to this url then:
<form name="upldfile" action="ezuploadorig.asp?action=upld&<% = PID %>" onSubmit="return ShowProgress();" method="post" enctype="multipart/form-data">

I tried this:
<form name="upldfile" action="ezuploadorig.asp?action=upld&<% = PID %>&memid=<% MemberID %>" onSubmit="return ShowProgress();" method="post" enctype="multipart/form-data">

But it didn't work..
<

/Tribaliztic
- www.gotlandrace.se -

Edited by - tribaliztic on 13 March 2006 03:56:18
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07