PHP Code:
/////////////////////////////////viewuser profile
else if($action=="viewuser")
{
mysql_query("UPDATE ibwf_users SET pid='1' WHERE id='".getuid_sid($sid)."'");
addonline(getuid_sid($sid),"Viewing Users Profile","index.php?action=viewuser&who=$who");
echo "<p align=\"left\">";
$uid = getuid_sid($sid);
if($who!=$uid)
{
mysql_query("INSERT INTO ibwf_view SET byuid='".$uid."', touid='".$who."', actime='".time()."'");
}
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
if($whonick!="")
{
echo "$whonick's Profile<br/>";
if(cansee(getuid_sid($sid), $who))
{
echo "<small>";
$unol = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Penalty Reason: $unol[0]<br/>";
}
$unol = mysql_fetch_array(mysql_query("SELECT lastplreas FROM ibwf_users WHERE id='".$who."'"));
if($unol[0]!="")
{
echo "Last Plusses Reason: $unol[0]<br/>";
}
echo "</small>";
}
if(isonline($who))
{
$uact = "Location: ";
$plc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$who."'"));
$uact .= $plc[0];
}else{
$uact = "Last Action: ";
$ladt = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_users WHERE id='".$who."'"));
$uact .= $ladt[0];
}
echo "$uact ";
if(gohere($who))
{
$plclnk = mysql_fetch_array(mysql_query("SELECT placedet FROM ibwf_online WHERE userid='".$who."'"));
echo " <a href=\"$plclnk[0]&sid=$sid\">go here</a><br/>";
}else{
echo "<br/>";
}
$avlink = getavatar($who);
echo "<img src=\"$avlink\" alt=\"avatar\"/>";
echo "<small>";
echo "<br/>Member's ID: <b>$who</b><br/>";
echo "Status: <b>".getstatus($who)."</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{
$usex = "Male";
}else if($nopl[0]=='F'){
$usex = "Female";
}else{
$usex = "Shemale";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "A/S/L: <b>$uage/$usex/$nopl[2]</b><br/>";
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
echo "<Ako ay: <b>CERTIFIED BETARIAN!</b>";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
$tlink = "<a href=\"lists.php?action=tbuid&sid=$sid&who=$who\">$unol[0]</a>";
echo "<br/>Topics: <b>$tlink</b><br/>";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$who."'"));
$plink = "<a href=\"lists.php?action=uposts&sid=$sid&who=$who\">$unol[0]</a>";
echo "Posts: <b>$plink/$unop[0]</b><br/>";
$nopm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
$pms=mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE unread='1' AND byuid='".$uid."' AND touid='".$who."'"));
echo "Unread PMs: $nopm[0], $pms[0] from yours <br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
echo "Plusses: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$who."'"));
echo "Game. Plusses: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "Chat Posts: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
echo "Battle Points: <b>$nopl[0]</b><br/>";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".$who."'"));
if($judg[0]>0)
{
echo "<b>Battle Board Judge</b><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 "Shouts: <b><a href=\"lists.php?action=shouts&sid=$sid&who=$who\">$nout[0]</a>/$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Joined PA: <b>$jdt</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Active: <b>$jdt</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("d m y-H:i:s",$nopl[0]);
echo "Last Visit: <b>$jdt</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sign = parsepm($nopl[0], $sid);
echo "Signature: $sign<br/>";
$weekago = time();
$weekago -= 1*24*60*60;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT byuid) FROM ibwf_view WHERE touid='".$who."' AND actime>'".$weekago."';"));
echo "No. of times profile viewed today: $noi[0]<br/>";
if(ismod(getuid_sid($sid)))
{
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
echo "IP:<a href=\"lists.php?action=byip&sid=$sid&who=$who\">$uipadd[0]</a><br/>";
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: $nob[0]<br/>";
}
echo "</small>";
$weekago = time();
$weekago -= 1*24*60*60;
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(DISTINCT byuid) FROM ibwf_view WHERE touid='".$who."' AND actime>'".$weekago."';"));
if(cansee(getuid_sid($sid), $who))
{
if($noi[0]>0)
{
echo "<a href=\"info.php?action=views&who=$who&sid=$sid&browse?\">Who viewed me!</a><br/>";
}
}
echo "<a href=\"inbox.php?action=sendpm&who=$who&sid=$sid\">Send PM</a><br/>";
echo "<a href=\"index.php?action=rpg&who=$who&sid=$sid\">Challenge</a><br/>";
echo "<a href=\"index.php?action=shares&who=$who&sid=$sid\">Share +s</a><br/>";
echo "<a href=\"lists.php?action=viewuser&who=$who&sid=$sid\">View gallery</a><br/>";
$uid = getuid_sid($sid);
if(budres($uid, $who)==0)
{
echo "<a href=\"genproc.php?action=bud&who=$who&sid=$sid&todo=add\">Add to 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 From buddy list</a><br/>";
}
$ires = ignoreres($uid, $who);
if(es==2)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=del\">Remove From Ignore list</a><br/>";
}else if($ires==1)
{
echo "<a href=\"genproc.php?action=ign&who=$who&sid=$sid&todo=add\">Add to Ignore list</a><br/>";
}
echo "<a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a><br/>";
echo "<a href=\"users?$whonick\">$whonick's Personal Wap Site</a>";
echo "<br/><a href=\"index.php?action=givegp&who=$who&sid=$sid\">Give GP</a><br/>";
$noi = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_users WHERE id='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"index.php?action=viewpl&who=$who&sid=$sid\">Poll</a><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=ucl&who=$who&sid=$sid\">Clubs($noi[0])</a><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=clm&who=$who&sid=$sid\">Member In $noi[0] Clubs</a><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=blogs&who=$who&sid=$sid\">Blogs($noi[0])</a><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "<a href=\"lists.php?action=vault&who=$who&sid=$sid\">Vault($noi[0])</a><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbowner='".$who."'"));
echo "<a href=\"lists.php?action=gbook&who=$who&sid=$sid\">Guestbook($noi[0])</a><br/>";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
if(ismod(getuid_sid($sid))||$judg[0]>0)
{
echo "<a href=\"index.php?action=batp&who=$who&sid=$sid\">Battle Points</a><br/>";
}
if(ismod(getuid_sid($sid)))
{
echo "<a href=\"modcp.php?action=user&who=$who&sid=$sid&who=$who\">Mod CP</a><br/>";
}
}else{
echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member does not exist<br/>";
}
echo "<br/><a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</body>";
}
PHP Code:
if($mime=="xhtml")
{
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr><td class=\"boxedTitle\" height=\"20\"><h1 align=\"center\" class=\"boxedTitleText\">".$whonick."</h1></td></tr>";
echo "<tr><td class=\"boxedContent\">";
echo startcenter($mime);
}else{
echo startcenter($mime);
echo "<b>".$whonick."</b><br/>";
}
if($lastloc=="cht")
{
$rid = $_GET["rid"];
$rooms = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_rooms WHERE id='".$rid."'"));
$rname = $rooms[1];
}
if($whonick!="")
{
if(isadmin($uid))
{
echo "<a href=\"admincp?action=user&who=$who\">*Admin Tools*</a><br/>";
}
if(ismod($uid))
{
echo "<a href=\"modcp?action=user&who=$who\">*Moderator Tools*</a><br/>";
}
$viewed = mysql_fetch_array(mysql_query("SELECT viewed FROM lastview WHERE whonick='".$whonick."' AND lastview='".getnick_uid($uid)."'"));
if($who=="$uid")
{
echo "";
}else if($viewed[0]==1)
{
mysql_query("UPDATE lastview SET ltime='".time()."' WHERE lastview='".getnick_uid($uid)."' AND whonick='".$whonick."'");
}else{
if($uid!=0 OR $uid!="")
{
mysql_query("INSERT INTO lastview SET lastview='".getnick_uid($uid)."', whonick='".$whonick."', ltime='".time()."', viewed='1'");
}
}
$sql = mysql_fetch_array(mysql_query("SELECT lastview, ltime FROM lastview WHERE whonick='".$whonick."' ORDER BY ltime DESC LIMIT 1"));
$count = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM lastview WHERE whonick='".$whonick."'"));
$b = getuid_nick($sql[0]);
$link = "<a href=\"profile-$b\">$sql[0]</a>";
if($count[0]>0)
{
echo "Who's Viewed Me: $link - ";
echo date("dMy - g:i:s a");
if($count[0]>1)
{
echo " [<a href=\"profile?action=proviewer&who=$who\">+</a>]";
}
}
$noi = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$timeon = mysql_fetch_array(mysql_query("SELECT timeon FROM ibwf_users WHERE id='".$who."'"));
$var1 = date("g:i:s a",$noi[0]);
$var2 = time();
$var21 = date("g:i:s a");
$var3 = $var21 - $var1;
$var4 = date("s",$var3);
$remain = time() - $noi[0];
$idle = gettimemsg($remain);
$ton = gettimemsg($timeon[0]);
if($idle=="")
{
echo "<br/>";
}else{
echo "<br/>Idle For: $idle<br/>";
}
if($ton=="")
{
echo "";
}else{
echo "Time Online: ".gettimemsg($timeon[0])."<br/>";
}
$wer = mysql_fetch_array(mysql_query("SELECT place, placedet from ibwf_online WHERE userid='".$who."'"));
if($wer[1]=="")
{
echo "";
}else{
echo "Action/Where: $wer[0] [<a href=\"$wer[1]\">go there, too!</a>]<br/>";
}
if($who==$uid)
{
echo "<a href=\"index-uset\">*Edit My Profile*</a><br/>";
}
if(isonline($who))
{
echo "[ ".$whonick." is online ]<br/>";
}else{
echo "[ ".$whonick." is offline ]<br/>";
}
$avlink = getavatar($who);
$av = basename($avlink);
if($avlink=="")
{
echo "<img src=\"image?src=images/nopic.jpg&h=120&w=120\" alt=\"No Photo\"/><br/>";
}else if(preg_match("/usergallery/i", $avlink))
{
echo "<a href=\"image?src=avats/$av&h=120&w=120\"><img src=\"image?src=usergallery/$av&h=120&w=120\" alt=\"Download Image\"/></a><br/>";
}else if(preg_match("/avats/i", $avlink))
{
echo "<a href=\"image?src=avats/$av&h=120&w=120\"><img src=\"image?src=avats/$av&h=120&w=120\" alt=\"Download Image\"/></a><br/>";
}else{
echo "<img src=\"image?src=images/nopic.jpg&h=120&w=120\" alt=\"No Photo\"/><br/>";
}
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
$sign = parse_xsite($nopl[0]);
echo """.$sign.""<br/>";
if((isprivatepro($who)) && (!arebuds($uid, $who)) && ($who!=$uid))
{
if($mime=="xhtml")
{
echo "<font color=\"red\">Private Profile</font><br/>[ Restricted to $whonick's friends only ]<br/>";
}else{
echo "Private Profile<br/>[ Restricted to $whonick's friends only ]<br/>";
}
}
if($uid!=0 OR $uid!="")
{
if(budres($uid, $who)==0)
{
echo "<a href=\"genproc?action=bud&who=$who&todo=add\">Send Friend Request</a><br/>";
}else if(budres($uid, $who)==1)
{
echo "(Queued Friend Request)<br/>";
}else if(budres($uid, $who)==2)
{
echo "<a href=\"genproc?action=bud&who=$who&todo=del\">Remove from Friends List</a><br/>";
}
if(arebuds($uid, $who))
{
echo "<a href=\"inbox?action=sendpopup&who=$who\">Send Pop-Up Msg</a><br/>";
}
echo "<a href=\"inbox?action=sendto&who=$who\">Send Private Msg</a><br/>";
}
$ires = ignoreres($uid, $who);
if($ires==1)
{
echo "<a href=\"genproc?action=ign&who=$who&todo=add\">Ignore User</a><br/>";
}
if(isignored($who, $uid))
{
echo "<a href=\"genproc?action=ign&who=$who&todo=del\">UnIgnore User</a><br/>";
}
if((!isprivatepro($who)) OR (arebuds($uid, $who)) OR ($who==$uid))
{
echo endcenter($mime);
echo "<a href=\"uinfo?who=$who\">More About Me</a><br/>";
echo "Status: ".getstatus($who)."<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
echo "Member's ID: $who<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location FROM ibwf_users WHERE id='".$who."'"));
$uage = getage($nopl[1]);
if($nopl[0]=='M')
{
$usex = "Male";
}else if($nopl[0]=='F')
{
$usex = "Female";
}else{
$usex = "Not set!";
}
$nopl[2] = htmlspecialchars($nopl[2]);
echo "Age: $uage<br/>";
echo "Sex: $usex<br/>";
echo "Location: ".parse_xsite($nopl[2])."<br/>";
echo "E-mail Address: ".ishidden($who)."<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("dMy - l, g:i:s a",$nopl[0]);
echo "Member Since: $jdt<br/>";
$membrage = time() - $nopl[0];
$membrage = gettimemsg($membrage);
echo "Member For: $membrage<br/>";
$nob = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_buddies WHERE (uid='".$who."' OR tid='".$who."') AND agreed='1'"));
echo "Buddies: $nob[0]<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT ipadd, browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Current Browser: $nopl[1]<br/>";
echo "Current IP: <a href=\"lists.php?action=byip&sid=$sid&who=$who\">$nopl[0]</a><br/>";
$IPaddress = $nopl[0];
$two_letter_country_code = iptocountry($IPaddress);
echo "IP Location: <img src=\"flags/$two_letter_country_code.gif\" alt=\"*\"/> ".country_name($two_letter_country_code)."<br/>";
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_topics WHERE authorid='".$who."'"));
$tlink = "<a href=\"lists.php?action=tbuid&sid=$sid&who=$who\">$unol[0]</a>";
$unop = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
$unol = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$who."'"));
$plink = "<a href=\"lists.php?action=uposts&sid=$sid&who=$who\">$unol[0]</a>";
echo "Forum Subscription: Topics: $tlink, Posts: $plink/$unop[0]<br/>";
$noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."'"));
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE byuid='".$who."'"));
echo "PMs Received: $noin[0]<br/>";
echo "PMs Sent: $nout[0]<br/>";
$fpm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND byuid='".$uid."' AND unread='1'"));
$upm = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
echo "Unread PMs: $upm[0], $fpm[0] from you<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
$bpl = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'"));
if($bpl[0]>0)
{
echo "Bank Credits: $bpl[0]<br/>";
}else{
echo "";
} echo "Plusses: $nopl[0]<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
echo "Chat Posts: $nopl[0]<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
echo "Battle Points: $nopl[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 "Shouts: <a href=\"lists.php?action=shouts&sid=$sid&who=$who\">$nout[0]</a>/$nopl[0]<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("dMy - l, g:i:s a",$nopl[0]);
echo "Last Active: $jdt<br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT lastvst FROM ibwf_users WHERE id='".$who."'"));
$jdt = date("dMy - l, g:i:s a",$nopl[0]);
echo "Last Visit: $jdt<br/>";
Comment