Message at top for users not logged in Message at top for users not logged in
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Message at top for users not logged in

Started by harmzz, December 05, 2006, 03:57:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

harmzz

Hi,


Is there a way to to display a message at the top.. for users that have not logged in and once they have it dissapears... or if possible a message is displayed according to what group they belong in...

thanks



Stramm


Joachim Müller

Or use anycontent.php, with code similar to this:<?php
if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');
if (!
USER_ID) {
        
starttable("100%""Not logged in");

        
?>

        <tr><td class="tableb" >
        Hello guest,<br />
        You're currently not logged in. You should do so now - you're missing the best stuff if you don't.
        <a href="register.php"Register</a> for free if you haven't already. If you have, then <a href="login.php">log in</a>.
        </td></tr>
        <?php
        endtable
();
} else {
    
// your code here that should be executed if a user IS logged in.
}
?>