If is member ? If is member ?
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

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.