If is member ? If is member ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

If is member ?

Started by antisa33, August 23, 2006, 11:08:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

antisa33

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


Nibbler


<?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
();
?>


antisa33


Joachim Müller

...or use cpg_die instead of the message box plus pagefooter plus die.