Jump to content
MakeWebGames

help with a message center


skizzy

Recommended Posts

what im trying to do is create an area that lets a player know if they got a new mail or event because my new menu doesn't allow me to do it in the menu here is what i put to make it show if a player got a new event or not

if($ec > 1)

{

print "<hr />

<font color=red>New Events</font>";

}

if($ec > 1)

{

print "

<font color=red>New Events</font>";

}

if($mc > 1)

{

print "<hr />

and it will not show up know matter how many new mail or events you have

Link to comment
Share on other sites

i tried that and it still didn't work

here is all that i got that deals with it

global $db,$c,$ir, $set;

$hc=$set['hospital_count'];

$jc=$set['jail_count'];

$ec=$ir['new_events'];

$mc=$ir['new_mail'];

if($ir['user_level'] > 1)

{

print "<a href='staff.php'>Staff Panel</a><br />\n<hr />";

 

}

if($ec > 1)

{

print "<hr />

<font color=red>New Events</font>";

}

if($ec < 1)

{

print "

<font color=red>New Events</font>";

}

if($mc < 1)

{

print "<hr />

<font color=red>New Mail</font>";

}

Print"<div class='mainmenu'>

Edited by skizzy
Link to comment
Share on other sites

try this and see if it works.

if($ir['user_level'] > 1)
{
print "<a href='staff.php'>Staff Panel</a><br />\n<hr />";
}
echo ($ec > 0)?'<a href="events.php"><font color="red">Events ('.$ec.')</font></a>':'<a href="events.php">Events (0)</a>';
}
echo ($mc > 0)?'<a href="mailbox.php"><font color="red">Mailbox ('.$mc.')</font></a>':'<a href="mailbox.php">Mailbox (0)</a>';
}

 

It should show a number count plus turn red.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...