Forums
This topic is locked
Using Sessions and Level's to control PDF access
22 May 2003 20:06:54 Tim Bour posted:
I purchased PHP Login Suite and I am using PHPLS04 to login users and control content access by session and level variables. One of my "controlled" access pages loads a PDF file. I was wondering if there is a way to control the access to the PDF file via the users session and level variable. Thanks. Replies
Replied 29 May 2003 13:18:31
29 May 2003 13:18:31 Russell Marshall replied:
If I understand you correctly this is one way you could do it.
Place the pdf upload link in a show/hide region area.
Create a recordset (eg RS_VarPresent) that checks for the session or level variable based on a login and returns a field eg level from the table.
Then use the show region behaviour "show region if recordset RS_VarPresent is not empty"
The result will be that anyone with the correct level of access will be able to view and use the pdf link and anyone alse viewing the page will not see the link.
I hope this helps.
Davrus
Russell
Place the pdf upload link in a show/hide region area.
Create a recordset (eg RS_VarPresent) that checks for the session or level variable based on a login and returns a field eg level from the table.
Then use the show region behaviour "show region if recordset RS_VarPresent is not empty"
The result will be that anyone with the correct level of access will be able to view and use the pdf link and anyone alse viewing the page will not see the link.
I hope this helps.
Davrus
Russell