Pm To All Club Members

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

19 replies · 1,248 views · started 18 years ago · 1 min read

TL;DR · summary of 19 replies
  • -srecnica suggested a code that would send a PM to all members of a club, including the owner.
  • -The code was not provided in the thread and remained unresolved on how to modify it for the specific requirement of sending a notification to new club members rather than just the owner.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

6 participants
ionutxp Developer · 137 posts #3

here :

else if($action=="gocl")
{
  $clid = $_GET["clid"];
  $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
    addonline(getuid_sid($sid),"Viewing A Club","");
    $clnm = htmlspecialchars($clinfo[0]);
    echo "<card id=\"main\" title=\"$clnm\">";

    echo "<p align=\"center\">";
    echo "[size="1"][b]$clnm[/b][/size]
";
    if(trim($clinfo[4])=="")
    {
      echo "<img src=\"images/logo.jpg\" alt=\"logo\"/>";
    }else{
        echo "<img src=\"$clinfo[4]\" alt=\"logo\"/>";
    }
    echo "</p>";
    echo "

[size="1"]";
    echo "Club ID: [b]$clid[/b]
";
    $uid = getuid_sid($sid);
    $cango = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$uid."' AND accepted='1'"));
    echo "Owner: <a href=\"index.php?action=viewuser&who=$clinfo[1]&sid=$sid\">".getnick_uid($clinfo[1])."</a>
";
      $mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'"));
      echo "Members: <a href=\"lists.php?action=clmem&sid=$sid&clid=$clid\">$mems[0]</a>
";
      echo "Created On: ".date("d/m/y", $clinfo[6])."
";
      echo "Plusses credit: $clinfo[5]
";
      $fid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_forums WHERE clubid='".$clid."'"));
      $rid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_rooms WHERE clubid='".$clid."'"));
      $tps = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$fid[0]."'"));
      $pss = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$fid[0]."'"));
      if(getuid_sid($sid)==$clinfo[1])
      {
      echo "<a href=\"index.php?action=pmallmem&sid=$sid&clid=$clid\">PM to All Club Members</a>
";
  }
    if(($cango[0]>0)||isowner($uid))
    {
                if($clid==161) {
            echo "<a href=\"http://space.sihalawap.com/modcp.php?action=clubup;sid=$sid&clid=$clid\">Uploader</a>
";
    }
            if($clid==248) {
            echo "<a href=\"http://space.sihalawap.com/modcp.php?action=clubup2;sid=$sid&clid=$clid\">Uploader</a>
";
    }
        $noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE clid='".$clid."'"));
        echo "
<a href=\"lists.php?action=annc&sid=$sid&clid=$clid\"><img src=\"images/annc.gif\" alt=\"!\"/>Announcements($noa[0])</a>
";
        $noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE rid='".$rid[0]."'"));
        echo "<a href=\"chat.php?sid=$sid&rid=$rid[0]\"><img src=\"images/chat.gif\" alt=\"*\"/>$clnm Chat($noa[0])</a>
";
        echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid[0]\"><img src=\"images/1.gif\" alt=\"*\"/>$clnm Forum($tps[0]/$pss[0])</a>

";
        $ismem = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".getuid_sid($sid)."'"));
        
        if($ismem[0]>0)
        {
            //unjoin 
            if($clinfo[1]!=$uid)
            {
                echo "<a href=\"genproc.php?action=unjc&sid=$sid&clid=$clid\">Unjoin Club</a>";
            }
        }else{
            echo "<a href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
        }
        if(isowner(getuid_sid($sid)))
        {
            echo "
<a href=\"admincp.php?action=club&sid=$sid&clid=$clid\">Admin Tools</a>";
        }
        if($clinfo[1]==$uid)
      {
        //club owner
        $mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='0'"));
        echo "
<a href=\"lists.php?action=clreq&sid=$sid&clid=$clid\">»Requests($mems[0])</a>
";
      }
    }else{
      echo "Topics: [b]$tps[0][/b], Posts: [b]$pss[0][/b]
";
      echo "[b]Description:[/b]
";
      echo htmlspecialchars($clinfo[2]);
      echo "

";
      echo "[b]Rules:[/b]
";
      echo htmlspecialchars($clinfo[3]);
      echo "

";
      echo "Seems Good? <a href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
    }
    echo "[/size]</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}
