Guest User

view profile 2

a guest
Dec 29th, 2011
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.96 KB | None | 0 0
  1. <style type="text/css">
  2. .max {
  3. max-width: 598px;
  4. /* Resize the image for IE6 */
  5. width: expression(this.width > 598 ? 598: true);
  6. }
  7. </style>
  8. <?php
  9.  
  10.  
  11.  
  12.  
  13. $a = mysql_fetch_assoc(mysql_query("SELECT * FROM location")) or die(mysql_error());
  14. $a1 = mysql_fetch_assoc(mysql_query("SELECT * FROM location WHERE id=2")) or die(mysql_error());
  15. $a2 = mysql_fetch_assoc(mysql_query("SELECT * FROM location WHERE id=4")) or die(mysql_error());
  16. $a4 = mysql_fetch_assoc(mysql_query("SELECT * FROM location WHERE id=7")) or die(mysql_error());
  17. $a5 = mysql_fetch_assoc(mysql_query("SELECT * FROM location WHERE id=8")) or die(mysql_error());
  18.  
  19. $b1 = mysql_fetch_assoc(mysql_query("SELECT * FROM casino_owner WHERE state=2")) or die(mysql_error());
  20. $b2 = mysql_fetch_assoc(mysql_query("SELECT * FROM casino_owner WHERE state=4")) or die(mysql_error());
  21. $b4 = mysql_fetch_assoc(mysql_query("SELECT * FROM casino_owner WHERE state=7")) or die(mysql_error());
  22. $b5 = mysql_fetch_assoc(mysql_query("SELECT * FROM casino_owner WHERE state=8")) or die(mysql_error());
  23.  
  24. $d1 = mysql_fetch_assoc(mysql_query("SELECT * FROM drugbase WHERE id=2")) or die(mysql_error());
  25. $d2 = mysql_fetch_assoc(mysql_query("SELECT * FROM drugbase WHERE id=4")) or die(mysql_error());
  26. $d4 = mysql_fetch_assoc(mysql_query("SELECT * FROM drugbase WHERE id=7")) or die(mysql_error());
  27. $d5 = mysql_fetch_assoc(mysql_query("SELECT * FROM drugbase WHERE id=8")) or die(mysql_error());
  28.  
  29.  
  30.  
  31.  
  32. // Some vars:
  33. function color($power){
  34. switch($power){
  35. case 2:
  36. $color = 'yellow';
  37. break;
  38. case 3:
  39. $color = 'green';
  40. break;
  41. case 4:
  42. $color = 'red';
  43. break;
  44. default:
  45. $color = 'white';
  46. break;
  47. }
  48. return $color;
  49. }
  50.  
  51.  
  52. $query1 = mysql_query("SELECT * FROM login WHERE name = '".$student_profilename."'");
  53. $fetch1 = mysql_fetch_assoc($query1);
  54.  
  55. $query2 = mysql_query("SELECT * FROM gangs WHERE name='".$fetch1['gang']."'");
  56. $fetch2 = mysql_fetch_assoc($query2);
  57.  
  58. $query3 = mysql_query("SELECT oc_time FROM times WHERE studenttime='".$student_profilename."'");
  59. $fetch3 = mysql_fetch_assoc($query3);
  60.  
  61. if($fetch1['gang'] == ''){
  62. $show = false;
  63. $line = 'No Crew.';
  64. }else{
  65. $show = true;
  66. $line = '<a href="home.php?pageid=901&gangname='.$fetch2['name'].'">'.$fetch2['name'].'</a>';
  67. $class = $fetch2['color'];
  68. }
  69.  
  70.  
  71. $online_fetch = mysql_num_rows(mysql_query("SELECT * FROM login WHERE hide='0' AND name='".$fetch1['name']."' AND DATE_SUB(NOW(),INTERVAL 30 MINUTE) <= lastactive"));
  72. if($online_fetch == 0){
  73. $pstatus = "(<span class='ofline'>Offline</span>)";
  74. }else if($fetch1['status'] == '1') {
  75. $pstatus = "(<span class='online'>Online</span>)";
  76. }else if($fetch1['status'] == '2') {
  77. $pstatus = "(<span class='busy'>Busy</span>)";
  78. }else if($fetch1['status'] == '3') {
  79. $pstatus = "(<span class='friend_online'>Away</span>)";
  80. }
  81.  
  82. $profile_money = $fetch1['money']+$fetch1['bank'];
  83. if(($profile_money >= -99999999999990 ) and ( $profile_money <= 100000)){ $profile_money = "Flat Broke";}
  84. if(($profile_money > 100000 ) and ( $profile_money <= 350000)){ $profile_money = "Very Poor";}
  85. if(($profile_money > 350000 ) and ( $profile_money <= 1000000)){ $profile_money = "Poor";}
  86. if(($profile_money > 1000000 ) and ( $profile_money <= 2500000)){ $profile_money = "Wealthy";}
  87. if(($profile_money > 2500000 ) and ( $profile_money <= 6000000)){ $profile_money = "Rich";}
  88. if(($profile_money > 6000000 ) and ( $profile_money <= 13500000)){ $profile_money = "Very Rich";}
  89. if(($profile_money > 13500000 ) and ( $profile_money <= 25000000)){ $profile_money = "Extremely Rich";}
  90. if(($profile_money > 25000000 ) and ( $profile_money <= 50000000)){ $profile_money = "Disgustingly Rich";}
  91. if(($profile_money > 50000000 ) and ( $profile_money <= 250000000)){ $profile_money = "Notoriously Rich";}
  92. if($profile_money > 250000000 ){ $profile_money = "Mystically Rich";}
  93.  
  94. $student_profilerank = $fetch1['rank'];
  95. $student_power = $fetch1['power'];
  96. if($student_profilerank == "1"){$studentprofile_rank = $rank_1; }
  97. if($student_profilerank == "2"){$studentprofile_rank = $rank_2; }
  98. if($student_profilerank == "3"){$studentprofile_rank = $rank_3; }
  99. if($student_profilerank == "4"){$studentprofile_rank = $rank_4; }
  100. if($student_profilerank == "5"){$studentprofile_rank = $rank_5; }
  101. if($student_profilerank == "6"){$studentprofile_rank = $rank_6; }
  102. if($student_profilerank == "7"){$studentprofile_rank = $rank_7; }
  103. if($student_profilerank == "8"){$studentprofile_rank = $rank_8; }
  104. if($student_profilerank == "9"){$studentprofile_rank = $rank_9; }
  105. if($student_profilerank == "10"){$studentprofile_rank = $rank_10; }
  106. if($student_profilerank == "11"){$studentprofile_rank = $rank_11; }
  107. if($student_profilerank == "12"){$studentprofile_rank = $rank_12; }
  108. if($student_profilerank == "13"){$studentprofile_rank = $rank_13; }
  109. if($student_profilerank == "14"){$studentprofile_rank = $rank_14; }
  110. if($student_profilerank == "15"){$studentprofile_rank = $rank_15; }
  111. if($student_profilerank == "16"){$studentprofile_rank = $rank_16; }
  112. if($student_profilerank == "17"){$studentprofile_rank = $rank_17; }
  113. if($student_profilerank == "18"){$studentprofile_rank = $rank_18; }
  114. if($student_profilerank == "19"){$studentprofile_rank = $rank_19; }
  115. if($student_profilerank == "20"){$studentprofile_rank = $rank_20; }
  116. if($student_power == "3"){$studentprofile_rank = "Moderator";}
  117. if($student_power == "4"){$studentprofile_rank = "Administrator";}
  118.  
  119. $student_profilesitestate = $fetch1['sitestate'];
  120. if($student_profilesitestate == "9"){$student_state = "Alive";}
  121. if($student_profilesitestate == "0"){$student_state = "Alive";}
  122. if($student_profilesitestate == "2"){$student_state = "Dead";}
  123. if($student_profilesitestate == "1"){$student_state = "Banned";}
  124.  
  125. $psql = "SELECT * FROM gangs WHERE name='".mysql_real_escape_string($gang)."'";
  126. $query = mysql_query($psql) or die(mysql_error());
  127. $row = mysql_fetch_object($query);
  128. $under_boss = htmlspecialchars($row->under_boss);
  129.  
  130. $check = mysql_num_rows(mysql_query("SELECT leader FROM gangs WHERE leader = '".$fetch1['name']."'"));
  131. if ($check == 0) {
  132. $pcrew = 'Crew:';
  133. }
  134. else {
  135. $pcrew = 'Boss of:';
  136. }
  137.  
  138. if($fetch1['name'] == 'PleaseEnterANameHere'){
  139. $msg = '<a href="home.php?pageid=40">';
  140. }else{
  141. $msg = '<a href="home.php?pageid=90&studentname='.$fetch1['name'].'">';
  142. }
  143. echo '
  144. <table width="600" border="1" align="center" cellspacing="1" class="table">
  145. <tr>
  146. <td colspan="3" align="center" bgcolor="#133337" class="style2"><label>'.$fetch1['name'].'\'s Profile</label></td>
  147. </tr>
  148. ';
  149. if($show == true){
  150. echo '
  151. <tr>
  152. <td colspan="3" align="center" class="'.$class.'">'.$line.'</td>
  153. </tr>
  154. ';
  155. }
  156.  
  157. if((time() <= $fetch3['oc_time']) OR ($fetch1['ocs'] == 0)){
  158. $oc_state = '<table width="90%" style="border: 1px solid #000000; margin-bottom: 2px;" cellpadding="0" cellspacing="0"><tr><td bgcolor="darkred" align="center"><font size="3"><b>OC</b></font></td></tr></table>';
  159. }else{
  160. $oc_state = '<table width="90%" style="border: 1px solid #000000; margin-bottom: 2px;" cellpadding="0" cellspacing="0"><tr><td bgcolor="darkgreen" align="center"><font size="3"><b>OC</b></font></td></tr></table>';
  161. }
  162.  
  163. if($fetch1['power'] == 2){
  164. $help_state = '<table width="90%" style="border: 1px solid #000000; margin-bottom: 2px;" cellpadding="0" cellspacing="0"><tr><td bgcolor="goldenrod" align="center"><font size="3"><font color="black"><b>HDO</b></font></font></td></tr></table>';
  165. }
  166.  
  167. echo '
  168. <tr>
  169. <td width="20%" align="left" class="info_row">&nbsp;<b>Name:</b></td>
  170. <td width="68%" align="left" class="style1">&nbsp'.$msg.'<font color='.color($fetch1['power']).'>'.$fetch1['name'].'</font></a></td>
  171. <td width="12%" rowspan="7" valign="top" align="center" class="style1" style="padding-top: 2px; padding-bottom: 2px;">'.$oc_state.''.$help_state.'</td>
  172. </tr>
  173.  
  174.  
  175. <tr>
  176. <td align="left" class="info_row">&nbsp;<b>';
  177.  
  178.  
  179. if($fetch2['under_boss'] == $fetch1['name']){echo "Underboss of: ";
  180. }elseif($fetch1['RR'] == "Yes"){echo "Recruiter of: ";
  181. }else{
  182.  
  183. echo''.$pcrew.'';
  184.  
  185. }
  186. echo'</b></td>
  187. <td align="left" class="style1">&nbsp;'.$line.'</td>
  188. </tr>
  189. <tr>
  190. <td align="left" class="info_row">&nbsp;<b>Status:</b></td>
  191. <td align="left" class="style1">&nbsp;'.$student_state.' '.$pstatus.'</td>
  192. </tr>
  193. <tr>
  194. <td align="left" class="info_row">&nbsp;<b>Rank:</b></td>
  195. <td align="left" class="style1">&nbsp;'.$studentprofile_rank.'</td>
  196. </tr>
  197. <tr>
  198. <td align="left" class="info_row">&nbsp;<b>Wealth:</b></td>
  199. <td align="left" class="style1">';
  200.  
  201. if($fetch1['priv_d'] == 0){
  202.  
  203. if($fetch1['priv'] == 1){
  204. echo '&nbsp;Private Wealth';
  205. }else{
  206. echo '&nbsp;'.$profile_money.'';
  207. }
  208.  
  209. }else{
  210. echo '&nbsp;'.$profile_money.'';
  211. }
  212. echo '
  213. </td>
  214. </tr>
  215. <tr>
  216. <td align="left" class="info_row">&nbsp;<b>Messages:</b></td>
  217. <td align="left" class="style1">&nbsp;'.number_format($fetch1['messages']).' sent';
  218. if($fetch1['mrec'] == 0){echo'
  219. , '.number_format($fetch1['mesrec']).' received
  220. ';}
  221. echo'</td>
  222. </tr>
  223. <!--
  224. <tr>
  225. <td align="left" class="info_row">&nbsp;<b>Properties:</b></td>
  226. <td align="left" class="style1">&nbsp;';
  227.  
  228. if($a1['bullet_factory'] == $student_profilename){ echo 'California Bullet Factory'; $middle1 = "1"; }
  229. if($a2['bullet_factory'] == $student_profilename){ echo 'New York Bullet Factory'; $middle2 = "1"; }
  230. if($a4['bullet_factory'] == $student_profilename){ echo 'Pennsylvania Bullet Factory'; $middle4 = "1"; }
  231. if($a5['bullet_factory'] == $student_profilename){ echo 'Illinois Bullet Factory'; $middle5 = "1"; }
  232.  
  233. if($d1['owner'] == $fetch1['id']){ echo 'California Drug Factory'; $middled1 = "1"; }
  234. if($d2['owner'] == $fetch1['id']){ echo 'New York Drug Factory'; $middled2 = "1"; }
  235. if($d4['owner'] == $fetch1['id']){ echo 'Pennsylvania Drug Factory'; $middled4 = "1"; }
  236. if($d5['owner'] == $fetch1['id']){ echo 'Illinois Drug Factory'; $middled5 = "1"; }
  237.  
  238. $final = $middle1 + $middle2 + $middle4 + $middle5 + $middled1 + $middled2 + $middled4 + $middled5;
  239.  
  240. echo $final;
  241.  
  242. echo'</td>
  243. </tr>
  244. -->
  245.  
  246.  
  247.  
  248. </table><br>
  249. <table width="600" border="1" align="center" cellspacing="1" class="table">
  250. <tr>
  251. <td colspan="3" align="center" bgcolor="#133337" class="style2"><label>Quote</label></td>
  252. </tr>
  253. <tr>
  254. <td colspan="3" align="center" class="info_row"><b>&nbsp;</b></td>
  255. </tr>
  256. <tr>
  257. <td colspan="3" align="left" bordercolor="#000000" bgcolor="#414141" class="style">
  258. <div style="min-height:100px; max-width:600px;">
  259. '.smilie(nl2br(bbcodes(htmlentities($fetch1['quote'])))).'
  260. ';
  261. $sql2 = "SELECT name,m1,m2,id FROM login WHERE name='".$name."'";
  262. $query2 = mysql_query($sql2) or die(mysql_error());
  263. $myself = mysql_fetch_assoc($query2);
  264. if(($fetch1['name'] == 'Leoluca') && ($myself['m2'] > 24) && ($myself['m1'] == 2)){
  265. mysql_query("UPDATE login SET m2='50' WHERE id='".$myself['id']."'");
  266. echo 'Benedetto is planning to kill you....';
  267. }
  268. if($fetch1['name'] == 'Administrator'){
  269. echo '<center>
  270. </center>';
  271. }
  272. echo'
  273. </div></td>
  274. </tr>
  275. <tr>
  276. <td colspan="3" align="center" class="info_row">&nbsp;</td>
  277. </tr>
  278. </table>
  279. ';
  280. ?>
Advertisement
Add Comment
Please, Sign In to add comment