Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class bbcode {
- var $engine="";
- function bbcode()
- {
- require "bbcode_engine.php";
- $this->engine= new bbcode_engine;
- $this->engine->cust_tag("/</","<");
- $this->engine->cust_tag("/>/",">");
- //Since \n and <br> screw up preg, convert them out.
- $this->engine->cust_tag("/\n/","&nbrlb;");
- $this->engine->simple_bbcode_tag("b");
- $this->engine->simple_bbcode_tag("i");
- $this->engine->simple_bbcode_tag("u");
- $this->engine->simple_bbcode_tag("s");
- $this->engine->simple_bbcode_tag("sub");
- $this->engine->simple_bbcode_tag("sup");
- $this->engine->simple_bbcode_tag("big");
- $this->engine->simple_bbcode_tag("small");
- $this->engine->adv_bbcode_tag("list","ul");
- $this->engine->adv_bbcode_tag("olist","ol");
- $this->engine->adv_bbcode_tag("item","li");
- $this->engine->adv_option_tag("font","font","family");
- $this->engine->adv_option_tag("size","font","size");
- $this->engine->adv_option_tag("url","a","href");
- $this->engine->adv_option_tag("color","font","color");
- $this->engine->adv_option_tag("style","span","style");
- $this->engine->simp_option_notext("img","src");
- $this->engine->simp_bbcode_att("img","src");
- $this->engine->cust_tag("/\(c\)/","©");
- $this->engine->cust_tag("/\(tm\)/","™");
- $this->engine->cust_tag("/\(r\)/","®");
- $this->engine->adv_option_tag_em("email","a","href");
- $this->engine->adv_bbcode_att_em("email","a","href");
- $this->engine->cust_tag("/\[left\](.+?)\[\/left\]/","<div align='left'>\\1</div>");
- $this->engine->cust_tag("/\[center\](.+?)\[\/center\]/","<div align='center'>\\1</div>");
- $this->engine->cust_tag("/\[right\](.+?)\[\/right\]/","<div align='right'>\\1</div>");
- $this->engine->cust_tag("/\[quote=(.+?)\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE(\\1)</div><div class='quotemain'>\\2</div>");
- $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE</div><div class='quotemain'>\\1</div>");
- $this->engine->cust_tag("/\[code\](.+?)\[\/code\]/","<div class='codetop'>CODE</div><div class='codemain'><code>\\1</code></div>");
- $this->engine->cust_tag("/\[codebox\](.+?)\[\/codebox\]/","<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\1</div>");
- $this->engine->cust_tag("/&nbrlb;/","<br />\n");
- }
- function bbcode_parse($html)
- {
- return $this->engine->parse_bbcode($html);
- }
- }
- session_start();
- include "globals.php";
- $T="<img src='T.gif'>";
- $bbc = new bbcode;
- //Star Of Marriage Script:
- $v = mysql_query("SELECT * FROM users WHERE userid='{$r['married']}'") or die(mysql_error());
- $vc = mysql_fetch_assoc($v);
- if($r['married'] == 0) { $married = "<b>Married:</b> [<font color=red>No One</font>]<br>"; }
- else if($r['married'] > 0) { $married = "<b>Married:</b> [<a href=?u={$vc['userid']}>{$vc['username']}</a>]<br>"; }
- //End Of Marriage Script
- $_GET['u'] = abs((int) $_GET['u']);
- if(!$_GET['u'])
- {
- print "Invalid use of file";
- }
- else
- {
- $q=$db->query("SELECT u.*,us.*,c.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}");
- if($db->num_rows($q) == 0)
- {
- print "Sorry, we could not find a user with that ID, check your source.";
- }
- else
- {
- $r=$db->fetch_row($q);
- if ( !$r['married'] )
- {
- $marital="<font color='red'>No</font>";
- }
- else
- {
- $k=mysql_query("SELECT username FROM users WHERE userid={$r['married']}", $c);
- $marital="<a href='viewuser.php?u={$r['married']}' style='color:green;'>".mysql_result($k,0,0)."</a> ";
- }
- $mpq=$db->query("SELECT * FROM houses h LEFT JOIN ownedhouses oh ON oh.ohHOUSE=h.hID WHERE oh.ohID={$r['house']}");
- $mp=$db->fetch_row($mpq);
- $qz = $db->query("SELECT * FROM houses WHERE hWILL=100");
- $qf = $db->fetch_row($qz);
- if($r['house'] == 0)
- {
- $mp = $qf;
- }
- $r['hPIC'] = $mp['hPIC'];
- $r['hNAME'] = $mp['hNAME'];
- if($r['user_level'] == 1)
- {
- $userl="Member";
- }
- else if($r['user_level'] == 2)
- {
- $userl="Owner";
- }
- else if ($r['user_level'] == 3)
- {
- $userl="Admin";
- }
- else if ($r['user_level'] ==4)
- {
- $userl="IRC Op";
- }
- else if($r['user_level'] == 5)
- {
- $userl="Assistant";
- }
- else if($r['user_level'] == 0)
- {
- $userl="NPC";
- }
- else {$userl="Beats me";
- }
- $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never";
- $sup=date('F j, Y g:i:s a',$r['signedup']);
- $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ'];
- $d="";
- $vip="";
- $staff="";
- if($r['laston'] > 0)
- {
- $la=time()-$r['laston'];
- $unit="seconds";
- if($la >= 60)
- {
- $la=(int) ($la/60);
- $unit="minutes";
- }
- if($la >= 60)
- {
- $la=(int) ($la/60);
- $unit="hours";
- if($la >= 24)
- {
- $la=(int) ($la/24);
- $unit="days";
- }
- }
- $str="$la $unit ago";
- }
- else
- {
- $str="--";
- }
- if($r['last_login'] > 0)
- {
- $ll=time()-$r['last_login'];
- $unit2="seconds";
- if($ll >= 60)
- {
- $ll=(int) ($ll/60);
- $unit2="minutes";
- }
- if($ll >= 60)
- {
- $ll=(int) ($ll/60);
- $unit2="hours";
- if($ll >= 24)
- {
- $ll=(int) ($ll/24);
- $unit2="days";
- }
- }
- $str2="$ll $unit2 ago";
- }
- else
- {
- $str2="--";
- }
- if($r['donatordays']) { $r['username'] = "<font color=green>{$r['username']}</font>";$d="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; }
- if($r['vipdays'])
- {
- $vip="<img src='vip.gif' alt='VIP Days: {$r['vipdays']} Days Left' title='VIP Days: {$r['vipdays']} Days Left' />";
- }
- if($r['user_level'] > 1)
- {
- $staff="<img src='staff.gif' alt='Staff' title='Staff' />";
- }
- if($r['donatordays']) { $d="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; }
- if($r['laston'] >= time()-15*60) { $on="<font color=green><b>Online</b></font>"; } else { $on="<font color=red><b>Offline</b></font>"; }
- print "<h3>Profile for {$r['username']}</h3>
- <table width=100% cellspacing=0 class='table'><tr style='background:red'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr>
- <tr><td>Name: {$r['username']} [{$r['userid']}] $d $vip ";
- if($r['user_level']==2)
- {
- echo "<img src='staff.gif' alt='$userl' title='$userl'>";
- }
- if($r['user_level']==3)
- {
- echo "<img src='staff.gif' alt='$userl' title='$userl'>";
- }
- if($r['user_level']==5)
- {
- echo "<img src='staff.gif' alt='$userl' title='$userl'>";
- }
- echo "
- <br />
- User Level: $userl<br />
- Duties: {$r['duties']}<br />
- Gender: {$r['gender']}<br />
- Race: {$r['race']}<br />
- Signed Up: $sup<br />
- Last Active: $lon<br />
- Last Action: $str<br />
- Last Login: $str2<br />
- Online: $on<br />";
- print "Days Old: {$r['daysold']}<br />
- Location: {$r['cityname']} <br>
- Married: $marital</td><td>
- Property: {$r['hNAME']}<br />
- Busts: {$r['busts']}<br />
- Referals: ";
- $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}");
- print $db->num_rows($rr);
- $rs=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}");
- $fr=mysql_num_rows($rs);
- print "<br />
- Friends: {$fr}<br />
- Enemies: {$r['enemy_count']}<br />
- Rating: {$r['rating']} <a href=rating.php?change=up&ID={$r['userid']}><img src='positive.gif' height='10' width='10' border='0'></a><a href=rating.php?change=down&ID={$r['userid']}><img src='negative.gif' height='10' width='10' border='0'></a><br />";
- print "</td> <td>";
- if(@getimagesize($r['display_pic']))
- {
- echo "<img src='".$r['display_pic']."' alt='Display Pic' height='150' width='150' />";
- }
- else
- {
- echo "No display Pic";
- }
- $sh=($ir['user_level'] >1) ? "Staff Info" : " ";
- print "</td></tr>
- <tr style='background:red'><th width=40%>Physical Info</th><th>Links</th><th>Contact Info</th></tr>
- <tr><td>
- Level: {$r['level']}<br />
- Rank: ".get_gamerank($r['level'],$r['hPRICE'],$r)."<br />
- Health: {$r['hp']}/{$r['maxhp']}<br />
- Gang: ";
- if($r['gang'])
- {
- print "<a href='gangs.php?action=view&ID={$r['gang']}'>{$r['gangNAME']}</a>";
- }
- else
- {
- print "N/A";
- }
- if($r['fedjail'])
- {
- print "<br /><b><font color=red>In federal jail for {$r['fed_days']} day(s).<br />
- {$r['fed_reason']}</font>";
- }
- if($r['hospital'])
- {
- print "<br /><b><font color=red>In hospital for {$r['hospital']} minutes.<br />{$r['hospreason']}</font></b>";
- }
- if($r['jail'])
- {
- print "<br /><b><font color=red>In jail for {$r['jail']} minutes.<br />{$r['jail_reason']}</font></b>";
- }
- print "</td><td>[<a href='mailbox.php?action=compose&ID={$r['userid']}'>Send Mail</a>]<br /><br />
- [<a href='slap.php?ID={$r['userid']}'>Slap User</a>]<br /><br />
- [<a href='epitaph.php?u={$r['userid']}'>View Epitaph</a>]<br /><br />
- [<a href='sendcash.php?ID={$r['userid']}'>Send Cash</a>]<br /><br />";
- if($set['sendcrys_on'])
- {
- print "[<a href='sendcrys.php?ID={$r['userid']}'>Send Crystals</a>]<br /><br />";
- }
- if($set['sendbank_on'])
- {
- if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0)
- {
- print "[<a href='sendbank.php?ID={$r['userid']}'>Bank Xfer</a>]<br /><br />";
- }
- if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0)
- {
- print "[<a href='sendcyber.php?ID={$r['userid']}'>CyberBank Xfer</a>]<br /><br />";
- }
- }
- $dosq3 = sprintf("SELECT * FROM tradingcardsbattle WHERE uID = {$r['userid']}"); $dosq3 = mysql_query($dosq3);
- $user = mysql_fetch_array($dosq3);
- print "
- [<a href='attack.php?ID={$r['userid']}'>Attack</a>]<br /><br />
- [<a href='tradingcard.php?p=battle&ID={$user['ID']}'>Attack Cards</a>]<br /><br />
- [<a href='rentaspy.php?ID={$r['userid']}'>Rent A Spy</a>]<br /><br />
- [<a href='contactlist.php?action=add&ID={$r['userid']}'>Add Contact</a>]";
- if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)
- {
- print "<br /><br />
- [<a href='jailuser.php?userid={$r['userid']}'>Jail</a>]<br /><br />
- [<a href='mailban.php?userid={$r['userid']}'>MailBan</a>]";
- }
- if($ir['donatordays'] > 0)
- {
- print "<br /><br />
- [<a href='friendslist.php?action=add&ID={$r['userid']}'>Add Friends</a>]<br /><br />
- [<a href='blacklist.php?action=add&ID={$r['userid']}'>Add Enemies</a>]<br />";
- }
- print "</td><td>";
- $pd=$db->query("SELECT * FROM pdetails WHERE userid={$r['userid']}");
- $p=$db->fetch_row($pd);
- echo "";
- if($p['personal']=='ON') { echo "First Name: {$p['first']}<br /> Last Name: {$p['last']}<br /> Age: {$p['age']}<br /> Msn: {$p['msn']}<br /> Aim: {$p['aim']}<br /> Aol: {$p['aol']}<br /> Yahoo: {$p['yahoo']}<br />"; } else { echo "This person does not want to share their personal details.";
- }
- print "</td></tr></table>";
- }
- }
- function checkblank($in)
- {
- if(!$in) { return "N/A"; }
- return $in;
- }
- echo "<table width=100% cellspacing=0 class='table'><tr style='background:red'><th> {$r['username']}'s Proflie Signature</th></tr><tr><td>";
- if($r['sig'])
- {
- $r['sig']=$bbc->bbcode_parse($r['sig']);
- print "<tr><td colspan=5>{$r['sig']}</td>";
- }
- else
- {
- print "<tr><td colspan=5><center> {$r['username']} has no profile signature.<br></td>";
- }
- echo "</table>";
- echo "<table width=100% cellspacing=0 class='table'><tr style='background:red'><th>$sh</th></tr>
- <tr><td>";
- if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)
- {
- $r['lastiph']=@gethostbyaddr($r['lastip']);
- $r['lastiph']=checkblank($r['lastiph']);
- $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']);
- $r['lastip_loginh']=checkblank($r['lastip_loginh']);
- $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']);
- $r['lastip_signuph']=checkblank($r['lastip_signuph']);
- print "<br /><center><table width='50%' border='0' cellspacing='1' class='table'>
- <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr>
- <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr>
- <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr>
- <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>";
- if($ir['user_level'] > '1')
- {
- echo "<br /><br /><center><b>Email:</b> {$r['email']}<br /><br />
- <center><form action='staff_punit.php?action=ipsub' method='post'>
- IP: <input type='text' name='ip' value={$r['lastip']} /><br />
- <input type='submit' value='Search' /></form>";
- }
- print"<form action='staff_logs.php?action=maillogs2' method='post'><b>View Mail Logs: For this user</b><br /><br /><input type='hidden' name='userid' value='{$r['userid']}'><input type='submit' value='Mail' /></form>";
- print"<a href='viewlog.php?id=".$r['userid']."'>View User Activity Logs</a><br />";
- print "<br /><center><form action='staffnotes.php' method='post'>
- Staff Notes: <br />
- <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea>
- <br /><input type='hidden' name='ID' value='{$_GET['u']}' />
- <input type='submit' value='Change' /></form><br />";
- print "User Notepad: <br />
- <textarea rows=7 cols=40>{$r['user_notepad']}</textarea>
- <br /><input type='hidden' name='ID' value='{$_GET['u']}' />";
- }
- echo "</td></table>";
- $h->endpage();
- ?>
Add Comment
Please, Sign In to add comment