Pm To All Club Members

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

    #16
    before you ask here is the accept all version of it lol
    Code:
    else if($action=="accall")
    {
      
      $clid = $_GET["clid"];
      
      addonline(getuid_sid($sid),"Adding a member to club","");
          echo "<head>";
          echo "<title>$sitename</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
        echo "<p align=\"center\">";
        $uid = getuid_sid($sid);
        $cowner = mysql_fetch_array(mysql_query("SELECT owner, name FROM ibwf_clubs WHERE id=&#39;".$clid."&#39;"));
        if($cowner[0]==$uid){
    
    $sql = "SELECT uid  FROM ibwf_clubmembers WHERE clid=&#39;".$clid."&#39; AND accepted=&#39;0&#39;";
    $items = mysql_query($sql);
    while ($item = mysql_fetch_array($items))
        {
    
    $pmtext = "You are now a member of the [club=$clid]$cowner[1] [/club] club[br/][br/][small](this is an auto pm)[/small]";
    $tm = time();
    $res = mysql_query("INSERT INTO ibwf_private SET text=&#39;".$pmtext."&#39;, byuid=&#39;".$uid."&#39;, touid=&#39;".$item[0]."&#39;, timesent=&#39;".$tm."&#39;");
    }
    if($res){
            $res = mysql_query("UPDATE ibwf_clubmembers SET accepted=&#39;1&#39; WHERE clid=&#39;".$clid."&#39;");
            if($res)
            {
    
                echo "<img src=\"../images/ok.gif\" alt=\"o\"/>All Members Accepted";
            }else{
                echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!";
            }
            }else{
                echo "<img src=\"../images/notok.gif\" alt=\"x\"/>This club ain&#39;t yours";
            }
    }
      echo "
    
    [b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
      echo "</p>";
      echo "</body>";
    }
    i couldnt be bothered to test again lol

    Comment


      #17
      many thanks .. this work ... thanks beybe
      sigpichttp://happy.srecnica.com/web

      Comment


        #18
        do u have a code in the (pmto all code) in ownercp that u can send pm to clubs members and males and females seperate ??
        ________________
        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


          #19
          Guys help me fast out here please im using this code in genproc when member join club the owner of the club get the request but when i want to accept the person he must get the pm say u are now member of the club but it dnt go to the member but to the club owner
          Code:
          else if($action=="accall")
          {
          
          $clid = $_GET["clid"];
          
          addonline(getuid_sid($sid),"Adding a member to club","");
          echo "<head>";
          echo "<title>$sitename</title>";
          echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
          echo "</head>";
          echo "<body>";
          echo "<p align=\"center\">";
          $uid = getuid_sid($sid);
          $cowner = mysql_fetch_array(mysql_query("SELECT owner, name FROM ibwf_clubs WHERE id='".$clid."'"));
          if($cowner[0]==$uid){
          
          $sql = "SELECT $uid FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='0'";
          $items = mysql_query($sql);
          while ($item = mysql_fetch_array($items))
          {
          
          $pmtext = "You are now a member of the [club=$clid]$cowner[1] [/club] club[br/][br/][small](this is an auto pm)[/small]";
          $tm = time();
          $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$item[0]."', timesent='".$tm."'");
          }
          if($res){
          $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."'");
          if($res)
          {
          echo "<img src=\"../images/ok.gif\" alt=\"o\"/>All Members Accepted";
          }else{
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!";
          }
          }else{
          echo "<img src=\"../images/notok.gif\" alt=\"x\"/>This club ain't yours";
          }
          }
          echo "
          
          0 <a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
          echo "</p>";
          echo "</body>";
          }
          ________________
          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


            #20
            Code:
            else if($action=="reqjc")
            {
              $uid = getuid_sid($sid);
              $clid = $_GET["clid"];
              addonline(getuid_sid($sid),"<b>Uclani se u klub</b>","");
              echo "<card id=\"main\" title=\"Uclani se u klub\">";
                echo "<p align=\"center\">";
                $uid = getuid_sid($sid);
                $isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'"));
                if($isin[0]==0){
                    $res = mysql_query("INSERT INTO ibwf_clubmembers SET uid='".$uid."', clid='".$clid."', accepted='0', points='0', joined='".time()."'");
                    if($res)
                    {
                        echo "<img src=\"images/ok.gif\" alt=\"o\"/>Zahtev je poslat vlasniku kluba koji ce ti ubrzo odgovoriti";
            $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner FROM ibwf_clubs WHERE id='".$clid."'"));
            $pmtext = "Zeli da se uclani u klub   [club=$clid]$clinfo[0] [/club][br/][br/][small] [b]Ako hoces da primis novog clana klikni na link kluba[/b][/small]";
            $tm = time();
            $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$clinfo[1]."', timesent='".$tm."'");
                    }else{
                        echo "<img src=\"images/notok.gif\" alt=\"x\"/>Greska na bazi podataka!";
                    }
                    }else{
                        echo "<img src=\"images/notok.gif\" alt=\"x\"/>Ti si ili vec clan kluba ili tvoj poslati zahtev jos nije potvrdjen";
                    }
                echo "<br/><br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "HAPPY</a>";
              echo "</p>";
              echo "</card>";
            }
            Code:
            else if($action=="acm")
            {
              //$uid = getuid_sid($sid);
              $clid = $_GET["clid"];
              $who = $_GET["who"];
              addonline(getuid_sid($sid),"<b>Dodaj Clana U Klub</b>","");
              echo "<card id=\"main\" title=\"Dodaj Clana U Klub\">";
                echo "<p align=\"center\">";
                $uid = getuid_sid($sid);
                $cowner = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'"));
                if($cowner[0]==$uid){
                    $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."' AND uid='".$who."'");
                    if($res)
                    {
                        echo "<img src=\"images/ok.gif\" alt=\"o\"/>Clan uspesno dodat u vas klub!";
            $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner FROM ibwf_clubs WHERE id='".$clid."'"));
            $pmtext = "Prihvaceno je uclanjenje u klub   [club=$clid]$clinfo[0] [/club][br/][br/][small] [b][i]Ovo je automatska poruka vlasnika kluba i ne treba odgovarati na nju[/i][/b][/small]";
            $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\"/>Greska na bazi podataka!";
                    }
                    }else{
                        echo "<img src=\"images/notok.gif\" alt=\"x\"/>Ovaj klub nije vas!";
                    }
                echo "<br/><br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "HAPPY</a>";
              echo "</p>";
              echo "</card>";
            }
            else if($action=="accall")
            {
              //$uid = getuid_sid($sid);
              $clid = $_GET["clid"];
              
              addonline(getuid_sid($sid),"<b>Dodaje Clanove U Klub</b>","");
              echo "<card id=\"main\" title=\"Dodaj Clana U Klub\">";
                echo "<p align=\"center\">";
                $uid = getuid_sid($sid);
                $cowner = mysql_fetch_array(mysql_query("SELECT owner, name FROM ibwf_clubs WHERE id='".$clid."'"));
                if($cowner[0]==$uid){
            
            $sql = "SELECT uid  FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='0'";
            $items = mysql_query($sql);
            while ($item = mysql_fetch_array($items))
                {
            
            $pmtext = "Uclanjenje u klub  [club=$clid]$cowner[1] [/club]  je  prihvaceno! [br/][br/][small][b][i]Ovo je automatska poruka vlasnika kluba i ne tereba odgovarati na nju[/i][/b][/small]";
            $tm = time();
            $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$uid."', touid='".$item[0]."', timesent='".$tm."'");
            }
            if($res){
                    $res = mysql_query("UPDATE ibwf_clubmembers SET accepted='1' WHERE clid='".$clid."'");
                    if($res)
                    {
            
                        echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Svi zahtevi su prihvaceni";
                    }else{
                        echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Greska data baze!";
                    }
                    }else{
                        echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Ovaj klub nije tvoj";
                    }
            }
              echo "<br/><br/><a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
            echo "HAPPY</a>";
              echo "</p>";
              echo "</card>";
            }
            Translate to English please
            sigpichttp://happy.srecnica.com/web

            Comment

            Working...
            X