else if($action=="pmallmem")
{
    $clid=$_GET["clid"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
        addonline(getuid_sid($sid),"PMing Club Members","index.php?action=$action");
    echo "<card id=\"main\" title=\"sihalawap.com\">";
    echo "<p align=\"center\">";
    echo "[b]PM All Members Of The $clinfo[0] Club[/b]

";
    echo "Please enter the message You Wish To Send To ALL Members Below
";
    echo "<input name=\"pmtext\" maxlength=\"500\"/>
";
    echo "<anchor>SEND<go href=\"index.php?action=sendclpm&sid=$sid\" method=\"post\">";
    echo "<postfield name=\"clid\" value=\"$clid\"/>";
    echo "<postfield name=\"pmtext\" value=\"$(pmtext)\"/>";
    echo "</go></anchor>
</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
     echo "</p>";
    echo "</card>";
    }
else if($action=="sendclpm")
{
    $clid=$_POST["clid"];
    $pmtext=$_POST["pmtext"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
    $owner = $clinfo[1];
        addonline(getuid_sid($sid),"PMing Club Members","index.php?action=$action");
    echo "<card id=\"main\" title=\"sihalawap.com\">";
    echo "<p align=\"center\">";
    echo "[b]PM All Members Of The $clinfo[0] Club[/b]

";
    $mems = mysql_query("SELECT uid FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'");
    while($row=mysql_fetch_array($mems))
    {
      $tm = time();
  $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$owner."', touid='".$row[0]."', timesent='".$tm."'");
}
  if($res)
  {

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PMs sent successfully

";
    echo parsepm($pmtext, $sid);
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM

";
  }
  echo "</p>";    
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
     echo "</p>";
    echo "</card>";
    }

Hate romains that take codes from here and tell to all that they had made that External image (may be gone)

Guest #4

Could U post the html code

srecnica Developer · 174 posts #6

Code automatically PM to the owner of the club received in the club. Some claim that it received in the club and to get the PM of the owner when it receives in the club? Whether someone can do this code? please 🙂

ionutxp Developer · 137 posts #7

when a member register to a club the owner to recive a pm ? 😀

Hate romains that take codes from here and tell to all that they had made that External image (may be gone)

srecnica Developer · 174 posts #8

QUOTE (ionutxp @ Jan 10 2009, 09:15 PM) <{POST_SNAPBACK}>

when a member register to a club the owner to recive a pm ? :D

Yes, just this 🙂 as when a member registers on the forum and receive PM welcome from the owner of the Forum, so that a new member of the club receives from the owner of the club PM...

something else Fellow · 2,296 posts #9

something like this:

else if($action=="reqjc")
{
  $uid = getuid_sid($sid);
  $clid = $_GET["clid"];
  addonline(getuid_sid($sid),"Joining A Club","");
  echo "<head>";
  echo "<title>$sitename</title>";
  echo "</head>";
  echo "<body>"; 
    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\"/>Request sent! The club owner should accept your request";
$clinfo = mysql_fetch_array(mysql_query("SELECT name, owner FROM ibwf_clubs WHERE id='".$clid."'"));
$pmtext = "I wanna join your [club=$clid]$clinfo[0] [/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='".$clinfo[1]."', timesent='".$tm."'");
        }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!";
        }
        }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>You are already in this club or request sent and waiting for acception";
        }
    echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</body>";
   exit(); 
}

i couldnt be bothered to test it

honkytonkman Senior · 252 posts #10

QUOTE (ionutxp @ Nov 19 2008, 07:23 AM) <{POST_SNAPBACK}>

here :

else if($action=="gocl")
{
  $clid = $_GET["clid"];
  $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
    addonline(getuid_sid($sid),"Viewing A Club","");
    $clnm = htmlspecialchars($clinfo[0]);
    echo "<card id=\"main\" title=\"$clnm\">";

    echo "<p align=\"center\">";
    echo "$clnm
";
    if(trim($clinfo[4])=="")
    {
      echo "<img src=\"images/logo.jpg\" alt=\"logo\"/>";
    }else{
        echo "<img src=\"$clinfo[4]\" alt=\"logo\"/>";
    }
    echo "</p>";
    echo "

";
    echo "Club ID: $clid
";
    $uid = getuid_sid($sid);
    $cango = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$uid."' AND accepted='1'"));
    echo "Owner: <a href=\"index.php?action=viewuser&who=$clinfo[1]&sid=$sid\">".getnick_uid($clinfo[1])."</a>
";
      $mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'"));
      echo "Members: <a href=\"lists.php?action=clmem&sid=$sid&clid=$clid\">$mems[0]</a>
";
      echo "Created On: ".date("d/m/y", $clinfo[6])."
";
      echo "Plusses credit: $clinfo[5]
