This topic is locked

Log

11/21/2006 11:36:00 AM
PHPRunner General questions
R
Rashed author

Hello all,
I am new to PHP and trying to develop this project http://test.nevcoeducation.com.
User name: guide

Password: password
Everything works well. But, Instead of giving every body to download the entire guide, I would like to password protect each guide. For an example, when you click on HCA14 print_guide you will see a login window where you just have to enter a password which will be provided.
Any help will be greatly appreciated.
Rashed
By the way.......PHPRunner is a great program.

J
Jane 11/22/2006

Rashed,
to forbid downloading files for unregistered users open ..._download.php file, find following code snippet:

if(!@$_SESSION["UserID"] || !CheckSecurity(@$_SESSION["OwnerID"],"Search"))

{

header("Location: login.php");

return;

}



and replace it with this one:

if(!@$_SESSION["UserID"] || !CheckSecurity(@$_SESSION["OwnerID"],"Search") || $_SESSION["UserID"]=="Guest")

{

header("Location: login.php");

return;

}



Don't forget to add guest account on the Advanced security settings dialog on the Security tab.

R
Rashed author 11/22/2006

Jane,
Thank you very much for the quick replay.