<?php include("../Header/Session.php"); ?>
<?php include("../Header/Connection.php"); ?>


<!DOCTYPE html>
<html lang="en">
<?php include ("../Header/head.php"); ?>
<body class="skin-default fixed-layout">

<!-- Main wrapper - style you can find in pages.scss -->
<div id="main-wrapper">    
<?php include ("../Header/header.php"); ?>
<?php include ("../Header/left_menu.php"); ?>
<?php include ("../Header/right_sidebar.php"); ?>
  
<!-- Page wrapper  -->
<div class="page-wrapper">
<!-- Container fluid  -->
<div class="container-fluid">

    <!-- Bread crumb and right sidebar toggle -->
    <!--?php include ("../Header/breadcumb.php"); ?-->
    <br><br>
    <!-- End Bread crumb and right sidebar toggle -->
    
    <!-- Start Page Content -->
    <!-- ============================================================== -->

    <?php

    $withdraw_id = $_GET['withdraw_id'];

    $q = "SELECT *
    FROM withdraw_transaction
    WHERE id='$withdraw_id'";
    $result = $mysqli-> query($q);
    if ($result -> num_rows > 0)
    {
	    while($row = $result -> fetch_assoc())
	    {                
            $id = $row['id'] ;
	        $wd_id = $row['id'];
            $amount = $row['amount'];
	        $acc_holder_name = $row['acc_holder_name'];
	        $acc_no = $row['acc_no'];
	        $bank = $row['bank'];
            $shipping_selection = $row['shipping_selection'];
            $name = $row['name'];
            $last_name = $row['last_name'];
            $phone_number = $row['phone_number'];
            $country = $row['country'];
            $state = $row['state'];
            $postcode = $row['postcode'];
            $shipping_address = $row['shipping_address'];
            $remark = $row['remark'];
            $payment_status_1 = $row['payment_status'];		   
    ?> 

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <form method="post" action="../Controller/Database_sql.php" enctype="multipart/form-data">
                        <div class="form-body">
                            <div class="row p-t-20">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Amount Withdraw</label>
                                        <input type="text" class="form-control"  name="amount" value="<?php echo $amount; ?> gram"  readonly>
                                    </div>
                                </div>
                                
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Shipping Selection</label>
                                        <select  name="shipping_selection" class="form-control" required>
                                            <option value="<?php echo $shipping_selection; ?>"><?php echo $shipping_selection; ?></option>
                                            <option value="Walk In To Office">Walk In To Office</option>
                                            <option value="Ship To Selected Address">Ship To Selected Address</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">First Name</label>
                                        <input type="text" class="form-control"  name="name" value="<?php echo $name; ?>" >
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Last Name</label>
                                        <input type="text" class="form-control"  name="last_name" value="<?php echo $last_name; ?>" >
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Phone Number</label>
                                        <input type="text" class="form-control"  name="phone_number" value="<?php echo $phone_number; ?>" >
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Country</label>
                                        <input type="text" class="form-control"  name="country" value="<?php echo $country; ?>" >
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">State</label>
                                        <input type="text" class="form-control"  name="state" value="<?php echo $state; ?>" >
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Postcode</label>
                                        <input type="text" class="form-control"  name="postcode" value="<?php echo $postcode; ?>" >
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Shipping Address (If Choose Shipping Option Only)</label>
                                        <textarea type="text"  style="width:100%;" rows="2" cols="39" name="shipping_address"><?php echo $shipping_address; ?></textarea>
                                    </div>
                                </div>
                            </div>

                        </div>
                        <div class="form-actions">
                            <input type="hidden" class="form-control"  name="withdraw_id" value="<?php echo $withdraw_id; ?>">
                            <button name="update_withdraw_detail" class="btn btn-success"><i class="fa fa-check"></i> Update Detail</button>
                            <a href="wallet_history.php?type_wallet=gold_wallet" class="btn btn-success">Back</a>
                        </div>
                    </form>
                </div>
            </div>                     
        </div>
    </div>
    <?php
    }
    }
    else
    {
    echo mysql_error();
    }
    ?>				
    <!-- ============================================================== -->
    <!-- End PAge Content -->

</div>
<!-- End Container fluid  -->
</div>
<!-- End Page wrapper  -->


<!-- Footer Start-->
<?php include ("../Footer/footer.php"); ?>
<!-- Footer End-->

</div>
<!-- End Wrapper -->
<!-- All Jquery -->
    

<!-- All Jquery Start-->
<?php include ("../Header/all_jquery.php"); ?>
<!-- All Jquery End-->

    

</body>

</html>