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/Code)
 Universal Login for Snitz 3.4.03
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 13

gbdg
New Member

73 Posts

Posted - 25 September 2002 :  17:34:43  Show Profile
I'm presently trying to implement this in a page that makes no reference to the snitz header/footer, as listed below.

<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<html>
<head><title>Remote login test</title></head>
<body><!--#INCLUDE FILE="inc_Login.asp" --></body>
</html>

I had the problem listed above with my_conn not being defined, so after studying inc_header.asp, I added these lines at the top of inc_login.asp

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

Also, I set fname as indicated for the case where "inc_header.asp" is not being used:

fname = chkString(Request.QueryString("Name"),"SQLString") '### Use this if you do not include inc_header.asp or inc_header_short.asp
'fName = strDBNTFUserName 'Use this line if you do use inc_header.asp or inc_header_short.asp

I now get the login box rendered successfully to the page. However, when entering valid entries for user/pass, it still won't log me in.

A response.write reveals that "strDBNTUserName" is blank.

If anyone can point me in the right direction, I'd appreciate that. If you have completed installation, separating completely from the use of inc_header and footer, please let me know.

TIA,
Greg

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

OK, as a follow-up, I got this working - or so it seems. PLEASE - if someone has a better solution please advise...

inc_header_short.asp has the following code in it. If you want to totally separate the login from the Snitz headers, as I did, just poke the following block of code into inc_login.asp after the include tag and the <%

<!--#INCLUDE FILE="inc_func_common.asp"-->
<%

' gbdg added below
set my_Conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = trim(chkString(Request.Form("Name"),"SQLString"))
if strDBNTFUserName = "" then strDBNTFUserName = trim(chkString(Request.Form("User"),"SQLString"))
if strAuthType = "nt" then
strDBNTUserName = Session(strCookieURL & "userID")
strDBNTFUserName = Session(strCookieURL & "userID")
end if

chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0
' gbdg added above

Edited by - gbdg on 25 September 2002 21:10:48
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 28 September 2002 :  15:12:33  Show Profile
The site is: http://www.filipinotayo.net/beta/
Snitz version is: v3.4.02

The beginning of my index.asp looks like this:
<!--#INCLUDE VIRTUAL="/beta/forum/inc_login.asp"-->
<!--#INCLUDE FILE="forum/config.asp"-->
<!--#INCLUDE FILE="forum/inc_sha256.asp"-->
<!--#INCLUDE FILE="forum/inc_func_common.asp"-->


The beginning of my default.asp looks like this:
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%


I'm getting the error message below when user login is executed:
Microsoft VBScript runtime error '800a000d'
Type mismatch: 'm_l2Power'
/beta/forum/inc_sha256.asp, line 194


I appreciate any input that will remediate this error and help deploy the 'universal login' on my index.asp.

Also, any tips on how I can remove the 'login section' from the top center portion of the page will be greatly appreciated.

thanks,

PentiumMX

Edited by - pentiummx on 28 September 2002 16:10:47
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 28 September 2002 :  21:58:42  Show Profile
GDBG,
I've included your lines onto my inc_login.asp to no avail. can you verify my steps below? i'm trying to replicate the steps you're doing. here's some more information about my config.

-------------------------
The site is: http://www.filipinotayo.net/beta/index2.asp
Snitz version is: v3.4.02
Username: betatester
Password: password

The beginning of my index2.asp looks like this:
<!--#INCLUDE FILE="forum/config.asp"-->
<!--#INCLUDE FILE="forum/inc_sha256.asp"-->
<!--#INCLUDE FILE="forum/inc_func_common.asp"-->

<HTML><HEAD><TITLE>UST CAT GCC AA - Entrance</TITLE>
</HEAD>
<BODY background="http://www.filipinotayo.net/ustcatgccaa/images/bkgrnd-ustmain.jpg" bgproperties="fixed">
<P align=center> </P>
<P align=center> </P>
<div align="center">
<center>
<table border="2" width="351" cellpadding="2">
</center>
<tr>
<td width="214" valign="middle" align="center">
<p align="center"><a href="forum/default.asp"><img border="0" src="forum/images/gccaa-entrance.jpeg" width="272" height="301"></a></td>
<center>
<td width="259" valign="middle" align="center"><!--#INCLUDE VIRTUAL="/beta/forum/inc_login.asp"--> </tr>


The beginning of my default.asp looks like this:
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<!--#INCLUDE FILE="inc_subscription.asp" -->
<%


The beginning of my inc_login.asp looks like this:
%>
<!--#INCLUDE FILE="inc_func_common.asp"-->
<%

' gbdg added below
set my_Conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = trim(chkString(Request.Form("Name"),"SQLString"))
if strDBNTFUserName = "" then strDBNTFUserName = trim(chkString(Request.Form("User"),"SQLString"))
if strAuthType = "nt" then
strDBNTUserName = Session(strCookieURL & "userID")
strDBNTFUserName = Session(strCookieURL & "userID")
end if

chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0
' gbdg added above


I'm getting the error message below when user login is executed:



Also, the screen is not taking the process to 'default.asp' upon logging in.

I appreciate any input that will remediate this error and help deploy the 'universal login' on my index2.asp.

thanks a bundle,

- armand

Edited by - pentiummx on 28 September 2002 22:05:26
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 28 September 2002 :  22:35:56  Show Profile
...okay...

I got my index2.asp to jump to default.asp after providing the username and password. However, two issues keep cropping up:

1. This error message is still popping up from the left hand corner of the screen prior to the jump to default.asp


2. Once at default.asp, the login page is showing up as if I have not entered a user name and password from my 'universal box' in index2.asp

Can someone that knows ASP decently give us a hand here?


armand

Edited by - pentiummx on 28 September 2002 22:36:49
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 29 September 2002 :  00:00:05  Show Profile
Here's what Microsoft's site Error 800a000d has to say:

quote:
Symptoms
When passing a parameter to a COM Component's method in Active Server Pages (ASP), the following error occurs:


Microsoft VBScript runtime error '800a000d' Type mismatch

Or the value stored in the variable passed to the method is not changed.
Cause
VBScript will pass parameters to a method by value if the argument's data type is NOT declared as a variant and the parameter is passed by reference if the argument's data type is declared as variant by the method.
Resolution
Parameters to be passed by reference to a method should always be declared as a variant data type by the method, while parameters to be passed by value can be declared as any type by the method.
Status
This behavior is by design.
More Information
Steps to Reproduce Behavior
Create a Visual Basic ActiveX DLL Project called "ByRefProj."
Add class module called "ByRefObj."
Implement the following method:

Public Sub ByRefMethod( ByRef strVal as String )
strVal = "This variable is passed by Reference"
End Sub
Create an ASP Page that calls this Method:

<%
Dim objTest, strByRefVal
Set objTest = Server.CreateObject("ByRefProj.ByRefObj")
objTest.ByRefMethod strByRefVal
%>
Run ASP. The following error occurs:


Microsoft VBScript runtime error '800a000d'
Type mismatch: 'ByRefMethod'
To correct this behavior:

Change the implementation of the method ByRefMethod as follows:
Public Sub ByRefMethod( ByRef strVal as Variant )
strVal = "This variable is passed by Reference"
End Sub

Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 29 September 2002 :  00:19:23  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I'm sorry but I haven't had a chance to look at it yet. I've only
had time for the last couple days for a few bief visits here. Your
issue with the timer is that it's set at the top, very tippy top
of inc_header.asp and then in inc_footer.asp it tries to figure out
how long it took between when it first saw the timer code in
inc_header.asp and inc_footer.asp to generate the page. So you need
to either get rid of the timer refrences in inc_footer.asp or add
the timer code at the top of inc_header.asp to whatever page you
are using instead of inc_header.asp.

The inc_header.asp code is this:
if strShowTimer = "1" then
	'### start of timer code
	Dim StopWatch(19) 

	sub StartTimer(x)
		StopWatch(x) = timer
	end sub

	function StopTimer(x)
		EndTime = Timer

		'Watch for the midnight wraparound...
		if EndTime < StopWatch(x) then
			EndTime = EndTime + (86400)
		end if

		StopTimer = EndTime - StopWatch(x)
	end function

	StartTimer 1

	'### end of timer code
end if


The timer code in inc_footer.asp is this:
if strShowTimer = "1" then
	Response.Write	"    <td align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & chkString(replace(strTimerPhrase, "[TIMER]", abs(round(StopTimer(1), 2)), 1, -1, 1),"display") & "</font></td>" & vbNewLine
end if


@tomic

SportsBettingAcumen.com
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 29 September 2002 :  00:47:22  Show Profile
quote:
Originally posted by @tomic

...So you need
to either get rid of the timer refrences in inc_footer.asp or add
the timer code at the top of inc_header.asp to whatever page you
are using instead of inc_header.asp...



...going back to the issue at hand...

i got rid of the 'timer' section in my inc_footer (since it seems like the most logical place to make a change) and that did took the error message out. however, the second problem of the jump to default.asp and it, showing a logon screen (as if i've never entered a user in the 'universal box' at index2.asp) is still a pesky matter.

when you've got time, please do visit: http://www.filipinotayo.net/beta/index2.asp

username=betatester
password=password

btw, did someone changed something inside this forum's ADMIN OPTIONS (or is it just me)? Word-wrap seems to be disabled (I have to scroll all the way to the right to see what I've typed).

Edited by - pentiummx on 29 September 2002 00:52:09
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 29 September 2002 :  00:55:10  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
I see that the "action" of your form is to send it back to index2.asp so if you have none of the necessary login stuff from inc_header.asp it's no wonder it will not work. What i mean is, you display the form just fine but when the form is sent, the place it's sent to does not have the code needed to log you in. What i still don't understand is why not just use inc_header.asp with all the HTML stipped out of it? If you want to have forum functionality outside the forum directory you are going to need almost all of it.

@tomic

SportsBettingAcumen.com
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 29 September 2002 :  01:14:53  Show Profile
quote:
Originally posted by @tomic

I see that the "action" of your form is to send it back to index2.asp so if you have none of the necessary login stuff from inc_header.asp it's no wonder it will not work. What i mean is, you display the form just fine but when the form is sent, the place it's sent to does not have the code needed to log you in. What i still don't understand is why not just use inc_header.asp with all the HTML stipped out of it? If you want to have forum functionality outside the forum directory you are going to need almost all of it.

@tomic



do you mean I use inc_header.asp instead of index2.asp? once modified, do I rename inc_header.asp to index?.asp? how can i fully take advantage of inc_header.asp to satisfy my need to have a 'login' capability outside of the forum?
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 29 September 2002 :  01:31:02  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
No, no no. I mean you inluce inc_header.asp to the top of index2.asp the way you would forum/default.asp but be sure you have only one(1) instance of each include. So do not have config.asp listed on each etc.

@tomic

SportsBettingAcumen.com
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 29 September 2002 :  05:24:44  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
OK, I have updated the readme and the inc_login.asp file. However, this MOD is designed to be used with inc_header.asp for best results. If you do not want to have the html in inc_header.asp then simply delete the html portion so that you can add your own and still retain the necessary code that makes this MOD work.

@tomic

SportsBettingAcumen.com
Go to Top of Page

@tomic
Senior Member

USA
1790 Posts

Posted - 29 September 2002 :  05:58:10  Show Profile  Visit @tomic's Homepage  Send @tomic an ICQ Message
Bah! I already found something I left out which I am going to have to add later but for this to work correctly outside the forum all links in inc_header.asp need strForumURL in them.

For example:

" <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

becomes...

" <a href=""" & strForumURL & "members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

Without this addition you will see your 404 page become one of your most accessed pages.

@tomic

SportsBettingAcumen.com
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 29 September 2002 :  07:16:13  Show Profile
quote:
Originally posted by @tomic

Bah! I already found something I left out which I am going to have to add later but for this to work correctly outside the forum all links in inc_header.asp need strForumURL in them.

For example:

" <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

becomes...

" <a href=""" & strForumURL & "members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

Without this addition you will see your 404 page become one of your most accessed pages.

@tomic



hey! don't you ever sleep? after two-weeks in a row of sleeping at 2am, I just had to get my ZZzzz. I'm starting to look like a racoon. I'll work on this again (with a freshly loaded forum) based on the new information you've given.

Edited by - pentiummx on 29 September 2002 07:22:49
Go to Top of Page

pentiummx
New Member

79 Posts

Posted - 29 September 2002 :  09:26:17  Show Profile
quote:
Originally posted by @tomic

Bah! I already found something I left out which I am going to have to add later but for this to work correctly outside the forum all links in inc_header.asp need strForumURL in them.

For example:

" <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

becomes...

" <a href=""" & strForumURL & "members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

Without this addition you will see your 404 page become one of your most accessed pages.

@tomic



...okay...

i've re-extracted inc_login.zip and re-done my index.asp and
inc_header.asp to include all the 'virtual' sections and changes
you've outlined in the new README.

i've changed the line in inc_header

" <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

with


" <a href=""" & strForumURL & "members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _

Error '404' is what comes out when index.asp is called from the site

My index.asp now looks like this:
<!--#INCLUDE VIRTUAL="beta/forum/config.asp"-->
<!--#INCLUDE VIRTUAL="beta/forum/inc_sha256.asp"-->
<!--#INCLUDE VIRTUAL="beta/forum/inc_func_common.asp"-->
<!--#INCLUDE VIRTUAL="beta/forum/inc_header.asp"-->

<HTML><HEAD><TITLE>UST CAT GCC AA - Entrance</TITLE>
</HEAD>
<BODY background="http://www.filipinotayo.net/ustcatgccaa/images/bkgrnd-ustmain.jpg" bgproperties="fixed">
<P align=center> </P>
<P align=center> </P>
<div align="center">
<center>
<table border="2" width="351" cellpadding="2">
</center>
<tr>
<td width="137" valign="middle" align="center">
<p align="center"><a href="forum/default.asp"><img border="0" src="forum/images/gccaa-entrance.jpeg" width="292" height="300"></a></td>
<center>
<td width="247"><!--#INCLUDE VIRTUAL="beta/forum/inc_login.asp"-->
</tr>
...
...
...


beta site: http://www.filipinotayo.net/beta/

Edited by - pentiummx on 29 September 2002 09:42:26
Go to Top of Page

Nikkol
Forum Moderator

USA
6907 Posts

Posted - 29 September 2002 :  09:45:15  Show Profile
You're getting 404 because it's redirecting to login.asp. The redirection is part
of the inc_header code. It's probably best to have a inc_header that is separate from the
one inside the forum folder.

Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~
Go to Top of Page
Page: of 13 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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