coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: antisa33 on August 23, 2006, 11:08:20 PM

Title: If is member ?
Post by: antisa33 on August 23, 2006, 11:08:20 PM
Hello
I have done a webpage with this code :

Quote
<?php

define('IN_COPPERMINE', true);
require('include/init.inc.php');
pageheader('test');
?>

  <?php

pagefooter();
?>

How to allow this page just for members ?
(if the guest is not a member, display a message : you must be a member to see this webpage.)
Thanks

Title: Re: If is member ?
Post by: Nibbler on August 23, 2006, 11:19:10 PM

<?php

define
('IN_COPPERMINE'true);
require(
'include/init.inc.php');
pageheader('test');

if (!
USER_ID
{
    
msg_box('Login''You must be logged in to use this feature');
    
pagefooter();
    die();
}
?>


  <?php

pagefooter
();
?>

Title: Re: If is member ?
Post by: antisa33 on August 23, 2006, 11:34:01 PM
Thanks a lot  :)
Title: Re: If is member ?
Post by: Joachim Müller on August 24, 2006, 04:53:42 AM
...or use cpg_die instead of the message box plus pagefooter plus die.