1

Topic: help me

I it is necessary to on main to page of my site menu for not autorithation or for not registered of the users here is this item, which already ready:

if ($pun_user['is_guest'])
      exit('<center>You are not registered!<br><a href="forum/login.php">LOGIN</a> | <a href="forum/register.php">REGISTRATION</a></center>');

for registered users "WELCOME [USER NICK WITH LINK TO USER PROFILE]" - I do not know. here is code:

if ($pun_user['username'])
      exit('<center>WELCOME...</center>');

script:

<?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';

if ($pun_user['username'])
      exit('<center>WELCOME</center>');

if ($pun_user['is_guest'])
      exit('<center>You are not registered!<br><a href="forum/login.php">LOGIN</a> | <a href="forum/register.php">REGISTRATION</a></center>');
?>

Please, help me!
P.S.
I'm very bad speak english sad

Re: help me

you just want the welcome message for registered users?

if ($pun_user['username'])
      echo '<center>WELCOME <a href="forum/profile.php?id='.$pun_user['id'].'">'.$pun_user['username'].'</a></center>';

3

Re: help me

yep... if user registered... if not:

if ($pun_user['is_guest'])
      exit('<center>You are not registered!<br><a href="forum/login.php">LOGIN</a> | <a href="forum/register.php">REGISTRATION</a></center>');

sorry for bad english big_smile

Re: help me

Erm, you'd want to do
if (!$pun_user['is_guest'])

5

Re: help me

if user is guest, it is displayed:

WELCOME
Guest
You are not registered!
LOGIN | REGISTRATION

here code:

<?php
define('PUN_ROOT', './forum/');
define('PUN_TURN_OFF_MAINT', 1);
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';

if ($pun_user['username'])
      echo '<center>WELCOME<br><b><a href="forum/profile.php?id='.$pun_user['id'].'">'.$pun_user['username'].'</a></b></center>';

if ($pun_user['is_guest'])
      exit('<center>You are not registered!<br><a href="forum/login.php">LOGIN</a> | <a href="forum/register.php">REGISTRATION</a></center>');
?>

6

Re: help me

I want to... if user GUEST then displayed:

You are not registered!
LOGIN | REGISTRATION

Re: help me

well whats the problem?

8

Re: help me

Connorhd wrote:

well whats the problem?

when user is guest it's displayed:

WELCOME
Guest
YOU ARE NOT REGISTERED!
LOGIN | REGISRERED

I need:

YOU ARE NOT REGISTERED!
LOGIN | REGISRERED

____________________________

Re: help me

Smartys wrote:

Erm, you'd want to do
if (!$pun_user['is_guest'])

instead of if ($pun_user['username'])