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 / Current Version (Old)
 Getting forum cookie variables for further uses
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

LilPeck
Starting Member

3 Posts

Posted - 28 June 2008 :  08:10:10  Show Profile
I want to carry the forum login over to new pages I'm writing; I'm using the forum and it's db as a starting point for a site with articles and comments.

I searched here and couldn't find the info I needed but this script got it for me:

<%
Dim x,y

For Each x in Request.Cookies
Response.Write("<p>")
If Request.Cookies(x).HasKeys Then
For Each y in Request.Cookies(x)
Response.Write(x & ":" & y & "=" & Request.Cookies(x)(y))
Response.Write("<br />")
Next
Else
Response.Write(x & "=" & Request.Cookies(x) & "<br />")
End If
Response.Write "</p>"
Next
%>

Having gotten the cookie name and the key
(request.cookies("Snitz00User")("Name")) with the script above then I saw that I can put the User ID primary key into a new table field as needed with something like this:

<%
strUserName = (request.cookies("Snitz00User")("Name"))
response.write strUserName
%>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open server.mappath("/snitz_forums_2000.mdb")

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT MEMBER_ID FROM FORUM_MEMBERS WHERE M_NAME='" & strUserName & "'", conn

do until rs.EOF
for each x in rs.Fields
Response.Write(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br />")
next
Response.Write("<br />")
rs.MoveNext
loop

rs.close
conn.close
%>


Here's how to get a unix timestamp as used in the forum:

<%
Udate = DateDiff("s", "01/01/1970 00:00:00", Now())
response.write"<BR>Udate: " & Udate
%><

HuwR
Forum Admin

United Kingdom
20550 Posts

Posted - 28 June 2008 :  08:45:09  Show Profile  Visit HuwR's Homepage
there are numerous posts on site integration, so maybe you didn't search for the right things<
Go to Top of Page

LilPeck
Starting Member

3 Posts

Posted - 28 June 2008 :  13:32:17  Show Profile
quote:
Originally posted by HuwR

there are numerous posts on site integration, so maybe you didn't search for the right things



You're very welcome.<
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.06 seconds. Powered By: Snitz Forums 2000 Version 3.4.07