Can anyone help me out. I would like to have NukePHP as a members section. I have a sizeable website [60 odd pages ATM] parts of which I would only like the visitor to see if they are a member and are logged in.
I would rather not go to the length of adding each page to the Content section, but would rather let the visitor have an access link through a custom block only visible when logged in, but that doesn't stop someone typing in the full URL to the directory.
What I need is I think is a small php script inserted in the page head to check the visitor is logged in E.G
Check who is trying to view the page,
Check
are they Logged_in, if true show content,
else
show a msg and link to log_in.
I have pored over the nuke site looking for clues on how to do this, but being new I can't figure out how to do it. Any help greatfully received, thanx for your time.
Raven General
Joined: Mar 22, 2003
Posts: 5233
Location: USA
Posted:
Fri Jul 18, 2003 8:09 am
mainfile.php holds the key.
function is_user($user) will return true if the $user is registered.
function online() will demonstrate how to read the sessions table to see if the user is online or not.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum