Pm For New Friends On The List

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

    Pm For New Friends On The List

    Sent me a request for a friend ... when you accept you get automatically PM from me...
    Also, if you decline, you automatically get PM, not admitted to the friends..
    Do you have the code, please ...
    sigpichttp://happy.srecnica.com/web

    #2
    since i havent seen you on here asking for everyone to code everything for you ill code it in a min just give me a sec are u using the wapdesire script

    Comment


      #3
      read below

      Comment


        #4
        upload your genproc and sql here then ill do it

        Comment


          #5
          <div class='quotetop'>QUOTE (looony @ Jan 28 2009, 04:01 PM) <{POST_SNAPBACK}></div>
          upload your genproc and sql here then ill do it[/b]
          ok.. genproc....

          <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>else if($action=="bud")
          {
          $todo = $_GET["todo"];
          $who = $_GET["who"];
          addonline(getuid_sid($sid),"Dodaj/Obrisi Listu Prijatelja","");
          echo "<card id=\"main\" title=\"HAPPY Forum\">";
          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=&#39;".$uid."&#39;, tid=&#39;".$who."&#39;, reqdt=&#39;".time()."&#39;");
          if($res)
          {
          echo "<img src=\"images/ok.gif\" alt=\"o\"/>Molba ce biti poslata $tnick
          ";
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
          ";
          }
          }
          else if(budres($uid, $who)==1)
          {
          $res = mysql_query("UPDATE ibwf_buddies SET agreed=&#39;1&#39; WHERE uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;");
          if($res)
          {
          echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick unet u vasu listu prijatelja!
          ";
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
          ";
          }
          }
          else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
          ";
          }
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
          ";
          }
          }else if($todo="del")
          {



          $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; AND tid=&#39;".$who."&#39;) OR (uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;)");
          if($res)
          {
          echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick obrisan iz vase liste prijatejla!
          ";
          }else{
          echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete obrisati $tnick iz vase liste prijatejla!
          ";
          }

          }
          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
          echo "HAPPY</a>";
          echo "</p></card>";
          </div>

          end sl ...<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>-- --------------------------------------------------------

          --
          -- Table structure for table &#39;ibwf_buddies&#39;
          --

          DROP TABLE IF EXISTS ibwf_buddies;
          CREATE TABLE ibwf_buddies (
          id int(100) NOT NULL auto_increment,
          uid int(100) NOT NULL default &#39;0&#39;,
          tid int(100) NOT NULL default &#39;0&#39;,
          agreed char(1) NOT NULL default &#39;0&#39;,
          reqdt int(100) NOT NULL default &#39;0&#39;,
          PRIMARY KEY (id),
          KEY uid (uid)
          ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

          -- --------------------------------------------------------</div>




          sigpichttp://happy.srecnica.com/web

          Comment


            #6
            Code:
            else if($action=="bud")
            {
            $todo = $_GET["todo"];
            $who = $_GET["who"];
            addonline(getuid_sid($sid),"[b]Dodaj/Obrisi Listu Prijatelja[/b]","");
            echo "<card id=\"main\" title=\"HAPPY Forum\">";
            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=&#39;".$uid."&#39;, tid=&#39;".$who."&#39;, reqdt=&#39;".time()."&#39;");
            if($res)
            {
             $sql = mysql_query("INSERT INTO ibwf_popups SET text=&#39;The User ".$who." has accepeted Your Buddy Request&#39;,byuid=&#39;$sitename&#39;,touid=&#39;$tnick&#39;,timesent=&#39;".time()."&#39;");
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>Molba ce biti poslata $tnick
            ";
            }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
            ";
            }
            }
            else if(budres($uid, $who)==1)
            {
            $res = mysql_query("UPDATE ibwf_buddies SET agreed=&#39;1&#39; WHERE uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;");
            if($res)
            {
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick unet u vasu listu prijatelja!
            ";
            }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
            ";
            }
            }
            else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
            ";
            }
            }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
            ";
            }
            }else if($todo="del")
            {
            
            
            
            $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; AND tid=&#39;".$who."&#39;) OR (uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;)");
            if($res)
            {
             $sql = mysql_query("INSERT INTO private SET text=&#39;The User ".$who." has Declined Your Buddy Request&#39;,byuid=&#39;$sitename&#39;,touid=&#39;$tnick&#39;,timesent=&#39;".time()."&#39;");
            echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick obrisan iz vase liste prijatejla!
            ";
            }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete obrisati $tnick iz vase liste prijatejla!
            ";
            }
            
            }
            echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "HAPPY</a>";
            echo "</p></card>";
            try that i havent tested it and u will have to translate into your langauge

            Comment


              #7
              <div class='quotetop'>QUOTE (looony @ Jan 29 2009, 08:33 AM) <{POST_SNAPBACK}></div>
              Code:
              else if($action=="bud")
              {
              $todo = $_GET["todo"];
              $who = $_GET["who"];
              addonline(getuid_sid($sid),"[b]Dodaj/Obrisi Listu Prijatelja[/b]","");
              echo "<card id=\"main\" title=\"HAPPY Forum\">";
              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=&#39;".$uid."&#39;, tid=&#39;".$who."&#39;, reqdt=&#39;".time()."&#39;");
              if($res)
              {
               $sql = mysql_query("INSERT INTO ibwf_popups SET text=&#39;The User ".$who." has accepeted Your Buddy Request&#39;,byuid=&#39;$sitename&#39;,touid=&#39;$tnick&#39;,timesent=&#39;".time()."&#39;");
              echo "<img src=\"images/ok.gif\" alt=\"o\"/>Molba ce biti poslata $tnick
              ";
              }else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
              ";
              }
              }
              else if(budres($uid, $who)==1)
              {
              $res = mysql_query("UPDATE ibwf_buddies SET agreed=&#39;1&#39; WHERE uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;");
              if($res)
              {
              echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick unet u vasu listu prijatelja!
              ";
              }else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
              ";
              }
              }
              else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
              ";
              }
              }else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
              ";
              }
              }else if($todo="del")
              {
              
              
              
              $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; AND tid=&#39;".$who."&#39;) OR (uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;)");
              if($res)
              {
               $sql = mysql_query("INSERT INTO private SET text=&#39;The User ".$who." has Declined Your Buddy Request&#39;,byuid=&#39;$sitename&#39;,touid=&#39;$tnick&#39;,timesent=&#39;".time()."&#39;");
              echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick obrisan iz vase liste prijatejla!
              ";
              }else{
              echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete obrisati $tnick iz vase liste prijatejla!
              ";
              }
              
              }
              echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
              echo "HAPPY</a>";
              echo "</p></card>";
              try that i havent tested it and u will have to translate into your langauge[/b]
              not work No PM for $who.....Added to the list of friends, but did not receive automatically PM
              sigpichttp://happy.srecnica.com/web

              Comment


                #8
                <div class='quotetop'>QUOTE (srecnica @ Jan 30 2009, 07:14 AM) <{POST_SNAPBACK}></div>
                not work No PM for $who.....Added to the list of friends, but did not receive automatically PM[/b]
                ok can you put you popup sql up

                Comment


                  #9
                  <div class='quotetop'>QUOTE (looony @ Jan 29 2009, 11:27 PM) <{POST_SNAPBACK}></div>
                  ok can you put you popup sql up[/b]


                  Why popup? Why not private sql?<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>-- Struktura tabele `popup`
                  --

                  CREATE TABLE `popup` (
                  `id` int(100) NOT NULL auto_increment,
                  `text` text NOT NULL,
                  `byuid` int(100) NOT NULL default &#39;0&#39;,
                  `touid` int(100) NOT NULL default &#39;0&#39;,
                  `unread` char(1) NOT NULL default &#39;1&#39;,
                  `timesent` int(100) NOT NULL default &#39;0&#39;,
                  PRIMARY KEY (`id`)
                  ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;</div>


                  My popup is no prefix ibwf perhaps is that a problem?
                  sigpichttp://happy.srecnica.com/web

                  Comment


                    #10
                    what table is used to store message data i dont use lava so dont have a clue

                    Comment


                      #11
                      <div class='quotetop'>QUOTE (looony @ Feb 1 2009, 03:37 AM) <{POST_SNAPBACK}></div>
                      what table is used to store message data i dont use lava so dont have a clue[/b]
                      <div class='sqltop'>SQL</div><div class='sqlmain'>-- --------------------------------------------------------

                      --
                      -- Table structure for table &#39;ibwf_private&#39;
                      --

                      [color=blue;font-weight:bold]DROP[/color] TABLE IF EXISTS ibwf_private;
                      [color=blue;font-weight:bold]CREATE TABLE[/color] ibwf_private (
                      id int(100) NOT NULL auto_increment,
                      `text` blob NOT NULL,
                      byuid int(100) NOT NULL default &#39;0&#39;,
                      touid int(100) NOT NULL default &#39;0&#39;,
                      unread char(1) NOT NULL default &#39;1&#39;,
                      timesent int(100) NOT NULL default &#39;0&#39;,
                      starred char(1) NOT NULL default &#39;0&#39;,
                      reported char(1) NOT NULL default &#39;0&#39;,
                      PRIMARY KEY (id)
                      ) ENGINE=MyISAM ;

                      -- -------------------------------------------------------- </div>
                      It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt.
                      ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ !
                      ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.
                      キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

                      Comment


                        #12
                        Code:
                        else if($action=="bud")
                        {
                          $todo = $_GET["todo"];
                          $who = $_GET["who"];
                          addonline(getuid_sid($sid),"[b]Dodaj/Obrisi Listu Prijatelja[/b]","");
                          echo "<card id=\"main\" title=\"HAPPY Forum\">";
                          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=&#39;".$uid."&#39;, tid=&#39;".$who."&#39;, reqdt=&#39;".time()."&#39;");
                                if($res)
                                {
                                    echo "<img src=\"images/ok.gif\" alt=\"o\"/>Molba ce biti poslata $tnick
                        ";
                                }else{
                                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
                        ";
                                }
                            }
                        else if(budres($uid, $who)==1)
                            {
                                $res = mysql_query("UPDATE ibwf_buddies SET agreed=&#39;1&#39; WHERE uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;");
                                if($res)
                                {
                                    echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick unet u vasu listu prijatelja!
                        ";
                        $pmtext = "Ti porucuje da je tvoje prijateljstvo prihvaceno!!!   [br/][br/][small] [b]Ovo je automatska poruka tvog novog prijatelja i ne moras odgovarati na nju[/b][/small]";
                        $tm = time();
                        $res = mysql_query("INSERT INTO ibwf_private SET text=&#39;".$pmtext."&#39;, byuid=&#39;".$uid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
                                }else{
                                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
                        ";
                                }
                            }
                            else{
                                echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
                        ";
                            }
                            }else{
                                echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete uneti $tnick u vasu listu prijatejla!
                        ";
                            }
                          }else if($todo="del")
                          {
                            
                                
                              
                              $res= mysql_query("DELETE FROM ibwf_buddies WHERE (uid=&#39;".$uid."&#39; AND tid=&#39;".$who."&#39;) OR (uid=&#39;".$who."&#39; AND tid=&#39;".$uid."&#39;)");
                              if($res)
                                {
                                    echo "<img src=\"images/ok.gif\" alt=\"o\"/>$tnick obrisan iz vase liste prijatejla!
                        ";
                        $pmtext = "Ti porucuje da je tvoje prijateljstvo nije prihvaceno!!!   [br/][br/][small] [b]Ovo je automatska poruka  i ne moras odgovarati na nju[/b][/small]";
                        $tm = time();
                        $res = mysql_query("INSERT INTO ibwf_private SET text=&#39;".$pmtext."&#39;, byuid=&#39;".$uid."&#39;, touid=&#39;".$who."&#39;, timesent=&#39;".$tm."&#39;");
                                }else{
                                  echo "<img src=\"images/notok.gif\" alt=\"x\"/>Nemozete obrisati $tnick iz vase liste prijatejla!
                        ";
                                }
                        
                          }
                          echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
                        echo "HAPPY</a>";
                          echo "</p></card>";
                        }
                        I made the code ... This code automtik PM friend is correct...working.... Thanks guys
                        sigpichttp://happy.srecnica.com/web

                        Comment


                          #13
                          here are one in english ive just done it fast so dnt know if everything are right
                          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>";
                          }
                          ________________
                          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

                          Working...
                          X