pls how to do this? i want my site quests to have permission to view my forum without login
guest view forum
Collapse
X
-
use search button try the mobilezonez script it has a guest feature so do many others this topic has been posted 2 many times b4
Added after 7 minutes:
PHP Code:<?php
/////////////////script load time
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
//////////////////Includes
include("config.php");
include("core.php");
/////////////////Page headers
echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML Mobile 1.0//EN\"". " \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $sitename ?></title>
<meta forua="true" http-equiv="Cache-Control" content="no-cache"/>
<meta forua="true" http-equiv="Cache-Control" content="must-revalidate"/>
<link rel="shortcut icon" href="images/favicon.ico" />
<link rel="icon" href="images/favicon.gif" type="image/gif" />
<?php
$bcon = connectdb();
echo gettheme($sid);
getbrip($sid);
?>
</head>
<body>
<?php
echo "<font size=\"".getfontsize($sid)."\">";
///////////////All the GETs//////
$brws = explode("/",$HTTP_USER_AGENT);// browser info is collected
$brw = $HTTP_USER_AGENT;
$brws = explode(" ",$HTTP_USER_AGENT);
$brws2 = explode("(",$HTTP_USER_AGENT);
$brws3 = explode(")",$brws2[1]);
$brws4 = $brws2[0]."/".$brws3[0]."/".$brws3[1];
$ubr = $brws4;
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];// now the session id
$page = $_GET["page"];
$who = $_GET["who"];// the name of the user logging in
$uid = getuid_sid($sid);
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];
$page = $_GET['page'];
$who = $_GET['who'];
$action = $_GET['action'];
$uid = getuid_sid($sid);
$sid = $_GET["sid"];
$tm = time();
$r=rand(97, 619);
$xtm = $tm + (getsxtm()*60);
$did = $uid.$tm.$r;
$sid = md5($did);
$idn = getuid_nick($uid);
$guest = $_POST['34536470jqi848349a'];
$browser2 = $_POST['browser'];
$action = $_POST['action'];
//session already existing? Then don't use new///
////////////////////////////////////
$res=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_ses WHERE uid='$guest' AND expiretm>$tm"));
if($res[0]>0){
$res=mysql_fetch_array(mysql_query("SELECT id FROM ibwf_ses WHERE uid='$guest'"));
$sid=$res[0];
$flag=0;
}
else $flag=1;
if($flag){
$res=mysql_query("INSERT INTO ibwf_ses SET id='".$sid."', uid='".$idn."', expiretm='".$xtm."', ua='".$HTTP_USER_AGENT."', ip='".$REMOTE_ADDR."'");
}
else
$res=mysql_query("UPDATE ibwf_ses SET expiretm='".$xtm."', ua='".$HTTP_USER_AGENT."', ip='".$REMOTE_ADDR."' WHERE uid='".$idn."'");
//////////////DB connection failed
if (!$bcon){
echo "<p align=\"center\">
ERROR! Couldn't connect to database!<br/><br/>
Sorry for the interruption! Please try <a href=\"index.php?action=main&sid=$sid\">refresh</a>ing this page and if it doesn't work then try after sometime.<br/><br/>
<b>Thanks,<br/>With regards,<br/>$sitename Team!</b>
</p>
</font></body>
</html>";
exit();
}
cleardata();
/////////////Session not legal??
////////////////////////////////////////Main Menu//////////////////////////////////////////////////////////////////////////////////////////
if($action=="main"){
addonline($uid,"Main Menu","index.php?action=$action");
$nick = getnick_sid($sid);
$indiatime = time() + addhours();
//////////Retrieve some data from mysql db/////////////////////////////
//////////////////visits
$showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$uid."'"));
//////////////////pm count
$umsg = getunreadpm($uid);
$allmsg = getallpm($uid);
///////////////////mms count
$nmms = getunreadmms($uid);
if ($nmms>0){
$inda = "($nmms new)";
} else{
$inda = "";
}
///////////////////buds
$onbuds = getonbuds($uid);
$allbuds = getnbuds($uid);
$reqs = getnreqs($uid);
/////////////////chat online
$chs = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline"));
/////////////////Profile visitors/join date
$visitors = mysql_query("SELECT name FROM fun_latest WHERE vid='".$uid."' ORDER BY time DESC LIMIT 5");
$i=0;
while ($row = mysql_fetch_array($visitors)) {
extract($row);
$visitor[$i]=$name;
$i++;
}
$no3 = mysql_fetch_array(mysql_query("SELECT profvws FROM ibwf_users WHERE id=$uid"));
$profvw=$no3[0];
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$uid."'"));
$jointime = $nopl[0] + (addhours());
$jdt = date("d/m/Y, h:i:s A",$jointime);
/////////////////////////////////////////////////////// Start Output ///////////////////////////////////////
echo "<div class=\"logo\"><center>".getlogo($uid)."</center></div>";
boxstart("Welcome ".$nick);
echo "
<p align=\"center\">
Now on <i>".date("l, FdS, Y",$indiatime)."</i>, ".date("h:i A",$indiatime)." this is your <i>".$showv[0]."th</i> visit.<br/>";
if($profvw>=5){
echo"
Your profile has been viewed $profvw times since $jdt. Last 5 visitors of your profilee are
<i>
<a href=\"index.php?action=viewuser&sid=$sid&who=".getuid_nick($visitor[0])."\">".$visitor[0]."</a>,
<a href=\"index.php?action=viewuser&sid=$sid&who=".getuid_nick($visitor[1])."\">".$visitor[1]."</a>,
<a href=\"index.php?action=viewuser&sid=$sid&who=".getuid_nick($visitor[2])."\">".$visitor[2]."</a>,
<a href=\"index.php?action=viewuser&sid=$sid&who=".getuid_nick($visitor[3])."\">".$visitor[3]."</a>,
<a href=\"index.php?action=viewuser&sid=$sid&who=".getuid_nick($visitor[4])."\">".$visitor[4]."</a>,
</i>
";
}
if($umsg>0){
echo"
<br/>You have <a href=\"inbox.php?sid=$sid&view=urd&action=main\"><i>$umsg</i></a> new msgs since your last visit.
";
}
echo"
</p>
<p align=\"center\">
".parsepm(getfmsg())."
</p>
";
boxend();
getalert($sid);
getshouts($sid);
boxstart("Main Menu");
echo "
";
if(!isinboxblocked($uid)){
echo "
<img src=\"images/mailbox_old.gif\" alt=\"1\"/><a href=\"inbox.php?action=disp&sid=$sid\" accesskey=\"1\">Inbox($umsg/$allmsg)</a><br/>";
echo "<img src=\"images/theme.gif\" alt=\"\"/><a href=\"inbox.php?action=mmsdisp&sid=$sid\">MMS$inda</a><br/>";
}
echo"
<img src=\"images/buddies.gif\" alt=\"2\"/><a href=\"lists.php?action=buds&sid=$sid\" accesskey=\"2\">Buddies($onbuds/$allbuds)</a>
";
if($reqs>0){
echo "
: +<a href=\"lists.php?action=reqs&sid=$sid\">$reqs</a>
";
}
echo "
<br/>
";
if(!isforumblocked($uid)){
echo "
<img src=\"images/forum.gif\" alt=\"3\"/><a href=\"guest.php?action=viewcat&sid=$sid&cid=1\" accesskey=\"3\">Forums</a><br/>
";
echo"
<img src=\"images/chat.gif\" alt=\"4\"/><a href=\"index.php?action=chat&sid=$sid\" accesskey=\"4\">Chat(".$chs[0].")</a><br/>
<img src=\"images/groups.gif\" alt=\"7\"/><a href=\"index.php?action=myclub&sid=$sid\" accesskey=\"7\">Clubs</a><br/>
<img src=\"images/blog.gif\" alt=\"8\"/><a href=\"lists.php?action=blogs&sid=$sid&who=$uid\" accesskey=\"8\">Blog</a><br/>
<img src=\"images/game.gif\" alt=\"\"/><a href=\"games.php?action=main&sid=$sid\">Games Menu</a><br/>
<img src=\"images/upload.gif\" alt=\"\"/><a href=\"share.php?sid=$sid&action=main\">Uploads Center</a><br/>";
echo "<img src=\"images/search.gif\" alt=\"\"/><a href=\"index.php?action=search&sid=$sid\">Search</a><br/>
<img src=\"images/help.gif\" alt=\"\"/><a href=\"index.php?action=helpc&sid=$sid\">Help Center</a><br/>
<img src=\"images/cpanel.gif\" alt=\"\"/><a href=\"index.php?action=cpanel&sid=$sid\">Preferences</a><br/>
<img src=\"images/train.gif\" alt=\"\"/><a href=\"pnr.php?sid=$sid\">PNR Status</a>
";
boxend();
/////////////Mods zone
if(ismod($uid)){
boxstart("Pentagon");
echo "
<a href=\"adctrl.php?action=edtmp&sid=$sid\">Edit Main Page message</a><br/>";
$tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE reported='1'"));
$tot = $tnor[0];
$tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE reported='1'"));
$tot += $tnor[0];
$tnor = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE reported='1'"));
$tot += $tnor[0];
$tnol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog"));
$tol = $tnol[0];
if($tol+$tot>0){
echo "<a href=\"adctrl.php?action=he3nomain&sid=$sid\">Actions Logger($tot/$tol)</a><br/>";
}
echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=12\">Meeting Hall</a>";
if (isadmin($uid)){
echo "<br/><a href=\"index.php?action=area51ts&sid=$sid\">Area 51</a>";
}
boxend();
}
/////////main menu footer
echo "
<div class=\"footer\">
<center><small>
6.<a href=\"index.php?action=viewfrm&sid=$sid&fid=7\" accesskey=\"6\">Everyday Forum</a> |
9.<a href=\"index.php?action=act&sid=$sid\" accesskey=\"9\">Active Topics</a> <br/>
5.<a href=\"index.php?action=online&sid=$sid\" accesskey=\"5\">Online Users(".getnumonline().")</a> |
<a href=\"index.php?action=mainthm&sid=$sid\">Theme Manager</a> <br/>
<a href=\"index.php?action=chbmsg&sid=$sid\">Set Mood</a> |
<a href=\"index.php?action=stats&sid=$sid\">Site Stats</a><br/><br/>
<a href=\"index.php?action=logout&sid=$sid\">Log out</a><br/><br/>
<b>© copyright 2009 ©</b><br/>www.mobilezonez.com<br/>
</small></center>
</div>
";
}
}
////////////////////////////////Logout//////////////////////////////////
else if($action=="logout"){
gettimebar();
mysql_query("DELETE FROM ibwf_online WHERE userid='".$uid."'");
mysql_query("DELETE FROM ibwf_ses WHERE id = '".$sid."'");
boxstart("Logout");
echo "<center><img src=\"images/ok.gif\" alt=\"\"/>";
echo "You have successfully logged yourself out. If you wish to login again then enter your username and password below and click Login.<br/><br/>";
echo "
<form action=\"login.php\" method=\"get\">
<img src=\"images/user.gif\" alt=\"\"/>Enter username:<br/>
<input id=\"inputText\" name=\"loguid\" maxlength=\"30\"/><br/>
<img src=\"images/pass.gif\" alt=\"\"/>Enter password:<br/>
<input id=\"inputText\" type=\"password\" format=\"*x\" name=\"logpwd\" maxlength=\"30\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Login\"/><br/>
</form>
<br/><br/><img src=\"images/register.gif\" alt=\"\"/><a href=\"register.php\">Register</a>
<br/><img src=\"images/home.gif\" alt=\"\"/><a href=\"index.php\">Home</a>
</center>";
boxend();
echo "</font></body></html>";
exit();
}
////////////////////////////////Bookmarks//////////////////////
else if($action=="bookmarks"){
addonline($uid,"Viewing Bookmarks","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("My Bookmarks");
$limit = 50;
$noi = "SELECT COUNT(*) FROM ibwf_bookmarks WHERE userid = '".$uid."'";
$noiq = mysql_query($noi);
while($noinum=mysql_fetch_array($noiq))
{ $total=$noinum[0]; }
$bal=$limit-$total;
echo "<p>Your Bookmarked Topics!<br/>You have $bal bookmarks remaining, out of a total of $limit allowed!<div class=\"iblock\" align=\"center\">";
if($page=="" || $page<1)$page=1;
$num_items = $total;
$items_per_page = 10;
$num_pages = ceil($num_items/$items_per_page);
if(($page>$num_pages)&&$page!=1)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT topic,name,id,time FROM ibwf_bookmarks WHERE userid = '".$usid."' ORDER BY time DESC LIMIT $limit_start, $items_per_page";
$items = mysql_query($sql);
while($item=mysql_fetch_array($items))
{
$tlink = "<a href=\"index.php?action=viewtpc&sid=$sid&tid=$item[0]\">".$item[1]."</a>";
echo "$tlink [Added on ".date("d/m/Y", $item[3])." at ".date("h:i A", $item[3])."]<br/><a href=\"genproc.php?action=kaltibkmrk&sid=$sid&tpcid=$item[2]\">(Remove)</a><br/><br/>";
}
echo "<p>";
if($page>1)
{
$ppage = $page-1;
$rets = "<form action=\"index.php?action=$action&sid=$sid&page=$ppage\" method=\"post\">";
$rets .= "<input type=\"hidden\" name=\"sname\" value=\"$fname\"/>";
$rets .= "<input type=\"hidden\" name=\"stype\" value=\"$ftype\"/>";
$rets .= "<input type=\"hidden\" name=\"sdec\" value=\"$fdec\"/>";
$rets .= "<input type=\"hidden\" name=\"sby\" value=\"$fby\"/>";
$rets .= "<input type=\"submit\" value=\"«Prev\"/></form> ";
echo $rets;
}
if($page<$num_pages)
{
$npage = $page+1;
$rets = "<form action=\"index.php?action=$action&sid=$sid&page=$npage\" method=\"post\">";
$rets .= "<input type=\"hidden\" name=\"sname\" value=\"$fname\"/>";
$rets .= "<input type=\"hidden\" name=\"stype\" value=\"$ftype\"/>";
$rets .= "<input type=\"hidden\" name=\"sdec\" value=\"$fdec\"/>";
$rets .= "<input type=\"hidden\" name=\"sby\" value=\"$fby\"/>";
$rets .= "<input type=\"submit\" value=\"»Next\"/></form> ";
echo $rets;
}
echo "<br/>Page $page of $num_pages<br/>";
echo "</div></p>";
getfooter($sid);
}
////////////////////////////////////Active topics///////////////
else if($action=="act"){
addonline($uid,"Viewing active topics","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Active Topics");
echo "These are the top 15 active topics in forums:<br/>";
if(ismod($uid)){
$topics = mysql_query("SELECT id, name, closed, authorid, pinned, pollid FROM ibwf_topics ORDER BY lastpost DESC LIMIT 15");
}
else {
$topics = mysql_query("SELECT id, name, closed, authorid, pinned, pollid FROM ibwf_topics WHERE fid != 12 ORDER BY lastpost DESC LIMIT 15");
}
while($topic = mysql_fetch_array($topics)){
$nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$topic[0]."'"));
$iml = "<img src=\"images/forum_normal.gif\" alt=\"N\"/>";
if($topic[2]=='1'){
$iml = "<img src=\"images/forum_closed.gif\" alt=\"X\"/>";
}
if($topic[4]=='1'){
$iml = "<img src=\"images/forum_pinned.gif\" alt=\"»\"/>";
}
if($nop[0]>24){
$iml = "<img src=\"images/forum_hot.gif\" alt=\"H\"/>";
}
if($topic[5]>0){
$iml = "<img src=\"images/forum_poll.gif\" alt=\"P\"/>";
}
$tnm = htmlspecialchars($topic[1]);
$authid = $topic[3];
$name=getnick_uid($authid);
echo "$iml<a href=\"index.php?action=viewtpc&sid=$sid&tid=$topic[0]\">$name: $tnm</a>[<a href=\"index.php?action=viewtpc&sid=$sid&tid=$topic[0]&go=last\">$nop[0]</a>]$atxt<br/>";
}
boxend();
getfooter($sid);
}
//////////////////////////////view blog///////
else if($action=="viewblog")
{
$bid = $_GET["bid"];
gettimebar();
getnewmsg($sid);
getalert($sid);
$pminfo = mysql_fetch_array(mysql_query("SELECT btext, bname, bgdate,bowner, id FROM ibwf_blogs WHERE id='".$bid."'"));
$bttl = htmlspecialchars($pminfo[1]);
$btxt = parsemsg($pminfo[0], $sid);
$bnick = getnick_uid($pminfo[3]);
addonline($uid,"Viewing $bnick\'s blog","index.php?action=$action&bid=$bid");
boxstart("$bttl");
$vbbl = "<a href=\"index.php?action=viewuser&sid=$sid&who=$pminfo[3]\">$bnick</a><br/>";
echo "<b>$bttl</b><br/> by: $vbbl<br/><br/>$btxt<br/><br/>";
$tmstamp = $pminfo[2] + (addhours());
$tmdt = date("d/m/Y h:i:s", $tmstamp);
echo "$tmdt<br/><br/>";
$vb = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$uid."' AND blogid='".$bid."'"));
if($vb[0]==0)
{
echo "<form action=\"genproc.php?action=rateb&sid=$sid&bid=$pminfo[4]\" method=\"post\"><select id=\"inputText\" name=\"brate\">
<option value=\"1\">1</option>
<option value=\"2\">2</option>
<option value=\"3\">3</option>
<option value=\"4\">4</option>
<option value=\"5\">5</option>
</select><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>
</form>";
}else{
$rinfo = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nofr, SUM(brate) as nofp FROM ibwf_brate WHERE blogid='".$bid."'"));
$ther = $rinfo[1]/$rinfo[0];
echo "Rate: $ther - Points: $rinfo[1]";
}
echo "<br/><a href=\"index.php?action=signgb&sid=$sid&who=$pminfo[3]\">Post comment</a><br/><a href=\"lists.php?action=gbook&sid=$sid&who=$pminfo[3]\">View comments</a>
<p align=\"center\">
<a href=\"lists.php?action=allbl&sid=$sid\">Back to Blogs</a><br/>";
$bnick = getnick_uid($pminfo[3]);
echo "<a href=\"lists.php?action=blogs&sid=$sid&who=$pminfo[3]\">Back to $bnick's Blogs</a></p>";
boxend();
getfooter($sid);
}
////////////////////////////////////////////////////////////
else if($action=="signgb"){
$who=$_GET["who"];
addonline($uid,"Commenting on ".getuid_nick($who)."'s blog","index.php?action=$action&who=$who");
gettimebar();
if(!cansigngb($uid, $who)){
boxstart("Error!");
echo "
<p align=\"center\">
You need to be this user's buddy for commenting blog.<br/><br/>
<a href=\"index.php?action=main&sid=$sid\">Main Menu</a>
</p></div></div></font></body>
</html>";
exit();
}
getnewmsg($sid);
getalert($sid);
boxstart("Comment Blog");
echo "
<p align=\"center\">
Text:<form action=\"genproc.php?action=signgb&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"msgtxt\" maxlength=\"500\"/><br/>
<input type=\"hidden\" name=\"who\" value=\"$who\"/>
<input id=\"inputButton\" type=\"submit\" value=\"submit\"/></form>
</p>";
boxend();
getfooter($sid);
}
////////////////////////Moderating A Club Member//////////
else if($action=="clmop"){
$clid = $_GET["clid"];
$who = $_GET["who"];
addonline($uid,"Moderating club member","index.php?action=$action&clid=$clid&who=$who");
getnewmsg($sid);
getalert($sid);
getshouts($sid);
$whnick = getnick_uid($who);
boxstart("Moderate $whnick");
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 "<a href=\"genproc.php?action=dcm&sid=$sid&who=$who&clid=$clid\">»Kick $whnick out</a><br/>";
//echo "<a href=\"index.php?action=gcp&sid=$sid&who=$who&clid=$clid\">»$whnick's Club Points</a><br/>";
//echo "<a 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>";
boxend();
getfooter($sid);
}
///////////////////////////////////Clubs //////////////////////
else if($action=="clmenu"){
addonline($uid,"Clubs Menu","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Clubs Menu");
echo "
<p>
<a href=\"index.php?action=clubs&sid=$sid\">»All Clubs</a><br/>
<a href=\"index.php?action=myclub&sid=$sid\">»My Clubs</a><br/>
<a href=\"lists.php?action=ucl&sid=$sid&who=$uid\">»Clubs I'm member of</a><br/>
<a href=\"lists.php?action=pclb&sid=$sid&who=$uid\">»Clubs By popularity</a><br/>
<a href=\"lists.php?action=aclb&sid=$sid&who=$uid\">»Clubs By Activity</a><br/>
<a href=\"lists.php?action=rclb&sid=$sid&who=$uid\">»5 random clubs</a><br/>";
$ncl = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_clubs ORDER BY created DESC LIMIT 1"));
echo "Newest Club: <a href=\"index.php?action=gocl&clid=$ncl[0]&sid=$sid\">".htmlspecialchars($ncl[1])."</a><br/>
</p>";
boxend();
getfooter($sid);
}
///////////////////////////////////My Clubs//////////
else if($action=="myclub"){
addonline($uid,"Clubs","index.php?action=$action");
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("My Clubs");
echo "<p>";
if(getpoints($sid)<100){
echo "You can't create clubs, can just view them because you have less than 100 points. To know how to obtain points, ask any moderator.<br/>";
}
$uclubs = mysql_query("SELECT id, name FROM ibwf_clubs WHERE owner='".$uid."'");
while($club=mysql_fetch_array($uclubs)){
$requ = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid =
'".$club[0]."' AND accepted = '0'"));
echo "<a href=\"index.php?action=gocl&clid=$club[0]&sid=$sid\">$club[1]</a> - $requ[0] new requests
<a href=\"index.php?action=edcl&clid=$club[0]&sid=$sid\">[EDIT]</a><br/>";
}
echo "</p><p align=\"center\">";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
if(($noi[0]<=7) && (getpoints($sid)>99)){
echo "<a href=\"index.php?action=addcl&sid=$sid\">Add Club</a>";
}
echo "<br/><a href=\"index.php?action=clmenu&sid=$sid\">All Users' Clubs</a>
</p>";
boxend();
getfooter($sid);
}
///////////////////////////////////My Clubs///////
else if($action=="clubs"){
addonline($uid,"Clubs List","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Clubs List");
//////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;
$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> Owner: <a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">".getnick_uid($item[2])."</a>";
echo "$lnk<br/>";
echo htmlspecialchars($item[3])."<br/>Creation Date: (".date("d/m/y", $item[4]).")<br/><br/>";
}
}
echo "</p>
<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 "<br/>$page/$num_pages<br/>";
if($num_pages>2){
$rets = "<center>Jump to page<form action=\"index.php\" method=\"get\"><input id=\"inputText\" name=\"pg\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
$rets .= "<input id=\"inputButton\" type=\"submit\" value=\"Go\"/>";
$rets .= "</form></center>";
echo $rets;
}
echo "</p>";
boxend();
getfooter($sid);
}
////////////////////////////view club///////
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."'"));
$clnm = htmlspecialchars($clinfo[0]);
addonline($uid,"$clnm club page","index.php?action=$action&clid=$clid");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("$clnm");
echo"
<p align=\"center\">
";
if(trim($clinfo[4])==""){
echo "<img src=\"images/logo.gif\" alt=\"logo\"/>";
}else{
echo "<img src=\"$clinfo[4]\" alt=\"logo\"/>";
}
echo "</p>
<p>
Club ID: <b>$clid</b><br/>";
$mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='1'"));
echo "Owner: <a href=\"index.php?action=viewuser&who=$clinfo[1]&sid=$sid\">".getnick_uid($clinfo[1])."</a><br/>
Members: <a href=\"lists.php?action=clmem&sid=$sid&clid=$clid\">$mems[0]</a><br/>
Created On: ".date("d/m/y", $clinfo[6])."<br/>";
//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]."'"));
$cango = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND uid='".$uid."' AND accepted='1'"));
if(($cango[0]>0)||ismod($uid)){
$noa = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_announcements WHERE clid='".$clid."'"));
echo "<br/><a 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 "<a href=\"chat.php?sid=$sid&rid=$rid[0]\"><img src=\"images/chat.gif\" alt=\"*\"/>$clnm Chat($noa[0])</a><br/>
<a 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='".$uid."'"));
if($ismem[0]>0){
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(isadmin($uid)){
//echo "<br/><a href=\"admonition.php?action=club&sid=$sid&clid=$clid\">Admin Tools</a>";
//}
if($clinfo[1]==$uid){
$mems = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE clid='".$clid."' AND accepted='0'"));
echo "<br/><a 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/>
<b>Description:</b><br/>";
echo htmlspecialchars($clinfo[2]);
echo "<br/><br/>
<b>Rules:</b><br/>";
echo htmlspecialchars($clinfo[3]);
echo "<br/><br/>
Seems Good? <a href=\"genproc.php?action=reqjc&sid=$sid&clid=$clid\">Join Now!</a>";
}
echo "</p>
<p align=\"center\">
<a href=\"index.php?action=clubs&sid=$sid\">
Clubs list</a></p>";
boxend();
getfooter($sid);
}
///////////////////////////////////////////Add Club////////
else if($action=="addcl"){
addonline($uid,"Adding Club","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Add Club");
echo"
<p>";
if(getpoints($sid)>=100){
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$uid."'"));
if($noi[0]<7){
echo "<img src=\"images/point.gif\" alt=\"*\"/>All Info are required except the logo<br/>
<img src=\"images/point.gif\" alt=\"*\"/>Beside you, mods can moderate your club forums and chat<br/>
<img src=\"images/point.gif\" alt=\"*\"/>Any leading spaces for description, name, logo, or rules will be removed<br/>
<img src=\"images/point.gif\" alt=\"*\"/>Admins will delete your club and subtract your plusses if you abuse the using of the club<br/>
<img src=\"images/point.gif\" alt=\"*\"/>Admins have the right to delete your club if it want active or if it was useless<br/><br/>
Club Name:<br/><form action=\"genproc.php?action=addcl&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"clnm\" maxlength=\"30\"/><br/>
Description:<br/><input id=\"inputText\" name=\"clds\" maxlength=\"200\"/><br/>
Rules:<br/><input id=\"inputText\" name=\"clrl\" maxlength=\"500\"/><br/>
Logo:<br/><input id=\"inputText\" name=\"cllg\" maxlength=\"200\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>
</form>";
}else{
echo "You already have 7 clubs";
}
}else{
echo "You cant add clubs";
}
echo "</p>";
boxend();
getfooter($sid);
}
////////////////////////////////////////////////Edit Club////////
else if($action=="edcl"){
$cid = $_GET["clid"];
$clinfo = mysql_fetch_array(mysql_query("SELECT name, description, rules, logo FROM ibwf_clubs WHERE id='".$cid."'"));
addonline($uid,"Editing $clinfo[0] club","index.php?action=$action&clid=$cid");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("$clinfo[0]");
echo "
<p>
Club Name:<br/><form action=\"genproc.php?action=edcl&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"clnm\" value=\"$clinfo[0]\" maxlength=\"30\"/><br/>
Description:<br/><textarea id=\"inputText\" name=\"clds\">$clinfo[1]</textarea><br/>
Rules:<br/><textarea id=\"inputText\" name=\"clrl\">$clinfo[2]</textarea><br/>
Logo:<br/><input id=\"inputText\" name=\"cllg\" value=\"$clinfo[3]\" maxlength=\"200\"/><br/>
<input type=\"hidden\" name=\"cid\" value=\"$cid\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>
</form>
<br/><br/><a href=\"genproc.php?action=dlcl&clid=$cid&sid=$sid\">Delete this club</a><br/><br/>
</p>";
boxend();
getfooter($sid);
}
//////////////////////////////////////////Add Blog//////
else if($action=="addblg"){
if(!getpoints($sid)>=50){
boxstart("Error!");
echo "<p align=\"center\">
At least you should have 50 points to add a blog. To know how to obtain points ask a moderator.<br/><br/><a href=\"index.php?action=main&sid=$sid\">Main Menu</a>
</p></div></div></font></body>
</html>";
exit();
}
addonline($uid,"Adding a blog","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Add Blog");
echo "
<p><form action=\"genproc.php?action=addblg&sid=$sid\" method=\"post\">
Title:<br/><input id=\"inputText\" name=\"btitle\" maxlength=\"30\"/><br/>
Text:<br/><textarea id=\"inputText\" name=\"msgtxt\"></textarea><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Post\"/></form>
</p>";
boxend();
getfooter($sid);
}
///////////////////////////////////Settings & Info ////////////////
else if($action=="cpanel"){
addonline($uid,"Preferences","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Preferences");
$sql = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_users WHERE id='".$uid."'"));
echo "
<p><form action=\"genproc.php?action=upwd&sid=$sid\" method=\"post\"><b><u>Change Password:</u></b><br/>Enter Old Password:<br/><input id=\"inputText\" type=\"password\" name=\"opwd\" format=\"*x\" maxlength=\"15\"/><br/>Enter New Password:<br/><input id=\"inputText\" type=\"password\" name=\"npwd\" format=\"*x\" maxlength=\"15\"/><br/>
Repeat New Password :<br/><input id=\"inputText\" type=\"password\" name=\"cpwd\" format=\"*x\" maxlength=\"15\"/><br/><input type=\"hidden\" name=\"sql\" value=\"$sql[0]\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Change\"/>
</form></p><br/><br/>
<center><b><u>Profile</u></b></center>
<br/>»<a href=\"index.php?action=uset&sid=$sid\">Update Profile</a><br/>
»<a href=\"index.php?action=ucont&sid=$sid\">Update Contact Details</a><br/>
»<a href=\"lists.php?action=avatars&sid=$sid\">Choose Avatar Image</a><br/>
»<a href=\"lists.php?action=upavat&sid=$sid\">Upload Avatar</a><br/><br/>";
echo "<center><b><u>Display</u></b></center>
»<a href=\"index.php?action=mainthm&sid=$sid\">Manage Themes</a><br/>";
if (alertstat($sid)==0){
echo "»<a href=\"index.php?action=alert&sid=$sid\">Turn alerts on</a><br/>";
}
else{
echo "»<a href=\"index.php?action=alert&sid=$sid\">Turn alerts off</a><br/>";
}
$cloak = mysql_fetch_array(mysql_query("SELECT hidden FROM ibwf_users WHERE id = '".$uid."'"));
if ($cloak[0]==1){
echo "»<a href=\"index.php?action=cloak&sid=$sid\">Turn off Hidden Mode</a><br/>";
}
else{
echo "»<a href=\"index.php?action=cloak&sid=$sid\">Turn on Hidden Mode</a><br/>";
}
echo "
<br/><center><b><u>Forums</u></b></center>
";
echo "»<a href=\"index.php?action=ppp&sid=$sid\">Forum Posts Per Page</a><br/>";
echo "»<a href=\"index.php?action=bookmarks&sid=$sid\">Manage Bookmarks</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_ignore WHERE name='".$uid."'"));
echo "
<br/><center><b><u>Other</u></b></center>
»<a href=\"index.php?action=poll&sid=$sid\">My Poll</a><br/>
»<a href=\"lists.php?action=ignl&sid=$sid\">Ignore List($noi[0])</a><br/>
»<a href=\"index.php?action=idc&sid=$sid\">View ID Card</a><br/>
»<a href=\"lists.php?action=smilies&sid=$sid\">Smilies/Emoticons</a>";
boxend();
getfooter($sid);
}
/////////////////ppp/////////////
else if($action=="ppp"){
addonline($uid,"Setting posts per page","index.php?action=$action");
$ppp = mysql_fetch_array(mysql_query("SELECT ppp FROM ibwf_users WHERE id = $uid"));
gettimebar();
getnewmsg($sid);
getshouts($sid);
boxstart("Posts Per Page");
echo "
<p>Please choose the number of posts per page you want to get displayed in forums:<br/>
<form action=\"genproc.php?action=setppp&sid=$sid\" method=\"post\"><input id=\"inputText\" type=\"text\" name=\"ppp\" value=\"$ppp[0]\" format=\"*N\" maxlength=\"3\"/><br/>
<input id=\"inputText\" type=\"submit\" value=\"Set\"/>
</form>
</p>";
boxend();
getfooter($sid);
}
/////////////////set font size/////////////
else if($action=="font"){
addonline($uid,"Setting font size","index.php?action=$action");
$ppp = mysql_fetch_array(mysql_query("SELECT ppp FROM ibwf_users WHERE id = $uid"));
gettimebar();
getnewmsg($sid);
getshouts($sid);
boxstart("Font Size");
echo "
<p>Please choose the size of text to be displayed:<br/>
<form action=\"genproc.php?action=font&sid=$sid\" method=\"post\">
<select id=\"iputText\" name=\"size\">
<option value=\"1\">Small</option>
<option value=\"2\">Medium</option>
<option value=\"3\">Large</option>
</select>
<br/><input id=\"inputButton\" type=\"submit\" value=\"Set\"/>
</form>
</p>";
boxend();
getfooter($sid);
}
/////////////Themes Main Menu/////////////
else if($action=="mainthm"){
addonline($uid,"Themes Menu","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Themes Menu");
echo "Here you can fiddle with your theme.<br/>
<a href=\"index.php?action=font&sid=$sid\">Set Font Size</a><br/>
<a href=\"index.php?action=presetthm&sid=$sid\">Select Preset Theme</a><br/>";
$blah=mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM themes WHERE uid=$uid"));
if($blah[0]>0){
$tid = mysql_fetch_array(mysql_query("SELECT id FROM themes WHERE uid='".$uid."' AND applied=1"));
}
else $tid = mysql_fetch_array(mysql_query("SELECT id FROM themes WHERE uid=4 AND applied=1"));
echo "<a href=\"index.php?action=theme&sid=$sid&tid=$tid[0]\">Edit Current Theme</a><br/>";
echo "<a href=\"index.php?action=svdthm&sid=$sid\">View/Edit Saved Themes</a><br/>";
boxend();
getfooter($sid);
}
/////////////Themes Main Menu/////////////
else if($action=="presetthm"){
addonline($uid,"Choosing preset theme","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Preset Themes");
echo "Here you can choose from several preset themes. This is easy for the newbies. Experts can edit the theme themselves.<br/>";
echo "
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#78b1b8\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_vista.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"#ffffff\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#ffffff\" />
<input type=\"hidden\" name=\"alink\" value=\"black\"/>
<input type=\"hidden\" name=\"vlink\" value=\"black\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#78b1b8\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_vista.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"black\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_vista.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#494a4b\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#78b1b8\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#78b1b8\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#494a4b\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_vista.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Vista\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Vista\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#2c6fff\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_xp.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"#ffffff\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#ffffff\" />
<input type=\"hidden\" name=\"alink\" value=\"#215dc6\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#215dc6\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#ffde9a\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_vista.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"black\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_vista.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"black\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#0058ee\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#0058ee\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"black\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_vista.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"XP\"/>
<input id=\"inputButton\" type=\"submit\" value=\"XP\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#4e515b\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_black.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"#cfd1d6\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#08090a\" />
<input type=\"hidden\" name=\"alink\" value=\"#93afb9\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#93afb9\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#4e515b\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_black.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"#2e343b\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#fafafa\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_black.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"#08090a\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#cdced4\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#93afb9\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"#08090a\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#cdced4\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#93afb9\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_black.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Royal Black\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Royale Black\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#ff9bfd\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_pink.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"#3600c0\"/>
<input type=\"hidden\" name=\"divbg\" value=\"white\" />
<input type=\"hidden\" name=\"alink\" value=\"#58aa60\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#58aa60\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#ff9bfd\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#006600\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#58aa60\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#ff66fe\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#ff66fe\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#58aa60\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_vista.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Green Pink\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Green Pink\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#FF6B6B\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_red.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"white\"/>
<input type=\"hidden\" name=\"divbg\" value=\"white\" />
<input type=\"hidden\" name=\"alink\" value=\"#000000\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#000000\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#FF6B6B\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#767676\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#767676\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"red\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"red\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#d6d6d6\"/>
<input type=\"hidden\" name=\"footershade\" value=\"lbg_red.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Red\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Red\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#ffcb59\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_yellow.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"white\"/>
<input type=\"hidden\" name=\"divbg\" value=\"white\" />
<input type=\"hidden\" name=\"alink\" value=\"#aa9758\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#aa9758\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#9bbbff\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#e16400\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_brown.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#c67347\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#6699ff\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#6699ff\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#c67347\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_vista.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Yellow\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Yellow\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#012e60\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"tbg_aero.gif\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"white\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#f1f4f8\" />
<input type=\"hidden\" name=\"alink\" value=\"black\"/>
<input type=\"hidden\" name=\"vlink\" value=\"black\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#ffde9a\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"lbg_aero.gif\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"#022045\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#002b77\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"lbg_aero.gif\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"#f1f4f8\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"#479AC6\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#718292\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"#f1f4f8\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#718292\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#479AC6\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_aero.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Aero\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Aero\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#222222\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"#00FF00\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#333333\" />
<input type=\"hidden\" name=\"alink\" value=\"#00FF00\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#00FF00\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#222222\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"black\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"#009900\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"#333333\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"black\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#009900\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"#333333\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"#009900\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"black\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_matrix.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Matrix\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Matrix\"/></form><br/>
<form action=\"genproc.php?action=setthm&sid=$sid\" method=\"post\">
<input type=\"hidden\" name=\"titlebg\" value=\"#333333\"/>
<input type=\"hidden\" name=\"titleshade\" value=\"\"/>
<input type=\"hidden\" name=\"titlecolor\" value=\"white\"/>
<input type=\"hidden\" name=\"divbg\" value=\"#eeeeee\" />
<input type=\"hidden\" name=\"alink\" value=\"#0066ff\"/>
<input type=\"hidden\" name=\"vlink\" value=\"#0066ff\"/>
<input type=\"hidden\" name=\"timebarbg\" value=\"#333333\"/>
<input type=\"hidden\" name=\"timebarshade\" value=\"\"/>
<input type=\"hidden\" name=\"pagebg\" value=\"white\"/>
<input type=\"hidden\" name=\"pagetext\" value=\"black\"/>
<input type=\"hidden\" name=\"logoshade\" value=\"\"/>
<input type=\"hidden\" name=\"inputboxbg\" value=\"white\"/>
<input type=\"hidden\" name=\"inputboxtext\" value=\"black\"/>
<input type=\"hidden\" name=\"inputboxborder\" value=\"#333333\"/>
<input type=\"hidden\" name=\"buttonbg\" value=\"white\"/>
<input type=\"hidden\" name=\"buttontext\" value=\"black\"/>
<input type=\"hidden\" name=\"buttonborder\" value=\"#333333\"/>
<input type=\"hidden\" name=\"footershade\" value=\"f_opera.gif\"/>
<input type=\"hidden\" name=\"nm\" value=\"Opera - WML\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Opera - WML\"/></form><br/>
";
echo "<a href=\"index.php?action=mainthm&sid=$sid\">Themes Menu</a>";
boxend();
getfooter($sid);
}
/////////////////customise theme/////////////
else if($action=="theme"){
addonline($uid,"Editing a theme","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
$tid = $_GET["tid"];
$quer = mysql_fetch_array(mysql_query("SELECT * FROM themes WHERE id='".$tid."'"));
boxstart("Edit Theme - $quer[20]");
echo "Here you can edit a theme. You can enter hex values of colours(like #FFD6AA) in the text boxes below or write individual colour names from this list:<br/><br/> aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquise, darkviolet, deeppink, deepskyblue, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, green, greenyellow, gray, hotpink, indianred, indigo, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaqamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen<br/>
<br/>";
echo "<form action=\"genproc.php?action=theme&sid=$sid\" method=\"post\">
Theme name: <br/><input id=\"inputText\" type=\"text\" name=\"nm\" value=\"$quer[20]\"/><br/>
Title background:<br/> <input id=\"inputText\" type=\"text\" name=\"titlebg\" value=\"$quer[2]\"/><br/>
Title shade:<br/> <select id=\"inputText\" type=\"text\" name=\"titleshade\" value=\"$quer[3]\">
<option value=\"tbg_black.gif\">Black</option>
<option value=\"tbg_aero.gif\">Aero</option>
<option value=\"tbg_pink.gif\">Pink</option>
<option value=\"tbg_red.gif\">Red</option>
<option value=\"tbg_xp.gif\">XP</option>
<option value=\"tbg_vista.gif\">Vista</option>
<option value=\"tbg_yellow.gif\">Yellow</option>
</select><br/>
Title text:<br/> <input id=\"inputText\" type=\"text\" name=\"titlecolor\" value=\"$quer[4]\"/><br/>
Content background:<br/> <input id=\"inputText\" type=\"text\" name=\"divbg\" value=\"$quer[5]\" /><br/>
Active link : <br/><input id=\"inputText\" type=\"text\" name=\"alink\" value=\"$quer[6]\"/><br/>
Visited link : <br/><input id=\"inputText\" type=\"text\" name=\"vlink\" value=\"$quer[7]\"/><br/>
Timebar background: <br/><input id=\"inputText\" type=\"text\" name=\"timebarbg\" value=\"$quer[8]\"/><br/>
Timebar shade:<br/> <select id=\"inputText\" type=\"text\" name=\"timebarshade\" value=\"$quer[9]\">
<option value=\"lbg_black.gif\">Black</option>
<option value=\"lbg_aero.gif\">Aero</option>
<option value=\"lbg_brown.gif\">Brown</option>
<option value=\"lbg_vista.gif\">Vista</option>
</select><br/>
Page background: <br/><input id=\"inputText\" type=\"text\" name=\"pagebg\" value=\"$quer[10]\"/><br/>
Text: <br/><input id=\"inputText\" type=\"text\" name=\"pagetext\" value=\"$quer[11]\"/><br/>
Logo shade:<br/> <select id=\"inputText\" type=\"text\" name=\"logoshade\" value=\"$quer[12]\">
<option value=\"lbg_black.gif\">Black</option>
<option value=\"lbg_aero.gif\">Aero</option>
<option value=\"lbg_brown.gif\">Brown</option>
<option value=\"lbg_vista.gif\">Vista</option>
<option value=\"lbg_red.gif\">Red</option>
</select><br/>
Inputbox background: <br/><input id=\"inputText\" type=\"text\" name=\"inputboxbg\" value=\"$quer[13]\"/><br/>
Inputbox text: <br/><input id=\"inputText\" type=\"text\" name=\"inputboxtext\" value=\"$quer[14]\"/><br/>
Inputbox border: <br/><input id=\"inputText\" type=\"text\" name=\"inputboxborder\" value=\"$quer[15]\"/><br/>
Inputbutton background: <br/><input id=\"inputText\" type=\"text\" name=\"buttonbg\" value=\"$quer[16]\"/><br/>
Inputbutton text: <br/><input id=\"inputText\" type=\"text\" name=\"buttontext\" value=\"$quer[17]\"/><br/>
Inputbutton border: <br/><input id=\"inputText\" type=\"text\" name=\"buttonborder\" value=\"$quer[18]\"/><br/>
Footer shade:<br/> <select id=\"inputText\" type=\"text\" name=\"footershade\" value=\"$quer[19]\">
<option value=\"f_black.gif\">Black</option>
<option value=\"f_aero.gif\">Aero</option>
<option value=\"f_vista.gif\">Vista</option>
<option value=\"f_opera.gif\">Opera</option>
<option value=\"f_matrix.gif\">Matrix</option>
<option value=\"lbg_red.gif\">Red</option>
</select><br/>
<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Edit Theme\"/>
</form><br/>";
echo "<br/><a href=\"index.php?action=mainthm&sid=$sid\">Themes Menu</a>";
boxend();
getfooter($sid);
}
//////////////////Stored Themes//////////////////////
else if($action=="svdthm"){
addonline($uid,"Stored Themes","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
$limit = 10;
$noi = "SELECT COUNT(*) FROM themes WHERE uid = '".$uid."'";
$noiq = mysql_query($noi);
while($noinum=mysql_fetch_array($noiq))
{ $total=$noinum[0]; }
$bal=$limit-$total;
boxstart("Saved Themes");
echo "Following are your stored Themes. You can delete or apply them.<br/>Click on the Theme name to edit it.<br/>";
echo "You can store $bal more themes, out of a total of $limit allowed.<br/><br/>";
$sql = "SELECT id,name FROM themes WHERE uid=$uid";
$items = mysql_query($sql);
while($item=mysql_fetch_array($items))
{
$tlink = "<a href=\"index.php?action=theme&sid=$sid&tid=$item[0]\">".$item[1]."</a>";
echo "<b>$tlink</b> [<a href=\"genproc.php?action=appthm&sid=$sid&tid=$item[0]\">Apply</a>] | [<a href=\"genproc.php?action=delthm&sid=$sid&tid=$item[0]\">Delete</a>]<br/>";
}
boxend();
getfooter($sid);
}
///////////////////////////////////Search////////////////
else if($action=="search"){
addonline($uid,"Search Menu","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Search menu");
echo "»
<a href=\"search.php?action=tpc&sid=$sid\">In Forums</a><br/>
»<a href=\"search.php?action=nbx&sid=$sid\">In My Inbox</a><br/>
»<a href=\"search.php?action=files&sid=$sid\">In Uploads Center</a>";
echo "<p>
Find Members:<br/>
»<a href=\"search.php?action=mbrn&sid=$sid\">In Nicknames</a><br/>
More search options for members are to come soon.<br/>
<br/>Or, you may just type the nickname of the member below and view his/her profile.<br/>
<br/>Nickname <form action=\"index.php?action=viewuser&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"mnick\" maxlength=\"15\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"View\"/>
</form>
</p>";
boxend();
getfooter($sid);
}
///////////////////////////////////Profile Settings//////////////////
else if($action=="uset"){
addonline($uid,"Updating Profile","index.php?action=$action");
$avat = getavatar($uid);
$bdy = mysql_fetch_array(mysql_query("SELECT birthday FROM ibwf_users WHERE id='".$uid."'"));
$uloc = mysql_fetch_array(mysql_query("SELECT location FROM ibwf_users WHERE id='".$uid."'"));
$usig = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$uid."'"));
$sx = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$uid."'"));
$ms = mysql_fetch_array(mysql_query("SELECT ms FROM ibwf_users WHERE id='".$uid."'"));
$realname = mysql_fetch_array(mysql_query("SELECT rname FROM ibwf_users WHERE id='".$uid."'"));
$likes = mysql_fetch_array(mysql_query("SELECT likes FROM ibwf_users WHERE id='".$uid."'"));
$hates = mysql_fetch_array(mysql_query("SELECT hates FROM ibwf_users WHERE id='".$uid."'"));
$avatar = mysql_fetch_array(mysql_query("SELECT avatar FROM ibwf_users WHERE id='".$uid."'"));
$mail = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$uid."'"));
$dob = explode("-",$bdy[0]);
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Updating Profile");
echo "<p>Star (*) marked fields are compulsory to fill..<br/><br/>
Real Name: <br/><form action=\"genproc.php?action=uprof&sid=$sid\" method=\"post\">
<br/><input id=\"inputText\" type=\"text\" name=\"rname\" value=\"$realname[0]\" maxlength=\"50\"/><br/>
E-Mail:<br/><input id=\"inputText\" type=\"text\" name=\"email\" value=\"$email[0]\" maxlength=\"100\"/><br/>
Birthday in DD-MM-YYYY format, like 05-09-1988:<br/><input id=\"inputText\" type=\"text\" name=\"ubdt\" value=\"$dob[2]\" maxlength=\"2\" size=\"2\"/>-<input id=\"inputText\" type=\"text\" value=\"$dob[1]\" name=\"ubdu\" maxlength=\"2\" size=\"2\"/>-<input id=\"inputText\" type=\"text\" name=\"ubdv\" value=\"$dob[0]\" maxlength=\"4\" size=\"4\"/><br/>
Sex: <br/><select id=\"inputText\" name=\"usex\" value=\"$sx[0]\">
<option value=\"M\">Male</option>
<option value=\"F\">Female</option>
</select><br/>
Location: <br/><input id=\"inputText\" name=\"uloc\" value=\"$uloc[0]\" maxlength=\"50\"/><br/>
Marital Status: <br/><select id=\"inputText\" name=\"ms\" value=\"$ms[0]\">
<option value=\"S\">Single</option>
<option value=\"P\">Partnered</option>
</select><br/>
Likes: <br/><textarea id=\"inputText\" name=\"likes\" rows=\"1\" cols=\"35\">$likes[0]</textarea><br/>
Hates: <br/><textarea id=\"inputText\" name=\"hates\" rows=\"1\" cols=\"35\">$hates[0]</textarea><br/>
Avatar Image URL:<br/> <input id=\"inputText\" name=\"savat\" value=\"$avat\" maxlength=\"100\"/><br/>
Signature: <br/><input id=\"inputText\" name=\"usig\" value=\"$usig[0]\" maxlength=\"255\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Update\"/>
</form>
</p>";
boxend();
getfooter($sid);
}
////////Update Contact Details//////
else if($action=="ucont"){
addonline($uid,"Updating Contact Details","index.php?action=$action");
$email=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$uid."'"));
$aim = mysql_fetch_array(mysql_query("SELECT aim FROM ibwf_xinfo WHERE uid='".$uid."'"));
$icq = mysql_fetch_array(mysql_query("SELECT icq FROM ibwf_xinfo WHERE uid='".$uid."'"));
$msn = mysql_fetch_array(mysql_query("SELECT msn FROM ibwf_xinfo WHERE uid='".$uid."'"));
$skype = mysql_fetch_array(mysql_query("SELECT skype FROM ibwf_xinfo WHERE uid='".$uid."'"));
$yahoo = mysql_fetch_array(mysql_query("SELECT yahoo FROM ibwf_xinfo WHERE uid='".$uid."'"));
$gtalk = mysql_fetch_array(mysql_query("SELECT gtalk FROM ibwf_xinfo WHERE uid='".$uid."'"));
$orkut = mysql_fetch_array(mysql_query("SELECT orkut FROM ibwf_xinfo WHERE uid='".$uid."'"));
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Update Contact Details");
echo "<p><br/>
Email: <br/><form action=\"genproc.php?action=ucont&sid=$sid\" method=\"post\">
<input id=\"inputText\" type=\"text\" name=\"email\" value=\"$email[0]\" maxlength=\"100\"/><br/>
AIM Screen Name:<br/><input id=\"inputText\" type=\"text\" name=\"aim\" value=\"$aim[0]\" maxlength=\"100\"/><br/>
ICQ Number:<br/><input id=\"inputText\" type=\"text\" name=\"icq\" value=\"$icq[0]\" maxlength=\"15\"/><br/>
MSN Messenger Handle: <br/><input id=\"inputText\" name=\"msn\" value=\"$msn[0]\" maxlength=\"100\"/><br/>
Skype Name: <br/><input id=\"inputText\" name=\"skype\" value=\"$skype[0]\" maxlength=\"100\"/><br/>
Yahoo! Messenger Handle: <br/><input id=\"inputText\" name=\"yahoo\" value=\"$yahoo[0]\" maxlength=\"100\"/><br/>
GTalk Screen Name: <br/><input id=\"inputText\" name=\"gtalk\" value=\"$gtalk[0]\" maxlength=\"100\"/><br/>
Orkut Email Address or UID: <br/><input id=\"inputText\" name=\"orkut\" value=\"$orkut[0]\" maxlength=\"100\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Update\"/>
</form>
</p>";
boxend();
getfooter($sid);
}
/////////////////////////////IDC//////////////////////////////////////////////////////////////////////////////////////////////
else if($action=="idc"){
addonline($uid,"Viewing ID Card","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("ID Card");
echo "
<p align=\"center\">
<img src=\"idc.php?id=$uid\" alt=\"I-CARD\"/><br/><br/>
This ID card gets automatically updated regularly, the URL of your card is <br/>$siteurl/idc.php?id=$uid<br/>
You can use this URL as your avatar image :)<br/><br/>
</p>
<p align=\"center\">
<a href=\"index.php?action=main&sid=$sid\">
</p>";
boxend();
getfooter($sid);
}
//////////////////////////////////////Site Stats////////////////////////////////////////////////////////////////////////////////////
else if($action=="stats"){
addonline($uid,"Site statistics","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Site Stats");
echo "<center><b><u>Member Stats</u></b></center><br/>";
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users"));
echo "»<a href=\"lists.php?action=members&sid=$sid\">Registered Members($norm[0])</a><br/>";
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE sex='M'"));
echo "»<a href=\"lists.php?action=males&sid=$sid\">Male Members($norm[0])</a><br/>";
$norm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE sex='F'"));
echo "»<a href=\"lists.php?action=fems&sid=$sid\">Female Members($norm[0])</a><br/>";
$memid = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users ORDER BY regdate DESC LIMIT 0,1"));
echo "<b>Newest user: </b><a href=\"index.php?action=viewuser&who=$memid[0]&sid=$sid\">$memid[1]</a><br/>";
$mon = date("m",time()+addhours());
$dat = date("d",time()+addhours());
$tbday=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users where month(`birthday`) = $mon and dayofmonth(`birthday`) = $dat;"));
echo "»<a href=\"lists.php?action=bdy&sid=$sid\">Today's Birthday($tbday[0])</a><br/><br/>";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'"));
echo mysql_error();
$maxmem=mysql_fetch_array(mysql_query("SELECT value, name FROM ibwf_settings WHERE id='2'"));
echo "<center><b><u>Online Stats</u></b></center><br/>";
echo "<b>Maximum online users ever: </b>$maxmem[0] on $maxmem[1]";
$maxtoday = mysql_fetch_array(mysql_query("SELECT ppl FROM ibwf_mpot WHERE ddt='".date("d m y")."'"));
echo "<br/><b>Maximum online users today: </b>$maxtoday[0]";
echo "<br/><b>Online users in last 24 hours: </b>$aut[0]<br/>
<a href=\"lists.php?action=moto&sid=$sid\">Online stats in last 10 days</a><br/><br/>";
echo "<center><b><u>Content Stats</u></b></center><br/>";
$notc = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics"));
$nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts"));
echo "<b>Number of Topics in forums: </b>$notc[0] <br/><b>Number of Posts in forums: </b>$nops[0]<br/>";
$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private"));
echo "<b>Number of messages in users' inboxes: </b>$nopm[0]<br/>";
$nopm = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='Counter'"));
echo "<b>Visitor counter: </b>$nopm[0]
<br/>»<a href=\"index.php?action=l24&sid=$sid\">Last 24 Hours Detailed Stats</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs"));
echo "»<a href=\"lists.php?action=allbl&sid=$sid\">Blogs($noi[0])</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs"));
echo "»<a href=\"index.php?action=clubs&sid=$sid\">Clubs($noi[0])</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE pollid>'0'"));
echo "»<a href=\"lists.php?action=polls&sid=$sid\">Polls($noi[0])</a><br/><br/>";
echo "<center><b><u>Topper Stats</u></b></center><br/>
»<a href=\"lists.php?action=toponline&sid=$sid\">Top Online Users</a><br/>
»<a href=\"lists.php?action=topc&sid=$sid\">Top Point Holders</a><br/>
»<a href=\"lists.php?action=topp&sid=$sid\">Top Posters</a><br/>
»<a href=\"lists.php?action=tchat&sid=$sid\">Top Chatters</a><br/>
»<a href=\"lists.php?action=tshout&sid=$sid\">Top Shouters</a><br/>
»<a href=\"lists.php?action=topg&sid=$sid\">Top Gamers</a><br/>
»<a href=\"lists.php?action=popu&sid=$sid\">Most Popular Users</a><br/><br/>";
echo "<center><b><u>Punished Users</u></b></center><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_penalties WHERE penalty='1' OR penalty='2'"));
echo "»<a href=\"lists.php?action=banned&sid=$sid\">Banned Users($noi[0])</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_penalties WHERE penalty='0'"));
echo "»<a href=\"lists.php?action=trashed&sid=$sid\">Trashed($noi[0])</a><br/>";
boxend();
getfooter($sid);
}
////temp/////
else if($action=="tempor"){
addonline($uid,"Being Eaten by PHP/SQL!!!!","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
/*$sql = mysql_query("SELECT id FROM ibwf_users");
while ($id = mysql_fetch_array($sql)){
mysql_query("INSERT INTO ibwf_xinfo SET uid='".$id[0]."', aim = 'Not Given', icq = 'Not Given', msn = 'Not Given', skype = 'Not Given', yahoo = 'Not Given', gtalk = 'Not Given', orkut = 'Not Given'");
}
if($sql){
echo "Message Broadcasted Successfully!<br/><br/>";
}
else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/>Error Broadcasting Message!";
}*/
}
/////////Last 24 hour details///////////
else if($action=="l24"){
addonline($uid,"Site statistics","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("24 hour stats");
echo "<p>";
echo "Things happened in $sitename in the last 24 hours.<br/><br/>";
$tm24 = time() - (24*60*60);
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE lastact>'".$tm24."'"));
echo "<b>Active Members: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE regdate>'".$tm24."'"));
echo "<b>Registered Members: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bgdate>'".$tm24."'"));
echo "<b>Blogs Created: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE reqdt>'".$tm24."' AND agreed='1'"));
echo "<b>Buddies Added: </b>$aut[0]<br/>";
if(ismod($uid)){
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_mlog WHERE actdt>'".$tm24."'"));
echo "<b>ModLog Actions: </b>$aut[0]<br/>";
}
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_polls WHERE pdt>'".$tm24."'"));
echo "<b>Polls Added: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE dtpost>'".$tm24."'"));
echo "<b>Posts: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE timesent>'".$tm24."'"));
echo "<b>Messages Sent: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shtime>'".$tm24."'"));
echo "<b>Shouts: </b>$aut[0]<br/>";
$aut = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE crdate>'".$tm24."'"));
echo "<b>Topics Created: </b>$aut[0]<br/>
</p>
<p align=\"center\">
<a href=\"index.php?action=stats&sid=$sid\">
Statistics</a><br/>
</p>
";
boxend();
getfooter($sid);
}
/////////////////////////////////Add Reputation///////////////
else if($action=="addrep"){
$tid = $_GET["tid"];
$getnick = mysql_fetch_array(mysql_query("SELECT authorid, crdate FROM ibwf_topics WHERE id='".$tid."'"));
$unick = getnick_uid($getnick[0]);
addonline($uid,"Adding To $unick\'s Reputation","index.php?action=$action&tid=$tid");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Adding Reputation");
echo "<p align=\"center\"><b>Add To $unick\'s Reputation:</b></p>
<form method=\"post\" action=\"genproc.php?action=addrepfin&sid=$sid\"><b>How Many Points Would You Like To Add To $unick\'s Reputation?</b><br/><br/>
<input type=\"radio\" name=\"rid\" value=\"5\" />5 Points - WHOA! Extraordinarily Great Post!<br/>
<input type=\"radio\" name=\"rid\" value=\"4\" />4 Points - Excellent Post!<br/>
<input type=\"radio\" name=\"rid\" value=\"3\" checked=\"checked\" />3 Points - Very Good Post! :P<br/>
<input type=\"radio\" name=\"rid\" value=\"2\" />2 Points - Good Post!<br/>
<input type=\"radio\" name=\"rid\" value=\"1\" />1 Point - Just O.K. *yawn*<br/>
<input type=\"hidden\" name=\"who\" value=\"$getnick[0]\"/>
<input type=\"hidden\" name=\"tid\" value=\"$tid\"/>
<input id=\"inputButton\" type=\"submit\" name=\"submit\" value=\"Add\"/></form>";
boxend();
getfooter($sid);
}
//////////////////////////////////View category//////////////
else if($action=="viewcat"){
$cid = $_GET["cid"];
addonline($uid,"Viewing Forums List","guest.php?action=$action&cid=$cid");
gettimebar();
getnewmsg($sid);
getshouts($sid);
getalert($sid);
boxstart("Forums");
$forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE cid='".$cid."' AND clubid='0' ORDER BY position, id, name");
while($forum = mysql_fetch_array($forums)){
if(canaccess($uid, $forum[0])){
echo "<img src=\"images/forum1.gif\" alt=\"\"/><a href=\"guest.php?action=viewfrm&sid=$sid&fid=$forum[0]\">".htmlspecialchars($forum[1])."</a><br/>";
}
}
boxend();
getfooter($sid);
}
//////////////////////////////////View Topic///////////////////
else if($action=="viewtpc"){
gettimebar();
getnewmsg($sid);
getalert($sid);
$tid = $_GET["tid"];
$go = $_GET["go"];
$tfid = mysql_fetch_array(mysql_query("SELECT fid FROM ibwf_topics WHERE id='".$tid."'"));
$fname = getfname($tfid[0]);
if (isforumblocked($uid)){
boxstart("Error!");
echo "<img src=\"notok.gif\"/>";
echo "Your forum access has been blocked by a moderator!!!<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a>";
boxend();
echo "</font></body></html>";
exit();
}
if($go!="") {
$page=getpage_go($go,$tid,$sid);
}
$tinfo = mysql_fetch_array(mysql_query("SELECT name, text, authorid, crdate, views, fid, pollid from ibwf_topics WHERE id='".$tid."'"));
$tnm = htmlspecialchars($tinfo[0]);
$namewa = mysql_fetch_array(mysql_query("SELECT name FROM ibwf_forums WHERE id = $tinfo[5]"));
$namewa1 = htmlspecialchars($namewa[0]);
$indiatime = time() + (addhours());
addonline($uid,"Reading post <i>$tnm</i> in $fname forum","index.php?action=$action&tid=$tid");
boxstart("$tnm");
$vws = $tinfo[4]+1;
$num_pages = getnumpages($tid, $sid);
echo "Subject: $tnm<br/>Viewed: $vws times<br/>Topic # $tid<br/>Page # $page of $num_pages<br/>Pages:";
$pagewa = 1;
while ($pagewa<=$num_pages)
{
echo "[<a href=\"guest.php?action=viewtpc&page=$pagewa&sid=$sid&tid=$tid\">$pagewa</a>]";
$pagewa = $pagewa+1;
};
if($page==""||$page<1) {
$page=1;
}
$posts_per_page = getppp($uid);
if($page>$num_pages) {
$page=$num_pages;
}
$limit_start = $posts_per_page *($page-1);
$rpls = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$tid."'"));
///fm here
if($page==1){
mysql_query("UPDATE ibwf_topics SET views='".$vws."' WHERE id='".$tid."'");
$ttext = mysql_fetch_array(mysql_query("SELECT authorid, text, crdate, pollid FROM ibwf_topics WHERE id='".$tid."'"));
$unick = getnick_uid($ttext[0]);
if(isonline($ttext[0])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(isadmin($ttext[0]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='red'>$unick</font></a>";}
else if(isvip($ttext[0]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='lightgreen'>$unick</font></a>";}
else if(ismod($ttext[0]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$ttext[0]\"><font color='blue'>$unick</font></a>";}
else if(isbanned($ttext[0]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$ttext[0]\"><strike>$unick</strike></a>";}
else
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$ttext[0]\">$unick</a>";}
$topt = "<a href=\"guest.php?action=tpcopt&sid=$sid&tid=$tid\">*</a>";
$rep = "<a href=\"guest.php?action=addrep&sid=$sid&tid=$tid\">[R]</a>";
$pst = parsemsg($ttext[1],$sid);
echo "<br/>Post from $usl: $topt $rep<br/>";
$indiatime = $ttext[2] + (addhours());
$dtot = date("d/m/Y h:i:s A",$indiatime);
echo $dtot."<br/>";
echo "<br/>$pst<br/><br/>";
if($ttext[3]>0){
echo "<a href=\"guest.php?action=viewtpl&sid=$sid&who=$tid\">POLL</a><br/>";
}
}
if($page>1){
$limit_start--;
}
$sql = "SELECT id, text, uid, dtpost FROM ibwf_posts WHERE tid='".$tid."' ORDER BY dtpost LIMIT $limit_start, $posts_per_page";
$posts = mysql_query($sql);
while($post = mysql_fetch_array($posts)){
$unick = getnick_uid($post[2]);
if(isonline($post[2])){
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
}
if(isadmin($post[2]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='red'>$unick</font></a>";}
else if(isvip($post[2]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='lightgreen'>$unick</font></a>";}
else if(ismod($post[2]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$post[2]\"><font color='blue'>$unick</font></a>";}
else if(isbanned($post[2]))
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$post[2])\"><strike>$unick</strike></a>";}
else
{$usl = "$iml<a href=\"guest.php?action=viewuser&sid=$sid&who=$post[2]\">$unick</a>";}
$pst = parsemsg($post[1], $sid);
$topt = "<a href=\"guest.php?action=pstopt&sid=$sid&pid=$post[0]&page=$page&fid=$tinfo[5]\">*</a>";
echo "<br/>Reply from $usl: $topt<br/>";
$indiantime = $post[3] + (addhours());
$dtot = date("d/m/Y h:i:s A",$indiantime);
echo $dtot."<br/>";
echo "<br/>$pst<br/>";
}
boxend();
echo "<center>";
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"guest.php?action=viewtpc&page=$npage&sid=$sid&tid=$tid\">Next»</a><br/>";
}
if($page>1){
$ppage = $page-1;
echo "<a href=\"guest.php?action=viewtpc&page=$ppage&sid=$sid&tid=$tid\">«Previous</a>";
}
echo "<p align=\"center\">Page $page of $num_pages<br/>";
$fid = $tinfo[5];
$fname = getfname($fid);
echo "<a href=\"index.php?action=viewfrm&sid=$sid&fid=$fid\">Back To $fname Forum</a><br/><br/></p>";
getfooter($sid);
}
//////////////////////////////////View Forum////////////
else if($action=="viewfrm"){
$fid = $_GET["fid"];
$view = $_GET["view"];
$fnm = getfname($fid);
$fnm=htmlspecialchars($fnm);
gettimebar();
getnewmsg($sid);
getalert($sid);
addonline($uid,"Viewing topics in $fnm","index.php?action=$action&fid=$fid");
getshouts($sid);
boxstart("$fnm Forum");
echo "<center>";
echo "<form action=\"index.php\" method=\"get\">";
echo "View Topics: <select id=\"inputText\" name=\"view\">";
echo "<option value=\"all\">All</option>";
echo "<option value=\"new\">Since My Last Visit</option>";
echo "<option value=\"myps\">I Posted In</option>";
echo "</select>";
echo "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
echo "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"View\"/>";
echo "</form></center>";
echo "<center>";
if($view=="new")
{
echo "<small>[<i>Viewing topics that has new replies since your last visit.</i>]</small>";
}else if($view=="myps")
{
echo "<small>[<i>Viewing topics that contain replies by you.</i>]</small>";
}else
{
echo "<small>[<i>Viewing all topics.</i>]</small>";
}echo "</center><br/>";
if($page=="" || $page<=0)$page=1;
if($page==1){
///////////pinned topics
$topics = mysql_query("SELECT id, name, closed, views, pollid FROM ibwf_topics WHERE fid='".$fid."' AND pinned='1' ORDER BY lastpost DESC, name, id LIMIT 0,5");
while($topic = mysql_fetch_array($topics)){
$iml = "<img src=\"images/forum_pinned.gif\" alt=\"»\"/>";
if($topic[2]=='1'){
$iml .= "<img src=\"images/forum_closed.gif\" alt=\"X\"/>";
}
$tnm = htmlspecialchars($topic[1]);
$nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$topic[0]."'"));
echo "$iml<a href=\"index.php?action=viewtpc&sid=$sid&tid=$topic[0]\">$pltx$tnm</a>[<a href=\"index.php?action=viewtpc&sid=$sid&tid=$topic[0]&go=last\">$nop[0]</a>]<br/>";
}
}
if($view=="new")
{
$ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$uid."'"));
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."'"));
}
else if($view=="myps")
{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT a.id) FROM ibwf_topics a INNER JOIN ibwf_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."'"));
}
else{
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE fid='".$fid."' AND pinned='0'"));
}
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($limit_start<0)$limit_start=0;
if($view=="new")
{
$ulv = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$uid."'"));
$topics = mysql_query("SELECT id, name, closed, views, moved, pollid, authorid FROM ibwf_topics WHERE fid='".$fid."' AND pinned='0' AND lastpost >='".$ulv[0]."' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page");
}
else if($view=="myps"){
$topics = mysql_query("SELECT a.id, a.name, a.closed, a.views, a.moved, a.pollid, a.authorid FROM ibwf_topics a INNER JOIN ibwf_posts b ON a.id = b.tid WHERE a.fid='".$fid."' AND a.pinned='0' AND b.uid='".$uid."' GROUP BY a.id ORDER BY a.lastpost DESC, a.name, a.id LIMIT $limit_start, $items_per_page");
}
else{
$topics = mysql_query("SELECT id, name, closed, views, moved, pollid, authorid FROM ibwf_topics WHERE fid='".$fid."' AND pinned='0' ORDER BY lastpost DESC, name, id LIMIT $limit_start, $items_per_page");
}
while($topic = mysql_fetch_array($topics)){
$nop = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE tid='".$topic[0]."'"));
$iml = "<img src=\"images/forum_normal.gif\" alt=\"N\"/>";
if($nop[0]>24){
$iml = "<img src=\"images/forum_hot.gif\" alt=\"H\"/>";
}
if($topic[4]=='1'){
$iml = "<img src=\"images/forum_moved.gif\" alt=\"M\"/>";
}
if($topic[2]=='1'){
$iml = "<img src=\"images/forum_closed.gif\" alt=\"X\"/>";
}
if($topic[5]>0){
$iml = "<img src=\"images/forum_poll.gif\" alt=\"P\"/>";
}
$tnm = htmlspecialchars($topic[1]);
$authid = $topic[6];
$name = getnick_uid($authid);
echo "$iml<a href=\"guest.php?action=viewtpc&sid=$sid&tid=$topic[0]\">$name: $tnm</a>[<a href=\"index.php?action=viewtpc&sid=$sid&tid=$topic[0]&go=last\">$nop[0]</a>]<br/>";
}
boxend();
echo "<p align=\"center\">";
if($page>1){
$ppage = $page-1;
echo "<a href=\"guest.php?action=viewfrm&page=$ppage&sid=$sid&fid=$fid&view=$view\">«Previous</a> ";
}
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"guest.php?action=viewfrm&page=$npage&sid=$sid&fid=$fid&view=$view\">Next»</a>";
}
echo "<br/>Page $page of $num_pages<br/>";
if($num_pages>2){
$rets = "<center>Jump to page<form action=\"index.php\" method=\"get\"><input id=\"inputText\" name=\"page\" format=\"*N\" size=\"3\"/>";
$rets .= "<input type=\"hidden\" name=\"action\" value=\"$action\"/>";
$rets .= "<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>";
$rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
$rets .= "<input id=\"inputButton\" type=\"submit\" value=\"Go\"/>";
$rets .= "</form></center>";
echo $rets;
}
echo "</p><p><a href=\"index.php?action=newtopic&sid=$sid&fid=$fid\"></a><br/>";
echo "</p>";
getfooter($sid);
}
//////////////////////////////////Post A Topic////////////////////
else if($action=="newtopic"){
$fid = $_GET["fid"];
if(!canaccess($uid, $fid)){
boxstart("Error!");
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"\"/>This forum is presently unavailable to you!<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\">Main Menu</a>";
echo "</p>";
boxend();
echo "</font></body></html>";
exit();
}
addonline($uid,"Forums, Posting a message","index.php?action=$action&fid=$fid");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Post Topic");
echo "<center><p>";
echo "Title:<br/><form action=\"genproc.php?action=newtopic&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"ntitle\" maxlength=\"30\"/><br/>";
echo "Text:<br/><textarea id=\"inputText\" name=\"tpctxt\"></textarea><br/>";
echo "
<input type=\"hidden\" name=\"fid\" value=\"$fid\"/>
<input id=\"inputButton\" type=\"submit\" value=\"Send\"/>
</form>
";
echo "<br/><br/><a href=\"guest.php?action=viewfrm&sid=$sid&fid=$fid\">";
$fname = getfname($fid);
echo "$fname Forum</a><br/>";
echo "</p></center>";
boxend();
getfooter($sid);
}
//////////Online Users///////////
else if($action=="online"){
addonline($uid,"Viewing Online List","index.php?action=$action");
$nouo = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_online WHERE hidden = 1"));
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
$num_items = getnumonline(); //changable
if (ismod($uid)){
$clkd = "<a href=\"adctrl.php?action=hidden&sid=$sid\">hidden</a>.";
}
else{
$clkd = "hidden.";
}
boxstart("Online Users");
echo "$num_items users are currently online among which ".$nouo[0]." are $clkd.<br/>";
if($page=="" || $page<=0)$page=1;
$items_per_page= 20;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
$sql = "SELECT
a.name, a.budmsg, b.place, b.userid, a.id, a.sex, a.perm, a.lastact FROM ibwf_users a
INNER JOIN ibwf_online b ON a.id = b.userid WHERE b.hidden = 0
GROUP BY 1,2
LIMIT $limit_start, $items_per_page
";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items)){
if($item[5]=='M'){
$atxt="<img src=\"images/male.gif\" alt=\"M\"/>";
}
else if($item[5]=='F'){
$atxt="<img src=\"images/female.gif\" alt=\"F\"/>";
}
else { $atxt=""; }
/*if($item[6]==1){
$atxt.="<font size='1'>[<b>M</b>]</font>";
}
else if($item[6]==2){
$atxt.="<font size='1'>[<b>A</b>]</font>";
}
else { $atxt.=""; }*/
if(isadmin($item[3]))
{$lnk = "$atxt<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\"><font color='red'>$item[0]</font></a>";}
else if(isvip($item[3]))
{$lnk = "$atxt<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\"><font color='lightgreen'>$item[0]</font></a>";}
else if(ismod($item[3]))
{$lnk = "$atxt<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\"><font color='blue'>$item[0]</font></a>";}
else
{$lnk = "$atxt<a href=\"index.php?action=viewuser&who=$item[3]&sid=$sid\">$item[0]</a>";}
$mood = "";
if ($item[1] == "") {
$mood = "";
}
else {
$mood = "(".parsemsg($item[1]).")";
}
$indiatime = $item[7] + (addhours());
$difference = time() - $item[7];
$dekha=gettimemsg($difference);
echo "
$lnk<br/>
Location: ".$item[2]."<br/>
Mood: $mood<br/>
Last active: $dekha ago<br/><br/>";
}
boxend();
echo "<p align=\"center\">";
if($page>1){
$ppage = $page-1;
echo "<a href=\"index.php?action=online&page=$ppage&sid=$sid\">«Previous</a> ";
}
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"index.php?action=online&page=$npage&sid=$sid\">Next»</a>";
}
echo "<br/>Page $page of $num_pages<br/>";
if($num_pages>2){
echo getjumper($action, $sid,"index");
}
echo "</p>";
getfooter($sid);
}
//////////////Online Admins////////////////
else if($action=="stfol"){
addonline($uid,"Viewing Online Admins","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
if($page=="" || $page<=0)$page=1;
$timeout = 180;
$timeon = time()-$timeout;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
$num_items = $noi[0]; //changable
$items_per_page= 10;
$num_pages = ceil($num_items/$items_per_page);
if($page>$num_pages)$page= $num_pages;
$limit_start = ($page-1)*$items_per_page;
if($limit_start<0)$limit_start=0;
$sql = "
SELECT name, perm, id FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'
LIMIT $limit_start, $items_per_page
";
boxstart("Online Admins");
echo "<p>";
$items = mysql_query($sql);
echo mysql_error();
while ($item = mysql_fetch_array($items)){
$lnk = "<a href=\"index.php?action=viewuser&who=$item[2]&sid=$sid\">$item[0]</a>";
if($item[1]==1){
$item[1] = "Moderator";
}else if($item[1]==2){
$item[1] = "Administrator";
}
echo "$lnk - $item[1] <br/>";
}
echo "</p>";
echo "<p align=\"center\">";
if($page>1){
$ppage = $page-1;
echo "<a href=\"index.php?action=$action&page=$ppage&sid=$sid\">«Previous</a> ";
}
if($page<$num_pages){
$npage = $page+1;
echo "<a href=\"index.php?action=$action&page=$npage&sid=$sid\">Next»</a>";
}
echo "<br/>Page $page of $num_pages<br/>";
if($num_pages>2){
echo getjumper($action, $sid,"index");
}
echo "</p>";
boxend();
getfooter($sid);
}
///////////Change Buddy Message//////////////////////////////
else if($action=="chbmsg"){
addonline($uid,"Setting Mood","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Set Mood");
$cmsg = htmlspecialchars(getbudmsg($uid));
echo "<p>This message will appear to all ur buddies beside your username in their buddylists.";
echo "<br/>Enter message:<br/><form action=\"genproc.php?action=upbmsg&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"bmsg\" value=\"$cmsg\" maxlength=\"30\"/><br/>";
echo "
<input id=\"inputButton\" type=\"submit\" value=\"Set\"/>
</form>";
echo "<br/><br/>";
echo "<img src=\"images/buddies.gif\" alt=\"\"/><a href=\"lists.php?action=buds&sid=$sid\">";
echo "Buddies List</a><br/>";
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////////////////turn alerts on or off////////////////////
else if($action=="alert"){
addonline($uid,"Toggling alerts","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
getshouts($sid);
boxstart("Toggle Alerts");
$userwa = $uid;
if(alertstat($sid)==0){
mysql_query("UPDATE ibwf_users SET alert=1 WHERE id=$userwa");
echo "<p>Alerts have been successfully activated<br/>";
}
else if(alertstat($sid)==1){
mysql_query("UPDATE ibwf_users SET alert=0 WHERE id=$userwa");
echo "<p>Alerts have been successfully de-activated<br/>";
}
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////////////////turn cloaking on or off////////////////////
else if($action=="cloak"){
addonline($uid,"Toggling Hidden mode","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
$userwa = $uid;
$cloak = mysql_fetch_array(mysql_query("SELECT hidden FROM ibwf_users WHERE id = '".$userwa."'"));
boxstart("Toggling Hidden Mode");
if($cloak[0]==0){
mysql_query("UPDATE ibwf_users SET hidden=1 WHERE id=$userwa");
echo "<p>Hidden mode has been activated succesfully. Now you can't be seen by anyone in Online List.<br/>";
}
else if($cloak[0]==1){
mysql_query("UPDATE ibwf_users SET hidden=0 WHERE id=$userwa");
echo "<p>Hidden mode has been de-activated. Now anyone can see you in the Online List.<br/>";
}
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////////////////////viewuser profile/////////////////////////
else if($action=="viewuser"){
gettimebar();
getnewmsg($sid);
getalert($sid);
if($who==""||$who==0){
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
$ouid = getuid_sid($sid);
if($who==$ouid)
{addonline($uid,"Viewing own profile","index.php?action=viewuser&who=$who");}
else
{addonline($uid,"Viewing <i>$whonick</i>\'s profile","index.php?action=viewuser&who=$who");}
if($whonick!=""){
$curr=$uid;//jo dekh raha hai uski userID.
$nick=getnick_uid($curr);//jo dekh raha hai uska userName.
$vtime = time();
$bounter = mysql_fetch_array(mysql_query("SELECT max(counter) FROM fun_latest WHERE vid = $who"));
if($bounter[0]){
$pahla = mysql_fetch_array(mysql_query("SELECT * FROM fun_latest WHERE counter = $bounter[0]"));
}
if ($whonick != $nick){
if ($pahla[0] != $nick) {
$blah = mysql_query("INSERT INTO fun_latest (name,vid,time) VALUES ('".$nick."','".$who."','".$vtime."')");
}
}
$todel = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_latest WHERE vid='".$who."'"));
if($todel[0]>10){
$ft1 = mysql_query("SELECT MIN(time) FROM fun_latest WHERE vid = '".$who."'");
$ft = mysql_query("DELETE FROM fun_latest WHERE vid = '".$who."' AND time='".$ft1[0]."'");
}
getalert($sid);
if(isonline($who)){
$bulb="<img src=\"images/onl.gif\" alt=\"On\"/>";
}
else{
$bulb="<img src=\"images/ofl.gif\" alt=\"Off\"/>";
}
echo "<center>$bulb $whonick's profile<br/>";
$avlink = getavatar($who);
$status=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='icons'"));
if($status[0]==1){
echo "<img src=\"$avlink\" alt=\"\"/></center>";
}else{
echo "$avlink</center>";
}
boxstart("User Info");
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location, rname, ms FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M'){
$usex = "<img src=\"images/male.gif\"/>Male";
}else if($nopl[0]=='F'){
$usex = "<img src=\"images/female.gif\"/>Female";
}
if($nopl[4] == 'S'){
$pst = "Single";
}
else if($nopl[4] == 'P'){
$pst = "Partnered";
}
else{
$pst = "No answer";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "<b>Real Name: </b>".htmlspecialchars($nopl[3])."<br/>";
echo "<b>Age: </b>$uage<br/>";
echo "<b>Sex: </b>$usex<br/>";
echo "<b>Starsign: </b>".getstarsign($nopl[1])."<br/>";
echo "<b>Marital Status: </b>$pst<br/>";
echo "<b>Location: </b>".$nopl[2]."";
boxend();
boxstart("Site Info");
echo "
<b>Username:</b> $whonick<br/>
<b>Member ID: </b>$who<br/>
<b>Status: </b>".getstatus($who)."<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$indiatime = $nopl[0] + (addhours());
$jdt = date("d/m/Y h:i:s A",$indiatime);
$agedays = ceil((time() - $nopl[0])/(24*60*60));
echo "<b>Joined:</b> $jdt [$agedays days ago]<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$indiatime = $nopl[0] + (addhours());
$jdt = date("d/m/Y h:i:s A",$indiatime);
$difference = time() - $nopl[0];
$dekha=gettimemsg($difference);
echo "<b>Last Seen: </b>$jdt [$dekha ago]<br/>";
$totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Total Time Online: </b>".gettimemsg($totaltimeonline[0])."";
boxend();
boxstart("Activity Stats");
$showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Visits: </b>".$showv[0];
$vpd = round(($showv[0]/$agedays), 2);
echo " <i>[<b>$vpd</b> Per Day]</i><br/>";
$points = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id=$who"));
echo "<b>Points:</b> ".$points[0]."<br/>";
$gpoints = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id=$who"));
echo "<b>Game Points:</b> $gpoints[0]<br/>";
$tictactoe = mysql_fetch_array(mysql_query("SELECT tttl, tttw FROM ibwf_users WHERE id=$who"));
echo "<b>Tic Tac Toe:</b> Wins: $tictactoe[1], Losses: $tictactoe[0] [<a href=\"tictactoe.php?action=stats&sid=$sid&who=$who\"><i>Details</i></a>]<br/>";
$nbuds = getnbuds($who);
echo "<b>Popularity:</b> $nbuds<br/>";
$no3 = mysql_fetch_array(mysql_query("SELECT profvws FROM ibwf_users WHERE id=$who"));
if($who!=$uid){
$no3[0]++;
}
$b1 = mysql_query("UPDATE ibwf_users SET profvws='$no3[0]' WHERE id='".$who."'");
echo "<b>Profile Views:</b> $no3[0]<br/>";
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
$nopl = mysql_fetch_array(mysql_query("SELECT shouts FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Shouts:</b> <a href=\"lists.php?action=shouts&sid=$sid&who=$who\">$nopl[0]</a>";
$spd = round(($nopl[0]/$agedays), 3);
echo " <i>[<b>$spd</b> per day]</i><br/>";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
echo "<b>Forum Topics: </b><a href=\"lists.php?action=tbuid&sid=$sid&who=$who\">$unol[0]</a><br/>";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Forum Posts: </b><a href=\"lists.php?action=pstper&sid=$sid&who=$who\">$unop[0]</a>";
$ppd = round(($unop[0]/$agedays), 3);
echo " <i>[<b>$ppd</b> per day]</i><br/>";
$reps = mysql_fetch_array(mysql_query("SELECT reps FROM ibwf_users WHERE id=$who"));
echo "<b>Forum Reputation:</b> ".$reps[0]."<br/>";
$noin = mysql_fetch_array(mysql_query("SELECT totin FROM ibwf_users WHERE id='".$who."'"));
$nout = mysql_fetch_array(mysql_query("SELECT totout FROM ibwf_users WHERE id='".$who."'"));
$no1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$who."' AND unread='1'"));
$no2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
$frm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$ouid."' AND touid='".$who."'"));
echo "<b>Messages:</b> In total: $noin[0] (<b>$frm[0]</b> from you), Out total: $nout[0], In unread: $no2[0], Out unread: $no1[0] ";
$ipd = round(($noin[0]/$agedays), 3);
$opd = round(($nout[0]/$agedays), 3);
echo "<i>[<b>$ipd</b> in, <b>$opd</b> out per day]</i><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Chat Messages:</b> $nopl[0]";
$cpd = round(($nopl[0]/$agedays), 3);
echo " <i>[<b>$cpd</b> per day]</i><br/>";
echo "<a href=\"lists.php?who=$who&action=last&sid=$sid\">$whonick's recent profile visitors</a><br/>";
echo "<a href=\"lists.php?who=$who&action=blogs&sid=$sid\">$whonick's Blog</a><br/>";
echo "<a href=\"lists.php?who=$who&action=ucl&sid=$sid\">$whonick's joined clubs</a><br/>";
echo "<a href=\"index.php?action=viewpl&who=$who&sid=$sid\">$whonick's poll</a>";
boxend();
boxstart("Extra Info");
$nopl = mysql_fetch_array(mysql_query("SELECT signature, likes, hates FROM ibwf_users WHERE id='".$who."'"));
$sign = parsepm($nopl[0], $sid);
$liklen = strlen($nopl[1]);
$hatlen = strlen($nopl[2]);
if ($nopl[1]==null)
{ }
else if($liklen>255)
{$lik = substr("$nopl[1]", 0, 255);
echo "<b>Likes:</b> ".parsemsg($lik)."... [<i><a href=\"index.php?action=fullpro&who=$who&sid=$sid\">View Full Profile</a></i>]<br/>";}
else
{ echo "<b>Likes:</b> ".parsemsg($nopl[1])."<br/>";}
if ($nopl[2]==null)
{ }
else if($hatlen>255)
{$hat = substr("$nopl[2]", 0, 255);
echo "<b>Hates:</b> ".parsemsg($hat)."... [<i><a href=\"index.php?action=fullpro&who=$who&sid=$sid\">View Full Profile</a></i>]<br/>";}
else
{ echo "<b>Hates:</b> ".parsemsg($nopl[2])."<br/>";}
if ($nopl[0]==null)
{ }
else
{ echo "<b>Signature:</b> $sign <br/>";}
$nopl = mysql_fetch_array(mysql_query("SELECT ua, ip FROM ibwf_users WHERE id = $who"));
echo "<b>Phone/Browser: </b>$nopl[0]<br/>";
echo "<b>IP Address: </b>$nopl[1]<br/><b>Network:</b> ".network($nopl[1])."";
boxend();
boxstart("Actions");
echo "<u>Send a message to $whonick</u>:<br/>";
echo "<form action=\"inbxproc.php?action=sendpm&who=$who&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form><br/><br/>";
if($uid!=$who){
echo "<a href=\"tictactoe.php?action=invite&who=$who&sid=$sid\">Invite $whonick for TicTacToe</a><br/>";
}
echo "<a href=\"userfun.php?action=profile&who=$who&sid=$sid\">Fun With $whonick</a><br/>";
if(budres($uid, $who)==0){
echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=add\">Add $whonick to your buddy list</a><br/>";
}else if(budres($uid, $who)==1){
echo "Buddy request in the queue<br/>";
}else if(budres($uid, $who)==2){
echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=del\">Remove $whonick From your buddy list</a><br/>";
}
$ires = ignoreres($uid, $who);
if($ires==2){
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=del\">Remove $whonick From your Ignore list</a><br/>";
}else if($ires==1){
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=add\">Add $whonick to your Ignore list</a><br/>";
}
if(ismod($uid)){
echo "<a href=\"adctrl.php?action=ermu&who=$who&sid=$sid\">Moderate $whonick</a><br/>";
echo "<a href=\"adctrl.php?action=uinfod&who=$whonick&sid=$sid\">View detailed information</a><br/>";
if(isadmin($uid)){
echo "<a href=\"admonition.php?action=chubi&sid=$sid&who=$who\">Edit $whonick's Profile</a><br/>";
}
}
echo "<a href=\"index.php?action=cntct&who=$who&sid=$sid\">View $whonick's Contact Details</a><br/>";
boxend();
boxstart("View another profile");
echo "Enter username:<br/><form action=\"index.php?action=viewuser&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"mnick\" maxlength=\"30\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"View\"/>";
echo "</form>";
boxend();
}else{
boxstart("Error!");
echo "Member does not exist! Please try again!<br/>";
echo "Enter username:<br/><form action=\"index.php?action=viewuser&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"mnick\" maxlength=\"30\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"View\"/>";
echo "</form>";
boxend();
}
getfooter($sid);
}
/////////////////Full Profile/////////////////////
else if($action=="fullpro"){
gettimebar();
getnewmsg($sid);
getalert($sid);
if($who==""||$who==0){
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
$ouid = getuid_sid($sid);
if($who==$ouid)
{addonline($uid,"Viewing own profile","index.php?action=viewuser&who=$who");}
else
{addonline($uid,"Viewing <i>$whonick</i>\'s profile","index.php?action=viewuser&who=$who");}
if($whonick!=""){
$curr=$uid;//jo dekh raha hai uski userID.
$nick=getnick_uid($curr);//jo dekh raha hai uska userName.
$vtime = time();
$bounter = mysql_fetch_array(mysql_query("SELECT max(counter) FROM fun_latest WHERE vid = $who"));
$pahla = mysql_fetch_array(mysql_query("SELECT * FROM fun_latest WHERE counter = $bounter[0]"));
if ($whonick != $nick){
if ($pahla[0] != $nick) {
$blah = mysql_query("INSERT INTO fun_latest (name,vid,time) VALUES ('".$nick."','".$who."','".$vtime."')");
}
}
$todel = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM fun_latest WHERE vid='".$who."'"));
if($todel[0]>10){
$ft1 = mysql_query("SELECT MIN(time) FROM fun_latest WHERE vid = '".$who."'");
$ft = mysql_query("DELETE FROM fun_latest WHERE vid = '".$who."' AND time='".$ft1[0]."'");
}
if(isonline($who)){
$bulb="<img src=\"images/onl.gif\" alt=\"On\"/>";
}
else{
$bulb="<img src=\"images/ofl.gif\" alt=\"Off\"/>";
}
echo "<center>$bulb $whonick's profile<br/>";
$avlink = getavatar($who);
echo "<img src=\"$avlink\" alt=\"\"/></center>";
boxstart("User Info");
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location, rname, ms FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M'){
$usex = "<img src=\"images/male.gif\"/>Male";
}else if($nopl[0]=='F'){
$usex = "<img src=\"images/female.gif\"/>Female";
}
if($nopl[4] == 'S'){
$pst = "Single";
}
else if($nopl[4] == 'P'){
$pst = "Partnered";
}
else{
$pst = "No answer";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "<b>Real Name: </b>".htmlspecialchars($nopl[3])."<br/>";
echo "<b>Age: </b>$uage<br/>";
echo "<b>Sex: </b>$usex<br/>";
echo "<b>Starsign: </b>".getstarsign($nopl[1])."<br/>";
echo "<b>Marital Status: </b>$pst<br/>";
echo "<b>Location: </b>".$nopl[2]."";
boxend();
boxstart("Site Info");
echo "
<b>Username:</b> $whonick<br/>
<b>Member ID: </b>$who<br/>
<b>Status: </b>".getstatus($who)."<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$indiatime = $nopl[0] + (addhours());
$jdt = date("d/m/Y h:i:s A",$indiatime);
$agedays = ceil((time() - $nopl[0])/(24*60*60));
echo "<b>Joined:</b> $jdt<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$indiatime = $nopl[0] + (addhours());
$jdt = date("d/m/Y h:i:s A",$indiatime);
$difference = time() - $nopl[0];
$dekha=gettimemsg($difference);
echo "<b>Last Seen: </b>$jdt [$dekha ago]<br/>";
$totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Total Time Online: </b>".gettimemsg($totaltimeonline[0])."";
boxend();
boxstart("Activity Stats");
$showv = mysql_fetch_array(mysql_query("SELECT visit FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Visits: </b>".$showv[0];
$vpd = round(($showv[0]/$agedays), 2);
echo " <i>[<b>$vpd</b> Per Day]</i><br/>";
$points = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id=$who"));
echo "<b>Points:</b> ".$points[0]."<br/>";
$gpoints = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id=$who"));
echo "<b>Game Points:</b> $gpoints[0]<br/>";
$nbuds = getnbuds($who);
echo "<b>Popularity:</b> $nbuds<br/>";
$no3 = mysql_fetch_array(mysql_query("SELECT profvws FROM ibwf_users WHERE id=$who"));
if($who!=$uid){
$no3[0]++;
}
$b1 = mysql_query("UPDATE ibwf_users SET profvws='$no3[0]' WHERE id='".$who."'");
echo "<b>Profile Views:</b> $no3[0]<br/>";
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_shouts WHERE shouter='".$who."'"));
$nopl = mysql_fetch_array(mysql_query("SELECT shouts FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Shouts:</b> <a href=\"lists.php?action=shouts&sid=$sid&who=$who\">$nopl[0]</a>";
$spd = round(($nopl[0]/$agedays), 3);
echo " <i>[<b>$spd</b> per day]</i><br/>";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
echo "<b>Forum Topics: </b><a href=\"lists.php?action=tbuid&sid=$sid&who=$who\">$unol[0]</a><br/>";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Forum Posts: </b><a href=\"lists.php?action=uposts&sid=$sid&who=$who\">$unop[0]</a>";
$ppd = round(($unop[0]/$agedays), 3);
echo " <i>[<b>$ppd</b> per day]</i><br/>";
$reps = mysql_fetch_array(mysql_query("SELECT reps FROM ibwf_users WHERE id=$who"));
echo "<b>Forum Reputation:</b> ".$reps[0]."<br/>";
$noin = mysql_fetch_array(mysql_query("SELECT totin FROM ibwf_users WHERE id='".$who."'"));
$nout = mysql_fetch_array(mysql_query("SELECT totout FROM ibwf_users WHERE id='".$who."'"));
$no1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$who."' AND unread='1'"));
$no2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
echo "<b>Messages:</b> In total: $noin[0], Out total: $nout[0], In unread: $no2[0], Out unread: $no1[0] ";
$ipd = round(($noin[0]/$agedays), 3);
$opd = round(($nout[0]/$agedays), 3);
echo "<i>[<b>$ipd</b> in, <b>$opd</b> out per day]</i><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Chat Messages:</b> $nopl[0]";
$cpd = round(($nopl[0]/$agedays), 3);
echo " <i>[<b>$cpd</b> per day]</i><br/>";
echo "<a href=\"lists.php?who=$who&action=last&sid=$sid\">$whonick's recent profile visitors</a><br/>";
echo "<a href=\"lists.php?who=$who&action=blogs&sid=$sid\">$whonick's Blog</a><br/>";
echo "<a href=\"lists.php?who=$who&action=ucl&sid=$sid\">$whonick's joined clubs</a><br/>";
echo "<a href=\"index.php?action=viewpl&who=$who&sid=$sid\">$whonick's poll</a>";
boxend();
boxstart("Extra Info");
$nopl = mysql_fetch_array(mysql_query("SELECT signature, likes, hates FROM ibwf_users WHERE id='".$who."'"));
$sign = parsepm($nopl[0], $sid);
if ($nopl[1]==null)
{ }
else
{ echo "<b>Likes:<br/></b> ".parsemsg($nopl[1])."<br/>";}
if ($nopl[2]==null)
{ }
{ echo "<b>Hates:<br/></b> ".parsemsg($nopl[2])."<br/>";}
if ($nopl[0]==null)
{ }
else
{ echo "<b>Signature:<br/></b> $sign <br/>";}
$nopl = mysql_fetch_array(mysql_query("SELECT ua, ip FROM ibwf_users WHERE id = $who"));
echo "<b>Phone/Browser: </b>$nopl[0]<br/>";
echo "<b>IP Address: </b>$nopl[1]<br/><b>Network:<br/></b> ".network($nopl[1])."";
boxend();
boxstart("Actions");
echo "<u>Send a message to $whonick</u>:<br/>";
echo "<form action=\"inbxproc.php?action=sendpm&who=$who&sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form><br/><br/>";
echo "<a href=\"userfun.php?action=profile&who=$who&sid=$sid\">Fun With $whonick</a><br/>";
if(budres($uid, $who)==0){
echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=add\">Add $whonick to your buddy list</a><br/>";
}else if(budres($uid, $who)==1){
echo "Buddy request in the queue<br/>";
}else if(budres($uid, $who)==2){
echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=del\">Remove $whonick From your buddy list</a><br/>";
}
$ires = ignoreres($uid, $who);
if($ires==2){
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=del\">Remove $whonick From your Ignore list</a><br/>";
}else if($ires==1){
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=add\">Add $whonick to your Ignore list</a><br/>";
}
if(ismod($uid)){
echo "<a href=\"adctrl.php?action=ermu&who=$who&sid=$sid\">Moderate $whonick</a><br/>";
echo "<a href=\"index.php?action=uinfod&who=$whonick&sid=$sid\">View detailed information</a><br/>";
}
boxend();
boxstart("View another profile");
echo "Enter username:<br/><form action=\"index.php?action=viewuser&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"mnick\" maxlength=\"30\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"View\"/>";
echo "</form>";
boxend();
}else{
boxstart("Error!");
echo "Member does not exist! Please try again!";
echo "Enter username:<br/><form action=\"index.php?action=viewuser&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"mnick\" maxlength=\"30\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"View\"/>";
echo "</form>";
boxend();
}
getfooter($sid);
}
//////Contact Details
else if($action=="cntct"){
gettimebar();
getnewmsg($sid);
getalert($sid);
if($who==""||$who==0){
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
$ouid = getuid_sid($sid);
if($who==$ouid)
{addonline($uid,"Viewing own Contact Details","index.php?action=viewuser&who=$who");}
else
{addonline($uid,"Viewing <i>$whonick</i>\'s Contact Details","index.php?action=viewuser&who=$who");}
boxstart("$whonick's Contact Details");
$email=mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
$aim = mysql_fetch_array(mysql_query("SELECT aim FROM ibwf_xinfo WHERE uid='".$who."'"));
$icq = mysql_fetch_array(mysql_query("SELECT icq FROM ibwf_xinfo WHERE uid='".$who."'"));
$msn = mysql_fetch_array(mysql_query("SELECT msn FROM ibwf_xinfo WHERE uid='".$who."'"));
$skype = mysql_fetch_array(mysql_query("SELECT skype FROM ibwf_xinfo WHERE uid='".$who."'"));
$yahoo = mysql_fetch_array(mysql_query("SELECT yahoo FROM ibwf_xinfo WHERE uid='".$who."'"));
$gtalk = mysql_fetch_array(mysql_query("SELECT gtalk FROM ibwf_xinfo WHERE uid='".$who."'"));
$orkut = mysql_fetch_array(mysql_query("SELECT orkut FROM ibwf_xinfo WHERE uid='".$who."'"));
echo "E-Mail: <br/><b>$email[0]</b><br/>";
echo "Yahoo! Messenger Handle: <br/><b>$yahoo[0]</b><br/>";
echo "GTalk Screen Name: <br/><b>$gtalk[0]</b><br/>";
echo "MSN Messenger Handle: <br/><b>$msn[0]</b><br/>";
echo "ICQ Number: <br/><b>$icq[0]</b><br/>";
echo "AIM Screen Name: <br/><b>$aim[0]</b><br/>";
echo "Skype Name: <br/><b>$skype[0]</b><br/>";
echo "Orkut Email Address or UID: <br/><b>$orkut[0]</b><br/>";
boxend();
getfooter($sid);
}
//////Post Options
else if($action=="pstopt"){
$pid = $_GET["pid"];
$page = $_GET["page"];
$fid = $_GET["fid"];
addonline($uid,"Post Options","index.php?action=$action&pid=$pid&page=$page&fid=$fid");
gettimebar();
getnewmsg($sid);
getalert($sid);
$pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM ibwf_posts WHERE id='".$pid."'"));
$trid = $pinfo[0];
$tid = $pinfo[1];
$ptext = htmlspecialchars($pinfo[2]);
boxstart("Post Options");
echo "<p>";
$trnick = getnick_uid($trid);
echo "»<a href=\"inbox.php?action=sendpm&sid=$sid&who=$trid\">Send PM to $trnick</a><br/>";
echo "»<a href=\"index.php?action=viewuser&sid=$sid&who=$trid\">View $trnick's Profile</a><br/>";
echo "»<a href=\"genproc.php?action=rpost&sid=$sid&pid=$pid\">Report to admins</a><br/>";
echo "«<a href=\"index.php?action=viewtpc&sid=$sid&tid=$tid&page=$page\">Back to topic</a><br/>";
if(ismod($uid)){
echo "<br/>Text: ";
echo "<form action=\"adctrlpr.php?action=jal&sid=$sid&pid=$pid\" method=\"post\"><textarea id=\"inputText\" name=\"ptext\">$ptext</textarea> ";
echo "<br/><input id=\"inputButton\" type=\"submit\" value=\"Edit\"/>";
echo "</form>";
echo "<br/>»<a href=\"adctrlpr.php?action=paani&sid=$sid&pid=$pid\">DELETE</a><br/>";
}
echo "</p>";
boxend();
getfooter($sid);
}
////////////////////////////Topic options////////////////////////////
else if($action=="tpcopt"){
$tid = $_GET["tid"];
addonline($uid,"Topic Options","index.php?action=$action&tid=$tid");
gettimebar();
getnewmsg($sid);
getalert($sid);
$tinfo= mysql_fetch_array(mysql_query("SELECT name,fid, authorid, text, pinned, closed FROM ibwf_topics WHERE id='".$tid."'"));
$trid = $tinfo[2];
$ttext = htmlspecialchars($tinfo[3]);
$tname = htmlspecialchars($tinfo[0]);
boxstart("Topic Options");
echo "<p>";
echo "Topic ID: <b>$tid</b><br/>";
$trnick = getnick_uid($trid);
echo "»<a href=\"inbox.php?action=sendpm&sid=$sid&who=$trid\">Send PM to $trnick</a><br/>";
echo "»<a href=\"index.php?action=viewuser&sid=$sid&who=$trid\">View $trnick's Profile</a><br/>";
$plid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'"));
if($plid[0]==0){
if(ismod($uid)){
echo "»<a href=\"index.php?action=pltpc&sid=$sid&tid=$tid\">Add Poll</a><br/>";
}
}else{
if(ismod($uid)){
echo "»<a href=\"genproc.php?action=dltpl&sid=$sid&tid=$tid\">Delete Poll</a><br/>";
}
}
echo "»<a href=\"genproc.php?action=rtpc&sid=$sid&tid=$tid\">Report to admins</a><br/>";
echo "»<a href=\"genproc.php?action=bkmrk&sid=$sid&tid=$tid\">Bookmark This Topic</a><br/>";
echo "«<a href=\"index.php?action=viewtpc&sid=$sid&tid=$tid&page=1\">Back to topic</a><br/>";
if(ismod($uid)){
echo "<br/>Title: ";
echo "<form action=\"adctrlpr.php?action=bhaada&sid=$sid&tid=$tid\" method=\"post\"><input id=\"inputText\" name=\"tname\" value=\"$tname\"/> ";
echo "<br/><input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form>";
echo "<br/>Text: ";
echo "<form action=\"adctrlpr.php?action=jaal&sid=$sid&tid=$tid\" method=\"post\"><textarea id=\"inputText\" name=\"ttext\">$ttext</textarea> ";
echo "<br/><input id=\"inputButton\" type=\"submit\" value=\"Edit\"/>";
echo "</form>";
echo "<br/>»<a href=\"adctrlpr.php?action=star&sid=$sid&tid=$tid\">DELETE</a><br/>";
echo "<br/>";
if($tinfo[5]=='1'){
$ctxt = "Open";
$cact = "0";
}else{
$ctxt = "Close";
$cact = "1";
}
echo "»<a href=\"adctrlpr.php?action=thakka&sid=$sid&tid=$tid&tdo=$cact\">$ctxt</a><br/>";
if($tinfo[4]=='1'){
$ptxt = "Unpin";
$pact = "0";
}else{
$ptxt = "Pin";
$pact = "1";
}
echo "»<a href=\"adctrlpr.php?action=mantu&sid=$sid&tid=$tid&tdo=$pact\">$ptxt</a><br/>";
echo "<br/>Move to:<br/>";
$forums = mysql_query("SELECT id, name FROM ibwf_forums WHERE clubid='0'");
echo "<form action=\"adctrlpr.php?action=mtvbakra&sid=$sid&tid=$tid\" method=\"post\"><select id=\"inputText\" name=\"mtf\">";
while ($forum = mysql_fetch_array($forums)){
echo "<option value=\"$forum[0]\">".htmlspecialchars($forum[1])."</option>";
}
echo "</select><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Move\"/>";
echo "</form>";
}
echo "</p>";
boxend();
getfooter($sid);
}
///////////////////////Chat/////////////////////
else if ($action=="chat") {
addonline($uid,"Chat Menu","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Chat Rooms");
echo "<p>";
echo "»<a href=\"index.php?action=uchat&sid=$sid\">Users' Rooms</a><br/><br/>";
$rooms = mysql_query("SELECT id, name, perms, mage, chposts FROM ibwf_rooms WHERE static='1' AND clubid='0'");
while ($room= mysql_fetch_array($rooms)){
if(canenter($room[0], $sid)){
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
echo "<a href=\"chat.php?sid=$sid&rid=$room[0]\">$room[1]($noi[0])</a><br/>";
}
}
echo "</p>";
boxend();
getfooter($sid);
}
//////////////Users rooms/////////////////
else if ($action=="uchat"){
addonline($uid,"Chat Menu","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Users' Rooms");
echo "<p>";
echo "»<a href=\"index.php?action=chat&sid=$sid\">Site Rooms</a><br/>";
echo "<a href=\"index.php?action=mkroom&sid=$sid\">Create Room</a><br/><br/>Enter room password and click its name below:";
$rooms = mysql_query("SELECT id, name, pass FROM ibwf_rooms WHERE static='0'");
$co=0;
while ($room= mysql_fetch_array($rooms)){
$co++;
if(canenter($room[0], $sid)){
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_chonline WHERE rid='".$room[0]."'"));
if($room[2]==""){
echo "<a href=\"chat.php?sid=$sid&rid=$room[0]\">".htmlspecialchars($room[1])."($noi[0])</a><br/>";
}else{
echo "<br/><form action=\"chat.php\" method=\"get\"><input id=\"inputText\" format=\"*x\" name=\"rpw$co\" maxlength=\"10\"/><br/>";
echo htmlspecialchars($room[1]);
echo "<input type=\"hidden\" name=\"rid\" value=\"$room[0]\"/>";
echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"$noi[0]\"/>";
echo "</form><br/>";
}
}
}
echo "</p>";
boxend();
getfooter($sid);
}
///////////////////make a room///////////////////////
else if($action=="mkroom"){
addonline($uid,"Creating Chatroom","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Create Chatroom");
echo "<p>";
echo "Leave password empty if you dont want to lock the room.<br/>";
echo "Room will have a 5 minute lifetime if it is not used.<br/><br/>";
echo "Room Name: <form action=\"genproc.php?action=mkroom&sid=$sid\" method=\"post\"><input id=\"inputText\" name=\"rname\" maxlength=\"30\"/><br/>";
echo "Password: <input id=\"inputText\" name=\"rpass\" format=\"*x\" maxlength=\"10\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form>";
echo "</p>";
echo "<p align=\"center\">";
echo "<img src=\"images/chat.gif\" alt=\"*\"/><a href=\"index.php?action=chat&sid=$sid\">Chatrooms</a><br/>";
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////////////Authenticate Your self as Admin/////////////////
else if($action=="area51ts")
{
addonline($uid,"Area 51","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Area 51");
echo "<p>";
if(isadmin($uid)){
echo "<center><b>Please Authenticate Yourself.<br/>Enter Password Below: </b>";
echo "<p><form action=\"genproc.php?action=admauth&sid=$sid\" method=\"post\"><br/><input id=\"inputText\" type=\"password\" name=\"apwd\" format=\"*x\" maxlength=\"35\"/><input id=\"inputButton\" type=\"submit\" value=\"Enter\"/>";
echo "</form></p></center>";}
else{
echo "<i><b>You are not an Admin! Are You?<br/> So Get The Hell Out Of Here!</b></i>";
}
echo "</p>";
boxend();
getfooter($sid);
}
//////////////////////////////////ADMIN CP///////////////////////////////
else if($action=="caputdraconis")
{
addonline($uid,"Area 51 - Control Center","index.php?action=$action");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Area 51 - Control Center");
echo "<p>";
if(isadmin($uid))
{
echo "»<a href=\"admonition.php?action=sflomere&sid=$sid\">General Settings</a><br/>";
echo "»<a href=\"admonitionpr.php?action=sesexp&sid=$sid\">Boot All</a><br/>";
echo "»<a href=\"admonition.php?action=dnarna&sid=$sid\">Change user info</a><br/>";
echo "»<a href=\"admonition.php?action=pikachu&sid=$sid\">Add Smilies</a><br/>";
echo "»<a href=\"admonition.php?action=jigglypuff&sid=$sid\">Add Avatar</a><br/>";
echo "»<a href=\"admonition.php?action=chatarpatar&sid=$sid\">Chatrooms</a><br/>";
echo "»<a href=\"admonition.php?action=hangtildeath&sid=$sid\">Clear Data</a><br/>";
echo "»<a href=\"admonition.php?action=fukbaap&sid=$sid\">Forum Categories</a><br/>";
echo "»<a href=\"admonition.php?action=fukbeta&sid=$sid\">Forums</a><br/>";
echo "»<a href=\"admonition.php?action=munaadi&sid=$sid\">Broadcast Service</a><br/>";
}else{
echo "You are not an Admin";
}
echo "</p>";
boxend();
getfooter($sid);
}
///////////////////////////////////Poll Topic////////////////
else if($action=="poll"){
addonline($uid,"Administrating Poll","");
gettimebar($sid);
getnewmsg($sid);
getalert($sid);
boxstart("Poll");
echo "<p>";
if(getpoints($sid)<50){
echo "Minimum points required to administrate your poll is 50! You are short of it. To know how to obtain points ask a moderator.";
}else{
$pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'"));
if($pid[0] == 0){
echo "<a href=\"index.php?action=crpoll&sid=$sid\">Create Poll</a>";
}else{
echo "<a href=\"index.php?action=viewpl&sid=$sid&who=$uid\">View Your Poll</a><br/>";
echo "<a href=\"genproc.php?action=dlpoll&sid=$sid\">Delete Your Poll</a><br/>";
}
}
echo "</p>";
boxend();
getfooter($sid);
}
////////////////////////
else if($action=="crpoll"){
addonline($uid,"Creating Poll","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Create Poll");
echo "<p>";
if(getpoints($sid)>=50){
$pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$uid."'"));
if($pid[0] == 0){
echo "<form action=\"genproc.php?action=crpoll&sid=$sid\" method=\"post\">";
echo "Question:<input id=\"inputText\" name=\"pques\" maxlength=\"250\"/><br/>";
echo "Option 1:<input id=\"inputText\" name=\"opt1\" maxlength=\"100\"/><br/>";
echo "Option 2:<input id=\"inputText\" name=\"opt2\" maxlength=\"100\"/><br/>";
echo "Option 3:<input id=\"inputText\" name=\"opt3\" maxlength=\"100\"/><br/>";
echo "Option 4:<input id=\"inputText\" name=\"opt4\" maxlength=\"100\"/><br/>";
echo "Option 5:<input id=\"inputText\" name=\"opt5\" maxlength=\"100\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Create\"/><br/>";
echo "</form>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You already have a poll";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You should have at least 50 plusses to create a poll";
}
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////////////////////
else if($action=="pltpc"){
$tid = $_GET["tid"];
addonline($uid,"Creating Poll","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Add Poll");
echo "<p>";
if((getpoints($sid)>=50)||ismod($uid)){
$pid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'"));
if($pid[0] == 0){
echo "<form action=\"genproc.php?action=pltpc&sid=$sid&tid=$tid\" method=\"post\">Question:<input id=\"inputText\" name=\"pques\" maxlength=\"250\"/><br/>";
echo "Option 1:<input id=\"inputText\" name=\"opt1\" maxlength=\"100\"/><br/>";
echo "Option 2:<input id=\"inputText\" name=\"opt2\" maxlength=\"100\"/><br/>";
echo "Option 3:<input id=\"inputText\" name=\"opt3\" maxlength=\"100\"/><br/>";
echo "Option 4:<input id=\"inputText\" name=\"opt4\" maxlength=\"100\"/><br/>";
echo "Option 5:<input id=\"inputText\" name=\"opt5\" maxlength=\"100\"/><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/><br/>";
echo "</form>";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>The topic already have a poll";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>You should have at least 50 posts to create a poll";
}
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////View poll///////////////
else if($action=="viewpl"){
$who = $_GET["who"];
addonline($uid,"Viewing a poll","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("View Poll");
$pollid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$who."'"));
if($pollid[0]>0){
$polli = mysql_fetch_array(mysql_query("SELECT id, pqst, opt1, opt2, opt3, opt4, opt5, pdt FROM ibwf_polls WHERE id='".$pollid[0]."'"));
if(trim($polli[1])!=""){
$qst = parsepm($polli[1], $sid);
echo $qst."<br/><br/>";
$vdone = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$uid."' AND pid='".$pollid[0]."'"));
$nov = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."'"));
$nov = $nov[0];
if($vdone[0]>0){
$voted= true;
}else{
$voted = false;
}
$opt1 = $polli[2];
if (trim($opt1)!=""){
$opt1 = htmlspecialchars($opt1);
$nov1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='1'"));
$nov1 = $nov1[0];
if($nov>0){
$per = floor(($nov1/$nov)*100);
$rests = "Votes: $nov1($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "1.$opt1 $rests<br/>";
}else{
$lnk = "1.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=1\">$opt1</a> $rests<br/>";
}
echo "$lnk";
}
$opt2 = $polli[3];
if (trim($opt2)!=""){
$opt2 = htmlspecialchars($opt2);
$nov2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='2'"));
$nov2 = $nov2[0];
if($nov>0){
$per = floor(($nov2/$nov)*100);
$rests = "Votes: $nov2($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "2.$opt2 $rests<br/>";
}else{
$lnk = "2.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=2\">$opt2</a> $rests<br/>";
}
echo "$lnk";
}
$opt3 = $polli[4];
if (trim($opt3)!=""){
$opt3 = htmlspecialchars($opt3);
$nov3 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='3'"));
$nov3 = $nov3[0];
if($nov>0){
$per = floor(($nov3/$nov)*100);
$rests = "Votes: $nov3($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "3.$opt3 $rests<br/>";
}else{
$lnk = "3.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=3\">$opt3</a> $rests<br/>";
}
echo "$lnk";
}
$opt4 = $polli[5];
if (trim($opt4)!=""){
$opt4 = htmlspecialchars($opt4);
$nov4 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='4'"));
$nov4 = $nov4[0];
if($nov>0){
$per = floor(($nov4/$nov)*100);
$rests = "Votes: $nov4($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "4.$opt4 $rests<br/>";
}else{
$lnk = "4.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=4\">$opt4</a> $rests<br/>";
}
echo "$lnk";
}
$opt5 = $polli[6];
if (trim($opt5)!=""){
$opt5 = htmlspecialchars($opt5);
$nov5 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='5'"));
$nov5 = $nov5[0];
if($nov>0){
$per = floor(($nov5/$nov)*100);
$rests = "Votes: $nov5($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "5.$opt5 $rests<br/>";
}else{
$lnk = "5.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=5\">$opt5</a> $rests<br/>";
}
echo "$lnk";
}
echo "".date("d/m/Y h:i:s A",$polli[7] + addhours())."";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>This poll doesn't exist";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>This user have no poll";
}
echo "</p>";
boxend();
getfooter($sid);
}
///////////////////////////////
else if($action=="viewtpl"){
$who = $_GET["who"];
addonline($uid,"Viewing a poll","");
gettimebar();
getnewmsg($sid);
getalert($sid);
$pollid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$who."'"));
if($pollid[0]>0){
$polli = mysql_fetch_array(mysql_query("SELECT id, pqst, opt1, opt2, opt3, opt4, opt5, pdt FROM ibwf_polls WHERE id='".$pollid[0]."'"));
if(trim($polli[1])!=""){
$qst = parsepm($polli[1], $sid);
echo $qst."<br/><br/>";
$vdone = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$uid."' AND pid='".$pollid[0]."'"));
$nov = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."'"));
$nov = $nov[0];
if($vdone[0]>0){
$voted= true;
}else{
$voted = false;
}
$opt1 = $polli[2];
if (trim($opt1)!=""){
$opt1 = htmlspecialchars($opt1);
$nov1 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='1'"));
$nov1 = $nov1[0];
if($nov>0){
$per = floor(($nov1/$nov)*100);
$rests = "Votes: $nov1($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "1.$opt1 $rests<br/>";
}else{
$lnk = "1.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=1\">$opt1</a> $rests<br/>";
}
echo "$lnk";
}
$opt2 = $polli[3];
if (trim($opt2)!=""){
$opt2 = htmlspecialchars($opt2);
$nov2 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='2'"));
$nov2 = $nov2[0];
if($nov>0){
$per = floor(($nov2/$nov)*100);
$rests = "Votes: $nov2($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "2.$opt2 $rests<br/>";
}else{
$lnk = "2.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=2\">$opt2</a> $rests<br/>";
}
echo "$lnk";
}
$opt3 = $polli[4];
if (trim($opt3)!=""){
$opt3 = htmlspecialchars($opt3);
$nov3 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='3'"));
$nov3 = $nov3[0];
if($nov>0){
$per = floor(($nov3/$nov)*100);
$rests = "Votes: $nov3($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "3.$opt3 $rests<br/>";
}else{
$lnk = "3.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=3\">$opt3</a> $rests<br/>";
}
echo "$lnk";
}
$opt4 = $polli[5];
if (trim($opt4)!=""){
$opt4 = htmlspecialchars($opt4);
$nov4 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='4'"));
$nov4 = $nov4[0];
if($nov>0){
$per = floor(($nov4/$nov)*100);
$rests = "Votes: $nov4($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "4.$opt4 $rests<br/>";
}else{
$lnk = "4.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=4\">$opt4</a> $rests<br/>";
}
echo "$lnk";
}
$opt5 = $polli[6];
if (trim($opt5)!=""){
$opt5 = htmlspecialchars($opt5);
$nov5 = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE pid='".$pollid[0]."' AND ans='5'"));
$nov5 = $nov5[0];
if($nov>0){
$per = floor(($nov5/$nov)*100);
$rests = "Votes: $nov5($per%)";
}else{
$rests = "Votes: 0(0%)";
}
if($voted){
$lnk = "5.$opt5 $rests<br/>";
}else{
$lnk = "5.<a href=\"genproc.php?action=votepl&sid=$sid&plid=$pollid[0]&ans=5\">$opt5</a> $rests<br/>";
}
echo "$lnk";
}
echo "".date("d/m/Y h:i:s A",$polli[7] + addhours())."";
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>This poll doesn't exist";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"x\"/>This user have no poll";
}
echo "</p>";
boxend();
getfooter($sid);
}
/////////////////
else if($action=="premium"){
addonline($uid,"Viewing premium features list","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Premium Features");
echo "<p>Premium features are those which are available for regular users. They get automatically unlocked when you cross certain number of forum posts. You can check your post count in your profile.<br/><br/><b>Adding a blog</b> - 50 points needed<br/><b>Creating a poll</b> - 50 points needed<br/><b>Adding a club</b> - 100 points needed.</p>";
echo "<p><a href=\"index.php?action=helpc&sid=$sid\">Back To Help Center</a><br/><br/></p>";
boxend();
getfooter($sid);
}
////////////////
else if($action=="helpc"){
addonline($uid,"Help center","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Help Center");
echo "<p><a href=\"index.php?action=premium&sid=$sid\">Premium features list</a><br/>";
echo "<a href=\"lists.php?action=bbcode&sid=$sid\">Formatting Codes</a><br/>";
echo "<a href=\"lists.php?action=smilies&sid=$sid\">Smilies</a><br/>";
echo "<a href=\"index.php?action=membert&sid=$sid\">Member Titles</a><br/><a href=\"index.php?action=earnpoints&sid=$sid\">How To Earn Points</a><br/>";
$timeout = 180;
$timeon = time()-$timeout;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_users WHERE perm>'0' AND lastact>'".$timeon."'"));
echo "If you have a problem(someone teasing, some technical help related to site required) then send a message to any online admin<br/>";
echo "<a href=\"index.php?action=stfol&sid=$sid\">Online Admins(".$noi[0].")</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT count(*) FROM ibwf_users WHERE perm>'0'"));
echo "<a href=\"lists.php?action=staff&sid=$sid\">Administration Team($noi[0])</a><br/>";
echo "<a href=\"index.php?action=terms&sid=$sid\">Terms of use/Guidelines</a></p>";
boxend();
getfooter($sid);
}
////////////
else if($action=="earnpoints"){
addonline($uid,"Viewing How To Earn Points","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Earn Points");
echo "<p>Your points reflect how important and regular member you are of the site!";
echo "<br/>You can earn Points by doing following activities : -<br/><br/>";
echo "<b>Shout</b> - 1 Point<br/><b>Reply in a Forum Post</b> - 2 Points<br/><b>Creating a New Topic</b> - 5 Points<br/><b>Uploading a File in Upload Center</b> - 10 Points<br/></p>";
echo "<p><a href=\"index.php?action=helpc&sid=$sid\">Back To Help Center</a><br/><br/></p>";
boxend();
getfooter($sid);
}
////////////////////
else if($action=="membert"){
addonline($uid,"Viewing member titles","");
gettimebar();
getnewmsg($sid);
getalert($sid);
boxstart("Member Titles");
echo "<p>Member titles are assigned to users depending upon the number of posts in forums. You can check someone's member title in their profiles.";
echo "<br/>Following member titles are currently awarded to users:<br/><br/>";
echo "<b>Below 50 posts</b> - Newbie<br/><b>50-100 posts</b> - Member<br/><b>100-500 posts</b> - Regular Member<br/><b>500-1000</b> - Professional Time Waster<br/>";
echo "<b>1000-2000</b> - Posts Factory<br/><b>2000-4000</b> - INDIFUN Ki Shaan<br/><b>4000-8000</b> - WAP Don!<br/><b>8000-15000</b> - WAP King!<br/><b>15000+</b> - God!!!<br/><br/></p>";
echo "<p><a href=\"index.php?action=helpc&sid=$sid\">Back To Help Center</a><br/><br/></p>";
boxend();
getfooter($sid);
}
///////////////////////////Terms of use////////////////
else if($action=="terms")
{
if($uid>0)
{
addonline($uid,"Terms of use","");
}
?>
<p><u><b>Guidelines</b></u></p>
<p>1. Everything is allowed in inbox! You can spam, flirt, make love or whatever you want but the other party must not have any problem.</p>
<p>2. You can talk to your friends in your own regional language but you must provide english or Hindi translation if demanded by anyone.</p>
<p>3. If a user is stalking, teasing, harassing, abusing or forcing you for your phone number then you may either add him/her in your Ignore list(Main Menu>Settings&Info>Ignore List) or lodge a complaint to a moderator or administrator. We advise you to conceal your personal details i.e. phone number, address etc. while making friends on NET. But its up to you.</p>
<p>4. You must not use filthy, abusive and indecent words in shoutbox or forums.</p>
<p>5. We allow creation of multiple IDs by single person. You can have multiple profiles with different names, sex, location if you want! We won't object.</p>
<p>6. For your account's safety we advise you to keep a password that is different from that kept by you on other sites. We won't be responsible if your account here gets hacked by people on other sites because you've same password here and there. However we provide you full security from our side. But we can do nothing if its your fault in giving away your password to people of malicious intent by phishing etc.</p>
<p>7. You should not be engaged in battles involving caste, colour and religion. </p>
<p>8. The administration team of INDIFUN.NET reserves the right to do anything on the site without specifying a reason.</p>
<?
echo "<p align=\"center\">";
if($uid>0)
{
echo "<a href=\"index.php?action=main&sid=$sid\">";
echo "Main Menu</a>";
}else{
echo "<a href=\"index.php\">";
echo "Home</a>";
}
echo "</p>";
}
else{
/////////////////////////Index Page/////////////////
$indiatime = time() + (addhours());
addvisitor();
echo "
<div class=\"logo\"><center>".getlogo($uid)."</center></div>
";
boxstart("www.mobilezonez.com");
echo"
<center>
Please Bookmark Us Now!!
</center>
";
boxend();
boxstart("Login");
$status=mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='entry'"));
if($status[0]==1){
echo " <center>
<form action=\"login.php\" method=\"get\">
<img src=\"images/user.gif\" alt=\"\"/>Enter username:<br/>
<input id=\"inputText\" name=\"loguid\" maxlength=\"30\"/><br/>
<img src=\"images/pass.gif\" alt=\"\"/>Enter password:<br/>
<input id=\"inputText\" type=\"password\" format=\"*x\" name=\"logpwd\" maxlength=\"30\"/><br/>
<input id=\"inputButton\" type=\"submit\" value=\"Login\"/><br/>
</form>
<br/><br/><img src=\"images/register.gif\" alt=\"\"/><a href=\"register.php\">Register</a>
</center>
";
}
else echo "Mobilezonez is temporarily closed for maintenance! Please try after some time.";
boxend();
echo "
<div class=\"footer\"><small>
<center>
Trouble logging in? Forgot your password? Just <a href=\"mailform/index.php\">click here</a> to mail us.<br/>
";
$onu = getnumonline();
$allm = mysql_fetch_array(mysql_query("SELECT COUNT(id) FROM ibwf_users"));
echo $allm[0]." registered members, $onu currently online!<br/><br/>";
echo "© mobilezonez</center>";
echo "</small></div>";
}
?>
<?php
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ("<p align=\"center\">Page took %f seconds to load.</p>", $totaltime);
?>
</font></body>
</html>Last edited by ozziemale31; 11.01.11, 09:32.
Dont Ask Me Dumb Questions.Or you'l get a Dumb Answer..
Want A Profesional Logo or Theme For Your wap site Pm Me.If I Have The Time Ill Make It For Free
-
Originally posted by jaidon20k View Postpls how to do this? i want my site quests to have permission to view my forum without login
if(($action!="") && ($action!="viewforum") && ($action!="forumcategory")&& ($action!="forumtopics"))
{
$memberid = getuid_sid($sid);
if((islogged($sid)==false)||($memberid==0))
{
echo "Please login to access this page!!<br/>";
echo "<a href=\"login.php\">Login</a><br/>";
exit();
}
}
}
//////this code will not put your guest to members online list
//////0 id means guest and 1++ id/s means your members..
////in action==forum
$memberid =getuid_sid($sid);
if($uid>0)
{
addonline(getuid_sid($sid),"Forum","");
}
/////end
$memberid =getuid_sid($sid);
if($memberid>0)
{
////////part of ur forum you dont want to viewed by your guest
}
ex:
$memberid =getuid_sid($sid);
if($memberid>0)
{
echo "<a href=\"index.php?action=postreply\"post reply</a><br/>";
}else{
echo "";
}
//// if your guest tries to browse index.php?action=postreply
///Please login to access this page!!, will be displayed..
////your guest can now access your forum.. lol!!
Comment
Comment