before you ask here is the accept all version of it lol
i couldnt be bothered to test again 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='".$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>";
}
Comment