daily pastebin goal
78%
SHARE
TWEET

Untitled

a guest Jul 21st, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php include("scripts/login.php");
  2. $tag=$_GET['tag'];
  3. echo "
  4. <html>
  5. <head>
  6. <title>sJ - Update User $tag</title>
  7. </head>
  8. <body>
  9. ";
  10. $loc="localhost";
  11. $username="sj";
  12. $password="this is my password, not yours!";
  13. $database="sj_xbl";
  14. $link = mysql_connect($loc,$username,$password);
  15. mysql_connect($loc,$username,$password);
  16.  
  17. @mysql_select_db($database) or die( "Unable to select database");
  18. $query="SELECT * FROM members WHERE tag='$tag'";
  19. $result=mysql_query($query);
  20. $num=mysql_numrows($result);
  21. mysql_close();
  22.  
  23. $i=0;
  24. while ($i < $num) {
  25. $tag=mysql_result($result,$i,"tag");
  26. $email=mysql_result($result,$i,"email");
  27. $points=mysql_result($result,$i,"points");
  28. $referral=mysql_result($result,$i,"referral");
  29. $age=mysql_result($result,$i,"age");
  30. $rank=mysql_result($result,$i,"rank");
  31. $active=mysql_result($result,$i,"active");
  32. $avatar=mysql_result($result,$i,"avatar");
  33.  
  34. if ($active == 0) {
  35. $status = '<font color="yellow">Pending</font>';
  36. }
  37. elseif ($active == 1) {
  38. $status = '<font color="green">Active</font>';
  39. }
  40. elseif ($active == 2) {
  41. $status = '<font color="red">Suspended</font>';
  42. }
  43.  
  44. if ($rank == 'img src="images/ranks/GEN.png\"') {
  45. $gen ==  'selected="selected"'
  46. }
  47.  
  48. elseif ($rank == 'img src=\"images/ranks/LTG.png\"') {
  49. $ltg ==  'selected="selected"'
  50. }
  51. elseif ($rank == 'img src=\"images/ranks/MG.png\"') {
  52. $mg ==  'selected="selected"'
  53. }
  54. elseif ($rank == 'img src=\"images/ranks/BG.png\"') {
  55. $bg ==  'selected="selected"'
  56. }
  57. elseif ($rank == 'img src=\"images/ranks/COL.png\"') {
  58. $col ==  'selected="selected"'
  59. }
  60. elseif ($rank == 'img src=\"images/ranks/MAJ.png\"') {
  61. $maj ==  'selected="selected"'
  62. }
  63. elseif ($rank == 'img src=\"images/ranks/1LT.png\"') {
  64. $1lt ==  'selected="selected"'
  65. }
  66. elseif ($rank == 'img src=\"images/ranks/SFC.png\"') {
  67. $sfc ==  'selected="selected"'
  68. }
  69. elseif ($rank == 'img src=\"images/ranks/SGT.png\"') {
  70. $sgt ==  'selected="selected"'
  71. }
  72. elseif ($rank == 'img src=\"images/ranks/PFC.png\"') {
  73. $pfc ==  'selected="selected"'
  74. }
  75.  
  76.  
  77.  
  78. echo "
  79. <form action='scripts/update.insert.php' method='post'>
  80. <input type='hidden' value='$tag' name='ud_tag'>
  81. GamerTag: $tag<br>
  82. Email: <input type='text' name='ud_email' value='$email'><br>
  83. Points: <input type='text' name='ud_points' value='$points'><br>
  84. Referral: <input type='text' name='ud_referral' value='$referral'><br>
  85. Age: <input type='text' name='ud_age' value='$age'><br>
  86. Current Rank: <$rank /> <br>
  87. New Rank: <select name='ud_rank'>
  88. <option value='img src=\"images/ranks/GEN.png\" alt=\"General\" ' $gen >General</option>
  89.  <option value='img src=\"images/ranks/LTG.png\" alt=\"Leiutenant General\" ' $ltg >Leiutenant General</option>
  90.  <option value='img src=\"images/ranks/MG.png\" alt=\"Major General\" ' $mg >Major General</option>
  91.  <option value='img src=\"images/ranks/BG.png\" alt=\"Brigadier General\" ' $bg >Brigadier General</option>
  92.  <option value='img src=\"images/ranks/COL.png\" alt=\"Colonel\" ' $col >Colonel</option>
  93.  <option value='img src=\"images/ranks/MAJ.png\" alt=\"Major\" ' $maj >Major</option>
  94.  <option value='img src=\"images/ranks/CPT.png\" alt=\"Captain\" ' $cpt >Captain</option>
  95.  <option value='img src=\"images/ranks/2LT.png\" alt=\"Lieutenant\" ' $1lt >Lieutenant</option>
  96.  <option value='img src=\"images/ranks/MSG.png\" alt=\"Master Sergeant\" ' $msg >Master Sergeant</option>
  97.  <option value='img src=\"images/ranks/SFC.png\" alt=\"Sergeant First Class\" ' $sfc >Sergeant First Class</option>
  98.  <option value='img src=\"images/ranks/SGT.png\" alt=\"Sergeant\" ' $sgt >Sergeant</option>
  99.  <option value='img src=\"images/ranks/PFC.png\" alt=\"Private\" ' $pfc >Private</option>
  100. </select><br />
  101. Current activity: $status<br />
  102. New activity: <select name=\"ud_active\">
  103. <option value=\"2\">Suspended</option>
  104. <option value=\"1\">Active</option>
  105. <option value=\"0\">Pending</option>
  106. </select><br />
  107. Avatar: <input type='text' name='ud_avatar' value='$avatar'><br>
  108. <input type=\"Submit\" value=\"Update\">
  109. </form>
  110. <br />
  111. <font color=\"red\">Important:</font>
  112. <p>Activity values</p>
  113. <ul>
  114. <li>0 - Pending</li>
  115. <li>1 - Active</li>
  116. <li>2 - Suspended</li>
  117. </ul>
  118. ";
  119.  
  120. ++$i;
  121. }
  122. ?>
  123. </body>
  124. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top