<?php
/**
 * userEdit.php -- More Options for User
 */

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['admin']) || $_SESSION["loggedin"] !== true || trim($_SESSION['admin']) == '' ){
	//header('Location: ' . $BASE_URL . 'wp-admin/');
    header('Location: ' . $BASE_URL . 'signin');
	exit;
}

if ( isset($_GET['id']) ){
    $user_id = intval($_GET['id']);
    // Users
    $users = $db_con->prepare("SELECT id, fullname, picture, status FROM users WHERE id='$user_id'");
    $users->execute();
    $user = $users->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>Edit - Alert Signals Nation</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">

    <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>
<body>
    <!-- loader END -->
    <!-- Wrapper Start -->
    <div class="wrapper">
        <div id="content-page" class="content-page">
            <div class="container-fluid">
                <div class="row content-body">
                    <div class="col-sm-12 col-md-12 col-lg-12">
                        <div class="iq-card iq-card-block iq-card-stretch iq-card-height" style="width:950px;">
                            <div class="iq-card-body">
                                <div class="column">
                                    <div class="iq-waves-effect d-flex">
                                        <a href="userProfile?id=<?= $user['id']; ?>">
                                            <?php
                                            if ( empty($user['picture']) ){
                                                echo '<img class="profile-pic" src="../wp-user/images/user/11.png" alt="profile-pic" style="width:120px; height:180px; padding-bottom:50px">';
                                            } else {
                                                echo '<img class="profile-pic" src="../wp-user/uploads/'.$user['picture'].'" alt="profile-pic" style="width:120px; height:180px; padding-bottom:50px">';
                                            }
                                            ?>
                                        </a>&nbsp;
                                        <a href="userProfile?id=<?= $user['id']; ?>" style="color:#000; padding-left:40px;"><b style="font-size:30px;"><?= $user['fullname']; ?></b><br><b style="font-size:15px;">Click to view user's profile</b></a>
                                        
                                        <?php
                                        if ( $user['status'] != 'Verified' ){
                                            echo '<a href="#" 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 User\'s 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>
                    <a href="users" onclick="boda('users')">
                        <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/withdraw.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-arrow-left iq-arrow-left"></i> Go Back</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="userAddDeposit?id=<?= $user['id']; ?>" onclick="boda('user_deposit')">
                        <div class="col-sm-12 col-md-12 col-lg-12">
                            <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/send-money.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-archive iq-arrow-left"></i> Add Deposit To User's Account</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="userDebit?id=<?= $user['id']; ?>" onclick="boda('user_debit')">
                        <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/withdraw (3).svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-money-bill iq-arrow-left"></i> Deduct From User's Account</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>

                    <!--<a href="userUpgradePlans?id=<?= $user['id']; ?>" onclick="boda('user_upgrade_plans')">
                        <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-sort-amount-up iq-arrow-left"></i> Add/Update Upgrade Plans</h2>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>-->

                    <a href="userMail?id=<?= $user['id']; ?>" onclick="boda('user_mail')">
                        <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/email.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-envelope iq-arrow-left"></i> Email User</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="userTrade?id=<?= $user['id']; ?>" onclick="boda('user_trade')">
                        <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/home.svg" width="80px">-->
                                        <h2 style="font-size:40px; font-family: 'Roboto'!important;"><i class="las la-coins iq-arrow-left"></i> Trade Session</h2>
                                        <!--<p>Frontend time</p>-->
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    <a href="userTransactions?id=<?= $user['id']; ?>" onclick="boda('user_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" 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="transaction.php">
                  <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/barcode.svg" width="80px">
                                    <h2 style="font-size:40px;">Transactions</h2>
                                 
                              </div>
                           </div>
                        </div>
                     </div>
                     </a>
                     <a href="support.php"><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/support.svg" width="80px">
                                 <h2 style="font-size:40px;">Contact Support</h2>
                                 
                              </div>
                           </div>
                        </div>
                     </div></a>
                     <a href="upgrade.php"><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/earnings (1).svg" width="80px">
                                 <h2 style="font-size:40px;">Upgrade Account</b></h2>
                              </div>
                           </div>
                        </div>
                     </div></a>
                     <a href="../signin.php"><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/withdraw.svg" width="80px">
                                 <h2 style="font-size:40px;">Log Out</b></h2>
                              </div>
                           </div>
                        </div>
                     </div></a>-->

                </div>
            </div>
        </div>
    </div>
    <!-- Wrapper END -->
    <!-- Footer -->
    <footer class="iq-footer">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-6">
                    <ul class="list-inline mb-0">
                        <li class="list-inline-item"><a href="#">Privacy Policy</a></li>
                        <li class="list-inline-item"><a href="#">Terms of Use</a></li>
                    </ul>
                </div>
                <div class="col-lg-6 text-right">
                    Copyright 2020 <a href="#">Alert Signals Nations</a> All Rights Reserved.
                </div>
            </div>
        </div>
    </footer>
    <!-- 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>

<?php
}
?>