Help, im trying to make a core function for my Mailbox and buddies so i can easily post both options in the index or in any location id like to see those two.
in my core function: i posted these lines:
function mailbox($sid)
{
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg==1)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($umsg new)
";
}
if($umsg>1)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($umsg new messages)
";
}
if($umsg==0)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($tmsg)
";
}
$uid = getuid_sid($sid);
$mybuds = getnbuds($uid);
$onbuds = getonbuds($uid);
echo "<a href=\"lists.php?action=buds&sid=$sid\">Friend s </a>($onbuds/$mybuds)";
$reqs = getnreqs($uid);
if($reqs>0)
{
echo ": <a href=\"lists.php?action=reqs&sid=$sid\">$reqs</a>";
}
$isreq = mysql_fetch_array(mysql_query("SELECT rpen FROM chapel WHERE mid='".$uid."'"));
if($isreq[0]=='1')
{
echo "
<a href=\"chapel.php?action=main&sid=$sid\">Get Wappied</a>";
}
return ?????;
}
---i dont know the return function there. lol. call me studid, it's ok. am noob anyway. ops, by the way, i also included the chapel notice there, anyway, if someone would edit the code, tnx alot!
in my core function: i posted these lines:
function mailbox($sid)
{
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg==1)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($umsg new)
";
}
if($umsg>1)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($umsg new messages)
";
}
if($umsg==0)
{
echo "<a href=\"inbox.php?action=main&sid=$sid\">Mailbo x</a>($tmsg)
";
}
$uid = getuid_sid($sid);
$mybuds = getnbuds($uid);
$onbuds = getonbuds($uid);
echo "<a href=\"lists.php?action=buds&sid=$sid\">Friend s </a>($onbuds/$mybuds)";
$reqs = getnreqs($uid);
if($reqs>0)
{
echo ": <a href=\"lists.php?action=reqs&sid=$sid\">$reqs</a>";
}
$isreq = mysql_fetch_array(mysql_query("SELECT rpen FROM chapel WHERE mid='".$uid."'"));
if($isreq[0]=='1')
{
echo "
<a href=\"chapel.php?action=main&sid=$sid\">Get Wappied</a>";
}
return ?????;
}
---i dont know the return function there. lol. call me studid, it's ok. am noob anyway. ops, by the way, i also included the chapel notice there, anyway, if someone would edit the code, tnx alot!
Comment