Hello, I wanted to share a logo for the club including lava, the logo should be the home of the club, is both casual and personal, fantastic!. I wanted if someone has the function that the logo ideas in chat club. This to add this to index.php
This to add this to genproc.php
Thanks for sharing :-)
PHP Code:
////////////////////////////////////////MAIN PAGE
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs"));
echo "<b>4 </b><a accesskey=\"4\" href=\"index.php?action=clmenu&sid=$sid\">Clubs($chs[0])</a><br/>";///////////////////////////////////club
else if($action=="clmop")
{
$clid = $_GET["clid"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Moderating Club Member","");
echo "<head>";
echo "<title>Moderate Member</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$whnick = getnick_uid($who);
echo "<b>$whnick</b>";
echo "</p>";
echo "<p>";
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid.""));
$cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid.""));
if($exs[0]>0 && $cow[0]>0)
{
echo "<b>7 </b><a accesskey=\"7\" href=\"genproc.php?action=dcm&sid=$sid&who=$who&clid=$clid\">»Kick $whnick out</a><br/>";
echo "<b>8 </b><a accesskey=\"8\" href=\"index.php?action=gcp&sid=$sid&who=$who&clid=$clid\">»$whnick's Club Points</a><br/>";
echo "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=gpl&sid=$sid&who=$who&clid=$clid\">»Give $whnick Plusses</a><br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Missing Info!";
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
else if($action=="gcp")
{
$clid = $_GET["clid"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Moderating Club Member","");
echo "<head>";
echo "<title>Moderate Member</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$whnick = getnick_uid($who);
echo "<b>$whnick</b>";
echo "</p>";
echo "<p>";
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid.""));
$cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid.""));
if($exs[0]>0 && $cow[0]>0)
{
echo "<form action=\"genproc.php?action=gcp&sid=$sid&who=$who&clid=$clid\" method=\"post\">";
echo "Action: <select name=\"giv\">";
echo "<option value=\"1\">Add</option>";
echo "<option value=\"0\">Subtract</option>";
echo "</select><br/>";
echo "Points: <input name=\"pnt\" style=\"-wap-input-format: '*N'\" size=\"2\" maxlength=\"2\"/><br/>";
echo "<input type=\"submit\" value=\"GO\"/>";
echo "</form>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Missing Info!";
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
else if($action=="gpl")
{
$clid = $_GET["clid"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Moderating Club Member","");
echo "<head>";
echo "<title>Moderate Member</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
$whnick = getnick_uid($who);
echo "<b>$whnick</b>";
echo "</p>";
echo "<p>";
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid.""));
$cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid.""));
if($exs[0]>0 && $cow[0]>0)
{
echo "<small><img src=\"../images/point.gif\" alt=\"!\"/>Tu può dare solo aggiunte, queste sono le vere aggiunte, Tu non può sottrarre aggiunte<br/>";
$cpl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_clubs WHERE id='".$clid."'"));
echo "<img src=\"../images/point.gif\" alt=\"!\"/>Il Tuo credito di aggiunte di bastone è $cpl[0]<br/>";
echo "<img src=\"../images/point.gif\" alt=\"!\"/>Non abusare dando aggiunte agli utenti, il Tuo bastone potrebbe essere cancellato<br/></small><br/>";
echo "<form action=\"genproc.php?action=gpl&sid=$sid&who=$who&clid=$clid\" method=\"post\">";
echo "Plusses: <input name=\"pnt\" style=\"-wap-input-format: '*N'\" size=\"2\" maxlength=\"2\"/><br/>";
echo "<input type=\"submit\" value=\"GO\"/>";
echo "</form>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Missing Info!";
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
///////////////////////////////////Clubs Menu
else if($action=="clmenu")
{
addonline(getuid_sid($sid),"Clubs Menu","");
echo "<head>";
echo "<title>Clubs Menu</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Clubs Menu</b>";
echo "</p>";
echo "<p>";
$myid = getuid_sid($sid);
echo "<b>1 </b><a accesskey=\"1\" href=\"index.php?action=clubs&sid=$sid\">»Tutti i Clubs</a><br/>";
echo "<b>2 </b><a accesskey=\"2\" href=\"index.php?action=myclub&sid=$sid\">»Mio Clubs</a><br/>";
echo "<b>3 </b><a accesskey=\"3\" href=\"lists.php?action=clm&who=$myid&sid=$sid&who=$uid\">»Sono Membro del Clubs</a><br/>";
echo "<b>4 </b><a accesskey=\"4\" href=\"lists.php?action=pclb&sid=$sid&who=$uid\">»Clubs By Popolari</a><br/>";
echo "<b>5 </b><a accesskey=\"5\" href=\"lists.php?action=aclb&sid=$sid&who=$uid\">»Clubs By Attivi</a><br/>";
echo "<b>6 </b><a accesskey=\"6\" href=\"lists.php?action=rclb&sid=$sid&who=$uid\">»5 Random Clubs</a><br/><br/>";
$ncl = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_clubs ORDER BY created DESC LIMIT 1"));
echo "Ultimo Club creato: <b>* </b><a accesskey=\"*\" href=\"index.php?action=gocl&clid=$ncl[0]&sid=$sid\">".htmlspecialchars($ncl[1])."</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
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>";
}
///////////////////////////////////My Clubs
else if($action=="myclub")
{
addonline(getuid_sid($sid),"My Clubs","");
echo "<head>";
echo "<title>Mio Clubs</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Mio Clubs</b>";
echo "</p>";
echo "<p>";
$uid = getuid_sid($sid);
if(getplusses($uid)<500)
{
echo "I Clubs sono piccole comunità che gli utenti possono creare, ogni comunità dovrebbe avere cose in comune, per esempio una comunità per gothik, giochi, amore, musica e altro.. Lei può pensare di, attualmente persone che hanno più che 500 aggiunte possono creare solamente Clubs, ogni utente può creare un massimo di 3 Clubs, trovare posto di aggiunte nei Clubs o invitare amici";
}else{
$uclubs = mysql_query("SELECT id, name FROM ibwf_clubs WHERE owner='".$uid."'");
while($club=mysql_fetch_array($uclubs))
{
echo "<a href=\"index.php?action=gocl&clid=$club[0]&sid=$sid\">$club[1]</a>";
echo ", <a href=\"genproc.php?action=dlcl&clid=$club[0]&sid=$sid\">[DELETE]</a><br/><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
if($noi[0]<3)
{
echo "<b>1 </b><a accesskey=\"1\" href=\"index.php?action=addcl&sid=$sid\">Add Club</a>";
}
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
///////////////////////////////////My Clubs
else if($action=="clubs")
{
addonline(getuid_sid($sid),"My Clubs List","");
echo "<head>";
echo "<title>My Clubs List</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Clubs List</b>";
echo "</p>";
//////ALL LISTS SCRIPT <<
if($page=="" || $page<=0)$page=1;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs"));
$num_items = $noi[0]; //changable
$items_per_page= 5;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
//changable sql
$sql = "SELECT id, name, owner, description, created FROM ibwf_clubs ORDER BY created DESC LIMIT $limit_start, $items_per_page";
echo "<p>";
$items = mysql_query($sql);
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$item[1]=htmlspecialchars($item[1]);
$mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$item[0]."' AND accepted='1'"));
$lnk = "<a href=\"index.php?action=gocl&clid=$item[0]&sid=$sid\">$item[1]($mems[0])</a> <small>Owner: <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">".getnick_uid($item[2])."</a></small>";
echo "$lnk<br/><small>";
echo htmlspecialchars($item[3])."<br/>Creation Date: (".date("d/m/y", $item[4]).")</small><br/><br/>";
}
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1)
{
$ppage = $page-1;
echo "<a href=\"index.php?action=$action&page=$ppage&sid=$sid&view=$view\">«Indietro</a> ";
}
if($page<$num_pages)
{
$npage = $page+1;
echo "<a href=\"index.php?action=$action&page=$npage&sid=$sid&view=$view\">Avanti»</a>";
}
echo "<br/>$page/$num_pages<br/>";
if($num_pages>2)
{
$rets = "<form action=\"index.php\" method=\"get\">";
$rets .= "<input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input type=\"submit\" value=\"Go To Page\"/>";
$rets .= "</form>";
echo $rets;
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
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 "<head>";
echo "<title>$Clnm</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>$clnm</b><br/>";
if(trim($clinfo[4])=="")
{
echo "<img src=\"../images/logo.gif\" alt=\"logo\"/>";
}else{
echo "<img src=\"$clinfo[4]\" alt=\"logo\"/>";
}
echo "</p>";
echo "<p>";
echo "Club ID: <b>$clid</b><br/>";
$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><br/>";
$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><br/>";
echo "Created On: ".date("d/m/y", $clinfo[6])."<br/>";
echo "Plusses credit: $clinfo[5]<br/>";
$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(($cango[0]>0)||isadmin($uid))
{
if($clid==161) {
echo "<a href=\"http://www.$sitename/clubs/royal/index.php?sid=$sid&site=wap\">Royal X Uploader</a><br/>";
}
$noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE clid='".$clid."'"));
echo "<br/><b>1 </b><a accesskey=\"1\" href=\"lists.php?action=annc&sid=$sid&clid=$clid\"><img src=\"../images/annc.gif\" alt=\"!\"/>Announcements($noa[0])</a><br/>";
$noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chat WHERE rid='".$rid[0]."'"));
echo "<b>2 </b><a accesskey=\"2\" href=\"chat.php?sid=$sid&rid=$rid[0]\"><img src=\"../images/chat.gif\" alt=\"*\"/>$clnm Chat($noa[0])</a><br/>";
echo "<b>3 </b><a accesskey=\"3\" href=\"index.php?action=viewfrm&sid=$sid&fid=$fid[0]\"><img src=\"../images/1.gif\" alt=\"*\"/>$clnm Forum($tps[0]/$pss[0])</a><br/><br/>";
$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 "<b>4 </b><a accesskey=\"4\" href=\"genproc.php?action=unjc&sid=$sid&clid=$clid\">Cancellami dal Club</a>";
}
}else{
echo "<b>4 </b><a accesskey=\"4\" href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Iscriviti Adesso!</a>";
}
if(isowner(getuid_sid($sid)))
{
echo "<br/><b>5 </b><a accesskey=\"5\" 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 "<br/><b>6 </b><a accesskey=\"6\" href=\"lists.php?action=clreq&sid=$sid&clid=$clid\">»Requests($mems[0])</a><br/>";
}
}else{
echo "Topics: <b>$tps[0]</b>, Posts: <b>$pss[0]</b><br/>";
echo "<b>Description:</b><br/>";
echo htmlspecialchars($clinfo[2]);
echo "<br/><br/>";
echo "<b>Rules:</b><br/>";
echo htmlspecialchars($clinfo[3]);
echo "<br/><br/>";
echo "Seems Good? <b>1 </b><a accesskey=\"1\" href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
}
echo "</p>";
echo "<p align=\"center\">";
echo "<b>9 </b><a accesskey=\"9\" href=\"index.php?action=clubs&sid=$sid\">Clubs list</a><br/>";
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>";
}
else if($action=="addcl")
{
addonline(getuid_sid($sid),"Adding A Club","");
echo "<head>";
echo "<title>Adding A Club</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
echo "<b>Add Club</b>";
echo "</p>";
echo "<p>";
if(getplusses($uid)>=500)
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
if($noi[0]<3)
{
echo "<small><img src=\"../images/point.gif\" alt=\"*\"/>Ogni Informazione è richiesta tranne il logo<br/>";
echo "<img src=\"../images/point.gif\" alt=\"*\"/>I Moderatori possono moderare Clubs, Forum e Chat<br/>";
echo "<img src=\"../images/point.gif\" alt=\"*\"/>Alcune interlinea addizionale spazia per descrizione, nome, logo, o regole saranno rimossi<br/>";
echo "<img src=\"../images/point.gif\" alt=\"*\"/>L'Amministratore cancellerà il Tuo bastone e sottrarrà le Tue aggiunte se Tu abusi le regole di possedere un bastone<br/>";
echo "<img src=\"../images/point.gif\" alt=\"*\"/>L'Amministratore ha diritto a cancellare il Tuo bastone se esso non è attivo o se fosse inutile<br/></small><br/>";
echo "<form action=\"genproc.php?action=addcl&sid=$sid\" method=\"post\">";
echo "Club Name:<input name=\"clnm\" maxlength=\"30\"/><br/>";
echo "Description:<input name=\"clds\" maxlength=\"200\"/><br/>";
echo "Rules:<input name=\"clrl\" maxlength=\"500\"/><br/>";
echo "Logo:<input name=\"cllg\" maxlength=\"200\"/><br/>";
echo "<input type=\"submit\" value=\"Create\"/>";
echo "</form>";
}else{
echo "Tu già hai 3";
}
}else{
echo "Hai aggiunto alcuni Clubs :op ";
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
PHP Code:
else if($action=="gcp")
{
$clid = $_GET["clid"];
$who = $_GET["who"];
$giv = $_POST["giv"];
$pnt = $_POST["pnt"];
addonline(getuid_sid($sid),"Moderating Club Member","");
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\">";
$whnick = getnick_uid($who);
echo "<b>$whnick</b>";
echo "</p>";
echo "<p>";
$exs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."' AND clid=".$clid.""));
$cow = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."' AND id=".$clid.""));
if($exs[0]>0 && $cow[0]>0)
{
$mpt = mysql_fetch_array(mysql_query("SELECT points FROM ibwf_clubmembers WHERE uid='".$who."' AND clid='".$clid."'"));
if($giv=="1")
{
$pnt = $mpt[0]+$pnt;
}else{
$pnt = $mpt[0]-$pnt;
if($pnt<0)$pnt=0;
}
$res = mysql_query("UPDATE ibwf_clubmembers SET points='".$pnt."' WHERE uid='".$who."' AND clid='".$clid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"O\"/>Club points updated successfully!";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Database Error!";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Missing Info!";
}
echo "</p>";
echo "<p align=\"center\">";
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>";
}
else if($action=="gpl")
{
$clid = $_GET["clid"];
$who = $_GET["who"];
$pnt = $_POST["pnt"];
addonline(getuid_sid($sid),"Moderating Club Member","");
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\">";
$whnick = getnick_uid($who);
echo "<b>$whnick</b>";
echo "</p>";
echo "<p>";
echo "<img src=\"../images/notok.gif\" alt=\"X\"/>Because people misused the plusses thing, clubs owners cant give plusses anymore";
echo "</p>";
echo "<p align=\"center\">";
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>";
}
else if($action=="dlcl")
{
//$uid = getuid_sid($sid);
addonline(getuid_sid($sid),"Deleting Club","");
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$clid = $_GET["clid"];
$uid = getuid_sid($sid);
echo "<p align=\"center\">";
$pid = mysql_fetch_array(mysql_query("SELECT owner FROM ibwf_clubs WHERE id='".$clid."'"));
if($uid==$pid[0])
{
$res = deleteClub($clid);
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Club Deleted";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Yo can't delete this club!";
}
echo "<br/><br/><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>";
}
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 "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
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";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You already in this club or request sent and waiting for acception";
}
echo "<br/><br/><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>";
}
else if($action=="unjc")
{
//$uid = getuid_sid($sid);
$clid = $_GET["clid"];
addonline(getuid_sid($sid),"Unjoining 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);
$isin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'"));
if($isin[0]>0){
$res = mysql_query("DELETE FROM ibwf_clubmembers WHERE uid='".$uid."' AND clid='".$clid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Club votato con successo";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You're not a member of this club!";
}
echo "<br/><br/><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>";
}
else if($action=="acm")
{
//$uid = getuid_sid($sid);
$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 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";
}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 "<br/><br/><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>";
}
else if($action=="accall")
{
//$uid = getuid_sid($sid);
$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 FROM ibwf_clubs WHERE id='".$clid."'"));
if($cowner[0]==$uid){
$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 "<br/><br/><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>";
}
else if($action=="denall")
{
//$uid = getuid_sid($sid);
$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 FROM ibwf_clubs WHERE id='".$clid."'"));
if($cowner[0]==$uid){
$res = mysql_query("DELETE FROM ibwf_clubmembers WHERE accepted='0' AND clid='".$clid."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>All Members Denied";
}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 "<br/><br/><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>";
}
else if($action=="dcm")
{
//$uid = getuid_sid($sid);
$clid = $_GET["clid"];
$who = $_GET["who"];
addonline(getuid_sid($sid),"Deleting a member from 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 FROM ibwf_clubs WHERE id='".$clid."'"));
if($cowner[0]==$uid){
$res = mysql_query("DELETE FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$who."'");
if($res)
{
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Member deleted from your club";
}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 "<br/><br/><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>";
}