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 "<small>Disable Friends Request:</small> <select name=\"frequest\" value=\"$frequest[0]\">";
echo "<option value=\"0\">[No]</option>";
echo "<option value=\"1\">[Yes]</option>";
echo "</select><br/>";
====================================
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 "<p align=\"center\">";
$tnick = getnick_uid($who);
echo "<small>$tnick is not Accepting any friend request at this time</small><br/>";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg==1)
{
echo "<small><b><a href=\"inbox.php?action=main&sid=$sid\">$umsg new message</a></b></small><br/>----<br/>";
}
if($umsg>1)
{
echo "<small><b><a href=\"inbox.php?action=main&sid=$sid\">$umsg new messages</a></b></small><br/>----<br/>";
}
echo "<small>";
random_link();
echo "</small>";
echo "<small><a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a></small>";
echo "</p>";
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 "<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=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>$tnick is already your contact<br/>";
}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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your friend list<br/>";
}
}
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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your friend list<br/>";
}
}
else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your contacts <br/>";
}
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your contacts<br/>";
}
}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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error Removing $tnick from your Friends List<br/>";
}
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
}
=========
any problems post here. Works Great at my site
========================
place this in index.php where you prefer its best to put it where you update your profile
echo "<small>Disable Friends Request:</small> <select name=\"frequest\" value=\"$frequest[0]\">";
echo "<option value=\"0\">[No]</option>";
echo "<option value=\"1\">[Yes]</option>";
echo "</select><br/>";
====================================
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 "<p align=\"center\">";
$tnick = getnick_uid($who);
echo "<small>$tnick is not Accepting any friend request at this time</small><br/>";
$tmsg = getpmcount(getuid_sid($sid));
$umsg = getunreadpm(getuid_sid($sid));
if($umsg==1)
{
echo "<small><b><a href=\"inbox.php?action=main&sid=$sid\">$umsg new message</a></b></small><br/>----<br/>";
}
if($umsg>1)
{
echo "<small><b><a href=\"inbox.php?action=main&sid=$sid\">$umsg new messages</a></b></small><br/>----<br/>";
}
echo "<small>";
random_link();
echo "</small>";
echo "<small><a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a></small>";
echo "</p>";
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 "<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=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>$tnick is already your contact<br/>";
}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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your friend list<br/>";
}
}
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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your friend list<br/>";
}
}
else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your contacts <br/>";
}
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>You can't add $tnick to your contacts<br/>";
}
}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<br/>";
}else{
echo "<img src=\"http://coding-talk.com/images/notok.gif\" alt=\"x\"/>Error Removing $tnick from your Friends List<br/>";
}
}
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"http://coding-talk.com/images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p></card>";
}
}
=========
any problems post here. Works Great at my site
Comment