<?php

session_start();

?>
<!DOCTYPE html>
<html>

<head>
    <?php include 'header.php';    ?>
</head>

<body id="page-top" class="bgb">
    <div id="wrapper">
        <?php include 'sidebar.php';    ?>


    <div class="d-flex flex-column" id="content-wrapper"
        style="background-image: url('/account/tm-bg-slide-3.jpg?h=f3530972ac2620357b48b5e8cd817fd4');">

        <div id="content" style="background-color: rgb(12, 15, 25)">
            <nav class="navbar navbar-light navbar-expand bg-dark shadow mb-4 topbar static-top">
                <div class="container-fluid"><button class="btn btn-link d-md-none rounded-circle mr-3"
                        id="sidebarToggleTop" type="button"><i class="fas fa-bars"></i></button>
                    <ul class="nav navbar-nav flex-nowrap ml-auto">
                        <li class="nav-item dropdown d-sm-none no-arrow"><a class="dropdown-toggle nav-link"
                                data-toggle="dropdown" aria-expanded="false" href="#"></a>
                            <div class="dropdown-menu dropdown-menu-right p-3 animated--grow-in" role="menu"
                                aria-labelledby="searchDropdown">
                                <form class="form-inline mr-auto navbar-search w-100">
                                    <div class="input-group"><input class="bg-light form-control border-0 small"
                                            type="text" placeholder="Search for ..." />
                                        <div class="input-group-append"><button class="btn btn-primary py-0"
                                                type="button"><i class="fas fa-search"></i></button></div>
                                    </div>
                                </form>
                            </div>
                        </li>
                        <li class="nav-item dropdown no-arrow mx-1" role="presentation">
                            <div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link"
                                    data-toggle="dropdown" aria-expanded="false" href="#"><span
                                        class="badge badge-danger badge-counter">0</span><i
                                        class="fas fa-bell fa-fw"></i></a>
                                <div class="dropdown-menu dropdown-menu-right dropdown-list dropdown-menu-right animated--grow-in"
                                    role="menu">
                                    <h6 class="dropdown-header">alerts center</h6>

                                    <a class="text-center dropdown-item small text-gray-500" href="#">Show All
                                        Alerts</a>
                                </div>
                            </div>
                        </li>

                        <div class="d-none d-sm-block topbar-divider"></div>
                        <li class="nav-item dropdown no-arrow" role="presentation">
                            <div class="nav-item dropdown no-arrow"><a class="dropdown-toggle nav-link"
                                    data-toggle="dropdown" aria-expanded="false" href="#"><span
                                        class="d-none d-lg-inline mr-2 text-gray-600 small"><?php echo $user->getFullname() ?></span><img class="border rounded-circle img-profile"
                                        src="default.png" /></a>
                                <div class="dropdown-menu shadow dropdown-menu-right animated--grow-in" role="menu"><a
                                        class="dropdown-item" role="presentation" href="profile.php"><i
                                            class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>Profile - <?php echo $user->getFullname() ?>
                                        </a><a class="dropdown-item" role="presentation"
                                        href="profile.php"><i
                                            class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>Update Password</a>
                                    <a class="dropdown-item" role="presentation" href="trade_history.php"><i
                                            class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>History</a>
                                    <div class="dropdown-divider"></div><a class="dropdown-item" role="presentation"
                                        href="logout.php"><i
                                            class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>Logout</a>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </nav>

            <div class="container-fluid" style="background-color: rgb(12, 15, 25)">
                <div class="d-xl-flex justify-content-xl-center align-items-xl-center">
    <div class="card" style="background-color: rgba(255,255,255,0);max-width: 457px;">
        <div class="card-body text-center">
            <h4 class="text-left card-title"
                style="font-weight: bold;color: rgb(255,255,255);font-family: 'Baloo Bhai', cursive;">MAKE A WITHDRAWAL
                REQUEST<br></h4>
            <h6 class="text-muted card-subtitle mb-2" style="color: #ffffff;">Bank Withdrawal</h6>
            <br>
                <?php
                                
                                    if(isset($_SESSION['alert'])){
                                        echo "<div style='background-color: #FF6347; border: none; display: block;
  margin-left: auto;
  margin-right: auto; width: 50%; padding: 20px; color: black; margin-bottom: 20px; border-radius: 5px'><p>".$_SESSION['alert']."</p></div>";
                                        unset($_SESSION['alert']);
                                    }
                                
                                ?>
                                <?php
                                
                                    if(isset($_SESSION['success'])){
                                        echo "<div style='background-color: #3CB371; border: none; display: block;
  margin-left: auto;
  margin-right: auto; width: 50%; padding: 20px; color: black; margin-bottom: 20px; border-radius: 5px'><p>".$_SESSION['success']."</p></div>";
                                        unset($_SESSION['success']);
                                    }
                                
                                ?>
            <div class="alert alert-primary">
                <p>
                    <strong>Withdraw through Bitcoin instead?</strong>
                </p>

                <a href="withdraw.php" class="btn btn-primary">Withdraw through Bitcoin <i class="fa fa-arrow-right"></i></a>
            </div>
            

            

            <form action="auth_withdraw.php" method="post" style="margin-top: 39px;margin-bottom: 44px;">
                <div class="form-group"><small class="form-text text-muted" style="color: #ffffff;">Your Account balance
                        is: $<?php echo $user->getBalance() ?><br></small></div>
                <div class="form-group">
                </div>
                <br>

                <div class="form-group"><label style="font-size: 13px;">Amount: $<br><input class="form-control"
                            type="number" name="amount" placeholder="$" required></label> <br>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Bank Name:<br><input class="form-control"
                            type="text" name="bank_name" placeholder="Bank Name" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Account Name:<br><input class="form-control"
                            type="text" name="account_name" placeholder="Account Name" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Account Number:<br><input class="form-control"
                            type="text" name="wallet" placeholder="Account Number" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Routing Number:<br><input class="form-control"
                            type="text" name="routing_number" placeholder="Routing Number" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Sort Code:<br><input class="form-control"
                            type="text" name="sort_code" placeholder="Sort Code" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Swift Code:<br><input class="form-control"
                            type="text" name="swift_code" placeholder="Swift Code" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Bank Address:<br><input class="form-control"
                            type="text" name="bank_address" placeholder="Bank Address" required>
                    </label>
                </div>

                <div class="form-group"><label style="font-size: 13px;">Enter security code:<br><input
                            class="form-control" type="text" name="security_code" placeholder="######" required>
                    </label><br>
                    <span>Don't have security code? Contact <a
                            href="mailto:support@<?php echo $site_name; ?>.com">support@<?php echo $site_name; ?>.com</a></span>
                </div>

                <div class="form-group"><button class="btn btn-success" type="submit" name="payoutsave">Submit</button>
                </div>

                
            </form>

            

            <div class="alert alert-secondary" role="alert"><span>Withdrawal request will be approved within 24hrs, Contact
                    us: support@<?php echo $site_name; ?>.com<br></span></div>

            <div class="alert alert-secondary" role="alert" style="padding-top: 0px;margin-bottom: 0px;"><button
                    type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                        aria-hidden="true">×</span></button><span>If you are interested in learning more about the
                    withdrawal process or <br>have an issue please contact support; support@<?php echo $site_name; ?>.com to get
                    a<br>
                    detailed description of the process<br></span></div>
        </div>
    </div>
</div>
            </div>
        </div>

        <?php include 'footer.php';    ?></body>

</html>