Disable Friend Request

Started on the old forum in November 2009 · view the original in the archive · old links redirect here

5 replies · 636 views · started 17 years ago · 2 min read

4 participants
Pablo Developer · 164 posts #1

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

Pablo Developer · 164 posts #3

yeah good for u and them convert it then....

paramound Junior · 18 posts #4

nice i think i am going to need this later. lol

Pablo Developer · 164 posts #6

kool bro hope you like it unlike richie and his dumb self cant do that lol

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close