<?php

ob_start();
session_start();

if($_SESSION['frontuserid'] == '')
{
    
    header("location:login.php");
}

include("config.php");
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<html>
    
   <?php include("head.php"); ?>
<!--<title>Mantrimall</title>-->
<link rel="shortcut icon" type="image/png" href="assets/img/image/mylogo.png"/>


</html><link rel="stylesheet" href="assets/css/style.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="description" content="Bitter Mobile Template">
<meta name="keywords" content="bootstrap, mobile template, bootstrap 4, mobile, html, responsive" />
<style>
h3{ font-weight:normal; font-size:20px;}
.btn .error{margin-top: 55px;}
.btn-group {
box-shadow: none;
}
#alert h4{font-size: 1rem;}
#alert p{font-size: 13px; margin-top:20px;}
#alert .modal-content{border-radius:3px}
#alert .modal-dialog{padding:20px; margin-top:130px;}
#confirm .modal-dialog{padding:20px; margin-top:130px;}
.inner-addon select.error {
    font-size: 16px;
    position: unset;
}
.payment_box{
    width: 100%;
    padding-left: 4%;
    box-sizing: border-box;
}

.van-radio {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.payment_box .van-radio {
    height: 48px;
    line-height: 48px;
    font-size: 16px;
}
.van-radio__icon {
    -webkit-box-flex: 0;
    -webkit-flex: none;
    flex: none;
    height: 1em;
    font-size: 20px;
    line-height: 1em;
    cursor: pointer;
}
.payment_box .van-radio__icon--checked .van-icon {
    color: #333;
    background-color: transparent;
    border-color: transparent;
    font-size: 20px;
    width: 25px;
    display: inline-block;
}
.payment_box .van-radio__icon .van-icon {
    border: transparent;
    width: 25px;
    display: inline-block;
}
.van-radio__label {
        margin-left: 8px;
    color: #323233;
    margin-top: -23px;
}

.payment_text {
    height: 48px;
    line-height: 48px;
    font-size: 14px;
    color: #757575;
}
.form-control{
    border: 2px solid #fff !important;
    box-shadow:none !important;
    margin-top: 16px;
    border-radius: 33px;
    height: 41px;}

.box_border{
    border-bottom: 1px solid #949494;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 5px;
     background-color: #fff;
    border-radius: 33px;
}
.pasw{
    width: 100%;
    border: 0;
    color:#7f7f7f;
    height: 36px;
    font-size: 14px;
    padding-left:111px;
}
.recharge_btn{
    width: 100%;
    padding: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0 24px;
}
.recharge_btn button{
    background: #009688;
    color: #fff;
    font-size: 14px;
    border-radius: 2px;
    border: 0;
    padding: 14px 0;
    text-align: center;
    width: 52%;
}

.left-addon .icon {
    left: 8px;
    top: 1px;
    font-size: 15px;
}
appBottomMenu {
	min-height:45px;
	position:fixed;
	z-index:9999;
	bottom:0;
	left:0;
	right:0;
	background:#1c1c2c;
	display:-webkit-box;
	display:flex;
	-webkit-box-align:center;
	align-items:center;
	-webkit-box-pack:center;
	justify-content:center;
	padding-bottom:env(safe-area-inset-bottom);
	-webkit-box-shadow: 0 3px 14px 2px rgba(0, 0, 0, .12);
	box-shadow: 0 3px 14px 2px rgba(0, 0, 0, .12);
}
.appBottomMenu .item {
	width:35%;
	text-align:center;
	height:56px;
	display:-webkit-box;
	display:flex;
	-webkit-box-align:center;
	align-items:center;
	-webkit-box-pack:center;
	justify-content:center
}
.appBottomMenu .item>a {
	width:100%;
	height:56px;
	display:-webkit-box;
	display:flex;
	-webkit-box-align:center;
	align-items:center;
	padding:0;
	-webkit-box-pack:center;
	justify-content:center;
	color:#1B2C42 !important;
	position:relative
}
.appBottomMenu .item p {
	margin:0
}
.appBottomMenu .item i {
	font-size:26px;
	line-height:0;
	margin-bottom:17px;
	    color: #a9a7a7;
	display:block
}
.appBottomMenu .item span {
	display:block;
	font-size:11px;
	position:absolute;
	
    color: #fff;
	left:0;
	bottom:9px;
	right:0
}


.appBottomMenu .item.active {
	position:relative
}
.appBottomMenu .item.active i{color:var(--background-color) !important;}
.appBottomMenu .item.active span{color:var(--background-color) !important;}
/*.appBottomMenu .item.active:after {
	content:'';
	height:2px;
	border-radius:0 0 10px 10px;
	display:block;
	background:#565EFF;
	position:absolute;
	left:0;
	top:0;
	right:0
}*/
.appBottomMenu .item.active>a {
	color:#a9a7a7 !important;
}
.appBottomMenu.iconed .item i {
	margin-bottom:0
}
.appBottomMenu.color-light {
	border-top:0
}
.appBottomMenu.color-light .item>a {
	color:rgba(255, 255, 255, 0.7) !important
}
.appBottomMenu.color-light .item.active:after {
	background:transparent
}
.appBottomMenu.color-light .item.active>a {
	color:#FFF !important
}
.appBottomMenu .item .ion-md-person{color:var(--background-color) !important;}
.appBottomMenu .item .toggleSidebar span{color:var(--background-color) !important;}
@media only screen and (max-width: 600px) {
 
 .pasw{
     padding-left:20px;
     height: 26px;
 }
 
}
</style>
</head>

<body>



<!-- App Header -->
<div class="appHeader1" >
<div class="left">
            <a href="#" onClick="goBack();" class="icon goBack">
                <i class="icon ion-md-arrow-back"></i>
            </a>
            <div class="pageTitle">Withdrawal</div>
              </div>
              
              
              <div class="right"> 
        
        <a href="withdrawalrecord.php"><i style="font-size: 18px;" class="icon ion-md-list"></i></a>
  
  </div>
 
 <?php
					  	$userid = $_SESSION['frontuserid'];
					  $sqlwallet = mysqli_query($com,"select * from withdraw_balance where userid ='$userid'");
					  $wallert_row = mysqli_fetch_assoc($sqlwallet);
					  $withhdraw_balance = $wallert_row['amount'];
					  
					  $sqlwithdra = mysqli_query($com,"select * from paymentsetting where id ='1'");
 $withdra_row = mysqli_fetch_array($sqlwithdra);
 $withdra = $withdra_row['withdrawalamount'];
					 
					  
					  $selectBankQuery=mysqli_query($com,"select * from `bankdetail` where `userid`='".$userid."'");
                      $bankResult=mysqli_fetch_assoc($selectBankQuery);
					  ?>
</div>
<!-- * App Header --> 
<!-- App Capsule -->
<div id="appCapsule">
  <div class="appContent1">
<h3 style="font-size: 16px;font-weight:bold;" class="text-center m-2">Withdraw Balance: <span>₹ <?php echo $withhdraw_balance ; ?></span></h3>

     <br>
    <form action="withdrawalNow.php" method="post" class="card-body" autocomplete="off" style="margin-top: -63px;">
      <div class="inner-addon left-addon">
      <i class="icon">₹</i>
        <input type="number" id="withdraw" name="withdraw" class="form-control" placeholder="Enter withdrawal amount" required>
        
      </div>
      <p style="margin-left:30px;color:red;font-size:12px;">Minimum withdraw amount <?php echo $withdra; ?></p> 
        <p class="payment_text">Bank Details</p>
        <input type="text"  value="<?php echo $bankResult['name'];  ?>" name="name" class="form-control" placeholder="Account Holder Name" readonly required>
        <input type="text" value="<?php echo $bankResult['bankname'];  ?>" name="bank_name" class="form-control" placeholder="Bank Name" readonly required>
        <input type="text" value="<?php echo $bankResult['account'];  ?>" name="account_no" class="form-control" placeholder="Account Number" readonly required>
        <input type="text" value="<?php echo $bankResult['ifsc'];  ?>" name="ifsc_code" class="form-control" placeholder="Ifsc Code" readonly required>
        <div>
               
          
           
      
               
      
     
<input type="hidden" name="userid" value="<?php echo $userid;?>">
<input type="hidden" name="action" value="withdrawal">


		<div class="recharge_btn text-center mt-3">
        
        <input type="submit" class="btn btn-primary" style="width:215px;background-color:green !important; background-image:none;" value="Withdrawal">
       
         </div>
        
      </div>
    </form>
  </div>
</div>
<!--<div class="container d-flex justify-content-center"><a href="withdrawalrecord.php" class"badge bg-info">Withdrawal Record</a>
</div>-->
<!-- appCapsule -->

<!--<div class="appBottomMenu">
  <div class="item "> <a href="index.php">
    <p> <i class="icon ion-md-home"></i> <span>Home</span> </p>
    </a> </div>
 
       <div class="item "> <a href="promotion.php">
    <p><i class="icon ion-md-grid"></i> <span>Team</span> </p>
    </a> </div>
    
    <div class="item active"> <a href="myaccount.php" class="icon toggleSidebar">
    <p> <i class="icon ion-md-person"></i> <span>My </span> </p>
    </a> </div>
    </div>-->
    
    
    
    <div id="alert" class="modal fade" role="dialog">
  <div class="modal-dialog modal-sm" role="document">
    <div class="modal-content">
      <div class="modal-body" id="alertmessage"> </div>
      <div class="text-center pb-1">
    <a type="button" class="text-info" data-dismiss="modal">OK</a>
    </div> 
    </div>
  </div>
</div>
<script src="assets/js/lib/jquery-3.4.1.min.js"></script> 
<!-- Bootstrap--> 
<script src="assets/js/lib/popper.min.js"></script> 
<script src="assets/js/lib/bootstrap.min.js"></script> 
<!-- Owl Carousel --> 
<script src="assets/js/plugins/owl.carousel.min.js"></script> 
<!-- Main Js File --> 
<script src="assets/js/app.js"></script>
<script src="assets/js/jquery.validate.min.js"></script>
<script src="assets/js/withdrawal.js.php"></script>
<script>
function paytype(userid,type)
{
//alert(userid);
var dataString = 'userid='+ userid+ "& type=" + type;
$.ajax
({
type: "POST",
url: "ajax_bankdetail.php",
data: dataString,
cache: false,
success: function(html)
{ //alert(html);
$("#acid").html(html);
} 
});	
	}
</script>

</body>
</html>