Posted by Manuel
2014-04-03

Hi Tom, thanx for the reply...but i was looking to somehow add the session in a php file i have created in the same staff folder which i do not wish someone access unless is logged in in the address book.
Thanx!
Posted by Tom
2014-04-04

OK, put this code at the top of your page.
<?php
error_reporting( 22527 );
$sig = "AuthSessionKey:(" . dirname(__FILE__) .
"/app/cls_auth_base.inc.php)";
@session_start();
if (!(
( isset($_SESSION[$sig] ) ) &&
( $_SESSION[$sig] == $sig )
)) {
echo "Unauthorized Access";
exit;
}
?>
If you are not logged in, you will see "Unauthorized Access"