help in this code

Started on the old forum in January 2010 · view the original in the archive · old links redirect here

2 replies · 299 views · started 16 years ago · 1 min read

2 participants
godzilla Developer · 119 posts #1

hello.i want to change a code in this.

i want to send msg from user id 1 instead of that user who sent a buddy request.

help please,......

$who = $_GET["who"];
     $whonick = getnick_uid($sid); $byuid = getuid_sid($sid);
    $unick=getnick_sid($sid);
   $whonick = getnick_uid($uid);
 $user = getnick_sid($sid);
 $tnick = getnick_uid($who);
mysql_query("INSERT INTO ibwf_private SET text='".$user." Has sent you a Friend Request![br/][br/][u]This is an auto PM please do not reply[/u]".$pmtext."', byuid='".$byuid."', touid='".$who."', unread='1', timesent='".time()."'");
riderz Lead · 975 posts #2

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


Jacques jacques@gw-designs.co.za http://coding.biz.tm Come join and lets make it a place to learn all the noobies how to code


NEVER FORGET TO CLICK THE TANX BUTTON IF U LIKE WHAT IM SHARING OR HELPING WITH

godzilla Developer · 119 posts #3

i have that.this is what i posted.

i want msg to be sent by user id 1 instead of that user who try to adding buddy.

help please some1.

thanks

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