forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: DaBe on January 25, 2008, 08:43:11 pm

Title: a php site only for member
Post by: DaBe on January 25, 2008, 08:43:11 pm
Hello

How I can make a normal php page only for the member avaible?


Title: Re: a php site only for member
Post by: Nibbler on January 25, 2008, 08:45:35 pm
You need to include coppermine's include/init.inc.php and then check that the USER_ID constant is nonzero.
Title: Re: a php site only for member
Post by: Joachim Müller on January 26, 2008, 02:57:58 am
Something like
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('Hello member');
if (!
USER_ID) {
    
cpg_die(ERROR$lang_errors['access_denied'], __FILE____LINE__);
}
?>

Your custom content here
<?php
pagefooter
();
?>
should do the trick.