<?php

include('php/database.php');
include('php/security.php');
session_start();
if(logged_in())
{
	header('location:../login.php');
}
$id= $_SESSION['id'];
$results= mysqli_query($connection, "SELECT `date`, `id`, `name`, `email`, `number`, `password`, `phone`, `address`, `country`, `gender`, `image`, `vcode`, `verified`, `verify`, `balance`, `totalbalance`, `investbalance`, `profit`, `totaldeposit`, `totalwithdrawal`, `loanlimit`, `availableloan`, `ongoingloan`, `savings`, `idcard`, `idcardback`, `accountstatus`, `pina`, `pinb`, `pinc`, `pind` FROM users WHERE id ='$id'");
$retrive= mysqli_fetch_array($results);
$date = $retrive['date'];
$id = $retrive['id'];
$name = $retrive['name'];
$email = $retrive['email'];
$number = $retrive['number'];
$password = $retrive['password'];
$phone = $retrive['phone'];
$address = $retrive['address'];
$country = $retrive['country'];
$gender = $retrive['gender'];
$image = $retrive['image'];
$vcode = $retrive['vcode'];
$verified = $retrive['verified'];
$verify = $retrive['verify'];
$balance = $retrive['balance'];
$totalbalance = $retrive['totalbalance'];
$investbalance = $retrive['investbalance'];
$profit = $retrive['profit'];
$totaldeposit = $retrive['totaldeposit'];
$totalwithdrawal = $retrive['totalwithdrawal'];
$loanlimit = $retrive['loanlimit'];
$availableloan = $retrive['availableloan'];
$ongoingloan = $retrive['ongoingloan'];
$savings = $retrive['savings'];
$idcard = $retrive['idcard'];
$idcardback = $retrive['idcardback'];
$accountstatus = $retrive['accountstatus'];
$pina = $retrive['pina'];
$pinb = $retrive['pinb'];
$pinc = $retrive['pinc'];
$pind = $retrive['pind'];

if(isset($_GET['amount']))
{
	$amount = $_GET['amount'];
	$type = $_GET['type'];
}

$query = "SELECT * FROM `admin` WHERE id='1' LIMIT 1";
   $query_run = mysqli_query($connection, $query);
   
   if(mysqli_num_rows($query_run) > 0)
   {
	   while($row = mysqli_fetch_assoc($query_run))
	   {
		   
		   $paypal= $row['paypal']; 
		$cashapp= $row['cashapp']; 
$bitcoin= $row['bitcoin']; 
		$ethereum= $row['ethereum']; 
		$usdt= $row['usdt']; 
		$venmo= $row['venmo']; 
	   }
   }
if($type =='paypal'){
	 
	$walletaddress = $paypal; 
	 $coin ="paypal.png";
	 
 }else{
	 
	 if($type =='cashapp'){
	 
	$walletaddress =$cashapp; 
	 $coin ="cashapp.png"; 
	 }else{
	 
	 if($type =='bitcoin'){
	 
	$walletaddress =$bitcoin; 
	   $coin ="bitcoin.png";
	 }else{
	 
	 if($type =='ethereum'){
	 
	$walletaddress =$ethereum; 
	   $coin ="ethereum.png";
	 }else{
	 
	  if($type =='usdt'){
	 
	$walletaddress =$usdt; 
	   $coin ="usdt.png";
	 }else{
	 
	 if($type =='venmo'){
	 
	$walletaddress =$venmo; 
	   $coin ="venmo.png";
	 }else{
	 
	 header("location:topup-amount.php");
 }
 }
 }
 }
	 
 }
	 
	 
	 
 }


?>


<!DOCTYPE html>
<html lang="en">


<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- Mobile Specific Metas -->
    <meta name="viewport" content="width=device-width, initial-scale=0.7, viewport-fit=cover">
    <title>Complete Topup</title>
    <!-- Favicon and Touch Icons  -->
    <link rel="shortcut icon" href="images/logo.png" />
    <link rel="apple-touch-icon-precomposed" href="images/logo.png" />
    <!-- Font -->
    <link rel="stylesheet" href="fonts/fonts.css" />
    <!-- Icons -->
    <link rel="stylesheet" href="fonts/icons-alipay.css">
    <link rel="stylesheet" href="styles/bootstrap.css">

    <link rel="stylesheet" type="text/css" href="styles/styles.css" />
    <link rel="manifest" href="_manifest.json" data-pwa-version="set_in_manifest_and_pwa_js">
    <link rel="apple-touch-icon" sizes="192x192" href="app/icons/icon-192x192.png">

    <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="font-sans text-[12px] leading-[20px] font-medium text-textGray bg-white w-full m-auto overflow-hidden">
       <!-- preloade -->
       <div class="preload preload-container">
        <div class="preload-logo">
          <div class="spinner"></div>
        </div>
      </div>
    <!-- /preload -->
    <div class="header header-st2">
        <div class="tf-container">
            <div class="tf-statusbar d-flex justify-content-between align-items-center">
                <a href="#" class="back-btn"> <i class="icon-left"></i> </a>
                &nbsp; &nbsp; <div  class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en","detect_browser_language":true,"wrapper_selector":".gtranslate_wrapper"}</script>
<script src="https://cdn.gtranslate.net/widgets/latest/dropdown.js" defer></script>
        </div>
    </div>
    <div class="repicient-content">
       <div class="tf-container">
        <div class="box-user mt-5 text-center">
            <div class="box-avatar">
                <img src="images/method/<?php echo $coin ?>"  alt="image">
                  </div>
            <h3 class="fw_8 mt-3"><?php echo $type ?></h3>
            <input id="inp" value="<?php echo $walletaddress ?>" readonly style="border:0px;"> <a id="inpBtn" ><i class="icon-copy1"></i></a>
           
        </div>
       <div class="transfer-list mt-5">
        <div class="tf-container">
            <ul class="list-view">
                <li>
                    Transaction fee
                    <span>$0.00</span>
                </li>
               
                <li>
                    Deposit Amount 
                    <span><?php echo $amount ?></span>
                </li>
               
    
            </ul>
       
            
        </div>
    </div>
       </div>
     
    </div>
  
    <div class="tf-panel up">
        <div class="panel_overlay"></div>
          <div class="panel-box panel-up wrap-panel-clear panel-detail">
            <div class="heading">
                <a href="pending.php" class="secondary_color">Paid</a>
                <a href="index.php" class="red clear-panel">Go To Home</a>
            </div>
            <div class="bottom">
                <a class="clear-panel" href="#">Cancel</a>
            </div>
          </div>
    </div>
    <script>
  const inp = document.getElementById("inp");
   const inpBtn = document.getElementById("inpBtn");
   
   inpBtn.onclick = function(){
	   
	   inp.select();
	   
	   document.execCommand("copy");
	    };
   
   </script>
   
    <script type="text/javascript" src="javascript/jquery.min.js"></script>
    <script type="text/javascript" src="javascript/bootstrap.min.js"></script>
    <script type="text/javascript" src="javascript/main.js"></script>

</body>


</html>