find this code in genproc
////////////////////////////
else if($action=="bud")
{
$todo = $_GET["todo"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Adding/Removing Buddy","");
echo "<card id=\"main\" title=\"Buddy\">";
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$unick = getnick_uid($uid);
$tnick = getnick_uid($who);
if($todo=="add")
{
if(budres($uid,$who)!=3){
if(arebuds($uid,$who))
{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>$tnick is already your buddy";
}else if(budres($uid, $who)==0)
{
$res = mysql_query("INSERT INTO ibwf_buddies SET uid='".$uid."', tid='".$who."', reqdt='".time()."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"o\"/>A request has been sent to $tnick";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You can't add $tnick to your buddy list!";
}
}
else if(budres($uid, $who)==1)
{
$res = mysql_query("UPDATE ibwf_buddies SET agreed='1' WHERE uid='".$who."' AND tid='".$uid."'");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick Have accepted your request!";
$pmtext = "Your Buddy Request Have been Accepted** [br/][br/]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$who."', timesent='".$tm."'");
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>Added to your buddy list successfully!";
}
}
else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You can't add $tnick to your buddy list!";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You can't add $tnick to your buddy list!";
}
}else if($todo="del")
{
$res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid='".$uid."' AND tid='".$who."') OR (uid='".$who."' AND tid='".$uid."')");
if($res)
{
echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick Is no longer your friend";
$pmtext = "Dont wona be friends!** [br/][br/]";
$tm = time();
$res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$who."', timesent='".$tm."'");
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>can't remove $tnick from your buddy list!";
}
}
echo "</p></card>";
}
this is the code i have but it get send from the one who wona be ur friend why u want it to be from user id 1