";
      $fid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_forums WHERE clubid='".$clid."'"));
      $rid = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_rooms WHERE clubid='".$clid."'"));
      $tps = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$fid[0]."'"));
      $pss = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE b.fid='".$fid[0]."'"));
      if(getuid_sid($sid)==$clinfo[1])
      {
      echo "<a href=\"index.php?action=pmallmem&sid=$sid&clid=$clid\">PM to All Club Members</a>
";
  }
    if(($cango[0]>0)||isowner($uid))
    {
                if($clid==161) {
            echo "<a href=\"http://space.sihalawap.com/modcp.php?action=clubup;sid=$sid&clid=$clid\">Uploader</a>
";
    }
            if($clid==248) {
            echo "<a href=\"http://space.sihalawap.com/modcp.php?action=clubup2;sid=$sid&clid=$clid\">Uploader</a>
";
    }
        $noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE clid='".$clid."'"));
        echo "
<a href=\"lists.php?action=annc&sid=$sid&clid=$clid\"><img src=\"images/annc.gif\" alt=\"!\"/>Announcements($noa[0])</a>
";
        $noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE rid='".$rid[0]."'"));
        echo "<a href=\"chat.php?sid=$sid&rid=$rid[0]\"><img src=\"images/chat.gif\" alt=\"*\"/>$clnm Chat($noa[0])</a>
";
        echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid[0]\"><img src=\"images/1.gif\" alt=\"*\"/>$clnm Forum($tps[0]/$pss[0])</a>

";
        $ismem = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".getuid_sid($sid)."'"));
        
        if($ismem[0]>0)
        {
            //unjoin 
            if($clinfo[1]!=$uid)
            {
                echo "<a href=\"genproc.php?action=unjc&sid=$sid&clid=$clid\">Unjoin Club</a>";
            }
        }else{
            echo "<a href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
        }
        if(isowner(getuid_sid($sid)))
        {
            echo "
<a href=\"admincp.php?action=club&sid=$sid&clid=$clid\">Admin Tools</a>";
        }
        if($clinfo[1]==$uid)
      {
        //club owner
        $mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='0'"));
        echo "
<a href=\"lists.php?action=clreq&sid=$sid&clid=$clid\">»Requests($mems[0])</a>
";
      }
    }else{
      echo "Topics: $tps[0], Posts: $pss[0]
";
      echo "Description:
";
      echo htmlspecialchars($clinfo[2]);
      echo "

";
      echo "Rules:
";
      echo htmlspecialchars($clinfo[3]);
      echo "

";
      echo "Seems Good? <a href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
    }
    echo "</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</card>";
}
else if($action=="pmallmem")
{
    $clid=$_GET["clid"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
        addonline(getuid_sid($sid),"PMing Club Members","index.php?action=$action");
    echo "<card id=\"main\" title=\"sihalawap.com\">";
    echo "<p align=\"center\">";
    echo "PM All Members Of The $clinfo[0] Club

";
    echo "Please enter the message You Wish To Send To ALL Members Below
";
    echo "<input name=\"pmtext\" maxlength=\"500\"/>
";
    echo "<anchor>SEND<go href=\"index.php?action=sendclpm&sid=$sid\" method=\"post\">";
    echo "<postfield name=\"clid\" value=\"$clid\"/>";
    echo "<postfield name=\"pmtext\" value=\"$(pmtext)\"/>";
    echo "</go></anchor>
</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
     echo "</p>";
    echo "</card>";
    }
else if($action=="sendclpm")
{
    $clid=$_POST["clid"];
    $pmtext=$_POST["pmtext"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
    $owner = $clinfo[1];
        addonline(getuid_sid($sid),"PMing Club Members","index.php?action=$action");
    echo "<card id=\"main\" title=\"sihalawap.com\">";
    echo "<p align=\"center\">";
    echo "PM All Members Of The $clinfo[0] Club

";
    $mems = mysql_query("SELECT uid FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'");
    while($row=mysql_fetch_array($mems))
    {
      $tm = time();
  $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$owner."', touid='".$row[0]."', timesent='".$tm."'");
}
  if($res)
  {

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PMs sent successfully

";
    echo parsepm($pmtext, $sid);
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Can't Send PM

";
  }
  echo "</p>";    
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Clubs list</a>
";
    echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
    echo "Home</a>";
     echo "</p>";
    echo "</card>";
    }

you can change this in XHTML and to a global pm message for ALL recorded users (not only in clubs)?

the italian/international COMMUNITY of friendship http://people2000.netne.net WAP/WEB peoplemailbox@katamail.com

srecnica Developer · 174 posts #12

QUOTE (something else @ Jan 11 2009, 02:11 PM) <{POST_SNAPBACK}>

something like this:

else if($action=="reqjc")
{
  $uid = getuid_sid($sid);
  $clid = $_GET["clid"];
  addonline(getuid_sid($sid),"Joining A Club","");
  echo "<head>";
  echo "<title>$sitename</title>";
  echo "</head>";
  echo "<body>"; 
    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\"/>Request sent! The club owner should accept your request";
$clinfo = mysql_fetch_array(mysql_query("SELECT name, owner FROM ibwf_clubs WHERE id='".$clid."'"));
$pmtext = "I wanna join your [club=$clid]$clinfo[0] [/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='".$clinfo[1]."', timesent='".$tm."'");
        }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>Database Error!";
        }
        }else{
            echo "<img src=\"images/notok.gif\" alt=\"x\"/>You are already in this club or request sent and waiting for acception";
        }
    echo "

