<?php
include("core.php");
include("config.php");
header("Content-type: text/html; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
$addy = "wapirate.net";
$bcon = connectdb();
if (!$bcon)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "<img src=\"images/exit.gif\" alt=\"*\"/><br/>";
echo "ERROR! cannot connect to database<br/><br/>";
echo "This error usually happens when backing up the database, please be patient, The site will be up any minute<br/><br/>";
echo "<b>THANK YOU VERY MUCH</b>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
$brws = explode(" ",$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."'"));
if((islogged($sid)==false)||($uid==0))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "You are not logged in<br/>";
echo "Or Your session has been expired<br/><br/>";
echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/red_medium.css\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
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_penalties WHERE uid='".$uid."' AND penalty='1'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "Time to finish your penalty: $rmsg<br/><br/>";
//echo "<a href=\"index.php\">Login</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
echo "</html>";
exit();
}
if($action=="")
{
addonline($uid,"Viewing User Profile","");
echo "<head>";
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
$whonick = getnick_uid($who);
echo "<div><br/>$whonick's Profile<br/></div>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick's Basic Profile</a>";
echo "</p>";
echo "<p>";
$regd = mysql_fetch_array(mysql_query("SELECT regdate FROM ibwf_users WHERE id='".$who."'"));
$sage = time()-$regd[0];
$rwage = ceil($sage/(24*60*60));
echo "»wapirate Age: <b>$rwage days</b><br/>";
echo "»wapirate Rating(0-5): <b>".geturate($who)."</b><br/>";
$pstn = mysql_fetch_array(mysql_query("SELECT posts FROM ibwf_users WHERE id='".$who."'"));
$ppd = $pstn[0]/$rwage;
echo "»Posts Info: <b>$pstn[0]</b> posts, with average of <b>$ppd</b> posts/day<br/>";
$chpn = mysql_fetch_array(mysql_query("SELECT chmsgs FROM ibwf_users WHERE id='".$who."'"));
$cpd = $chpn[0]/$rwage;
echo "»Chating Info: <b>$chpn[0]</b> chat messages, with average of <b>$cpd</b> chat messages/day<br/>";
$gbsg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_gbook WHERE gbsigner='".$who."'"));
echo "»Has signed: <b>$gbsg[0] Guestbooks</b><br/>";
$brts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$who."'"));
echo "»Has rated: <b>$brts[0] Blogs</b><br/>";
$pvts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$who."'"));
echo "»Has voted in <b>$pvts[0] Polls</b><br/>";
$strd = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_private WHERE touid='".$who."' AND starred='1'"));
echo "»Starred PMs: <b>$strd[0]</b><br/><br/>";
echo "<a href=\"uinfo.php?action=fsts&sid=$sid&who=$who\">»Posts In Forums</a><br/>";
echo "<a href=\"uinfo.php?action=cinf&sid=$sid&who=$who\">»Contact Info</a><br/>";
echo "<a href=\"uinfo.php?action=look&sid=$sid&who=$who\">»Looks</a><br/>";
echo "<a href=\"uinfo.php?action=pers&sid=$sid&who=$who\">»Personality</a><br/>";
echo "<a href=\"uinfo.php?action=rwidc&sid=$sid&who=$who\">»wapirate ID Card</a><br/>";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else if($action=="rwidc")
{
addonline(getuid_sid($sid),"wapirate ID","");
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Wapirate ID Card<br/></div>";
echo "<p align=\"center\">";
echo "<img src=\"rwidc.php?id=$who\" alt=\"wapirate id\"/><br/><br/>";
echo "The source for this ID card is http://wapirate.net/rwidc.php?id=$who<br/><br/>";
echo "To look at your card Go to CPanel> wapirate ID Card.";
echo "</p>";
echo "<p align=\"center\">";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else if($action=="fsts")
{
addonline($uid,"Viewing User Profile","");
$whonick = getnick_uid($who);
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>$whonick's Profile<br/></div>";
echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Posts in Forums<br/><br/>";
$pst = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_posts WHERE uid='".$who."'"));
$frms = mysql_query("SELECT id, name FROM ibwf_forums WHERE clubid='0' ORDER BY name");
echo "</p>";
echo "<p align=\"center\">";
while ($frm=mysql_fetch_array($frms))
{
$nops = mysql_fetch_array(mysql_query("SELECT COUNT(*) as nops, a.uid FROM ibwf_posts a INNER JOIN ibwf_topics b ON a.tid = b.id WHERE a.uid='".$who."' AND b.fid='".$frm[0]."' GROUP BY a.uid "));
$prc = ceil(($nops[0]/$pst[0])*100);
echo htmlspecialchars($frm[1]).": <b>$nops[0] ($prc%)</b><br/>";
}
echo "</p>";
echo "<p>";
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Posts in Forums";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else if($action=="cinf")
{
addonline($uid,"Viewing User Profile","");
$whonick = getnick_uid($who);
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>$whonick's Profile<br/></div>";
echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Contact Info<br/><br/>";
//duh
$inf1 = mysql_fetch_array(mysql_query("SELECT country, city, street, phoneno, realname, budsonly, sitedscr FROM ibwf_xinfo WHERE uid='".$who."'"));
$inf2 = mysql_fetch_array(mysql_query("SELECT site, email FROM ibwf_users WHERE id='".$who."'"));
if($inf1[5]=='1')
{
if(($uid==$who)||(arebuds($uid, $who)))
{
$rln = $inf1[4];
$str = $inf1[2];
$phn = $inf1[3];
}else{
$rln = "Can't view";
$str = "Can't view";
$phn = "Can't view";
}
}else{
$rln = $inf1[4];
$str = $inf1[2];
$phn = $inf1[3];
}
echo "Real Name: $rln<br/>";
echo "Country: $inf1[0]<br/>";
echo "City: $inf1[1]<br/>";
echo "Street: $str<br/>";
//echo "Site: <a href=\"$inf2[0]\">$inf2[0]</a><br/>";
//echo "Site Description: $inf1[6]<br/>";
echo "Phone No.: $phn<br/>";
echo "E-Mail: $inf2[1]<br/>";
//tuh
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Contact Info";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else if($action=="look")
{
addonline($uid,"Viewing User Profile","");
$whonick = getnick_uid($who);
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>$whonick's Profile<br/></div>";
echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Looks<br/><br/>";
//duh
$inf1 = mysql_fetch_array(mysql_query("SELECT sexpre, height, weight, racerel, hairtype, eyescolor FROM ibwf_xinfo WHERE uid='".$who."'"));
$inf2 = mysql_fetch_array(mysql_query("SELECT sex FROM ibwf_users WHERE id='".$who."'"));
if($inf1[0]=="M" && $inf2[0]=="F")
{
$sxp = "Straight";
}else if($inf1[0]=="F" && $inf2[0]=="M")
{
$sxp = "Straight";
}else if($inf1[0]=="M" && $inf2[0]=="M"){
$sxp = "Gay";
}else if($inf1[0]=="F" && $inf2[0]=="F"){
$sxp = "Lesbian";
}else if($inf1[0]=="B"){
$sxp = "Bisexual";
}else{
$sxp = "Inapplicable";
}
if($inf2[0]=="M")
{
$usx = "Male";
}else if($inf2[0]=="F")
{
$usx = "Female";
}else{
$usx = "Shemale";
}
echo "Sex: $usx<br/>";
echo "Orientation: $sxp<br/>";
echo "Height: $inf1[1]<br/>";
echo "Weight: $inf1[2]<br/>";
echo "Ethnic Origin: $inf1[3]<br/>";
echo "Hair: $inf1[4]<br/>";
echo "Eyes: $inf1[5]<br/>";
//tuh
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Looks";
echo "</small></p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else if($action=="pers")
{
addonline($uid,"Viewing User Profile","");
$whonick = getnick_uid($who);
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>$whonick's Profile<br/></div>";
echo "<p>";
echo "<a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Personality<br/><br/>";
//duh
$inf1 = mysql_fetch_array(mysql_query("SELECT likes, deslikes, habitsb, habitsg, favsport, favmusic, moretext FROM ibwf_xinfo WHERE uid='".$who."'"));
echo "<b>Likes:</b> ".parsemsg($inf1[0])."<br/>";
echo "<b>Dislikes:</b> ".parsemsg($inf1[1])."<br/>";
echo "<b>Bad Habits:</b> ".parsemsg($inf1[2])."<br/>";
echo "<b>Good Habits:</b> ".parsemsg($inf1[3])."<br/>";
echo "<b>Sport:</b> ".parsemsg($inf1[4])."<br/>";
echo "<b>Music:</b> ".parsemsg($inf1[5])."<br/>";
echo "<b>More Text:</b> ".parsemsg($inf1[6])."<br/>";
//tuh
echo "<br/><a href=\"index.php?action=main&sid=$sid\">Home</a>>";
echo "<a href=\"index.php?action=viewuser&sid=$sid&who=$who\">$whonick</a><br/>";
echo "><a href=\"uinfo.php?sid=$sid&who=$who\">Extended Info</a>>Personality";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
else{
echo "<title>wapirate</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<div><br/>Doh!<br/></div>";
echo "<p align=\"center\">";
echo "I don't know how you got in here, but there's nothing to show<br/><br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "<div>$addy</div>";
echo "</body>";
exit();
}
echo "</html>";
?>