QUOTE (WhiteWarrior @ Dec 15 2008, 05:23 PM) <{POST_SNAPBACK}>
Post the buddylist coding or tell us what script its for....
else if($action=="buds")
{
addonline(getuid_sid($sid),"Buddies List","lists.php?action=$action");
echo "<card id="main" title="Buddies">";
$uid = getuid_sid($sid);
echo "
";
echo "Your Buddy Message
";
echo parsemsg(getbudmsg($uid), $sid);
echo "
";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$num_items = getnbuds($uid); //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
**
$sql = "SELECT a.lastact, a.name, a.id, b.uid, b.tid, b.reqdt FROM funy_users a INNER JOIN funy_buddies b ON (a.id = b.uid) OR (a.id=b.tid) WHERE (b.uid='".$uid."' OR b.tid='".$uid."') AND b.agreed='1' GROUP BY 2,1 ORDER BY a.lastact DESC LIMIT $limit_start, $items_per_page";**
echo "
";
$items = mysql_query($sql);
echo mysql_error();
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
if($uid!=$item[2])
{
if(isonline($item[2]))
{
$iml = "<img src="images/onl.gif" alt="+"/>";
$uact = "WHERE: ";
$plc = mysql_fetch_array(mysql_query("SELECT place FROM funy_online WHERE userid='".$item[2]."'"));
$uact .= $plc[0];
}else{
$iml = "<img src="images/ofl.gif" alt="-"/>";
$uact = "Last Active: ";
$ladt = date("d m y-H:i:s", $item[0]);
$uact .= $ladt;
}
$lnk = "<a href="index.php?action=viewuser&who=$item[2]&sid=$sid">$iml$item[1]</a>";
echo "$lnk
";
echo "";
$bs = date("d m y-H:i:s",$item[5]);
echo "Buddy since:$bs
";
echo "$uact
";
echo "Says: ";
$bmsg = parsemsg(getbudmsg($item[2]), $sid);
echo "$bmsg
";
$lnk = "<a href="lists.php?action=sendto&who=$item[2]&sid=$sid">pOpup msg to $item[1]</a>";
echo "$lnk
";
echo "";
}
}
}
echo "
";
echo "
";
if($page>1)
{
$ppage = $page-1;
echo "<a href="lists.php?action=buds&page=$ppage&sid=$sid&view=$view">«Prev</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href="lists.php?action=buds&page=$npage&sid=$sid&view=$view">Next»</a>";
}
echo "
$page/$num_pages
";
if($num_pages>2)
{
$rets = "Jump to page<input name="pg" format="*N" size="3"/>";
$rets .= "<anchor>[GO]";
$rets .= "<go href="lists.php" method="get">";
$rets .= "<postfield name="action" value="$action"/>";
$rets .= "<postfield name="sid" value="$sid"/>";
$rets .= "<postfield name="page" value="$(pg)"/>";
$rets .= "</go></anchor>";
echo $rets;
}
echo "
";
////// UNTILL HERE >>
echo "
";
echo "<a href="index.php?action=chbmsg&sid=$sid">";
echo "Buddy Message</a>
";
echo "<a href="index.php?action=main&sid=$sid"><img src="images/home.gif" alt="*"/>";
echo "Home</a>";
echo "
";
echo "</card>";
}