Guest User

Untitled

a guest
Jun 24th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.31 KB | None | 0 0
  1. <?php
  2. class bbcode {
  3. var $engine="";
  4. function bbcode()
  5. {
  6. require "bbcode_engine.php";
  7. $this->engine= new bbcode_engine;
  8. $this->engine->cust_tag("/</","<");
  9. $this->engine->cust_tag("/>/",">");
  10. //Since \n and <br> screw up preg, convert them out.
  11. $this->engine->cust_tag("/\n/","&nbrlb;");
  12. $this->engine->simple_bbcode_tag("b");
  13. $this->engine->simple_bbcode_tag("i");
  14. $this->engine->simple_bbcode_tag("u");
  15. $this->engine->simple_bbcode_tag("s");
  16. $this->engine->simple_bbcode_tag("sub");
  17. $this->engine->simple_bbcode_tag("sup");
  18. $this->engine->simple_bbcode_tag("big");
  19. $this->engine->simple_bbcode_tag("small");
  20. $this->engine->adv_bbcode_tag("list","ul");
  21. $this->engine->adv_bbcode_tag("olist","ol");
  22. $this->engine->adv_bbcode_tag("item","li");
  23. $this->engine->adv_option_tag("font","font","family");
  24. $this->engine->adv_option_tag("size","font","size");
  25. $this->engine->adv_option_tag("url","a","href");
  26. $this->engine->adv_option_tag("color","font","color");
  27. $this->engine->adv_option_tag("style","span","style");
  28. $this->engine->simp_option_notext("img","src");
  29. $this->engine->simp_bbcode_att("img","src");
  30. $this->engine->cust_tag("/\(c\)/","&copy;");
  31. $this->engine->cust_tag("/\(tm\)/","&#153;");
  32. $this->engine->cust_tag("/\(r\)/","&reg;");
  33. $this->engine->adv_option_tag_em("email","a","href");
  34. $this->engine->adv_bbcode_att_em("email","a","href");
  35. $this->engine->cust_tag("/\[left\](.+?)\[\/left\]/","<div align='left'>\\1</div>");
  36. $this->engine->cust_tag("/\[center\](.+?)\[\/center\]/","<div align='center'>\\1</div>");
  37. $this->engine->cust_tag("/\[right\](.+?)\[\/right\]/","<div align='right'>\\1</div>");
  38. $this->engine->cust_tag("/\[quote=(.+?)\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE(\\1)</div><div class='quotemain'>\\2</div>");
  39. $this->engine->cust_tag("/\[quote\](.+?)\[\/quote\]/","<div class='quotetop'>QUOTE</div><div class='quotemain'>\\1</div>");
  40. $this->engine->cust_tag("/\[code\](.+?)\[\/code\]/","<div class='codetop'>CODE</div><div class='codemain'><code>\\1</code></div>");
  41. $this->engine->cust_tag("/\[codebox\](.+?)\[\/codebox\]/","<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>\\1</div>");
  42. $this->engine->cust_tag("/&nbrlb;/","<br />\n");
  43. }
  44. function bbcode_parse($html)
  45. {
  46. return $this->engine->parse_bbcode($html);
  47. }
  48. }
  49. session_start();
  50. include "globals.php";
  51. $T="<img src='T.gif'>";
  52. $bbc = new bbcode;
  53. //Star Of Marriage Script:
  54. $v = mysql_query("SELECT * FROM users WHERE userid='{$r['married']}'") or die(mysql_error());
  55. $vc = mysql_fetch_assoc($v);
  56. if($r['married'] == 0) { $married = "<b>Married:</b> [<font color=red>No One</font>]<br>"; }
  57. else if($r['married'] > 0) { $married = "<b>Married:</b> [<a href=?u={$vc['userid']}>{$vc['username']}</a>]<br>"; }
  58. //End Of Marriage Script
  59. $_GET['u'] = abs((int) $_GET['u']);
  60. if(!$_GET['u'])
  61. {
  62. print "Invalid use of file";
  63. }
  64. else
  65. {
  66. $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']}");
  67.  
  68. if($db->num_rows($q) == 0)
  69. {
  70. print "Sorry, we could not find a user with that ID, check your source.";
  71. }
  72. else
  73. {
  74. $r=$db->fetch_row($q);
  75. if ( !$r['married'] )
  76. {
  77. $marital="<font color='red'>No</font>";
  78. }
  79. else
  80. {
  81. $k=mysql_query("SELECT username FROM users WHERE userid={$r['married']}", $c);
  82. $marital="<a href='viewuser.php?u={$r['married']}' style='color:green;'>".mysql_result($k,0,0)."</a> ";
  83. }
  84. $mpq=$db->query("SELECT * FROM houses h LEFT JOIN ownedhouses oh ON oh.ohHOUSE=h.hID WHERE oh.ohID={$r['house']}");
  85. $mp=$db->fetch_row($mpq);
  86. $qz = $db->query("SELECT * FROM houses WHERE hWILL=100");
  87. $qf = $db->fetch_row($qz);
  88. if($r['house'] == 0)
  89. {
  90. $mp = $qf;
  91. }
  92. $r['hPIC'] = $mp['hPIC'];
  93. $r['hNAME'] = $mp['hNAME'];
  94. if($r['user_level'] == 1)
  95. {
  96. $userl="Member";
  97. }
  98. else if($r['user_level'] == 2)
  99. {
  100. $userl="Owner";
  101. }
  102. else if ($r['user_level'] == 3)
  103. {
  104. $userl="Admin";
  105. }
  106. else if ($r['user_level'] ==4)
  107. {
  108. $userl="IRC Op";
  109. }
  110. else if($r['user_level'] == 5)
  111. {
  112. $userl="Assistant";
  113. }
  114. else if($r['user_level'] == 0)
  115. {
  116. $userl="NPC";
  117. }
  118. else {$userl="Beats me";
  119. }
  120.  
  121. $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never";
  122. $sup=date('F j, Y g:i:s a',$r['signedup']);
  123. $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ'];
  124. $d="";
  125. $vip="";
  126. $staff="";
  127. if($r['laston'] > 0)
  128. {
  129. $la=time()-$r['laston'];
  130. $unit="seconds";
  131. if($la >= 60)
  132. {
  133. $la=(int) ($la/60);
  134. $unit="minutes";
  135. }
  136. if($la >= 60)
  137. {
  138. $la=(int) ($la/60);
  139. $unit="hours";
  140. if($la >= 24)
  141. {
  142. $la=(int) ($la/24);
  143. $unit="days";
  144. }
  145. }
  146. $str="$la $unit ago";
  147. }
  148. else
  149. {
  150. $str="--";
  151. }
  152. if($r['last_login'] > 0)
  153. {
  154. $ll=time()-$r['last_login'];
  155. $unit2="seconds";
  156. if($ll >= 60)
  157. {
  158. $ll=(int) ($ll/60);
  159. $unit2="minutes";
  160. }
  161. if($ll >= 60)
  162. {
  163. $ll=(int) ($ll/60);
  164. $unit2="hours";
  165. if($ll >= 24)
  166. {
  167. $ll=(int) ($ll/24);
  168. $unit2="days";
  169. }
  170. }
  171. $str2="$ll $unit2 ago";
  172. }
  173. else
  174. {
  175. $str2="--";
  176. }
  177.  
  178. 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' />"; }
  179. if($r['vipdays'])
  180. {
  181. $vip="<img src='vip.gif' alt='VIP Days: {$r['vipdays']} Days Left' title='VIP Days: {$r['vipdays']} Days Left' />";
  182. }
  183. if($r['user_level'] > 1)
  184. {
  185. $staff="<img src='staff.gif' alt='Staff' title='Staff' />";
  186. }
  187.  
  188. if($r['donatordays']) { $d="<img src='donator.gif' alt='Donator: {$r['donatordays']} Days Left' title='Donator: {$r['donatordays']} Days Left' />"; }
  189. if($r['laston'] >= time()-15*60) { $on="<font color=green><b>Online</b></font>"; } else { $on="<font color=red><b>Offline</b></font>"; }
  190. print "<h3>Profile for {$r['username']}</h3>
  191. <table width=100% cellspacing=0 class='table'><tr style='background:red'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr>
  192. <tr><td>Name: {$r['username']} [{$r['userid']}] $d $vip ";
  193. if($r['user_level']==2)
  194. {
  195. echo "<img src='staff.gif' alt='$userl' title='$userl'>";
  196. }
  197. if($r['user_level']==3)
  198. {
  199. echo "<img src='staff.gif' alt='$userl' title='$userl'>";
  200. }
  201. if($r['user_level']==5)
  202. {
  203. echo "<img src='staff.gif' alt='$userl' title='$userl'>";
  204. }
  205.  
  206.  
  207. echo "
  208.  
  209.  
  210. <br />
  211. User Level: $userl<br />
  212. Duties: {$r['duties']}<br />
  213. Gender: {$r['gender']}<br />
  214. Race: {$r['race']}<br />
  215. Signed Up: $sup<br />
  216. Last Active: $lon<br />
  217. Last Action: $str<br />
  218. Last Login: $str2<br />
  219. Online: $on<br />";
  220. print "Days Old: {$r['daysold']}<br />
  221. Location: {$r['cityname']} <br>
  222. Married: $marital</td><td>
  223. Property: {$r['hNAME']}<br />
  224. Busts: {$r['busts']}<br />
  225.  
  226. Referals: ";
  227. $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}");
  228. print $db->num_rows($rr);
  229. $rs=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}");
  230.  
  231. $fr=mysql_num_rows($rs);
  232. print "<br />
  233. Friends: {$fr}<br />
  234. Enemies: {$r['enemy_count']}<br />
  235. 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 />";
  236.  
  237. print "</td> <td>";
  238. if(@getimagesize($r['display_pic']))
  239. {
  240. echo "<img src='".$r['display_pic']."' alt='Display Pic' height='150' width='150' />";
  241. }
  242. else
  243. {
  244. echo "No display Pic";
  245. }
  246.  
  247.  
  248.  
  249. $sh=($ir['user_level'] >1) ? "Staff Info" : "&nbsp;";
  250. print "</td></tr>
  251. <tr style='background:red'><th width=40%>Physical Info</th><th>Links</th><th>Contact Info</th></tr>
  252. <tr><td>
  253.  
  254.  
  255. Level: {$r['level']}<br />
  256. Rank: ".get_gamerank($r['level'],$r['hPRICE'],$r)."<br />
  257. Health: {$r['hp']}/{$r['maxhp']}<br />
  258. Gang: ";
  259. if($r['gang'])
  260. {
  261. print "<a href='gangs.php?action=view&ID={$r['gang']}'>{$r['gangNAME']}</a>";
  262. }
  263. else
  264. {
  265. print "N/A";
  266. }
  267.  
  268. if($r['fedjail'])
  269. {
  270. print "<br /><b><font color=red>In federal jail for {$r['fed_days']} day(s).<br />
  271. {$r['fed_reason']}</font>";
  272. }
  273. if($r['hospital'])
  274. {
  275. print "<br /><b><font color=red>In hospital for {$r['hospital']} minutes.<br />{$r['hospreason']}</font></b>";
  276. }
  277. if($r['jail'])
  278. {
  279. print "<br /><b><font color=red>In jail for {$r['jail']} minutes.<br />{$r['jail_reason']}</font></b>";
  280. }
  281.  
  282. print "</td><td>[<a href='mailbox.php?action=compose&ID={$r['userid']}'>Send Mail</a>]<br /><br />
  283. [<a href='slap.php?ID={$r['userid']}'>Slap User</a>]<br /><br />
  284. [<a href='epitaph.php?u={$r['userid']}'>View Epitaph</a>]<br /><br />
  285. [<a href='sendcash.php?ID={$r['userid']}'>Send Cash</a>]<br /><br />";
  286. if($set['sendcrys_on'])
  287. {
  288. print "[<a href='sendcrys.php?ID={$r['userid']}'>Send Crystals</a>]<br /><br />";
  289. }
  290. if($set['sendbank_on'])
  291. {
  292. if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0)
  293. {
  294. print "[<a href='sendbank.php?ID={$r['userid']}'>Bank Xfer</a>]<br /><br />";
  295. }
  296. if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0)
  297. {
  298. print "[<a href='sendcyber.php?ID={$r['userid']}'>CyberBank Xfer</a>]<br /><br />";
  299. }
  300. }
  301. $dosq3 = sprintf("SELECT * FROM tradingcardsbattle WHERE uID = {$r['userid']}"); $dosq3 = mysql_query($dosq3);
  302. $user = mysql_fetch_array($dosq3);
  303. print "
  304. [<a href='attack.php?ID={$r['userid']}'>Attack</a>]<br /><br />
  305. [<a href='tradingcard.php?p=battle&ID={$user['ID']}'>Attack Cards</a>]<br /><br />
  306. [<a href='rentaspy.php?ID={$r['userid']}'>Rent A Spy</a>]<br /><br />
  307. [<a href='contactlist.php?action=add&ID={$r['userid']}'>Add Contact</a>]";
  308. if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)
  309. {
  310. print "<br /><br />
  311. [<a href='jailuser.php?userid={$r['userid']}'>Jail</a>]<br /><br />
  312. [<a href='mailban.php?userid={$r['userid']}'>MailBan</a>]";
  313. }
  314. if($ir['donatordays'] > 0)
  315. {
  316. print "<br /><br />
  317. [<a href='friendslist.php?action=add&ID={$r['userid']}'>Add Friends</a>]<br /><br />
  318. [<a href='blacklist.php?action=add&ID={$r['userid']}'>Add Enemies</a>]<br />";
  319. }
  320.  
  321. print "</td><td>";
  322. $pd=$db->query("SELECT * FROM pdetails WHERE userid={$r['userid']}");
  323. $p=$db->fetch_row($pd);
  324. echo "";
  325. 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.";
  326. }
  327. print "</td></tr></table>";
  328. }
  329. }
  330. function checkblank($in)
  331. {
  332. if(!$in) { return "N/A"; }
  333. return $in;
  334. }
  335. echo "<table width=100% cellspacing=0 class='table'><tr style='background:red'><th> {$r['username']}'s Proflie Signature</th></tr><tr><td>";
  336.  
  337. if($r['sig'])
  338. {
  339. $r['sig']=$bbc->bbcode_parse($r['sig']);
  340. print "<tr><td colspan=5>{$r['sig']}</td>";
  341. }
  342. else
  343. {
  344. print "<tr><td colspan=5><center> {$r['username']} has no profile signature.<br></td>";
  345. }
  346. echo "</table>";
  347.  
  348.  
  349.  
  350. echo "<table width=100% cellspacing=0 class='table'><tr style='background:red'><th>$sh</th></tr>
  351. <tr><td>";
  352. if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5)
  353. {
  354. $r['lastiph']=@gethostbyaddr($r['lastip']);
  355. $r['lastiph']=checkblank($r['lastiph']);
  356. $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']);
  357. $r['lastip_loginh']=checkblank($r['lastip_loginh']);
  358. $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']);
  359. $r['lastip_signuph']=checkblank($r['lastip_signuph']);
  360. print "<br /><center><table width='50%' border='0' cellspacing='1' class='table'>
  361. <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr>
  362. <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr>
  363. <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr>
  364. <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>";
  365.  
  366. if($ir['user_level'] > '1')
  367. {
  368. echo "<br /><br /><center><b>Email:</b> {$r['email']}<br /><br />
  369. <center><form action='staff_punit.php?action=ipsub' method='post'>
  370. IP: <input type='text' name='ip' value={$r['lastip']} /><br />
  371. <input type='submit' value='Search' /></form>";
  372. }
  373. 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>";
  374. print"<a href='viewlog.php?id=".$r['userid']."'>View User Activity Logs</a><br />";
  375.  
  376. print "<br /><center><form action='staffnotes.php' method='post'>
  377. Staff Notes: <br />
  378. <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea>
  379. <br /><input type='hidden' name='ID' value='{$_GET['u']}' />
  380. <input type='submit' value='Change' /></form><br />";
  381. print "User Notepad: <br />
  382. <textarea rows=7 cols=40>{$r['user_notepad']}</textarea>
  383. <br /><input type='hidden' name='ID' value='{$_GET['u']}' />";
  384.  
  385.  
  386. }
  387.  
  388. echo "</td></table>";
  389.  
  390.  
  391. $h->endpage();
  392. ?>
Add Comment
Please, Sign In to add comment