Topic: Integration whit my Webpage

Hi, first of all i'm spanish and i don't speak english as well as i'll like, y try write most well i can and i hope you can understand me.

I woul'd like integrate the forums ussers system whit my page and usse only one validation for my web and forums.

As i read in documentation i include the folow lines in my code:

define ('PUN_ROOT', './foro/'); //para pillar a los usuarios!
require PUN_ROOT.'include/common.php';

and i can see and print users but i dont know do more thinks, for example, i want have to protected pages, onli administratos can accede to this pages or text onli can see if you are login.

How can i do these?

Thanks and sorry for my english!!!!

Re: Integration whit my Webpage

Well, for the access only for administrators, do something like this:

if($pun_user['g_id'] != PUN_ADMIN)
exit('You aren't allowed to be here! :o');

Or use message() instead of exit, doesn't matter much.

Re: Integration whit my Webpage

Ok, thank's!!! i'm afraid you dont understand me!!!!

one more think, if i want only print a text if your are loggin? example:
in forums i only can see new post if i'm logged

Re: Integration whit my Webpage

Well, just set the forum's permissions to disallow guest posting. Somewhere else you can use $pun_user['is_guest'], which returns a boolean.

Re: Integration whit my Webpage

Ok thanks! you are a master!

Re: Integration whit my Webpage

The last question!
I wolu'd like to have the possibility to loggin from my index page and after loguin automacly redirect to index. In this moment when I login in forums it redirect to index forum

Re: Integration whit my Webpage

You'll have to change register.php for that I believe.