$flagimg = strtolower($ipdata[4]);
$countryname = ucwords(strtolower($ipdata[6]));
flags.php
<?php
/*
MethosWap (Chat-Forum by Methos)
methos@methos.co.za
*/
$who = $_GET["who"];
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$uid = getuid_sid($sid);
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
$addr = $uipadd[0];
$ip = sprintf("%u", ip2long($addr));
$time_start = microtime_float();
$handle = fopen("ip2country/ip2country.csv", "r");
$row = 1;
while (($buffer = fgets($handle, 4096)) !== FALSE) {
$array[$row] = substr($buffer, 1, strpos($buffer, ",") - 1);
$row++;
}
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
$row_lower = '0';
$row_upper = $row;
while (($row_upper - $row_lower) > 1) {
$row_midpt = (int) (($row_upper + $row_lower) / 2);
if ($ip >= $array[$row_midpt]) {
$row_lower = $row_midpt;
} else {
$row_upper = $row_midpt;
}
}
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
rewind($handle);
$row = 1;
while ($row <= $row_lower) {
$buffer = fgets($handle, 4096);
$row++;
}
$buffer = str_replace("\"", "", $buffer);
$ipdata = explode(",", $buffer);
$iso2 = $ipdata[4];
$country = ;
fclose($handle);
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
profile.php
<?
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<?php
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
include("themecs.php");
ini_set("display_errors", "0");
connectdb();
///////////////////////////////////////////////coockies
//protect against sql injections and remove $ sign
if( !get_magic_quotes_gpc() )
{
if( is_array($_GET) )
{
while( list($k, $v) = each($_GET) )
{
if( is_array($_GET[$k]) )
{
while( list($k2, $v2) = each($_GET[$k]) )
{
$_GET[$k][$k2] = addslashes($v2);
}
@reset($_GET[$k]);
}
else
{
$_GET[$k] = addslashes($v);
}
}
@reset($_GET);
}
if( is_array($_POST) )
{
while( list($k, $v) = each($_POST) )
{
if( is_array($_POST[$k]) )
{
while( list($k2, $v2) = each($_POST[$k]) )
{
$_POST[$k][$k2] = addslashes($v2);
}
@reset($_POST[$k]);
}
else
{
$_POST[$k] = addslashes($v);
}
}
@reset($_POST);
}
}
$brws = explode("/",$_SERVER['HTTP_USER_AGENT']);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
$popuppm = mysql_fetch_array(mysql_query("SELECT popuppm FROM ibwf_users WHERE id='".$uid."'"));
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "This IP address is blocked<br/>";
echo "<br/>";
echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
$remain = $banto[0] - time() ;
$rmsg = gettimemsg($remain);
echo "Time to unblock the IP: $rmsg<br/><br/>";
echo "</p>";
echo xhtmlfoot();
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo xhtmlheadnotheme("$sitetitle (Not Logged In!)");
echo "<p align=\"center\">";
echo "You are not logged in<br/>";
echo "Or Your session has been expired<br/><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<form action=\"login.php\" method=\"get\">";
echo "Username:<input name=\"loguid\" size=\"8\" maxlength=\"30\"/><br/>";
echo "Password:<input name=\"logpwd\" size=\"8\" maxlength=\"30\" type=\"password\" /><br/>";
echo "<input type=\"submit\" value=\"Login\"/>";
echo "</form>";
echo "</p>";
echo xhtmlfoot();
exit();
}
}
if(isbanned($uid))
{
echo xhtmlheadnotheme("$sitetitle (BANNED!)");
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "You are <b>Banned</b><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time() ;
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
echo "Ban Reason: $banres[0]";
echo "</p>";
echo xhtmlfoot();
exit();
}
////////////////////////////////////////VIEW USER
else if($action=="main")
{
ini_set('url_rewriter.tags', '');
include("flag.php");
$whonick_noc = getnick_uid_noc($who);
$whonick = getnick_uid($who);
if ($who==$uid)
{
addonline(getuid_sid($sid),"Viewing Own Profile - xHTML:v3","");
}else
{
addonline(getuid_sid($sid),"Viewing $whonick_noc''s Profile - xHTML:v3","");
}
echo "<head>\n";
echo "<title>blingywap</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
echo "</head>";
if ($popuppm[0]=="1"){
include("popups.php");
}
echo "<center>";
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
if($whonick!="")
{
if(isonline($who))
{
$lasplc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$who."'"));
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
$where = "$lasplc[0]";
$idleofline = "Idle For:";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
$where = "Offline";
$idleofline = "Offline For:";
}
echo "Rating: ";
echo rating($who);
echo "<br/><br/>";
echo "$iml $whonick's Profile<br/>";
if ($who==$uid)
{
echo "<a href=\"mood.php?action=change&sid=$sid\"><img src=\"mood.php?action=getpic&sid=$sid&who= $who\" alt=\"Mood\"/></a><br/>";
}else{
echo "<img src=\"mood.php?action=getpic&sid=$sid&who= $who\" alt=\"Mood\"/><br/>";
}
$avlink = getavatar($who);
if ($avlink=="")
{
$sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
if($sex[0]=='M')
{
echo "<br/><img src=\"images/nophotoboy.gif\" alt=\"avatar\"/><br/>";
}else if($sex[0]=='F')
{
echo "<br/><img src=\"images/nophotogirl.gif\" alt=\"avatar\"/><br/>";
}else{
echo "<br/><img src=\"images/nopic.jpg\" alt=\"avatar\"/><br/>";
}
}else{
echo "<br/><img src=\"$avlink\" alt=\"avatar\"/><br/><br/>";
}
$married=mysql_fetch_array(mysql_query("SELECT * from ibwf_married WHERE frmuid='".$who."' OR touid='".$who."'"));
if($married['frmuid']==$who)
{
if($married['agreed']==1)
{
if($married['complete']==1)
{
$unick=getnick_uid($who);
$mnick=getnick_uid($married['touid']);
echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>";
}
}
}else{
if($married['agreed']==1)
{
if($married['complete']==1)
{
$unick=getnick_uid($who);
$mnick=getnick_uid($married['frmuid']);
echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>";
}
}
}
echo "</center>";
echo "<div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"30\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">User Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location, realname, lang, relstatus FROM ibwf_users WHERE id='".$who."'"));
echo "Member's ID: <b>$who</b><br/>";
echo "Real Name: <b>$nopl[3]</b><br/>";
echo "Status: <b>".getstatus($who)."</b><br/>";
$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 "Age: <b>$uage</b><br/>";
echo "Sex: <b>$usex</b><br/>";
echo "Language: <b>$nopl[4]</b><br/>";
$info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$who."'"));
$exp_bday=explode("-",$info[birthday]);
$month=$exp_bday[1];
$day=$exp_bday[2];
$get1=date(m);
$get2=$month-$get1;
$get3=date(d);
$get4=$day-$get3;
$birthday=date("jS F",strtotime("$get2 months $get4 days"));
echo "<b>Birthday:</b> ".$birthday."<br/>";
echo "<b>Starsign: </b>".getstarsign($nopl[1])."<br/>";
echo "Relationship Status: <b>$nopl[5]</b><br/>";
echo "Location: <b>$nopl[2]</b><br/>";
$flagimg = strtolower($ipdata[4]);
$countryname = ucwords(strtolower($ipdata[6]));
echo "Country: <b>$countryname</b> <img src=\"flags/$flagimg.png\">";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Site Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$who."'"));
if($noi[0]>0)
{
echo "Owner of Clubs: <b><a href=\"lists.php?action=ucl&who=$who&sid=$ sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Member In Clubs: <b><a href=\"lists.php?action=grpm&who=$who&sid= $sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner='".$who."'"));
if($noi[0]>0)
{
echo "Blogs: <b><a href=\"lists.php?action=blogs&who=$who&sid =$sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Vault Items: <b><a href=\"lists.php?action=vault&who=$who&sid =$sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Gallery: <b><a href=\"gallery.php?action=viewuserphoto&who=$w ho&sid=$sid\">$noi[0]</a></b><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>";
echo "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&wh o=$who\">$unol[0]</a>";
echo "Posts: <b>$plink/$unop[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
echo "Credits: <b>$nopl[0]</b><br/>";
$bank = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Plusses In Bank:</b> $bank[0]<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 "Battle status: Judge<br/>";
}else{
include("rstatus.php");
echo "Battle status: ".getB_status($bps[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: <b><a href=\"lists.php?action=shouts&sid=$sid&wh o=$who\">$nout[0]</a>/$nopl[0]</b><br/>";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Online Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
echo "Where: <b>$where</b><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/>";
$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 B-Wap: <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/>";
$totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
$num = $totaltimeonline[0]/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*60;
$secs = intval($num4);
echo "Time Online: ";
if(($days==0) and ($hours==0) and ($mins==0)){
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0) and ($hours==0)){
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0)){
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else{
echo "<b>$days</b> days, ";
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
echo "$idleofline ";
$remain = time() - $noi[0];
$num = $remain/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*60;
$secs = intval($num4);
if(($days==0) and ($hours==0) and ($mins==0)){
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0) and ($hours==0)){
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0)){
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else{
echo "<b>$days</b> days, ";
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Other Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$vws = mysql_fetch_array(mysql_query("SELECT proviews FROM ibwf_users WHERE id='".$who."'"));
$views = $vws[0]+1;
echo "Profile Views: <b>$views</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: <b>$nopl[0]</b><br/>";
//////////////////////////////////////
$noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND byuid='".$uid."'"));
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
echo "<b>Unread PMs:</b> $nout[0]<br/>";
echo "<b>From You:</b> $noin[0]<br/>";
//////////////////////////////////////
$nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
echo "E-mail: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
echo "Signature: $sign<br/>";
if(mypro(getuid_sid($sid), $who))
{
}else{
mysql_query("UPDATE ibwf_users SET proviews='".$views."' WHERE id='".$who."'");
}
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
if(ismod(getuid_sid($sid)))
{
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Staff Menu</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$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/><br/>";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
echo "<a href=\"index.php?action=batp&who=$who&sid= $sid\">Battle Points</a><br/>";
echo "<a href=\"mcppl.php?action=user&who=$who&sid= $sid&who=$who\">Mod CP</a>";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
}
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">More Menu</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>"; if($uid!=$who){
echo "<a href=\"tictactoe.php?action=invite&who=$who&am p;sid=$sid\">Invite $whonick for TicTacToe</a><br/>";
}
echo "<a href=\"inbox.php?action=sendpm&who=$who&si d=$sid\">Send PM</a><br/><br/>";
if(cansee(getuid_sid($sid), $who))
{
$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 Credits Reason: $unol[0]<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=\"userfun.php?action=profile&who=$who& ;sid=$sid\">Fun and Games</a><br/><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&si d=$sid\">Poll</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/><br/>";
echo "<a href=\"wz.php?action=terms&who=$who&sid=$s id\">Battle with $whonick!</a><br/>";
echo "<a href=\"index.php?action=prop&who=$who&sid= $sid\">$whonick's Property!</a><br/>";
echo "<a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a><br/>";
echo "<a href=\"users?$whonick_noc\">$whonick's Personal Wap Site</a><br/>";
echo "</small></center></td>";
echo "<u>Send a quick message to $whonick</u>:<br/>";
echo "<form action=\"inbxproc.php?action=sendpm&who=$who&a mp;sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form><br/><br/>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
}else{
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member does not exist<br/>";
echo "</p>";
}
echo "<p><small>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo " > ";
echo "$whonick";
echo " > ";
echo "View Profile";
echo "</small></p>";
}
?>
$countryname = ucwords(strtolower($ipdata[6]));
flags.php
<?php
/*
MethosWap (Chat-Forum by Methos)
methos@methos.co.za
*/
$who = $_GET["who"];
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$uid = getuid_sid($sid);
$uipadd = mysql_fetch_array(mysql_query("SELECT ipadd FROM ibwf_users WHERE id='".$who."'"));
$addr = $uipadd[0];
$ip = sprintf("%u", ip2long($addr));
$time_start = microtime_float();
$handle = fopen("ip2country/ip2country.csv", "r");
$row = 1;
while (($buffer = fgets($handle, 4096)) !== FALSE) {
$array[$row] = substr($buffer, 1, strpos($buffer, ",") - 1);
$row++;
}
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
$row_lower = '0';
$row_upper = $row;
while (($row_upper - $row_lower) > 1) {
$row_midpt = (int) (($row_upper + $row_lower) / 2);
if ($ip >= $array[$row_midpt]) {
$row_lower = $row_midpt;
} else {
$row_upper = $row_midpt;
}
}
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
rewind($handle);
$row = 1;
while ($row <= $row_lower) {
$buffer = fgets($handle, 4096);
$row++;
}
$buffer = str_replace("\"", "", $buffer);
$ipdata = explode(",", $buffer);
$iso2 = $ipdata[4];
$country = ;
fclose($handle);
$time_end = microtime_float();
$time = substr($time_end - $time_start, 0, 7);
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
?>
profile.php
<?
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<?php
include("config.php");
include("core.php");
include("xhtmlfunctions.php");
include("themecs.php");
ini_set("display_errors", "0");
connectdb();
///////////////////////////////////////////////coockies
//protect against sql injections and remove $ sign
if( !get_magic_quotes_gpc() )
{
if( is_array($_GET) )
{
while( list($k, $v) = each($_GET) )
{
if( is_array($_GET[$k]) )
{
while( list($k2, $v2) = each($_GET[$k]) )
{
$_GET[$k][$k2] = addslashes($v2);
}
@reset($_GET[$k]);
}
else
{
$_GET[$k] = addslashes($v);
}
}
@reset($_GET);
}
if( is_array($_POST) )
{
while( list($k, $v) = each($_POST) )
{
if( is_array($_POST[$k]) )
{
while( list($k2, $v2) = each($_POST[$k]) )
{
$_POST[$k][$k2] = addslashes($v2);
}
@reset($_POST[$k]);
}
else
{
$_POST[$k] = addslashes($v);
}
}
@reset($_POST);
}
}
$brws = explode("/",$_SERVER['HTTP_USER_AGENT']);
$ubr = $brws[0];
$uip = getip();
$action = $_GET["action"];
$sid = $_GET["sid"];
$page = $_GET["page"];
$who = $_GET["who"];
$uid = getuid_sid($sid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$res = mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'");
$popuppm = mysql_fetch_array(mysql_query("SELECT popuppm FROM ibwf_users WHERE id='".$uid."'"));
cleardata();
if(isipbanned($uip,$ubr))
{
if(!isshield(getuid_sid($sid)))
{
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "This IP address is blocked<br/>";
echo "<br/>";
echo "How ever we grant a shield against IP-Ban for our great users, you can try to see if you are shielded by trying to log-in, if you kept coming to this page that means you are not shielded, so come back when the ip-ban period is over<br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE penalty='2' AND ipadd='".$uip."' AND browserm='".$ubr."' LIMIT 1 "));
$remain = $banto[0] - time() ;
$rmsg = gettimemsg($remain);
echo "Time to unblock the IP: $rmsg<br/><br/>";
echo "</p>";
echo xhtmlfoot();
exit();
}
}
if(($action != "") && ($action!="terms"))
{
$uid = getuid_sid($sid);
if((islogged($sid)==false)||($uid==0))
{
echo xhtmlheadnotheme("$sitetitle (Not Logged In!)");
echo "<p align=\"center\">";
echo "You are not logged in<br/>";
echo "Or Your session has been expired<br/><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<form action=\"login.php\" method=\"get\">";
echo "Username:<input name=\"loguid\" size=\"8\" maxlength=\"30\"/><br/>";
echo "Password:<input name=\"logpwd\" size=\"8\" maxlength=\"30\" type=\"password\" /><br/>";
echo "<input type=\"submit\" value=\"Login\"/>";
echo "</form>";
echo "</p>";
echo xhtmlfoot();
exit();
}
}
if(isbanned($uid))
{
echo xhtmlheadnotheme("$sitetitle (BANNED!)");
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"x\"/><br/>";
echo "You are <b>Banned</b><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto FROM ibwf_metpenaltiespl WHERE uid='".$uid."' AND penalty='1'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time() ;
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
echo "Ban Reason: $banres[0]";
echo "</p>";
echo xhtmlfoot();
exit();
}
////////////////////////////////////////VIEW USER
else if($action=="main")
{
ini_set('url_rewriter.tags', '');
include("flag.php");
$whonick_noc = getnick_uid_noc($who);
$whonick = getnick_uid($who);
if ($who==$uid)
{
addonline(getuid_sid($sid),"Viewing Own Profile - xHTML:v3","");
}else
{
addonline(getuid_sid($sid),"Viewing $whonick_noc''s Profile - xHTML:v3","");
}
echo "<head>\n";
echo "<title>blingywap</title>\n";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"themes/$theme[0]\">";
echo "<meta http-equiv=\"Cache-Control\" content=\"must-revalidate\" />\n";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\" />\n";
echo "<meta http-equiv=\"Pragma\" content=\"no-cache\" />\n";
echo "</head>";
if ($popuppm[0]=="1"){
include("popups.php");
}
echo "<center>";
if($who==""||$who==0)
{
$mnick = $_POST["mnick"];
$who = getuid_nick($mnick);
}
$whonick = getnick_uid($who);
if($whonick!="")
{
if(isonline($who))
{
$lasplc = mysql_fetch_array(mysql_query("SELECT place FROM ibwf_online WHERE userid='".$who."'"));
$iml = "<img src=\"images/onl.gif\" alt=\"+\"/>";
$where = "$lasplc[0]";
$idleofline = "Idle For:";
}else{
$iml = "<img src=\"images/ofl.gif\" alt=\"-\"/>";
$where = "Offline";
$idleofline = "Offline For:";
}
echo "Rating: ";
echo rating($who);
echo "<br/><br/>";
echo "$iml $whonick's Profile<br/>";
if ($who==$uid)
{
echo "<a href=\"mood.php?action=change&sid=$sid\"><img src=\"mood.php?action=getpic&sid=$sid&who= $who\" alt=\"Mood\"/></a><br/>";
}else{
echo "<img src=\"mood.php?action=getpic&sid=$sid&who= $who\" alt=\"Mood\"/><br/>";
}
$avlink = getavatar($who);
if ($avlink=="")
{
$sex = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
if($sex[0]=='M')
{
echo "<br/><img src=\"images/nophotoboy.gif\" alt=\"avatar\"/><br/>";
}else if($sex[0]=='F')
{
echo "<br/><img src=\"images/nophotogirl.gif\" alt=\"avatar\"/><br/>";
}else{
echo "<br/><img src=\"images/nopic.jpg\" alt=\"avatar\"/><br/>";
}
}else{
echo "<br/><img src=\"$avlink\" alt=\"avatar\"/><br/><br/>";
}
$married=mysql_fetch_array(mysql_query("SELECT * from ibwf_married WHERE frmuid='".$who."' OR touid='".$who."'"));
if($married['frmuid']==$who)
{
if($married['agreed']==1)
{
if($married['complete']==1)
{
$unick=getnick_uid($who);
$mnick=getnick_uid($married['touid']);
echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>";
}
}
}else{
if($married['agreed']==1)
{
if($married['complete']==1)
{
$unick=getnick_uid($who);
$mnick=getnick_uid($married['frmuid']);
echo "<br/><strong>$unick is Married To $mnick</strong><br/><br/>";
}
}
}
echo "</center>";
echo "<div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"30\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">User Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$nopl = mysql_fetch_array(mysql_query("SELECT sex, birthday, location, realname, lang, relstatus FROM ibwf_users WHERE id='".$who."'"));
echo "Member's ID: <b>$who</b><br/>";
echo "Real Name: <b>$nopl[3]</b><br/>";
echo "Status: <b>".getstatus($who)."</b><br/>";
$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 "Age: <b>$uage</b><br/>";
echo "Sex: <b>$usex</b><br/>";
echo "Language: <b>$nopl[4]</b><br/>";
$info=mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id='".$who."'"));
$exp_bday=explode("-",$info[birthday]);
$month=$exp_bday[1];
$day=$exp_bday[2];
$get1=date(m);
$get2=$month-$get1;
$get3=date(d);
$get4=$day-$get3;
$birthday=date("jS F",strtotime("$get2 months $get4 days"));
echo "<b>Birthday:</b> ".$birthday."<br/>";
echo "<b>Starsign: </b>".getstarsign($nopl[1])."<br/>";
echo "Relationship Status: <b>$nopl[5]</b><br/>";
echo "Location: <b>$nopl[2]</b><br/>";
$flagimg = strtolower($ipdata[4]);
$countryname = ucwords(strtolower($ipdata[6]));
echo "Country: <b>$countryname</b> <img src=\"flags/$flagimg.png\">";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Site Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubs WHERE owner='".$who."'"));
if($noi[0]>0)
{
echo "Owner of Clubs: <b><a href=\"lists.php?action=ucl&who=$who&sid=$ sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_clubmembers WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Member In Clubs: <b><a href=\"lists.php?action=grpm&who=$who&sid= $sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_blogs WHERE bowner='".$who."'"));
if($noi[0]>0)
{
echo "Blogs: <b><a href=\"lists.php?action=blogs&who=$who&sid =$sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_vault WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Vault Items: <b><a href=\"lists.php?action=vault&who=$who&sid =$sid\">$noi[0]</a></b><br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_usergallery WHERE uid='".$who."'"));
if($noi[0]>0)
{
echo "Gallery: <b><a href=\"gallery.php?action=viewuserphoto&who=$w ho&sid=$sid\">$noi[0]</a></b><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>";
echo "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&wh o=$who\">$unol[0]</a>";
echo "Posts: <b>$plink/$unop[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT plusses FROM ibwf_users WHERE id='".$who."'"));
echo "Credits: <b>$nopl[0]</b><br/>";
$bank = mysql_fetch_array(mysql_query("SELECT bank FROM ibwf_users WHERE id='".$who."'"));
echo "<b>Plusses In Bank:</b> $bank[0]<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 "Battle status: Judge<br/>";
}else{
include("rstatus.php");
echo "Battle status: ".getB_status($bps[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: <b><a href=\"lists.php?action=shouts&sid=$sid&wh o=$who\">$nout[0]</a>/$nopl[0]</b><br/>";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Online Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
echo "Where: <b>$where</b><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/>";
$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 B-Wap: <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/>";
$totaltimeonline = mysql_fetch_array(mysql_query("SELECT tottimeonl FROM ibwf_users WHERE id='".$who."'"));
$num = $totaltimeonline[0]/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*60;
$secs = intval($num4);
echo "Time Online: ";
if(($days==0) and ($hours==0) and ($mins==0)){
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0) and ($hours==0)){
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0)){
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else{
echo "<b>$days</b> days, ";
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}
$noi = mysql_fetch_array(mysql_query("SELECT lastact FROM ibwf_users WHERE id='".$who."'"));
echo "$idleofline ";
$remain = time() - $noi[0];
$num = $remain/86400;
$days = intval($num);
$num2 = ($num - $days)*24;
$hours = intval($num2);
$num3 = ($num2 - $hours)*60;
$mins = intval($num3);
$num4 = ($num3 - $mins)*60;
$secs = intval($num4);
if(($days==0) and ($hours==0) and ($mins==0)){
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0) and ($hours==0)){
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else
if(($days==0)){
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}else{
echo "<b>$days</b> days, ";
echo "<b>$hours</b> hours, ";
echo "<b>$mins</b> mins, ";
echo "<b>$secs</b> seconds<br/>";
}
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Other Info</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$vws = mysql_fetch_array(mysql_query("SELECT proviews FROM ibwf_users WHERE id='".$who."'"));
$views = $vws[0]+1;
echo "Profile Views: <b>$views</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id='".$who."'"));
echo "Browser: <b>$nopl[0]</b><br/>";
//////////////////////////////////////
$noin = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND byuid='".$uid."'"));
$nout = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND unread='1'"));
echo "<b>Unread PMs:</b> $nout[0]<br/>";
echo "<b>From You:</b> $noin[0]<br/>";
//////////////////////////////////////
$nopl = mysql_fetch_array(mysql_query("SELECT email FROM ibwf_users WHERE id='".$who."'"));
echo "E-mail: <b>$nopl[0]</b><br/>";
$nopl = mysql_fetch_array(mysql_query("SELECT signature FROM ibwf_users WHERE id='".$who."'"));
echo "Signature: $sign<br/>";
if(mypro(getuid_sid($sid), $who))
{
}else{
mysql_query("UPDATE ibwf_users SET proviews='".$views."' WHERE id='".$who."'");
}
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
if(ismod(getuid_sid($sid)))
{
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">Staff Menu</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>";
$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/><br/>";
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
echo "<a href=\"index.php?action=batp&who=$who&sid= $sid\">Battle Points</a><br/>";
echo "<a href=\"mcppl.php?action=user&who=$who&sid= $sid&who=$who\">Mod CP</a>";
echo "</small></td>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
}
echo "<table border=\"0\" width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" class=\"boxed\" align=\"center\">";
echo "<tr>";
echo "<td class=\"boxedTitle\" height=\"20\">";
echo "<h1 align=\"center\" class=\"boxedTitleText\">More Menu</h1></td>";
echo "</tr>";
echo "<tr>";
echo "<td class=\"boxedContent\">";
echo "<tr>";
echo "<td class=\"IL-R\"><small>"; if($uid!=$who){
echo "<a href=\"tictactoe.php?action=invite&who=$who&am p;sid=$sid\">Invite $whonick for TicTacToe</a><br/>";
}
echo "<a href=\"inbox.php?action=sendpm&who=$who&si d=$sid\">Send PM</a><br/><br/>";
if(cansee(getuid_sid($sid), $who))
{
$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 Credits Reason: $unol[0]<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=\"userfun.php?action=profile&who=$who& ;sid=$sid\">Fun and Games</a><br/><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&si d=$sid\">Poll</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/><br/>";
echo "<a href=\"wz.php?action=terms&who=$who&sid=$s id\">Battle with $whonick!</a><br/>";
echo "<a href=\"index.php?action=prop&who=$who&sid= $sid\">$whonick's Property!</a><br/>";
echo "<a href=\"uinfo.php?who=$who&sid=$sid\">More Information</a><br/>";
echo "<a href=\"users?$whonick_noc\">$whonick's Personal Wap Site</a><br/>";
echo "</small></center></td>";
echo "<u>Send a quick message to $whonick</u>:<br/>";
echo "<form action=\"inbxproc.php?action=sendpm&who=$who&a mp;sid=$sid\" method=\"post\"><textarea id=\"inputText\" name=\"pmtext\"></textarea><br/>";
echo "<input id=\"inputButton\" type=\"submit\" value=\"Submit\"/>";
echo "</form><br/><br/>";
echo "</tr>";
echo "</table>";
echo "</div>";
echo "</div>";
}else{
echo "<p align=\"center\">";
echo "<img src=\"images/notok.gif\" alt=\"X\"/> Member does not exist<br/>";
echo "</p>";
}
echo "<p><small>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>";
echo " > ";
echo "$whonick";
echo " > ";
echo "View Profile";
echo "</small></p>";
}
?>
Comment