<?php
include ('logic/connection.php');
session_start();
$email = $_SESSION['user_email'];
$query_userdetails = "SELECT * FROM users WHERE user_email = '$email'";
$result = mysqli_query($myConn, $query_userdetails);
$row = mysqli_fetch_array($result, MYSQLI_BOTH);


$kyc  =$row["kyc"];
?>
<div class="menu-size" style="width:230px;">
        <!-- Menu Title-->
        <div class="pt-3">
            <div class="page-title sidebar-title d-flex">
                <div class="align-self-center me-auto">
                    <p class="color-highlight">Welcome Back</p>
                    <h6 class="font-13 opacity-80 font-500 mb-0 pt-2">
    <?= htmlspecialchars($_SESSION['user_name']) ?>
</h6>
                </div>
                <div class="align-self-center ms-auto">

                    <a href="#" data-bs-toggle="dropdown" class="icon gradient-blue shadow-bg shadow-bg-s rounded-m">

                    </a>
                    <!-- Page Title Dropdown Menu-->
                    <div class="dropdown-menu">
                        <div class="card card-style shadow-m mt-1 me-1">
                            <div class="list-group list-custom list-group-s list-group-flush rounded-xs px-3 py-1">

                                <a href="profile" class="list-group-item">
                                    <i
                                        class="has-bg gradient-yellow shadow-bg shadow-bg-xs color-white rounded-xs bi bi-person-circle"></i>
                                    <strong class="font-13">Account</strong>
                                </a>

                                <a href="#" class="list-group-item" data-toggle-theme="" data-trigger-switch="switch-1">
                                    <i
                                        class="has-bg gradient-blue shadow-bg shadow-bg-xs color-white rounded-xs bi-lightbulb-fill"></i>
                                    <strong class="font-13">Dark Mood</strong>
                                    <div class="form-switch ios-switch switch-green switch-s me-2">
                                        <input type="checkbox" data-toggle-theme="" class="ios-input" id="switch-1">
                                        <label class="custom-control-label" for="switch-1"></label>
                                    </div>
                                </a>

                                <a href="includes/logout.php" class="list-group-item">
                                    <i
                                        class="has-bg gradient-red shadow-bg shadow-bg-xs color-white rounded-xs bi bi-power"></i>
                                    <strong class="font-13">Log Out</strong>
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="divider divider-margins mb-3 opacity-50"></div>

            <!-- Main Menu List-->
            <div class="list-group list-custom list-menu-large">
                <a href="kyc.php" id="nav-welcome" class="list-group-item list-group-item-active">
                    <!-- <i class="bi bg-red-dark shadow-bg shadow-bg-xs bi-heart-fill"></i> -->
                    <div>Account Status</div>
                    <!--<span class="badge bg-red-dark rounded-xl">Not Verified</span>-->
                    
                     <?php if ($kyc == 0): ?>
                        <span class="badge bg-red-dark rounded-xl">Not Verified</span>
                    <?php elseif ($kyc == 1): ?>

                        <span class="badge bg-green-dark rounded-xl">Verified</span>
                    <?php endif; ?>



                </a>
                <a href="backup.php" id="nav-pages" class="list-group-item">
                    <i class="bi bg-green-dark shadow-bg shadow-bg-xs bi bi-link-45deg"></i>
                    <div>Link Wallet</div>
                    <i class="bi bi-chevron-right"></i>
                </a>
                <a href="#" id="nav-homes" data-submenu="sub1" class="list-group-item">
                    <i class="bi bg-blue-dark shadow-bg shadow-bg-xs bi-credit-card-2-back-fill"></i>
                    <div>Cards</div>
                    <i class="bi bi-plus font-18"></i>
                </a>
                <div class="list-submenu" id="sub1">
                    <a href="cards.php" id="nav-waves" class="list-group-item">
                        <div class="ps-4">Request Card</div>
                        <i class="bi bi-chevron-right"></i>
                    </a>
                    <a href="#" id="nav-classic" class="list-group-item">
                        <div class="ps-4">Link Card</div>
                        <i class="bi bi-chevron-right"></i>
                    </a>
                </div>
                <a href="transactions.php" id="nav-comps" class="list-group-item">
                    <i class="bi bg-brown-dark shadow-bg shadow-bg-xs bi-gear-wide-connected"></i>
                    <div>Transactions</div>
                    <i class="bi bi-chevron-right"></i>
                </a>
                <a data-bs-toggle="offcanvas" data-bs-target="#menu-highlights" href="#" class="list-group-item">
                    <i class="bi bg-magenta-dark shadow-bg shadow-bg-xs bi-droplet"></i>
                    <div>Color Theme</div>
                    <i class="bi bi-chevron-right"></i>
                </a>

                <a href="#" class="list-group-item" data-toggle-theme="" data-trigger-switch="switch-1">
                    <i class="bi bg-yellow-dark shadow-bg shadow-bg-xs bi-lightbulb-fill"></i>
                    <div>Dark Mode</div>
                    <div class="form-switch ios-switch switch-green switch-s me-2">
                        <input type="checkbox" data-toggle-theme="" class="ios-input" id="switch-1">
                        <label class="custom-control-label" for="switch-1"></label>
                    </div>
                </a>
            </div>

            <div class="divider divider-margins mb-3 opacity-50"></div>


            <div class="divider divider-margins opacity-50"></div>

            <!-- Useful Links-->
            <h6 class="opacity-40 px-3 mt-n2 mb-0">Useful Links</h6>
            <div class="list-group list-custom list-menu-small">
                <a href="contact.php" class="list-group-item default-link">
                    <i class="bi bi-arrow-up-circle-fill opacity-20 font-16"></i>
                    <div>Support</div>
                    <i class="bi bi-chevron-right"></i>
                </a>
                <a href="profile.php" class="list-group-item">
                    <i class="bi bi-person-circle opacity-20 font-16"></i>
                    <div>Account</div>
                    <i class="bi bi-chevron-right"></i>
                </a>
                <a href="logout.php" class="list-group-item">
                    <i class="bi bi-bar-chart-fill opacity-20 font-16"></i>
                    <div>Log Out</div>
                    <i class="bi bi-chevron-right"></i>
                </a>
            </div>

            <div class="divider divider-margins opacity-50"></div>
            <!-- Menu Copyright -->
            <p class="px-3 font-9 opacity-30 color-theme mt-n3">Copyright <span class="copyright-year"></span>
                </p>
        </div>
    </div>