2
include this snippet at the header:
include('mainfile.php'); //change to correct path to mainfile.php
//Check that the current person is logged in:
if (! $xoopsUser) {
//User is not logged in
redirect_header(XOOPS_URL.'/user.php', 3, _NOPERM);
exit();
}
redirect_header takes 3 parameters:
1. The url to go to
2. the number of seconds to display the message page
3. the message that should be displayed - this one tells the user they have no permission to access the current page.