Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $con = mysql_connect("localhost","root","password");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- header('Location: /ucp/error.php');
- }
- $sql = "SELECT validated FROM users WHERE username='".($_SESSION['username'])."'";
- mysql_select_db("bluecard");
- mysql_query($sql,$con);
- if ($sql<'1')
- {
- mysql_close($con);
- header('Location: /ucp/cid_check_firstdep.php');
- }
- else
- {
- mysql_close($con);
- header('Location: /ucp/cid_check_depwid.php');
- }
- ?>
- if ($sql=='0')
- <?php
- if(! get_magic_quotes_gpc() )
- {
- $withdraw = addslashes ($_POST['withdraw']);
- }
- else
- {
- $withdraw = $_POST['withdraw'];
- }
- $con = mysql_connect("localhost","root","password");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- header('Location: /ucp/error.php');
- }
- $__sql = "SELECT cardvalue FROM users WHERE username='".($_SESSION['username'])."'";
- mysql_select_db("bluecard");
- mysql_query($__sql,$con);
- if ($__sql<'5000000')
- {
- header('Location: /ucp/includes/withdraw_fail.php');
- mysql_close($con);
- }
- else
- {
- $_sql = "UPDATE users SET Bank=Bank + '$deposit' WHERE Username='".($_SESSION['username'])."'";
- mysql_select_db("server");
- mysql_query($_sql,$con);
- $sql = "UPDATE users SET cardvalue=cardvalue +- '$deposit', thismonth_withdraw=thismonth_withdraw + '$deposit', lastwithdraw = Now() WHERE username='".($_SESSION['username'])."'";
- mysql_select_db("bluecard");
- mysql_query($sql,$con);
- mysql_close($con);
- header('Location: /ucp/includes/withdraw_done.php');
- }
- ?>
- $result = mysql_query($sql,$con);
- if ($result && mysql_num_rows($result) == 1) {
- <?php
- $con = mysql_connect("localhost","root","password");
- $select_db = mysql_select_db("bluecard");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- header('Location: /ucp/error.php');
- }
- $sql = "SELECT validated FROM users WHERE username='".($_SESSION['username'])."'";
- $query = mysql_query($sql,$con);
- $return_data = array();
- while($rows = mysql_fetch_array($query)){
- $return_data[]=$rows;
- }
- if (count($return_data)<=1)
- {
- mysql_close($con);
- header('Location: /ucp/cid_check_firstdep.php');
- }
- else
- {
- mysql_close($con);
- header('Location: /ucp/cid_check_depwid.php');
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement