Author |
Topic  |
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
Posted - 12 July 2007 : 09:26:35
|
Let me try to explain everything in more detail. I don't think I have doing a very good job at that. 
I have a members only section of the forum called VIP Lounge (Allowed Members Only Hidden).
In a post within the VIP Lounge is a link to a page outside of the forum (but in the same domain). I'll call it members.asp. The link in the post points to members.asp
I want the link in that post to be the only way to be able to access the members.asp page. I thought the code in my first post would work but I learned that if you visit that page from any topic within any forum you could get to it. I want the members.asp page to somehow recognize exactly which post the link came from before it lets a person in. This will prevent VIP members from sharing the page with a non VIP member.
Not sure if I made more sense or not, but I'm trying.  |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 12 July 2007 : 09:59:22
|
So they don't have to have followed the link from that particular topic, they just need to be on the allowed members list for the forum the topic is posted in? If that's the case then the easiest way to do it is to set your cookies to website, grab their username & password from the cookie in your non-forum page, use them to get their MEMBER_ID from the MEMBERS table and then check that against the ALLOWED_MEMBERS table.
If you just pass the TOPIC_ID through the querystring to your non-forum page then VIP members can still provide non-VIP members with the URL.
|
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.” |
Edited by - Shaggy on 12 July 2007 10:00:14 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 12 July 2007 : 10:44:52
|
What database are you using for this forum?
|
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.” |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 12 July 2007 : 10:55:59
|
OK, gimme a minute and I'll throw something together for you. In the meantime, you can set your forum's cookies to website.
|
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.” |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 12 July 2007 : 11:19:52
|
Here you go:dim objConn,strName,strPass,objRs
set objConn=server.createobject("ADODB.Connection")
objConn.open "your connection string"
strName=request.cookies("Snitz00User")("Name")
strPass=request.cookies("Snitz00User")("Pword")
set objRs=objConn.exeute("SELECT * FROM FORUM_ALLOWED_MEMBERS A,FORUM_MEMBERS M WHERE M.M_NAME='"&strName&"' AND M.M_PASSWORD='"&strPass&"' AND M.M_STATUS=1 AND A.FORUM_ID=1 AND A.MEMBER_ID=M.MEMBER_ID")
if not objRs.eof then
Page Content
else
Error Message
end if
objRs.close:set objRs=nothing:objConn.close:set objConn=nothing You'll need to change all the parts I've highlighted in green to suit your needs and, if you're going to redirect to another page instead of displaying an error message, you'll need to destroy the recordset and database connection before doing so.
|
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.” |
Edited by - Shaggy on 12 July 2007 11:45:53 |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 12 July 2007 : 11:46:01
|
That's the entire page, just drop your contents in where I've highlighted "Page Contents".
|
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.” |
 |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
ILLHILL
Junior Member
 
Netherlands
341 Posts |
|
leatherlips
Senior Member
   
USA
1838 Posts |
|
Topic  |
|