real_escape_string($_SESSION['email']); $sql1 = "SELECT * FROM users WHERE email = '$email' LIMIT 1"; $result = mysqli_query($link, $sql1); if(mysqli_num_rows($result) > 0){ $row1 = mysqli_fetch_assoc($result); $ubalance = round($row1['balance'],2); $fname = $row1['fname']; $lname = $row1['lname']; $currency = $row1['currency']; $ppix = $row1['ppix']; $referred = $row1['referred']; }else{ header("location: ../login.php"); } }else{ header('location: ../login.php'); die(); } if(isset($_POST['deposit'])){ $amount = $link->real_escape_string($_POST["amount"]); $method = $link->real_escape_string($_POST["method"]); $btcPrice = ""; if($method == "BitCoin"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/BTC/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "Ethereum"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/ETH/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "BitCoin Cash"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/BCH/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "LiteCoin"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/LTC/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "Ripple"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/XRP/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "Tether USDT"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/USDT/USD'); $btcPrice = $btcUsd["lprice"]; } if($method == "DogeCoin"){ function getPrice($url){ $decode = file_get_contents($url); return json_decode($decode, true); } $btcUsd = getPrice('https://cex.io/api/last_price/DOGE/USD'); $btcPrice = $btcUsd["lprice"]; } if($btcPrice != ""){ $btcPrice = number_format(($amount / $btcPrice),8); } if($method=="BitCoin"){ $uswall = $bw; }elseif($method=="LiteCoin"){ $uswall = $lw; }elseif($method=="Ethereum"){ $uswall = $ew; }elseif($method=="Tether USDT"){ $uswall = $usdtw; }elseif($method=="DogeCoin"){ $uswall = $dgw; }elseif($method=="Ripple"){ $uswall = $xrpw; }elseif($method=="BitCoin Cash"){ $uswall = $btw; }elseif($method=="Neo"){ $uswall = $neow; }elseif($method=="Ada"){ $uswall = $adaw; } }elseif(isset($_POST['save'])){ if (empty($_POST["amount"])) { $msg= "Amount is required"; } else { $amount = $link->real_escape_string($_POST["amount"]); } if (empty($_POST["method"])) { $msg= "Method is required"; } else { $cointype = $link->real_escape_string($_POST["method"]); } if(empty($msg)){ $tnx = uniqid('tnx'); $sql = "INSERT INTO btc (usd,cointype,email,status,type,referred) VALUES ('$amount','$cointype','$email','Pending','Deposit','$referred')"; if (mysqli_query($link, $sql)) { include_once "../PHPMailer/PHPMailer.php"; require_once '../PHPMailer/Exception.php'; $mail= new PHPMailer(); $mail->setFrom($emaila); $mail->FromName = $name; $mail->addAddress($email); $mail->Subject = "Deposit Alert!"; $mail->isHTML(true); $mail->Body = '
'.$name.'

Deposit Alert on '.$name.'

Dear '.$lname.',

Your deposit of '.$amount.' USD via '.$cointype.' is currently under review, your balance will be credited once your deposit is confirmed.

If you have any questions or suggestions, please email us - we will be happy to assist you!

©️ Copyrights 2022. All rights reserved.

' ; if($mail->send()){ } echo ""; } else { } } }else{ header("location: deposit.php" ); } include "header.php"; ?>

Proceed to make payment

This wallet address will expire in 00:00

Note: Payment should be made only to the wallet address above, click on the 'Done' button after payments has been made.

Click here to continue to Xtrade