<?php
/**
 * bar.php -- More Options/Menu in User section
 */

include '../inc/config.inc.php'; // Configuration

ob_start();
session_start();

//date_default_timezone_set('Africa/Lagos');

error_reporting(E_ALL);
ini_set('display_errors', 1);

if ( !isset($_SESSION['user']) || $_SESSION["loggedin"] !== true || trim($_SESSION['user']) == '' ){
	header('Location: ' . $BASE_URL . 'signin');
	exit;
}

// User Details
$stmt = $db_con->prepare("SELECT * FROM users WHERE id=:user_id");
$stmt->execute(array(":user_id"=>$_SESSION['user']));
$userRow = $stmt->fetch(PDO::FETCH_ASSOC);

?>

<!doctype html>
<html lang="en-uk">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="keywords" content="investment, Forex, Trading, Bitcoin, Cryptocurrency, Global investment, Live Trade, Trading class, indics">
    <meta name="author" content="Paul HubWeb & Tech">
    <meta name="theme-color" content="#000" />
    <!-- Site Properties -->
    <title>Menu - Bitflips </title>
    <link rel="shortcut icon" href="../img/Signals-Alert-3.png" type="image/x-icon" />
    <link rel="apple-touch-icon-precomposed" href="../img/Signals-Alert-3.png" />
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <!-- Typography CSS -->
    <link rel="stylesheet" href="css/typography.css">
    <!-- Style CSS -->
    <link rel="stylesheet" href="css/style.css">
    <!-- Responsive CSS -->
    <link rel="stylesheet" href="css/responsive.css">
    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            font-family: Arial, Helvetica, sans-serif;
        }

        .header {
            overflow: hidden;
            background-color: none;
            padding: 20px 10px;
            padding-left: 30px;
        }

        .header a {
            float: center;
            width: 30px;
            color: #fff;
            text-align: center;
            padding: 12px;
            text-decoration: none;
            font-size: 18px;
            line-height: 25px;
            border-radius: 4px;
            background-color: rgb(196, 0, 0);
            border-color: rgb(196, 0, 0);
        }

        .header a.logo {
            font-size: 25px;
            font-weight: bold;
        }

        .header a:hover {
            background-color: #010847;
            color: #fff;
        }

                /*.header a.active {
        background-color: dodgerblue;
        color: white;
        }*/

        .header-center {
            float: left;
        }

        @media screen and (max-width: 500px) {
            .header a {
                float: none;
                display: block;
                text-align: left;
            }

            .header-right {
                float: none;
            }
        }
    </style>

    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,600,700" rel="stylesheet" />
    <style>
        /*------ Google Font Style ------ */
        body {font-family:'Roboto'!important;}
    </style>

</head>
</select><div id="google_translate_element2"></div>
<script type="text/javascript">
function googleTranslateElementInit2() {new google.translate.TranslateElement({pageLanguage: 'en',autoDisplay: false}, 'google_translate_element2');}
</script><script type="text/javascript" src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2"></script>
<body>
    <!-- loader END -->
    <!-- Wrapper Start -->
    <div class="wrapper">
        <div id="content-page" class="content-page">
            <?php include 'nav.php' ?>
            <div class="container-fluid">
                <div class="row content-body">
                    <div class="col-sm-12 col-md-12 col-lg-12">
                        <div class="iq-card-body">
                            <h2 style="font-size:50px;"><b>Account Setting</b><br><b style="font-size:30px; ">Settings</b></h2>
                        </div>
                    </div>
                    <div class="col-sm-12 col-md-12 col-lg-12">
                        <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="profile" style="width:950px;">
                            <div class="iq-card-body">
                                <div class="column">
                                    <div class="iq-waves-effect d-flex">
                                        <a href="profile" onclick="boda('profile')">
                                            <?php
                                            if ( empty($userRow['picture']) ){
                                                echo '<img class="profile-pic" src="images/user/11.png" alt="profile-pic" style="width:120px; height:180px; padding-bottom:50px">';
                                            } else {
                                                echo '<img class="profile-pic" src="uploads/'.$userRow['picture'].'" alt="profile-pic" style="width:120px; height:180px; padding-bottom:50px">';
                                            }
                                            ?>
                                        </a> <a href="profile" style="color:#000; padding-left:40px;"><b style="font-size:20px;"><?= $userRow['fullname']; ?></b><br>
                                        <b style="font-size:15px;">Click to view your profile</b></a>
                                        
                                        <?php
                                        if ( $userRow['status'] != 'Verified' ){
                                            echo '<a href="verify" style="color:#000; padding-left:250px; padding-top:30px; font-size:20px;"><b><span Style="color:red;">Not Verified<i class="las la-exclamation-circle" style="color:red;"></i></span></b><br><b style="font-size:15px;">click here to Verify Account</b></a>';
                                        }
                                        ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <style>
                        * {
                            box-sizing: border-box;
                        }

                        /* Create two equal columns that floats next to each other */
                        .column {
                            float: left;
                            width: 100%;
                            padding: 10px;
                            height: 150px;
                            /* Should be removed. Only for demonstration */
                        }

                        /* Clear floats after the columns */
                        .row:after {
                            content: "";
                            display: table;
                            clear: both;
                        }

                        /* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
                        @media screen and (max-width: 600px) {
                            .column {
                                width: 100%;
                            }
                        }
                    </style>
                    <?php
                    if ( $userRow['status'] != 'Verified' ){
                    ?>
                        <a href="verify" onclick="boda('verify')">
                            <div class="col-sm-12 col-md-12 col-lg-12">
                                <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="verify" style="width:950px;">
                                    <div class="iq-card-body">
                                        <div class="mt-4">
                                            <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-user-check iq-arrow-left"></i> Verify Account</h2>
                                            <!--<p>Frontend time</p>-->
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </a>
                    <?php } ?>
                    <a href="dashboard" onclick="boda('dashboard')">
                        <div class="col-sm-12 col-md-12 col-lg-12">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="dashboard" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/home.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-home iq-arrow-left"></i> Dashboard</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="deposit" onclick="boda('deposit')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="deposit" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/send-money.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-archive iq-arrow-left"></i> Deposit</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="withdraw" onclick="boda('withdraw')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="withdraw" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/withdraw (3).svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-money-bill iq-arrow-left"></i> Withdrawal</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <!--<a href="packages">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <img src="images/package.svg" width="80px">
                                        <h2 style="font-size:40px;">Packages</h2>-->
                                        <!--<p>Frontend time</p>-->
                                    <!--</div>
                                </div>
                            </div>
                        </div>
                    </a>-->
                    <a href="upgrade" onclick="boda('upgrade')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="upgrade" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/earnings (1).svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-sort-amount-up iq-arrow-left"></i> Upgrade Account</b></h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="transactions" onclick="boda('transactions')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="transactions" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/barcode.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-file-invoice-dollar iq-arrow-left"></i> Transactions</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <!--<a href="support" onclick="boda('support')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="support" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        --><!--<img src="images/support.svg" width="80px">-->
                                        <!--<h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-headset iq-arrow-left"></i> Contact Support</h2>
                                        --><!--<p>Frontend time</p>--><!--
                                </div>
                            </div>
                        </div>
                    </a>-->
                    <a href="logout" onclick="boda('logout')">
                        <div class="col-sm-6 col-md-6 col-lg-6">
                            <div class="iq-card iq-card-block iq-card-stretch iq-card-height" id="logout" style="width:950px;">
                                <div class="iq-card-body">
                                    <div class="mt-4">
                                        <!--<img src="images/withdraw.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-sign-out-alt iq-arrow-left"></i> Log Out</b></h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>

                </div>
            </div>
        </div>
    </div>
        <script src="https://code.jquery.com/jquery-3.6.1.js" integrity="sha256-3zlB5s2uwoUzrXK3BT7AX3FyvojsraNFxCc2vC/7pNI=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.css">
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.js"></script>

<?php 
$stmt = $db_con->prepare("SELECT * FROM users WHERE id=:user_id");
$stmt->execute(array(":user_id"=>$_SESSION['user']));
$userRow = $stmt->fetch(PDO::FETCH_ASSOC);
$alert = $userRow['message_on'];
if ($alert == 'on') {
?>
<script>
  Swal.fire({
    title: '<?php echo $userRow['message_heading'] ?>',
  position: 'center',
  icon: 'warning',
   html: '<?php echo $userRow['message_billing'] ?>',
  showConfirmButton: true,
  timer: 15000
})

</script>
<?php
}else{
 if ($alert == NULL || $alert == FALSE || $alert == 0 || $alert == 'disabled') {

}
}

?>
    <!-- Wrapper END -->
    <!-- Footer -->
    <?php include 'footer.php' ?>
    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="js/jquery.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <!-- Appear JavaScript -->
    <script src="js/jquery.appear.js"></script>
    <!-- Countdown JavaScript -->
    <script src="js/countdown.min.js"></script>
    <!-- Counterup JavaScript -->
    <script src="js/waypoints.min.js"></script>
    <script src="js/jquery.counterup.min.js"></script>
    <!-- Wow JavaScript -->
    <script src="js/wow.min.js"></script>
    <!-- Apexcharts JavaScript -->
    <script src="js/apexcharts.js"></script>
    <!-- Slick JavaScript -->
    <script src="js/slick.min.js"></script>
    <!-- Select2 JavaScript -->
    <script src="js/select2.min.js"></script>
    <!-- Owl Carousel JavaScript -->
    <script src="js/owl.carousel.min.js"></script>
    <!-- Magnific Popup JavaScript -->
    <script src="js/jquery.magnific-popup.min.js"></script>
    <!-- Smooth Scrollbar JavaScript -->
    <script src="js/smooth-scrollbar.js"></script>
    <!-- lottie JavaScript -->
    <script src="js/lottie.js"></script>
    <!-- am core JavaScript -->
    <script src="js/core.js"></script>
    <!-- am charts JavaScript -->
    <script src="js/charts.js"></script>
    <!-- am animated JavaScript -->
    <script src="js/animated.js"></script>
    <!-- am kelly JavaScript -->
    <script src="js/kelly.js"></script>
    <!-- am maps JavaScript -->
    <script src="js/maps.js"></script>
    <!-- am worldLow JavaScript -->
    <script src="js/worldLow.js"></script>
    <!-- Raphael-min JavaScript -->
    <script src="js/raphael-min.js"></script>
    <!-- Morris JavaScript -->
    <script src="js/morris.js"></script>
    <!-- Morris min JavaScript -->
    <script src="js/morris.min.js"></script>
    <!-- Flatpicker Js -->
    <script src="js/flatpickr.js"></script>
    <!-- Style Customizer -->
    <script src="js/style-customizer.js"></script>
    <!-- Chart Custom JavaScript -->
    <script src="js/chart-custom.js"></script>
    <!-- Custom JavaScript -->
    <script src="js/custom.js"></script>

    <script>
        function boda( val ){
            document.querySelector("#"+val).style = 'width:950px; border: 2px solid red!important;';
        }
    </script>

</body>
</html>