Create a row in ibwf_users frequest int 1
place this in index.php where you prefer its best to put it where you update your profile
echo "Disable Friends Request: <select name="frequest" value="$frequest[0]">";
echo "<option value="0">[No]</option>";
echo "<option value="1">[Yes]</option>";
echo "</select> ";
add to Genproc acton= "bud"
$frequest= mysql_fetch_array(mysql_query("SELECT frequest FROM ibwf_users WHERE id='".$who."'")); if($friendreq[0]=='1') {
echo "<card id="main" title="Friend Request Not Sent">"; echo " ";
$tnick = getnick_uid($who); echo "$tnick is not Accepting any friend request at this time ";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg==1)
{
echo "<a href="inbox.php?action=main&sid=$sid">$umsg new message</a>
"; } if($umsg>1) { echo "<a href="inbox.php?action=main&sid=$sid">$umsg new messages</a>
"; }
echo ""; random_link(); echo ""; echo "<a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/home.gif" alt="*"/>"; echo "Home</a>"; echo " "; echo "</card>";
}else{
$todo = $_GET["todo"]; $who = $_GET["who"]; $whonick = getnick_uid($who); addonline(getuid_sid($sid),"Sending $whonick Friend Request",""); echo "<card id="main" title="Adding/Removing Friend">"; echo " "; //$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="http://coding-talk.com/images/notok.gif" alt="x"/>$tnick is already your contact "; }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="http://coding-talk.com/images/ok.gif" alt="o"/>A Friend request has been sent to $tnick "; }else{
echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>You can't add $tnick to your friend 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="http://coding-talk.com/images/ok.gif" alt="o"/>$tnick Added to your friend list successfully
";
}else{
echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>You can't add $tnick to your friend list
";
}
}
else{
echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>You can't add $tnick to your contacts
";
}
}else{
echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>You can't add $tnick to your contacts
";
}
}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=\"http://coding-talk.com/images/ok.gif\" alt=\"o\"/>Decline/Removed $tnick's Friend Request
";
}else{ echo "<img src="http://coding-talk.com/images/notok.gif" alt="x"/>Error Removing $tnick from your Friends List "; }
} echo "<a href="index.php?action=main&sid=$sid"><img src="http://coding-talk.com/images/home.gif" alt="*"/>"; echo "Home</a>"; echo " </card>"; } }
any problems post here. Works Great at my site