Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. <?php
  2. $con = mysql_connect("localhost","root","password");
  3. if (!$con)
  4. {
  5. die('Could not connect: ' . mysql_error());
  6. header('Location: /ucp/error.php');
  7. }
  8.  
  9. $sql = "SELECT validated FROM users WHERE username='".($_SESSION['username'])."'";
  10. mysql_select_db("bluecard");
  11. mysql_query($sql,$con);
  12.  
  13. if ($sql<'1')
  14. {
  15. mysql_close($con);
  16. header('Location: /ucp/cid_check_firstdep.php');
  17. }
  18. else
  19. {
  20. mysql_close($con);
  21. header('Location: /ucp/cid_check_depwid.php');
  22. }
  23. ?>
  24.  
  25. if ($sql=='0')
  26.  
  27. <?php
  28. if(! get_magic_quotes_gpc() )
  29. {
  30. $withdraw = addslashes ($_POST['withdraw']);
  31.  
  32. }
  33. else
  34. {
  35. $withdraw = $_POST['withdraw'];
  36.  
  37. }
  38.  
  39. $con = mysql_connect("localhost","root","password");
  40. if (!$con)
  41. {
  42. die('Could not connect: ' . mysql_error());
  43. header('Location: /ucp/error.php');
  44. }
  45.  
  46. $__sql = "SELECT cardvalue FROM users WHERE username='".($_SESSION['username'])."'";
  47. mysql_select_db("bluecard");
  48. mysql_query($__sql,$con);
  49. if ($__sql<'5000000')
  50. {
  51. header('Location: /ucp/includes/withdraw_fail.php');
  52. mysql_close($con);
  53. }
  54. else
  55. {
  56.  
  57. $_sql = "UPDATE users SET Bank=Bank + '$deposit' WHERE Username='".($_SESSION['username'])."'";
  58. mysql_select_db("server");
  59. mysql_query($_sql,$con);
  60. $sql = "UPDATE users SET cardvalue=cardvalue +- '$deposit', thismonth_withdraw=thismonth_withdraw + '$deposit', lastwithdraw = Now() WHERE username='".($_SESSION['username'])."'";
  61. mysql_select_db("bluecard");
  62. mysql_query($sql,$con);
  63. mysql_close($con);
  64. header('Location: /ucp/includes/withdraw_done.php');
  65. }
  66. ?>
  67.  
  68. $result = mysql_query($sql,$con);
  69.  
  70. if ($result && mysql_num_rows($result) == 1) {
  71.  
  72. <?php
  73. $con = mysql_connect("localhost","root","password");
  74. $select_db = mysql_select_db("bluecard");
  75. if (!$con)
  76. {
  77. die('Could not connect: ' . mysql_error());
  78. header('Location: /ucp/error.php');
  79. }
  80.  
  81. $sql = "SELECT validated FROM users WHERE username='".($_SESSION['username'])."'";
  82. $query = mysql_query($sql,$con);
  83. $return_data = array();
  84. while($rows = mysql_fetch_array($query)){
  85. $return_data[]=$rows;
  86. }
  87.  
  88. if (count($return_data)<=1)
  89. {
  90. mysql_close($con);
  91. header('Location: /ucp/cid_check_firstdep.php');
  92. }
  93. else
  94. {
  95. mysql_close($con);
  96. header('Location: /ucp/cid_check_depwid.php');
  97. }
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement