help in this code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help in this code

    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,......

    PHP Code:
    $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()."'"); 

    #2
    find this code in genproc
    Code:
    ////////////////////////////
       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

    Comment


      #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
      Last edited by godzilla; 23.01.10, 10:08.

      Comment

      Working...
      X