<?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"); ?>

<?php
$withdraw_trans_code = $_GET['withdraw_trans_code'];
$type_wallet = $_GET['type_wallet'];

$sql_withdraw = "SELECT * 
FROM withdraw_transaction
WHERE trans_code='$withdraw_trans_code' LIMIT 1";
$result_withdraw = $mysqli-> query($sql_withdraw);
if ($result_withdraw -> num_rows > 0)
{
	$row_withdraw = $result_withdraw ->fetch_assoc();
	$tac_no_system = $row_withdraw['tac_no'];
}

$q_rules = "SELECT *
            FROM system_setting
            Where status='1'";
$result_rules = $mysqli->query($q_rules);
if ($result_rules ->num_rows > 0)
{
	$row_q_rules = $result_rules ->fetch_assoc();
    $tac_enablation_button = $row_q_rules['tac_enablation_button'];
}

?>
        
<!-- 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 -->
    <!-- ============================================================== -->

    <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">

                            <h3 class="card-title">Withdrawal Confirmation</h3>       
                            <hr>

                            <div class="row p-t-20">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label class="control-label">Please Enter Tac No</label>
                                        <?php
                                        if ($tac_enablation_button == "1")
                                        {
                                        ?>
                                        <input type="number" class="form-control" name="tac_no" required>
                                        <?php
										}
                                        else
                                        {
                                        ?>
                                        <input type="number" class="form-control" name="tac_no" value="<?php echo $tac_no_system; ?>" readonly>
                                        <?php
										}
                                        ?>
                                    </div>
                                </div>   
                            </div>

                            <input type="hidden" class="form-control"  name="id" value="<?php echo $id; ?>">
                            <input type="hidden" class="form-control"  name="type_wallet" value="<?php echo $type_wallet; ?>">
                            <input type="hidden" class="form-control"  name="withdraw_trans_code" value="<?php echo $withdraw_trans_code; ?>">
                        </div>
                        <div class="form-actions">
                            <button name="withdraw_confirm" class="btn btn-success"><i class="fa fa-check"></i> Withdraw</button>
                        </div>
                    </form>
                </div>
            </div>                     
        </div>
    </div>		
    <!-- ============================================================== -->
    <!-- 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>