<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
  echo "</p>";
    echo "</body>";
   exit(); 
}

i couldnt be bothered to test it

This work, but PM the owner receives a club member who was elected to the club ... member should receive PM not the owner that it has received ... member should receive a notification from the owner that it has received and not the owner receives the PM that the member received 🙂 Come a little if you can edit ... that members receive from the owner and PM not the owner of a member

srecnica Developer · 174 posts #13

QUOTE (honkytonkman @ Jan 11 2009, 05:14 PM) <{POST_SNAPBACK}>

you can change this in XHTML and to a global pm message for ALL recorded users (not only in clubs)?

this html

else if($action=="pmallmem")
{
    $clid=$_GET["clid"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
        addonline(getuid_sid($sid),"[b]Salje PP svim clanovima kluba  $clinfo[0] [/b]","index.php?action=$action");
    $pstyle = gettheme($sid);
    echo xhtmlhead($clnm,$pstyle);
echo "<p align=\"center\">";
    echo "<form action=\"index.php?action=sendclpm&sid=$sid\" method=\"post\">";
    echo "<input type=\"hidden\" name=\"clid\" value=\"$clid\"/>";
    echo "<center>Text:<input name=\"pmtext\" maxlength=\"500\"/>
";
    echo "<input type=\"submit\" value=\"Posalji\"/></center";

    
    echo "</form>
</p>";
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Klubovi</a>
";
     $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&sid=$sid\">";
echo "HAPPY</a>";
  echo "</p>";
    echo xhtmlfoot();
    }
else if($action=="sendclpm")
{
    $clid=$_POST["clid"];
    $pmtext=$_POST["pmtext"];
    $clinfo = mysql_fetch_array(mysql_query("SELECT name, owner, description, rules, logo, plusses, created FROM ibwf_clubs WHERE id='".$clid."'"));
    $owner = $clinfo[1];
        addonline(getuid_sid($sid),"[b]Salje PP za sve clanove kluba $clinfo[0] [/b]","index.php?action=$action");
    $pstyle = gettheme($sid);
    echo xhtmlhead($clnm,$pstyle);
    echo "<p align=\"center\">";
    echo "[b]PP za sve clanove kluba   $clinfo[0] [/b]

";
    $mems = mysql_query("SELECT uid FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'");
    while($row=mysql_fetch_array($mems))
    {
      $tm = time();
  $res = mysql_query("INSERT INTO ibwf_private SET text='".$pmtext."', byuid='".$owner."', touid='".$row[0]."', timesent='".$tm."'");
}
  if($res)
  {

    echo "<img src=\"images/ok.gif\" alt=\"O\"/>";
    echo "PP je uspesno poslata

";
    echo parsepm($pmtext, $sid);
  }else{
    echo "<img src=\"images/notok.gif\" alt=\"X\"/>";
    echo "Nemoguce je poslati PP

";
  }
  echo "</p>";    
    echo "<p align=\"center\">";
    echo "<a href=\"index.php?action=clubs&sid=$sid\">";
    echo "Klubovi</a>
";
     $thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
    $themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));  
    echo "<img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/> <a href=\"index.php?action=main&sid=$sid\">";
echo "HAPPY</a>";
  echo "</p>";
    echo xhtmlfoot();
    }
something else Fellow · 2,296 posts #14

couldnt be bothered to test it but something like this:

else if($action=="acm")
{
  
  $clid = $_GET["clid"];
  $who = $_GET["who"];
  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){
        $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\"/>Member added to your club";

$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='".$who."', timesent='".$tm."'");

        }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 "

[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  echo "</body>";
}

😛

something else Fellow · 2,296 posts #16

before you ask here is the accept all version of it lol

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 "

[b]0 [/b]<a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  echo "</body>";
}

i couldnt be bothered to test again lol

riderz Lead · 975 posts #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

riderz Lead · 975 posts #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

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&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

srecnica Developer · 174 posts #20
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&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "HAPPY</a>";
  echo "</p>";
  echo "</card>";
}
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&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&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "HAPPY</a>";
  echo "</p>";
  echo "</card>";
}

Translate to English please 🙂

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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