View file chat spall script/web/uinfo.htm

File size: 12.41Kb
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
//header('Content-type: application/vnd.wap.xhtml+xml'); 
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include("config.php");
include("core.php");
$bcon = connectdb();
$sitename = mysql_fetch_array(mysql_query("SELECT value FROM ibwf_settings WHERE name='sitename'"));
$sitename = $sitename[0];

if (!$bcon)
{
    echo "<head>";
    echo "<title>Error!!!</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/white_medium.css\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    echo "<img src=\"../images/notok.gif\" alt=\"!\"/><br/>";
    echo "<b><strong>Error! Cannot Connect To Database...</strong></b><br/><br/>";
    echo "This error happens usually when backing up the database, please be patient...";
    echo "</p>";
    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/white_medium.css\">";
      echo "</head>";
      echo "<body>";
      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 "</body>";
      echo "</html>";
      exit();
    }
if(isbanned($uid))
    {
      echo "<head>";
      echo "<title>Error!!!</title>";
      echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
      echo "</head>";
      echo "<body>";
      echo "<p align=\"center\">";
      echo "<img src=\"../images/notok.gif\" alt=\"x\"/><br/>";
      echo "<b>You are Banned</b><br/><br/>";
      $banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
	$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
      $remain = $banto[0]- time();
      $rmsg = gettimemsg($remain);
      echo "<b>Time Left: </b>$rmsg<br/>";
      $nick = getnick_uid($banto[2]);
	echo "<b>By: </b>$nick<br/>";
	echo "<b>Reason: </b>$banto[1]";
      //echo "<a href=\"index.php\">Login</a>";
      echo "</p>";
      echo "</body>";
      echo "</html>";
      exit();
    }
if($action=="")
{
  addonline($uid,"Viewing User Profile","");
  echo "<head>";
  echo "<title>$sitename</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";
  $whonick = getnick_uid($who);
  echo "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp;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 "&#187;$sitename age: <b>$rwage days</b><br/>";
  echo "&#187;$sitename 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 "&#187;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 "&#187;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 "&#187;Have signed: <b>$gbsg[0] Guestbooks</b><br/>";
  $brts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_brate WHERE uid='".$who."'"));
  echo "&#187;Have rated: <b>$brts[0] Blogs</b><br/>";
  $pvts = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_presults WHERE uid='".$who."'"));
  echo "&#187;Have 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 "&#187;Starred PMs: <b>$strd[0]</b><br/><br/>";
  echo "<a href=\"uinfo.php?action=fsts&amp;sid=$sid&amp;who=$who\">&#187;Posts In forums</a><br/>";
  echo "<a href=\"uinfo.php?action=cinf&amp;sid=$sid&amp;who=$who\">&#187;Contact Info</a><br/>";
  echo "<a href=\"uinfo.php?action=look&amp;sid=$sid&amp;who=$who\">&#187;Looking</a><br/>";
  echo "<a href=\"uinfo.php?action=pers&amp;sid=$sid&amp;who=$who\">&#187;Personality</a><br/>";
  echo "<a href=\"uinfo.php?action=rwidc&amp;sid=$sid&amp;who=$who\">&#187;$sitename ID Card</a><br/>";
  echo "</p>";
  echo "<p align=\"center\">";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
  echo "</body>";
}

else if($action=="rwidc")
{
    addonline(getuid_sid($sid),"$sitename ID","");
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p align=\"center\">";
    echo "<b>$sitename! ID card</b><br/>";
    echo "<img src=\"../rwidc.php?id=$who\" alt=\"Id Card\"/><br/><br/>";
    echo "The source for this ID card is http://$sitename/rwidc.php?id=$who<br/><br/>";
    echo "To look at your card Go to CPanel&gt; $sitename ID Card.";
    
    echo "</p>";
    echo "<p align=\"center\">";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p>";
    echo "</body>";
}

else if($action=="fsts")
{
    addonline($uid,"Viewing User Profile","");
    $whonick = getnick_uid($who);
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p>";
    $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");
    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 "<br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">$whonick</a><br/>";
    echo "<b>9 </b><a accesskey=\"9\" href=\"uinfo.php?sid=$sid&amp;who=$who\">Extended Info</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}

else if($action=="cinf")
{
    addonline($uid,"Viewing User Profile","");
    $whonick = getnick_uid($who);
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p>";
    //duh
    $inf1 = mysql_fetch_array(mysql_query("SELECT country, city, street, phoneno, realname, budsonly FROM ibwf_xinfo WHERE uid='".$who."'"));
    
    $inf2 = mysql_fetch_array(mysql_query("SELECT 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 "Phone No.: $phn<br/>";
    echo "E-Mail: $inf2[0]<br/>";
    //tuh
    echo "<br/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">$whonick</a><br/>";
    echo "<b>9 </b><a accesskey=\"9\" href=\"uinfo.php?sid=$sid&amp;who=$who\">Extended Info</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}

else if($action=="look")
{
    addonline($uid,"Viewing User Profile","");
    $whonick = getnick_uid($who);
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p>";
    //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/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">$whonick</a><br/>";
    echo "<b>9 </b><a accesskey=\"9\" href=\"uinfo.php?sid=$sid&amp;who=$who\">Extended Info</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}

else if($action=="pers")
{
    addonline($uid,"Viewing User Profile","");
    $whonick = getnick_uid($who);
    echo "<head>";
    echo "<title>$sitename</title>";
    echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
    echo "</head>";
    echo "<body>";
    echo "<p>";
    //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/><b>8 </b><a accesskey=\"8\" href=\"index.php?action=viewuser&amp;sid=$sid&amp;who=$who\">$whonick</a><br/>";
    echo "<b>9 </b><a accesskey=\"9\" href=\"uinfo.php?sid=$sid&amp;who=$who\">Extended Info</a><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
    echo "</p>";
    echo "</body>";
}

else{
  echo "<head>";
  echo "<title>$sitename</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
  echo "</head>";
  echo "<body>";
  echo "<p align=\"center\">";
  echo "I don't know how did you get into here, but there's nothing to show<br/><br/>";
  echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
  echo "</p></body>";
}
?>
</html>