im just thinking
how to allow user to edit club they made..
coz they all doing mistakes to edit logo.
how to allow user to edit club they made..
coz they all doing mistakes to edit logo.
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> "; }
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> "; echo "Update Club Logo "; echo "Enter URL with http:// "; echo "<input name=\"rukiya\" maxlength=\"100\"/> "; echo "<anchor>SEND<go href=\"index.php?action=ucll&clid=$clid&sid=$sid\" method=\"post\">"; echo "<postfield name=\"rukiya\" value=\"$(rukiya)\"/>"; echo "</go></anchor> "; }
else if($action=="ucll") { $clid = $_GET["clid"]; $rukiya = mysql_escape_string($_POST["rukiya"]); addonline(getuid_sid($sid),"Updating Club logo",""); echo "<card id=\"main\" title=\"Update club logo\">"; echo "<p align=\"center\">"; if($rukiya=="") { echo "<img src=\"images/notok.gif\" alt=\"X\"/>Please be sure to fill logo URL"; } else { mysql_query("UPDATE ibwf_clubs SET logo = '".$rukiya."' WHERE id = '".$clid."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>your site logo updated succesfully "; echo " <a href=\"index.php?action=gocl&sid=$sid&clid=$clid\">back to the club</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; } echo "</p>"; echo "<p align=\"center\">"; echo "© Script by Rukiya"; echo "</p>"; echo "</card>"; }
echo "<anchor>SEND<go href=\"index.php?action=ucll&clid=$clid&sid=$sid\" method=\"post\">";
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> "; echo "Update Club Logo: "; echo "Enter URL with http:// "; echo "<form action=\"index.php?action=ucll&clid=$clid&sid=$sid\" method=\"post\">"; echo "<input type=\"text\" name=\"rukiya\" value=\"$rukiya\"/>"; echo "<input type=\"Submit\" name=\"update\" value=\"Update\"></form> "; }
else if($action=="ucll") { $clid = $_GET["clid"]; $rukiya = mysql_escape_string($_POST["rukiya"]); addonline(getuid_sid($sid),"Updating Club logo",""); echo "<title>Updating Club Logo</title>"; echo "<p align=\"center\">"; if($rukiya=="") { echo "<img src=\"images/notok.gif\" alt=\"X\"/>Please be sure to fill logo URL"; } else { mysql_query("UPDATE ibwf_clubs SET logo = '".$rukiya."' WHERE id = '".$clid."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>your site logo updated succesfully "; echo " <a href=\"index.php?action=gocl&sid=$sid&clid=$clid\">back to the club</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; } echo "</p>"; echo "<p align=\"center\">"; echo "©WML Script by Rukiya & Xhtml By Vishal"; echo "</p>"; echo "</body>"; }
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> "; echo "Update Club Logo: "; echo "Enter URL with http:// "; echo "<form action=\"index.php?action=ucll&clid=$clid&sid=$sid\" method=\"post\">"; echo "<input type=\"text\" name=\"rukiya\" value=\"$rukiya\"/>"; echo "<input type=\"Submit\" name=\"update\" value=\"Update\"></form> "; }
else if($action=="ucll") { $clid = $_GET["clid"]; $rukiya = mysql_escape_string($_POST["rukiya"]); addonline(getuid_sid($sid),"Updating Club logo",""); echo "<title>Updating Club Logo</title>"; echo "<p align=\"center\">"; if($rukiya=="") { echo "<img src=\"images/notok.gif\" alt=\"X\"/>Please be sure to fill logo URL"; } else { mysql_query("UPDATE ibwf_clubs SET logo = '".$rukiya."' WHERE id = '".$clid."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>your site logo updated succesfully "; echo " <a href=\"index.php?action=gocl&sid=$sid&clid=$clid\">back to the club</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; } echo "</p>"; echo "<p align=\"center\">"; echo "©WML Script by Rukiya & Xhtml By Vishal"; echo "</p>"; echo "</body>"; }
this is my WML index code for club cheak where you did mistake and solve. [code] ///////////////////////////////////My Clubs else if($action=="myclub") { addonline(getuid_sid($sid),"My Clubs",""); echo "<card id=\"main\" title=\"My Clubs\">"; echo mobads(); echo "<p align=\"center\">"; echo "[b]My Clubs[/b]"; echo "</p>"; echo " "; $uid = getuid_sid($sid); if(getplusses($uid)<500) { echo "Clubs are small communities that users can create, every community should have things in common, for example a community for goths, sex freaks, alocholics, rappers and anythin else you can think of, currently people who have more than 500 plusses can only create clubs, every user can create up to maximum of 3 clubs, to get plusses post in the forums, or invite friends"; }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> "; } $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'")); if($noi[0]<3) { echo "<a href=\"index.php?action=addcl&sid=$sid\">Add Club</a>"; } } echo "</p>"; echo "<p align=\"center\">"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } ///////////////////////////////////My Clubs else if($action=="clubs") { addonline(getuid_sid($sid),"My Clubs List",""); echo mobads(); echo "<card id=\"main\" title=\"Club Lists\">"; 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 " "; $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> [size="1"]Owner: <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">".getnick_uid($item[2])."</a>[/size]"; echo "$lnk [size="1"]"; echo htmlspecialchars($item[3])." Creation Date: (".date("d/m/y", $item[4]).")[/size] "; } } 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\">«PREV</a> "; } if($page<$num_pages) { $npage = $page+1; echo "<a href=\"index.php?action=$action&page=$npage&sid=$sid&view=$view\">Next»</a>"; } echo " $page/$num_pages "; if($num_pages>2) { $rets = "Jump to page<input name=\"pg\" format=\"*N\" size=\"3\"/>"; $rets .= "<anchor>[GO]"; $rets .= "<go href=\"index.php\" method=\"get\">"; $rets .= "<postfield name=\"action\" value=\"$action\"/>"; $rets .= "<postfield name=\"sid\" value=\"$sid\"/>"; $rets .= "<postfield name=\"page\" value=\"$(pg)\"/>"; $rets .= "</go></anchor>"; echo $rets; } echo "</p>"; echo "<p align=\"center\">"; 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=="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.gif\" 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(($cango[0]>0)||isadmin($uid)) { if($clid==161) { echo "<a href=\"http://www.$sitename/clubs/royal/index.php?sid=$sid&site=wap\">File 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> "; echo "Update Club Logo "; echo "Enter URL with http:// "; echo "<input name=\"rukiya\" maxlength=\"100\"/> "; echo "<anchor>SEND<go href=\"index.php?action=ucll&clid=$clid&sid=$sid\" method=\"post\">"; echo "<postfield name=\"rukiya\" value=\"$(rukiya)\"/>"; echo "</go></anchor> "; } }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=="ucll") { $clid = $_GET["clid"]; $rukiya = mysql_escape_string($_POST["rukiya"]); addonline(getuid_sid($sid),"Updating Club logo",""); echo "<card id=\"main\" title=\"Update club logo\">"; echo "<p align=\"center\">"; if($rukiya=="") { echo "<img src=\"images/notok.gif\" alt=\"X\"/>Please be sure to fill logo URL"; } else { mysql_query("UPDATE ibwf_clubs SET logo = '".$rukiya."' WHERE id = '".$clid."'"); echo "<img src=\"images/ok.gif\" alt=\"O\"/>your site logo updated succesfully "; echo " <a href=\"index.php?action=gocl&sid=$sid&clid=$clid\">back to the club</a> "; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; } echo "</p>"; echo "<p align=\"center\">"; echo "© Script by Rukiya"; echo "</p>"; echo "</card>"; } else if($action=="addcl") { addonline(getuid_sid($sid),"Adding A Club",""); echo "<card id=\"main\" title=\"Add Club\">"; echo "<p align=\"center\">"; echo "[b]Add Club[/b]"; echo "</p>"; echo " "; if(getplusses($uid)>=500) { $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'")); if($noi[0]<3) { echo "[size="1"]<img src=\"../images/point.gif\" alt=\"*\"/>All Info are required except the logo "; echo "<img src=\"../images/point.gif\" alt=\"*\"/>Beside you, mods can moderate your club forums and chat "; echo "<img src=\"../images/point.gif\" alt=\"*\"/>Any leading spaces for description, name, logo, or rules will be removed "; echo "<img src=\"../images/point.gif\" alt=\"*\"/>Admins will delete your club and subtract your plusses if you abuse the rules of owning a club "; echo "<img src=\"../images/point.gif\" alt=\"*\"/>Admins have the right to delete your club if it wasnt active or if it was useless [/size] "; echo "Club Name:<input name=\"clnm\" maxlength=\"30\"/> "; echo "Description:<input name=\"clds\" maxlength=\"200\"/> "; echo "Rules:<input name=\"clrl\" maxlength=\"500\"/> "; echo "Logo:<input name=\"cllg\" maxlength=\"200\"/> "; echo "<anchor>Create"; echo "<go href=\"genproc.php?action=addcl&sid=$sid\" method=\"post\">"; echo "<postfield name=\"clnm\" value=\"$(clnm)\"/>"; echo "<postfield name=\"clds\" value=\"$(clds)\"/>"; echo "<postfield name=\"clrl\" value=\"$(clrl)\"/>"; echo "<postfield name=\"cllg\" value=\"$(cllg)\"/>"; echo "</go></anchor>"; }else{ echo "You already have 3 clubs"; } }else{ echo "You cant add any clubs :op "; } echo "</p>"; echo "<p align=\"center\">"; echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>"; echo "Home</a>"; echo "</p>"; echo "</card>"; } ///////////////////////////////////Search
Comment